From 9f71bdd0243694cb75d42fdd201ef78d896a26c3 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 10 Jul 2013 23:41:12 +0000 Subject: [PATCH] Change links from includes to the resources directory. --- app/call_center/call_center_agent_status.php | 2 +- app/calls/resources/classes/follow_me.php | 15 +++++++++++++++ app/calls_active/calls_exec.php | 2 +- app/content/rssadd.php | 2 +- app/content/rssupdate.php | 2 +- app/follow_me/app_config.php | 5 +++++ core/user_settings/user_dashboard.php | 2 +- index.php | 2 +- login.php | 2 +- resources/classes/database.php | 4 ++-- resources/classes/modules.php | 2 +- resources/install.php | 10 +++++----- resources/login.php | 2 +- resources/menu.php | 4 ++-- resources/require.php | 4 ++-- resources/wysiwyg.php | 6 +++--- 16 files changed, 43 insertions(+), 23 deletions(-) diff --git a/app/call_center/call_center_agent_status.php b/app/call_center/call_center_agent_status.php index 82de45dd3f..9ae901739b 100644 --- a/app/call_center/call_center_agent_status.php +++ b/app/call_center/call_center_agent_status.php @@ -51,7 +51,7 @@ require_once "resources/paging.php"; //get the http post values and set them as php variables if (count($_POST)>0) { //include the dnd php class - include "includes/classes/do_not_disturb.php"; + include "resources/classes/do_not_disturb.php"; foreach($_POST['agents'] as $row) { if (strlen($row['status']) > 0) { diff --git a/app/calls/resources/classes/follow_me.php b/app/calls/resources/classes/follow_me.php index 15954ac02c..9ddece6d48 100644 --- a/app/calls/resources/classes/follow_me.php +++ b/app/calls/resources/classes/follow_me.php @@ -31,6 +31,7 @@ include "root.php"; public $db_type; public $follow_me_uuid; public $cid_name_prefix; + public $cid_number_prefix; public $accountcode; public $call_prompt; public $follow_me_enabled; @@ -74,6 +75,9 @@ include "root.php"; $sql .= "domain_uuid, "; $sql .= "follow_me_uuid, "; $sql .= "cid_name_prefix, "; + if (strlen($this->cid_number_prefix) > 0) { + $sql .= "cid_number_prefix, "; + } $sql .= "call_prompt, "; $sql .= "follow_me_enabled "; $sql .= ")"; @@ -82,6 +86,9 @@ include "root.php"; $sql .= "'$this->domain_uuid', "; $sql .= "'$this->follow_me_uuid', "; $sql .= "'$this->cid_name_prefix', "; + if (strlen($this->cid_number_prefix) > 0) { + $sql .= "'$this->cid_number_prefix', "; + } $sql .= "'$this->call_prompt', "; $sql .= "'$this->follow_me_enabled' "; $sql .= ")"; @@ -100,6 +107,9 @@ include "root.php"; $sql = "update v_follow_me set "; $sql .= "follow_me_enabled = '$this->follow_me_enabled', "; $sql .= "cid_name_prefix = '$this->cid_name_prefix', "; + if (strlen($this->cid_number_prefix) > 0) { + $sql .= "cid_number_prefix = '$this->cid_number_prefix', "; + } $sql .= "call_prompt = '$this->call_prompt' "; $sql .= "where domain_uuid = '$this->domain_uuid' "; $sql .= "and follow_me_uuid = '$this->follow_me_uuid' "; @@ -273,6 +283,7 @@ include "root.php"; $follow_me_uuid = $row["follow_me_uuid"]; $this->call_prompt = $row["call_prompt"]; $this->cid_name_prefix = $row["cid_name_prefix"]; + $this->cid_number_prefix = $row["cid_number_prefix"]; } } unset ($prep_statement); @@ -294,6 +305,10 @@ include "root.php"; if (strlen($this->cid_name_prefix) > 0) { $dial_string .= ",origination_caller_id_name=".$this->cid_name_prefix."#\${caller_id_name}"; } + if (strlen($this->cid_number_prefix) > 0) { + $dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix.""; + //$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."#\${caller_id_number}"; + } if (strlen($this->accountcode) > 0) { $dial_string .= ",accountcode=".$this->accountcode; } diff --git a/app/calls_active/calls_exec.php b/app/calls_active/calls_exec.php index ea5f3b6978..277be8072c 100644 --- a/app/calls_active/calls_exec.php +++ b/app/calls_active/calls_exec.php @@ -125,7 +125,7 @@ if (count($_GET)>0) { if (strlen($user_status) > 0) { //include the dnd class - include "includes/classes/do_not_disturb.php"; + include "resources/classes/do_not_disturb.php"; //loop through the list of assigned extensions foreach ($_SESSION['user']['extension'] as &$row) { $extension = $row["user"]; diff --git a/app/content/rssadd.php b/app/content/rssadd.php index cc84368218..f49f8765a6 100644 --- a/app/content/rssadd.php +++ b/app/content/rssadd.php @@ -272,7 +272,7 @@ if (count($_POST)>0) { //echo " "; echo " "; echo " ".$text['label-content'].": "; - if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) { + if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/tiny_mce')) { echo "       editor   ".$text['label-on-off']."
"; } else { diff --git a/app/content/rssupdate.php b/app/content/rssupdate.php index 1e4901f7c9..1724c65009 100644 --- a/app/content/rssupdate.php +++ b/app/content/rssupdate.php @@ -305,7 +305,7 @@ else { echo " "; echo " ".$text['label-content'].": "; if ($rss_optional_1 == "text/html") { - if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) { + if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/tiny_mce')) { echo "       editor   ".$text['label-on-off']."
"; } echo " "; diff --git a/app/follow_me/app_config.php b/app/follow_me/app_config.php index 43c06ca645..cf4712f1f1 100644 --- a/app/follow_me/app_config.php +++ b/app/follow_me/app_config.php @@ -62,6 +62,7 @@ //$apps[$x]['permissions'][$y]['groups'][] = 'admin'; //$apps[$x]['permissions'][$y]['groups'][] = 'user'; $y++; + $apps[$x]['permissions'][$y]['name'] = 'follow_me_cid_number_prefix'; //schema details $y = 0; //table array index @@ -83,6 +84,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ''; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'cid_number_prefix'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ''; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_prompt'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ''; diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index 716f57cfee..6bddcc4777 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -30,7 +30,7 @@ //if config.php file does not exist then redirect to the install page if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //do nothing - } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) { + } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //original directory } elseif (file_exists("/etc/fusionpbx/config.php")){ //linux diff --git a/index.php b/index.php index 60c1a7ae52..f77f98c340 100644 --- a/index.php +++ b/index.php @@ -28,7 +28,7 @@ include "root.php"; //if config.php file does not exist then redirect to the install page if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //do nothing - } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) { + } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //original directory } elseif (file_exists("/etc/fusionpbx/config.php")){ //linux diff --git a/login.php b/login.php index f12786706e..93f6910254 100644 --- a/login.php +++ b/login.php @@ -28,7 +28,7 @@ include "root.php"; //if config.php file does not exist then redirect to the install page if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //do nothing - } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) { + } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //original directory } elseif (file_exists("/etc/fusionpbx/config.php")){ //linux diff --git a/resources/classes/database.php b/resources/classes/database.php index 3a21403b84..8602b2b2e0 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -55,8 +55,8 @@ include "root.php"; include "root.php"; if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { include $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php"; - } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) { - include $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php"; + } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { + include $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php"; } elseif (file_exists("/etc/fusionpbx/config.php")){ //linux include "/etc/fusionpbx/config.php"; diff --git a/resources/classes/modules.php b/resources/classes/modules.php index bfb33f5652..f3ff83c566 100644 --- a/resources/classes/modules.php +++ b/resources/classes/modules.php @@ -27,7 +27,7 @@ include "root.php"; //add the database structure /* -require_once "includes/classes/modules.php"; +require_once "resources/classes/modules.php"; $mod = new switch_modules; $mod->dir = $_SESSION['switch']['mod']['dir']; echo $mod->dir."\n"; diff --git a/resources/install.php b/resources/install.php index b9a806e6a0..0002ebf9c9 100644 --- a/resources/install.php +++ b/resources/install.php @@ -46,7 +46,7 @@ require_once "resources/functions.php"; $domain_name = $domain_array[0]; //if the config file exists then disable the install page - if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php")) { + if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/config.php")) { $msg .= "Already Installed"; header("Location: ".PROJECT_PATH."/index.php?msg=".urlencode($msg)); exit; @@ -449,15 +449,15 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist $tmp_config .= " error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ); //hide notices and warnings"; $tmp_config .= "\n"; $tmp_config .= "?>"; - if (is_dir($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes")) { - $config = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php"; + if (is_dir($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources")) { + $config = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/config.php"; } elseif (is_dir("/etc/fusionpbx")){ $config = "/etc/fusionpbx/config.php"; } elseif (is_dir("/usr/local/etc/fusionpbx")){ $config = "/usr/local/etc/fusionpbx/config.php"; } else { - $config = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php"; + $config = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/config.php"; } $fout = fopen($config,"w"); fwrite($fout, $tmp_config); @@ -1347,7 +1347,7 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist //show the html form if (!is_writable($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/header.php")) { - $install_msg .= "
  • Write access to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/ is required during the install.
  • \n"; + $install_msg .= "
  • Write access to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/ is required during the install.
  • \n"; } if (!extension_loaded('PDO')) { $install_msg .= "
  • PHP PDO was not detected. Please install it before proceeding.
  • "; diff --git a/resources/login.php b/resources/login.php index 0dc35681a8..2f1c99c5ba 100644 --- a/resources/login.php +++ b/resources/login.php @@ -71,7 +71,7 @@ echo "username: admin
    password: fusionpbx

    \n"; echo "\n"; echo "
  • \n"; - echo "The database connection settings have been saved to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php.
    \n"; + echo "The database connection settings have been saved to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/config.php.
    \n"; echo "
  • \n"; echo "\n"; echo "\n"; diff --git a/resources/menu.php b/resources/menu.php index 6cd2042652..1e686fb957 100644 --- a/resources/menu.php +++ b/resources/menu.php @@ -47,14 +47,14 @@ require_once "resources/require.php"; $v_menu .= " #menu{float:none;} /* This is required for IE to avoid positioning bug when placing content first in source. */\n"; $v_menu .= " /* IE Menu CSS */\n"; $v_menu .= " /* csshover.htc file version: V1.21.041022 - Available for download from: http://www.xs4all.nl/~peterned/csshover.html */\n"; - $v_menu .= " body{behavior:url(/includes/csshover.htc);\n"; + $v_menu .= " body{behavior:url(/resources/csshover.htc);\n"; $v_menu .= " font-size:100%; /* to enable text resizing in IE */\n"; $v_menu .= " }\n"; $v_menu .= " #menu ul li{float:left;width:100%;}\n"; $v_menu .= " #menu h2, #menu a{height:1%;font:bold arial,helvetica,sans-serif;}\n"; $v_menu .= " \n"; $v_menu .= " \n"; - //$v_menu .= " \n"; + //$v_menu .= " \n"; $v_menu .= "\n"; $v_menu .= "\n"; diff --git a/resources/require.php b/resources/require.php index 676ea5303f..714e9fa451 100644 --- a/resources/require.php +++ b/resources/require.php @@ -30,8 +30,8 @@ if (file_exists("/etc/fusionpbx/config.php")) { elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) { include "/usr/local/etc/fusionpbx/config.php"; } -elseif (file_exists("includes/config.php")) { - include "includes/config.php"; +elseif (file_exists("resources/config.php")) { + include "resources/config.php"; } else { include "resources/config.php"; diff --git a/resources/wysiwyg.php b/resources/wysiwyg.php index 8f45b9136f..aefa6d3296 100644 --- a/resources/wysiwyg.php +++ b/resources/wysiwyg.php @@ -33,11 +33,11 @@ //plugins : style,layer,table,save,advhr,advimage,advlink,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,spellchecker //theme_advanced_buttons3_add : "spellchecker,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen", -// +// ?> - +