public $_whereClauses = array();
public $_havingClauses = array();
+ /**
+ * dashBoardRowCount Dashboard row count
+ * @var Integer
+ */
+ public $_dashBoardRowCount;
+
/**
* Is this being called without a form controller (ie. the report is being render outside the normal form
* - e.g the api is retrieving the rows
'Boolean',
CRM_Core_DAO::$_nullObject
);
+
+ $this->_dashBoardRowCount =
+ CRM_Utils_Request::retrieve(
+ 'rowCount',
+ 'Integer',
+ CRM_Core_DAO::$_nullObject
+ );
$this->_section = CRM_Utils_Request::retrieve('section', 'Integer', CRM_Core_DAO::$_nullObject);
function limit($rowCount = self::ROW_COUNT_LIMIT) {
// lets do the pager if in html mode
$this->_limit = NULL;
+
+ // CRM-14115, over-ride row count if rowCount is specified in URL
+ if ($this->_dashBoardRowCount) {
+ $rowCount = $this->_dashBoardRowCount;
+ }
if ($this->_outputMode == 'html' || $this->_outputMode == 'group') {
$this->_select = str_ireplace('SELECT ', 'SELECT SQL_CALC_FOUND_ROWS ', $this->_select);
}
function setPager($rowCount = self::ROW_COUNT_LIMIT) {
+
+ // CRM-14115, over-ride row count if rowCount is specified in URL
+ if ($this->_dashBoardRowCount) {
+ $rowCount = $this->_dashBoardRowCount;
+ }
+
if ($this->_limit && ($this->_limit != '')) {
$sql = "SELECT FOUND_ROWS();";
$this->_rowsFound = CRM_Core_DAO::singleValueQuery($sql);