Merge branch 'fixDoDashboardLink' into 'master'
Fix link to do-dashboard per the plugins config See merge request !36
This commit is contained in:
commit
c22ee858b3
1 changed files with 6 additions and 11 deletions
|
@ -34,17 +34,12 @@
|
|||
}
|
||||
|
||||
$doInner = "<span class=\"prefix\">".tpl_getLang('prefix_tasks_user')." </span><span class=\"num\">".count($tasks)."</span>";
|
||||
if($linktarget){
|
||||
if (substr($linktarget, 0, 1) !== ':') {
|
||||
$linktarget = 'user:' . $_SERVER['REMOTE_USER'] .':' . 'dashboard';
|
||||
}
|
||||
if($num == 0){
|
||||
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
|
||||
}else{
|
||||
echo '<li class="user-task '.$class.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
$userpage = $doplugin->getConf('userpage');
|
||||
if ($userpage && $_SERVER['REMOTE_USER'] && $num > 0) {
|
||||
$linktarget = sprintf($userpage, $_SERVER['REMOTE_USER']) . ':' . 'dashboard';
|
||||
echo '<li class="user-task '.$class.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
|
||||
} else {
|
||||
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
|
||||
}
|
||||
} ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue