From a1a55b6119f4e059a332ae3074f676bd13817dd3 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 24 May 2014 15:44:30 +1200 Subject: [PATCH] tools - add missing comment blocks --- tools/CRM/Auction/BAO/Auction.php | 4 + tools/CRM/Auction/BAO/Item.php | 4 + tools/CRM/Auction/Config.php | 4 + tools/CRM/Auction/Form/ItemAccount.php | 9 ++ tools/CRM/Auction/Form/SearchAuction.php | 13 +++ tools/CRM/Auction/Form/SearchItem.php | 13 +++ tools/CRM/Auction/Info.php | 52 +++++++++ tools/CRM/Auction/Page/Item.php | 15 +++ tools/CRM/Auction/Page/Manage.php | 15 +++ tools/CRM/Auction/Page/ManageItem.php | 17 ++- tools/CRM/Touchstone/Config.php | 4 + tools/CRM/Touchstone/Info.php | 52 +++++++++ tools/bin/scripts/ImportTags.php | 17 +++ tools/bin/scripts/NormalizePhone.php | 10 ++ tools/bin/scripts/cli.php | 8 ++ tools/bin/scripts/updateNameCache.php | 7 ++ .../ccrm_extensionvalidation.module | 102 ++++++++++++++---- .../civicrm_regsite/civicrm_regsite.module | 52 +++++++++ tools/drupal/modules/extdir/extdir.pages.inc | 26 ++++- .../multicurrency/multicurrency.module | 27 +++++ .../org.civicrm.angularex/angularex.php | 5 +- .../CRM/Demoqueue/Page/DemoQueueDone.php | 3 + .../api/v3/MultisiteDomain/Create.php | 5 +- .../org.civicrm.multisite/multisite.civix.php | 3 + .../GoogleCheckout.php | 23 ++++ .../GoogleIPN.php | 20 +++- .../Google/demo/responsehandlerdemo.php | 12 ++- .../packages/Google/library/googlecart.php | 70 ++++++++++-- .../packages/Google/library/googleitem.php | 22 +++- .../library/googlemerchantcalculations.php | 8 +- .../Google/library/googleresponse.php | 86 ++++++++++++++- .../packages/Google/library/googleresult.php | 48 ++++++++- .../Google/library/googleshipping.php | 33 +++++- .../packages/Google/library/googletaxrule.php | 28 +++-- .../Google/library/googletaxtable.php | 11 +- .../library/xml-processing/xmlbuilder.php | 29 ++++- .../library/xml-processing/xmlparser.php | 41 +++++-- .../Baykeeper.php | 49 ++++++--- .../org.civicrm.report.grant/Grant.php | 18 +++- .../ActivitySearch.php | 60 +++++++++-- .../org.civicrm.search.basic/Basic.php | 32 ++++++ .../MultiValue.php | 41 +++++++ .../clickatell.civix.php | 3 + .../org_civicrm_sms_clickatell.php | 13 +++ tools/scripts/solr/createSolrJSON.php | 50 ++++++++- tools/scripts/solr/createSolrXML.php | 23 +++- tools/scripts/solr/createSyncJSON.php | 71 +++++++++++- tools/sites/stats/graphs.php | 10 ++ 48 files changed, 1162 insertions(+), 106 deletions(-) diff --git a/tools/CRM/Auction/BAO/Auction.php b/tools/CRM/Auction/BAO/Auction.php index 1477ba3170..fa00ed08d2 100644 --- a/tools/CRM/Auction/BAO/Auction.php +++ b/tools/CRM/Auction/BAO/Auction.php @@ -35,6 +35,10 @@ require_once 'CRM/Auction/DAO/Auction.php'; + +/** + * Class CRM_Auction_BAO_Auction + */ class CRM_Auction_BAO_Auction extends CRM_Auction_DAO_Auction { /** diff --git a/tools/CRM/Auction/BAO/Item.php b/tools/CRM/Auction/BAO/Item.php index 0e9f14460e..fd194b7a48 100644 --- a/tools/CRM/Auction/BAO/Item.php +++ b/tools/CRM/Auction/BAO/Item.php @@ -35,6 +35,10 @@ require_once 'CRM/Auction/DAO/Auction.php'; + +/** + * Class CRM_Auction_BAO_Item + */ class CRM_Auction_BAO_Item extends CRM_Auction_DAO_Auction { /** diff --git a/tools/CRM/Auction/Config.php b/tools/CRM/Auction/Config.php index 7115ea07f8..b5c12d46fa 100644 --- a/tools/CRM/Auction/Config.php +++ b/tools/CRM/Auction/Config.php @@ -37,5 +37,9 @@ */ require_once 'CRM/Core/Component/Config.php'; + +/** + * Class CRM_Auction_Config + */ class CRM_Auction_Config extends CRM_Core_Component_Config {} diff --git a/tools/CRM/Auction/Form/ItemAccount.php b/tools/CRM/Auction/Form/ItemAccount.php index 14a38394eb..971fdb12e5 100644 --- a/tools/CRM/Auction/Form/ItemAccount.php +++ b/tools/CRM/Auction/Form/ItemAccount.php @@ -74,6 +74,15 @@ class CRM_Auction_Form_ItemAccount extends CRM_Core_Form { $this->assign('displayRecent', FALSE); } + /** + * This virtual function is used to set the default values of + * various form elements + * + * access public + * + * @return array reference to the array of default values + * + */ function setDefaultValues() { if (!$this->_donorID) { return; diff --git a/tools/CRM/Auction/Form/SearchAuction.php b/tools/CRM/Auction/Form/SearchAuction.php index 519e8bdeb2..03bfdd8603 100644 --- a/tools/CRM/Auction/Form/SearchAuction.php +++ b/tools/CRM/Auction/Form/SearchAuction.php @@ -35,7 +35,20 @@ require_once 'CRM/Core/Form.php'; require_once 'CRM/Core/OptionGroup.php'; + +/** + * Class CRM_Auction_Form_SearchAuction + */ class CRM_Auction_Form_SearchAuction extends CRM_Core_Form { + /** + * This virtual function is used to set the default values of + * various form elements + * + * access public + * + * @return array reference to the array of default values + * + */ function setDefaultValues() { $defaults = array(); $defaults['auctionsByDates'] = 0; diff --git a/tools/CRM/Auction/Form/SearchItem.php b/tools/CRM/Auction/Form/SearchItem.php index da126f72d4..11787635ec 100644 --- a/tools/CRM/Auction/Form/SearchItem.php +++ b/tools/CRM/Auction/Form/SearchItem.php @@ -35,7 +35,20 @@ require_once 'CRM/Core/Form.php'; require_once 'CRM/Core/OptionGroup.php'; + +/** + * Class CRM_Auction_Form_SearchItem + */ class CRM_Auction_Form_SearchItem extends CRM_Core_Form { + /** + * This virtual function is used to set the default values of + * various form elements + * + * access public + * + * @return array reference to the array of default values + * + */ function setDefaultValues() { $defaults = array(); $defaults['auctionsByDates'] = 0; diff --git a/tools/CRM/Auction/Info.php b/tools/CRM/Auction/Info.php index 4f3974fea2..a9767e482e 100644 --- a/tools/CRM/Auction/Info.php +++ b/tools/CRM/Auction/Info.php @@ -44,6 +44,15 @@ class CRM_Auction_Info extends CRM_Core_Component_Info { protected $keyword = 'auction'; // docs inherited from interface + /** + * Provides base information about the component. + * Needs to be implemented in component's information + * class. + * + * @return array collection of required component settings + * @access public + * + */ public function getInfo() { return array('name' => 'CiviAuction', 'translatedName' => ts('CiviAuction'), @@ -55,6 +64,9 @@ class CRM_Auction_Info extends CRM_Core_Component_Info { // docs inherited from interface + /** + * @return array + */ public function getPermissions() { return array('access CiviAuction', 'add auction items', @@ -65,6 +77,15 @@ class CRM_Auction_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about user dashboard element + * offered by this component. + * + * @return array|null collection of required dashboard settings, + * null if no element offered + * @access public + * + */ public function getUserDashboardElement() { return array('name' => ts('Auctions'), 'title' => ts('Your Winning Auction Item(s)'), @@ -74,6 +95,15 @@ class CRM_Auction_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about user dashboard element + * offered by this component. + * + * @return array|null collection of required dashboard settings, + * null if no element offered + * @access public + * + */ public function registerTab() { return array('title' => ts('Auctions'), 'id' => 'auction', @@ -83,6 +113,15 @@ class CRM_Auction_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about advanced search pane + * offered by this component. + * + * @return array|null collection of required pane settings, + * null if no element offered + * @access public + * + */ public function registerAdvancedSearchPane() { return array('title' => ts('Auctions'), 'weight' => 40, @@ -90,12 +129,25 @@ class CRM_Auction_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides potential activity types that this + * component might want to register in activity history. + * Needs to be implemented in component's information + * class. + * + * @return array|null collection of activity types + * @access public + * + */ public function getActivityTypes() { $types = array(); return $types; } // add shortcut to Create New + /** + * @param $shortCuts + */ public function creatNewShortcut(&$shortCuts) {} } diff --git a/tools/CRM/Auction/Page/Item.php b/tools/CRM/Auction/Page/Item.php index 7a243d199c..18b01587a5 100644 --- a/tools/CRM/Auction/Page/Item.php +++ b/tools/CRM/Auction/Page/Item.php @@ -199,6 +199,13 @@ class CRM_Auction_Page_Item extends CRM_Core_Page { $form->run(); } + /** + * @param $params + * @param bool $sortBy + * @param $force + * + * @return int|string + */ function whereClause(&$params, $sortBy = TRUE, $force) { $values = array(); $clauses = array(); @@ -238,6 +245,10 @@ class CRM_Auction_Page_Item extends CRM_Core_Page { return implode(' AND ', $clauses); } + /** + * @param $whereClause + * @param $whereParams + */ function pager($whereClause, $whereParams) { require_once 'CRM/Utils/Pager.php'; @@ -261,6 +272,10 @@ SELECT count(id) $this->assign_by_ref('pager', $this->_pager); } + /** + * @param $whereClause + * @param $whereParams + */ function pagerAtoZ($whereClause, $whereParams) { require_once 'CRM/Utils/PagerAToZ.php'; diff --git a/tools/CRM/Auction/Page/Manage.php b/tools/CRM/Auction/Page/Manage.php index 82d1b1c64b..1e2262fefd 100644 --- a/tools/CRM/Auction/Page/Manage.php +++ b/tools/CRM/Auction/Page/Manage.php @@ -260,6 +260,13 @@ ORDER BY start_date desc $form->run(); } + /** + * @param $params + * @param bool $sortBy + * @param $force + * + * @return int|string + */ function whereClause(&$params, $sortBy = TRUE, $force) { $values = array(); $clauses = array(); @@ -299,6 +306,10 @@ ORDER BY start_date desc return implode(' AND ', $clauses); } + /** + * @param $whereClause + * @param $whereParams + */ function pager($whereClause, $whereParams) { require_once 'CRM/Utils/Pager.php'; @@ -322,6 +333,10 @@ SELECT count(id) $this->assign_by_ref('pager', $this->_pager); } + /** + * @param $whereClause + * @param $whereParams + */ function pagerAtoZ($whereClause, $whereParams) { require_once 'CRM/Utils/PagerAToZ.php'; diff --git a/tools/CRM/Auction/Page/ManageItem.php b/tools/CRM/Auction/Page/ManageItem.php index cd75c1c9f8..4810e46e10 100644 --- a/tools/CRM/Auction/Page/ManageItem.php +++ b/tools/CRM/Auction/Page/ManageItem.php @@ -226,7 +226,7 @@ class CRM_Auction_Page_ManageItem extends CRM_Core_Page { $query = " SELECT i.*, c.display_name as donorName - FROM civicrm_auction_item i, + FROM civicrm_auction_item i, civicrm_contact c WHERE $whereClause AND auction_id = {$this->_aid} @@ -293,6 +293,13 @@ class CRM_Auction_Page_ManageItem extends CRM_Core_Page { $form->run(); } + /** + * @param $params + * @param bool $sortBy + * @param $force + * + * @return int|string + */ function whereClause(&$params, $sortBy = TRUE, $force) { $values = array(); $clauses = array(); @@ -332,6 +339,10 @@ class CRM_Auction_Page_ManageItem extends CRM_Core_Page { return implode(' AND ', $clauses); } + /** + * @param $whereClause + * @param $whereParams + */ function pager($whereClause, $whereParams) { require_once 'CRM/Utils/Pager.php'; @@ -355,6 +366,10 @@ SELECT count(id) $this->assign_by_ref('pager', $this->_pager); } + /** + * @param $whereClause + * @param $whereParams + */ function pagerAtoZ($whereClause, $whereParams) { require_once 'CRM/Utils/PagerAToZ.php'; diff --git a/tools/CRM/Touchstone/Config.php b/tools/CRM/Touchstone/Config.php index a0cfc49958..b95cfb062d 100644 --- a/tools/CRM/Touchstone/Config.php +++ b/tools/CRM/Touchstone/Config.php @@ -38,5 +38,9 @@ */ require_once 'CRM/Core/Component/Config.php'; + +/** + * Class CRM_Touchstone_Config + */ class CRM_Touchstone_Config extends CRM_Core_Component_Config {} diff --git a/tools/CRM/Touchstone/Info.php b/tools/CRM/Touchstone/Info.php index 4299c9ce81..9b492440d9 100644 --- a/tools/CRM/Touchstone/Info.php +++ b/tools/CRM/Touchstone/Info.php @@ -45,6 +45,15 @@ class CRM_Touchstone_Info extends CRM_Core_Component_Info { protected $keyword = 'touchstone'; // docs inherited from interface + /** + * Provides base information about the component. + * Needs to be implemented in component's information + * class. + * + * @return array collection of required component settings + * @access public + * + */ public function getInfo() { return array('name' => 'CiviTouchstone', 'translatedName' => ts('CiviTouchstone'), @@ -54,11 +63,23 @@ class CRM_Touchstone_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function getPermissions() { return array('access CiviTouchstone'); } // docs inherited from interface + /** + * Provides information about user dashboard element + * offered by this component. + * + * @return array|null collection of required dashboard settings, + * null if no element offered + * @access public + * + */ public function getUserDashboardElement() { return array('name' => ts('Touchstone'), 'title' => ts('Your Touchstone'), @@ -68,6 +89,15 @@ class CRM_Touchstone_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about user dashboard element + * offered by this component. + * + * @return array|null collection of required dashboard settings, + * null if no element offered + * @access public + * + */ public function registerTab() { return array('title' => ts('Touchstone'), 'url' => 'touchstone', @@ -76,6 +106,15 @@ class CRM_Touchstone_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about advanced search pane + * offered by this component. + * + * @return array|null collection of required pane settings, + * null if no element offered + * @access public + * + */ public function registerAdvancedSearchPane() { return array('title' => ts('Touchstone'), 'weight' => 25, @@ -83,11 +122,24 @@ class CRM_Touchstone_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides potential activity types that this + * component might want to register in activity history. + * Needs to be implemented in component's information + * class. + * + * @return array|null collection of activity types + * @access public + * + */ public function getActivityTypes() { return NULL; } // add shortcut to Create New + /** + * @param $shortCuts + */ public function creatNewShortcut(&$shortCuts) {} } diff --git a/tools/bin/scripts/ImportTags.php b/tools/bin/scripts/ImportTags.php index 02bda1784c..cce3c6691b 100644 --- a/tools/bin/scripts/ImportTags.php +++ b/tools/bin/scripts/ImportTags.php @@ -27,7 +27,14 @@ require_once ('bin/cli.php'); require_once 'CRM/Core/BAO/Tag.php'; + +/** + * Class tagsImporter + */ class tagsImporter extends civicrm_cli { + /** + * constructor + */ function __construct() { parent::__construct(); if (sizeof($this->args) != 1) { @@ -53,6 +60,11 @@ class tagsImporter extends civicrm_cli { return; } + /** + * @param $param + * + * @return mixed + */ function addTag($param) { if (array_key_exists($param['name'], $this->tags)) { echo "\n- exists already: " . $param['name']; @@ -76,6 +88,11 @@ class tagsImporter extends civicrm_cli { } /* return a params as expected */ + /** + * @param $data + * + * @return mixed + */ function convertLine($data) { /* [0] => parent tag name diff --git a/tools/bin/scripts/NormalizePhone.php b/tools/bin/scripts/NormalizePhone.php index e91c29b04b..11358dac7c 100644 --- a/tools/bin/scripts/NormalizePhone.php +++ b/tools/bin/scripts/NormalizePhone.php @@ -84,6 +84,10 @@ function run() { processPhones($config, $prefix); } +/** + * @param $config + * @param null $prefix + */ function processPhones(&$config, $prefix = NULL) { // ignore null phones and phones that already match what we are doing $query = " @@ -113,6 +117,12 @@ AND phone NOT REGEXP '^[[:digit:]]{3}-[[:digit:]]{3}-[[:digit:]]{4}$' } } +/** + * @param $phone + * @param null $prefix + * + * @return bool|string + */ function processPhone($phone, $prefix = NULL) { // eliminate all white space and non numeric charaters $cleanPhone = preg_replace('/[^\d]+/s', '', $phone); diff --git a/tools/bin/scripts/cli.php b/tools/bin/scripts/cli.php index 66c956a183..9482c01365 100644 --- a/tools/bin/scripts/cli.php +++ b/tools/bin/scripts/cli.php @@ -35,6 +35,10 @@ */ $include_path = "../packages/:" . get_include_path(); set_include_path($include_path); + +/** + * Class civicrm_CLI + */ class civicrm_CLI { /** @@ -77,6 +81,10 @@ class civicrm_CLI { $this->authenticate($user, $pass); } + /** + * @param $user + * @param $pass + */ function authenticate($user, $pass) { session_start(); require_once 'CRM/Core/Config.php'; diff --git a/tools/bin/scripts/updateNameCache.php b/tools/bin/scripts/updateNameCache.php index 6edd085a90..445983f78a 100644 --- a/tools/bin/scripts/updateNameCache.php +++ b/tools/bin/scripts/updateNameCache.php @@ -31,7 +31,14 @@ * This script recaches the display_name and sort_name values * */ + +/** + * Class CRM_UpdateNameCache + */ class CRM_UpdateNameCache { + /** + * + */ function __construct() { // you can run this program either from an apache command, or from the cli if (php_sapi_name() == "cli") { diff --git a/tools/drupal/modules/ccrm_extensionvalidation/ccrm_extensionvalidation/ccrm_extensionvalidation.module b/tools/drupal/modules/ccrm_extensionvalidation/ccrm_extensionvalidation/ccrm_extensionvalidation.module index eda8a608e6..3b36886c4f 100644 --- a/tools/drupal/modules/ccrm_extensionvalidation/ccrm_extensionvalidation/ccrm_extensionvalidation.module +++ b/tools/drupal/modules/ccrm_extensionvalidation/ccrm_extensionvalidation/ccrm_extensionvalidation.module @@ -21,9 +21,9 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); function ccrm_extensionvalidation_node_validate($node, $form, &$form_state) { // Make sure author of extension is in maintainers if ('extension' == $node->type) { - $authornid = $node->uid; $delta = 0; $foundauthor = FALSE; + $authornid = $node->uid; $delta = 0; $foundauthor = FALSE; foreach ($form_state['values']['field_maintainers'][LANGUAGE_NONE] as $index => $ref) { - if (is_numeric($ref['target_id']) + if (is_numeric($ref['target_id']) && $form_state['values']['field_maintainers'][LANGUAGE_NONE][$index]['target_id'] == $authornid) { $foundauthor = TRUE; } @@ -39,7 +39,7 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); $parentnid = $node->field_extension_nr_crm[LANGUAGE_NONE][0]['nid']; } if ($node->type == 'extension_release_cms') { - $parentnid = $node->field_extension_nr_cms[LANGUAGE_NONE][0]['nid']; + $parentnid = $node->field_extension_nr_cms[LANGUAGE_NONE][0]['nid']; } if ($node->type == 'extension_release_civicrm' || $node->type == 'extension_release_cms') { $parent_node = is_numeric($parentnid) ? node_load($parentnid) : NULL; @@ -54,7 +54,7 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); if (is_numeric($ref['target_id'])) { $form_state['values']['field_extension_release_na_mains'][LANGUAGE_NONE][$index]['target_id'] = NULL; } - } + } // Check parent node has maintainers set and add maintainers from parent $delta = 0; foreach ($parent_node->field_maintainers[LANGUAGE_NONE] as $index => $ref) { @@ -84,11 +84,17 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); _ccrmextvalid_validatexml($node, $form, &$form_state, $parent_node); } } - - function _ccrmextvalid_validatexml($node, $form, &$form_state, $parent_node) { - $keeperrors = array(); + +/** + * @param $node + * @param $form + * @param $form_state + * @param $parent_node + */ +function _ccrmextvalid_validatexml($node, $form, &$form_state, $parent_node) { + $keeperrors = array(); $file_id = $form_state['values'][CCRM_EXTVALID_XMLFILE_FIELD][LANGUAGE_NONE][0]['fid']; - + if ($file_id != 0) { $file = file_load($file_id); if ($file) { @@ -96,7 +102,7 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); $doc = new DOMDocument(); $doc->recover = TRUE; $doc->strictErrorChecking = FALSE; - + if ($doc->load(drupal_realpath($file->uri))) { // Initialize variables to be read $got = array('version' => FALSE, 'releaseDate' => FALSE, 'develStage' => FALSE, @@ -133,7 +139,19 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); } // return whether we had a - function _ccrmextvalid_validateTag($node, $form, &$form_state, $doc, $tag, &$tagcontents, &$keeperrors, $parent_node) { +/** + * @param $node + * @param $form + * @param $form_state + * @param $doc + * @param $tag + * @param $tagcontents + * @param $keeperrors + * @param $parent_node + * + * @return bool + */ +function _ccrmextvalid_validateTag($node, $form, &$form_state, $doc, $tag, &$tagcontents, &$keeperrors, $parent_node) { $gotit = FALSE; $tagcount = 0; $contents = ''; switch ($tag) { case 'version': @@ -165,7 +183,7 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); if ($elmt->hasAttributes()) { $tagcontents = $elmt->getAttribute('key'); } - } + } break; default: drupal_set_message(t('Invalid tag used in _ccrmextvalid_validateTag: @tag', array('@tag' => $tag))); @@ -225,7 +243,13 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); return $gotit; } - function _ccrmextvalid_assignTag($form, &$form_state, $tag, &$tagcontents) { +/** + * @param $form + * @param $form_state + * @param $tag + * @param $tagcontents + */ +function _ccrmextvalid_assignTag($form, &$form_state, $tag, &$tagcontents) { // Add $tagcontents to $form_state switch ($tag) { case 'version': @@ -252,7 +276,14 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); } // Get the value of a single tag from the XML that should only have one value - function _ccrmextvalid_getOneReqdByTag($doc, $tagname, &$values) { +/** + * @param $doc + * @param $tagname + * @param $values + * + * @return mixed + */ +function _ccrmextvalid_getOneReqdByTag($doc, $tagname, &$values) { $defaultval = $values; $tagcount = _ccrmextvalid_getByTag($doc, $tagname, &$values); if ($tagcount > 1) { @@ -263,7 +294,14 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); } // Get all tags by value from the XML - function _ccrmextvalid_getByTag($doc, $tagname, &$values) { +/** + * @param $doc + * @param $tagname + * @param $values + * + * @return mixed + */ +function _ccrmextvalid_getByTag($doc, $tagname, &$values) { $domnodes = $doc->getElementsByTagName($tagname); $nodecount = $domnodes->length; if ($nodecount > 0) { @@ -282,7 +320,13 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); } // Compare a value with the allowed values (lower case) - function _ccrmextvalid_checkallowedval($vals, $fieldname) { +/** + * @param $vals + * @param $fieldname + * + * @return array + */ +function _ccrmextvalid_checkallowedval($vals, $fieldname) { $retvals = array(); $vals = !is_array($vals) ? array($vals) : $vals; $fld = field_info_field($fieldname); @@ -312,23 +356,41 @@ define('CCRM_EXTVALID_XMLFILE_FIELD', 'field_extension_release_xml'); } // Little helper function for array_map - function _ccrmextvalid_mapversionval($val) { +/** + * @param $val + * + * @return string + */ +function _ccrmextvalid_mapversionval($val) { return "civicrm {$val}"; } // Little helper function for array_map - function _ccrmextvalid_mapversionvaltid($val) { +/** + * @param $val + * + * @return array + */ +function _ccrmextvalid_mapversionvaltid($val) { return array( 'tid' => $val); } - function _ccrmextvalid_seterror( $name, $message, &$keeperrors) { +/** + * @param $name + * @param $message + * @param $keeperrors + */ +function _ccrmextvalid_seterror( $name, $message, &$keeperrors) { // Form_set_error can only happen once on an element so collect the errors $keeperrors[$name] = empty($keeperrors[$name]) ? $message : $keeperrors[$name] . " " . $message; } - function _ccrmextvalid_formseterror($errors) { +/** + * @param $errors + */ +function _ccrmextvalid_formseterror($errors) { foreach ($errors as $name => $err) { // No other field is working reliably, tried the file upload button & others so usually use title form_set_error(check_plain($name), check_plain($err)); } - } \ No newline at end of file + } diff --git a/tools/drupal/modules/civicrm_regsite/civicrm_regsite.module b/tools/drupal/modules/civicrm_regsite/civicrm_regsite.module index 82c436f3fd..2618edde8b 100644 --- a/tools/drupal/modules/civicrm_regsite/civicrm_regsite.module +++ b/tools/drupal/modules/civicrm_regsite/civicrm_regsite.module @@ -51,6 +51,9 @@ define('CIVICRM_EVENT_SURVEY_EVENT_TYPE_ID', 3); // Note: Don't forget to change name of the template directory // when you change the profile id below define('CIVICRM_EVENT_SURVEY_PROFILE_ID', 9); +/** + * @param $config + */ function civicrm_regsite_civicrm_config(&$config) { $template = &CRM_Core_Smarty::singleton(); @@ -73,6 +76,10 @@ function civicrm_regsite_civicrm_config(&$config) { date_default_timezone_set('America/Los_Angeles'); } +/** + * @param $formName + * @param $form + */ function civicrm_regsite_civicrm_buildForm($formName, &$form) { if ($formName == 'CRM_Profile_Form_Edit') { if ($form->getVar('_gid') == REGSITE_PROFILE_ID) { @@ -84,6 +91,11 @@ function civicrm_regsite_civicrm_buildForm($formName, &$form) { } } +/** + * @param $orgID + * + * @return Object + */ function &_civicrm_regsite_get_permissioned_contacts($orgID) { $sql = " SELECT c.first_name, c.last_name, c.display_name, e.email @@ -102,6 +114,9 @@ AND e.is_primary = 1 return CRM_Core_DAO::executeQuery($sql, $params); } +/** + * @param $form + */ function _civicrm_regsite_civicrm_buildForm_Profile_RegSite(&$form) { // add first name, last name and email $attributes = CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact'); @@ -155,6 +170,10 @@ function _civicrm_regsite_civicrm_buildForm_Profile_RegSite(&$form) { $form->setDefaults($defaults); } +/** + * @param $class + * @param $form + */ function civicrm_regsite_civicrm_postProcess($class, &$form) { if (is_a($form, 'CRM_Profile_Form_Edit')) { $gid = $form->getVar('_gid'); @@ -167,6 +186,9 @@ function civicrm_regsite_civicrm_postProcess($class, &$form) { } } +/** + * @param $form + */ function _civicrm_regsite_civicrm_postProcess_Profile_RegSite(&$form) { $params = $form->controller->exportValues($form->getName()); @@ -262,6 +284,9 @@ function _civicrm_regsite_civicrm_postProcess_Profile_RegSite(&$form) { CRM_Utils_Mail::send($params); } +/** + * @param $page + */ function civicrm_regsite_civicrm_pageRun(&$page) { $name = $page->getVar('_name'); if ($name == 'CRM_Profile_Page_Dynamic') { @@ -274,6 +299,9 @@ function civicrm_regsite_civicrm_pageRun(&$page) { } } +/** + * @param $page + */ function _civicrm_regsite_civicrm_pageRun_Profile_RegSite(&$page) { // get the id of the org $orgID = $page->getVar('_id'); @@ -291,6 +319,14 @@ function _civicrm_regsite_civicrm_pageRun_Profile_RegSite(&$page) { } } +/** + * @param $op + * @param $objectName + * @param $objectId + * @param $links + * + * @return mixed + */ function civicrm_regsite_civicrm_links($op, $objectName, $objectId, &$links) { if ($op != 'view.contact.userDashBoard') { return; @@ -303,6 +339,10 @@ function civicrm_regsite_civicrm_links($op, $objectName, $objectId, &$links) { return $links; } +/** + * @param $formName + * @param $form + */ function _event_survey_civicrm_buildForm_Profile($formName, &$form) { $cgID = _event_survey_civicrm_getCustomGroupID(CIVICRM_EVENT_SURVEY_CG_TITLE); if (empty($cgID)) { @@ -326,6 +366,10 @@ function _event_survey_civicrm_buildForm_Profile($formName, &$form) { } } +/** + * @param $class + * @param $form + */ function _event_survey_civicrm_postProcess_Profile($class, &$form) { $cgID = _event_survey_civicrm_getCustomGroupID(CIVICRM_EVENT_SURVEY_CG_TITLE); if (empty($cgID)) { @@ -378,6 +422,9 @@ function _event_survey_civicrm_postProcess_Profile($class, &$form) { } } +/** + * @param $page + */ function _event_survey_civicrm_pageRun_Profile(&$page) { $cgID = _survey_civicrm_getCustomGroupID(CIVICRM_EVENT_SURVEY_CG_TITLE); if (empty($cgID)) { @@ -400,6 +447,11 @@ function _event_survey_civicrm_pageRun_Profile(&$page) { ); } +/** + * @param $customGroupName + * + * @return null|string + */ function _event_survey_civicrm_getCustomGroupID($customGroupName) { require_once 'CRM/Utils/Type.php'; $customGroupName = CRM_Utils_Type::escape($customGroupName, 'String'); diff --git a/tools/drupal/modules/extdir/extdir.pages.inc b/tools/drupal/modules/extdir/extdir.pages.inc index c1f3859a4a..935d26127c 100644 --- a/tools/drupal/modules/extdir/extdir.pages.inc +++ b/tools/drupal/modules/extdir/extdir.pages.inc @@ -237,14 +237,36 @@ class ExtdirQueryHelper { function create($query, $entityAliases) { return new ExtdirQueryHelper($query, $entityAliases); } + + /** + * @param $query + * @param $entityAliases + */ function __construct($query, $entityAliases) { $this->query = $query; $this->entityAliases = $entityAliases; } - function innerJoinFieldAPI($entityAlias, $joinToField, $joinToAlias = NULL, $joinToColumn = 'entity_id') { + + /** + * @param $entityAlias + * @param $joinToField + * @param null $joinToAlias + * @param string $joinToColumn + * + * @return $this + */function innerJoinFieldAPI($entityAlias, $joinToField, $joinToAlias = NULL, $joinToColumn = 'entity_id') { return $this->joinFieldAPI('INNER', $entityAlias, $joinToField, $joinToAlias, $joinToColumn); } - function joinFieldAPI($type, $entityAlias, $joinToField, $joinToAlias = NULL, $joinToColumn = 'entity_id') { + + /** + * @param $type + * @param $entityAlias + * @param $joinToField + * @param null $joinToAlias + * @param string $joinToColumn + * + * @return $this + */function joinFieldAPI($type, $entityAlias, $joinToField, $joinToAlias = NULL, $joinToColumn = 'entity_id') { if ($joinToAlias === NULL) { $joinToAlias = $joinToField; } diff --git a/tools/drupal/modules/multicurrency/multicurrency.module b/tools/drupal/modules/multicurrency/multicurrency.module index 02b27351ad..2dfff3622f 100644 --- a/tools/drupal/modules/multicurrency/multicurrency.module +++ b/tools/drupal/modules/multicurrency/multicurrency.module @@ -36,6 +36,10 @@ define('MULTICURRENCY_EVENT_ID_1', 4); define('MULTICURRENCY_EVENT_ID_2', 8); define('DISCOUNT_EVENT_ID_1', 4); define('DISCOUNT_EVENT_ID_2', 8); +/** + * @param $formName + * @param $form + */ function multicurrency_civicrm_buildForm($formName, &$form ) { @@ -72,6 +76,11 @@ function multicurrency_civicrm_buildForm($formName, } } +/** + * @param $form + * + * @return string + */ function multicurrency_set_currency(&$form) { static $processed = FALSE; @@ -92,6 +101,11 @@ function multicurrency_set_currency(&$form) { return $config->defaultCurrency; } +/** + * @param $pageType + * @param $form + * @param $amount + */ function multicurrency_civicrm_buildAmount($pageType, &$form, &$amount @@ -136,6 +150,9 @@ function multicurrency_civicrm_buildAmount($pageType, } } +/** + * @param $page + */ function multicurrency_civicrm_pageRun(&$page) { if ($page->getVar('_name') == 'CRM_Event_Page_EventInfo' && @@ -148,6 +165,12 @@ function multicurrency_civicrm_pageRun(&$page) { } //---- Discount using codes ------// +/** + * @param $eventID + * @param $discountCode + * + * @return array + */ function _multicurrency_discountHelper($eventID, $discountCode) { $sql = " SELECT v.id as id, v.value as value, v.weight as weight @@ -179,6 +202,10 @@ AND g.name = %2 /* * The hook updates the random code used with event signup. */ +/** + * @param $class + * @param $form + */ function multicurrency_civicrm_postProcess($class, &$form) { $eventID = $form->getVar('_eventId'); if (!is_a($form, 'CRM_Event_Form_Registration_Confirm') || diff --git a/tools/extensions/org.civicrm.angularex/angularex.php b/tools/extensions/org.civicrm.angularex/angularex.php index 5becbf12d2..216105f646 100644 --- a/tools/extensions/org.civicrm.angularex/angularex.php +++ b/tools/extensions/org.civicrm.angularex/angularex.php @@ -107,6 +107,9 @@ function angularex_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) { _angularex_civix_civicrm_alterSettingsFolders($metaDataFolders); } +/** + * @param $angularModule + */ function angularex_civicrm_angularModules(&$angularModule) { $angularModule['example'] = array('ext' => 'org.civicrm.angularex', 'js' => array('js/example.js')); -} \ No newline at end of file +} diff --git a/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueueDone.php b/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueueDone.php index 042205dc33..6f1eb17782 100644 --- a/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueueDone.php +++ b/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueueDone.php @@ -2,6 +2,9 @@ require_once 'CRM/Core/Page.php'; +/** + * Class CRM_Demoqueue_Page_DemoQueueDone + */ class CRM_Demoqueue_Page_DemoQueueDone extends CRM_Core_Page { function run() { // Example: Set the page-title dynamically; alternatively, declare a static title in xml/Menu/*.xml diff --git a/tools/extensions/org.civicrm.multisite/api/v3/MultisiteDomain/Create.php b/tools/extensions/org.civicrm.multisite/api/v3/MultisiteDomain/Create.php index 4416f14cf3..1166fa885d 100644 --- a/tools/extensions/org.civicrm.multisite/api/v3/MultisiteDomain/Create.php +++ b/tools/extensions/org.civicrm.multisite/api/v3/MultisiteDomain/Create.php @@ -42,6 +42,9 @@ function civicrm_api3_multisite_domain_create($params) { * The metadata is used for setting defaults, documentation & validation * @param array $params array or parameters determined by getfields */ +/** + * @param $params + */ function _civicrm_api3_multisite_domain_create_spec(&$params) { $params['name']['api.required'] = 1; $params['group_title'] = array( @@ -55,4 +58,4 @@ function _civicrm_api3_multisite_domain_create_spec(&$params) { 'title' => 'id of existing contact for domain', 'description' => 'If not populated another will be created using the name' ); -} \ No newline at end of file +} diff --git a/tools/extensions/org.civicrm.multisite/multisite.civix.php b/tools/extensions/org.civicrm.multisite/multisite.civix.php index 8905dbad4c..f5150dfc95 100644 --- a/tools/extensions/org.civicrm.multisite/multisite.civix.php +++ b/tools/extensions/org.civicrm.multisite/multisite.civix.php @@ -112,6 +112,9 @@ function _multisite_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { } } +/** + * @return null + */ function _multisite_civix_upgrader() { if (!file_exists(__DIR__.'/CRM/Multisite/Upgrader.php')) { return NULL; diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php index 5dc1f62e60..eef386fc75 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php @@ -36,6 +36,10 @@ require_once 'CRM/Core/Payment.php'; require_once ('packages/Google/library/googlecart.php'); require_once ('packages/Google/library/googleitem.php'); + +/** + * Class org_civicrm_payment_googlecheckout + */ class org_civicrm_payment_googlecheckout extends CRM_Core_Payment { /** @@ -115,6 +119,15 @@ class org_civicrm_payment_googlecheckout extends CRM_Core_Payment { } } + /** + * This function collects all the information from a web/api form and invokes + * the relevant payment processor specific functions to perform the transaction + * + * @param array $params assoc array of input parameters for this transaction + * + * @return array the result in an nice formatted array (or an error object) + * @abstract + */ function doDirectPayment(&$params) { CRM_Core_Error::fatal(ts('This function is not implemented')); } @@ -274,6 +287,11 @@ class org_civicrm_payment_googlecheckout extends CRM_Core_Payment { return self::getArrayFromXML($xmlResponse); } + /** + * @param $searchParams + * + * @return string + */ static function buildXMLQuery($searchParams) { $xml = ' @@ -308,6 +326,11 @@ class org_civicrm_payment_googlecheckout extends CRM_Core_Payment { return $xml; } + /** + * @param $xmlData + * + * @return array + */ static function getArrayFromXML($xmlData) { require_once 'Google/library/xml-processing/xmlparser.php'; diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php index 6d67110092..e0545abb0a 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php @@ -37,6 +37,10 @@ require_once 'CRM/Core/Payment/BaseIPN.php'; define('GOOGLE_DEBUG_PP', 1); + +/** + * Class org_civicrm_payment_googlecheckout_GoogleIPN + */ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_BaseIPN { /** @@ -56,6 +60,14 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base */ static protected $_mode = NULL; + /** + * @param $name + * @param $type + * @param $object + * @param bool $abort + * + * @return mixed + */ static function retrieve($name, $type, $object, $abort = TRUE) { $value = CRM_Utils_Array::value($name, $object); if ($abort && $value === NULL) { @@ -524,7 +536,13 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base } } - function getInput(&$input, &$ids) { + /** + * @param $input + * @param $ids + * + * @return bool + */ + function getInput(&$input, &$ids) { if (!$this->getBillingID($ids)) { return FALSE; } diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/demo/responsehandlerdemo.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/demo/responsehandlerdemo.php index 75ff9597e4..975953dcbe 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/demo/responsehandlerdemo.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/demo/responsehandlerdemo.php @@ -270,7 +270,11 @@ switch ($root) { Examples of this are "anonymous-address", "merchant-code-string" from the merchant-calculations-callback API */ - function get_arr_result($child_node) { +/** + * @param $child_node + * + * @return array + */function get_arr_result($child_node) { $result = array(); if (isset($child_node)) { if (is_associative_array($child_node)) { @@ -286,7 +290,11 @@ switch ($root) { } /* Returns true if a given variable represents an associative array */ - function is_associative_array($var) { +/** + * @param $var + * + * @return bool + */function is_associative_array($var) { return is_array($var) && !is_numeric(implode('', array_keys($var))); } diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlecart.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlecart.php index 8cb1675237..b403111e34 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlecart.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlecart.php @@ -16,9 +16,9 @@ * limitations under the License. */ -/* This class is used to create a Google Checkout shopping cart and post it +/* This class is used to create a Google Checkout shopping cart and post it * to the Sandbox or Production environment - * A very useful function is the CheckoutButtonCode() which returns the HTML + * A very useful function is the CheckoutButtonCode() which returns the HTML * code to post the cart using the standard technique * Refer demo/cartdemo.php for different use case scenarios for this code */ @@ -51,6 +51,11 @@ class GoogleCart { //The Constructor method which requires a merchant id, merchant key //and the operation type(sandbox or checkout) + /** + * @param $id + * @param $key + * @param string $server_type + */ function GoogleCart($id, $key, $server_type = "checkout") { $this->merchant_id = $id; $this->merchant_key = $key; @@ -74,26 +79,47 @@ class GoogleCart { $this->alternate_tax_table_arr = array(); } + /** + * @param $cart_expire + */ function SetCartExpiration($cart_expire) { $this->cart_expiration = $cart_expire; } + /** + * @param $data + */ function SetMerchantPrivateData($data) { $this->merchant_private_data = $data; } + /** + * @param $url + */ function SetEditCartUrl($url) { $this->edit_cart_url = $url; } + /** + * @param $url + */ function SetContinueShoppingUrl($url) { $this->continue_shopping_url = $url; } + /** + * @param $req + */ function SetRequestBuyerPhone($req) { $this->_SetBooleanValue('request_buyer_phone', $req, ""); } + /** + * @param $url + * @param string $tax_option + * @param string $coupons + * @param string $gift_cert + */ function SetMerchantCalculations($url, $tax_option = "false", $coupons = "false", $gift_cert = "false" @@ -104,14 +130,23 @@ class GoogleCart { $this->_SetBooleanValue('accept_gift_certificates', $gift_cert, "false"); } + /** + * @param $google_item + */ function AddItem($google_item) { $this->item_arr[] = $google_item; } + /** + * @param $ship + */ function AddShipping($ship) { $this->shipping_arr[] = $ship; } + /** + * @param $tax + */ function AddTaxTables($tax) { if ($tax->type == "default") { $this->default_tax_table = $tax; @@ -121,6 +156,9 @@ class GoogleCart { } } + /** + * @return string + */ function GetXML() { require_once ('xml-processing/xmlbuilder.php'); @@ -380,6 +418,14 @@ class GoogleCart { } //Code for generating Checkout button + /** + * @param string $size + * @param string $style + * @param string $variant + * @param string $loc + * + * @return string + */ function CheckoutButtonCode($size = "large", $style = "white", $variant = "text", $loc = "en_US" ) { @@ -407,21 +453,26 @@ class GoogleCart { if ($variant == "text") { $data = "

checkout_url . "\"> GetXML()) . "\"> - CalcHmacSha1($this->GetXML())) . "\"> - server_url . "buttons/checkout.gif?merchant_id=" . $this->merchant_id . "&w=" . $width . "&h=" . $height . "&style=" . $style . "&variant=" . $variant . "&loc=" . $loc . "\" + CalcHmacSha1($this->GetXML())) . "\"> + server_url . "buttons/checkout.gif?merchant_id=" . $this->merchant_id . "&w=" . $width . "&h=" . $height . "&style=" . $style . "&variant=" . $variant . "&loc=" . $loc . "\" height=\"" . $height . "\" width=\"" . $width . "\" />

"; } elseif ($variant == "disabled") { - $data = "

\"Checkout\"server_url . "buttons/checkout.gif?merchant_id=" . $this->merchant_id . "&w=" . $width . "&h=" . $height . "&style=" . $style . "&variant=" . $variant . "&loc=" . $loc . "\" + $data = "

\"Checkout\"server_url . "buttons/checkout.gif?merchant_id=" . $this->merchant_id . "&w=" . $width . "&h=" . $height . "&style=" . $style . "&variant=" . $variant . "&loc=" . $loc . "\" height=\"" . $height . "\" width=\"" . $width . "\" />

"; } return $data; } //Method which returns the encrypted google cart to make sure that the carts are not tampered with + /** + * @param $data + * + * @return string + */ function CalcHmacSha1($data) { $key = $this->merchant_key; $blocksize = 64; @@ -445,6 +496,11 @@ class GoogleCart { } //Method used internally to set true/false cart variables + /** + * @param $string + * @param $value + * @param $default + */ function _SetBooleanValue($string, $value, $default) { $value = strtolower($value); if ($value == "true" || $value == "false")eval('$this->' . $string . '="' . $value . '";'); diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleitem.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleitem.php index f2386d82f3..4fc38dd5f2 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleitem.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleitem.php @@ -17,10 +17,10 @@ */ /* This class is used to create items to be added to the shopping cart - * Invoke a separate instance of this class for each item to be - * added to the cart. + * Invoke a separate instance of this class for each item to be + * added to the cart. * Required fields are the item name, description, quantity and price - * The private-data and tax-selector for each item can be set in the + * The private-data and tax-selector for each item can be set in the * constructor call or using individual Set functions */ class GoogleItem { @@ -32,6 +32,16 @@ class GoogleItem { var $quantity; var $merchant_private_data; var $tax_table_selector; + + /** + * @param $name + * @param $desc + * @param $qty + * @param $price + * @param string $money + * @param string $private_data + * @param string $tax_selector + */ function GoogleItem($name, $desc, $qty, $price, $money = "USD", $private_data = "", $tax_selector = "" ) { @@ -44,10 +54,16 @@ class GoogleItem { $this->tax_table_selector = $tax_selector; } + /** + * @param $private_data + */ function SetMerchantPrivateData($private_data) { $this->merchant_private_data = $private_data; } + /** + * @param $tax_selector + */ function SetTaxTableSelector($tax_selector) { $this->tax_table_selector = $tax_selector; } diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlemerchantcalculations.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlemerchantcalculations.php index a249e1b6b7..ab79b6fbf9 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlemerchantcalculations.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googlemerchantcalculations.php @@ -16,7 +16,7 @@ * limitations under the License. */ -/* This class is used to create the merchant callback results +/* This class is used to create the merchant callback results * when a merchant-calculated-feedback structure is received * * Multiple results are generated depending on the possible @@ -31,10 +31,16 @@ class GoogleMerchantCalculations { $this->results_arr = array(); } + /** + * @param $results + */ function AddResult($results) { $this->results_arr[] = $results; } + /** + * @return string + */ function GetXML() { require_once ('xml-processing/xmlbuilder.php'); diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresponse.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresponse.php index 616cca2939..63ef3f7445 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresponse.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresponse.php @@ -16,13 +16,13 @@ * limitations under the License. */ -/* This class is instantiated everytime any notification or +/* This class is instantiated everytime any notification or * order processing commands are received. - * + * * It has a SendReq function to post different requests to the Google Server * Send functions are provided for most of the commands that are supported - * by the server - * Refer demo/responsehandlerdemo.php for different use case scenarios + * by the server + * Refer demo/responsehandlerdemo.php for different use case scenarios * for this code */ class GoogleResponse { @@ -40,6 +40,13 @@ class GoogleResponse { var $root; var $data; var $xml_parser; + + /** + * @param $id + * @param $key + * @param $response + * @param string $server_type + */ function GoogleResponse($id, $key, $response, $server_type = "checkout") { $this->merchant_id = $id; $this->merchant_key = $key; @@ -72,6 +79,11 @@ class GoogleResponse { $this->data = $this->xml_parser->GetData(); } + /** + * @param $headers + * + * @return bool + */ function HttpAuthentication($headers) { if (isset($headers['Authorization'])) { $auth_encode = $headers['Authorization']; @@ -90,6 +102,11 @@ class GoogleResponse { return TRUE; } + /** + * @param $google_order + * @param string $amount + * @param $message_log + */ function SendChargeOrder($google_order, $amount = '', $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\">"; @@ -102,6 +119,13 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $amount + * @param $reason + * @param $comment + * @param $message_log + */ function SendRefundOrder($google_order, $amount, $reason, $comment, $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"> @@ -114,6 +138,12 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $reason + * @param $comment + * @param $message_log + */ function SendCancelOrder($google_order, $reason, $comment, $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"> @@ -125,6 +155,12 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $carrier + * @param $tracking_no + * @param $message_log + */ function SendTrackingData($google_order, $carrier, $tracking_no, $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"> @@ -138,6 +174,11 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $merchant_order + * @param $message_log + */ function SendMerchantOrderNumber($google_order, $merchant_order, $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"> @@ -148,6 +189,12 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $message + * @param string $send_mail + * @param $message_log + */ function SendBuyerMessage($google_order, $message, $send_mail = "true", $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"> @@ -159,6 +206,10 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $message_log + */ function SendProcessOrder($google_order, $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"/> "; @@ -167,6 +218,13 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $carrier + * @param $tracking_no + * @param string $send_mail + * @param $message_log + */ function SendDeliverOrder($google_order, $carrier, $tracking_no, $send_mail = "true", $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"> @@ -181,6 +239,10 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $message_log + */ function SendArchiveOrder($google_order, $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"/>"; @@ -189,6 +251,10 @@ class GoogleResponse { ); } + /** + * @param $google_order + * @param $message_log + */ function SendUnarchiveOrder($google_order, $message_log) { $postargs = " schema_url . "\" google-order-number=\"" . $google_order . "\"/>"; @@ -197,11 +263,17 @@ class GoogleResponse { ); } + /** + * @param $merchant_calc + */ function ProcessMerchantCalculations($merchant_calc) { $result = $merchant_calc->GetXML(); echo $result; } + /** + * @return array + */ function GetAuthenticationHeaders() { $headers = array(); $headers[] = "Authorization: Basic " . base64_encode( @@ -212,6 +284,12 @@ class GoogleResponse { return $headers; } + /** + * @param $url + * @param $header_arr + * @param $postargs + * @param $message_log + */ function SendReq($url, $header_arr, $postargs, $message_log) { // Get the curl session object $session = curl_init($url); diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresult.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresult.php index cc56124b5e..a903753edb 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresult.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleresult.php @@ -17,9 +17,9 @@ */ /* This class is used to create a Google Checkout result for merchant - * as a response to merchant-calculations feedback structure + * as a response to merchant-calculations feedback structure * Refer demo/responsehandlerdemo.php for usage of this code - * + * * Methods are provided to set the shipping, tax, coupons and gift certificate * options */ @@ -35,10 +35,20 @@ class GoogleResult { var $coupon_arr = array(); var $giftcert_arr = array(); + + /** + * @param $address_id + */ function GoogleResult($address_id) { $this->address_id = $address_id; } + /** + * @param $name + * @param $price + * @param string $money + * @param string $shippable + */ function SetShippingDetails($name, $price, $money = "USD", $shippable = "true" ) { @@ -48,15 +58,25 @@ class GoogleResult { $this->shippable = $shippable; } + /** + * @param $amount + * @param string $currency + */ function SetTaxDetails($amount, $currency = "USD") { $this->tax_amount = $amount; $this->tax_currency = $currency; } + /** + * @param $coupon + */ function AddCoupons($coupon) { $this->coupon_arr[] = $coupon; } + /** + * @param $gift + */ function AddGiftCertificates($gift) { $this->giftcert_arr[] = $gift; } @@ -65,12 +85,24 @@ class GoogleResult { /* This is a class used to return the results of coupons * that the buyer entered code for on the place order page */ + +/** + * Class GoogleCoupons + */ class GoogleCoupons { var $coupon_valid; var $coupon_code; var $coupon_currency; var $coupon_amount; var $coupon_message; + + /** + * @param $valid + * @param $code + * @param $amount + * @param $currency + * @param $message + */ function googlecoupons($valid, $code, $amount, $currency, $message) { $this->coupon_valid = $valid; $this->coupon_code = $code; @@ -83,12 +115,24 @@ class GoogleCoupons { /* This is a class used to return the results of gift certificates * that the buyer entered code for on the place order page */ + +/** + * Class GoogleGiftcerts + */ class GoogleGiftcerts { var $gift_valid; var $gift_code; var $gift_currency; var $gift_amount; var $gift_message; + + /** + * @param $valid + * @param $code + * @param $amount + * @param $currency + * @param $message + */ function googlegiftcerts($valid, $code, $amount, $currency, $message) { $this->gift_valid = $valid; $this->gift_code = $code; diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleshipping.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleshipping.php index f3897bf5da..6dc7fde91c 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleshipping.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googleshipping.php @@ -22,13 +22,13 @@ * 2. Pickup (Type:pickup) * 3. Merchant calculated (Type:merchant-calculated) * - * Invoke a separate instance of this class for each type of shipping + * Invoke a separate instance of this class for each type of shipping * to be included - * Required fields are shipping name, shipping type and price + * Required fields are shipping name, shipping type and price * Allowed and excluded country areas can be specified as part of constructor * arguments or using individual Set methods. Possible values here are * 1. CONTINENTAL_48 - * 2. FULL_50_STATES + * 2. FULL_50_STATES * 3. ALL * State and zip patterns must be exclusively updated using their individual Set methods */ @@ -47,6 +47,15 @@ class GoogleShipping { var $excluded_country_area; var $allowed_restrictions = FALSE; var $excluded_restrictions = FALSE; + + /** + * @param $name + * @param $type + * @param $price + * @param string $money + * @param string $allowed_country_area + * @param string $excluded_country_area + */ function GoogleShipping($name, $type, $price, $money = "USD", $allowed_country_area = "", $excluded_country_area = "" @@ -72,26 +81,41 @@ class GoogleShipping { $this->excluded_zip_patterns_arr = array(); } + /** + * @param $areas + */ function SetAllowedStateAreas($areas) { $this->allowed_restrictions = TRUE; $this->allowed_state_areas_arr = $areas; } + /** + * @param $zips + */ function SetAllowedZipPattens($zips) { $this->allowed_restrictions = TRUE; $this->allowed_zip_patterns_arr = $zips; } + /** + * @param $areas + */ function SetExcludedStateAreas($areas) { $this->excluded_restrictions = TRUE; $this->excluded_state_areas_arr = $areas; } + /** + * @param $zips + */ function SetExcludedZipPatternsStateAreas($zips) { $this->excluded_restrictions = TRUE; $this->excluded_zip_patterns_arr = $zips; } + /** + * @param $country_area + */ function SetAllowedCountryArea($country_area) { if ($country_area == "CONTINENTAL_48" || $country_area == "FULL_50_STATES" || @@ -103,6 +127,9 @@ class GoogleShipping { else $this->allowed_country_area = ""; } + /** + * @param $country_area + */ function SetExcludedCountryArea($country_area) { if ($country_area == "CONTINENTAL_48" || $country_area == "FULL_50_STATES" || diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxrule.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxrule.php index 6493a248b4..98990b7e94 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxrule.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxrule.php @@ -15,21 +15,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* This class is used to create Tax rules to be added to the tax tables +/* This class is used to create Tax rules to be added to the tax tables * in the shopping cart * Ther are two types of tax rules * 1. default (should be added to a default tax table) * 2. alternate (should be added to an alternate tax table) * - * Invoke a separate instance of this class for each tax rule to be - * added to the cart + * Invoke a separate instance of this class for each tax rule to be + * added to the cart * Required fields are the rule type and the tax rate - * Country area can be specified as part of constructor arguments or + * Country area can be specified as part of constructor arguments or * using individual Set methods. Possible values here are * 1. CONTINENTAL_48 - * 2. FULL_50_STATES + * 2. FULL_50_STATES * 3. ALL - * State and zip patterns must be exclusively updated using their + * State and zip patterns must be exclusively updated using their * individual Set methods */ class GoogleTaxRule { @@ -41,6 +41,13 @@ class GoogleTaxRule { var $state_areas_arr; var $zip_patterns_arr; var $country_area; + + /** + * @param $type + * @param $tax_rate + * @param string $country_area + * @param string $shipping_taxed + */ function GoogleTaxRule($type, $tax_rate, $country_area = "", $shipping_taxed = "false" ) { @@ -57,6 +64,9 @@ class GoogleTaxRule { $this->zip_patterns_arr = array(); } + /** + * @param $areas + */ function SetStateAreas($areas) { if (is_array($areas)) { $this->state_areas_arr = $areas; @@ -64,6 +74,9 @@ class GoogleTaxRule { else $this->state_areas_arr = array($areas); } + /** + * @param $zips + */ function SetZipPatterns($zips) { if (is_array($zips)) { $this->zip_patterns_arr = $zips; @@ -71,6 +84,9 @@ class GoogleTaxRule { else $this->zip_patterns_arr = array($zips); } + /** + * @param $country_area + */ function SetCountryArea($country_area) { if ($country_area == "CONTINENTAL_48" || $country_area == "FULL_50_STATES" || $country_area = "ALL" diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxtable.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxtable.php index bb59e173e9..c8eb987f3a 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxtable.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/googletaxtable.php @@ -19,7 +19,7 @@ /* This class is used to add tax tables to the shopping cart * There are two types of tax tables * 1. default (there can be only a single default tax table) - * 2. alternate + * 2. alternate * * Invoke a separate instance of this class for each tax table required * Required field is the type @@ -31,6 +31,12 @@ class GoogleTaxTable { var $name; var $tax_rules_arr; var $standalone; + + /** + * @param $type + * @param string $name + * @param string $standalone + */ function GoogleTaxTable($type, $name = "", $standalone = "false") { if (($type == "default") || ($type == "alternate" && $name != "")) { $this->name = $name; @@ -40,6 +46,9 @@ class GoogleTaxTable { } } + /** + * @param $rules + */ function AddTaxRules($rules) { $this->tax_rules_arr[] = $rules; } diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlbuilder.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlbuilder.php index 5dfd8487e0..a2c0c3e621 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlbuilder.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlbuilder.php @@ -21,12 +21,20 @@ /* * Class used to generate XML data - * Based on sample code available at http://simon.incutio.com/code/php/XmlWriter.class.php.txt + * Based on sample code available at http://simon.incutio.com/code/php/XmlWriter.class.php.txt + */ + +/** + * Class XmlBuilder */ class XmlBuilder { var $xml; var $indent; var $stack = array(); + + /** + * @param string $indent + */ function XmlBuilder($indent = ' ') { $this->indent = $indent; $this->xml = '' . "\n"; @@ -40,6 +48,10 @@ class XmlBuilder { //Used when an element has sub-elements // This function adds an open tag to the output + /** + * @param $element + * @param array $attributes + */ function Push($element, $attributes = array()) { $this->_indent(); $this->xml .= '<' . $element; @@ -53,6 +65,11 @@ class XmlBuilder { //Used when an element has no subelements. //Data within the open and close tags are provided with the //contents variable + /** + * @param $element + * @param $content + * @param array $attributes + */ function Element($element, $content, $attributes = array()) { $this->_indent(); $this->xml .= '<' . $element; @@ -62,6 +79,10 @@ class XmlBuilder { $this->xml .= '>' . htmlentities($content) . '' . "\n"; } + /** + * @param $element + * @param array $attributes + */ function EmptyElement($element, $attributes = array()) { $this->_indent(); $this->xml .= '<' . $element; @@ -72,6 +93,9 @@ class XmlBuilder { } //Used to close an open tag + /** + * @param $pop_element + */ function Pop($pop_element) { $element = array_pop($this->stack); $this->_indent(); @@ -79,6 +103,9 @@ class XmlBuilder { else $this->xml .= "\n"; } + /** + * @return string + */ function GetXML() { if (count($this->stack) != 0)die('XML Error: No matching closing tag found for " ' . array_pop($this->stack) { . '"' ); diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlparser.php b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlparser.php index bef830bc65..d924033a39 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlparser.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/packages/Google/library/xml-processing/xmlparser.php @@ -20,20 +20,20 @@ /* This uses SAX parser to convert XML data into PHP associative arrays - * When invoking the constructor with the input data, strip out the first XML line - * + * When invoking the constructor with the input data, strip out the first XML line + * * Member field Description: - * $params: This stores the XML data. The attributes and contents of XML tags + * $params: This stores the XML data. The attributes and contents of XML tags * can be accessed as follows - * + * * * data 1 * * data 2 * * - * - * print_r($this->params) will return + * + * print_r($this->params) will return Array ( [addresses] => Array @@ -65,9 +65,13 @@ ) ) - * XmlParser returns an empty params array if it encounters - * any error during parsing + * XmlParser returns an empty params array if it encounters + * any error during parsing */ + +/** + * Class XmlParser + */ class XmlParser { // Stores the object representation of XML data @@ -78,6 +82,9 @@ class XmlParser { /* Constructor for the class * Takes in XML data as input( do not include the tag */ + /** + * @param $input + */ function XmlParser($input) { $xmlp = xml_parser_create(); xml_parse_into_struct($xmlp, $input, $vals, $index); @@ -87,13 +94,23 @@ class XmlParser { } /* Returns true if a given variable represents an associative array */ + /** + * @param $var + * + * @return bool + */ function is_associative_array($var) { return is_array($var) && !is_numeric(implode('', array_keys($var))); } - /* Converts the output of SAX parser into a PHP associative array similar to the + /* Converts the output of SAX parser into a PHP associative array similar to the * DOM parser output */ + /** + * @param $vals + * + * @return array + */ function UpdateRecursive($vals) { $this->global_index++; //Reached end of array @@ -158,11 +175,17 @@ class XmlParser { } /* Returns the root of the XML data */ + /** + * @return string + */ function GetRoot() { return $this->root; } /* Returns the array representing the XML data */ + /** + * @return array + */ function GetData() { return $this->params; } diff --git a/tools/extensions/org.civicrm.report.baykeeper/Baykeeper.php b/tools/extensions/org.civicrm.report.baykeeper/Baykeeper.php index ea23254532..69a95cd433 100755 --- a/tools/extensions/org.civicrm.report.baykeeper/Baykeeper.php +++ b/tools/extensions/org.civicrm.report.baykeeper/Baykeeper.php @@ -38,6 +38,10 @@ require_once 'CRM/Contribute/PseudoConstant.php'; require_once 'CRM/Core/OptionGroup.php'; require_once 'CRM/Event/BAO/Participant.php'; require_once 'CRM/Contact/BAO/Contact.php'; + +/** + * Class CRM_Report_Form_Contribute_Baykeeper + */ class CRM_Report_Form_Contribute_Baykeeper extends CRM_Report_Form { protected $_addressField = FALSE; @@ -47,6 +51,9 @@ class CRM_Report_Form_Contribute_Baykeeper extends CRM_Report_Form { protected $_customGroupExtends = array('Contact', 'Contribution'); + /** + * + */ function __construct() { $this->_columns = array('civicrm_contact' => array('dao' => 'CRM_Contact_DAO_Contact', @@ -400,26 +407,26 @@ class CRM_Report_Form_Contribute_Baykeeper extends CRM_Report_Form { $this->_from = " FROM civicrm_contact {$this->_aliases['civicrm_contact']} {$this->_aclFrom} - $contribJoin JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']} + $contribJoin JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']} ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_contribution']}.contact_id AND {$this->_aliases['civicrm_contribution']}.is_test = 0 - $contribJoin JOIN (SELECT c.id, IF(COUNT(oc.id) = 0, 0, 1) AS ordinality FROM civicrm_contribution c LEFT JOIN civicrm_contribution oc ON c.contact_id = oc.contact_id AND oc.receive_date < c.receive_date GROUP BY c.id) {$this->_aliases['civicrm_contribution_ordinality']} + $contribJoin JOIN (SELECT c.id, IF(COUNT(oc.id) = 0, 0, 1) AS ordinality FROM civicrm_contribution c LEFT JOIN civicrm_contribution oc ON c.contact_id = oc.contact_id AND oc.receive_date < c.receive_date GROUP BY c.id) {$this->_aliases['civicrm_contribution_ordinality']} ON {$this->_aliases['civicrm_contribution_ordinality']}.id = {$this->_aliases['civicrm_contribution']}.id - LEFT JOIN civicrm_note {$this->_aliases['civicrm_note']} + LEFT JOIN civicrm_note {$this->_aliases['civicrm_note']} ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_note']}.contact_id AND {$this->_aliases['civicrm_contribution']}.id = {$this->_aliases['civicrm_note']}.entity_id ) - LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']} - ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND + LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']} + ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND {$this->_aliases['civicrm_phone']}.is_primary = 1) LEFT JOIN civicrm_contact {$alias_employer} - ON {$this->_aliases['civicrm_contact']}.employer_id = - {$alias_employer}.id - LEFT JOIN civicrm_contribution_soft {$this->_aliases['civicrm_contribution_soft']} - ON {$this->_aliases['civicrm_contribution_soft']}.contribution_id = + ON {$this->_aliases['civicrm_contact']}.employer_id = + {$alias_employer}.id + LEFT JOIN civicrm_contribution_soft {$this->_aliases['civicrm_contribution_soft']} + ON {$this->_aliases['civicrm_contribution_soft']}.contribution_id = {$this->_aliases['civicrm_contribution']}.id LEFT JOIN civicrm_contact {$alias_creditor} - ON {$this->_aliases['civicrm_contribution_soft']}.contact_id = - {$alias_creditor}.id - LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact_hon_mem']} + ON {$this->_aliases['civicrm_contribution_soft']}.contact_id = + {$alias_creditor}.id + LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact_hon_mem']} ON {$this->_aliases['civicrm_contribution']}.honor_contact_id = {$this->_aliases['civicrm_contact_hon_mem']}.id "; // add group - concatenated @@ -428,15 +435,15 @@ class CRM_Report_Form_Contribute_Baykeeper extends CRM_Report_Form { if ($this->_addressField OR (!empty($this->_params['state_province_id_value']) OR !empty($this->_params['country_id_value']))) { $this->_from .= " - LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} - ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_address']}.contact_id AND + LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} + ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_address']}.contact_id AND {$this->_aliases['civicrm_address']}.is_primary = 1\n"; } if ($this->_emailField) { - $this->_from .= " - LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']} - ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND + $this->_from .= " + LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']} + ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND {$this->_aliases['civicrm_email']}.is_primary = 1\n"; } } @@ -449,6 +456,11 @@ class CRM_Report_Form_Contribute_Baykeeper extends CRM_Report_Form { $this->_orderBy = " ORDER BY {$this->_aliases['civicrm_contact']}.id, {$this->_aliases['civicrm_contribution']}.receive_date "; } + /** + * @param $rows + * + * @return array + */ function statistics(&$rows) { $statistics = parent::statistics($rows); // because the query returns groups, the amount is multiplied by the number of groups a contact is in @@ -488,6 +500,9 @@ class CRM_Report_Form_Contribute_Baykeeper extends CRM_Report_Form { parent::postProcess(); } + /** + * @param $rows + */ function alterDisplay(&$rows) { require_once 'CRM/Contribute/BAO/Contribution/Utils.php'; diff --git a/tools/extensions/org.civicrm.report.grant/Grant.php b/tools/extensions/org.civicrm.report.grant/Grant.php index d35150f92a..5de3cd4c09 100644 --- a/tools/extensions/org.civicrm.report.grant/Grant.php +++ b/tools/extensions/org.civicrm.report.grant/Grant.php @@ -34,10 +34,17 @@ */ require_once 'CRM/Report/Form.php'; + +/** + * Class org_civicrm_report_grant + */ class org_civicrm_report_grant extends CRM_Report_Form { protected $_addressField = FALSE; + /** + * + */ function __construct() { $this->_columns = array( 'civicrm_contact' => @@ -233,13 +240,13 @@ class org_civicrm_report_grant extends CRM_Report_Form { function from() { $this->_from = " FROM civicrm_grant {$this->_aliases['civicrm_grant']} - LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact']} + LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact']} ON ({$this->_aliases['civicrm_grant']}.contact_id = {$this->_aliases['civicrm_contact']}.id ) "; if ($this->_addressField) { $this->_from .= " - LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} - ON {$this->_aliases['civicrm_contact']}.id = - {$this->_aliases['civicrm_address']}.contact_id AND + LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} + ON {$this->_aliases['civicrm_contact']}.id = + {$this->_aliases['civicrm_address']}.contact_id AND {$this->_aliases['civicrm_address']}.is_primary = 1\n"; } } @@ -301,6 +308,9 @@ class org_civicrm_report_grant extends CRM_Report_Form { } } + /** + * @param $rows + */ function alterDisplay(&$rows) { // custom code to alter rows $entryFound = FALSE; diff --git a/tools/extensions/org.civicrm.search.activity/ActivitySearch.php b/tools/extensions/org.civicrm.search.activity/ActivitySearch.php index e85f4cebd8..336aa10801 100644 --- a/tools/extensions/org.civicrm.search.activity/ActivitySearch.php +++ b/tools/extensions/org.civicrm.search.activity/ActivitySearch.php @@ -34,10 +34,17 @@ */ require_once 'CRM/Contact/Form/Search/Interface.php'; + +/** + * Class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface + */ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { protected $_formValues; + /** + * @param $formValues + */ function __construct(&$formValues) { $this->_formValues = $formValues; @@ -86,6 +93,9 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { //end custom fields } + /** + * @param $form + */ function buildForm(&$form) { /** @@ -223,27 +233,33 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { // Alters the date display in the Activity Date Column. We do this after we already have // the result so that sorting on the date column stays pertinent to the numeric date value + /** + * @param $row + */ function alterRow(&$row) { $row['activity_date'] = CRM_Utils_Date::customFormat($row['activity_date'], '%B %E%f, %Y %l:%M %P'); } // Regular JOIN statements here to limit results to contacts who have activities. + /** + * @return string + */ function from() { return " civicrm_contact contact_a - JOIN civicrm_activity activity + JOIN civicrm_activity activity ON contact_a.id = activity.source_contact_id - JOIN civicrm_option_value ov1 + JOIN civicrm_option_value ov1 ON activity.activity_type_id = ov1.value AND ov1.option_group_id = 2 - JOIN civicrm_option_value ov2 + JOIN civicrm_option_value ov2 ON activity.status_id = ov2.value AND ov2.option_group_id = {$this->_groupId} - JOIN civicrm_contact contact_b + JOIN civicrm_contact contact_b ON activity.source_contact_id = contact_b.id - LEFT JOIN civicrm_case_activity cca + LEFT JOIN civicrm_case_activity cca ON activity.id = cca.activity_id - LEFT JOIN civicrm_activity_assignment assignment + LEFT JOIN civicrm_activity_assignment assignment ON activity.id = assignment.activity_id - LEFT JOIN civicrm_contact contact_c + LEFT JOIN civicrm_contact contact_c ON assignment.assignee_contact_id = contact_c.id "; } @@ -251,6 +267,11 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values * */ + /** + * @param bool $includeContactIDs + * + * @return string + */ function where($includeContactIDs = FALSE) { $clauses = array(); @@ -259,8 +280,8 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { if (!empty($contactname)) { $dao = new CRM_Core_DAO(); $contactname = $dao->escape($contactname); - $clauses[] = "(contact_a.sort_name LIKE '%{$contactname}%' OR - contact_b.sort_name LIKE '%{$contactname}%' OR + $clauses[] = "(contact_a.sort_name LIKE '%{$contactname}%' OR + contact_b.sort_name LIKE '%{$contactname}%' OR contact_c.display_name LIKE '%{$contactname}%')"; } @@ -321,9 +342,12 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { return implode(' AND ', $clauses); } - /* + /* * Functions below generally don't need to be modified */ + /** + * @return mixed + */ function count() { $sql = $this->all(); @@ -333,14 +357,27 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { return $dao->N; } + /** + * @param int $offset + * @param int $rowcount + * @param null $sort + * + * @return string + */ function contactIDs($offset = 0, $rowcount = 0, $sort = NULL) { return $this->all($offset, $rowcount, $sort, FALSE, TRUE); } + /** + * @return array + */ function &columns() { return $this->_columns; } + /** + * @param $title + */ function setTitle($title) { if ($title) { CRM_Utils_System::setTitle($title); @@ -350,6 +387,9 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { } } + /** + * @return null + */ function summary() { return NULL; } diff --git a/tools/extensions/org.civicrm.search.basic/Basic.php b/tools/extensions/org.civicrm.search.basic/Basic.php index 6f451d1a00..7e2a635f60 100644 --- a/tools/extensions/org.civicrm.search.basic/Basic.php +++ b/tools/extensions/org.civicrm.search.basic/Basic.php @@ -34,10 +34,17 @@ */ require_once 'CRM/Contact/Form/Search/Custom/Base.php'; + +/** + * Class org_civicrm_search_basic + */ class org_civicrm_search_basic extends CRM_Contact_Form_Search_Custom_BaseimplementsCRM_Contact_Form_Search_Interface { protected $_query; + /** + * @param $formValues + */ function __construct(&$formValues) { parent::__construct($formValues); @@ -95,6 +102,9 @@ class org_civicrm_search_basic extends CRM_Contact_Form_Search_Custom_Baseimplem return; } + /** + * @param $form + */ function buildForm(&$form) { //@todo FIXME - using the CRM_Core_DAO::VALUE_SEPARATOR creates invalid html - if you can find the form @@ -117,10 +127,21 @@ class org_civicrm_search_basic extends CRM_Contact_Form_Search_Custom_Baseimplem $form->assign('elements', array('sort_name', 'contact_type', 'group', 'tag')); } + /** + * @return CRM_Contact_DAO_Contact + */ function count() { return $this->_query->searchQuery(0, 0, NULL, TRUE); } + /** + * @param int $offset + * @param int $rowCount + * @param null $sort + * @param bool $includeContactIDs + * + * @return CRM_Contact_DAO_Contact + */ function all($offset = 0, $rowCount = 0, $sort = NULL, $includeContactIDs = FALSE ) { @@ -130,10 +151,18 @@ class org_civicrm_search_basic extends CRM_Contact_Form_Search_Custom_Baseimplem ); } + /** + * @return string + */ function from() { return $this->_query->_fromClause; } + /** + * @param bool $includeContactIDs + * + * @return string + */ function where($includeContactIDs = FALSE) { if ($whereClause = $this->_query->whereClause()) { return $whereClause; @@ -141,6 +170,9 @@ class org_civicrm_search_basic extends CRM_Contact_Form_Search_Custom_Baseimplem return ' (1) '; } + /** + * @return string + */ function templateFile() { return 'CRM/Contact/Form/Search/Basic.tpl'; } diff --git a/tools/extensions/org.civicrm.search.multivalue/MultiValue.php b/tools/extensions/org.civicrm.search.multivalue/MultiValue.php index 59198cb7a3..4fafd0cc37 100644 --- a/tools/extensions/org.civicrm.search.multivalue/MultiValue.php +++ b/tools/extensions/org.civicrm.search.multivalue/MultiValue.php @@ -34,12 +34,19 @@ */ require_once 'CRM/Contact/Form/Search/Custom/Base.php'; + +/** + * Class org_civicrm_search_multivalue + */ class org_civicrm_search_multivalue extends CRM_Contact_Form_Search_Custom_BaseimplementsCRM_Contact_Form_Search_Interface { protected $_groupTree; protected $_tables; protected $_options; + /** + * @param $formValues + */ function __construct(&$formValues) { parent::__construct($formValues); @@ -86,6 +93,9 @@ class org_civicrm_search_multivalue extends CRM_Contact_Form_Search_Custom_Basei } } + /** + * @param $form + */ function buildForm(&$form) { /** @@ -114,10 +124,21 @@ class org_civicrm_search_multivalue extends CRM_Contact_Form_Search_Custom_Basei } } + /** + * @return null + */ function summary() { return NULL; } + /** + * @param int $offset + * @param int $rowcount + * @param null $sort + * @param bool $includeContactIDs + * + * @return mixed + */ function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE ) { @@ -150,6 +171,9 @@ contact_a.sort_name as sort_name, ); } + /** + * @return string + */ function from() { $from = "FROM civicrm_contact contact_a"; $customFrom = array(); @@ -162,6 +186,11 @@ contact_a.sort_name as sort_name, return $from; } + /** + * @param bool $includeContactIDs + * + * @return mixed + */ function where($includeContactIDs = FALSE) { $count = 1; $clause = array(); @@ -186,14 +215,23 @@ contact_a.sort_name as sort_name, return $this->whereClause($where, $params); } + /** + * @return string + */ function templateFile() { return 'MultipleValues.tpl'; } + /** + * @return array + */ function setDefaultValues() { return array(); } + /** + * @param $row + */ function alterRow(&$row) { foreach ($this->_options as $fieldID => $values) { $customVal = $valueSeparatedArray = array(); @@ -245,6 +283,9 @@ contact_a.sort_name as sort_name, } } + /** + * @param $title + */ function setTitle($title) { CRM_Utils_System::setTitle($title); } diff --git a/tools/extensions/org.civicrm.sms.clickatell/clickatell.civix.php b/tools/extensions/org.civicrm.sms.clickatell/clickatell.civix.php index db6c635fb0..d68aadb024 100644 --- a/tools/extensions/org.civicrm.sms.clickatell/clickatell.civix.php +++ b/tools/extensions/org.civicrm.sms.clickatell/clickatell.civix.php @@ -95,6 +95,9 @@ function _clickatell_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { } } +/** + * @return null + */ function _clickatell_civix_upgrader() { if (!file_exists(__DIR__.'/CRM/Clickatell/Upgrader.php')) { return NULL; diff --git a/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php b/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php index 947b0f64d4..926d159c91 100644 --- a/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php +++ b/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php @@ -208,6 +208,13 @@ class org_civicrm_sms_clickatell extends CRM_SMS_Provider { } } + /** + * @param $url + * @param $postDataArray + * @param null $id + * + * @return object|string + */ function formURLPostData($url, &$postDataArray, $id = NULL) { $url = $this->_providerInfo['api_url'] . $url; $postDataArray['session_id'] = $this->_sessionID; @@ -306,6 +313,9 @@ class org_civicrm_sms_clickatell extends CRM_SMS_Provider { } } + /** + * @return bool + */ function callback() { $apiMsgID = $this->retrieve('apiMsgId', 'String'); @@ -394,6 +404,9 @@ class org_civicrm_sms_clickatell extends CRM_SMS_Provider { return FALSE; } + /** + * @return $this|null|object + */ function inbound() { $like = ""; $fromPhone = $this->retrieve('from', 'String'); diff --git a/tools/scripts/solr/createSolrJSON.php b/tools/scripts/solr/createSolrJSON.php index 97dcb25c22..a343cbf89c 100644 --- a/tools/scripts/solr/createSolrJSON.php +++ b/tools/scripts/solr/createSolrJSON.php @@ -105,6 +105,11 @@ function &generateSolrJSON($values) { return $result; } +/** + * @param $value + * + * @return mixed + */ function escapeJsonString($value) { $escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); $replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); @@ -130,6 +135,14 @@ function getValues(&$contactIDs, &$values) { return $values; } +/** + * @param $contactIDs + * @param $values + * @param $tableName + * @param $fields + * @param $whereField + * @param null $additionalWhereCond + */ function getTableInfo(&$contactIDs, &$values, $tableName, &$fields, $whereField, $additionalWhereCond = NULL) { $selectString = implode(',', array_keys($fields)); $idString = implode(',', $contactIDs); @@ -153,6 +166,10 @@ SELECT $selectString, $whereField as contact_id } } +/** + * @param $contactIDs + * @param $values + */ function getContactInfo(&$contactIDs, &$values) { $fields = array('sort_name' => NULL, 'display_name' => NULL, @@ -170,6 +187,10 @@ function getContactInfo(&$contactIDs, &$values) { getTableInfo($contactIDs, $values, 'civicrm_contact', $fields, 'id'); } +/** + * @param $contactIDs + * @param $values + */ function getNoteInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -191,6 +212,10 @@ AND entity_table = 'civicrm_contact' } } +/** + * @param $contactIDs + * @param $values + */ function getPhoneInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -205,7 +230,7 @@ INNER JOIN civicrm_phone p ON p.contact_id = c.id LEFT JOIN civicrm_location_type l ON p.location_type_id = l.id LEFT JOIN civicrm_option_group g ON g.name = 'phone_type' LEFT JOIN civicrm_option_value v ON v.option_group_id = g.id AND p.phone_type_id = v.value -WHERE c.id IN ( $ids ) +WHERE c.id IN ( $ids ) AND p.phone IS NOT NULL "; @@ -227,6 +252,10 @@ AND p.phone IS NOT NULL } } +/** + * @param $contactIDs + * @param $values + */ function getEmailInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -238,7 +267,7 @@ SELECT FROM civicrm_contact c INNER JOIN civicrm_email e ON e.contact_id = c.id LEFT JOIN civicrm_location_type l ON e.location_type_id = l.id -WHERE c.id IN ( $ids ) +WHERE c.id IN ( $ids ) AND e.email IS NOT NULL "; @@ -255,13 +284,17 @@ AND e.email IS NOT NULL } } +/** + * @param $contactIDs + * @param $values + */ function getAddressInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); $sql = " SELECT c.id as contact_id, l.name as location_type, a.street_address, a.supplemental_address_1, a.supplemental_address_2, - a.city, a.postal_code, + a.city, a.postal_code, s.name as state, co.name as country FROM civicrm_contact c INNER JOIN civicrm_address a ON a.contact_id = c.id @@ -294,6 +327,12 @@ WHERE c.id IN ( $ids ) } } +/** + * @param $values + * @param $contactID + * @param $name + * @param $value + */ function appendValue(&$values, $contactID, $name, $value) { if (empty($value)) { return; @@ -312,6 +351,9 @@ function appendValue(&$values, $contactID, $name, $value) { } } +/** + * @param $contactIDs + */ function run(&$contactIDs) { $chunks = &splitContactIDs($contactIDs); @@ -329,7 +371,7 @@ $config->userFrameworkClass = 'CRM_Utils_System_Soap'; $config->userHookClass = 'CRM_Utils_Hook_Soap'; $sql = << NULL, 'display_name' => NULL, @@ -168,6 +180,10 @@ function getContactInfo(&$contactIDs, &$values) { getTableInfo($contactIDs, $values, 'civicrm_note', $fields, 'entity_id', "entity_table = 'civicrm_contact'"); } +/** + * @param $contactIDs + * @param $values + */ function getLocationInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -175,7 +191,7 @@ function getLocationInfo(&$contactIDs, &$values) { SELECT l.entity_id as contact_id, l.name as location_name, a.street_address, a.supplemental_address_1, a.supplemental_address_2, - a.city, a.postal_code, + a.city, a.postal_code, co.name as county, s.name as state, c.name as country, e.email, p.phone, i.name as im FROM @@ -206,6 +222,9 @@ WHERE l.entity_table = 'civicrm_contact' } } +/** + * @param $contactIDs + */ function run(&$contactIDs) { $chunks = &splitContactIDs($contactIDs); @@ -223,7 +242,7 @@ $config->userFrameworkClass = 'CRM_Utils_System_Soap'; $config->userHookClass = 'CRM_Utils_Hook_Soap'; $sql = <<free(); } +/** + * @param $contactIDs + * @param $values + */ function getContactInfo(&$contactIDs, &$values) { $fields = array('id' => NULL, 'sort_name' => NULL, @@ -138,6 +151,10 @@ function getContactInfo(&$contactIDs, &$values) { getTableInfo($contactIDs, $values, 'civicrm_contact', $fields, 'id', NULL, TRUE); } +/** + * @param $contactIDs + * @param $values + */ function getNoteInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -164,6 +181,10 @@ AND entity_table = 'civicrm_contact' $dao->free(); } +/** + * @param $contactIDs + * @param $values + */ function getPhoneInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -179,7 +200,7 @@ INNER JOIN civicrm_phone p ON p.contact_id = c.id LEFT JOIN civicrm_location_type l ON p.location_type_id = l.id LEFT JOIN civicrm_option_group g ON g.name = 'phone_type' LEFT JOIN civicrm_option_value v ON v.option_group_id = g.id AND p.phone_type_id = v.value -WHERE c.id IN ( $ids ) +WHERE c.id IN ( $ids ) AND p.phone IS NOT NULL "; @@ -197,6 +218,10 @@ AND p.phone IS NOT NULL $dao->free(); } +/** + * @param $contactIDs + * @param $values + */ function getEmailInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -209,7 +234,7 @@ SELECT FROM civicrm_contact c INNER JOIN civicrm_email e ON e.contact_id = c.id LEFT JOIN civicrm_location_type l ON e.location_type_id = l.id -WHERE c.id IN ( $ids ) +WHERE c.id IN ( $ids ) AND e.email IS NOT NULL "; @@ -225,6 +250,10 @@ AND e.email IS NOT NULL $dao->free(); } +/** + * @param $contactIDs + * @param $values + */ function getAddressInfo(&$contactIDs, &$values) { $ids = implode(',', $contactIDs); @@ -232,7 +261,7 @@ function getAddressInfo(&$contactIDs, &$values) { SELECT a.id as id, c.id as contact_id, l.name as location_type, a.street_address, a.supplemental_address_1, a.supplemental_address_2, - a.city, a.postal_code, + a.city, a.postal_code, s.name as state, co.name as country FROM civicrm_contact c INNER JOIN civicrm_address a ON a.contact_id = c.id @@ -263,6 +292,12 @@ WHERE c.id IN ( $ids ) $dao->free(); } +/** + * @param $contactIDs + * @param $values + * @param $allContactIDs + * @param $additionalContacts + */ function getRelationshipInfo(&$contactIDs, &$values, &$allContactIDs, &$additionalContacts) { // handle relationships only once static $_relationshipsHandled = array(); @@ -309,6 +344,12 @@ function getRelationshipInfo(&$contactIDs, &$values, &$allContactIDs, &$addition $dao->free(); } +/** + * @param $contactIDs + * @param $values + * @param $allContactIDs + * @param $additionalContacts + */ function getActivityInfo(&$contactIDs, &$values, &$allContactIDs, &$additionalContacts) { static $_activitiesHandled = array(); @@ -393,6 +434,13 @@ function getActivityInfo(&$contactIDs, &$values, &$allContactIDs, &$additionalCo addAdditionalContacts($activityContacts, $allContactIDs, $additionalContacts); } +/** + * @param $values + * @param $id + * @param $name + * @param $value + * @param bool $ignored + */ function appendValue(&$values, $id, $name, $value, $ignored = FALSE) { if (empty($value)) { return; @@ -405,6 +453,11 @@ function appendValue(&$values, $id, $name, $value, $ignored = FALSE) { $values[$name][] = array_values($value); } +/** + * @param $daoName + * + * @return mixed + */ function getDBFields($daoName) { static $_fieldsRetrieved = array(); @@ -429,6 +482,11 @@ function getDBFields($daoName) { return $_fieldsRetrieved[$daoName]; } +/** + * @param $contactIDs + * @param $allContactIDs + * @param $additionalContacts + */ function addAdditionalContacts($contactIDs, &$allContactIDs, &$additionalContacts) { foreach ($contactIDs as $cid) { if ($cid && @@ -440,6 +498,11 @@ function addAdditionalContacts($contactIDs, &$allContactIDs, &$additionalContact } } +/** + * @param $values + * @param $contactIDs + * @param $allContactIDs + */ function run(&$values, &$contactIDs, &$allContactIDs) { $chunks = &splitContactIDs($contactIDs); @@ -461,7 +524,7 @@ $config->userFrameworkClass = 'CRM_Utils_System_Soap'; $config->userHookClass = 'CRM_Utils_Hook_Soap'; $sql = " -SELECT id +SELECT id FROM civicrm_contact LIMIT 10 "; diff --git a/tools/sites/stats/graphs.php b/tools/sites/stats/graphs.php index 1d0b291a54..2f40f595f8 100644 --- a/tools/sites/stats/graphs.php +++ b/tools/sites/stats/graphs.php @@ -1,4 +1,9 @@ $trend, 'last' => $pie); } +/** + * @param $query + * + * @return array + */ function trend($query) { $data = array(); $result = mysql_query($query); -- 2.25.1