Commit 4484c282adf3e1c5f8e57e3de0bfcdbe0b246778
1 parent
c3eeca85
Removed additional search fields (temporarily) - causing an issue with KTTools search.
Committed by: Megan Watson Reviewed by: Martin Kirsten
Showing
1 changed file
with
10 additions
and
10 deletions
search2/search/fieldRegistry.inc.php
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | * KnowledgeTree Community Edition | 5 | * KnowledgeTree Community Edition |
| 6 | * Document Management Made Simple | 6 | * Document Management Made Simple |
| 7 | * Copyright (C) 2008, 2009, 2010 KnowledgeTree Inc. | 7 | * Copyright (C) 2008, 2009, 2010 KnowledgeTree Inc. |
| 8 | - * | 8 | + * |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify it under | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | * the terms of the GNU General Public License version 3 as published by the | 11 | * the terms of the GNU General Public License version 3 as published by the |
| @@ -249,37 +249,37 @@ class ExprFieldRegistry | @@ -249,37 +249,37 @@ class ExprFieldRegistry | ||
| 249 | } | 249 | } |
| 250 | } | 250 | } |
| 251 | closedir($dir); | 251 | closedir($dir); |
| 252 | - | 252 | + |
| 253 | // register any search fields tied to specific plugins | 253 | // register any search fields tied to specific plugins |
| 254 | - $this->registerPluginSearchFields(); | 254 | + //$this->registerPluginSearchFields(); |
| 255 | 255 | ||
| 256 | $this->registerMetdataFields(); | 256 | $this->registerMetdataFields(); |
| 257 | } | 257 | } |
| 258 | - | 258 | + |
| 259 | /** | 259 | /** |
| 260 | * Registers search fields which are specific to a certain plugin which may or may not exist/be active in the user's installation | 260 | * Registers search fields which are specific to a certain plugin which may or may not exist/be active in the user's installation |
| 261 | - * | 261 | + * |
| 262 | * NOTE this may only be used with commercial plugins? | 262 | * NOTE this may only be used with commercial plugins? |
| 263 | * NOTE do we want to restrict based on whether the plugin is active? it may have been deactivated but existing metadata created | 263 | * NOTE do we want to restrict based on whether the plugin is active? it may have been deactivated but existing metadata created |
| 264 | * while it was active would still exist and be searchable. The plugin should not need to be active to use the search. | 264 | * while it was active would still exist and be searchable. The plugin should not need to be active to use the search. |
| 265 | - * | 265 | + * |
| 266 | * SQL alter table plugin_helper ADD searchfields varchar(32) NULL Default NULL; | 266 | * SQL alter table plugin_helper ADD searchfields varchar(32) NULL Default NULL; |
| 267 | - * | 267 | + * |
| 268 | */ | 268 | */ |
| 269 | private function registerPluginSearchFields() | 269 | private function registerPluginSearchFields() |
| 270 | { | 270 | { |
| 271 | // check the database for any registered plugin specific search criteria | 271 | // check the database for any registered plugin specific search criteria |
| 272 | $pluginSearchCriteria = null; | 272 | $pluginSearchCriteria = null; |
| 273 | - | 273 | + |
| 274 | $result = DBUtil::getResultArray('Select h.pathname FROM plugin_helper h INNER JOIN plugins p ON (p.namespace = h.plugin) ' | 274 | $result = DBUtil::getResultArray('Select h.pathname FROM plugin_helper h INNER JOIN plugins p ON (p.namespace = h.plugin) ' |
| 275 | . 'WHERE p.disabled = 0 AND h.classtype = "search_criteria"'); | 275 | . 'WHERE p.disabled = 0 AND h.classtype = "search_criteria"'); |
| 276 | if (PEAR::isError($result)) { | 276 | if (PEAR::isError($result)) { |
| 277 | return; | 277 | return; |
| 278 | } | 278 | } |
| 279 | - | 279 | + |
| 280 | foreach ($result as $pluginSearchResult) { | 280 | foreach ($result as $pluginSearchResult) { |
| 281 | $fieldPath = KT_DIR . DIRECTORY_SEPARATOR . $pluginSearchResult['pathname']; | 281 | $fieldPath = KT_DIR . DIRECTORY_SEPARATOR . $pluginSearchResult['pathname']; |
| 282 | - | 282 | + |
| 283 | // loop through those found and include from the plugin path | 283 | // loop through those found and include from the plugin path |
| 284 | $dir = opendir($fieldPath); | 284 | $dir = opendir($fieldPath); |
| 285 | while (($file = readdir($dir)) !== false) { | 285 | while (($file = readdir($dir)) !== false) { |