Page MenuHomeIn-Portal Phabricator

D228.diff
No OneTemporary

File Metadata

Created
Sat, Apr 19, 7:32 PM

D228.diff

Index: branches/5.2.x/core/kernel/db/db_tag_processor.php
===================================================================
--- branches/5.2.x/core/kernel/db/db_tag_processor.php
+++ branches/5.2.x/core/kernel/db/db_tag_processor.php
@@ -2032,6 +2032,9 @@
case 'total':
return $object->GetRecordsCount(false);
+ case 'selected':
+ return $object->GetSelectedCount();
+
case 'from':
return $object->GetRecordsCount() ? $object->GetOffset() + 1 : 0; //0-based
@@ -2222,6 +2225,20 @@
}
/**
+ * Returns selected records count.
+ *
+ * @param array $params Tag params.
+ *
+ * @return string
+ */
+ protected function SelectedRecords(array $params)
+ {
+ $list =& $this->GetList($params);
+
+ return $list->GetSelectedCount();
+ }
+
+ /**
* Range filter field name
*
* @param Array $params
Index: branches/5.2.x/core/kernel/db/dblist.php
===================================================================
--- branches/5.2.x/core/kernel/db/dblist.php
+++ branches/5.2.x/core/kernel/db/dblist.php
@@ -454,6 +454,8 @@
*/
public function GetSelectedCount()
{
+ $this->Query();
+
return $this->SelectedCount;
}

Event Timeline