Remove the create_menus() from the install as it is now handled in the menu class.
This commit is contained in:
parent
1ad01ea842
commit
32ffe4d37f
|
|
@ -90,7 +90,6 @@ include "root.php";
|
|||
$this->create_superuser();
|
||||
$this->write_progress("\tRunning requires");
|
||||
require "resources/require.php";
|
||||
$this->create_menus();
|
||||
$this->write_progress("Install phase 1 complete for FusionPBX");
|
||||
}
|
||||
|
||||
|
|
@ -989,55 +988,8 @@ include "root.php";
|
|||
}
|
||||
}
|
||||
|
||||
protected function create_menus() {
|
||||
$this->write_progress("\tCreating menus");
|
||||
//set the defaults
|
||||
$menu_name = 'default';
|
||||
$menu_language = 'en-us';
|
||||
$menu_description = 'Default Menu';
|
||||
|
||||
$this->write_progress("\tChecking if menu exists");
|
||||
$sql = "select count(*) from v_menus ";
|
||||
$sql .= "where menu_uuid = '".$this->menu_uuid."' ";
|
||||
$sql .= "limit 1 ";
|
||||
$this->write_debug($sql);
|
||||
$prep_statement = $this->dbh->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||
unset($sql, $prep_statement);
|
||||
if ($result['count'] == 0) {
|
||||
$this->write_progress("\t... creating menu '" . $menu_name. "'");
|
||||
$sql = "insert into v_menus ";
|
||||
$sql .= "(";
|
||||
$sql .= "menu_uuid, ";
|
||||
$sql .= "menu_name, ";
|
||||
$sql .= "menu_language, ";
|
||||
$sql .= "menu_description ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$this->menu_uuid."', ";
|
||||
$sql .= "'$menu_name', ";
|
||||
$sql .= "'$menu_language', ";
|
||||
$sql .= "'$menu_description' ";
|
||||
$sql .= ");";
|
||||
if ($this->debug) {
|
||||
$this->write_debug( $sql."\n");
|
||||
}
|
||||
$this->dbh->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//add the menu items
|
||||
require_once "resources/classes/menu.php";
|
||||
$menu = new menu;
|
||||
$menu->db = $this->dbh;
|
||||
$menu->menu_uuid = $this->menu_uuid;
|
||||
$menu->restore();
|
||||
unset($menu);
|
||||
}
|
||||
}
|
||||
|
||||
protected function app_defaults() {
|
||||
//write a progress message
|
||||
$this->write_progress("\tRunning app_defaults");
|
||||
|
||||
//set needed session settings
|
||||
|
|
|
|||
Loading…
Reference in New Issue