]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/pgfulltext/__init__.py
Adding Traditional Chinese translation by Deng Fei. Language code: cn.
[osqa.git] / forum_modules / pgfulltext / __init__.py
old mode 100755 (executable)
new mode 100644 (file)
index ec4892c..05dcb3d
@@ -1,9 +1,11 @@
-NAME = 'Postgresql Full Text Search'\r
-DESCRIPTION = "Enables PostgreSql full text search functionality."\r
-\r
-try:\r
-    import psycopg2\r
-    CAN_ENABLE = True\r
-except:\r
-    CAN_ENABLE = False\r
-    
\ No newline at end of file
+from forum.base import get_database_engine
+database_type = get_database_engine()
+
+NAME = 'Postgresql Full Text Search'
+DESCRIPTION = "Enables PostgreSql full text search functionality."
+
+try:
+    import psycopg2
+    CAN_USE = 'postgresql' in database_type
+except:
+    CAN_USE = False