提交 db7ef964 编写于 作者: T Terry

getTags function修复

上级 0d87e859
......@@ -49,19 +49,20 @@ class UrlKey extends Service
}
public function getTags($translate = true){
if (!$this->_urlKeyTags) {
$key = $translate ? 1 : 2;
if (!$this->_urlKeyTags[$key]) {
if (is_array($this->urlKeyTags)) {
foreach ($this->urlKeyTags as $k => $v) {
if ($translate) {
$this->_urlKeyTags[$k] = Yii::$service->page->translate->__($v);
$this->_urlKeyTags[$key][$k] = Yii::$service->page->translate->__($v);
} else {
$this->_urlKeyTags[$k] = $v;
$this->_urlKeyTags[$key][$k] = $v;
}
}
}
}
return $this->_urlKeyTags;
return $this->_urlKeyTags[$key];
}
public function getPrimaryKey()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册