summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/tagservice.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/services/tagservice.php b/services/tagservice.php
index 504d13f..ac30061 100644
--- a/services/tagservice.php
+++ b/services/tagservice.php
@@ -80,6 +80,15 @@ class TagService {
function normalize($tags) {
//clean tags from strange characters
$tags = str_replace(array('"', '\'', '/'), "_", $tags);
+
+ //normalize
+ if(!is_array($tags)) {
+ $tags = strtolower(trim($tags));
+ } else {
+ for($i=0; $i<count($tags); $i++) {
+ $tags[$i] = strtolower(trim($tags[$i]));
+ }
+ }
return $tags;
}