Browse Source

Fix most of the PHP notices.

Mark Crane 13 years ago
parent
commit
9203f8db71

+ 2 - 2
features/root.php

@@ -39,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 

+ 2 - 2
flashphoner/root.php

@@ -39,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 

+ 2 - 2
get_call_details/root.php

@@ -39,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 

+ 2 - 2
invoices/root.php

@@ -39,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 

+ 2 - 2
soft_phone/root.php

@@ -39,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 

+ 3 - 4
tickets/root.php

@@ -1,7 +1,7 @@
 <?php
 /*
 	FusionPBX
-      	Version: MPL 1.1
+	Version: MPL 1.1
 
 	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
@@ -21,7 +21,6 @@
 	the Initial Developer. All Rights Reserved.
 
 	Contributor(s):
-	Ken Rice <[email protected]>
 	Mark J Crane <[email protected]>
 */
 
@@ -40,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 

+ 2 - 2
user_contacts/root.php

@@ -39,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 

+ 2 - 2
users_bulk_add/root.php

@@ -39,11 +39,11 @@
 
 // if the project directory exists then add it to the include path otherwise add the document root to the include path
 	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		define('PROJECT_PATH', '/fusionpbx');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}