Browse Source

fixed extension list file location.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
3caf59b1bf
  1. 2
      apps/advanced/backend/config/main.php
  2. 2
      apps/advanced/console/config/main.php
  3. 2
      apps/advanced/frontend/config/main.php
  4. 2
      apps/basic/config/console.php
  5. 2
      apps/basic/config/web.php
  6. 3
      extensions/composer/Plugin.php

2
apps/advanced/backend/config/main.php

@ -15,7 +15,7 @@ return [
'preload' => ['log'],
'controllerNamespace' => 'backend\controllers',
'modules' => [],
'extensions' => require(__DIR__ . '/../../vendor/yii-extensions.php'),
'extensions' => require(__DIR__ . '/../../vendor/yiisoft/extensions.php'),
'components' => [
'request' => [
'enableCsrfValidation' => true,

2
apps/advanced/console/config/main.php

@ -15,7 +15,7 @@ return [
'controllerNamespace' => 'console\controllers',
'modules' => [
],
'extensions' => require(__DIR__ . '/../../vendor/yii-extensions.php'),
'extensions' => require(__DIR__ . '/../../vendor/yiisoft/extensions.php'),
'components' => [
'db' => $params['components.db'],
'cache' => $params['components.cache'],

2
apps/advanced/frontend/config/main.php

@ -16,7 +16,7 @@ return [
'modules' => [
'gii' => 'yii\gii\Module'
],
'extensions' => require(__DIR__ . '/../../vendor/yii-extensions.php'),
'extensions' => require(__DIR__ . '/../../vendor/yiisoft/extensions.php'),
'components' => [
'request' => [
'enableCsrfValidation' => true,

2
apps/basic/config/console.php

@ -6,7 +6,7 @@ return [
'preload' => ['log'],
'controllerPath' => dirname(__DIR__) . '/commands',
'controllerNamespace' => 'app\commands',
'extensions' => require(__DIR__ . '/../vendor/yii-extensions.php'),
'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',

2
apps/basic/config/web.php

@ -3,7 +3,7 @@ $params = require(__DIR__ . '/params.php');
$config = [
'id' => 'bootstrap',
'basePath' => dirname(__DIR__),
'extensions' => require(__DIR__ . '/../vendor/yii-extensions.php'),
'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
'components' => [
'request' => [
'enableCsrfValidation' => true,

3
extensions/composer/Plugin.php

@ -26,8 +26,9 @@ class Plugin implements PluginInterface
{
$installer = new Installer($io, $composer);
$composer->getInstallationManager()->addInstaller($installer);
$file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yii-extensions.php';
$file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yiisoft/extensions.php';
if (!is_file($file)) {
@mkdir(dirname($file));
file_put_contents($file, "<?php\nreturn [];\n");
}
}

Loading…
Cancel
Save