]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Minor fix: correct menu boxes and tag normalization
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sun, 30 Nov 2008 19:32:15 +0000 (19:32 +0000)
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sun, 30 Nov 2008 19:32:15 +0000 (19:32 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@180 b3834d28-1941-0410-a4f8-b48e95affb8f

services/tagservice.php
templates/sidebar.block.menu.php
templates/sidebar.block.menu2.php
templates/top.inc.php

index 504d13f804915eef61f0e2690cf9cba44eb01a49..ac30061e57d5025880596e6cd4272892d0855456 100644 (file)
@@ -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;
        }
 
index 578db599811be2a9781be5343c5c63a5b3001b62..9012872ebd59d2adc32088ce8801096080708fb7 100644 (file)
@@ -21,7 +21,7 @@ if(($logged_on_userid != null) && ($userid === $logged_on_userid)) {
     $editingMode = false;
 }
 
-if(!isset($user)) {
+if(!isset($user) || $user == '') {
     $cat_url = createURL('tags', '%2$s');
 }
 
index 9b660fa6236fef6d1dc976a6fef1a38189bef614..a47b948e00d8d28197bae9e6ca85ba940a1170bb 100644 (file)
@@ -14,11 +14,12 @@ if ($logged_on_userid === false) {
        $logged_on_userid = NULL;
 }
 
-if(!isset($user)) {
+if(!isset($user)  || $user == '') {
        $cat_url = createURL('tags', '%2$s');
 }
 
 $menu2Tags = $GLOBALS['menu2Tags'];
+
 if (sizeOf($menu2Tags) > 0) {
        ?>
 
index b886e76c7b7ea88c628824f830d4664480e3b888..e149c34093961e4fbb2e54a629f66b062a074712 100644 (file)
@@ -23,12 +23,12 @@ if(isset($rsschannels)) {
        src="<?php echo ROOT ?>jsScuttle.php"></script>
 
 
-<!-- link rel="stylesheet" type="text/css"
+<link rel="stylesheet" type="text/css"
        href="http://ajax.googleapis.com/ajax/libs/dojo/1.2/dijit/themes/nihilo/nihilo.css">
 
 <script type="text/javascript"
        src="http://ajax.googleapis.com/ajax/libs/dojo/1.2/dojo/dojo.xd.js"
-       djConfig="parseOnLoad:true, isDebug:false, usePlainJson:true"></script> -->
+       djConfig="parseOnLoad:true, isDebug:false, usePlainJson:true"></script>
  
 <script type="text/javascript">
 dojo.require("dojo.parser");