diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php index 0de46b085..8dde76d40 100644 --- a/plugins/af_psql_trgm/init.php +++ b/plugins/af_psql_trgm/init.php @@ -119,90 +119,91 @@ class Af_Psql_Trgm extends Plugin { if (DB_TYPE != "pgsql") { print_error("Database type not supported."); - } + } else { - $result = db_query("select 'similarity'::regproc"); + $result = db_query("select 'similarity'::regproc"); - if (db_num_rows($result) == 0) { - print_error("pg_trgm extension not found."); - } - - $similarity = $this->host->get($this, "similarity"); - $min_title_length = $this->host->get($this, "min_title_length"); - $enable_globally = $this->host->get($this, "enable_globally"); - - if (!$similarity) $similarity = '0.75'; - if (!$min_title_length) $min_title_length = '32'; - - $enable_globally_checked = $enable_globally ? "checked" : ""; - - print "
"; + print "" . __("Minimum similarity:") . " | "; + print "+ |
" . __("Minimum title length:") . " | "; + print "+ |
" . __("Enable for all feeds:") . " | "; + print "+ |
"; + + print ""; + + $enabled_feeds = $this->host->get($this, "enabled_feeds"); + if (!array($enabled_feeds)) $enabled_feeds = array(); + + $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds); + $this->host->set($this, "enabled_feeds", $enabled_feeds); + + if (count($enabled_feeds) > 0) { + print "