Remove trailing tabs. Fix some spelling mistakes. And update core/upgrade/app_defaults.php to fix advanced -> upgrade.

This commit is contained in:
markjcrane
2015-11-25 18:06:27 -07:00
parent 331778e36c
commit a30b0b56ab
7 changed files with 22 additions and 29 deletions
-2
View File
@@ -95,8 +95,6 @@ if (!if_group("superadmin")) {
echo "<br><br>"; echo "<br><br>";
echo "<p>WiP</p>";
//include the footer //include the footer
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>
+8 -10
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@@ -28,7 +28,7 @@ require_once "root.php";
require_once "resources/functions.php"; require_once "resources/functions.php";
require_once "resources/classes/text.php"; require_once "resources/classes/text.php";
//initialize varibles we are going to use //initialize variables we are going to use
$event_host = ''; $event_host = '';
$event_port = ''; $event_port = '';
$event_password = ''; $event_password = '';
@@ -130,7 +130,7 @@ if(!$install_step) { $install_step = 'select_language'; }
if (isset($_SESSION['domain']['template']['name']) and strlen($_SESSION['domain']['template']['name']) != 0) { if (isset($_SESSION['domain']['template']['name']) and strlen($_SESSION['domain']['template']['name']) != 0) {
$default_template = $_SESSION['domain']['template']['name']; $default_template = $_SESSION['domain']['template']['name'];
} }
//set a default enviroment if first_time //set a default enviroment if first_time
if($first_time_install){ if($first_time_install){
//initialize some varibles to cut down on warnings //initialize some varibles to cut down on warnings
@@ -147,7 +147,7 @@ if(!$install_step) { $install_step = 'select_language'; }
//buffer the content //buffer the content
ob_end_clean(); //clean the buffer ob_end_clean(); //clean the buffer
ob_start(); ob_start();
$messages = array(); $messages = array();
if (!extension_loaded('PDO')) { if (!extension_loaded('PDO')) {
$messages[] = "<b>PHP PDO was not detected</b>. Please install it before proceeding"; $messages[] = "<b>PHP PDO was not detected</b>. Please install it before proceeding";
@@ -168,7 +168,7 @@ if(!$install_step) { $install_step = 'select_language'; }
"<sm>You can use the following to find what ports are allowed<pre>semanage port -l | grep '^http_port_t'</pre></sm>"; "<sm>You can use the following to find what ports are allowed<pre>semanage port -l | grep '^http_port_t'</pre></sm>";
} }
} }
//action code //action code
if($return_install_step == 'config_detail'){ if($return_install_step == 'config_detail'){
//check for all required data //check for all required data
@@ -185,11 +185,8 @@ if(!$install_step) { $install_step = 'select_language'; }
//set the max execution time to 1 hour //set the max execution time to 1 hour
ini_set('max_execution_time',3600); ini_set('max_execution_time',3600);
} }
//display messages //display messages
if (count($messages)>0) { if (count($messages)>0) {
echo "<br />\n"; echo "<br />\n";
@@ -262,7 +259,7 @@ if(!$install_step) { $install_step = 'select_language'; }
try { try {
$switch_detect->detect(); $switch_detect->detect();
} catch(Exception $e){ } catch(Exception $e){
echo "<p>Failed to detect confgiuration detect_switch reported: " . $e->getMessage() . "</p>\n"; echo "<p>Failed to detect configuration detect_switch reported: " . $e->getMessage() . "</p>\n";
$detect_ok = false; $detect_ok = false;
} }
if($detect_ok){ if($detect_ok){
@@ -299,7 +296,7 @@ if(!$install_step) { $install_step = 'select_language'; }
} }
} }
$fusionPBX->install(); $fusionPBX->install();
require_once "resources/classes/install_switch.php"; require_once "resources/classes/install_switch.php";
$switch = new install_switch($domain_name, $domain_uuid, $switch_detect); $switch = new install_switch($domain_name, $domain_uuid, $switch_detect);
//$switch->debug = true; //$switch->debug = true;
@@ -345,6 +342,7 @@ if($first_time_install){
$_SESSION['permissions'][]['permission_name'] = 'superadmin'; $_SESSION['permissions'][]['permission_name'] = 'superadmin';
$_SESSION['menu'] = ''; $_SESSION['menu'] = '';
} }
// add the content to the template and then send output // add the content to the template and then send output
$body = ob_get_contents(); //get the output from the buffer $body = ob_get_contents(); //get the output from the buffer
ob_end_clean(); //clean the buffer ob_end_clean(); //clean the buffer
@@ -35,9 +35,9 @@ include "root.php";
public $debug = false; public $debug = false;
function __construct($domain_name, $domain_uuid, $detect_switch) { function __construct($domain_name, $domain_uuid, $detect_switch) {
if(!is_a($detect_switch, 'detect_switch')){ //if(!is_a($detect_switch, 'detect_switch')){
throw new Exception('The parameter $detect_switch must be a detect_switch object (or a subclass of)'); // throw new Exception('The parameter $detect_switch must be a detect_switch object (or a subclass of)');
} //}
$this->domain_uuid = $domain_uuid; $this->domain_uuid = $domain_uuid;
$this->domain = $domain_name; $this->domain = $domain_name;
$this->detect_switch = $detect_switch; $this->detect_switch = $detect_switch;
@@ -166,11 +166,10 @@ include "root.php";
} }
} }
function install() { function install() {
$this->copy_conf(); $this->copy_conf();
$this->copy_scripts(); $this->copy_scripts();
//tell freeswitch to restart //tell freeswitch to restart
$this->write_progress("Restarting switch"); $this->write_progress("Restarting switch");
$this->detect_switch->restart_switch(); $this->detect_switch->restart_switch();
} }
@@ -182,10 +181,10 @@ include "root.php";
function copy_conf() { function copy_conf() {
$this->write_progress("Copying Config"); $this->write_progress("Copying Config");
//make a backup of the config //make a backup of the config
if (file_exists($this->detect_switch->conf_dir())) { if (file_exists($this->detect_switch->conf_dir())) {
$this->backup_dir($this->detect_switch->conf_dir(), 'fusionpbx_switch_config'); $this->backup_dir($this->detect_switch->conf_dir(), 'fusionpbx_switch_config');
$this->recursive_delete($this->detect_switch->conf_dir()); $this->recursive_delete($this->detect_switch->conf_dir());
} }
//make sure the conf directory exists //make sure the conf directory exists
if (!is_dir($this->detect_switch->conf_dir())) { if (!is_dir($this->detect_switch->conf_dir())) {
if (!mkdir($this->detect_switch->conf_dir(), 0774, true)) { if (!mkdir($this->detect_switch->conf_dir(), 0774, true)) {
+2 -4
View File
@@ -34,10 +34,8 @@ if ($domains_processed == 1) {
} }
//copy the files and directories from resources/install //copy the files and directories from resources/install
$install = new install; $obj = new install_switch;
$install->domain_uuid = $domain_uuid; $obj->upgrade();
$install->switch_scripts_dir = $_SESSION['switch']['scripts']['dir'];
$install->copy_scripts();
} }
//update the software table //update the software table
@@ -126,6 +126,6 @@ directory_url: "http://{$domain_name}/app/provision/?file=directory.php"
# URL for branding logo # URL for branding logo
#logo_url: "http://{$domain_name}/app/provision/logo.bmp" #logo_url: "http://{$domain_name}/app/provision/logo.bmp"
# Remote Party ID # Remote Party ID 0-Disabled (default), 1-Enabled
remote_party_id: 1 ; 0-Disabled (default), 1-Enabled remote_party_id: 1
@@ -31,7 +31,7 @@
<remote_reboot>1</remote_reboot> <remote_reboot>1</remote_reboot>
<checkpeercert>0</checkpeercert> <checkpeercert>0</checkpeercert>
<sipkeepalive>1</sipkeepalive> <sipkeepalive>1</sipkeepalive>
<rss_feed>http://rss.news.yahoo.com/rss/topstories</rss_feed> <rss_feed></rss_feed>
<host_ip>135.199.77.12</host_ip> <host_ip>135.199.77.12</host_ip>
<video_ip>135.199.77.12</video_ip> <video_ip>135.199.77.12</video_ip>
<sntp>128.138.141.172</sntp> <sntp>128.138.141.172</sntp>
@@ -31,7 +31,7 @@
<remote_reboot>1</remote_reboot> <remote_reboot>1</remote_reboot>
<checkpeercert>0</checkpeercert> <checkpeercert>0</checkpeercert>
<sipkeepalive>1</sipkeepalive> <sipkeepalive>1</sipkeepalive>
<rss_feed>http://rss.news.yahoo.com/rss/topstories</rss_feed> <rss_feed></rss_feed>
<host_ip>135.199.77.12</host_ip> <host_ip>135.199.77.12</host_ip>
<video_ip>135.199.77.12</video_ip> <video_ip>135.199.77.12</video_ip>
<sntp>128.138.141.172</sntp> <sntp>128.138.141.172</sntp>