diff options
author | 2008-12-18 11:03:40 +0000 | |
---|---|---|
committer | 2008-12-18 11:03:40 +0000 | |
commit | 4d122aa3fca560f9b93bfb5a8abe6feee96d9e61 (patch) | |
tree | 6a4e115cb6a6acfec68fe18cc330089725bdfae7 /services/bookmark2tagservice.php | |
parent | d8a5adc285fbd9237d7c3140f6d6a11b6eceaaee (diff) | |
download | scuttle-4d122aa3fca560f9b93bfb5a8abe6feee96d9e61.tar.gz scuttle-4d122aa3fca560f9b93bfb5a8abe6feee96d9e61.zip |
Major refactoring: add a cache table to accelerate the search of linked tags by inference (children and synonyms)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@204 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/bookmark2tagservice.php')
-rw-r--r-- | services/bookmark2tagservice.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/bookmark2tagservice.php b/services/bookmark2tagservice.php index 851884f..268ec66 100644 --- a/services/bookmark2tagservice.php +++ b/services/bookmark2tagservice.php @@ -25,6 +25,9 @@ class Bookmark2TagService { function attachTags($bookmarkid, $tags, $fromApi = false, $extension = NULL, $replace = true, $fromImport = false) { // Make sure that categories is an array of trimmed strings, and that if the categories are // coming in from an API call to add a bookmark, that underscores are converted into strings. + + trigger_error($GLOBALS['filetypes'].'bbbbbbbbbbbbbbbbbbbbbbbbbbbb'); + if (!is_array($tags)) { $tags = trim($tags); if ($tags != '') { @@ -70,6 +73,7 @@ class Bookmark2TagService { // Media and file types if (!is_null($extension)) { include_once(dirname(__FILE__) .'/../functions.inc.php'); + if ($keys = multi_array_search($extension, $GLOBALS['filetypes'])) { $tags[] = 'system:filetype:'. $extension; $tags[] = 'system:media:'. array_shift($keys); |