- allow supermaintainers to send screenshot without being queued.

- don't let queued have an empty value
This commit is contained in:
Jonathan Ernst
2005-02-19 01:22:32 +00:00
committed by WineHQ
parent a3f0f2082a
commit 412d4756fe

View File

@@ -58,10 +58,14 @@ class Screenshot {
*/ */
function create($iVersionId = null, $sDescription = null, $hFile = null) function create($iVersionId = null, $sDescription = null, $hFile = null)
{ {
$oVersion = new Version($iVersionId);
// Security, if we are not an administrator or a maintainer, the screenshot must be queued. // Security, if we are not an administrator or a maintainer, the screenshot must be queued.
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($_REQUEST['versionId']))) if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId)))
{ {
$this->bQueued = true; $this->bQueued = true;
} else
{
$this->bQueued = false;
} }
$aInsert = compile_insert_string(array( 'versionId' => $iVersionId, $aInsert = compile_insert_string(array( 'versionId' => $iVersionId,