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'], 'preload' => ['log'],
'controllerNamespace' => 'backend\controllers', 'controllerNamespace' => 'backend\controllers',
'modules' => [], 'modules' => [],
'extensions' => require(__DIR__ . '/../../vendor/yii-extensions.php'), 'extensions' => require(__DIR__ . '/../../vendor/yiisoft/extensions.php'),
'components' => [ 'components' => [
'request' => [ 'request' => [
'enableCsrfValidation' => true, 'enableCsrfValidation' => true,

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

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

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

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

2
apps/basic/config/console.php

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

2
apps/basic/config/web.php

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

3
extensions/composer/Plugin.php

@ -26,8 +26,9 @@ class Plugin implements PluginInterface
{ {
$installer = new Installer($io, $composer); $installer = new Installer($io, $composer);
$composer->getInstallationManager()->addInstaller($installer); $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)) { if (!is_file($file)) {
@mkdir(dirname($file));
file_put_contents($file, "<?php\nreturn [];\n"); file_put_contents($file, "<?php\nreturn [];\n");
} }
} }

Loading…
Cancel
Save