Commit 3b05e715 by Carsten Brandt

ensure parameter types in baselistview message

fixes #1072
parent c62e0cbb
...@@ -158,7 +158,7 @@ class ActiveDataProvider extends BaseDataProvider ...@@ -158,7 +158,7 @@ class ActiveDataProvider extends BaseDataProvider
throw new InvalidConfigException('The "query" property must be an instance of Query or its subclass.'); throw new InvalidConfigException('The "query" property must be an instance of Query or its subclass.');
} }
$query = clone $this->query; $query = clone $this->query;
return $query->limit(-1)->offset(-1)->count('*', $this->db); return (int) $query->limit(-1)->offset(-1)->count('*', $this->db);
} }
/** /**
......
...@@ -139,7 +139,7 @@ abstract class BaseListView extends Widget ...@@ -139,7 +139,7 @@ abstract class BaseListView extends Widget
$pageCount = $pagination->pageCount; $pageCount = $pagination->pageCount;
if (($summaryContent = $this->summary) === null) { if (($summaryContent = $this->summary) === null) {
$summaryContent = '<div class="summary">' $summaryContent = '<div class="summary">'
. Yii::t('yii', 'Showing <b>{totalCount, plural, =0{0} other{{begin}-{end}}}</b> of <b>{totalCount}</b> {totalCount, plural, one{item} other{items}}.') . Yii::t('yii', 'Showing <b>{totalCount, plural, =0{0} other{{begin, number, integer}-{end, number, integer}}}</b> of <b>{totalCount, number, integer}</b> {totalCount, plural, one{item} other{items}}.')
. '</div>'; . '</div>';
} }
} else { } else {
......
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