queued items: fix editing applications' vendors & versions
This commit is contained in:
committed by
Chris Morgan
parent
4a9c24d596
commit
6eccc11979
@@ -580,9 +580,17 @@ class Application {
|
|||||||
"using the form below.";
|
"using the form below.";
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$sVendorHelp .= "The user added a new one; review ".
|
if($this->iSubmitterId != $_SESSION['current']->iUserId)
|
||||||
"it in the vendor form below or ".
|
{
|
||||||
"replace it with an existing one.";
|
$sVendorHelp .= "The user added a new one; review ".
|
||||||
|
"it in the vendor form below or ".
|
||||||
|
"replace it with an existing one.";
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$sVendorHelp .= 'You added a new one; it can be edited '.
|
||||||
|
'using the form below, or replaced with '.
|
||||||
|
'one from this list.';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// vendor name
|
// vendor name
|
||||||
|
|||||||
@@ -23,11 +23,13 @@ class application_queue
|
|||||||
{
|
{
|
||||||
/* Normal users do not get a aVersionsIds property, so we have to fetch
|
/* Normal users do not get a aVersionsIds property, so we have to fetch
|
||||||
the versionId manually. Normal users only have access to rejected
|
the versionId manually. Normal users only have access to rejected
|
||||||
applications */
|
applications, unless they submitted them */
|
||||||
if($_SESSION['current']->hasPriv("admin"))
|
if($_SESSION['current']->hasPriv("admin"))
|
||||||
{
|
{
|
||||||
$iVersionId = $this->oApp->aVersionsIds[0];
|
$iVersionId = $this->oApp->aVersionsIds[0];
|
||||||
} else if($this->oApp->objectGetState() == 'rejected')
|
} else if($this->oApp->objectGetState() == 'rejected' ||
|
||||||
|
($this->oApp->objectGetState() == 'queued' &&
|
||||||
|
$this->oApp->objectGetSubmitterId() == $_SESSION['current']->iUserId))
|
||||||
{
|
{
|
||||||
$sQuery = "SELECT versionId FROM appVersion WHERE appId = '?' LIMIT 1";
|
$sQuery = "SELECT versionId FROM appVersion WHERE appId = '?' LIMIT 1";
|
||||||
$hResult = query_parameters($sQuery, $this->oApp->iAppId);
|
$hResult = query_parameters($sQuery, $this->oApp->iAppId);
|
||||||
|
|||||||
Reference in New Issue
Block a user