Contact Extensions: Integrated permission check on Edit and Delete buttons.
This commit is contained in:
parent
5c73a105a8
commit
926d170960
|
|
@ -129,12 +129,23 @@ require_once "resources/paging.php";
|
|||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['extension']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['description']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('extension_edit')) {
|
||||
echo "<a href='/app/extensions/extension_edit.php?id=".$row['extension_uuid']."'>".$row['extension']."</a>";
|
||||
}
|
||||
else {
|
||||
echo $row['extension'];
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['enabled'])." </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg'>".$row['description']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
echo "<a href='/app/extensions/extension_edit.php?id=".$row['extension_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
echo "<a href='/app/extensions/extension_delete.php?id=".$row['extension_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
if (permission_exists('extension_edit')) {
|
||||
echo "<a href='/app/extensions/extension_edit.php?id=".$row['extension_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('extension_delete')) {
|
||||
echo "<a href='/app/extensions/extension_delete.php?id=".$row['extension_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
|
|
@ -149,7 +160,7 @@ require_once "resources/paging.php";
|
|||
echo " <td width='33.3%' nowrap> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('extension_add')) {
|
||||
if (permission_exists('extension_add')) {
|
||||
echo " <a href='/app/extensions/extension_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue