function showNewTool($rights) { global $lll, $gorumroll, $gorumrecognised, $gorumuser; $_S =& new AppSettings(); $s = parent::showNewTool($rights); if ($gorumroll->list == "item" && $_S->notifyEnabled()) { if ($gorumrecognised) { $query = array("SELECT * FROM @subscription WHERE uid=#gorumuser->id# AND cid=#gorumroll->rollid#", $gorumuser->id, $gorumroll->rollid); $subscription = new Subscription(); if ($ret = loadSQL($subscription, $query)) { $ctrl =& new AppController("subscription/create/{$gorumroll->rollid}"); if ($s) { $s .= " | "; } $s .= $ctrl->generAnchor($lll["autoNotifyCat"]); } else { $ctrl =& new AppController("subscription/delete/{$gorumroll->rollid}"); if ($s) { $s .= " | "; } $s .= $ctrl->generAnchor($lll["unsubscribeCat"]); } } else { $ctrl =& new AppController("subscription/create_form/{$gorumroll->rollid}"); if ($s) { $s .= " | "; } $s .= $ctrl->generAnchor($lll["autoNotifyCat"]); } } return $s; }