1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Merge pull request #746 from Jimmi08/patch-5

Now using tagwords separator as defined in the admin area preferences
This commit is contained in:
Tijn Kuyper
2014-10-07 18:00:33 +02:00

View File

@@ -199,7 +199,7 @@ class tagwords
return implode($this->pref['tagwords_word_seperator'], $arr); return implode($this->pref['tagwords_word_seperator'], $arr);
} }
//return a \n seperated list of tagwords for the specific item //return a \n seperated list of tagwords for the specific item
return implode("\n", $ret); return implode($this->pref['tagwords_word_seperator'], $ret);
} }
return; return;
} }
@@ -295,10 +295,10 @@ class tagwords
//get existing word records //get existing word records
$existing_array = $this->getRecords($tag_type, $tag_itemid, false); $existing_array = $this->getRecords($tag_type, $tag_itemid, false);
$existing = explode("\n", $existing_array); $existing = explode($this->pref['tagwords_word_seperator'], $existing_array);
//create array of new posted words //create array of new posted words
$new = explode("\n", $tag_word); $new = explode($this->pref['tagwords_word_seperator'], $tag_word);
//delete the differences (delete what has been removed) //delete the differences (delete what has been removed)
$delete_diff = array_diff($existing, $new); $delete_diff = array_diff($existing, $new);
@@ -892,4 +892,4 @@ class tagwords
} //end class } //end class
?> ?>