mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
menu_item_protected deprecated
This protected feature has not been working correctly. At the moment commented out depending on feedback it maybe removed entirely.
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
$menu_item_icon = '';
|
||||
$menu_item_icon_color = '';
|
||||
$menu_item_description = '';
|
||||
$menu_item_protected = '';
|
||||
//$menu_item_protected = '';
|
||||
$menu_item_parent_uuid = null;
|
||||
$menu_item_order = null;
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
$menu_item_icon = $_POST["menu_item_icon"] ?? '';
|
||||
$menu_item_icon_color = $_POST["menu_item_icon_color"] ?? '';
|
||||
$menu_item_description = $_POST["menu_item_description"] ?? '';
|
||||
$menu_item_protected = $_POST["menu_item_protected"] ?? '';
|
||||
//$menu_item_protected = $_POST["menu_item_protected"] ?? '';
|
||||
$menu_item_parent_uuid = $_POST["menu_item_parent_uuid"] ?? null;
|
||||
$menu_item_order = $_POST["menu_item_order"] ?? '';
|
||||
}
|
||||
@@ -177,7 +177,7 @@
|
||||
$array['menu_items'][0]['menu_item_icon'] = $menu_item_icon;
|
||||
$array['menu_items'][0]['menu_item_icon_color'] = $menu_item_icon_color;
|
||||
$array['menu_items'][0]['menu_item_description'] = $menu_item_description;
|
||||
$array['menu_items'][0]['menu_item_protected'] = $menu_item_protected;
|
||||
//$array['menu_items'][0]['menu_item_protected'] = $menu_item_protected;
|
||||
$array['menu_items'][0]['menu_item_uuid'] = $menu_item_uuid;
|
||||
if (!is_uuid($menu_item_parent_uuid)) {
|
||||
$array['menu_items'][0]['menu_item_parent_uuid'] = null;
|
||||
@@ -203,7 +203,7 @@
|
||||
$array['menu_items'][0]['menu_item_icon'] = $menu_item_icon;
|
||||
$array['menu_items'][0]['menu_item_icon_color'] = $menu_item_icon_color;
|
||||
$array['menu_items'][0]['menu_item_description'] = $menu_item_description;
|
||||
$array['menu_items'][0]['menu_item_protected'] = $menu_item_protected;
|
||||
//$array['menu_items'][0]['menu_item_protected'] = $menu_item_protected;
|
||||
$array['menu_items'][0]['menu_item_uuid'] = $menu_item_uuid;
|
||||
if (!is_uuid($menu_item_parent_uuid)) {
|
||||
$array['menu_items'][0]['menu_item_parent_uuid'] = null;
|
||||
@@ -221,13 +221,13 @@
|
||||
}
|
||||
|
||||
//update child menu items to protected true or false
|
||||
$sql = "update v_menu_items ";
|
||||
$sql .= "set menu_item_protected = :menu_item_protected ";
|
||||
$sql .= "where menu_item_parent_uuid = :menu_item_parent_uuid ";
|
||||
$parameters['menu_item_parent_uuid'] = $menu_item_uuid;
|
||||
$parameters['menu_item_protected'] = $menu_item_protected;
|
||||
$database->execute($sql, $parameters);
|
||||
unset($parameters);
|
||||
//$sql = "update v_menu_items ";
|
||||
//$sql .= "set menu_item_protected = :menu_item_protected ";
|
||||
//$sql .= "where menu_item_parent_uuid = :menu_item_parent_uuid ";
|
||||
//$parameters['menu_item_parent_uuid'] = $menu_item_uuid;
|
||||
//$parameters['menu_item_protected'] = $menu_item_protected;
|
||||
//$database->execute($sql, $parameters);
|
||||
//unset($parameters);
|
||||
|
||||
//add a group to the menu
|
||||
if (!empty($group_uuid_name) && permission_exists('menu_add')) {
|
||||
@@ -319,7 +319,7 @@
|
||||
$menu_item_icon = $row["menu_item_icon"];
|
||||
$menu_item_icon_color = $row["menu_item_icon_color"];
|
||||
$menu_item_description = $row["menu_item_description"];
|
||||
$menu_item_protected = $row["menu_item_protected"];
|
||||
//$menu_item_protected = $row["menu_item_protected"];
|
||||
$menu_item_parent_uuid = $row["menu_item_parent_uuid"];
|
||||
$menu_item_order = $row["menu_item_order"];
|
||||
$menu_item_add_user = $row["menu_item_add_user"];
|
||||
@@ -535,29 +535,29 @@
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-protected']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='menu_item_protected'>\n";
|
||||
if ($menu_item_protected == "false") {
|
||||
echo " <option value='false' selected='selected' >".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
if ($menu_item_protected == "true") {
|
||||
echo " <option value='true' selected='selected' >".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
echo " </select><br />\n";
|
||||
echo $text['description-protected']."<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
//echo "<tr>\n";
|
||||
//echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
//echo " ".$text['label-protected']."\n";
|
||||
//echo "</td>\n";
|
||||
//echo "<td class='vtable' align='left'>\n";
|
||||
//echo " <select class='formfld' name='menu_item_protected'>\n";
|
||||
//if ($menu_item_protected == "false") {
|
||||
// echo " <option value='false' selected='selected' >".$text['label-false']."</option>\n";
|
||||
//}
|
||||
//else {
|
||||
// echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
//}
|
||||
//if ($menu_item_protected == "true") {
|
||||
// echo " <option value='true' selected='selected' >".$text['label-true']."</option>\n";
|
||||
//}
|
||||
//else {
|
||||
// echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
//}
|
||||
//echo " </select><br />\n";
|
||||
//echo $text['description-protected']."<br />\n";
|
||||
//echo "\n";
|
||||
//echo "</td>\n";
|
||||
//echo "</tr>\n";
|
||||
|
||||
if (!empty($action) && $action == "update") {
|
||||
if (empty($menu_item_parent_uuid)) {
|
||||
|
||||
Reference in New Issue
Block a user