Commit 0df677a0 by Carsten Brandt

Merge branch 'master' of github.com:yiisoft/yii2

* 'master' of github.com:yiisoft/yii2: Fixes #699: fixed wrong usage of self and static Fixed wrong links
parents 676b3669 d0ddb566
......@@ -460,7 +460,7 @@ of the rule class, you need to respect this hierarchy as well. That is why when
the `execute()` method will return true if the user group is either 1 or 2 (meaning the user is in either "admin"
group or "author" group).
Next, configure `authManager` by listing the two roles in [[yii\rbac\ManagerInterface::defaultRoles]]:
Next, configure `authManager` by listing the two roles in [[yii\rbac\BaseManager::$defaultRoles]]:
```php
return [
......
......@@ -54,7 +54,7 @@ class Widget extends Component implements ViewContextInterface
$config['class'] = get_called_class();
/** @var Widget $widget */
$widget = Yii::createObject($config);
self::$stack[] = $widget;
static::$stack[] = $widget;
return $widget;
}
......@@ -67,8 +67,8 @@ class Widget extends Component implements ViewContextInterface
*/
public static function end()
{
if (!empty(self::$stack)) {
$widget = array_pop(self::$stack);
if (!empty(static::$stack)) {
$widget = array_pop(static::$stack);
if (get_class($widget) === get_called_class()) {
echo $widget->run();
return $widget;
......@@ -108,7 +108,7 @@ class Widget extends Component implements ViewContextInterface
public function getId($autoGenerate = true)
{
if ($autoGenerate && $this->_id === null) {
$this->_id = self::$autoIdPrefix . self::$counter++;
$this->_id = static::$autoIdPrefix . static::$counter++;
}
return $this->_id;
......
......@@ -98,9 +98,9 @@ class GettextMessageSource extends MessageSource
{
$messageFile = Yii::getAlias($this->basePath) . '/' . $language . '/' . $this->catalog;
if ($this->useMoFile) {
$messageFile .= static::MO_FILE_EXT;
$messageFile .= self::MO_FILE_EXT;
} else {
$messageFile .= static::PO_FILE_EXT;
$messageFile .= self::PO_FILE_EXT;
}
return $messageFile;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment