Allow users to modify/delete their queued apps
This commit is contained in:
committed by
Chris Morgan
parent
540e39dbbd
commit
79dd0cfcf8
@@ -887,6 +887,9 @@ class Application {
|
|||||||
$oTableRow->SetClass("color4");
|
$oTableRow->SetClass("color4");
|
||||||
$oTable->SetHeader($oTableRow);
|
$oTable->SetHeader($oTableRow);
|
||||||
|
|
||||||
|
if($bQueued)
|
||||||
|
$oTableRow->addTextCell("Action");
|
||||||
|
|
||||||
for($i = 1; $oRow = query_fetch_object($hResult); $i++)
|
for($i = 1; $oRow = query_fetch_object($hResult); $i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -900,6 +903,15 @@ class Application {
|
|||||||
$oTableRow->AddTextCell(print_date(mysqldatetime_to_unixtimestamp($oRow->submitTime)));
|
$oTableRow->AddTextCell(print_date(mysqldatetime_to_unixtimestamp($oRow->submitTime)));
|
||||||
$oTableRow->SetClass(($i % 2) ? "color0" : "color1");
|
$oTableRow->SetClass(($i % 2) ? "color0" : "color1");
|
||||||
|
|
||||||
|
if($bQueued)
|
||||||
|
{
|
||||||
|
$oM = new objectManager('application');
|
||||||
|
$oM->setReturnTo(array_key_exists('REQUEST_URI', $_SERVER) ? $_SERVER['REQUEST_URI'] : "");
|
||||||
|
$shDeleteLink = '<a href="'.$oM->makeUrl("delete", $oApp->iAppId, "Delete entry").'">delete</a>';
|
||||||
|
$shEditLink = '<a href="'.$oM->makeUrl("edit", $oApp->iAppId, "Edit entry").'">edit</a>';
|
||||||
|
$oTableRow->addTextCell("[ $shEditLink ] [ $shDeleteLink ]");
|
||||||
|
}
|
||||||
|
|
||||||
$oTable->AddRow($oTableRow);
|
$oTable->AddRow($oTableRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,9 @@ class downloadurl
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
return FALSE;
|
$oVersion = new version($this->iVersionId);
|
||||||
|
|
||||||
|
return $oVersion->canEdit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -685,7 +685,7 @@ class maintainer
|
|||||||
|
|
||||||
function canEdit()
|
function canEdit()
|
||||||
{
|
{
|
||||||
if($_SESSION['current']->hasPriv("admin"))
|
if($_SESSION['current']->hasPriv("admin") || $this->iUserId == $_SESSION['current']->iUserId)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user