appdb/include application.php user.php
WineHQ
wineowner at wine.codeweavers.com
Sat Apr 21 12:51:42 CDT 2007
ChangeSet ID: 31069
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2007/04/21 12:51:42
Modified files:
include : application.php user.php
Log message:
Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Add and use application::mustBeQueued()
Patch: http://cvs.winehq.org/patch.py?id=31069
Old revision New revision Changes Path
1.103 1.104 +12 -7 appdb/include/application.php
1.89 1.90 +0 -9 appdb/include/user.php
Index: appdb/include/application.php
diff -u -p appdb/include/application.php:1.103 appdb/include/application.php:1.104
--- appdb/include/application.php:1.103 21 Apr 2007 17:51:42 -0000
+++ appdb/include/application.php 21 Apr 2007 17:51:42 -0000
@@ -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 "<p>This is the list of applications waiting for your approval, ".
Index: appdb/include/user.php
diff -u -p appdb/include/user.php:1.89 appdb/include/user.php:1.90
--- appdb/include/user.php:1.89 21 Apr 2007 17:51:42 -0000
+++ appdb/include/user.php 21 Apr 2007 17:51:42 -0000
@@ -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 */
More information about the wine-cvs
mailing list