aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-30 19:32:15 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-30 19:32:15 +0000
commitcf213449b1f51df0a0477bb102d5d73042b980a2 (patch)
treef5d6399105dbabd3257ff70d3305ada0e43391fe
parente0949aa0adfdfee4f78733277ff43d850ef3582e (diff)
downloadsemanticscuttle-cf213449b1f51df0a0477bb102d5d73042b980a2.tar.gz
semanticscuttle-cf213449b1f51df0a0477bb102d5d73042b980a2.tar.bz2
Minor fix: correct menu boxes and tag normalization
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@180 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--services/tagservice.php9
-rw-r--r--templates/sidebar.block.menu.php2
-rw-r--r--templates/sidebar.block.menu2.php3
-rw-r--r--templates/top.inc.php4
4 files changed, 14 insertions, 4 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;
}
diff --git a/templates/sidebar.block.menu.php b/templates/sidebar.block.menu.php
index 578db59..9012872 100644
--- a/templates/sidebar.block.menu.php
+++ b/templates/sidebar.block.menu.php
@@ -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');
}
diff --git a/templates/sidebar.block.menu2.php b/templates/sidebar.block.menu2.php
index 9b660fa..a47b948 100644
--- a/templates/sidebar.block.menu2.php
+++ b/templates/sidebar.block.menu2.php
@@ -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) {
?>
diff --git a/templates/top.inc.php b/templates/top.inc.php
index b886e76..e149c34 100644
--- a/templates/top.inc.php
+++ b/templates/top.inc.php
@@ -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");