Commit a3d827a7 authored by colemanw's avatar colemanw

CRM-17335 - Remove unnecessary use of CRM_Core_DAO::$_nullObject

parent a49de128
......@@ -84,7 +84,7 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
// we allow the controller to set force/reset externally, useful when we are being
// driven by the wizard framework
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean');
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
......@@ -281,7 +281,7 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
$this->_defaults['activity_status_id'] = $status;
}
$survey = CRM_Utils_Request::retrieve('survey', 'Positive', CRM_Core_DAO::$_nullObject);
$survey = CRM_Utils_Request::retrieve('survey', 'Positive');
if ($survey) {
$this->_formValues['activity_survey_id'] = $this->_defaults['activity_survey_id'] = $survey;
......
......@@ -82,7 +82,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search {
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean');
//operation for state machine.
$this->_operation = CRM_Utils_Request::retrieve('op', 'String', $this, FALSE, 'reserve');
......@@ -393,14 +393,14 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search {
// note that this means that GET over-rides POST :)
//since we have qfKey, no need to manipulate set defaults.
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', CRM_Core_DAO::$_nullObject);
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String');
if (!$this->_force || CRM_Utils_Rule::qfKey($qfKey)) {
return;
}
// get survey id
$surveyId = CRM_Utils_Request::retrieve('sid', 'Positive', CRM_Core_DAO::$_nullObject);
$surveyId = CRM_Utils_Request::retrieve('sid', 'Positive');
if ($surveyId) {
$surveyId = CRM_Utils_Type::escape($surveyId, 'Integer');
......
......@@ -38,13 +38,13 @@ class CRM_Campaign_Page_Petition_Confirm extends CRM_Core_Page {
public function run() {
CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');
$contact_id = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject);
$subscribe_id = CRM_Utils_Request::retrieve('sid', 'Integer', CRM_Core_DAO::$_nullObject);
$hash = CRM_Utils_Request::retrieve('h', 'String', CRM_Core_DAO::$_nullObject);
$activity_id = CRM_Utils_Request::retrieve('a', 'String', CRM_Core_DAO::$_nullObject);
$petition_id = CRM_Utils_Request::retrieve('pid', 'String', CRM_Core_DAO::$_nullObject);
$contact_id = CRM_Utils_Request::retrieve('cid', 'Integer');
$subscribe_id = CRM_Utils_Request::retrieve('sid', 'Integer');
$hash = CRM_Utils_Request::retrieve('h', 'String');
$activity_id = CRM_Utils_Request::retrieve('a', 'String');
$petition_id = CRM_Utils_Request::retrieve('pid', 'String');
if (!$petition_id) {
$petition_id = CRM_Utils_Request::retrieve('p', 'String', CRM_Core_DAO::$_nullObject);
$petition_id = CRM_Utils_Request::retrieve('p', 'String');
}
if (!$contact_id ||
......
......@@ -267,7 +267,7 @@ class CRM_Campaign_Selector_Search extends CRM_Core_Selector_Base implements CRM
*/
public function buildPrevNextCache($sort) {
//for prev/next pagination
$crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer', CRM_Core_DAO::$_nullObject);
$crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer');
if (!$crmPID) {
$cacheKey = "civicrm search {$this->_key}";
......
......@@ -40,12 +40,12 @@ class CRM_Case_Form_ActivityToCase extends CRM_Core_Form {
* Build all the data structures needed to build the form.
*/
public function preProcess() {
$this->_activityId = CRM_Utils_Request::retrieve('activityId', 'Positive', CRM_Core_DAO::$_nullObject);
$this->_activityId = CRM_Utils_Request::retrieve('activityId', 'Positive');
if (!$this->_activityId) {
CRM_Core_Error::fatal('required activity id is missing.');
}
$this->_currentCaseId = CRM_Utils_Request::retrieve('caseId', 'Positive', CRM_Core_DAO::$_nullObject);
$this->_currentCaseId = CRM_Utils_Request::retrieve('caseId', 'Positive');
$this->assign('currentCaseId', $this->_currentCaseId);
$this->assign('buildCaseActivityForm', TRUE);
}
......
......@@ -42,8 +42,8 @@ class CRM_Case_Form_ActivityView extends CRM_Core_Form {
public function preProcess() {
$contactID = CRM_Utils_Request::retrieve('cid', 'Integer', $this, TRUE);
$activityID = CRM_Utils_Request::retrieve('aid', 'Integer', $this, TRUE);
$revs = CRM_Utils_Request::retrieve('revs', 'Boolean', CRM_Core_DAO::$_nullObject);
$caseID = CRM_Utils_Request::retrieve('caseID', 'Boolean', CRM_Core_DAO::$_nullObject);
$revs = CRM_Utils_Request::retrieve('revs', 'Boolean');
$caseID = CRM_Utils_Request::retrieve('caseID', 'Boolean');
$activitySubject = CRM_Core_DAO::getFieldValue('CRM_Activity_DAO_Activity',
$activityID,
'subject'
......
......@@ -56,8 +56,8 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
if ($this->_showRelatedCases) {
$relatedCases = $this->get('relatedCases');
if (!isset($relatedCases)) {
$cId = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject);
$caseId = CRM_Utils_Request::retrieve('id', 'Integer', CRM_Core_DAO::$_nullObject);
$cId = CRM_Utils_Request::retrieve('cid', 'Integer');
$caseId = CRM_Utils_Request::retrieve('id', 'Integer');
$relatedCases = CRM_Case_BAO_Case::getRelatedCases($caseId, $cId);
}
$this->assign('relatedCases', $relatedCases);
......@@ -77,7 +77,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
}
$fulltext = CRM_Utils_Request::retrieve('context', 'String', CRM_Core_DAO::$_nullObject);
$fulltext = CRM_Utils_Request::retrieve('context', 'String');
if ($fulltext == 'fulltext') {
$this->assign('fulltext', $fulltext);
}
......
......@@ -94,7 +94,7 @@ class CRM_Case_Form_Search extends CRM_Core_Form_Search {
* driven by the wizard framework
*/
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean');
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
......
......@@ -811,11 +811,11 @@ LIMIT 1
}
public static function printCaseReport() {
$caseID = CRM_Utils_Request::retrieve('caseID', 'Positive', CRM_Core_DAO::$_nullObject);
$clientID = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject);
$activitySetName = CRM_Utils_Request::retrieve('asn', 'String', CRM_Core_DAO::$_nullObject);
$isRedact = CRM_Utils_Request::retrieve('redact', 'Boolean', CRM_Core_DAO::$_nullObject);
$includeActivities = CRM_Utils_Request::retrieve('all', 'Positive', CRM_Core_DAO::$_nullObject);
$caseID = CRM_Utils_Request::retrieve('caseID', 'Positive');
$clientID = CRM_Utils_Request::retrieve('cid', 'Positive');
$activitySetName = CRM_Utils_Request::retrieve('asn', 'String');
$isRedact = CRM_Utils_Request::retrieve('redact', 'Boolean');
$includeActivities = CRM_Utils_Request::retrieve('all', 'Positive');
$params = $otherRelationships = $globalGroupInfo = array();
$report = new CRM_Case_XMLProcessor_Report($isRedact);
if ($includeActivities) {
......
......@@ -861,7 +861,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
ON contact.id = gOrg.organization_id ";
//get the Organization ID
$orgID = CRM_Utils_Request::retrieve('oid', 'Positive', CRM_Core_DAO::$_nullObject);
$orgID = CRM_Utils_Request::retrieve('oid', 'Positive');
if ($orgID) {
$where = " AND gOrg.organization_id = {$orgID}";
}
......
......@@ -374,7 +374,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
$this->assign('paramSubType', $paramSubType);
}
if (CRM_Utils_Request::retrieve('type', 'String', CRM_Core_DAO::$_nullObject)) {
if (CRM_Utils_Request::retrieve('type', 'String')) {
CRM_Contact_Form_Edit_CustomData::preProcess($this);
}
else {
......
......@@ -42,8 +42,8 @@ class CRM_Contact_Form_Edit_CustomData {
* @param CRM_Core_Form $form
*/
public static function preProcess(&$form) {
$form->_type = CRM_Utils_Request::retrieve('type', 'String', CRM_Core_DAO::$_nullObject);
$form->_subType = CRM_Utils_Request::retrieve('subType', 'String', CRM_Core_DAO::$_nullObject);
$form->_type = CRM_Utils_Request::retrieve('type', 'String');
$form->_subType = CRM_Utils_Request::retrieve('subType', 'String');
//build the custom data as other blocks.
//$form->assign( "addBlock", false );
......
......@@ -38,8 +38,8 @@ class CRM_Contact_Form_Location {
* @param CRM_Core_Form $form
*/
public static function preProcess(&$form) {
$form->_addBlockName = CRM_Utils_Request::retrieve('block', 'String', CRM_Core_DAO::$_nullObject);
$additionalblockCount = CRM_Utils_Request::retrieve('count', 'Positive', CRM_Core_DAO::$_nullObject);
$form->_addBlockName = CRM_Utils_Request::retrieve('block', 'String');
$additionalblockCount = CRM_Utils_Request::retrieve('count', 'Positive');
$form->assign('addBlock', FALSE);
if ($form->_addBlockName && $additionalblockCount) {
......
......@@ -762,7 +762,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
$this->_done = TRUE;
//for prev/next pagination
$crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer', CRM_Core_DAO::$_nullObject);
$crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer');
if (array_key_exists($this->_searchButtonName, $_POST) ||
($this->_force && !$crmPID)
......
......@@ -226,8 +226,8 @@ class CRM_Contact_Page_AJAX {
public static function relationship() {
$relType = CRM_Utils_Request::retrieve('rel_type', 'String', CRM_Core_DAO::$_nullObject, TRUE);
$relContactID = CRM_Utils_Request::retrieve('rel_contact', 'Positive', CRM_Core_DAO::$_nullObject, TRUE);
$originalCid = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject);
$relationshipID = CRM_Utils_Request::retrieve('rel_id', 'Positive', CRM_Core_DAO::$_nullObject);
$originalCid = CRM_Utils_Request::retrieve('cid', 'Positive');
$relationshipID = CRM_Utils_Request::retrieve('rel_id', 'Positive');
$caseID = CRM_Utils_Request::retrieve('case_id', 'Positive', CRM_Core_DAO::$_nullObject, TRUE);
if (!CRM_Case_BAO_Case::accessCase($caseID)) {
......@@ -295,7 +295,7 @@ class CRM_Contact_Page_AJAX {
CRM_Utils_System::setHttpHeader('Content-Type', 'text/plain');
$customValueID = CRM_Utils_Type::escape($_REQUEST['valueID'], 'Positive');
$customGroupID = CRM_Utils_Type::escape($_REQUEST['groupID'], 'Positive');
$contactId = CRM_Utils_Request::retrieve('contactId', 'Positive', CRM_Core_DAO::$_nullObject);
$contactId = CRM_Utils_Request::retrieve('contactId', 'Positive');
CRM_Core_BAO_CustomValue::deleteCustomValue($customValueID, $customGroupID);
if ($contactId) {
echo CRM_Contact_BAO_Contact::getCountComponent('custom_' . $customGroupID, $contactId);
......@@ -310,8 +310,8 @@ class CRM_Contact_Page_AJAX {
*/
static public function checkUserName() {
$signer = new CRM_Utils_Signer(CRM_Core_Key::privateKey(), array('for', 'ts'));
$sig = CRM_Utils_Request::retrieve('sig', 'String', CRM_Core_DAO::$_nullObject);
$for = CRM_Utils_Request::retrieve('for', 'String', CRM_Core_DAO::$_nullObject);
$sig = CRM_Utils_Request::retrieve('sig', 'String');
$for = CRM_Utils_Request::retrieve('for', 'String');
if (
CRM_Utils_Time::getTimeRaw() > $_REQUEST['ts'] + self::CHECK_USERNAME_TTL
|| $for != 'civicrm/ajax/cmsuser'
......@@ -411,8 +411,8 @@ LIMIT {$offset}, {$rowCount}
// send query to hook to be modified if needed
CRM_Utils_Hook::contactListQuery($query,
$name,
CRM_Utils_Request::retrieve('context', 'String', CRM_Core_DAO::$_nullObject),
CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject)
CRM_Utils_Request::retrieve('context', 'String'),
CRM_Utils_Request::retrieve('cid', 'Positive')
);
$dao = CRM_Core_DAO::executeQuery($query);
......@@ -436,8 +436,8 @@ LIMIT {$offset}, {$rowCount}
// send query to hook to be modified if needed
CRM_Utils_Hook::contactListQuery($query,
$name,
CRM_Utils_Request::retrieve('context', 'String', CRM_Core_DAO::$_nullObject),
CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject)
CRM_Utils_Request::retrieve('context', 'String'),
CRM_Utils_Request::retrieve('cid', 'Positive')
);
$dao = CRM_Core_DAO::executeQuery($query);
......@@ -507,8 +507,8 @@ LIMIT {$offset}, {$rowCount}
// send query to hook to be modified if needed
CRM_Utils_Hook::contactListQuery($query,
$name,
CRM_Utils_Request::retrieve('context', 'String', CRM_Core_DAO::$_nullObject),
CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject)
CRM_Utils_Request::retrieve('context', 'String'),
CRM_Utils_Request::retrieve('cid', 'Positive')
);
$dao = CRM_Core_DAO::executeQuery($query);
......@@ -529,7 +529,7 @@ LIMIT {$offset}, {$rowCount}
public static function buildSubTypes() {
$parent = CRM_Utils_Request::retrieve('parentId', 'Positive', CRM_Core_DAO::$_nullObject);
$parent = CRM_Utils_Request::retrieve('parentId', 'Positive');
switch ($parent) {
case 1:
......@@ -551,7 +551,7 @@ LIMIT {$offset}, {$rowCount}
}
public static function buildDedupeRules() {
$parent = CRM_Utils_Request::retrieve('parentId', 'Positive', CRM_Core_DAO::$_nullObject);
$parent = CRM_Utils_Request::retrieve('parentId', 'Positive');
switch ($parent) {
case 1:
......@@ -987,7 +987,7 @@ LIMIT {$offset}, {$rowCount}
}
public static function getAddressDisplay() {
$contactId = CRM_Utils_Request::retrieve('contact_id', 'Positive', CRM_Core_DAO::$_nullObject);
$contactId = CRM_Utils_Request::retrieve('contact_id', 'Positive');
if (!$contactId) {
$addressVal["error_message"] = "no contact id found";
}
......
......@@ -58,7 +58,7 @@ class CRM_Contact_Page_DedupeMerge extends CRM_Core_Page {
$rgid = CRM_Utils_Request::retrieve('rgid', 'Positive');
$gid = CRM_Utils_Request::retrieve('gid', 'Positive');
$limit = CRM_Utils_Request::retrieve('limit', 'Positive');
$action = CRM_Utils_Request::retrieve('action', 'String', CRM_Core_DAO::$_nullObject);
$action = CRM_Utils_Request::retrieve('action', 'String');
$mode = CRM_Utils_Request::retrieve('mode', 'String', CRM_Core_DAO::$_nullObject, FALSE, 'safe');
$cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid);
......
......@@ -178,7 +178,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se
$contextMenu = NULL
) {
//don't build query constructor, if form is not submitted
$force = CRM_Utils_Request::retrieve('force', 'Boolean', CRM_Core_DAO::$_nullObject);
$force = CRM_Utils_Request::retrieve('force', 'Boolean');
if (empty($formValues) && !$force) {
return;
}
......@@ -862,10 +862,10 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se
// 2. if records are sorted
// get current page requested
$pageNum = CRM_Utils_Request::retrieve('crmPID', 'Integer', CRM_Core_DAO::$_nullObject);
$pageNum = CRM_Utils_Request::retrieve('crmPID', 'Integer');
// get the current sort order
$currentSortID = CRM_Utils_Request::retrieve('crmSID', 'String', CRM_Core_DAO::$_nullObject);
$currentSortID = CRM_Utils_Request::retrieve('crmSID', 'String');
$session = CRM_Core_Session::singleton();
......@@ -891,7 +891,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se
$firstRecord = ($pageNum - 1) * $pageSize;
//for alphabetic pagination selection save
$sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter', 'String', CRM_Core_DAO::$_nullObject);
$sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter', 'String');
//for text field pagination selection save
$countRow = CRM_Core_BAO_PrevNextCache::getCount($cacheKey, NULL, "entity_table = 'civicrm_contact'");
......
......@@ -99,7 +99,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
$this->assign('isShare', CRM_Utils_Array::value('is_share', $this->_values));
$this->assign('isConfirmEnabled', CRM_Utils_Array::value('is_confirm_enabled', $this->_values));
$this->assign('reset', CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject));
$this->assign('reset', CRM_Utils_Request::retrieve('reset', 'Boolean'));
$this->assign('mainDisplay', CRM_Utils_Request::retrieve('_qf_Main_display', 'Boolean',
CRM_Core_DAO::$_nullObject));
......
......@@ -450,7 +450,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
}
//do check for cancel recurring and clean db, CRM-7696
if (CRM_Utils_Request::retrieve('cancel', 'Boolean', CRM_Core_DAO::$_nullObject)) {
if (CRM_Utils_Request::retrieve('cancel', 'Boolean')) {
self::cancelRecurring();
}
......@@ -1004,15 +1004,15 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
* lets delete the recurring and related contribution.
*/
public function cancelRecurring() {
$isCancel = CRM_Utils_Request::retrieve('cancel', 'Boolean', CRM_Core_DAO::$_nullObject);
$isCancel = CRM_Utils_Request::retrieve('cancel', 'Boolean');
if ($isCancel) {
$isRecur = CRM_Utils_Request::retrieve('isRecur', 'Boolean', CRM_Core_DAO::$_nullObject);
$recurId = CRM_Utils_Request::retrieve('recurId', 'Positive', CRM_Core_DAO::$_nullObject);
$isRecur = CRM_Utils_Request::retrieve('isRecur', 'Boolean');
$recurId = CRM_Utils_Request::retrieve('recurId', 'Positive');
//clean db for recurring contribution.
if ($isRecur && $recurId) {
CRM_Contribute_BAO_ContributionRecur::deleteRecurContribution($recurId);
}
$contribId = CRM_Utils_Request::retrieve('contribId', 'Positive', CRM_Core_DAO::$_nullObject);
$contribId = CRM_Utils_Request::retrieve('contribId', 'Positive');
if ($contribId) {
CRM_Contribute_BAO_Contribution::deleteContribution($contribId);
}
......
......@@ -80,7 +80,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
* driven by the wizard framework
*/
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean');
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
......
......@@ -39,8 +39,8 @@ class CRM_Contribute_Page_SubscriptionStatus extends CRM_Core_Page {
* @return null
*/
public function run() {
$task = CRM_Utils_Request::retrieve('task', 'String', CRM_Core_DAO::$_nullObject);
$result = CRM_Utils_Request::retrieve('result', 'Integer', CRM_Core_DAO::$_nullObject);
$task = CRM_Utils_Request::retrieve('task', 'String');
$result = CRM_Utils_Request::retrieve('result', 'Integer');
$this->assign('task', $task);
$this->assign('result', $result);
......
......@@ -336,10 +336,10 @@ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements C
$componentId = $componentContext = NULL;
if ($this->_context != 'contribute') {
// @todo explain the significance of context & why we do not get these i that context.
$qfKey = CRM_Utils_Request::retrieve('key', 'String', CRM_Core_DAO::$_nullObject);
$componentId = CRM_Utils_Request::retrieve('id', 'Positive', CRM_Core_DAO::$_nullObject);
$componentAction = CRM_Utils_Request::retrieve('action', 'String', CRM_Core_DAO::$_nullObject);
$componentContext = CRM_Utils_Request::retrieve('compContext', 'String', CRM_Core_DAO::$_nullObject);
$qfKey = CRM_Utils_Request::retrieve('key', 'String');
$componentId = CRM_Utils_Request::retrieve('id', 'Positive');
$componentAction = CRM_Utils_Request::retrieve('action', 'String');
$componentContext = CRM_Utils_Request::retrieve('compContext', 'String');
if (!$componentContext &&
$this->_compContext
......
......@@ -60,7 +60,7 @@ class CRM_Core_Page_File extends CRM_Core_Page {
}
if ($action & CRM_Core_Action::DELETE) {
if (CRM_Utils_Request::retrieve('confirmed', 'Boolean', CRM_Core_DAO::$_nullObject)) {
if (CRM_Utils_Request::retrieve('confirmed', 'Boolean')) {
CRM_Core_BAO_File::deleteFileReferences($id, $eid, $fid);
CRM_Core_Session::setStatus(ts('The attached file has been deleted.'), ts('Complete'), 'success');
......
......@@ -111,7 +111,7 @@ class CRM_Core_QuickForm_Action_Display extends CRM_Core_QuickForm_Action {
$form = $page->toSmarty();
// Deprecated - use snippet=6 instead of json=1
$json = CRM_Utils_Request::retrieve('json', 'Boolean', CRM_Core_DAO::$_nullObject);
$json = CRM_Utils_Request::retrieve('json', 'Boolean');
if ($json) {
CRM_Utils_JSON::output($form);
}
......
......@@ -90,7 +90,7 @@ class CRM_Custom_Form_CustomData {
$form->assign('cgCount', $form->_groupCount);
//carry qf key, since this form is not inhereting core form.
if ($qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', CRM_Core_DAO::$_nullObject)) {
if ($qfKey = CRM_Utils_Request::retrieve('qfKey', 'String')) {
$form->assign('qfKey', $qfKey);
}
......@@ -101,8 +101,8 @@ class CRM_Custom_Form_CustomData {
$form->_entityId = CRM_Utils_Request::retrieve('entityID', 'Positive', $form);
}
$typeCheck = CRM_Utils_Request::retrieve('type', 'String', CRM_Core_DAO::$_nullObject);
$urlGroupId = CRM_Utils_Request::retrieve('groupID', 'Positive', CRM_Core_DAO::$_nullObject);
$typeCheck = CRM_Utils_Request::retrieve('type', 'String');
$urlGroupId = CRM_Utils_Request::retrieve('groupID', 'Positive');
if (isset($typeCheck) && $urlGroupId) {
$form->_groupID = $urlGroupId;
}
......
......@@ -96,7 +96,7 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search {
* we allow the controller to set force/reset externally, useful when we are being
* driven by the wizard framework
*/
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean');
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
......
......@@ -1186,8 +1186,8 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
* Handle import error file creation.
*/
public static function invoke() {
$type = CRM_Utils_Request::retrieve('type', 'Positive', CRM_Core_DAO::$_nullObject);
$parserName = CRM_Utils_Request::retrieve('parser', 'String', CRM_Core_DAO::$_nullObject);
$type = CRM_Utils_Request::retrieve('type', 'Positive');
$parserName = CRM_Utils_Request::retrieve('parser', 'String');
if (empty($parserName) || empty($type)) {
return;
}
......
......@@ -94,7 +94,7 @@ class CRM_Financial_Page_AJAX {
if ($_GET['_value'] != 'select') {
$financialAccountType = CRM_Financial_BAO_FinancialAccount::getfinancialAccountRelations(TRUE);
$financialAccountId = CRM_Utils_Request::retrieve('_value', 'Positive', CRM_Core_DAO::$_nullObject);
$financialAccountId = CRM_Utils_Request::retrieve('_value', 'Positive');
$financialAccountTypeId = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialAccount', $financialAccountId, 'financial_account_type_id');
}
$params['orderColumn'] = 'label';
......@@ -145,7 +145,7 @@ class CRM_Financial_Page_AJAX {
) {
CRM_Utils_System::civiExit();
}
$productId = CRM_Utils_Request::retrieve('_value', 'Positive', CRM_Core_DAO::$_nullObject);
$productId = CRM_Utils_Request::retrieve('_value', 'Positive');
$elements = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Product', $productId, 'financial_type_id');
CRM_Utils_JSON::output($elements);
}
......
......@@ -88,7 +88,7 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search {
* driven by the wizard framework
*/
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean');
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
......
......@@ -352,14 +352,14 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form {
* Get the properties that might be in the URL.
*/
protected function parsePropertiesFromUrl() {
$this->log_conn_id = CRM_Utils_Request::retrieve('log_conn_id', 'String', CRM_Core_DAO::$_nullObject);
$this->log_date = CRM_Utils_Request::retrieve('log_date', 'String', CRM_Core_DAO::$_nullObject);
$this->cid = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject);
$this->raw = CRM_Utils_Request::retrieve('raw', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->altered_name = CRM_Utils_Request::retrieve('alteredName', 'String', CRM_Core_DAO::$_nullObject);
$this->altered_by = CRM_Utils_Request::retrieve('alteredBy', 'String', CRM_Core_DAO::$_nullObject);
$this->altered_by_id = CRM_Utils_Request::retrieve('alteredById', 'Integer', CRM_Core_DAO::$_nullObject);
$this->log_conn_id = CRM_Utils_Request::retrieve('log_conn_id', 'String');
$this->log_date = CRM_Utils_Request::retrieve('log_date', 'String');
$this->cid = CRM_Utils_Request::retrieve('cid', 'Integer');
$this->raw = CRM_Utils_Request::retrieve('raw', 'Boolean');
$this->altered_name = CRM_Utils_Request::retrieve('alteredName', 'String');
$this->altered_by = CRM_Utils_Request::retrieve('alteredBy', 'String');
$this->altered_by_id = CRM_Utils_Request::retrieve('alteredById', 'Integer');
}
}
......@@ -255,15 +255,15 @@ class CRM_Mailing_Page_Browse extends CRM_Core_Page {
CRM_Utils_System::setTitle(ts('Find Mass SMS'));
}
$crmRowCount = CRM_Utils_Request::retrieve('crmRowCount', 'Integer', CRM_Core_DAO::$_nullObject);
$crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer', CRM_Core_DAO::$_nullObject);
$crmRowCount = CRM_Utils_Request::retrieve('crmRowCount', 'Integer');
$crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer');
if ($crmRowCount || $crmPID) {
$urlParams .= '&force=1';
$urlParams .= $crmRowCount ? '&crmRowCount=' . $crmRowCount : '';
$urlParams .= $crmPID ? '&crmPID=' . $crmPID : '';
}
$crmSID = CRM_Utils_Request::retrieve('crmSID', 'Integer', CRM_Core_DAO::$_nullObject);
$crmSID = CRM_Utils_Request::retrieve('crmSID', 'Integer');
if ($crmSID) {
$urlParams .= '&crmSID=' . $crmSID;
}
......
......@@ -42,9 +42,9 @@ class CRM_Mailing_Page_Common extends CRM_Core_Page {
* @throws Exception
*/
public function run() {
$job_id = CRM_Utils_Request::retrieve('jid', 'Integer', CRM_Core_DAO::$_nullObject);
$queue_id = CRM_Utils_Request::retrieve('qid', 'Integer', CRM_Core_DAO::$_nullObject);
$hash = CRM_Utils_Request::retrieve('h', 'String', CRM_Core_DAO::$_nullObject);
$job_id = CRM_Utils_Request::retrieve('jid', 'Integer');
$queue_id = CRM_Utils_Request::retrieve('qid', 'Integer');
$hash = CRM_Utils_Request::retrieve('h', 'String');
if (!$job_id ||
!$queue_id ||
......
......@@ -38,9 +38,9 @@ class CRM_Mailing_Page_Confirm extends CRM_Core_Page {
public function run() {
CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');
$contact_id = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject);
$subscribe_id = CRM_Utils_Request::retrieve('sid', 'Integer', CRM_Core_DAO::$_nullObject);
$hash = CRM_Utils_Request::retrieve('h', 'String', CRM_Core_DAO::$_nullObject);
$contact_id = CRM_Utils_Request::retrieve('cid', 'Integer');
$subscribe_id = CRM_Utils_Request::retrieve('sid', 'Integer');
$hash = CRM_Utils_Request::retrieve('h', 'String');
if (!$contact_id ||
!$subscribe_id ||
......
......@@ -366,7 +366,7 @@ class CRM_Member_Form_Search extends CRM_Core_Form_Search {
);
//LCD also allow restrictions to membership owner via GET
$owner = CRM_Utils_Request::retrieve('owner', 'String', CRM_Core_DAO::$_nullObject);
$owner = CRM_Utils_Request::retrieve('owner', 'String');
if ($owner) {
$this->_formValues['member_is_primary'] = $this->_defaults['member_is_primary'] = 2;
}
......
......@@ -76,7 +76,7 @@ class CRM_Pledge_Form_Search extends CRM_Core_Form_Search {
// we allow the controller to set force/reset externally, useful when we are being
// driven by the wizard framework
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean');
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
......
......@@ -538,7 +538,7 @@ class CRM_Report_Form extends CRM_Core_Form {
CRM_Core_DAO::$_nullObject
);
$this->_section = CRM_Utils_Request::retrieve('section', 'Integer', CRM_Core_DAO::$_nullObject);
$this->_section = CRM_Utils_Request::retrieve('section', 'Integer');
$this->assign('section', $this->_section);
CRM_Core_Region::instance('page-header')->add(array(
......@@ -3329,7 +3329,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
if ($this->addPaging) {
$this->_select = str_ireplace('SELECT ', 'SELECT SQL_CALC_FOUND_ROWS ', $this->_select);
$pageId = CRM_Utils_Request::retrieve('crmPID', 'Integer', CRM_Core_DAO::$_nullObject);