X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FActivity%2FSelector%2FSearch.php;h=c46c439b4678dc5332eec44c346c9a9be35f5556;hb=32864ccf6ecdf9927f12f57a693ef0f22d9ccfb4;hp=22b240f30844edeb9d2b02d62886fae2184c9f64;hpb=a969ba2b3fc64eebf12a98e3bfc69212d832ee19;p=civicrm-core.git diff --git a/CRM/Activity/Selector/Search.php b/CRM/Activity/Selector/Search.php index 22b240f308..c46c439b46 100644 --- a/CRM/Activity/Selector/Search.php +++ b/CRM/Activity/Selector/Search.php @@ -1,7 +1,7 @@ _queryParams = &$queryParams; @@ -188,27 +186,22 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM ); $this->_query->_distinctComponentClause = '( civicrm_activity.id )'; $this->_query->_groupByComponentClause = " GROUP BY civicrm_activity.id "; - //CRM_Core_Error::debug( $this->_query ); exit(); } - //end of constructor /** - * getter for array of the parameters required for creating pager. + * Getter for array of the parameters required for creating pager. * * @param $action - * @param $params + * @param array $params * - * @internal param $ - * @access public */ - function getPagerParams($action, &$params) { + public function getPagerParams($action, &$params) { $params['status'] = ts('Activities %%StatusMessage%%'); $params['csvString'] = NULL; $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT; $params['buttonTop'] = 'PagerTopButton'; $params['buttonBottom'] = 'PagerBottomButton'; } - //end of function /** * Returns total number of rows for the query. @@ -216,9 +209,8 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM * @param * * @return int Total number of rows - * @access public */ - function getTotalCount($action) { + public function getTotalCount($action) { return $this->_query->searchQuery(0, 0, NULL, TRUE, FALSE, FALSE, FALSE, @@ -228,17 +220,22 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM } /** - * returns all the rows in the given offset and rowCount + * Returns all the rows in the given offset and rowCount * - * @param enum $action the action being performed - * @param int $offset the row number to start from - * @param int $rowCount the number of rows to return - * @param string $sort the sql string that describes the sort order - * @param enum $output what should the result set include (web/email/csv) + * @param enum $action + * The action being performed. + * @param int $offset + * The row number to start from. + * @param int $rowCount + * The number of rows to return. + * @param string $sort + * The sql string that describes the sort order. + * @param enum $output + * What should the result set include (web/email/csv). * * @return array rows in the given offset and rowCount */ - function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { + public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { $result = $this->_query->searchQuery( $offset, $rowCount, $sort, FALSE, FALSE, @@ -290,8 +287,7 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM if ($this->_context == 'search') { $row['checkbox'] = CRM_Core_Form::CB_PREFIX . $result->activity_id; } - $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ? - $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id + $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ? $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id ); $accessMailingReport = FALSE; $activityTypeId = $row['activity_type_id']; @@ -362,23 +358,22 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM } /** - * * @return array $qill which contains an array of strings - * @access public */ public function getQILL() { return $this->_query->qill(); } /** - * returns the column headers as an array of tuples: + * Returns the column headers as an array of tuples: * (name, sortName (key to the sort array)) * - * @param string $action the action being performed - * @param enum $output what should the result set include (web/email/csv) + * @param string $action + * The action being performed. + * @param enum $output + * What should the result set include (web/email/csv). * * @return array the column headers that need to be displayed - * @access public */ public function &getColumnHeaders($action = NULL, $output = NULL) { if (!isset(self::$_columnHeaders)) { @@ -421,27 +416,26 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM /** * @return mixed */ - function alphabetQuery() { + public function alphabetQuery() { return $this->_query->searchQuery(NULL, NULL, NULL, FALSE, FALSE, TRUE); } /** * @return string */ - function &getQuery() { + public function &getQuery() { return $this->_query; } /** - * name of export file. + * Name of export file. * - * @param string $output type of output + * @param string $output + * Type of output. * * @return string name of the file */ - function getExportFileName($output = 'csv') { + public function getExportFileName($output = 'csv') { return ts('CiviCRM Activity Search'); } } -//end of class -