Bladeren bron

Fix most of the PHP notices.

Mark Crane 13 jaren geleden
bovenliggende
commit
9203f8db71
8 gewijzigde bestanden met toevoegingen van 17 en 18 verwijderingen
  1. 2 2
      features/root.php
  2. 2 2
      flashphoner/root.php
  3. 2 2
      get_call_details/root.php
  4. 2 2
      invoices/root.php
  5. 2 2
      soft_phone/root.php
  6. 3 4
      tickets/root.php
  7. 2 2
      user_contacts/root.php
  8. 2 2
      users_bulk_add/root.php

+ 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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 	}
 
 

+ 3 - 4
tickets/root.php

@@ -1,7 +1,7 @@
 <?php
 <?php
 /*
 /*
 	FusionPBX
 	FusionPBX
-      	Version: MPL 1.1
+	Version: MPL 1.1
 
 
 	The contents of this file are subject to the Mozilla Public License Version
 	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
 	1.1 (the "License"); you may not use this file except in compliance with
@@ -21,7 +21,6 @@
 	the Initial Developer. All Rights Reserved.
 	the Initial Developer. All Rights Reserved.
 
 
 	Contributor(s):
 	Contributor(s):
-	Ken Rice <[email protected]>
 	Mark J Crane <[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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		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 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')){
 	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' );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
 	}
 	}
 	else {
 	else {
-		define('PROJECT_PATH', '');
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
 	}
 	}