Fix a few more line space, indentation, and other white space issues.

This commit is contained in:
Mark Crane
2012-10-11 06:36:24 +00:00
parent be979dbc3a
commit 6dc9eec702
10 changed files with 300 additions and 286 deletions

View File

@@ -126,47 +126,47 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "where default_setting_uuid = '$default_setting_uuid'";
$db->exec(check_sql($sql));
unset($sql);
$sql = "select * from v_domain_settings ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and domain_setting_subcategory = 'menu' ";
$sql .= "and domain_setting_name = 'uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset ($prep_statement);
if(count($result)>0){
$sql = "update v_domain_settings set ";
$sql .= "domain_setting_value = '$default_setting_value' ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and domain_setting_subcategory = 'menu' ";
$db->exec(check_sql($sql));
unset($sql);
}else{
$sql = "insert into v_domain_settings ";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "domain_setting_uuid, ";
$sql .= "domain_setting_category, ";
$sql .= "domain_setting_subcategory, ";
$sql .= "domain_setting_name, ";
$sql .= "domain_setting_value, ";
$sql .= "domain_setting_enabled ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
$sql .= "'".$_SESSION['domain_uuid']."', ";
$sql .= "'".uuid()."', ";
$sql .= "'domain', ";
$sql .= "'menu', ";
$sql .= "'uuid', ";
$sql .= "'$default_setting_value', ";
$sql .= "'true' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
}
$sql = "select * from v_domain_settings ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and domain_setting_subcategory = 'menu' ";
$sql .= "and domain_setting_name = 'uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset ($prep_statement);
if(count($result)>0){
$sql = "update v_domain_settings set ";
$sql .= "domain_setting_value = '$default_setting_value' ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and domain_setting_subcategory = 'menu' ";
$db->exec(check_sql($sql));
unset($sql);
}else{
$sql = "insert into v_domain_settings ";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "domain_setting_uuid, ";
$sql .= "domain_setting_category, ";
$sql .= "domain_setting_subcategory, ";
$sql .= "domain_setting_name, ";
$sql .= "domain_setting_value, ";
$sql .= "domain_setting_enabled ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
$sql .= "'".$_SESSION['domain_uuid']."', ";
$sql .= "'".uuid()."', ";
$sql .= "'domain', ";
$sql .= "'menu', ";
$sql .= "'uuid', ";
$sql .= "'$default_setting_value', ";
$sql .= "'true' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
}
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=default_settings.php\">\n";

View File

@@ -136,20 +136,19 @@ require_once "includes/paging.php";
$subcategory = $row['default_setting_subcategory'];
$name = $row['default_setting_name'];
if ($category == "domain" && $subcategory == "menu" && $name == "uuid" ) {
$sql = "select * from v_domain_settings ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and domain_setting_subcategory = 'menu' ";
$sql .= "and domain_setting_name = 'uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row2) {
$domain_setting_value = $row2["domain_setting_value"];
break; //limit to 1 row
}
unset ($prep_statement);
$sql = "select * from v_domain_settings ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and domain_setting_subcategory = 'menu' ";
$sql .= "and domain_setting_name = 'uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row2) {
$domain_setting_value = $row2["domain_setting_value"];
break; //limit to 1 row
}
unset ($prep_statement);
$sql = "select * from v_menus ";
$sql .= "where menu_uuid = '$domain_setting_value' ";
$sub_prep_statement = $db->prepare(check_sql($sql));

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 "includes/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->restore();
@@ -62,4 +62,4 @@ else {
require_once "includes/footer.php";
return;
?>
?>

View File

@@ -272,4 +272,4 @@ require_once "includes/paging.php";
//show the footer
require_once "includes/footer.php";
?>
?>

View File

@@ -56,17 +56,19 @@ session_start();
if (count($username_array) > 1 || strlen(check_str($_REQUEST["domain_name"])) > 0) {
foreach ($_SESSION['domains'] as &$row) {
if ($row['domain_name'] == $domain_name) {
$domain_uuid = $row["domain_uuid"];
$_SESSION["domain_uuid"] = $row["domain_uuid"];
$_SESSION['domains'][$row['domain_uuid']]['domain_uuid'] = $row['domain_uuid'];
$_SESSION['domains'][$row['domain_uuid']]['domain_name'] = $domain_name;
$_SESSION["domain_name"] = $domain_name;
//set the domain session variables
$domain_uuid = $row["domain_uuid"];
$_SESSION["domain_uuid"] = $row["domain_uuid"];
$_SESSION['domains'][$row['domain_uuid']]['domain_uuid'] = $row['domain_uuid'];
$_SESSION['domains'][$row['domain_uuid']]['domain_name'] = $domain_name;
$_SESSION["domain_name"] = $domain_name;
//domains set()
require "includes/classes/domains.php";
$domain = new domains();
$domain->db = $db;
$domain->set();
//set the setting arrays
//domains set()
require "includes/classes/domains.php";
$domain = new domains();
$domain->db = $db;
$domain->set();
}
}
}

View File

@@ -1,124 +1,141 @@
<?php
/*
FusionPBX
Version: MPL 1.1
/**
* Description of domains
*
* @author sreis
*/
class domains {
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
public function set() {
//set the variable
$db = $this->db;
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
//get the session settings
//get the default settings
$sql = "select * from v_default_settings ";
$sql .= "where default_setting_enabled = 'true' ";
$prep_statement = $db->prepare($sql);
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as $row) {
$name = $row['default_setting_name'];
$category = $row['default_setting_category'];
$subcategory = $row['default_setting_subcategory'];
if (strlen($subcategory) == 0) {
$_SESSION[$category][$name] = $row['default_setting_value'];
} else {
$_SESSION[$category][$subcategory][$name] = $row['default_setting_value'];
}
}
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
//get the domains settings
$sql = "select * from v_domain_settings ";
$sql .= "where domain_uuid = '" . $_SESSION["domain_uuid"] . "' ";
$sql .= "and domain_setting_enabled = 'true' ";
$prep_statement = $db->prepare($sql);
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as $row) {
$name = $row['domain_setting_name'];
$category = $row['domain_setting_category'];
$subcategory = $row['domain_setting_subcategory'];
if (strlen($subcategory) == 0) {
//$$category[$name] = $row['domain_setting_value'];
$_SESSION[$category][$name] = $row['domain_setting_value'];
} else {
//$$category[$subcategory][$name] = $row['domain_setting_value'];
$_SESSION[$category][$subcategory][$name] = $row['domain_setting_value'];
}
}
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
sreis
*/
//get the user settings
$sql = "select * from v_user_settings ";
$sql .= "where domain_uuid = '" . $_SESSION["domain_uuid"] . "' ";
$sql .= "and user_uuid = '" . $_SESSION["user_uuid"] . "' ";
$sql .= "and user_setting_enabled = 'true' ";
$prep_statement = $db->prepare($sql);
if ($prep_statement) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as $row) {
$name = $row['user_setting_name'];
$category = $row['user_setting_category'];
$subcategory = $row['user_setting_subcategory'];
if (strlen($subcategory) == 0) {
//$$category[$name] = $row['domain_setting_value'];
$_SESSION[$category][$name] = $row['user_setting_value'];
} else {
//$$category[$subcategory][$name] = $row['domain_setting_value'];
$_SESSION[$category][$subcategory][$name] = $row['user_setting_value'];
}
}
}
class domains {
//set the values from the session variables
if (strlen($_SESSION['domain']['time_zone']['name']) > 0) {
//server time zone
$_SESSION['time_zone']['system'] = date_default_timezone_get();
//domain time zone set in system settings
$_SESSION['time_zone']['domain'] = $_SESSION['domain']['time_zone']['name'];
//set the domain time zone as the default time zone
date_default_timezone_set($_SESSION['domain']['time_zone']['name']);
}
public function set() {
//set the context
if (strlen($_SESSION["context"]) == 0) {
if (count($_SESSION["domains"]) > 1) {
$_SESSION["context"] = $_SESSION["domain_name"];
} else {
$_SESSION["context"] = 'default';
}
}
//set the variable
$db = $this->db;
//recordings add the domain to the path if there is more than one domains
if (count($_SESSION["domains"]) > 1) {
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
if (substr($_SESSION['switch']['recordings']['dir'], -strlen($_SESSION["domain_name"])) != $_SESSION["domain_name"]) {
//get the default recordings directory
$sql = "select * from v_default_settings ";
$sql .= "where default_setting_enabled = 'true' ";
$sql .= "and default_setting_category = 'switch' ";
$sql .= "and default_setting_subcategory = 'recordings' ";
$sql .= "and default_setting_name = 'dir' ";
$prep_statement = $db->prepare($sql);
$prep_statement->execute();
$result_default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result_default_settings as $row) {
$name = $row['default_setting_name'];
$category = $row['default_setting_category'];
$subcategory = $row['default_setting_subcategory'];
$switch_recordings_dir = $row['default_setting_value'];
}
//add the domain
$_SESSION['switch']['recordings']['dir'] = $switch_recordings_dir . '/' . $_SESSION["domain_name"];
}
}
}
}
}
//get the default settings
$sql = "select * from v_default_settings ";
$sql .= "where default_setting_enabled = 'true' ";
$prep_statement = $db->prepare($sql);
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as $row) {
$name = $row['default_setting_name'];
$category = $row['default_setting_category'];
$subcategory = $row['default_setting_subcategory'];
if (strlen($subcategory) == 0) {
$_SESSION[$category][$name] = $row['default_setting_value'];
} else {
$_SESSION[$category][$subcategory][$name] = $row['default_setting_value'];
}
}
//get the domains settings
$sql = "select * from v_domain_settings ";
$sql .= "where domain_uuid = '" . $_SESSION["domain_uuid"] . "' ";
$sql .= "and domain_setting_enabled = 'true' ";
$prep_statement = $db->prepare($sql);
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as $row) {
$name = $row['domain_setting_name'];
$category = $row['domain_setting_category'];
$subcategory = $row['domain_setting_subcategory'];
if (strlen($subcategory) == 0) {
//$$category[$name] = $row['domain_setting_value'];
$_SESSION[$category][$name] = $row['domain_setting_value'];
} else {
//$$category[$subcategory][$name] = $row['domain_setting_value'];
$_SESSION[$category][$subcategory][$name] = $row['domain_setting_value'];
}
}
//get the user settings
$sql = "select * from v_user_settings ";
$sql .= "where domain_uuid = '" . $_SESSION["domain_uuid"] . "' ";
$sql .= "and user_uuid = '" . $_SESSION["user_uuid"] . "' ";
$sql .= "and user_setting_enabled = 'true' ";
$prep_statement = $db->prepare($sql);
if ($prep_statement) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as $row) {
$name = $row['user_setting_name'];
$category = $row['user_setting_category'];
$subcategory = $row['user_setting_subcategory'];
if (strlen($subcategory) == 0) {
//$$category[$name] = $row['domain_setting_value'];
$_SESSION[$category][$name] = $row['user_setting_value'];
} else {
//$$category[$subcategory][$name] = $row['domain_setting_value'];
$_SESSION[$category][$subcategory][$name] = $row['user_setting_value'];
}
}
}
//set the values from the session variables
if (strlen($_SESSION['domain']['time_zone']['name']) > 0) {
//server time zone
$_SESSION['time_zone']['system'] = date_default_timezone_get();
//domain time zone set in system settings
$_SESSION['time_zone']['domain'] = $_SESSION['domain']['time_zone']['name'];
//set the domain time zone as the default time zone
date_default_timezone_set($_SESSION['domain']['time_zone']['name']);
}
//set the context
if (strlen($_SESSION["context"]) == 0) {
if (count($_SESSION["domains"]) > 1) {
$_SESSION["context"] = $_SESSION["domain_name"];
} else {
$_SESSION["context"] = 'default';
}
}
//recordings add the domain to the path if there is more than one domains
if (count($_SESSION["domains"]) > 1) {
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
if (substr($_SESSION['switch']['recordings']['dir'], -strlen($_SESSION["domain_name"])) != $_SESSION["domain_name"]) {
//get the default recordings directory
$sql = "select * from v_default_settings ";
$sql .= "where default_setting_enabled = 'true' ";
$sql .= "and default_setting_category = 'switch' ";
$sql .= "and default_setting_subcategory = 'recordings' ";
$sql .= "and default_setting_name = 'dir' ";
$prep_statement = $db->prepare($sql);
$prep_statement->execute();
$result_default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result_default_settings as $row) {
$name = $row['default_setting_name'];
$category = $row['default_setting_category'];
$subcategory = $row['default_setting_subcategory'];
$switch_recordings_dir = $row['default_setting_value'];
}
//add the domain
$_SESSION['switch']['recordings']['dir'] = $switch_recordings_dir . '/' . $_SESSION["domain_name"];
}
}
}
}
}
?>

View File

@@ -27,7 +27,7 @@
//define the follow me class
class menu {
public $menu_uuid;
public $menu_language;
public $menu_language;
//delete items in the menu that are not protected
function delete() {
@@ -59,65 +59,65 @@
foreach ($apps as $row) {
foreach ($row['menu'] as $menu) {
//set the variables
$menu_item_title = $menu['title'][$this->menu_language];
$menu_item_title = $menu['title'][$this->menu_language];
$menu_item_uuid = $menu['uuid'];
$menu_item_parent_uuid = $menu['parent_uuid'];
$menu_item_category = $menu['category'];
$menu_item_path = $menu['path'];
$menu_item_order = $menu['order'];
$menu_item_description = $menu['desc'];
//if the item uuid is not currently in the db then add it
$sql = "select * from v_menu_items ";
$sql .= "where menu_uuid = '".$this->menu_uuid."' ";
$sql .= "and menu_item_uuid = '$menu_item_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
if ($prep_statement) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
if (count($result) == 0) {
//insert the default menu into the database
$sql = "insert into v_menu_items ";
$sql .= "(";
$sql .= "menu_item_uuid, ";
$sql .= "menu_uuid, ";
//$sql .= "menu_item_language, ";
$sql .= "menu_item_title, ";
$sql .= "menu_item_link, ";
$sql .= "menu_item_category, ";
if (strlen($menu_item_order) > 0) {
$sql .= "menu_item_order, ";
}
if (strlen($menu_item_parent_uuid) > 0) {
$sql .= "menu_item_parent_uuid, ";
}
$sql .= "menu_item_description ";
$sql .= ") ";
$sql .= "values ";
$sql .= "(";
$sql .= "'".$menu_item_uuid."', ";
$sql .= "'".$this->menu_uuid."', ";
//$sql .= "'$menu_item_language', ";
$sql .= "'$menu_item_title', ";
$sql .= "'$menu_item_path', ";
$sql .= "'$menu_item_category', ";
if (strlen($menu_item_order) > 0) {
$sql .= "'$menu_item_order', ";
}
if (strlen($menu_item_parent_uuid) > 0) {
$sql .= "'$menu_item_parent_uuid', ";
}
$sql .= "'$menu_item_description' ";
$sql .= ")";
if ($menu_item_uuid == $menu_item_parent_uuid) {
//echo $sql."<br />\n";
}
else {
$db->exec(check_sql($sql));
}
unset($sql);
}
}
//if the item uuid is not currently in the db then add it
$sql = "select * from v_menu_items ";
$sql .= "where menu_uuid = '".$this->menu_uuid."' ";
$sql .= "and menu_item_uuid = '$menu_item_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
if ($prep_statement) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
if (count($result) == 0) {
//insert the default menu into the database
$sql = "insert into v_menu_items ";
$sql .= "(";
$sql .= "menu_item_uuid, ";
$sql .= "menu_uuid, ";
//$sql .= "menu_item_language, ";
$sql .= "menu_item_title, ";
$sql .= "menu_item_link, ";
$sql .= "menu_item_category, ";
if (strlen($menu_item_order) > 0) {
$sql .= "menu_item_order, ";
}
if (strlen($menu_item_parent_uuid) > 0) {
$sql .= "menu_item_parent_uuid, ";
}
$sql .= "menu_item_description ";
$sql .= ") ";
$sql .= "values ";
$sql .= "(";
$sql .= "'".$menu_item_uuid."', ";
$sql .= "'".$this->menu_uuid."', ";
//$sql .= "'$menu_item_language', ";
$sql .= "'$menu_item_title', ";
$sql .= "'$menu_item_path', ";
$sql .= "'$menu_item_category', ";
if (strlen($menu_item_order) > 0) {
$sql .= "'$menu_item_order', ";
}
if (strlen($menu_item_parent_uuid) > 0) {
$sql .= "'$menu_item_parent_uuid', ";
}
$sql .= "'$menu_item_description' ";
$sql .= ")";
if ($menu_item_uuid == $menu_item_parent_uuid) {
//echo $sql."<br />\n";
}
else {
$db->exec(check_sql($sql));
}
unset($sql);
}
}
}
}

View File

@@ -17,7 +17,6 @@
dbh = freeswitch.Dbh("core:"..db_path.."/"..db_name);
end
-- show all channel variables
--dat = env:serialize()
--freeswitch.consoleLog("INFO","info:\n" .. dat .. "\n")

View File

@@ -256,15 +256,15 @@ if ($db_type == "pgsql") {
}
unset($result, $prep_statement);
}
if (!isset($_SESSION['domain']['menu'])){
//domains set()
require "includes/classes/domains.php";
$domain = new domains();
$domain->db = $db;
$domain->set();
}
//set the setting arrays
if (!isset($_SESSION['domain']['menu'])){
//domains set()
require "includes/classes/domains.php";
$domain = new domains();
$domain->db = $db;
$domain->set();
}
//set the domain_uuid variable from the session
if (strlen($_SESSION["domain_uuid"]) > 0) {

View File

@@ -34,7 +34,8 @@ require_once "includes/lib_functions.php";
//add the menu uuid
$menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286';
$menu_uuid_pt = '1a2b789b-64a0-4a45-84eb-7ebf4f9c576b';
$menu_uuid_pt = '1a2b789b-64a0-4a45-84eb-7ebf4f9c576b';
//error reporting
ini_set('display_errors', '1');
//error_reporting (E_ALL); // Report everything
@@ -212,7 +213,6 @@ require_once "includes/lib_functions.php";
break;
case "OpenBSD":
$startup_script_dir = '';
//set the default db_path
if (strlen($db_path) == 0) { //secure dir
$db_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/secure';
@@ -244,7 +244,6 @@ require_once "includes/lib_functions.php";
// HP-UX
// OpenBSD (not in Wikipedia)
//set the dir defaults for windows
if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
if (substr($_SERVER["DOCUMENT_ROOT"], -3) == "www") {
@@ -277,6 +276,7 @@ require_once "includes/lib_functions.php";
$startup_script_dir = '';
}
}
$msg = '';
if ($_POST["install_step"] == "2" && count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//check for all required data
@@ -1133,53 +1133,50 @@ if ($_POST["install_step"] == "3" && count($_POST)>0 && strlen($_POST["persistfo
require "includes/require.php";
//set the defaults
$x = 0;
$x = 0;
$tmp[$x]['menu_name'] = 'default';
$tmp[$x]['menu_language'] = 'en-us';
$tmp[$x]['menu_description'] = '';
$tmp[$x]['menu_uuid'] = $menu_uuid;
$x++;
$tmp[$x]['menu_name'] = 'portuguese';
$tmp[$x]['menu_uuid'] = $menu_uuid;
$x++;
$tmp[$x]['menu_name'] = 'portuguese';
$tmp[$x]['menu_language'] = 'pt-pt';
$tmp[$x]['menu_description'] = '';
$tmp[$x]['menu_uuid'] = $menu_uuid_pt;
$tmp[$x]['menu_uuid'] = $menu_uuid_pt;
//add the parent menu
foreach($tmp as $row) {
$sql = "insert into v_menus ";
$sql .= "(";
$sql .= "menu_uuid, ";
$sql .= "menu_name, ";
$sql .= "menu_language, ";
$sql .= "menu_description ";
$sql .= ") ";
$sql .= "values ";
$sql .= "(";
$sql .= "'".$row['menu_uuid']."', ";
$sql .= "'".$row['menu_name']."', ";
$sql .= "'".$row['menu_language']."', ";
$sql .= "'".$row['menu_description']."' ";
$sql .= ");";
if ($v_debug) {
fwrite($fp, $sql."\n");
}
$db->exec(check_sql($sql));
unset($sql);
//add the menu items
require_once "includes/classes/menu.php";
$menu = new menu;
$menu->db = $db;
$menu->menu_uuid = $row['menu_uuid'];
$menu->menu_language = $row['menu_language'];
$menu->restore();
unset($menu);
}
$sql = "insert into v_menus ";
$sql .= "(";
$sql .= "menu_uuid, ";
$sql .= "menu_name, ";
$sql .= "menu_language, ";
$sql .= "menu_description ";
$sql .= ") ";
$sql .= "values ";
$sql .= "(";
$sql .= "'".$row['menu_uuid']."', ";
$sql .= "'".$row['menu_name']."', ";
$sql .= "'".$row['menu_language']."', ";
$sql .= "'".$row['menu_description']."' ";
$sql .= ");";
if ($v_debug) {
fwrite($fp, $sql."\n");
}
$db->exec(check_sql($sql));
unset($sql);
//add the menu items
require_once "includes/classes/menu.php";
$menu = new menu;
$menu->db = $db;
$menu->menu_uuid = $row['menu_uuid'];
$menu->menu_language = $row['menu_language'];
$menu->restore();
unset($menu);
}
unset($tmp);
//setup the switch config directory if it exists
if ($switch_conf_dir != "/conf") {
if ($v_debug) {
@@ -1770,4 +1767,4 @@ if ($_POST["install_step"] == "3" && count($_POST)>0 && strlen($_POST["persistfo
echo $output;
unset($output);
?>
?>