diff --git a/lib/classes/API/OAuth2/Adapter.class.php b/lib/classes/API/OAuth2/Adapter.class.php
index ec5dcaddbd..c70cf6f381 100644
--- a/lib/classes/API/OAuth2/Adapter.class.php
+++ b/lib/classes/API/OAuth2/Adapter.class.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-require_once dirname(__FILE__) . '/../../../vendor/oauth2/lib/OAuth2.inc';
+require_once __DIR__ . '/../../../vendor/oauth2/lib/OAuth2.inc';
/**
*
diff --git a/lib/classes/API/OAuth2/Autoloader.class.php b/lib/classes/API/OAuth2/Autoloader.class.php
index 6fd696ef08..1099c5eac6 100644
--- a/lib/classes/API/OAuth2/Autoloader.class.php
+++ b/lib/classes/API/OAuth2/Autoloader.class.php
@@ -41,7 +41,7 @@ class API_OAuth2_Autoloader
*/
static public function autoload($class)
{
- if (file_exists($file = dirname(__FILE__) . '/../../../vendor/oauth2/lib/' . str_replace(array('_', "\0"), array('/', ''), $class) . '.inc'))
+ if (file_exists($file = __DIR__ . '/../../../vendor/oauth2/lib/' . str_replace(array('_', "\0"), array('/', ''), $class) . '.inc'))
{
require $file;
}
diff --git a/lib/classes/API/V1/result.class.php b/lib/classes/API/V1/result.class.php
index cf8f410e83..4469c26413 100644
--- a/lib/classes/API/V1/result.class.php
+++ b/lib/classes/API/V1/result.class.php
@@ -1,6 +1,6 @@
registry = $registry;
$this->session = Session_Handler::getInstance($this);
- require dirname(__FILE__) . '/../../config/connexion.inc';
+ require __DIR__ . '/../../config/connexion.inc';
$this->host = $hostname;
$this->port = $port;
@@ -409,7 +409,7 @@ class appbox extends base
{
$credentials['dbname'] = $dbname;
}
- $connexion = dirname(__FILE__) . "/../../config/connexion.inc";
+ $connexion = __DIR__ . "/../../config/connexion.inc";
if (is_file($connexion))
unlink($connexion);
@@ -422,7 +422,7 @@ class appbox extends base
}
if (!file_put_contents($connexion, $connexionINI, FILE_APPEND) !== false)
- throw new Exception(sprintf(_('Impossible d\'ecrire dans le dossier %s'), dirname(dirname(__FILE__)) . "/config/"));
+ throw new Exception(sprintf(_('Impossible d\'ecrire dans le dossier %s'), dirname(__DIR__) . "/config/"));
if (function_exists('chmod'))
chmod($connexion, 0700);
@@ -545,7 +545,7 @@ class appbox extends base
public static function list_databox_templates()
{
$files = array();
- $dir = new DirectoryIterator(dirname(__FILE__) . '/../conf.d/data_templates/');
+ $dir = new DirectoryIterator(__DIR__ . '/../conf.d/data_templates/');
foreach ($dir as $fileinfo)
{
if ($fileinfo->isFile())
diff --git a/lib/classes/base.class.php b/lib/classes/base.class.php
index d1e6f0ff7a..c6ad4c2fca 100644
--- a/lib/classes/base.class.php
+++ b/lib/classes/base.class.php
@@ -268,7 +268,7 @@ abstract class base implements cache_cacheableInterface
protected function upgradeDb($apply_patches, Setup_Upgrade &$upgrader)
{
- require_once dirname(__FILE__) . '/../version.inc';
+ require_once __DIR__ . '/../version.inc';
$recommends = array();
@@ -393,7 +393,7 @@ abstract class base implements cache_cacheableInterface
return $this;
- $structure = simplexml_load_file(dirname(__FILE__) . "/../../lib/conf.d/bases_structure.xml");
+ $structure = simplexml_load_file(__DIR__ . "/../../lib/conf.d/bases_structure.xml");
if (!$structure)
throw new Exception('Unable to load schema');
diff --git a/lib/classes/binaryAdapter/video/progressive/moovRelocator.class.php b/lib/classes/binaryAdapter/video/progressive/moovRelocator.class.php
index 3fbf455407..5eac57d440 100644
--- a/lib/classes/binaryAdapter/video/progressive/moovRelocator.class.php
+++ b/lib/classes/binaryAdapter/video/progressive/moovRelocator.class.php
@@ -1,5 +1,5 @@
writeln(file_get_contents(dirname(__FILE__) . '/../../../../AUTHORS'));
+ $output->writeln(file_get_contents(__DIR__ . '/../../../../AUTHORS'));
return;
}
diff --git a/lib/classes/module/console/aboutLicense.class.php b/lib/classes/module/console/aboutLicense.class.php
index 246140dbbc..04c6ccf958 100644
--- a/lib/classes/module/console/aboutLicense.class.php
+++ b/lib/classes/module/console/aboutLicense.class.php
@@ -37,7 +37,7 @@ class module_console_aboutLicense extends Command
public function execute(InputInterface $input, OutputInterface $output)
{
- $output->writeln(file_get_contents(dirname(__FILE__) . '/../../../../LICENSE'));
+ $output->writeln(file_get_contents(__DIR__ . '/../../../../LICENSE'));
return;
}
diff --git a/lib/classes/module/console/schedulerStart.class.php b/lib/classes/module/console/schedulerStart.class.php
index 52afd000be..d0b2591f55 100644
--- a/lib/classes/module/console/schedulerStart.class.php
+++ b/lib/classes/module/console/schedulerStart.class.php
@@ -45,7 +45,7 @@ class module_console_schedulerStart extends Command
throw new RuntimeException('Phraseanet is not set up');
}
- require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
+ require_once __DIR__ . '/../../../../lib/bootstrap.php';
$scheduler = new task_Scheduler();
$scheduler->run($output, true);
diff --git a/lib/classes/module/console/schedulerState.class.php b/lib/classes/module/console/schedulerState.class.php
index 4861e02224..cedf9fc9f1 100644
--- a/lib/classes/module/console/schedulerState.class.php
+++ b/lib/classes/module/console/schedulerState.class.php
@@ -40,7 +40,7 @@ class module_console_schedulerState extends Command
throw new RuntimeException('Phraseanet is not set up');
}
- require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
+ require_once __DIR__ . '/../../../../lib/bootstrap.php';
$appbox = appbox::get_instance();
$task_manager = new task_manager($appbox);
diff --git a/lib/classes/module/console/schedulerStop.class.php b/lib/classes/module/console/schedulerStop.class.php
index b806770dd1..ab487f4157 100644
--- a/lib/classes/module/console/schedulerStop.class.php
+++ b/lib/classes/module/console/schedulerStop.class.php
@@ -40,7 +40,7 @@ class module_console_schedulerStop extends Command
throw new RuntimeException('Phraseanet is not set up');
}
- require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
+ require_once __DIR__ . '/../../../../lib/bootstrap.php';
$appbox = appbox::get_instance();
$task_manager = new task_manager($appbox);
diff --git a/lib/classes/module/console/systemBackupDB.class.php b/lib/classes/module/console/systemBackupDB.class.php
index f477da44c3..6384e76bfc 100644
--- a/lib/classes/module/console/systemBackupDB.class.php
+++ b/lib/classes/module/console/systemBackupDB.class.php
@@ -31,7 +31,7 @@ class module_console_systemBackupDB extends Command
$dir = sprintf(
'%s/config/'
- , dirname(dirname(dirname(dirname(dirname(__FILE__)))))
+ , dirname(dirname(dirname(dirname(__DIR__))))
);
$this->setDescription('Backup Phraseanet Databases');
@@ -48,7 +48,7 @@ class module_console_systemBackupDB extends Command
throw new RuntimeException('Phraseanet is not set up');
}
- require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
+ require_once __DIR__ . '/../../../../lib/bootstrap.php';
$output->write('Phraseanet is going to be backup...', true);
diff --git a/lib/classes/module/console/systemClearCache.class.php b/lib/classes/module/console/systemClearCache.class.php
index 262f20fb83..bb597514da 100644
--- a/lib/classes/module/console/systemClearCache.class.php
+++ b/lib/classes/module/console/systemClearCache.class.php
@@ -44,8 +44,8 @@ class module_console_systemClearCache extends Command
->exclude('.git')
->exclude('.svn')
->in(array(
- dirname(__FILE__) . '/../../../../tmp/cache_minify/'
- , dirname(__FILE__) . '/../../../../tmp/cache_twig/'
+ __DIR__ . '/../../../../tmp/cache_minify/'
+ , __DIR__ . '/../../../../tmp/cache_twig/'
))
;
$count = 1;
@@ -59,8 +59,8 @@ class module_console_systemClearCache extends Command
$finder
->directories()
->in(array(
- dirname(__FILE__) . '/../../../../tmp/cache_minify'
- , dirname(__FILE__) . '/../../../../tmp/cache_twig'
+ __DIR__ . '/../../../../tmp/cache_minify'
+ , __DIR__ . '/../../../../tmp/cache_twig'
))
->exclude('.git')
->exclude('.svn')
diff --git a/lib/classes/module/console/systemTemplateGenerator.class.php b/lib/classes/module/console/systemTemplateGenerator.class.php
index 5ca41ac1ba..9410329704 100644
--- a/lib/classes/module/console/systemTemplateGenerator.class.php
+++ b/lib/classes/module/console/systemTemplateGenerator.class.php
@@ -36,16 +36,16 @@ class module_console_systemTemplateGenerator extends Command
public function execute(InputInterface $input, OutputInterface $output)
{
- require_once dirname(__FILE__) . '/../../../../lib/vendor/Twig/lib/Twig/Autoloader.php';
- require_once dirname(__FILE__) . '/../../../../lib/vendor/Twig-extensions/lib/Twig/Extensions/Autoloader.php';
+ require_once __DIR__ . '/../../../../lib/vendor/Twig/lib/Twig/Autoloader.php';
+ require_once __DIR__ . '/../../../../lib/vendor/Twig-extensions/lib/Twig/Extensions/Autoloader.php';
Twig_Autoloader::register();
Twig_Extensions_Autoloader::register();
- $tplDir = dirname(__FILE__) . '/../../../../templates/';
- $tmpDir = dirname(__FILE__) . '/../../../../tmp/cache_twig/';
+ $tplDir = __DIR__ . '/../../../../templates/';
+ $tmpDir = __DIR__ . '/../../../../tmp/cache_twig/';
$loader = new Twig_Loader_Filesystem($tplDir);
$twig = new Twig_Environment($loader, array(
diff --git a/lib/classes/module/console/systemUpgrade.class.php b/lib/classes/module/console/systemUpgrade.class.php
index 22d62f2a66..b8de9d1b5e 100644
--- a/lib/classes/module/console/systemUpgrade.class.php
+++ b/lib/classes/module/console/systemUpgrade.class.php
@@ -39,9 +39,9 @@ class module_console_systemUpgrade extends Command
if (!setup::is_installed())
{
- if (file_exists(dirname(__FILE__) . "/../../../../config/connexion.inc")
- && !file_exists(dirname(__FILE__) . "/../../../../config/config.inc")
- && file_exists(dirname(__FILE__) . "/../../../../config/_GV.php"))
+ if (file_exists(__DIR__ . "/../../../../config/connexion.inc")
+ && !file_exists(__DIR__ . "/../../../../config/config.inc")
+ && file_exists(__DIR__ . "/../../../../config/_GV.php"))
{
$output->writeln('This version of Phraseanet requires a config/config.inc');
@@ -76,7 +76,7 @@ class module_console_systemUpgrade extends Command
}
- require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
+ require_once __DIR__ . '/../../../../lib/bootstrap.php';
$output->write('Phraseanet is going to be upgraded', true);
$dialog = $this->getHelperSet()->get('dialog');
diff --git a/lib/classes/module/console/tasklist.class.php b/lib/classes/module/console/tasklist.class.php
index 58fd108ed0..91da2498d5 100644
--- a/lib/classes/module/console/tasklist.class.php
+++ b/lib/classes/module/console/tasklist.class.php
@@ -42,7 +42,7 @@ class module_console_tasklist extends Command
throw new RuntimeException('Phraseanet is not set up');
}
- require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
+ require_once __DIR__ . '/../../../../lib/bootstrap.php';
$appbox = appbox::get_instance();
$task_manager = new task_manager($appbox);
diff --git a/lib/classes/module/console/taskrun.class.php b/lib/classes/module/console/taskrun.class.php
index 6e22d6fd24..da62654ed0 100644
--- a/lib/classes/module/console/taskrun.class.php
+++ b/lib/classes/module/console/taskrun.class.php
@@ -50,7 +50,7 @@ class module_console_taskrun extends Command
throw new RuntimeException('Phraseanet is not set up');
}
- require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
+ require_once __DIR__ . '/../../../../lib/bootstrap.php';
$task_id = (int) $input->getArgument('task_id');
diff --git a/lib/classes/patch/320aa.class.php b/lib/classes/patch/320aa.class.php
index a3b28f1fe6..5468abc4d5 100644
--- a/lib/classes/patch/320aa.class.php
+++ b/lib/classes/patch/320aa.class.php
@@ -54,9 +54,9 @@ class patch_320aa implements patchInterface
function apply(base &$appbox)
{
- if(is_file(dirname(__FILE__) . '/../../../config/_GV.php'))
- require dirname(__FILE__) . '/../../../config/_GV.php';
- require dirname(__FILE__) . '/../../../lib/conf.d/_GV_template.inc';
+ if(is_file(__DIR__ . '/../../../config/_GV.php'))
+ require __DIR__ . '/../../../config/_GV.php';
+ require __DIR__ . '/../../../lib/conf.d/_GV_template.inc';
define('GV_STATIC_URL', '');
define('GV_sphinx', false);
diff --git a/lib/classes/phrasea.class.php b/lib/classes/phrasea.class.php
index 70b22feae2..07d05537ce 100644
--- a/lib/classes/phrasea.class.php
+++ b/lib/classes/phrasea.class.php
@@ -105,7 +105,7 @@ class phrasea
public static function start()
{
- require (dirname(__FILE__) . '/../../config/connexion.inc');
+ require (__DIR__ . '/../../config/connexion.inc');
if (!extension_loaded('phrasea2'))
printf("Missing Extension php-phrasea");
@@ -283,7 +283,7 @@ class phrasea
putenv('LANGUAGE=' . $locale . '.' . $codeset);
bind_textdomain_codeset($textdomain, 'UTF-8');
- bindtextdomain($textdomain, dirname(__FILE__) . '/../../locale/');
+ bindtextdomain($textdomain, __DIR__ . '/../../locale/');
setlocale(LC_ALL
, $locale . '.UTF-8'
, $locale . '.UTF8'
@@ -497,7 +497,7 @@ class phrasea
else
{
$request->set_code($code);
- include(dirname(__FILE__) . '/../../www/include/error.php');
+ include(__DIR__ . '/../../www/include/error.php');
}
die();
break;
diff --git a/lib/classes/registry.class.php b/lib/classes/registry.class.php
index e8c13dfd3b..ada342d04d 100644
--- a/lib/classes/registry.class.php
+++ b/lib/classes/registry.class.php
@@ -41,7 +41,7 @@ class registry implements registryInterface
*/
public static function get_instance()
{
- $prefix = crc32(dirname(__FILE__));
+ $prefix = crc32(__DIR__);
if (!self::$_instance instanceof self)
self::$_instance = new self(new cache_opcode_adapter($prefix));
@@ -57,8 +57,8 @@ class registry implements registryInterface
{
$this->cache = $cache;
- require dirname(__FILE__) . '/../../config/config.inc';
- $this->cache->set('GV_RootPath', dirname(dirname(dirname(__FILE__))) . '/');
+ require __DIR__ . '/../../config/config.inc';
+ $this->cache->set('GV_RootPath', dirname(dirname(__DIR__)) . '/');
$this->cache->set('GV_ServerName', p4string::addEndSlash($servername));
$this->cache->set('GV_debug', !!$debug);
$this->cache->set('GV_maintenance', !!$maintenance);
diff --git a/lib/classes/searchEngine/adapter/sphinx/engine.class.php b/lib/classes/searchEngine/adapter/sphinx/engine.class.php
index 29b2c72346..124bb85f12 100644
--- a/lib/classes/searchEngine/adapter/sphinx/engine.class.php
+++ b/lib/classes/searchEngine/adapter/sphinx/engine.class.php
@@ -1,6 +1,6 @@
is_set('GV_timezone'))
@@ -257,12 +257,12 @@ class setup
{
if (system_server::get_platform() == 'WINDOWS')
{
- $exiftool = dirname(dirname(__FILE__)) . '/vendor/exiftool/exiftool.exe';
- $indexer = dirname(dirname(dirname(__FILE__))) . '/bin/phraseanet_indexer.exe';
+ $exiftool = dirname(__DIR__) . '/vendor/exiftool/exiftool.exe';
+ $indexer = dirname(dirname(__DIR__)) . '/bin/phraseanet_indexer.exe';
}
else
{
- $exiftool = dirname(dirname(__FILE__)) . '/vendor/exiftool/exiftool';
+ $exiftool = dirname(__DIR__) . '/vendor/exiftool/exiftool';
$indexer = null;
}
@@ -453,7 +453,7 @@ class setup
public static function check_writability(registryInterface $registry)
{
- $root = p4string::addEndSlash(realpath(dirname(__FILE__) . '/../../'));
+ $root = p4string::addEndSlash(realpath(__DIR__ . '/../../'));
$pathes = array(
$root . 'config',
@@ -765,17 +765,17 @@ class setup
public static function get_config_filepath()
{
- return dirname(__FILE__) . '/../../config/config.inc';
+ return __DIR__ . '/../../config/config.inc';
}
public static function get_connexion_filepath()
{
- return dirname(__FILE__) . '/../../config/connexion.inc';
+ return __DIR__ . '/../../config/connexion.inc';
}
public static function rollback(connection_pdo $conn, connection_pdo $connbas =null)
{
- $structure = simplexml_load_file(dirname(__FILE__) . "/../../lib/conf.d/bases_structure.xml");
+ $structure = simplexml_load_file(__DIR__ . "/../../lib/conf.d/bases_structure.xml");
if (!$structure)
throw new Exception('Unable to load schema');
@@ -814,7 +814,7 @@ class setup
}
}
}
- $connexion = dirname(__FILE__) . "/../../config/connexion.inc";
+ $connexion = __DIR__ . "/../../config/connexion.inc";
if (file_exists($connexion))
unlink($connexion);
diff --git a/lib/classes/sphinx/configuration.class.php b/lib/classes/sphinx/configuration.class.php
index b2d1278466..92d9d43607 100644
--- a/lib/classes/sphinx/configuration.class.php
+++ b/lib/classes/sphinx/configuration.class.php
@@ -37,7 +37,7 @@ class sphinx_configuration
public function get_available_charsets()
{
$available_charsets = array();
- $dir = dirname(__FILE__) . '/charsetTable/';
+ $dir = __DIR__ . '/charsetTable/';
echo $dir;
$registry = registry::get_instance();
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::LEAVES_ONLY) as $file)
diff --git a/lib/classes/task/Scheduler.class.php b/lib/classes/task/Scheduler.class.php
index 782879a89b..14480851f8 100644
--- a/lib/classes/task/Scheduler.class.php
+++ b/lib/classes/task/Scheduler.class.php
@@ -45,14 +45,14 @@ class task_Scheduler
protected static function get_connection()
{
- require dirname(__FILE__) . '/../../../config/connexion.inc';
+ require __DIR__ . '/../../../config/connexion.inc';
return new connection_pdo('appbox', $hostname, $port, $user, $password, $dbname);
}
public function run(OutputInterface $output = null, $log_tasks = true)
{
- require_once dirname(__FILE__) . '/../../bootstrap.php';
+ require_once __DIR__ . '/../../bootstrap.php';
$this->output = $output;
$appbox = appbox::get_instance();
$registry = $appbox->get_registry();
diff --git a/www/admin/adminFeedback.php b/www/admin/adminFeedback.php
index 08f26fbc53..d56108f2ca 100644
--- a/www/admin/adminFeedback.php
+++ b/www/admin/adminFeedback.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, false, 'text/html', 'UTF-8', false);
$request = http_request::getInstance();
diff --git a/www/admin/cgus.php b/www/admin/cgus.php
index 646bf4cc77..a1ebeab16f 100644
--- a/www/admin/cgus.php
+++ b/www/admin/cgus.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/collection.php b/www/admin/collection.php
index 746cc4c67f..c94728f945 100644
--- a/www/admin/collection.php
+++ b/www/admin/collection.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/collorder.php b/www/admin/collorder.php
index bd65b4d4f6..15a35f7430 100644
--- a/www/admin/collorder.php
+++ b/www/admin/collorder.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/database.php b/www/admin/database.php
index f050fbc8e5..7aa0608a4b 100644
--- a/www/admin/database.php
+++ b/www/admin/database.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/databases.php b/www/admin/databases.php
index c203b9f71e..7a1072f574 100644
--- a/www/admin/databases.php
+++ b/www/admin/databases.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$usr_id = $session->get_usr_id();
@@ -97,7 +97,7 @@ phrasea::headers();
{
try
{
- require dirname(__FILE__) . '/../../config/connexion.inc';
+ require __DIR__ . '/../../config/connexion.inc';
$data_template = new system_file($registry->get('GV_RootPath') . 'lib/conf.d/data_templates/' . $parm['new_data_template'] . '.xml');
$connbas = new connection_pdo('databox_creation', $hostname, $port, $user, $password, $parm['new_dbname']);
@@ -159,7 +159,7 @@ phrasea::headers();
{
try
{
- require dirname(__FILE__) . '/../../config/connexion.inc';
+ require __DIR__ . '/../../config/connexion.inc';
$appbox->get_connection()->beginTransaction();
$base = databox::mount($appbox, $hostname, $port, $user, $password, $parm['new_dbname'], $registry);
$base->registerAdmin($user_obj);
diff --git a/www/admin/demand.php b/www/admin/demand.php
index 794ec22250..8dc2af11f8 100644
--- a/www/admin/demand.php
+++ b/www/admin/demand.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/description.php b/www/admin/description.php
index 0900b4d7fe..c46022c05c 100644
--- a/www/admin/description.php
+++ b/www/admin/description.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/getinfousr.php b/www/admin/getinfousr.php
index b77ebb19d3..25f5c47e49 100644
--- a/www/admin/getinfousr.php
+++ b/www/admin/getinfousr.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms("u");
diff --git a/www/admin/global_values.php b/www/admin/global_values.php
index 5e6a4f87ff..b53f037da7 100644
--- a/www/admin/global_values.php
+++ b/www/admin/global_values.php
@@ -22,7 +22,7 @@ require($registry->get('GV_RootPath') . "lib/classes/deprecated/countries.php");
$user = User_Adapter::getInstance($session->get_usr_id(), $appbox);
-require(dirname(__FILE__) . "/../../lib/conf.d/_GV_template.inc");
+require(__DIR__ . "/../../lib/conf.d/_GV_template.inc");
$request = http_request::getInstance();
diff --git a/www/admin/import.php b/www/admin/import.php
index 088273fc66..f6abfb9ffc 100644
--- a/www/admin/import.php
+++ b/www/admin/import.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/import0.php b/www/admin/import0.php
index 203d250d84..65fed1c210 100644
--- a/www/admin/import0.php
+++ b/www/admin/import0.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/index.php b/www/admin/index.php
index 6ae5529090..afbce2d6ff 100644
--- a/www/admin/index.php
+++ b/www/admin/index.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/admin/newcoll.php b/www/admin/newcoll.php
index 55ab6d7ce9..4a5a3e37f2 100644
--- a/www/admin/newcoll.php
+++ b/www/admin/newcoll.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/runscheduler.php b/www/admin/runscheduler.php
index 2b0c9e83bc..e7805ac553 100644
--- a/www/admin/runscheduler.php
+++ b/www/admin/runscheduler.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/sessionwhois.php b/www/admin/sessionwhois.php
index 3e000cf10f..1afa3964f7 100644
--- a/www/admin/sessionwhois.php
+++ b/www/admin/sessionwhois.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
?>
diff --git a/www/admin/showlogtask.php b/www/admin/showlogtask.php
index d9d59e73a2..fbb0d4b8a3 100644
--- a/www/admin/showlogtask.php
+++ b/www/admin/showlogtask.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/sitestruct.php b/www/admin/sitestruct.php
index 6963f31d8c..b326abcb58 100644
--- a/www/admin/sitestruct.php
+++ b/www/admin/sitestruct.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/sphinxconf.php b/www/admin/sphinxconf.php
index 0915ecb535..d05c67db9d 100644
--- a/www/admin/sphinxconf.php
+++ b/www/admin/sphinxconf.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
$request = http_request::getInstance();
diff --git a/www/admin/statbits.php b/www/admin/statbits.php
index 6fc90f1345..86ab9742d1 100644
--- a/www/admin/statbits.php
+++ b/www/admin/statbits.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/structure.php b/www/admin/structure.php
index 3d4ed6fd0a..f3db7c10ed 100644
--- a/www/admin/structure.php
+++ b/www/admin/structure.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/subdefs.php b/www/admin/subdefs.php
index 1cbfb0ce10..7dd77ea4e5 100644
--- a/www/admin/subdefs.php
+++ b/www/admin/subdefs.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/sugval.php b/www/admin/sugval.php
index 756fae64ed..dabe4db13f 100644
--- a/www/admin/sugval.php
+++ b/www/admin/sugval.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/task2.js.php b/www/admin/task2.js.php
index ff72f1a52a..822db2ea28 100644
--- a/www/admin/task2.js.php
+++ b/www/admin/task2.js.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms('tid' // task_id
diff --git a/www/admin/task2.php b/www/admin/task2.php
index 211bb18781..2dea002b6a 100644
--- a/www/admin/task2.php
+++ b/www/admin/task2.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/task2utils.php b/www/admin/task2utils.php
index 9c7b470c03..60ca29801c 100644
--- a/www/admin/task2utils.php
+++ b/www/admin/task2utils.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/admin/taskfacility.php b/www/admin/taskfacility.php
index 26d248e462..1fa49cc287 100644
--- a/www/admin/taskfacility.php
+++ b/www/admin/taskfacility.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(dirname(dirname(__FILE__))) . "/lib/bootstrap.php";
+require_once dirname(dirname(__DIR__)) . "/lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms('cls', 'taskid');
diff --git a/www/admin/taskmanager.php b/www/admin/taskmanager.php
index 2c59dc3b62..4c4ffc7a23 100644
--- a/www/admin/taskmanager.php
+++ b/www/admin/taskmanager.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/api/login/login.php b/www/api/login/login.php
index 65e3d8cbce..b282e2d81a 100644
--- a/www/api/login/login.php
+++ b/www/api/login/login.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
//SPECIAL ZINO
diff --git a/www/api/test.php b/www/api/test.php
index 51aa658d14..15343453b9 100644
--- a/www/api/test.php
+++ b/www/api/test.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/api/test_upl.php b/www/api/test_upl.php
index b3f5d3b541..a1005339ad 100644
--- a/www/api/test_upl.php
+++ b/www/api/test_upl.php
@@ -21,7 +21,7 @@ $session = $appbox->get_session();
get_session();
diff --git a/www/client/baskets.php b/www/client/baskets.php
index 00d37489c5..40384e33f0 100644
--- a/www/client/baskets.php
+++ b/www/client/baskets.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/client/clientFeedBack.php b/www/client/clientFeedBack.php
index c55c87f52b..8389d77a93 100644
--- a/www/client/clientFeedBack.php
+++ b/www/client/clientFeedBack.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/client/index.php b/www/client/index.php
index 6d0c78d655..55e19dfca7 100644
--- a/www/client/index.php
+++ b/www/client/index.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/include/cguUtils.php b/www/include/cguUtils.php
index 1bfadca584..9a67864e96 100644
--- a/www/include/cguUtils.php
+++ b/www/include/cguUtils.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/include/delses.php b/www/include/delses.php
index bb49af90aa..c88a732502 100644
--- a/www/include/delses.php
+++ b/www/include/delses.php
@@ -17,7 +17,7 @@
*/
ignore_user_abort(true);
set_time_limit(0);
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$request = http_request::getInstance();
diff --git a/www/include/download.php b/www/include/download.php
index 59ccfce6b8..7404d422aa 100644
--- a/www/include/download.php
+++ b/www/include/download.php
@@ -16,7 +16,7 @@
* @link www.phraseanet.com
*/
/* @var $Core \Alchemy\Phrasea\Core */
-$Core = require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/include/download_anonymous.php b/www/include/download_anonymous.php
index 0b863296c6..03c19ffbe5 100644
--- a/www/include/download_anonymous.php
+++ b/www/include/download_anonymous.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
diff --git a/www/include/download_prepare.exe.php b/www/include/download_prepare.exe.php
index 43a1bd792a..501f5f3a27 100644
--- a/www/include/download_prepare.exe.php
+++ b/www/include/download_prepare.exe.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$gatekeeper = gatekeeper::getInstance();
$gatekeeper->require_session();
diff --git a/www/include/download_prepare.php b/www/include/download_prepare.php
index 758b8a13da..6703f9e7fa 100644
--- a/www/include/download_prepare.php
+++ b/www/include/download_prepare.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$registry = $appbox->get_registry();
$session = $appbox->get_session();
diff --git a/www/include/error.php b/www/include/error.php
index 0aacee20c4..4a88bb52e2 100644
--- a/www/include/error.php
+++ b/www/include/error.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-include_once dirname(__FILE__) . '/../../lib/bootstrap.php';
+include_once __DIR__ . '/../../lib/bootstrap.php';
$appbox = appbox::get_instance(registry::get_instance());
$session = $appbox->get_session();
diff --git a/www/include/geonames.feedback.php b/www/include/geonames.feedback.php
index 5098b429b3..a4cffb346d 100644
--- a/www/include/geonames.feedback.php
+++ b/www/include/geonames.feedback.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-include(dirname(__FILE__) . '/../../lib/bootstrap.php');
+include(__DIR__ . '/../../lib/bootstrap.php');
$output = '';
$request = http_request::getInstance();
diff --git a/www/include/minify/builder/index.php b/www/include/minify/builder/index.php
index bb5e000ad3..b2d28cc784 100644
--- a/www/include/minify/builder/index.php
+++ b/www/include/minify/builder/index.php
@@ -8,7 +8,7 @@ if (phpversion() < 5) {
$encodeOutput = (function_exists('gzdeflate')
&& !ini_get('zlib.output_compression'));
-require dirname(__FILE__) . '/../config.php';
+require __DIR__ . '/../config.php';
if (! $min_enableBuilder) {
header('Location: /');
@@ -162,14 +162,14 @@ $serveOpts = array(
,'lastModifiedTime' => max(
// regenerate cache if either of these change
filemtime(__FILE__)
- ,filemtime(dirname(__FILE__) . '/../config.php')
+ ,filemtime(__DIR__ . '/../config.php')
)
,'minifyAll' => true
,'encodeOutput' => $encodeOutput
);
ob_end_clean();
-set_include_path(dirname(__FILE__) . '/../lib' . PATH_SEPARATOR . get_include_path());
+set_include_path(__DIR__ . '/../lib' . PATH_SEPARATOR . get_include_path());
require 'Minify.php';
diff --git a/www/include/minify/builder/ocCheck.php b/www/include/minify/builder/ocCheck.php
index 001c012ce4..e78c13a123 100644
--- a/www/include/minify/builder/ocCheck.php
+++ b/www/include/minify/builder/ocCheck.php
@@ -8,7 +8,7 @@
$_oc = ini_get('zlib.output_compression');
// allow access only if builder is enabled
-require dirname(__FILE__) . '/../config.php';
+require __DIR__ . '/../config.php';
if (! $min_enableBuilder) {
header('Location: /');
exit();
diff --git a/www/include/minify/config.php b/www/include/minify/config.php
index 32ba786f6a..b40ee41f4c 100644
--- a/www/include/minify/config.php
+++ b/www/include/minify/config.php
@@ -150,7 +150,7 @@ $min_uploaderHoursBehind = 0;
* Path to Minify's lib folder. If you happen to move it, change
* this accordingly.
*/
-$min_libPath = dirname(__FILE__) . '/lib';
+$min_libPath = __DIR__ . '/lib';
$min_cachePath = dirname( __FILE__ ) . '/../../../tmp/cache_minify';
diff --git a/www/include/minify/index.php b/www/include/minify/index.php
index acc09b970d..8135ca21bd 100644
--- a/www/include/minify/index.php
+++ b/www/include/minify/index.php
@@ -7,7 +7,7 @@
* @package Minify
*/
-define('MINIFY_MIN_DIR', dirname(__FILE__));
+define('MINIFY_MIN_DIR', __DIR__);
// load config
require MINIFY_MIN_DIR . '/config.php';
diff --git a/www/include/minify/utils.php b/www/include/minify/utils.php
index ca4abbaf53..c07dd54841 100644
--- a/www/include/minify/utils.php
+++ b/www/include/minify/utils.php
@@ -34,7 +34,7 @@ function Minify_groupUri($group, $forceAmpersand = false)
: "/?g={$group}";
return _Minify_getBuild($group)->uri(
- '/' . basename(dirname(__FILE__)) . $path
+ '/' . basename(__DIR__) . $path
,$forceAmpersand
);
}
@@ -83,7 +83,7 @@ function _Minify_getBuild($group)
static $builds = array();
static $gc = false;
if (false === $gc) {
- $gc = (require dirname(__FILE__) . '/groupsConfig.php');
+ $gc = (require __DIR__ . '/groupsConfig.php');
}
if (! isset($builds[$group])) {
$builds[$group] = new Minify_Build($gc[$group]);
diff --git a/www/include/multiexports.php b/www/include/multiexports.php
index 976f0378f8..f8752a2c9e 100644
--- a/www/include/multiexports.php
+++ b/www/include/multiexports.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/include/printpage.php b/www/include/printpage.php
index bf5bf09e0f..aa2c7093e3 100644
--- a/www/include/printpage.php
+++ b/www/include/printpage.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/include/printpage_pdf.php b/www/include/printpage_pdf.php
index 7f3172e932..b2805576ba 100644
--- a/www/include/printpage_pdf.php
+++ b/www/include/printpage_pdf.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/include/sendmailpage.php b/www/include/sendmailpage.php
index 5fd1c8840c..819742c169 100644
--- a/www/include/sendmailpage.php
+++ b/www/include/sendmailpage.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . '/../../lib/bootstrap.php';
+require_once __DIR__ . '/../../lib/bootstrap.php';
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/include/updses.php b/www/include/updses.php
index 78462fea10..cae2db95b1 100644
--- a/www/include/updses.php
+++ b/www/include/updses.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/login/account.php b/www/login/account.php
index 5c3e60e9f8..f4ff4226cd 100644
--- a/www/login/account.php
+++ b/www/login/account.php
@@ -14,9 +14,9 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
-require_once dirname(__FILE__) . "/../../lib/classes/API/OAuth2/Autoloader.class.php";
+require_once __DIR__ . "/../../lib/classes/API/OAuth2/Autoloader.class.php";
API_OAuth2_Autoloader::register();
diff --git a/www/login/authenticate.php b/www/login/authenticate.php
index f05b9a4191..69e543ac31 100644
--- a/www/login/authenticate.php
+++ b/www/login/authenticate.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/login/forgotpwd.php b/www/login/forgotpwd.php
index 215119acc7..30073345bd 100644
--- a/www/login/forgotpwd.php
+++ b/www/login/forgotpwd.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/login/index.php b/www/login/index.php
index 26b17b9f24..d3546df22a 100644
--- a/www/login/index.php
+++ b/www/login/index.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/login/logout.php b/www/login/logout.php
index b336f4dacc..da46015a5b 100644
--- a/www/login/logout.php
+++ b/www/login/logout.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
diff --git a/www/login/register-confirm.php b/www/login/register-confirm.php
index 5bc5b93475..30070add09 100644
--- a/www/login/register-confirm.php
+++ b/www/login/register-confirm.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$request = http_request::getInstance();
diff --git a/www/login/register.php b/www/login/register.php
index cf354cefe7..c25f542ba4 100644
--- a/www/login/register.php
+++ b/www/login/register.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/login/reset-email.php b/www/login/reset-email.php
index f57157b38a..1f462a83a9 100644
--- a/www/login/reset-email.php
+++ b/www/login/reset-email.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
@@ -133,7 +133,7 @@ if (isset($parm['form_password']) && isset($parm['form_email']) && isset($parm['
if (str_replace(array("\r\n", "\r", "\n", "\t"), '_', trim($parm['form_email'])) == $parm['form_email_confirm'])
{
- require_once(dirname(__FILE__) . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
+ require_once(__DIR__ . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
if (PHPMailer::ValidateAddress($parm['form_email']))
{
if (mail::reset_email($parm['form_email'], $session->get_usr_id()) === true)
diff --git a/www/login/reset-password.php b/www/login/reset-password.php
index fd58df4adc..30f6aeb40e 100644
--- a/www/login/reset-password.php
+++ b/www/login/reset-password.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/login/sendmail-confirm.php b/www/login/sendmail-confirm.php
index 363b5fba9d..b2ecbe96d3 100644
--- a/www/login/sendmail-confirm.php
+++ b/www/login/sendmail-confirm.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_post_datas('usr_id');
diff --git a/www/prod/answer.php b/www/prod/answer.php
index 41ba1d37f9..43f44978ac 100644
--- a/www/prod/answer.php
+++ b/www/prod/answer.php
@@ -18,7 +18,7 @@
* @see http://developer.phraseanet.com
*
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/chghddocument.php b/www/prod/chghddocument.php
index 81872143cf..4748020fe3 100644
--- a/www/prod/chghddocument.php
+++ b/www/prod/chghddocument.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/chgstatus.php b/www/prod/chgstatus.php
index 22427b8c97..7bacc3fd7b 100644
--- a/www/prod/chgstatus.php
+++ b/www/prod/chgstatus.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/chgthumb.php b/www/prod/chgthumb.php
index 1cd0b33892..94ce850028 100644
--- a/www/prod/chgthumb.php
+++ b/www/prod/chgthumb.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/chgtype.php b/www/prod/chgtype.php
index 5ad7fbc29b..2509af63d3 100644
--- a/www/prod/chgtype.php
+++ b/www/prod/chgtype.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
phrasea::headers();
diff --git a/www/prod/docfunction.php b/www/prod/docfunction.php
index 779cc599f2..aa1042992c 100644
--- a/www/prod/docfunction.php
+++ b/www/prod/docfunction.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$Core = bootstrap::getCore();
$em = $Core->getEntityManager();
diff --git a/www/prod/imgfunction.php b/www/prod/imgfunction.php
index 5b7ee5a2fc..2a0f906272 100644
--- a/www/prod/imgfunction.php
+++ b/www/prod/imgfunction.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-$Core = require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/newimg.php b/www/prod/newimg.php
index 18dee3fe2c..a8e0087a86 100644
--- a/www/prod/newimg.php
+++ b/www/prod/newimg.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
phrasea::headers();
diff --git a/www/prod/prodFeedBack.php b/www/prod/prodFeedBack.php
index 59bb6f6ce9..cc76544a0f 100644
--- a/www/prod/prodFeedBack.php
+++ b/www/prod/prodFeedBack.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/publish.php b/www/prod/publish.php
index 43ceb8076b..55da404848 100644
--- a/www/prod/publish.php
+++ b/www/prod/publish.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$message = '';
try
diff --git a/www/prod/push.feedback.php b/www/prod/push.feedback.php
index a77fe208d3..cd1135acec 100644
--- a/www/prod/push.feedback.php
+++ b/www/prod/push.feedback.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/pushdoc.php b/www/prod/pushdoc.php
index b197a6844e..42a5c546e7 100644
--- a/www/prod/pushdoc.php
+++ b/www/prod/pushdoc.php
@@ -15,7 +15,7 @@
* @link www.phraseanet.com
*/
define('ZFONT', 'freesans');
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/prod/rotate.php b/www/prod/rotate.php
index 4e67a9c3d3..9d6c158438 100644
--- a/www/prod/rotate.php
+++ b/www/prod/rotate.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/prod/share.php b/www/prod/share.php
index 01e7f6245b..54731e8709 100644
--- a/www/prod/share.php
+++ b/www/prod/share.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers();
$appbox = appbox::get_instance();
$registry = $appbox->get_registry();
diff --git a/www/report/ajax_chart.php b/www/report/ajax_chart.php
index fb172be261..074c3c42dc 100644
--- a/www/report/ajax_chart.php
+++ b/www/report/ajax_chart.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$request = http_request::getInstance();
diff --git a/www/report/ajax_info_dashboard.php b/www/report/ajax_info_dashboard.php
index f1d7b108b7..bab9720ece 100644
--- a/www/report/ajax_info_dashboard.php
+++ b/www/report/ajax_info_dashboard.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$request = http_request::getInstance();
diff --git a/www/report/ajax_liste_base.php b/www/report/ajax_liste_base.php
index 3d1eed98e3..65fffcbd0f 100644
--- a/www/report/ajax_liste_base.php
+++ b/www/report/ajax_liste_base.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms(
diff --git a/www/report/ajax_table_content.php b/www/report/ajax_table_content.php
index d1e197e3b5..9c831bfaba 100644
--- a/www/report/ajax_table_content.php
+++ b/www/report/ajax_table_content.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
/* get all the post parameters from report.php's form */
diff --git a/www/report/charts/drawLinePlotWithLegend.php b/www/report/charts/drawLinePlotWithLegend.php
index a764f4f636..54ae2c8356 100644
--- a/www/report/charts/drawLinePlotWithLegend.php
+++ b/www/report/charts/drawLinePlotWithLegend.php
@@ -1,8 +1,8 @@
get_parms("value", 'legend', 'absc');
diff --git a/www/report/charts/draw_pie.php b/www/report/charts/draw_pie.php
index dcc6d8e570..5ac850c623 100644
--- a/www/report/charts/draw_pie.php
+++ b/www/report/charts/draw_pie.php
@@ -1,8 +1,8 @@
get_parms("value", 'legend', 'title');
diff --git a/www/report/export_csv.php b/www/report/export_csv.php
index 65c3f67351..7ad3a4d7bf 100644
--- a/www/report/export_csv.php
+++ b/www/report/export_csv.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms('name', 'csv');
diff --git a/www/report/index.php b/www/report/index.php
index 1db463852e..47394970ea 100644
--- a/www/report/index.php
+++ b/www/report/index.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/report/report.php b/www/report/report.php
index 1369a3aef9..7d5bbfb979 100644
--- a/www/report/report.php
+++ b/www/report/report.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$registry = registry::get_instance();
diff --git a/www/report/tab.php b/www/report/tab.php
index 7da2bbb74b..b6352c6d34 100644
--- a/www/report/tab.php
+++ b/www/report/tab.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
/* get all the post parameters from report.php's form */
diff --git a/www/setup/installer.php b/www/setup/installer.php
index 309847ec72..45a8007272 100644
--- a/www/setup/installer.php
+++ b/www/setup/installer.php
@@ -17,7 +17,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . '/../../lib/classes/bootstrap.class.php';
+require_once __DIR__ . '/../../lib/classes/bootstrap.class.php';
bootstrap::register_autoloads();
bootstrap::set_php_configuration();
diff --git a/www/thesaurus2/accept.php b/www/thesaurus2/accept.php
index 1a05eae6b1..f8b3a849e5 100644
--- a/www/thesaurus2/accept.php
+++ b/www/thesaurus2/accept.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
diff --git a/www/thesaurus2/export_text.php b/www/thesaurus2/export_text.php
index b74a58cef8..281caab130 100644
--- a/www/thesaurus2/export_text.php
+++ b/www/thesaurus2/export_text.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/export_text_dlg.php b/www/thesaurus2/export_text_dlg.php
index 932008f1a3..df0df49320 100644
--- a/www/thesaurus2/export_text_dlg.php
+++ b/www/thesaurus2/export_text_dlg.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/export_topics.php b/www/thesaurus2/export_topics.php
index 808aff4d70..e3d396440b 100644
--- a/www/thesaurus2/export_topics.php
+++ b/www/thesaurus2/export_topics.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
diff --git a/www/thesaurus2/export_topics_dlg.php b/www/thesaurus2/export_topics_dlg.php
index 0ea89aed32..b599457e79 100644
--- a/www/thesaurus2/export_topics_dlg.php
+++ b/www/thesaurus2/export_topics_dlg.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/import.php b/www/thesaurus2/import.php
index d48a1e094d..f2de0b25a7 100644
--- a/www/thesaurus2/import.php
+++ b/www/thesaurus2/import.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/import_dlg.php b/www/thesaurus2/import_dlg.php
index 80beeefb95..166d8ad6ed 100644
--- a/www/thesaurus2/import_dlg.php
+++ b/www/thesaurus2/import_dlg.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
phrasea::headers(200, true);
diff --git a/www/thesaurus2/index.php b/www/thesaurus2/index.php
index db79401005..7b00fe45f7 100644
--- a/www/thesaurus2/index.php
+++ b/www/thesaurus2/index.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();
diff --git a/www/thesaurus2/linkfield.php b/www/thesaurus2/linkfield.php
index 3467a9a91a..f8518718b9 100644
--- a/www/thesaurus2/linkfield.php
+++ b/www/thesaurus2/linkfield.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
diff --git a/www/thesaurus2/linkfield2.php b/www/thesaurus2/linkfield2.php
index 0dc349a0f6..f84c76ecbe 100644
--- a/www/thesaurus2/linkfield2.php
+++ b/www/thesaurus2/linkfield2.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/linkfield3.php b/www/thesaurus2/linkfield3.php
index 0dcd1abd5f..ab32570ba3 100644
--- a/www/thesaurus2/linkfield3.php
+++ b/www/thesaurus2/linkfield3.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/loadth.php b/www/thesaurus2/loadth.php
index 4817286cec..3ce20dedbb 100644
--- a/www/thesaurus2/loadth.php
+++ b/www/thesaurus2/loadth.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . '/../../lib/bootstrap.php';
+require_once __DIR__ . '/../../lib/bootstrap.php';
$registry = registry::get_instance();
phrasea::headers();
$debug = false;
diff --git a/www/thesaurus2/newsy_dlg.php b/www/thesaurus2/newsy_dlg.php
index e8c0f2a1c2..20de190d9a 100644
--- a/www/thesaurus2/newsy_dlg.php
+++ b/www/thesaurus2/newsy_dlg.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/newterm.php b/www/thesaurus2/newterm.php
index 417286df87..5ac3ae4217 100644
--- a/www/thesaurus2/newterm.php
+++ b/www/thesaurus2/newterm.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
diff --git a/www/thesaurus2/properties.php b/www/thesaurus2/properties.php
index ffb6dc825b..6821d2cf07 100644
--- a/www/thesaurus2/properties.php
+++ b/www/thesaurus2/properties.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/replace.php b/www/thesaurus2/replace.php
index 58b3965949..11383977e3 100644
--- a/www/thesaurus2/replace.php
+++ b/www/thesaurus2/replace.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/replace2.php b/www/thesaurus2/replace2.php
index ff7b124550..f99b2c99b0 100644
--- a/www/thesaurus2/replace2.php
+++ b/www/thesaurus2/replace2.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/replace3.php b/www/thesaurus2/replace3.php
index 52de9a4ecc..c74cdd514e 100644
--- a/www/thesaurus2/replace3.php
+++ b/www/thesaurus2/replace3.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/rescan.php b/www/thesaurus2/rescan.php
index b6248a4ee4..7142412813 100644
--- a/www/thesaurus2/rescan.php
+++ b/www/thesaurus2/rescan.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/rescan_dlg.php b/www/thesaurus2/rescan_dlg.php
index aee025d95c..a07a3a4c7d 100644
--- a/www/thesaurus2/rescan_dlg.php
+++ b/www/thesaurus2/rescan_dlg.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/search.php b/www/thesaurus2/search.php
index 041e7feb55..1ecebcdc07 100644
--- a/www/thesaurus2/search.php
+++ b/www/thesaurus2/search.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers(200, true);
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/thesaurus.php b/www/thesaurus2/thesaurus.php
index 9ec547e088..bfc84b797d 100644
--- a/www/thesaurus2/thesaurus.php
+++ b/www/thesaurus2/thesaurus.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
phrasea::headers();
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/thesaurus2/xmlhttp/accept.x.php b/www/thesaurus2/xmlhttp/accept.x.php
index 194e17bd8b..b84889a37c 100644
--- a/www/thesaurus2/xmlhttp/accept.x.php
+++ b/www/thesaurus2/xmlhttp/accept.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/acceptcandidates.x.php b/www/thesaurus2/xmlhttp/acceptcandidates.x.php
index 536456ac14..2b4f6d6c58 100644
--- a/www/thesaurus2/xmlhttp/acceptcandidates.x.php
+++ b/www/thesaurus2/xmlhttp/acceptcandidates.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/changesylng.x.php b/www/thesaurus2/xmlhttp/changesylng.x.php
index 47450fbe7d..c8b64ddecf 100644
--- a/www/thesaurus2/xmlhttp/changesylng.x.php
+++ b/www/thesaurus2/xmlhttp/changesylng.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/changesypos.x.php b/www/thesaurus2/xmlhttp/changesypos.x.php
index 8c7ba2c0d3..793d5fcdde 100644
--- a/www/thesaurus2/xmlhttp/changesypos.x.php
+++ b/www/thesaurus2/xmlhttp/changesypos.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/deletenohits.x.php b/www/thesaurus2/xmlhttp/deletenohits.x.php
index 3895ab8b8c..b48a8bb6be 100644
--- a/www/thesaurus2/xmlhttp/deletenohits.x.php
+++ b/www/thesaurus2/xmlhttp/deletenohits.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
$request = http_request::getInstance();
diff --git a/www/thesaurus2/xmlhttp/delsy.x.php b/www/thesaurus2/xmlhttp/delsy.x.php
index 70e46cf55c..5501328d80 100644
--- a/www/thesaurus2/xmlhttp/delsy.x.php
+++ b/www/thesaurus2/xmlhttp/delsy.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
require("../xmlhttp.php");
diff --git a/www/thesaurus2/xmlhttp/delts.x.php b/www/thesaurus2/xmlhttp/delts.x.php
index 33d17c7ea6..628210e29d 100644
--- a/www/thesaurus2/xmlhttp/delts.x.php
+++ b/www/thesaurus2/xmlhttp/delts.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
$request = http_request::getInstance();
diff --git a/www/thesaurus2/xmlhttp/gethtmlbranch.x.php b/www/thesaurus2/xmlhttp/gethtmlbranch.x.php
index c8b304d3b8..aaf1cdbeb3 100644
--- a/www/thesaurus2/xmlhttp/gethtmlbranch.x.php
+++ b/www/thesaurus2/xmlhttp/gethtmlbranch.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/getsy.x.php b/www/thesaurus2/xmlhttp/getsy.x.php
index 314d00447b..207c6177f4 100644
--- a/www/thesaurus2/xmlhttp/getsy.x.php
+++ b/www/thesaurus2/xmlhttp/getsy.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/getterm.x.php b/www/thesaurus2/xmlhttp/getterm.x.php
index 8baf058e6a..2a49f36cb5 100644
--- a/www/thesaurus2/xmlhttp/getterm.x.php
+++ b/www/thesaurus2/xmlhttp/getterm.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/killterm.x.php b/www/thesaurus2/xmlhttp/killterm.x.php
index 681b21ce23..e8112ec89b 100644
--- a/www/thesaurus2/xmlhttp/killterm.x.php
+++ b/www/thesaurus2/xmlhttp/killterm.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
require("../xmlhttp.php");
diff --git a/www/thesaurus2/xmlhttp/newsy.x.php b/www/thesaurus2/xmlhttp/newsy.x.php
index 7295bf8c98..62c84d63ee 100644
--- a/www/thesaurus2/xmlhttp/newsy.x.php
+++ b/www/thesaurus2/xmlhttp/newsy.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/newts.x.php b/www/thesaurus2/xmlhttp/newts.x.php
index 1cd95ddabf..39fc05b91a 100644
--- a/www/thesaurus2/xmlhttp/newts.x.php
+++ b/www/thesaurus2/xmlhttp/newts.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/openbranches.x.php b/www/thesaurus2/xmlhttp/openbranches.x.php
index a91e24716f..b0d024dc14 100644
--- a/www/thesaurus2/xmlhttp/openbranches.x.php
+++ b/www/thesaurus2/xmlhttp/openbranches.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/reject.x.php b/www/thesaurus2/xmlhttp/reject.x.php
index 57b341ebd7..fbdbe9f899 100644
--- a/www/thesaurus2/xmlhttp/reject.x.php
+++ b/www/thesaurus2/xmlhttp/reject.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
require("../xmlhttp.php");
diff --git a/www/thesaurus2/xmlhttp/searchcandidate.x.php b/www/thesaurus2/xmlhttp/searchcandidate.x.php
index 6b51c10e7a..cdb90ec346 100644
--- a/www/thesaurus2/xmlhttp/searchcandidate.x.php
+++ b/www/thesaurus2/xmlhttp/searchcandidate.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../../lib/bootstrap.php";
+require_once __DIR__ . "/../../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/thesaurus2/xmlhttp/searchnohits.x.php b/www/thesaurus2/xmlhttp/searchnohits.x.php
index 0f27c9ed0b..49754f3a55 100644
--- a/www/thesaurus2/xmlhttp/searchnohits.x.php
+++ b/www/thesaurus2/xmlhttp/searchnohits.x.php
@@ -1,6 +1,6 @@
get_session();
$registry = $appbox->get_registry();
diff --git a/www/upload/lazaret_image.php b/www/upload/lazaret_image.php
index 8df9c736f1..7325858a02 100644
--- a/www/upload/lazaret_image.php
+++ b/www/upload/lazaret_image.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms('id');
diff --git a/www/upload/upload.php b/www/upload/upload.php
index 627de1f1db..383e65e618 100644
--- a/www/upload/upload.php
+++ b/www/upload/upload.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . '/../../lib/classes/http/request.class.php';
+require_once __DIR__ . '/../../lib/classes/http/request.class.php';
$request = http_request::getInstance();
$parm = $request->get_parms('session', 'coll', 'status');
@@ -25,7 +25,7 @@ if ($parm["session"])
session_id($parm["session"]);
}
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/upload/uploadFeedback.php b/www/upload/uploadFeedback.php
index 734b64ad8b..1e09c4e7c1 100644
--- a/www/upload/uploadFeedback.php
+++ b/www/upload/uploadFeedback.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms('action', 'from_id', 'to_id', 'actions', 'id');
diff --git a/www/xmlhttp/acceptcandidates.j.php b/www/xmlhttp/acceptcandidates.j.php
index 6353c71a27..5ddb543fd4 100644
--- a/www/xmlhttp/acceptcandidates.j.php
+++ b/www/xmlhttp/acceptcandidates.j.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/xmlhttp/checkcandidatetarget.j.php b/www/xmlhttp/checkcandidatetarget.j.php
index 7b2406792c..8bb9d1c9c3 100644
--- a/www/xmlhttp/checkcandidatetarget.j.php
+++ b/www/xmlhttp/checkcandidatetarget.j.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/xmlhttp/deletecandidates.j.php b/www/xmlhttp/deletecandidates.j.php
index aec0cd1a3b..42065c4e4e 100644
--- a/www/xmlhttp/deletecandidates.j.php
+++ b/www/xmlhttp/deletecandidates.j.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
$request = http_request::getInstance();
diff --git a/www/xmlhttp/editing_presets.j.php b/www/xmlhttp/editing_presets.j.php
index d8be3d741c..fa302fb6c1 100644
--- a/www/xmlhttp/editing_presets.j.php
+++ b/www/xmlhttp/editing_presets.j.php
@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/xmlhttp/getsy_prod.x.php b/www/xmlhttp/getsy_prod.x.php
index a7f9418435..a5150ceab6 100644
--- a/www/xmlhttp/getsy_prod.x.php
+++ b/www/xmlhttp/getsy_prod.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
$request = http_request::getInstance();
diff --git a/www/xmlhttp/getterm_prod.h.php b/www/xmlhttp/getterm_prod.h.php
index 8ed668a4c7..3de36ff492 100644
--- a/www/xmlhttp/getterm_prod.h.php
+++ b/www/xmlhttp/getterm_prod.h.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
$request = http_request::getInstance();
diff --git a/www/xmlhttp/getterm_prod.x.php b/www/xmlhttp/getterm_prod.x.php
index 77ce661f71..a92f4764dd 100644
--- a/www/xmlhttp/getterm_prod.x.php
+++ b/www/xmlhttp/getterm_prod.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms(
"bid"
diff --git a/www/xmlhttp/openbranch_prod.j.php b/www/xmlhttp/openbranch_prod.j.php
index a7ccf7c12e..587b06d066 100644
--- a/www/xmlhttp/openbranch_prod.j.php
+++ b/www/xmlhttp/openbranch_prod.j.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
diff --git a/www/xmlhttp/openbranches_prod.h.php b/www/xmlhttp/openbranches_prod.h.php
index 5c91109a18..642224d104 100644
--- a/www/xmlhttp/openbranches_prod.h.php
+++ b/www/xmlhttp/openbranches_prod.h.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/xmlhttp/openbranches_prod.x.php b/www/xmlhttp/openbranches_prod.x.php
index ee6130178f..9664ddb6fe 100644
--- a/www/xmlhttp/openbranches_prod.x.php
+++ b/www/xmlhttp/openbranches_prod.x.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
diff --git a/www/xmlhttp/replacecandidate.j.php b/www/xmlhttp/replacecandidate.j.php
index 95bd8fdb68..52952e2162 100644
--- a/www/xmlhttp/replacecandidate.j.php
+++ b/www/xmlhttp/replacecandidate.j.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$registry = registry::get_instance();
$request = http_request::getInstance();
diff --git a/www/xmlhttp/search_th_term_prod.j.php b/www/xmlhttp/search_th_term_prod.j.php
index 4524ef9aea..870d7a2287 100644
--- a/www/xmlhttp/search_th_term_prod.j.php
+++ b/www/xmlhttp/search_th_term_prod.j.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-require_once dirname(__FILE__) . "/../../lib/bootstrap.php";
+require_once __DIR__ . "/../../lib/bootstrap.php";
$appbox = appbox::get_instance();
$session = $appbox->get_session();
$registry = $appbox->get_registry();