Commit ceb39c0a authored by jaapjansma's avatar jaapjansma

Merge branch 'currentPath' into 'master'

Switch to non-deprecated function CRM_Utils_System::currentPath

See merge request !37
parents 1b171993 1f58a820
...@@ -69,7 +69,7 @@ class CRM_Contact_Controller_DataProcessorContactSearch extends CRM_Core_Control ...@@ -69,7 +69,7 @@ class CRM_Contact_Controller_DataProcessorContactSearch extends CRM_Core_Control
if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ContactSearch) { if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ContactSearch) {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -58,7 +58,7 @@ class CRM_Contact_Form_DataProcessorContactSearch extends CRM_DataprocessorSearc ...@@ -58,7 +58,7 @@ class CRM_Contact_Form_DataProcessorContactSearch extends CRM_DataprocessorSearc
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_contact_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_contact_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
...@@ -136,4 +136,4 @@ class CRM_Contact_Form_DataProcessorContactSearch extends CRM_DataprocessorSearc ...@@ -136,4 +136,4 @@ class CRM_Contact_Form_DataProcessorContactSearch extends CRM_DataprocessorSearc
return $this->_taskList; return $this->_taskList;
} }
} }
\ No newline at end of file
...@@ -77,7 +77,7 @@ class CRM_Contact_Form_DataProcessorContactSummaryTab extends CRM_DataprocessorS ...@@ -77,7 +77,7 @@ class CRM_Contact_Form_DataProcessorContactSummaryTab extends CRM_DataprocessorS
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_contact_summary/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_contact_summary/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -104,7 +104,7 @@ class CRM_Contact_Selector_DataProcessorContactSearch { ...@@ -104,7 +104,7 @@ class CRM_Contact_Selector_DataProcessorContactSearch {
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_contact_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_contact_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -59,7 +59,7 @@ class CRM_Dataprocessor_Form_ManageDataProcessors extends CRM_Core_Form { ...@@ -59,7 +59,7 @@ class CRM_Dataprocessor_Form_ManageDataProcessors extends CRM_Core_Form {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_ActivitySearch extends CRM_Core_Control ...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_ActivitySearch extends CRM_Core_Control
if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ActivitySearch) { if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ActivitySearch) {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_CaseSearch extends CRM_Core_Controller ...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_CaseSearch extends CRM_Core_Controller
if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_CaseSearch) { if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_CaseSearch) {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_ContributionSearch extends CRM_Core_Con ...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_ContributionSearch extends CRM_Core_Con
if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ContributionSearch) { if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ContributionSearch) {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_MembershipSearch extends CRM_Core_Contr ...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_MembershipSearch extends CRM_Core_Contr
if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_MembershipSearch) { if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_MembershipSearch) {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_ParticipantSearch extends CRM_Core_Cont ...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_ParticipantSearch extends CRM_Core_Cont
if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ParticipantSearch) { if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_ParticipantSearch) {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_Search extends CRM_Core_Controller { ...@@ -58,7 +58,7 @@ class CRM_DataprocessorSearch_Controller_Search extends CRM_Core_Controller {
if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_Search) { if (!$this->_pages[$pageName] instanceof CRM_DataprocessorSearch_Form_Search) {
$session = CRM_Core_Session::singleton(); $session = CRM_Core_Session::singleton();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -162,7 +162,7 @@ abstract class CRM_DataprocessorSearch_Form_AbstractSearch extends CRM_Dataproce ...@@ -162,7 +162,7 @@ abstract class CRM_DataprocessorSearch_Form_AbstractSearch extends CRM_Dataproce
parent::preProcess(); parent::preProcess();
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this); $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlPath = CRM_Utils_System::getUrlPath(); $urlPath = CRM_Utils_System::currentPath();
$urlParams = 'force=1'; $urlParams = 'force=1';
if ($qfKey) { if ($qfKey) {
$urlParams .= "&qfKey=$qfKey"; $urlParams .= "&qfKey=$qfKey";
......
...@@ -45,7 +45,7 @@ class CRM_DataprocessorSearch_Form_ActivitySearch extends CRM_DataprocessorSearc ...@@ -45,7 +45,7 @@ class CRM_DataprocessorSearch_Form_ActivitySearch extends CRM_DataprocessorSearc
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_activity_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_activity_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -50,7 +50,7 @@ class CRM_DataprocessorSearch_Form_CaseSearch extends CRM_DataprocessorSearch_Fo ...@@ -50,7 +50,7 @@ class CRM_DataprocessorSearch_Form_CaseSearch extends CRM_DataprocessorSearch_Fo
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_case_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_case_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -57,7 +57,7 @@ class CRM_DataprocessorSearch_Form_ContributionSearch extends CRM_DataprocessorS ...@@ -57,7 +57,7 @@ class CRM_DataprocessorSearch_Form_ContributionSearch extends CRM_DataprocessorS
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_contribution_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_contribution_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -57,7 +57,7 @@ class CRM_DataprocessorSearch_Form_MembershipSearch extends CRM_DataprocessorSea ...@@ -57,7 +57,7 @@ class CRM_DataprocessorSearch_Form_MembershipSearch extends CRM_DataprocessorSea
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_membership_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_membership_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -57,7 +57,7 @@ class CRM_DataprocessorSearch_Form_ParticipantSearch extends CRM_DataprocessorSe ...@@ -57,7 +57,7 @@ class CRM_DataprocessorSearch_Form_ParticipantSearch extends CRM_DataprocessorSe
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_participant_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_participant_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -37,7 +37,7 @@ class CRM_DataprocessorSearch_Form_Search extends CRM_DataprocessorSearch_Form_A ...@@ -37,7 +37,7 @@ class CRM_DataprocessorSearch_Form_Search extends CRM_DataprocessorSearch_Form_A
* @return String * @return String
*/ */
protected function getDataProcessorName() { protected function getDataProcessorName() {
$dataProcessorName = str_replace('civicrm/dataprocessor_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_search/', '', CRM_Utils_System::currentPath());
return $dataProcessorName; return $dataProcessorName;
} }
......
...@@ -19,7 +19,7 @@ class CRM_DataprocessorSearch_Task extends CRM_Core_Task { ...@@ -19,7 +19,7 @@ class CRM_DataprocessorSearch_Task extends CRM_Core_Task {
*/ */
public static function tasks() { public static function tasks() {
if (!(self::$_tasks)) { if (!(self::$_tasks)) {
$dataProcessorName = str_replace('civicrm/dataprocessor_search/', '', CRM_Utils_System::getUrlPath()); $dataProcessorName = str_replace('civicrm/dataprocessor_search/', '', CRM_Utils_System::currentPath());
self::$objectType = 'dataprocessor_'.$dataProcessorName; self::$objectType = 'dataprocessor_'.$dataProcessorName;
self::$_tasks = array(); self::$_tasks = array();
...@@ -60,7 +60,7 @@ class CRM_DataprocessorSearch_Task extends CRM_Core_Task { ...@@ -60,7 +60,7 @@ class CRM_DataprocessorSearch_Task extends CRM_Core_Task {
*/ */
public static function searchActionDesignerTypes(&$types) { public static function searchActionDesignerTypes(&$types) {
$dao = CRM_Core_DAO::executeQuery(" $dao = CRM_Core_DAO::executeQuery("
SELECT `d`.`name`, `d`.`title` SELECT `d`.`name`, `d`.`title`
FROM `civicrm_data_processor` `d` FROM `civicrm_data_processor` `d`
INNER JOIN `civicrm_data_processor_output` `o` ON `o`.`data_processor_id` = `d`.`id` INNER JOIN `civicrm_data_processor_output` `o` ON `o`.`data_processor_id` = `d`.`id`
WHERE `d`.`is_active` = 1 AND `o`.`type` = 'search'"); WHERE `d`.`is_active` = 1 AND `o`.`type` = 'search'");
...@@ -73,4 +73,4 @@ class CRM_DataprocessorSearch_Task extends CRM_Core_Task { ...@@ -73,4 +73,4 @@ class CRM_DataprocessorSearch_Task extends CRM_Core_Task {
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment