Minor Refactoring: tps)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@235 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
d91520b491
commit
8e9d354af1
1 changed files with 9 additions and 7 deletions
|
@ -8,6 +8,8 @@ $cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
|
||||||
|
|
||||||
$pageName = isset($pageName)?$pageName:"";
|
$pageName = isset($pageName)?$pageName:"";
|
||||||
$user = isset($user)?$user:"";
|
$user = isset($user)?$user:"";
|
||||||
|
$currenttag = isset($currenttag)?$currenttag:"";
|
||||||
|
|
||||||
|
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
|
|
||||||
|
@ -28,12 +30,12 @@ include('search.inc.php');
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// common tag description
|
// common tag description
|
||||||
if((isset($currenttag) && $currenttag!= '' && $GLOBALS['enableCommonTagDescription'])
|
if(($currenttag!= '' && $GLOBALS['enableCommonTagDescription'])
|
||||||
|| (isset($hash) && $GLOBALS['enableCommonBookmarkDescription'])):?>
|
|| (isset($hash) && $GLOBALS['enableCommonBookmarkDescription'])):?>
|
||||||
|
|
||||||
|
|
||||||
<p class="commondescription"><?php
|
<p class="commondescription"><?php
|
||||||
if(isset($currenttag) && $currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
|
if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
|
||||||
$description = $cdservice->getLastTagDescription($currenttag);
|
$description = $cdservice->getLastTagDescription($currenttag);
|
||||||
echo nl2br(filter($description['cdDescription']));
|
echo nl2br(filter($description['cdDescription']));
|
||||||
} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
|
} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
|
||||||
|
@ -44,7 +46,7 @@ if(isset($currenttag) && $currenttag!= '' && $cdservice->getLastTagDescription($
|
||||||
|
|
||||||
//common tag description edit
|
//common tag description edit
|
||||||
if($userservice->isLoggedOn()) {
|
if($userservice->isLoggedOn()) {
|
||||||
if(isset($currenttag) && $currenttag!= '') {
|
if($currenttag!= '') {
|
||||||
echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'">';
|
echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'">';
|
||||||
echo T_('common description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
echo T_('common description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
||||||
} elseif(isset($hash)) {
|
} elseif(isset($hash)) {
|
||||||
|
@ -58,7 +60,7 @@ if($userservice->isLoggedOn()) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* personal tag description */
|
/* personal tag description */
|
||||||
if(isset($currenttag) && $currenttag!= '' && isset($user)) {
|
if($currenttag!= '' && $user!='') {
|
||||||
$userObject = $userservice->getUserByUsername($user);
|
$userObject = $userservice->getUserByUsername($user);
|
||||||
if($tagservice->getDescription($currenttag, $userObject['uId'])) { ?>
|
if($tagservice->getDescription($currenttag, $userObject['uId'])) { ?>
|
||||||
|
|
||||||
|
@ -68,7 +70,7 @@ echo nl2br(filter($description['tDescription']));
|
||||||
|
|
||||||
//personal tag description edit
|
//personal tag description edit
|
||||||
if($userservice->isLoggedOn()) {
|
if($userservice->isLoggedOn()) {
|
||||||
if(isset($currenttag) && $currenttag!= '') {
|
if($currenttag!= '') {
|
||||||
echo ' <a href="'. createURL('tagedit', $currenttag).'">';
|
echo ' <a href="'. createURL('tagedit', $currenttag).'">';
|
||||||
echo T_('personal description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
echo T_('personal description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
||||||
}
|
}
|
||||||
|
@ -98,8 +100,8 @@ if (!isset($hash)) {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?> <?php
|
?> <?php
|
||||||
if(isset($currenttag) && $currenttag!= '') {
|
if($currenttag!= '') {
|
||||||
if(isset($user) && $user!= '') {
|
if($user!= '') {
|
||||||
echo ' - ';
|
echo ' - ';
|
||||||
echo '<a href="'. createURL('tags', $currenttag) .'">';
|
echo '<a href="'. createURL('tags', $currenttag) .'">';
|
||||||
echo T_('Bookmarks from other users for this tag').'</a>';
|
echo T_('Bookmarks from other users for this tag').'</a>';
|
||||||
|
|
Loading…
Reference in a new issue