diff --git a/bin/console b/bin/console index e8eb5cf321..48ac46beb3 100755 --- a/bin/console +++ b/bin/console @@ -24,8 +24,10 @@ use Alchemy\Phrasea\Command\RecordAdd; use Alchemy\Phrasea\Command\RescanTechnicalDatas; use Alchemy\Phrasea\Command\UpgradeDBDatas; use Alchemy\Phrasea\CLI; +use Alchemy\Phrasea\Command\Plugin\AddPlugin; +use Alchemy\Phrasea\Command\Plugin\RemovePlugin; -require_once __DIR__ . '/../vendor/autoload.php'; +require_once __DIR__ . '/../lib/autoload.php'; try { $app = new CLI(" @@ -90,6 +92,9 @@ try { $app->command(new RescanTechnicalDatas('records:rescan-technical-datas')); $app->command(new BuildMissingSubdefs('records:build-missing-subdefs')); + $app->command(new AddPlugin()); + $app->command(new RemovePlugin()); + $result_code = is_int($app->run()) ? : 1; } catch (\Exception $e) { $result_code = 1; diff --git a/bin/developer b/bin/developer index 83213f9c72..2e185d3269 100755 --- a/bin/developer +++ b/bin/developer @@ -34,7 +34,7 @@ use Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand; use Doctrine\ORM\Tools\Console\Command\RunDqlCommand; use Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand; -require_once __DIR__ . '/../plugins/autoload.php'; +require_once __DIR__ . '/../lib/autoload.php'; try { $cli = new CLI(" diff --git a/lib/autoload.php b/lib/autoload.php new file mode 100644 index 0000000000..b62f6f9c5c --- /dev/null +++ b/lib/autoload.php @@ -0,0 +1,3 @@ +add('Alchemy\\Tests', __DIR__); $loader->add('', __DIR__ . "/classes"); diff --git a/www/api.php b/www/api.php index a0159a2140..2f87fc6873 100644 --- a/www/api.php +++ b/www/api.php @@ -14,7 +14,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -require_once __DIR__ . '/../vendor/autoload.php'; +require_once __DIR__ . '/../lib/autoload.php'; $app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Api.php'; diff --git a/www/index.php b/www/index.php index a8794dd050..e9c76071b0 100644 --- a/www/index.php +++ b/www/index.php @@ -14,7 +14,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -require_once __DIR__ . "/../vendor/autoload.php"; +require_once __DIR__ . "/../lib/autoload.php"; $environment = 'prod'; $app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Root.php'; diff --git a/www/index_dev.php b/www/index_dev.php index d4064c8b54..54a8856d07 100644 --- a/www/index_dev.php +++ b/www/index_dev.php @@ -14,7 +14,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -require_once __DIR__ . "/../vendor/autoload.php"; +require_once __DIR__ . "/../lib/autoload.php"; $environment = 'dev'; $app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Root.php';