check if $selrole is set

This commit is contained in:
Uwe Steinmann 2016-03-23 16:27:56 +01:00
parent 8d5e6d9d14
commit c7836aabfe

View File

@ -265,14 +265,16 @@ $(document).ready( function() {
<?php <?php
$this->contentHeading(getMLText("access_control")); $this->contentHeading(getMLText("access_control"));
$aro = SeedDMS_Aro::getInstance($selrole, $dms); if($selrole) {
if(!$aro) { $aro = SeedDMS_Aro::getInstance($selrole, $dms);
$this->warningMsg(getMLText("missing_request_object")); if(!$aro) {
echo "<button id=\"add_aro\" class=\"btn btn-primary\" data-roleid=\"".$selrole->getID()."\">".getMLText('add')."</button>"; $this->warningMsg(getMLText("missing_request_object"));
} else { echo "<button id=\"add_aro\" class=\"btn btn-primary\" data-roleid=\"".$selrole->getID()."\">".getMLText('add')."</button>";
} else {
?> ?>
<div id="acostree" data-url="out.Acl.php?action=tree&roleid=<?= ($selrole ? $selrole->getID() : 0) ?>">Berechtigungen werden geladen ...</div> <div id="acostree" data-url="out.Acl.php?action=tree&roleid=<?= ($selrole ? $selrole->getID() : 0) ?>">Berechtigungen werden geladen ...</div>
<?php <?php
}
} }
?> ?>
</div> </div>