diff --git a/AnimateAsset.php b/AnimateAsset.php index 31675f12..d3ccc465 100644 --- a/AnimateAsset.php +++ b/AnimateAsset.php @@ -1,6 +1,6 @@ **Important: If you install version 3.x, please see [this readme](https://github.com/mdmsoft/yii2-admin/blob/3.master/README.md#upgrade-from-2x).** - - -- [Change Log](CHANGELOG.md). -- [Authorization Guide](http://www.yiiframework.com/doc-2.0/guide-security-authorization.html). Important, read this first before you continue. -- [Basic Configuration](docs/guide/configuration.md) -- [Basic Usage](docs/guide/basic-usage.md). -- [User Management](docs/guide/user-management.md). -- [Using Menu](docs/guide/using-menu.md). -- [Api](https://mdmsoft.github.io/yii2-admin/index.html). +> **Important: This project fork from [mdmsoft/yii2-admin](https://github.com/mdmsoft/yii2-admin) please check document from here.** Installation ------------ @@ -35,41 +16,5 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require mdmsoft/yii2-admin "~1.0" -or -php composer.phar require mdmsoft/yii2-admin "~2.0" -``` - -or for the dev-master - -``` -php composer.phar require mdmsoft/yii2-admin "2.x-dev" -``` - -Or, you may add - -``` -"mdmsoft/yii2-admin": "~2.0" +php composer.phar require reza2ebt/yii2-admin "~1.0" ``` - -to the require section of your `composer.json` file and execute `php composer.phar update`. - -### Install From the Archive - -Download the latest release from here [releases](https://github.com/mdmsoft/yii2-admin/releases), then extract it to your project. -In your application config, add the path alias for this extension. - -```php -return [ - ... - 'aliases' => [ - '@mdm/admin' => 'path/to/your/extracted', - // for example: '@mdm/admin' => '@app/extensions/mdm/yii2-admin-2.0.0', - ... - ] -]; -``` - -[**More...**](docs/guide/configuration.md) - -[screenshots](https://goo.gl/r8RizT) diff --git a/components/AccessControl.php b/components/AccessControl.php index c73b1f80..2640e6a5 100644 --- a/components/AccessControl.php +++ b/components/AccessControl.php @@ -1,6 +1,6 @@ load($params); if ($this->validate()) { - $search = mb_strtolower(trim((string)$this->name)); - $desc = mb_strtolower(trim((string)$this->description)); + $search = $desc = null; + + if (null !== $this->name && trim($this->name) != '') { + $search = mb_strtolower(trim($this->name)); + } + if (null !== $this->description && trim($this->description) != '') { + $desc = mb_strtolower(trim($this->description)); + } + $ruleName = $this->ruleName; foreach ($items as $name => $item) { $f = (empty($search) || mb_strpos(mb_strtolower($item->name), $search) !== false) && diff --git a/models/searchs/BizRule.php b/models/searchs/BizRule.php index c31b3d3a..00bf6361 100644 --- a/models/searchs/BizRule.php +++ b/models/searchs/BizRule.php @@ -1,6 +1,6 @@