Browse Source

ensure parameter types in baselistview message

fixes #1072
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
3b05e71561
  1. 2
      framework/yii/data/ActiveDataProvider.php
  2. 2
      framework/yii/widgets/BaseListView.php

2
framework/yii/data/ActiveDataProvider.php

@ -158,7 +158,7 @@ class ActiveDataProvider extends BaseDataProvider
throw new InvalidConfigException('The "query" property must be an instance of Query or its subclass.');
}
$query = clone $this->query;
return $query->limit(-1)->offset(-1)->count('*', $this->db);
return (int) $query->limit(-1)->offset(-1)->count('*', $this->db);
}
/**

2
framework/yii/widgets/BaseListView.php

@ -139,7 +139,7 @@ abstract class BaseListView extends Widget
$pageCount = $pagination->pageCount;
if (($summaryContent = $this->summary) === null) {
$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>';
}
} else {

Loading…
Cancel
Save