projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1c0c69
)
Remove hacks from CRM_Core_Menu for old unsupported versions
author
Coleman Watts
<coleman@civicrm.org>
Wed, 7 Mar 2018 16:15:19 +0000
(11:15 -0500)
committer
Coleman Watts
<coleman@civicrm.org>
Wed, 7 Mar 2018 16:15:19 +0000
(11:15 -0500)
CRM/Core/Menu.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/Menu.php
b/CRM/Core/Menu.php
index 8f32997e8110237c794665552eecc5851b9db597..8bdf2371e682ec2bd339b2866563f7886e197ffa 100644
(file)
--- a/
CRM/Core/Menu.php
+++ b/
CRM/Core/Menu.php
@@
-307,7
+307,6
@@
class CRM_Core_Menu {
self::build($menuArray);
self::build($menuArray);
- $config = CRM_Core_Config::singleton();
$daoFields = CRM_Core_DAO_Menu::fields();
foreach ($menuArray as $path => $item) {
$daoFields = CRM_Core_DAO_Menu::fields();
foreach ($menuArray as $path => $item) {
@@
-673,8
+672,6
@@
class CRM_Core_Menu {
// return null if menu rebuild
$config = CRM_Core_Config::singleton();
// return null if menu rebuild
$config = CRM_Core_Config::singleton();
- $params = array();
-
$args = explode('/', $path);
$elements = array();
$args = explode('/', $path);
$elements = array();
@@
-687,22
+684,13
@@
class CRM_Core_Menu {
$queryString = implode(', ', $elements);
$domainID = CRM_Core_Config::domainID();
$queryString = implode(', ', $elements);
$domainID = CRM_Core_Config::domainID();
- $domainWhereClause = " AND domain_id = $domainID ";
- if ($config->isUpgradeMode() &&
- !CRM_Core_DAO::checkFieldExists('civicrm_menu', 'domain_id')
- ) {
- //domain_id wouldn't be available for earlier version of
- //3.0 and therefore can't be used as part of query for
- //upgrade case
- $domainWhereClause = "";
- }
$query = "
(
SELECT *
FROM civicrm_menu
WHERE path in ( $queryString )
$query = "
(
SELECT *
FROM civicrm_menu
WHERE path in ( $queryString )
- $domainWhereClause
+ AND domain_id = $domainID
ORDER BY length(path) DESC
LIMIT 1
)
ORDER BY length(path) DESC
LIMIT 1
)
@@
-714,7
+702,7
@@
UNION (
SELECT *
FROM civicrm_menu
WHERE path IN ( 'navigation' )
SELECT *
FROM civicrm_menu
WHERE path IN ( 'navigation' )
- $domainWhereClause
+ AND domain_id = $domainID
)
";
}
)
";
}
@@
-752,12
+740,6
@@
UNION (
}
}
}
}
- // *FIXME* : hack for 2.1 -> 2.2 upgrades.
- if ($path == 'civicrm/upgrade') {
- $menuPath['page_callback'] = 'CRM_Upgrade_Page_Upgrade';
- $menuPath['access_arguments'][0][] = 'administer CiviCRM';
- $menuPath['access_callback'] = array('CRM_Core_Permission', 'checkMenu');
- }
// *FIXME* : hack for 4.1 -> 4.2 upgrades.
if (preg_match('/^civicrm\/(upgrade\/)?queue\//', $path)) {
CRM_Queue_Menu::alter($path, $menuPath);
// *FIXME* : hack for 4.1 -> 4.2 upgrades.
if (preg_match('/^civicrm\/(upgrade\/)?queue\//', $path)) {
CRM_Queue_Menu::alter($path, $menuPath);