Improve the efficiency of the Menu PHP class by removing redundant code in the restore method of the PHP class and add PDO transactions. Improve the menu language for better multi-lingual support, escape the menu item title to so it will work correctly for French and other languages.

This commit is contained in:
Mark Crane
2013-11-24 00:15:02 +00:00
parent 1c2303b01f
commit 32df6f40d9
2 changed files with 49 additions and 153 deletions
+2 -2
View File
@@ -36,14 +36,14 @@ else {
//get the http value and set as a php variable
$menu_uuid = check_str($_REQUEST["menu_uuid"]);
$menu_language = check_str($_REQUEST["menu_language"]);
$menu_language = check_str($_REQUEST["menu_language"]);
//menu restore default
require_once "resources/classes/menu.php";
$menu = new menu;
$menu->db = $db;
$menu->menu_uuid = $menu_uuid;
$menu->menu_language = $menu_language;
$menu->menu_language = $menu_language;
$menu->delete();
$menu->restore2();