diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php
index c66c49aed..4ecfe0cd5 100644
--- a/plugins/af_psql_trgm/init.php
+++ b/plugins/af_psql_trgm/init.php
@@ -124,113 +124,117 @@ class Af_Psql_Trgm extends Plugin {
function hook_prefs_tab($args) {
if ($args != "prefFeeds") return;
- print "
extension ".__('Mark similar articles as read (af_psql_trgm)')."\">";
+ $similarity = $this->host->get($this, "similarity", $this->default_similarity);
+ $min_title_length = $this->host->get($this, "min_title_length", $this->default_min_length);
+ $enable_globally = sql_bool_to_bool($this->host->get($this, "enable_globally"));
- if (DB_TYPE != "pgsql") {
- print_error("Database type not supported.");
- } else {
+ ?>
- $res = $this->pdo->query("select 'similarity'::regproc");
+
- if (!$res || !$res->fetch()) {
- print_error("pg_trgm extension not found.");
- }
+ pdo->query("select 'similarity'::regproc");
- $similarity = $this->host->get($this, "similarity", $this->default_similarity);
- $min_title_length = $this->host->get($this, "min_title_length", $this->default_min_length);
- $enable_globally = sql_bool_to_bool($this->host->get($this, "enable_globally"));
+ if (!$res || !$res->fetch()) {
+ print_error("pg_trgm extension not found.");
+ }
+ } ?>
- print "
- print "
";
+ 0) { ?>
+
+
= __("Currently enabled for (click to edit):") ?>
- print "
";
- print \Controls\submit_tag(__("Save"));
- print "";
-
- /* cleanup */
- $enabled_feeds = $this->filter_unknown_feeds(
- $this->get_stored_array("enabled_feeds"));
-
- $this->host->set($this, "enabled_feeds", $enabled_feeds);
-
- if (count($enabled_feeds) > 0) {
- print "
";
- print "
" . __("Currently enabled for (click to edit):") . "
";
-
- print "
";
- }
- }
-
- print "
";
+
+
+
+ ".__("Similarity (af_psql_trgm)")."";
- print "