b2evolution PHP Cross Reference Blogging Systems

Source: /inc/regional/regional_dispatch.ctrl.php - 50 lines - 1749 bytes - Text - Print

Description: Dispatch to the last used controller in Global Settings -> Regional

   1  <?php
   2  /**

   3   * Dispatch to the last used controller in Global Settings -> Regional

   4   *

   5   * This file is part of the evoCore framework - {@link http://evocore.net/}

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}

   9   *

  10   * {@internal License choice

  11   * - If you have received this file as part of a package, please find the license.txt file in

  12   *   the same folder or the closest folder above for complete license terms.

  13   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)

  14   *   then you must choose one of the following licenses before using the file:

  15   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php

  16   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php

  17   * }}

  18   *

  19   * @package admin

  20   *

  21   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  22   * @author fplanque: Francois PLANQUE

  23   *

  24   * @version $Id: regional_dispatch.ctrl.php 9 2011-10-24 22:32:00Z fplanque $

  25   */
  26  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  27  
  28  // Store/retrieve preferred tab from UserSettings:

  29  $UserSettings->param_Request( 'tab', 'pref_glob_regional_tab', 'string', 'locales', true /* memorize */, true /* force */ );
  30  
  31  // Avoid infernal loop:

  32  if( $tab == 'regional' )
  33  {
  34      $ctrl = 'locales';
  35  }
  36  else
  37  {
  38      $ctrl = $tab;
  39  }
  40  
  41  // Check matching controller file:

  42  if( !isset($ctrl_mappings[$ctrl]) )
  43  {
  44      debug_die( 'The requested controller ['.$ctrl.'] does not exist.' );
  45  }
  46  
  47  // Call the requested controller:

  48  require $inc_path.$ctrl_mappings[$ctrl];
  49  
  50  ?>

title

Description

title

Description

title

Description

title

title

Body