Cleanup the menu class fixup the white space problems.
This commit is contained in:
parent
ad9473f4af
commit
826df9c40a
|
|
@ -139,13 +139,13 @@
|
||||||
$sql .= "'$menu_item_title' ";
|
$sql .= "'$menu_item_title' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
|
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($apps as $row) {
|
foreach($apps as $row) {
|
||||||
foreach ($row['permissions'] as $menu) {
|
foreach ($row['permissions'] as $menu) {
|
||||||
//set the variables
|
//set the variables
|
||||||
|
|
@ -184,7 +184,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//use the app array to restore the default menu
|
//use the app array to restore the default menu
|
||||||
|
|
@ -269,7 +268,6 @@
|
||||||
$sql .= "'$menu_item_title' ";
|
$sql .= "'$menu_item_title' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
|
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -324,13 +322,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql2, $result2);
|
unset($sql2, $result2);
|
||||||
|
|
||||||
//if there are no groups listed in v_menu_item_groups under menu_uuid then add the default groups
|
//if there are no groups listed in v_menu_item_groups under menu_uuid then add the default groups
|
||||||
|
|
||||||
foreach($apps as $app) {
|
foreach($apps as $app) {
|
||||||
foreach ($app['menu'] as $sub_row) {
|
foreach ($app['menu'] as $sub_row) {
|
||||||
foreach ($sub_row['groups'] as $group) {
|
foreach ($sub_row['groups'] as $group) {
|
||||||
|
|
@ -343,8 +339,6 @@
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
if ($sub_result['count'] == 0) {
|
if ($sub_result['count'] == 0) {
|
||||||
//no menu item groups found add the defaults
|
//no menu item groups found add the defaults
|
||||||
|
|
||||||
//add the record
|
|
||||||
$sql = "insert into v_menu_item_groups ";
|
$sql = "insert into v_menu_item_groups ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "menu_uuid, ";
|
$sql .= "menu_uuid, ";
|
||||||
|
|
@ -460,7 +454,6 @@
|
||||||
$sql .= "'$menu_item_title' ";
|
$sql .= "'$menu_item_title' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
|
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -471,7 +464,7 @@
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
$sql2 = " Select domain_uuid from v_domains ";
|
$sql2 = "select domain_uuid from v_domains ";
|
||||||
$prep_statement2 = $db->prepare(check_sql($sql2));
|
$prep_statement2 = $db->prepare(check_sql($sql2));
|
||||||
$prep_statement2->execute();
|
$prep_statement2->execute();
|
||||||
$result2 = $prep_statement2->fetchAll(PDO::FETCH_ASSOC);
|
$result2 = $prep_statement2->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
@ -515,7 +508,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql2, $result2);
|
unset($sql2, $result2);
|
||||||
|
|
@ -537,8 +529,6 @@
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
if ($sub_result['count'] == 0) {
|
if ($sub_result['count'] == 0) {
|
||||||
//no menu item groups found add the defaults
|
//no menu item groups found add the defaults
|
||||||
|
|
||||||
//add the record
|
|
||||||
$sql = "insert into v_menu_item_groups ";
|
$sql = "insert into v_menu_item_groups ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "menu_uuid, ";
|
$sql .= "menu_uuid, ";
|
||||||
|
|
@ -603,7 +593,6 @@
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach($result as $field) {
|
foreach($result as $field) {
|
||||||
|
|
||||||
$sql2 = "select * from v_menu_languages ";
|
$sql2 = "select * from v_menu_languages ";
|
||||||
$sql2 .= "where menu_language = 'en-us' ";
|
$sql2 .= "where menu_language = 'en-us' ";
|
||||||
$sql2 .= "and menu_item_uuid = '".$field['menu_item_uuid']."' ";
|
$sql2 .= "and menu_item_uuid = '".$field['menu_item_uuid']."' ";
|
||||||
|
|
@ -615,7 +604,6 @@
|
||||||
}
|
}
|
||||||
unset($prep_statement2, $sql2, $result2);
|
unset($prep_statement2, $sql2, $result2);
|
||||||
|
|
||||||
|
|
||||||
$menu_tags = '';
|
$menu_tags = '';
|
||||||
switch ($field['menu_item_category']) {
|
switch ($field['menu_item_category']) {
|
||||||
case "internal":
|
case "internal":
|
||||||
|
|
@ -722,6 +710,7 @@
|
||||||
$db_menu_sub = "<ul class='menu_sub'>\n";
|
$db_menu_sub = "<ul class='menu_sub'>\n";
|
||||||
|
|
||||||
foreach($result_2 as $row) {
|
foreach($result_2 as $row) {
|
||||||
|
//set the variables
|
||||||
$menu_item_link = $row['menu_item_link'];
|
$menu_item_link = $row['menu_item_link'];
|
||||||
$menu_item_category = $row['menu_item_category'];
|
$menu_item_category = $row['menu_item_category'];
|
||||||
$menu_item_uuid = $row['menu_item_uuid'];
|
$menu_item_uuid = $row['menu_item_uuid'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue