Add and use version::objectGetEntriesCount(). Only display the user menu's 'view rejected

apps' link for non-admins
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-04-04 00:30:42 +00:00
committed by WineHQ
parent 89535dbe01
commit 970cbca7f3
5 changed files with 77 additions and 62 deletions

View File

@@ -34,9 +34,11 @@ function global_sidebar_login() {
$g->addmisc(version::fullNameLink($versionId), "center");
}
}
$appsRejected = $_SESSION['current']->getAllRejectedApps();
if($appsRejected)
$g->addmisc("<a href='".BASE."appsubmit.php?'>Review Rejected Apps</a>", "center");
$iAppsRejected = application::objectGetEntriesCount(true, true) +
version::objectGetEntriesCount(true, true);
if($iAppsRejected && !$_SESSION['current']->hasPriv("admin"))
$g->addmisc("<a href='".BASE."appsubmit.php?'>Review Rejected Apps ".
"($iAppsRejected)</a>", "center");
$aMonitored = Monitor::getVersionsMonitored($_SESSION['current']);
if($aMonitored)