Skip to content

Commit

Permalink
修复了几个重要的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yidashi committed Jun 8, 2016
1 parent f4f6061 commit ac137f4
Show file tree
Hide file tree
Showing 18 changed files with 576 additions and 609 deletions.
1 change: 1 addition & 0 deletions api/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO
Empty file modified api/web/.htaccess
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions common/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
Yii::setAlias('console', dirname(dirname(__DIR__)) . '/console');
Yii::setAlias('tests', dirname(dirname(__DIR__)) . '/tests');
Yii::setAlias('runnerScript', dirname(dirname(dirname(__FILE__))) .'/yii');
Yii::setAlias('staticroot', dirname(dirname(__DIR__)) . '/static');
Yii::setAlias('staticroot', dirname(dirname(__DIR__)) . '/web/static');
if (YII_ENV_PROD) {
Yii::setAlias('static', 'http:https://image.51siyuan.cn');
} else {
Yii::setAlias('static', 'http:https://127.0.0.1/yii/static');
Yii::setAlias('static', 'http:https://127.0.0.1/yii/web/static');
}
5 changes: 4 additions & 1 deletion common/helpers/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@

class Url extends \yii\helpers\Url
{
public static function img($src)
public static function img($src, $type = 'avatar')
{
if (empty($src)) {
$src = \Yii::getAlias('@static') . '/default/' . $type . '.png';
}
$src = Url::to($src);
if (strpos($src, 'http') === false) {
$src = \Yii::getAlias('@static') . '/' . $src;
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
"yiisoft/yii2-faker": "*",
"jamband/yii2-schemadump": "*"
},
"config": {
"process-timeout": 1800
Expand Down
100 changes: 48 additions & 52 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions console/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'console\controllers',
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'templateFile' => '@jamband/schemadump/template.php',
],
'schemadump' => [
'class' => 'jamband\schemadump\SchemaDumpController',
],
],
'components' => [
'log' => [
'targets' => [
Expand Down
Loading

0 comments on commit ac137f4

Please sign in to comment.