diff --git a/include/application.php b/include/application.php index f451b7a..b5bcbdd 100644 --- a/include/application.php +++ b/include/application.php @@ -119,17 +119,13 @@ class Application { if(!$_SESSION['current']->canCreateApplication()) return; - if($_SESSION['current']->appCreatedMustBeQueued()) - $this->sQueued = 'true'; - else - $this->sQueued = 'false'; - $hResult = query_parameters("INSERT INTO appFamily (appName, description, keywords, ". "webPage, vendorId, catId, submitterId, queued) VALUES (". "'?', '?', '?', '?', '?', '?', '?', '?')", $this->sName, $this->sDescription, $this->sKeywords, $this->sWebpage, $this->iVendorId, $this->iCatId, - $_SESSION['current']->iUserId, $this->sQueued); + $_SESSION['current']->iUserId, + $this->mustBeQueued() ? "true" : "false"); if($hResult) { $this->iAppId = mysql_insert_id(); @@ -906,11 +902,20 @@ class Application { if($_SESSION['current']->hasPriv("admin")) return TRUE; else if($this) - return maintainer::isUserSuperMaintainer($_SESSION['current'], $this->iAppId); + return maintainer::isUserSuperMaintainer($_SESSION['current'], + $this->iAppId); else return FALSE; } + function mustBeQueued() + { + if($_SESSION['current']->hasPriv("admin")) + return FALSE; + else + return TRUE; + } + function objectDisplayQueueProcessingHelp() { echo "
This is the list of applications waiting for your approval, ". diff --git a/include/user.php b/include/user.php index 43db24e..04aa6d3 100644 --- a/include/user.php +++ b/include/user.php @@ -721,15 +721,6 @@ class User { return $this->hasPriv("admin"); } - /** - * Does the created application have to be queued for admin processing? - */ - function appCreatedMustBeQueued() - { - return !$this->hasPriv("admin"); - } - - /***********************/ /* version permissions */