X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/a9eef437702d5df7a2f97010e6798c689371808c..fa657e16956d77027de1594980e27ffef3ff82c1:/forum_modules/pgfulltext/__init__.py diff --git a/forum_modules/pgfulltext/__init__.py b/forum_modules/pgfulltext/__init__.py old mode 100755 new mode 100644 index ec4892c..05dcb3d --- a/forum_modules/pgfulltext/__init__.py +++ b/forum_modules/pgfulltext/__init__.py @@ -1,9 +1,11 @@ -NAME = 'Postgresql Full Text Search' -DESCRIPTION = "Enables PostgreSql full text search functionality." - -try: - import psycopg2 - CAN_ENABLE = True -except: - CAN_ENABLE = False - \ 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