* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
// note this also resets any ACL cache
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_ACL_DAO_EntityRole', $id, 'is_active', $is_active);
$defaults['target_contact_id'] = $this->_contactIds;
}
- // CRM-15472 - 50 is around the practial limit of how many items a select2 entityRef can handle
+ // CRM-15472 - 50 is around the practical limit of how many items a select2 entityRef can handle
if (!empty($defaults['target_contact_id'])) {
$count = count(is_array($defaults['target_contact_id']) ? $defaults['target_contact_id'] : explode(',', $defaults['target_contact_id']));
if ($count > 50) {
// add all the necessary variables to the form
$parser->set($this, CRM_Import_Parser::MODE_IMPORT);
- // check if there is any error occured
+ // check if there is any error occurred
$errorStack = CRM_Core_Error::singleton();
$errors = $errorStack->getErrors();
$caseRelationships[$key]['relation'] = $caseRoles[$value['relation_type']];
unset($caseRoles[$value['relation_type']]);
}
- // mark orginal case relationships record to use on setting edit links below
+ // mark original case relationships record to use on setting edit links below
$caseRelationships[$key]['source'] = 'caseRel';
}
}
$this->assign('localExtensionRows', $localExtensionRows);
- // build list of availabe downloads
+ // build list of available downloads
$remoteExtensionRows = array();
foreach (CRM_Extension_System::singleton()->getBrowser()->getExtensions() as $info) {
$row = (array) $info;
}
/**
- * Funtion to create structure and add meta data according to layout.
+ * Function to create structure and add meta data according to layout.
*
* @param array $row
* Row element that needs to be formatted.
* Value we want to set the is_active field.
*
* @return CRM_Campaign_DAO_Campaign|null
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Campaign_DAO_Campaign', $id, 'is_active', $is_active);
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Campaign_DAO_Survey', $id, 'is_active', $is_active);
}
}
- //set survey activites as deleted = true.
+ //set survey activities as deleted = true.
if (!empty($deleteActivityIds)) {
$query = 'UPDATE civicrm_activity SET is_deleted = 1 WHERE id IN ( ' . implode(', ', $deleteActivityIds) . ' )';
CRM_Core_DAO::executeQuery($query);
*
* @param string $name
* @param array $definition
- * The case-type defintion expressed as an array-tree.
+ * The case-type definition expressed as an array-tree.
* @return string
* XML
*/
$className::endPostProcess($this, $params);
}
- // 5. auto populate activites
+ // 5. auto populate activities
// 6. set status
CRM_Core_Session::setStatus($params['statusMsg'], ts('Saved'), 'success');
return FALSE;
}
- // next get activity set Informtion
+ // next get activity set Information
$activitySet = array(
'label' => $form->getActivitySetLabel($xml, $activitySetName),
'includeActivities' => 'All',
$contact = self::add($params);
if (!$contact) {
- // Not dying here is stupid, since we get into wierd situation and into a bug that
+ // Not dying here is stupid, since we get into weird situation and into a bug that
// is impossible to figure out for the user or for us
// CRM-7925
CRM_Core_Error::fatal();
/**
* This function create the hidden smart group when user perform
- * contact seach and want to send mailing to search contacts.
+ * contact search and want to send mailing to search contacts.
*
* @param array $params
* ( reference ) an assoc array of name/value pairs.
// need to return id, title (w/ spacer), description, visibility
// We need to build a list of tags ordered by hierarchy and sorted by
- // name. The heirarchy will be communicated by an accumulation of
+ // name. The hierarchy will be communicated by an accumulation of
// separators in front of the name to give it a visual offset.
// Instead of recursively making mysql queries, we'll make one big
- // query and build the heirarchy with the algorithm below.
+ // query and build the hierarchy with the algorithm below.
$groups = array();
$args = array(1 => array($groupIdString, 'String'));
$query = "
$groupIDs = array($groupIDs);
}
- // note escapeString is a must here and we can't send the imploded value as second arguement to
+ // note escapeString is a must here and we can't send the imploded value as second argument to
// the executeQuery(), since that would put single quote around the string and such a string
// of comma separated integers would not work.
$groupIDString = CRM_Core_DAO::escapeString(implode(', ', $groupIDs));
self::$_alreadyLoaded[$groupID] = 1;
- // we now have the lock, but some other proces could have actually done the work
+ // we now have the lock, but some other process could have actually done the work
// before we got here, so before we do any work, lets ensure that work needs to be
// done
// we allow hidden groups here since we dont know if the caller wants to evaluate an
if (!$nextGroup) {
// no sibling, find an ancestor w/ a sibling
for (;;) {
- // since we pop this array everytime, we should be
+ // since we pop this array every time, we should be
// reasonably safe from infinite loops, I think :)
$ancestor = array_pop($this->_parentStack);
$this->_current = &$ancestor;
}
if (self::checkCyclicGraph($tree)) {
- CRM_Core_Error::fatal(ts('We detected a cycle which we cant handle. aborting'));
+ CRM_Core_Error::fatal(ts('We detected a cycle which we can't handle. aborting'));
}
// first reset the current cache entries
* @return bool
*/
public static function checkCyclicGraph(&$tree) {
- // lets keep this simple, we should probably use a graph algoritm here at some stage
+ // lets keep this simple, we should probably use a graph algorithm here at some stage
// foreach group that has a parent or a child, ensure that
// the ancestors and descendants dont intersect
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Contact_DAO_RelationshipType', $id, 'is_active', $is_active);
CRM_Core_Session::setStatus($message);
// see if we can figure out the url and redirect to the right search form
- // note that this happens really early on, so we cant use any of the form or controller
+ // note that this happens really early on, so we can't use any of the form or controller
// variables
$config = CRM_Core_Config::singleton();
$qString = $_GET[$config->userFrameworkURLVar];
* of key value consist of address blocks.
*
* @return array
- * as array of sucess/fails for each address block
+ * as array of success/fails for each address block
*/
public function parseAddress(&$params) {
$parseSuccess = $parsedFields = array();
// check for state/country mapping
$errors = CRM_Contact_Form_Edit_Address::formRule($fields, CRM_Core_DAO::$_nullArray, CRM_Core_DAO::$_nullObject);
// $errors === TRUE means no errors from above formRule excution,
- // so declaring $errors to array for futher processing
+ // so declaring $errors to array for further processing
if ($errors === TRUE) {
$errors = array();
}
* @return void
*/
public static function buildQuickForm(&$form) {
- // since the pcm - preferred comminication method is logically
+ // since the pcm - preferred communication method is logically
// grouped hence we'll use groups of HTML_QuickForm
// checkboxes for DO NOT phone, email, mail
*/
/**
- * Auxilary class to provide support to the Contact Form class. Does this by implementing
+ * Auxiliary class to provide support to the Contact Form class. Does this by implementing
* a small set of static methods
*
*/
*/
/**
- * Auxilary class to provide support to the Contact Form class. Does this by implementing
+ * Auxiliary class to provide support to the Contact Form class. Does this by implementing
* a small set of static methods
*
*/
*/
/**
- * Auxilary class to provide support for locking (and ignoring locks on)
+ * Auxiliary class to provide support for locking (and ignoring locks on)
* contact records.
*/
class CRM_Contact_Form_Edit_Lock {
*/
/**
- * Auxilary class to provide support to the Contact Form class. Does this by implementing
+ * Auxiliary class to provide support to the Contact Form class. Does this by implementing
* a small set of static methods
*
*/
*/
/**
- * Auxilary class to provide support for locking (and ignoring locks on)
+ * Auxiliary class to provide support for locking (and ignoring locks on)
* contact records.
*/
class CRM_Contact_Form_Inline_Lock {
// need to perform action on only selected contacts
$insertString = array();
- // refire sql in case of custom seach
+ // refire sql in case of custom search
if ($form->_action == CRM_Core_Action::COPY) {
// selected contacts only
// need to perform action on only selected contacts
$updateMappingFields->name = $mapper[$i];
$updateMappingFields->relationship_type_id = 'NULL';
$updateMappingFields->relationship_type_direction = 'NULL';
- // to store phoneType id and provider id seperately
+ // to store phoneType id and provider id separately
// before updating mappingFields for phone and IM, CRM-3140
if (CRM_Utils_Array::value('0', $mapperKeys[$i]) == 'url') {
$updateMappingFields->website_type_id = isset($mapperKeys[$i][1]) ? $mapperKeys[$i][1] : NULL;
$saveMappingFields->name = ucwords(str_replace("_", " ", $mapperKeys[$i][1]));
$saveMappingFields->relationship_type_id = $id;
$saveMappingFields->relationship_direction = "{$first}_{$second}";
- // to get phoneType id and provider id seperately
+ // to get phoneType id and provider id separately
// before saving mappingFields of phone and IM for related contact, CRM-3140
if (CRM_Utils_Array::value('1', $mapperKeys[$i]) == 'url') {
$saveMappingFields->website_type_id = isset($mapperKeys[$i][2]) ? $mapperKeys[$i][2] : NULL;
else {
$saveMappingFields->name = $mapper[$i];
$location_id = array_keys($locationTypes, $locations[$i]);
- // to get phoneType id and provider id seperately
+ // to get phoneType id and provider id separately
// before saving mappingFields of phone and IM, CRM-3140
if (CRM_Utils_Array::value('0', $mapperKeys[$i]) == 'url') {
$saveMappingFields->website_type_id = isset($mapperKeys[$i][1]) ? $mapperKeys[$i][1] : NULL;
// add all the necessary variables to the form
$importJob->setFormVariables($this);
- // check if there is any error occured
+ // check if there is any error occurred
$errorStack = CRM_Core_Error::singleton();
$errors = $errorStack->getErrors();
$errorMessage = array();
// add all the necessary variables to the form
$parser->set($this, CRM_Import_Parser::MODE_IMPORT);
- // check if there is any error occured
+ // check if there is any error occurred
$errorStack = CRM_Core_Error::singleton();
$errors = $errorStack->getErrors();
$config->userSystem->checkUserNameEmailExists($params, $errors);
if (isset($errors['cms_name']) || isset($errors['name'])) {
- //user name is not availble
+ //user name is not available
$user = array('name' => 'no');
CRM_Utils_JSON::output($user);
}
else {
$cid = CRM_Utils_Array::value('cid', $_GET);
if ($cid) {
- //check cid for interger
+ //check cid for integer
$contIDS = explode(',', $cid);
foreach ($contIDS as $contID) {
CRM_Utils_Type::escape($contID, 'Integer');
else {
$cid = CRM_Utils_Array::value('cid', $_GET);
if ($cid) {
- //check cid for interger
+ //check cid for integer
$contIDS = explode(',', $cid);
foreach ($contIDS as $contID) {
CRM_Utils_Type::escape($contID, 'Integer');
$params['entity_id'] = $financialTxn->id;
}
}
- // record line items and finacial items
+ // record line items and financial items
if (empty($params['skipLineItem'])) {
CRM_Price_BAO_LineItem::processPriceSet($entityId, CRM_Utils_Array::value('line_item', $params), $params['contribution'], $entityTable, $update);
}
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
if (!$is_active) {
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Premium', $id, 'premiums_active ', $is_active);
self::preProcessPaymentOptions($this);
- // Make the contributionPageID avilable to the template
+ // Make the contributionPageID available to the template
$this->assign('contributionPageID', $this->_id);
$this->assign('isShare', CRM_Utils_Array::value('is_share', $this->_values));
$this->assign('isConfirmEnabled', CRM_Utils_Array::value('is_confirm_enabled', $this->_values));
$priceFieldIDS['id'] = $fields['priceSetId'];
$self->set('memberPriceFieldIDS', $priceFieldIDS);
$count = CRM_Price_BAO_PriceSet::getMembershipCount($ids);
- foreach ($count as $id => $occurance) {
- if ($occurance > 1) {
+ foreach ($count as $id => $occurrence) {
+ if ($occurrence > 1) {
$errors['_qf_default'] = ts('You have selected multiple memberships for the same organization or entity. Please review your selections and choose only one membership per entity. Contact the site administrator if you need assistance.');
}
}
$values['contribution_page_title'] = CRM_Utils_Array::value(CRM_Utils_Array::value('contribution_page_id', $values), $contribPages);
}
- // get recieved into i.e to_financial_account_id from last trxn
+ // get received into i.e to_financial_account_id from last trxn
$financialTrxnId = CRM_Core_BAO_FinancialTrxn::getFinancialTrxnId($values['contribution_id'], 'DESC');
$values['to_financial_account'] = '';
if (!empty($financialTrxnId['financialTrxnId'])) {
*/
public static function fixAddress(&$params) {
if (!empty($params['billing_street_address'])) {
- //Check address is comming from online contribution / registration page
+ //Check address is coming from online contribution / registration page
//Fixed :CRM-5076
$billing = array(
'street_address' => 'billing_street_address',
if (!empty($params['is_primary'])) {
$sql = "UPDATE $table SET is_primary = 0 WHERE contact_id = %1";
$sqlParams = array(1 => array($contactId, 'Integer'));
- // we don't want to create unecessary entries in the log_ tables so exclude the one we are working on
+ // we don't want to create unnecessary entries in the log_ tables so exclude the one we are working on
if (!empty($params['id'])) {
$sql .= " AND id <> %2";
$sqlParams[2] = array($params['id'], 'Integer');
}
}
- //keep user preferred language upto date, CRM-7746
+ //keep user preferred language up to date, CRM-7746
$session = CRM_Core_Session::singleton();
$lcMessages = CRM_Utils_Array::value('lcMessages', $params);
if ($lcMessages && $session->get('userID')) {
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
// reset the cache
* To get the values of custom fields with IDs 13 and 43 for contact ID 1327, use:
* $params = array( 'entityID' => 1327, 'custom_13' => 1, 'custom_43' => 1 );
*
- * Entity Type will be infered by the custom fields you request
+ * Entity Type will be inferred by the custom fields you request
* Specify $params['entityType'] if you do not supply any custom fields to return
* and entity type is other than Contact
*
* Id of the entity usually the contactID.
*
* @return array
- * array of catagory id's the contact belongs to.
+ * array of category id's the contact belongs to.
*
*/
public static function getFinancialTrxnTotal($entity_id) {
* Name of the entity table usually 'civicrm_contact'.
*
* @return array
- * array of catagory id's the contact belongs to.
+ * array of category id's the contact belongs to.
*
*/
public static function getFinancialTrxnLineTotal($entity_id, $entity_table = 'civicrm_contribution') {
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
foreach ($sel1 as $key => $sel) {
if ($key) {
- // sort everything BUT the contactType which is sorted seperately by
+ // sort everything BUT the contactType which is sorted separately by
// an initial commit of CRM-13278 (check ksort above)
if (!in_array($key, $contactType)) {
asort($mapperFields[$key]);
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, NULL otherwise
+ * DAO object on success, NULL otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_MessageTemplate', $id, 'is_active', $is_active);
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionGroup', $id, 'is_active', $is_active);
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionValue', $id, 'is_active', $is_active);
* Value we want to set the is_active field.
*
* @return void
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
}
/**
- * This function iterates through when object criterias and
+ * This function iterates through when object criteria and
* generates recursive dates based on that
*
* @return array
}
/**
- * This function takes criterias saved in civicrm_action_schedule table
+ * This function takes criteria saved in civicrm_action_schedule table
* and creates recursion rule
*
* @param array $scheduleReminderDetails
- * Array of repeat criterias saved in civicrm_action_schedule table .
+ * Array of repeat criteria saved in civicrm_action_schedule table .
*
* @return object
* When object
$tags = array();
}
// We need to build a list of tags ordered by hierarchy and sorted by
- // name. The heirarchy will be communicated by an accumulation of
+ // name. The hierarchy will be communicated by an accumulation of
// separators in front of the name to give it a visual offset.
// Instead of recursively making mysql queries, we'll make one big
- // query and build the heirarchy with the algorithm below.
+ // query and build the hierarchy with the algorithm below.
$args = array(1 => array('%' . $usedFor . '%', 'String'));
$query = "SELECT id, name, parent_id, is_tagset, is_selectable
FROM civicrm_tag
*/
public static function del($id) {
// since this is a destructive operation, lets make sure
- // id is a postive number
+ // id is a positive number
CRM_Utils_Type::validate($id, 'Positive');
// delete all crm_entity_tag records with the selected tag id
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
//check if custom data profile field is disabled
* @param int $contactId
*
* @return array
- * assoicated formatted array
+ * associated formatted array
*/
public static function formatFields($params, $contactId = NULL) {
if ($contactId) {
class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch {
/**
- * Create UF Match, Note that thsi function is here in it's simplest form @ the moment
+ * Create UF Match, Note that this function is here in it's simplest form @ the moment
*
* @param $params
*
'nameColumn',
// Where clause snippet (will be joined to the rest of the query with AND operator)
'condition',
- // callback funtion incase of static arrays
+ // callback function incase of static arrays
'callback',
// Path to options edit form
'optionEditPath',
'key' => trim($this->value('key', $foreignXML)),
'import' => $this->value('import', $foreignXML, FALSE),
'export' => $this->value('import', $foreignXML, FALSE),
- // we do this matching in a seperate phase (resolveForeignKeys)
+ // we do this matching in a separate phase (resolveForeignKeys)
'className' => NULL,
'onDelete' => $this->value('onDelete', $foreignXML, FALSE),
);
*
* @param CRM_Core_StateMachine $stateMachine
* @param \const|int $action the mode in which the state machine is operating
- * typicaly this will be add/view/edit
+ * typically this will be add/view/edit
*
* @return void
*/
}
public function invalidKeyCommon() {
- $msg = ts('We can\'t load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site adminstrator for assistance.') . '<br /><br />' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '<br /><br />' . ts('Error type: Could not find a valid session key.');
+ $msg = ts('We can\'t load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.') . '<br /><br />' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '<br /><br />' . ts('Error type: Could not find a valid session key.');
CRM_Core_Error::fatal($msg);
}
break;
case CRM_Utils_Type::T_TIME:
- CRM_Core_Error::fatal('T_TIME shouldnt be used.');
+ CRM_Core_Error::fatal('T_TIME shouldn't be used.');
//$object->$dbName='000000';
//break;
case CRM_Utils_Type::T_CCNUM:
}
// the string is longer than the length and we need a uniq string
- // for the same tablename we need the same uniq string everytime
+ // for the same tablename we need the same uniq string every time
// hence we use md5 on the string, which is not random
// we'll append 8 characters to the end of the tableName
$md5string = substr(md5($string), 0, 8);
}
// call the form hook
- // also call the hook function so any modules can set thier own custom defaults
+ // also call the hook function so any modules can set their own custom defaults
// the user can do both the form and set default values with this hook
CRM_Utils_Hook::buildForm(get_class($this), $this);
}
$props += CRM_Utils_Array::value('html', $fieldSpec, array());
CRM_Utils_Array::remove($props, 'entity', 'name', 'context', 'label', 'action', 'type');
- // TODO: refactor switch statement, to seperate methods.
+ // TODO: refactor switch statement, to separate methods.
switch ($widget) {
case 'Text':
case 'Link':
}
}
catch (CRM_Extension_Exception $e) {
- // Intentionally not translating this string to avoid possible infinit loops
+ // Intentionally not translating this string to avoid possible infinite loops
// Only developers should see this string, if they made a mistake in their ts() usage.
CRM_Core_Session::setStatus('Unknown extension key in a translation string: ' . $key, '', 'error');
$this->_extensioncache[$key] = FALSE;
*/
public function hackyHandleBrokenCode($jobLog) {
if (stristr($this->_name, 'job')) {
- throw new CRM_Core_Exception('lock aquisition for ' . $this->_name . 'attempted when ' . $jobLog . 'is not released');
+ throw new CRM_Core_Exception('lock acquisition for ' . $this->_name . 'attempted when ' . $jobLog . 'is not released');
}
if (defined('CIVICRM_LOCK_DEBUG')) {
CRM_Core_Error::debug_log_message('(CRM-12856) faking lock for ' . $this->_name);
while ($newPath = array_shift($pathElements)) {
$currentPath = $currentPath ? ($currentPath . '/' . $newPath) : $newPath;
- // when we come accross breadcrumb which involves ids,
+ // when we come across breadcrumb which involves ids,
// we should skip now and later on append dynamically.
if (isset($menu[$currentPath]['skipBreadcrumb'])) {
continue;
* This function retrieves all the values for the specific option group by name
* this is primarily used to create various html based form elements
* (radio, select, checkbox etc). OptionGroups for most cases have the
- * 'label' in the label colum and the 'id' or 'name' in the value column
+ * 'label' in the label column and the 'id' or 'name' in the value column
*
* @param string $name
* name of the option group.
* This function retrieves all the values for the specific option group by id.
* this is primarily used to create various html based form elements
* (radio, select, checkbox etc). OptionGroups for most cases have the
- * 'label' in the label colum and the 'id' or 'name' in the value column
+ * 'label' in the label column and the 'id' or 'name' in the value column
*
* @param int $id
* id of the option group.
}
/*
- * recurpayment function does not compile an array & then proces it -
+ * recurpayment function does not compile an array & then process it -
* - the tpl does the transformation so adding call to hook here
* & giving it a change to act on the params array
*/
/**
* This function will take NVPString and convert it to an Associative Array and it will decode the response.
- * It is usefull to search for a particular key and displaying arrays.
+ * It is useful to search for a particular key and displaying arrays.
* @nvpstr is NVPString.
* @nvpArray is Associative Array.
*/
$result = array();
while (strlen($str)) {
- // postion of key
+ // position of key
$keyPos = strpos($str, '=');
// position of value
//List of Transaction Type
/*
recurring_payment_profile_created RP Profile Created
- recurring_payment RP Sucessful Payment
+ recurring_payment RP Successful Payment
recurring_payment_failed RP Failed Payment
recurring_payment_profile_cancel RP Profile Cancelled
recurring_payment_expired RP Profile Expired
recurring_payment_skipped RP Profile Skipped
- recurring_payment_outstanding_payment RP Sucessful Outstanding Payment
+ recurring_payment_outstanding_payment RP Successful Outstanding Payment
recurring_payment_outstanding_payment_failed RP Failed Outstanding Payment
recurring_payment_suspended RP Profile Suspended
recurring_payment_suspended_due_to_max_failed_payment RP Profile Suspended due to Max Failed Payment
curl_close($submit);
- // Tidy up the responce xml
+ // Tidy up the response xml
$response_xml = preg_replace("/[\s\t]/", " ", $response_xml);
$response_xml = preg_replace("/[\n\r]/", "", $response_xml);
| Plus a bit of our own code of course - Peter Barwell |
| contact PB@DolphinSoftware.com.au if required. |
| |
- | NOTE: This initial eWAY module does not yet allow for recuring |
+ | NOTE: This initial eWAY module does not yet allow for recurring |
| payments - contact Peter Barwell or add yourself (or both) |
| |
| NOTE: The eWAY gateway only allows a single currency per account |
// received an OK status from eWAY, but their Gateway has not returned the correct unique
// token - ie something is broken, BUT money has been taken from the client's account,
// so we can't very well error-out as CiviCRM will then not process the registration.
- // There is an error message commented out here but my prefered response to this unlikley
+ // There is an error message commented out here but my preferred response to this unlikley
// possibility is to email 'support@eWAY.com.au'
//-----------------------------------------------------------------------------------------------------
$eWayTrxnReference_OUT = $eWAYRequest->GetTransactionNumber();
// Test mode always returns trxn_id = 0 - so we fix that here
//
// NOTE: This code was taken from the AuthorizeNet payment processor, however it now appears
- // unecessary for the eWAY gateway - Left here in case it proves useful
+ // unnecessary for the eWAY gateway - Left here in case it proves useful
//----------------------------------------------------------------------------------------------------
if ( $this->_mode == 'test' ) {
$query = "SELECT MAX(trxn_id) FROM civicrm_contribution WHERE trxn_id LIKE 'test%'";
$condition .= " AND ( $additionalCond ) ";
}
- // CRM-7178. Make sure we only include payment processors valid in ths
+ // CRM-7178. Make sure we only include payment processors valid in this
// domain
$condition .= " AND domain_id = " . CRM_Core_Config::domainID();
$result = civicrm_api($entity, $action, $params);
unset($errorScope);
if ($result === FALSE) {
- $smarty->trigger_error("Unkown error");
+ $smarty->trigger_error("Unknown error");
return;
}
* Core StateMachine. All statemachines subclass for the core one
* for functionality specific to their needs.
*
- * A statemachine keeps track of differnt states and forms for a
+ * A statemachine keeps track of different states and forms for a
* html quickform controller.
*
*/
* use it again.
*
* @param string $callable
- * Should exception one paramter (CRM_Core_Transaction $tx).
+ * Should exception one parameter (CRM_Core_Transaction $tx).
* @return CRM_Core_Transaction
* @throws Exception
*/
* Set up variables to build the form.
*
* @return void
- * @acess protected
+ * @access protected
*/
public function preProcess() {
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive',
* Set up variables to build the form.
*
* @return void
- * @acess protected
+ * @access protected
*/
public function preProcess() {
$this->_id = $this->get('id');
* Set up variables to build the form.
*
* @return void
- * @acess protected
+ * @access protected
*/
public function preProcess() {
$this->_id = $this->get('id');
* Set up variables to build the form.
*
* @return void
- * @acess protected
+ * @access protected
*/
public function preProcess() {
$this->_srcFID = CRM_Utils_Request::retrieve('fid', 'Positive',
$this->assign('columnCount', $this->_columnCount);
$this->_dataValues = $this->get('dataValues');
- //Seperate column names from actual values.
+ //Separate column names from actual values.
$columnNames = $this->_dataValues[0];
//actual values need to be in 2d array ($array[$i][$j]) format to be parsed by the template.
$dataValues[] = $this->_dataValues[1];
// add all the necessary variables to the form
$parser->set($this, CRM_Import_Parser::MODE_IMPORT);
- // check if there is any error occured
+ // check if there is any error occurred
$errorStack = CRM_Core_Error::singleton();
$errors = $errorStack->getErrors();
if (substr_count($key, '.')) {
$last = explode('.', $key);
$last = array_pop($last);
- // make sure the first occurence is kept, not the last
+ // make sure the first occurrence is kept, not the last
if (!isset($flat[$last])) {
$flat[$last] = $value;
}
case 'civicrm_uf_match':
// normal queries won't work for uf_match since that will lead to violation of unique constraint,
- // failing to meet intended result. Therefore we introduce this additonal query:
+ // failing to meet intended result. Therefore we introduce this additional query:
$sqls[] = "DELETE FROM civicrm_uf_match WHERE contact_id = {$mainId}";
break;
}
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Event_DAO_Event', $id, 'is_active', $is_active);
}
}
- //update status and send mail to cancelled additonal participants, CRM-4320
+ //update status and send mail to cancelled additional participants, CRM-4320
if ($this->_allowConfirmation && is_array($cancelledIds) && !empty($cancelledIds)) {
$cancelledId = array_search('Cancelled',
CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Negative'")
}
}
- // update status and send mail to cancelled additonal participants, CRM-4320
+ // update status and send mail to cancelled additional participants, CRM-4320
if ($this->_allowConfirmation && is_array($cancelledIds) && !empty($cancelledIds)) {
$cancelledId = array_search('Cancelled',
CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Negative'")
// add all the necessary variables to the form
$parser->set($this, CRM_Import_Parser::MODE_IMPORT);
- // check if there is any error occured
+ // check if there is any error occurred
$errorStack = CRM_Core_Error::singleton();
$errors = $errorStack->getErrors();
if (!$fieldName) {
continue;
}
- // get phoneType id and IM service provider id seperately
+ // get phoneType id and IM service provider id separately
if ($fieldName == 'phone') {
$phoneTypeId = CRM_Utils_Array::value(3, $value);
}
else {
if (substr($fieldName, -3, 3) == '_id') {
// for trxn_id and its variants use a longer buffer
- // to accomodate different systems - CRM-13739
+ // to accommodate different systems - CRM-13739
static $notRealIDFields = NULL;
if ($notRealIDFields == NULL) {
$notRealIDFields = array('trxn_id', 'componentpaymentfield_transaction_id');
}
/**
- * Connects to public server and grabs the list of publically available
+ * Connects to public server and grabs the list of publicly available
* extensions.
*
*
* The method to call in the payment processor class.
*/
private function _runPaymentHook(CRM_Extension_Info $info, $method) {
- // Not concerned about performance at this stage, as these are seldomly performed tasks
+ // Not concerned about performance at this stage, as these are seldom performed tasks
// (payment processor enable/disable/install/uninstall). May wish to implement some
// kind of registry/caching system if more hooks are added.
$check = FALSE;
//check dependencies
- $dependancy = array(
+ $dependency = array(
array('Core', 'FinancialTrxn', 'to_financial_account_id'),
array('Financial', 'FinancialTypeAccount', 'financial_account_id'),
);
- foreach ($dependancy as $name) {
+ foreach ($dependency as $name) {
require_once str_replace('_', DIRECTORY_SEPARATOR, "CRM_" . $name[0] . "_BAO_" . $name[1]) . ".php";
$className = "CRM_{$name[0]}_BAO_{$name[1]}";
$bao = new $className();
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active);
$occurrences = $financialType->findReferences();
if ($occurrences) {
$tables = array();
- foreach ($occurrences as $occurence) {
- $className = get_class($occurence);
+ foreach ($occurrences as $occurrence) {
+ $className = get_class($occurrence);
if (!in_array($className, $ignoreTables)) {
$tables[] = $className;
}
$financialTypeId = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_EntityFinancialAccount', $financialTypeAccountId, 'entity_id');
//check dependencies
// FIXME more table containing financial_type_id to come
- $dependancy = array(
+ $dependency = array(
array('Contribute', 'Contribution'),
array('Contribute', 'ContributionPage'),
array('Member', 'MembershipType'),
array('Price', 'LineItem'),
);
- foreach ($dependancy as $name) {
+ foreach ($dependency as $name) {
$daoString = 'CRM_' . $name[0] . '_DAO_' . $name[1];
$dao = new $daoString();
$dao->financial_type_id = $financialTypeId;
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
'data_type' => CRM_Utils_Type::T_FLOAT,
),
'grant_application_received_date' => array(
- 'title' => 'Grant Application Recieved Date',
+ 'title' => 'Grant Application Received Date',
'name' => 'grant_application_received_date',
'data_type' => CRM_Utils_Type::T_DATE,
),
* Set up variables to build the form.
*
* @return void
- * @acess protected
+ * @access protected
*/
public function preProcess() {
$this->_id = $this->get('id');
* @param string $table
* Name of table from which data imported.
* @param string $fieldSeparator
- * Character that seperates the various columns in the file.
+ * Character that separates the various columns in the file.
*
* @return string
* name of the created table
3 => array($id, 'Integer'),
);
- // look for all the changes in the given connection that happended less than {$this->interval} s later than log_date to the given id to catch multi-query changes
+ // look for all the changes in the given connection that happened less than {$this->interval} s later than log_date to the given id to catch multi-query changes
$changedSQL = "SELECT * FROM `{$this->db}`.`log_$table` WHERE log_conn_id = %1 AND log_date >= %2 AND log_date < DATE_ADD(%2, INTERVAL {$this->interval}) AND id = %3 ORDER BY log_date DESC LIMIT 1";
$changedDAO = CRM_Core_DAO::executeQuery($changedSQL, $params);
$triggers = $dao->executeQuery("SHOW TRIGGERS LIKE 'civicrm_%'");
while ($triggers->fetch()) {
- // note that drop trigger has a wierd syntax and hence we do not
+ // note that drop trigger has a weird syntax and hence we do not
// send the trigger name as a string (i.e. its not quoted
$dao->executeQuery("DROP TRIGGER IF EXISTS {$triggers->Trigger}");
}
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Mailing_DAO_Component', $id, 'is_active', $is_active);
$count = 0;
/**
- * CRM-15702: Sending bulk sms to contacts without e-mail addres fails.
+ * CRM-15702: Sending bulk sms to contacts without e-mail address fails.
* Solution is to skip checking for on hold
*/
$skipOnHold = TRUE; //do include a statement to check wether e-mail address is on hold
* we cannot decide when an email address last got an email.
*
* We want to avoid putting on hold an email address which had a few bounces (mbox full) and then got quite a few
- * successfull deliveries before starting the bounce again. The current code does not set the resetDate and hence
+ * successful deliveries before starting the bounce again. The current code does not set the resetDate and hence
* the above scenario results in the email being put on hold
*
* This function rectifies that by considering all non-test mailing jobs which have completed between $minDays and $maxDays
}
/**
- * Send a reponse email informing the contact of the groups to which he/she
+ * Send a response email informing the contact of the groups to which he/she
* has been resubscribed.
*
* @param string $queue_id
}
/**
- * Send a reponse email informing the contact of the groups from which he.
+ * Send a response email informing the contact of the groups from which he.
* has been unsubscribed.
*
* @param string $queue_id
class CRM_Mailing_Selector_Browse extends CRM_Core_Selector_Base implements CRM_Core_Selector_API {
/**
- * Array of supported links, currenly null
+ * Array of supported links, currently null
*
* @var array
*/
class CRM_Mailing_Selector_Event extends CRM_Core_Selector_Base implements CRM_Core_Selector_API {
/**
- * Array of supported links, currenly null
+ * Array of supported links, currently null
*
* @var array
*/
}
//CRM-15232: Check if membership is created and on the basis of it use
- //membership reciept template to send payment reciept
+ //membership receipt template to send payment receipt
if (count($createdMemberships)) {
$form->_values['isMembership'] = TRUE;
}
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Member_DAO_MembershipStatus', $id, 'is_active', $is_active);
//checking if membership status is present in some other table
$check = FALSE;
- $dependancy = array('Membership', 'MembershipLog');
- foreach ($dependancy as $name) {
+ $dependency = array('Membership', 'MembershipLog');
+ foreach ($dependency as $name) {
$baoString = 'CRM_Member_BAO_' . $name;
$dao = new $baoString();
$dao->status_id = $membershipStatusId;
$ids = implode(',', $priceFieldIDS);
$count = CRM_Price_BAO_PriceSet::getMembershipCount($ids);
- foreach ($count as $id => $occurance) {
- if ($occurance > 1) {
+ foreach ($count as $id => $occurrence) {
+ if ($occurrence > 1) {
$errors['_qf_default'] = ts('Select at most one option associated with the same membership type.');
}
}
CRM_Core_Payment_Form::mapParams($this->_bltID, $this->_params, $paymentParams, TRUE);
// CRM-7137 -for recurring membership,
- // we do need contribution and recuring records.
+ // we do need contribution and recurring records.
$result = NULL;
if (!empty($paymentParams['is_recur'])) {
$contributionType = new CRM_Financial_DAO_FinancialType();
$contactId = $membership['contact_id'];
$params = array('contact_id' => $contactId);
//getTokenDetails is much like calling the api contact.get function - but - with some minor
- // special handlings. It preceeds the existence of the api
+ // special handlings. It precedes the existence of the api
list($contacts) = CRM_Utils_Token::getTokenDetails(
$params,
$returnProperties,
// add all the necessary variables to the form
$parser->set($this, CRM_Import_Parser::MODE_IMPORT);
- // check if there is any error occured
+ // check if there is any error occurred
$errorStack = CRM_Core_Error::singleton();
$errors = $errorStack->getErrors();
}
// get all event pages. pcp campaign start and end dates for event related pcp's use the online registration start and end dates,
- // altho if target is contribution page this might not be correct. fixme? dgg
+ // although if target is contribution page this might not be correct. fixme? dgg
$query = "SELECT id, title, start_date, end_date, registration_start_date, registration_end_date
FROM civicrm_event
WHERE is_template IS NULL OR is_template != 1";
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
* @internal param bool $is_active value we want to set the is_active field
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceSet', $id, 'is_active', $isActive);
* Value we want to set the is_quick_config field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsQuickConfig($id, $isQuickConfig) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceSet', $id, 'is_quick_config', $isQuickConfig);
* Set up variables to build the form.
*
* @return void
- * @acess protected
+ * @access protected
*/
public function preProcess() {
$this->_fid = $this->get('fid');
$this->_recordId = NULL;
$this->set('recordId', NULL);
}
- //record id is neccessary for _multiRecord view and update/edit action
+ //record id is necessary for _multiRecord view and update/edit action
if (!$this->_recordId
&& ($this->_multiRecord == CRM_Core_Action::UPDATE || $this->_multiRecord == CRM_Core_Action::DELETE)
) {
if (is_numeric($fieldId)) {
$customValue = &$val;
if (!empty($dateFields) && array_key_exists($fieldId, $dateFields)) {
- // formated date capture value capture
+ // formatted date capture value capture
$dateFieldsVals[$fieldId][$recId] = CRM_Core_BAO_CustomField::getDisplayValue($customValue, $fieldId, $options);
//set date and time format
class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CRM_Core_Selector_API {
/**
- * Array of supported links, currenly view and edit
+ * Array of supported links, currently view and edit
*
* @var array
*/
*/
/**
- * A task is an item that can be enqueued and later exectued
+ * A task is an item that can be enqueued and later executed
*/
class CRM_Queue_Task {
if (!$groupTitle && isset($table['group_title'])) {
$groupTitle = $table['group_title'];
// Having a group_title is secret code for being a custom group
- // which cryptically translates to needing an accordian.
+ // which cryptically translates to needing an accordion.
// here we make that explicit.
$colGroups[$tableName]['use_accordian_for_field_selection'] = TRUE;
}
$this->_columnHeaders["{$tableName}_{$fieldName}_start"]['type'] = $field['type'];
$this->_columnHeaders["{$tableName}_{$fieldName}_start"]['group_by'] = $this->_params['group_bys_freq'][$fieldName];
- // just to make sure these values are transfered to rows.
+ // just to make sure these values are transferred to rows.
// since we need that for calculation purpose,
// e.g making subtotals look nicer or graphs
$this->_columnHeaders["{$tableName}_{$fieldName}_interval"] = array('no_display' => TRUE);
$this->_columnHeaders["{$tableName}_{$fieldName}_start"]['type'] = $field['type'];
$this->_columnHeaders["{$tableName}_{$fieldName}_start"]['group_by'] = $this->_params['group_bys_freq'][$fieldName];
- // just to make sure these values are transfered to rows.
+ // just to make sure these values are transferred to rows.
// since we need that for calculation purpose,
// e.g making subtotals look nicer or graphs
$this->_columnHeaders["{$tableName}_{$fieldName}_interval"] = array('no_display' => TRUE);
$previous_year = $current_year - 1;
$previous_two_year = $current_year - 2;
$previous_three_year = $current_year - 3;
- $upto = $current_year - 4;
+ $up to = $current_year - 4;
$interval[$previous_year] = $previous_year;
$interval[$previous_two_year] = $previous_two_year;
$interval[$previous_three_year] = $previous_three_year;
- $interval["upto_{$upto}"] = "Up To {$upto}";
+ $interval["upto_{$up to}"] = "Up To {$up to}";
foreach ($rows as $key => $row) {
- $display["upto_{$upto}"]
- = CRM_Utils_Array::value("upto_{$upto}", $display)
- + CRM_Utils_Array::value("civicrm_upto_{$upto}", $row);
+ $display["upto_{$up to}"]
+ = CRM_Utils_Array::value("upto_{$up to}", $display)
+ + CRM_Utils_Array::value("civicrm_upto_{$up to}", $row);
$display[$previous_year]
= CRM_Utils_Array::value($previous_year, $display)
+ CRM_Utils_Array::value($previous_year, $row);
return $errors;
}
- $criterias = self::getChartCriteria();
+ $criteria = self::getChartCriteria();
$isError = TRUE;
foreach ($fields['fields'] as $fld => $isActive) {
if (in_array($fld, array(
if ($isError) {
$errors['_qf_default'] = ts('For Chart view, please select at least one field from %1 OR %2.', array(
- 1 => implode(', ', $criterias['count']),
- 2 => implode(', ', $criterias['rate']),
+ 1 => implode(', ', $criteria['count']),
+ 2 => implode(', ', $criteria['rate']),
));
}
return;
}
- $criterias = self::getChartCriteria();
+ $criteria = self::getChartCriteria();
$chartInfo = array(
'legend' => ts('Mail Summary'),
foreach ($rows as $row) {
$chartInfo['values'][$row['civicrm_mailing_name']] = array();
if ($plotCount) {
- foreach ($criterias['count'] as $criteria => $label) {
+ foreach ($criteria['count'] as $criteria => $label) {
if (isset($row[$criteria])) {
$chartInfo['values'][$row['civicrm_mailing_name']][$label] = $row[$criteria];
$chartInfo['tip'][$label] = "{$label} #val#";
$plotRate = FALSE;
}
- elseif (isset($criterias['count'][$criteria])) {
- unset($criterias['count'][$criteria]);
+ elseif (isset($criteria['count'][$criteria])) {
+ unset($criteria['count'][$criteria]);
}
}
}
if ($plotRate) {
- foreach ($criterias['rate'] as $criteria => $label) {
+ foreach ($criteria['rate'] as $criteria => $label) {
if (isset($row[$criteria])) {
$chartInfo['values'][$row['civicrm_mailing_name']][$label] = $row[$criteria];
$chartInfo['tip'][$label] = "{$label} #val#";
$plotCount = FALSE;
}
- elseif (isset($criterias['rate'][$criteria])) {
- unset($criterias['rate'][$criteria]);
+ elseif (isset($criteria['rate'][$criteria])) {
+ unset($criteria['rate'][$criteria]);
}
}
}
}
if ($plotCount) {
- $criterias = $criterias['count'];
+ $criteria = $criteria['count'];
}
else {
- $criterias = $criterias['rate'];
+ $criteria = $criteria['rate'];
}
- $chartInfo['criteria'] = array_values($criterias);
+ $chartInfo['criteria'] = array_values($criteria);
// dynamically set the graph size
- $chartInfo['xSize'] = ((count($rows) * 125) + (count($rows) * count($criterias) * 40));
+ $chartInfo['xSize'] = ((count($rows) * 125) + (count($rows) * count($criteria) * 40));
// build the chart.
CRM_Utils_OpenFlashChart::buildChart($chartInfo, $this->_params['charts']);
$this->_columnHeaders["{$tableName}_{$fieldName}_start"]['type'] = $field['type'];
$this->_columnHeaders["{$tableName}_{$fieldName}_start"]['group_by'] = $this->_params['group_bys_freq'][$fieldName];
- // just to make sure these values are transfered to rows.
+ // just to make sure these values are transferred to rows.
// since we need that for calculation purpose,
// e.g making subtotals look nicer or graphs
$this->_columnHeaders["{$tableName}_{$fieldName}_interval"] = array('no_display' => TRUE);
array_shift($args);
array_shift($args);
- // put rest of arguement back in the form of url, which is how value
+ // put rest of argument back in the form of url, which is how value
// is stored in option value table
$optionVal = implode('/', $args);
}
*
*/
class CRM_Upgrade_Incremental_php_FourOne {
- // This was changed in 4.3 so we define it locally for compatability with older dbs
+ // This was changed in 4.3 so we define it locally for compatibility with older dbs
const NAVIGATION_NAME = "Navigation Menu";
/**
CRM_Core_DAO::executeQuery($updatePriceField, array(), TRUE, NULL, FALSE, FALSE);
// as the table 'civicrm_price_field' is localised and column 'count' is dropped
- // after the views are rebuild, we need to rebuild views to avoid invalid refrence of table.
+ // after the views are rebuild, we need to rebuild views to avoid invalid reference of table.
if ($upgrade->multilingual) {
CRM_Core_I18n_Schema::rebuildMultilingualSchema($upgrade->locales, $rev);
}
( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
VALUES
( {$domainID}, 'civicrm/batch&reset=1', '{ts escape="sql" skip="true"}Batches{/ts}', 'Batches', 'access CiviContribute,access CiviMember', '', @navContributionsID, '1', NULL, 4 ),
- ( {$domainID}, 'civicrm/batch&reset=1', '{ts escape="sql" skip="true"}Batches{/ts}', 'Batches', 'access CiviMember,acess CiviContribute', '', @navMembershipsID, '1', NULL, 4 );
+ ( {$domainID}, 'civicrm/batch&reset=1', '{ts escape="sql" skip="true"}Batches{/ts}', 'Batches', 'access CiviMember,access CiviContribute', '', @navMembershipsID, '1', NULL, 4 );
-- CRM-9686
INSERT INTO `civicrm_state_province`(`country_id`, `abbreviation`, `name`) VALUES(1097, "LP", "La Paz");
('group_type', 'safe_file_extension', 'wysiwyg_editor');
{/if}
---This one is wierd. What the heck is this anyway?
+--This one is weird. What the heck is this anyway?
UPDATE civicrm_option_value v, civicrm_option_group g
SET v.name = v.value
WHERE g.id = v.option_group_id AND g.name = 'redaction_rule';
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
$extra = array('onclick' => 'useAmountOther();');
}
- // if seperate membership payment is used with quick config priceset then change the other amount label
+ // if separate membership payment is used with quick config priceset then change the other amount label
if (property_exists($qf, '_membershipBlock') && !empty($qf->_membershipBlock['is_separate_payment']) && $qf->_quickConfig && $field->name == 'other_amount' && !property_exists($qf, '_contributionAmount')) {
$label = ts('Additional Contribution');
$useRequired = 0;
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*
*/
public static function setIsActive($id, $is_active) {
* Value we want to set the is_active field.
*
* @return Object
- * DAO object on sucess, null otherwise
+ * DAO object on success, null otherwise
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $id, 'is_active', $isActive);
'prefix' => '',
);
- // Use old constants if needed to ensure backward compatability
+ // Use old constants if needed to ensure backward compatibility
if (defined('CIVICRM_MEMCACHE_HOST')) {
$defaults['host'] = CIVICRM_MEMCACHE_HOST;
}
* format is 2007-12-21 )
*
* @return string
- * Return the customized todays date (Y-m-d)
+ * Return the customized today's date (Y-m-d)
*/
public static function getToday($dayParams = NULL, $format = "Y-m-d") {
if (is_null($dayParams) || empty($dayParams)) {
* float $x x position in user units
* float $y y position in user units
* boolean $reseth if true reset the last cell height (default true).
- * int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if
+ * int $stretch stretch character mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if
* necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if
* necessary</li><li>4 = forced character spacing</li></ul>
* boolean $ishtml set to true if $txt is HTML content (default = false).
// $params['values'] should contains the values for each
// criteria defined in $params['criteria']
$values = CRM_Utils_Array::value('values', $params);
- $criterias = CRM_Utils_Array::value('criteria', $params);
- if (!is_array($values) || empty($values) || !is_array($criterias) || empty($criterias)) {
+ $criteria = CRM_Utils_Array::value('criteria', $params);
+ if (!is_array($values) || empty($values) || !is_array($criteria) || empty($criteria)) {
return $chart;
}
}
$xValueLabels[] = (string) $xVal;
- foreach ($criterias as $criteria) {
+ foreach ($criteria as $criteria) {
$xReferences[$criteria][$xVal] = (double) CRM_Utils_Array::value($criteria, $yVal, 0);
$yValues[] = (double) CRM_Utils_Array::value($criteria, $yVal, 0);
}
$count = 0;
foreach ($xReferences as $criteria => $values) {
$toolTipVal = $tooltip;
- // for seperate tooltip for each criteria
+ // for separate tooltip for each criteria
if (is_array($tooltip)) {
$toolTipVal = CRM_Utils_Array::value($criteria, $tooltip, "$symbol #val#");
}
$xValues[$count] = new bar_3d();
// set colour pattel
$xValues[$count]->set_colour(self::$_colours[$count]);
- // define colur pattel with bar criterias
+ // define colur pattel with bar criteria
$xValues[$count]->key((string) $criteria, 12);
// define bar chart values
$xValues[$count]->set_values(array_values($values));
}
else {
- $content = "<!-- .tpl file embeded: $tpl -->\n";
+ $content = "<!-- .tpl file embedded: $tpl -->\n";
CRM_Utils_System::appendTPLFile($tpl, $content);
echo $content . $smarty->fetch($tpl);
CRM_Utils_System::civiExit();
*/
public static function boolean($value) {
return preg_match(
- '/(^(1|0)$)|(^(Y(es)?|N(o)?)$)|(^(T(rue)?|F(alse)?)$)/i', $value
+ '/(^(1|0)$)|(^(Y(es)?|N(o)?)$)|(^(T(rue)?|F(else)?)$)/i', $value
) ? TRUE : FALSE;
}
list($current, $direction) = explode('_', $url);
- // if current is wierd and does not exist in the vars array, skip
+ // if current is weird and does not exist in the vars array, skip
if (!array_key_exists($current, $this->_vars)) {
return;
}
if (preg_match('/^(y(es)?|t(rue)?|1)$/i', $str)) {
return '1';
}
- elseif (preg_match('/^(n(o)?|f(alse)?|0)$/i', $str)) {
+ elseif (preg_match('/^(n(o)?|f(else)?|0)$/i', $str)) {
return '0';
}
else {
/**
* Authenticate the user against the uf db.
*
- * In case of succesful authentication, returns an array consisting of
+ * In case of successful authentication, returns an array consisting of
* (contactID, ufID, unique string). Returns FALSE if authentication is
* unsuccessful.
*
return $url;
}
- //upto d6 only, already we have code in place for d7
+ //up to d6 only, already we have code in place for d7
$config = CRM_Core_Config::singleton();
if (function_exists('variable_get') &&
module_exists('locale')
* All nodes of the tree (including root and leaf node) contain the following properties
* Name - what is the node name ?
* Children - who are it's children
- * Data - any other auxillary data
+ * Data - any other auxiliary data
*
*
* Internally all nodes are an array with the following keys