summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-05-10 08:59:41 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-05-10 08:59:41 +0000
commit2756e3f85818346a478725b6dd94a966e0d92c07 (patch)
treeefad4c6566773670dc5f9a8b733f2a3ed3fe4a57 /templates
parente273c0d367da161651324eca1b7e4177c670c91f (diff)
downloadsemanticscuttle-2756e3f85818346a478725b6dd94a966e0d92c07.tar.gz
semanticscuttle-2756e3f85818346a478725b6dd94a966e0d92c07.tar.bz2
Bug fixes: correct minor bugs appearing with 'notice' level in PHP
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@122 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'templates')
-rw-r--r--templates/bookmarks.tpl.php13
-rw-r--r--templates/sidebar.block.linked.php9
-rw-r--r--templates/sidebar.block.menu.php7
-rw-r--r--templates/sidebar.block.recent.php3
-rw-r--r--templates/sidebar.linkedtags.inc.php4
-rw-r--r--templates/toolbar.inc.php2
-rw-r--r--templates/top.inc.php10
7 files changed, 36 insertions, 12 deletions
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
index 6a778bb..f7cc45b 100644
--- a/templates/bookmarks.tpl.php
+++ b/templates/bookmarks.tpl.php
@@ -43,17 +43,22 @@ if($logged_on_userid>0) {
<?php
-$userObject = $userservice->getUserByUsername($user);
/* Private tag description */
-if(isset($currenttag) && strlen($user)>0 && $tagservice->getDescription($currenttag, $userObject['uId'])):?>
+if(isset($currenttag) && isset($user)) {
+ $userObject = $userservice->getUserByUsername($user);
+ if($tagservice->getDescription($currenttag, $userObject['uId'])) { ?>
+
<p class="commondescription">
<?php
-
$description = $tagservice->getDescription($currenttag, $userObject['uId']);
echo nl2br(filter($description['tDescription']));
?>
</p>
-<?php endif ?>
+
+<?php
+ }
+}
+?>
<?php if (count($bookmarks) > 0) { ?>
<script type="text/javascript">
diff --git a/templates/sidebar.block.linked.php b/templates/sidebar.block.linked.php
index a39f590..efe75a8 100644
--- a/templates/sidebar.block.linked.php
+++ b/templates/sidebar.block.linked.php
@@ -4,13 +4,20 @@ $userservice =& ServiceFactory::getServiceInstance('UserService');
require_once('sidebar.linkedtags.inc.php');
+/* Manage input */
+$user = isset($user)?$user:'';
+$userid = isset($userid)?$userid:0;
+$currenttag = isset($currenttag)?$currenttag:'';
+$summarizeLinkedTags = isset($summarizeLinkedTags)?$summarizeLinkedTags:false;
+
+
$logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
}
$explodedTags = array();
-if ($currenttag) {
+if (strlen($currenttag)>0) {
$explodedTags = explode('+', $currenttag);
} else {
if($summarizeLinkedTags == true) {
diff --git a/templates/sidebar.block.menu.php b/templates/sidebar.block.menu.php
index 0c7087a..578db59 100644
--- a/templates/sidebar.block.menu.php
+++ b/templates/sidebar.block.menu.php
@@ -4,6 +4,11 @@ $userservice =& ServiceFactory::getServiceInstance('UserService');
require_once('sidebar.linkedtags.inc.php');
+/* Manage input */
+$userid = isset($userid)?$userid:0;
+$user = isset($user)?$user:null;
+
+
$logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
@@ -16,7 +21,7 @@ if(($logged_on_userid != null) && ($userid === $logged_on_userid)) {
$editingMode = false;
}
-if(strlen($user)==0) {
+if(!isset($user)) {
$cat_url = createURL('tags', '%2$s');
}
diff --git a/templates/sidebar.block.recent.php b/templates/sidebar.block.recent.php
index e720533..cc04b97 100644
--- a/templates/sidebar.block.recent.php
+++ b/templates/sidebar.block.recent.php
@@ -2,6 +2,9 @@
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
$userservice =& ServiceFactory::getServiceInstance('UserService');
+/* Manage input */
+$userid = isset($userid)?$userid:0;
+
$logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
diff --git a/templates/sidebar.linkedtags.inc.php b/templates/sidebar.linkedtags.inc.php
index 95b420a..555eafc 100644
--- a/templates/sidebar.linkedtags.inc.php
+++ b/templates/sidebar.linkedtags.inc.php
@@ -19,6 +19,8 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
} else {
$link = '> ';
}
+ } else {
+ $link = '';
}
$output = '';
@@ -69,7 +71,7 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
$displayLinkedTags = displayLinkedTags($linkedTag, $linkType, $uId, $cat_url, $user, $editingMode, $precedentTag, $level + 1, $stopList);
$output.= $displayLinkedTags['output'];
}
- if(is_array($displayLinkedTags['stopList'])) {
+ if(isset($displayLinkedTags) && is_array($displayLinkedTags['stopList'])) {
$stopList = array_merge($stopList, $displayLinkedTags['stopList']);
$stopList = array_unique($stopList);
}
diff --git a/templates/toolbar.inc.php b/templates/toolbar.inc.php
index ab17bc5..593ee0f 100644
--- a/templates/toolbar.inc.php
+++ b/templates/toolbar.inc.php
@@ -21,7 +21,7 @@ if ($userservice->isLoggedOn()) {
?>
<ul id="navigation">
- <li><a href="<?php echo createURL('populartags', $cUsername); ?>"><?php echo T_('Popular Tags'); ?></a></li>
+ <li><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a></li>
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
<li class="access"><a href="<?php echo createURL('login'); ?>"><?php echo T_('Log In'); ?></a></li>
<li class="access"><a href="<?php echo createURL('register'); ?>"><?php echo T_('Register'); ?></a></li>
diff --git a/templates/top.inc.php b/templates/top.inc.php
index 58eacb5..707af8b 100644
--- a/templates/top.inc.php
+++ b/templates/top.inc.php
@@ -7,11 +7,13 @@
<link rel="icon" type="image/png" href="<?php echo $GLOBALS['root']; ?>icon.png" />
<link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['root']; ?>scuttle.css" />
<?php
- $size = count($rsschannels);
- for ($i = 0; $i < $size; $i++) {
- echo '<link rel="alternate" type="application/rss+xml" title="'. $rsschannels[$i][0] .'" href="'. $rsschannels[$i][1] .'" />';
+ if(isset($rsschannels)) {
+ $size = count($rsschannels);
+ for ($i = 0; $i < $size; $i++) {
+ echo '<link rel="alternate" type="application/rss+xml" title="'. $rsschannels[$i][0] .'" href="'. $rsschannels[$i][1] .'" />';
+ }
}
- if ($loadjs) {
+ if (isset($loadjs)) {
echo '<script type="text/javascript" src="'. $GLOBALS['root'] .'jsScuttle.php"></script>';
}
?>