Update the provision class to change the switch statement to the if/elseif/else to again fix a problem iwth php fpm on Ubuntu 14.04 LTS

This commit is contained in:
Mark Crane 2014-09-29 08:05:10 +00:00
parent f00814b1b1
commit 8dbf61f46e
1 changed files with 5 additions and 10 deletions

View File

@ -38,8 +38,7 @@ include "root.php";
global $db;
$this->db = $db;
//set the default template directory
switch (PHP_OS) {
case "Linux":
if (PHP_OS == "Linux") {
//set the default template dir
if (strlen($this->template_dir) == 0) {
if (file_exists('/etc/fusionpbx/resources/templates/provision')) {
@ -49,8 +48,7 @@ include "root.php";
$this->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/provision';
}
}
break;
case "FreeBSD":
} elseif (PHP_OS == "FreeBSD") {
//if the FreeBSD port is installed use the following paths by default.
if (file_exists('/usr/local/etc/fusionpbx/resources/templates/provision')) {
if (strlen($this->template_dir) == 0) {
@ -68,20 +66,17 @@ include "root.php";
$this->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/provision';
}
}
break;
case "NetBSD":
} elseif (PHP_OS == "NetBSD") {
//set the default template_dir
if (strlen($this->template_dir) == 0) {
$this->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/provision';
}
break;
case "OpenBSD":
} elseif (PHP_OS == "OpenBSD") {
//set the default template_dir
if (strlen($this->template_dir) == 0) {
$this->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/provision';
}
break;
default:
} else {
//set the default template_dir
if (strlen($this->template_dir) == 0) {
$this->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/provision';