Merge pull request #15181 from seamuslee001/mailing_search_date_picker_conversion
[civicrm-core.git] / CRM / Core / Invoke.php
index 15ff125b0b9d037ec906c0b236dc4b9fdd45d969..9f9a8b776b56d23b77fa2bc666be70836dccf9a8 100644 (file)
@@ -77,9 +77,9 @@ class CRM_Core_Invoke {
 
     if (!defined('CIVICRM_SYMFONY_PATH')) {
       // Traditional Civi invocation path
-      self::hackMenuRebuild($args); // may exit
+      // may exit
+      self::hackMenuRebuild($args);
       self::init($args);
-      self::hackStandalone($args);
       $item = self::getItem($args);
       return self::runItem($item);
     }
@@ -108,13 +108,14 @@ class CRM_Core_Invoke {
    *   List of path parts.
    * @void
    */
-  static public function hackMenuRebuild($args) {
+  public static function hackMenuRebuild($args) {
     if (['civicrm', 'menu', 'rebuild'] == $args || ['civicrm', 'clearcache'] == $args) {
       // ensure that the user has a good privilege level
       if (CRM_Core_Permission::check('administer CiviCRM')) {
         self::rebuildMenuAndCaches();
         CRM_Core_Session::setStatus(ts('Cleared all CiviCRM caches (database, menu, templates)'), ts('Complete'), 'success');
-        return CRM_Utils_System::redirect(); // exits
+        // exits
+        return CRM_Utils_System::redirect();
       }
       else {
         CRM_Core_Error::fatal('You do not have permission to execute this url');
@@ -129,7 +130,7 @@ class CRM_Core_Invoke {
    *   List of path parts.
    * @void
    */
-  static public function init($args) {
+  public static function init($args) {
     // first fire up IDS and check for bad stuff
     $config = CRM_Core_Config::singleton();
 
@@ -138,26 +139,6 @@ class CRM_Core_Invoke {
     $i18n = CRM_Core_I18n::singleton();
   }
 
-  /**
-   * Hackish support for /standalone/*
-   *
-   * @param array $args
-   *   List of path parts.
-   * @void
-   */
-  static public function hackStandalone($args) {
-    $config = CRM_Core_Config::singleton();
-    if ($config->userFramework == 'Standalone') {
-      $session = CRM_Core_Session::singleton();
-      if ($session->get('new_install') !== TRUE) {
-        CRM_Core_Standalone::sidebarLeft();
-      }
-      elseif ($args[1] == 'standalone' && $args[2] == 'register') {
-        CRM_Core_Menu::store();
-      }
-    }
-  }
-
   /**
    * Determine which menu $item corresponds to $args
    *
@@ -165,7 +146,7 @@ class CRM_Core_Invoke {
    *   List of path parts.
    * @return array; see CRM_Core_Menu
    */
-  static public function getItem($args) {
+  public static function getItem($args) {
     if (is_array($args)) {
       // get the menu items
       $path = implode('/', $args);
@@ -192,7 +173,7 @@ class CRM_Core_Invoke {
    *   See CRM_Core_Menu.
    * @return string, HTML
    */
-  static public function runItem($item) {
+  public static function runItem($item) {
     $ids = new CRM_Core_IDS();
     $ids->check($item);