mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Removing dirname(__FILE__)
This commit is contained in:
@@ -37,7 +37,7 @@ class module_console_aboutAuthors extends Command
|
||||
|
||||
public function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$output->writeln(file_get_contents(dirname(__FILE__) . '/../../../../AUTHORS'));
|
||||
$output->writeln(file_get_contents(__DIR__ . '/../../../../AUTHORS'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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')
|
||||
|
@@ -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(
|
||||
|
@@ -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');
|
||||
|
@@ -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);
|
||||
|
@@ -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');
|
||||
|
||||
|
Reference in New Issue
Block a user