Browse Source

modify include path order (closes #514)

Andrew Dolgov 7 years ago
parent
commit
88e8fb3a71
16 changed files with 35 additions and 38 deletions
  1. 3 3
      api/index.php
  2. 2 2
      backend.php
  3. 2 2
      db-updater.php
  4. 2 2
      digest.php
  5. 2 2
      errors.php
  6. 2 2
      image.php
  7. 2 2
      index.php
  8. 2 2
      localized_js.php
  9. 3 3
      mobile/image.php
  10. 3 3
      mobile/mobile-functions.php
  11. 2 2
      opml.php
  12. 2 2
      prefs.php
  13. 2 2
      public.php
  14. 2 2
      register.php
  15. 2 2
      update.php
  16. 2 5
      update_daemon2.php

+ 3 - 3
api/index.php

@@ -3,10 +3,10 @@
 
 	require_once "../config.php";
 
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . PATH_SEPARATOR .
+	set_include_path(dirname(__FILE__) . PATH_SEPARATOR .
 		dirname(dirname(__FILE__)) . PATH_SEPARATOR .
-		dirname(dirname(__FILE__)) . "/include" );
+		dirname(dirname(__FILE__)) . "/include" . PATH_SEPARATOR .
+  		get_include_path());
 
 	chdir("..");
 

+ 2 - 2
backend.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	/* remove ill effects of magic quotes */
 

+ 2 - 2
db-updater.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	require_once "functions.php";
 	require_once "sessions.php";

+ 2 - 2
digest.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	require_once "functions.php";
 	require_once "sessions.php";

+ 2 - 2
errors.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR . 
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	require_once "functions.php";
 

+ 2 - 2
image.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	require_once "config.php";
 

+ 2 - 2
index.php

@@ -5,8 +5,8 @@
 		exit;
 	}
 
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) ."/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	require_once "functions.php";
 	require_once "sessions.php";

+ 2 - 2
localized_js.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR . 
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	define('DISABLE_SESSIONS', true);
 

+ 3 - 3
mobile/image.php

@@ -1,8 +1,8 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . PATH_SEPARATOR .
+	set_include_path(dirname(__FILE__) . PATH_SEPARATOR .
 		dirname(dirname(__FILE__)) . PATH_SEPARATOR .
-		dirname(dirname(__FILE__)) . "/include" );
+		dirname(dirname(__FILE__)) . "/include" . PATH_SEPARATOR .
+  		get_include_path());
 
 	require_once "config.php";
 

+ 3 - 3
mobile/mobile-functions.php

@@ -1,8 +1,8 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . PATH_SEPARATOR .
+	set_include_path(dirname(__FILE__) . PATH_SEPARATOR .
 		dirname(dirname(__FILE__)) . PATH_SEPARATOR .
-		dirname(dirname(__FILE__)) . "/include" );
+		dirname(dirname(__FILE__)) . "/include" . PATH_SEPARATOR .
+  		get_include_path());
 
 	require_once "functions.php";
 	require_once "sessions.php";

+ 2 - 2
opml.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	function __autoload($class) {
 		$file = "classes/".strtolower(basename($class)).".php";

+ 2 - 2
prefs.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	require_once "functions.php";
 	require_once "sessions.php";

+ 2 - 2
public.php

@@ -1,6 +1,6 @@
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	/* remove ill effects of magic quotes */
 

+ 2 - 2
register.php

@@ -4,8 +4,8 @@
 	// 1) templates/register_notice.txt - displayed above the registration form
 	// 2) register_expire_do.php - contains user expiration queries when necessary
 
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	require_once 'lib/phpmailer/class.phpmailer.php';
 

+ 2 - 2
update.php

@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	define('DISABLE_SESSIONS', true);
 

+ 2 - 5
update_daemon2.php

@@ -1,10 +1,7 @@
 #!/usr/bin/env php
 <?php
-	set_include_path(get_include_path() . PATH_SEPARATOR .
-		dirname(__FILE__) . "/include");
-
-	// This is an experimental multiprocess update daemon.
-	// Some configurable variable may be found below.
+	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+		get_include_path());
 
 	declare(ticks = 1);
 	chdir(dirname(__FILE__));