modify include path order (closes #514)

This commit is contained in:
Andrew Dolgov 2012-12-09 13:41:22 +04:00
parent 51cc387347
commit 88e8fb3a71
16 changed files with 35 additions and 38 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
<?php <?php
set_include_path(get_include_path() . PATH_SEPARATOR . set_include_path(dirname(__FILE__) . PATH_SEPARATOR .
dirname(__FILE__) . PATH_SEPARATOR .
dirname(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"; require_once "config.php";

View File

@ -1,8 +1,8 @@
<?php <?php
set_include_path(get_include_path() . PATH_SEPARATOR . set_include_path(dirname(__FILE__) . PATH_SEPARATOR .
dirname(__FILE__) . PATH_SEPARATOR .
dirname(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 "functions.php";
require_once "sessions.php"; require_once "sessions.php";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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