Refactor include_pathes

This commit is contained in:
Romain Neutron
2012-01-18 10:37:00 +01:00
parent 356c431fae
commit 1f77d5ec48
3 changed files with 18 additions and 8 deletions

View File

@@ -3,9 +3,12 @@
require_once __DIR__ . '/../../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc'; require_once __DIR__ . '/../../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc';
require_once __DIR__ . '/../../Bridge_datas.inc'; require_once __DIR__ . '/../../Bridge_datas.inc';
$new_include_path = realpath(__DIR__ . '/../../../../vendor/gdata/') . PATH_SEPARATOR . get_include_path(); $include_path = realpath(__DIR__ . '/../../../../vendor/gdata/');
if(strpos(get_include_path(), $include_path) === false)
{
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
set_include_path($new_include_path); set_include_path($new_include_path);
}
require_once('Zend/Loader.php'); require_once('Zend/Loader.php');
Zend_Loader::loadClass('Zend_Gdata_YouTube'); Zend_Loader::loadClass('Zend_Gdata_YouTube');

View File

@@ -3,9 +3,12 @@
require_once __DIR__ . '/../../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc'; require_once __DIR__ . '/../../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc';
require_once __DIR__ . '/../../Bridge_datas.inc'; require_once __DIR__ . '/../../Bridge_datas.inc';
$new_include_path = realpath(__DIR__ . '/../../../../vendor/gdata/') . PATH_SEPARATOR . get_include_path(); $include_path = realpath(__DIR__ . '/../../../../vendor/gdata/');
if(strpos(get_include_path(), $include_path) === false)
{
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
set_include_path($new_include_path); set_include_path($new_include_path);
}
require_once('Zend/Loader.php'); require_once('Zend/Loader.php');
Zend_Loader::loadClass('Zend_Gdata_YouTube'); Zend_Loader::loadClass('Zend_Gdata_YouTube');

View File

@@ -2,8 +2,12 @@
require_once __DIR__ . '/../../bootstrap.php'; require_once __DIR__ . '/../../bootstrap.php';
$new_include_path = realpath(__DIR__ . "/../../vendor/") . PATH_SEPARATOR . get_include_path(); $include_path = realpath(__DIR__ . '/../../vendor/');
if(strpos(get_include_path(), $include_path) === false)
{
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
set_include_path($new_include_path); set_include_path($new_include_path);
}
require_once __DIR__ . "/../../vendor/Phlickr/Api.php"; require_once __DIR__ . "/../../vendor/Phlickr/Api.php";