b2evolution PHP Cross Reference Blogging Systems

Source: /inc/items/item_statuses.ctrl.php - 97 lines - 3354 bytes - Text - Print

Description: This file implements the controller for item statuses management. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the controller for item statuses management.
   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   * Parts of this file are copyright (c)2005-2006 by PROGIDISTRI - {@link http://progidistri.com/}.
  10   *
  11   * {@internal License choice
  12   * - If you have received this file as part of a package, please find the license.txt file in
  13   *   the same folder or the closest folder above for complete license terms.
  14   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  15   *   then you must choose one of the following licenses before using the file:
  16   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  17   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  18   * }}
  19   *
  20   * {@internal Open Source relicensing agreement:
  21   * PROGIDISTRI S.A.S. grants Francois PLANQUE the right to license
  22   * PROGIDISTRI S.A.S.'s contributions to this file and the b2evolution project
  23   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  24   * }}
  25   *
  26   * @package admin
  27   *
  28   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  29   * @author fplanque: Francois PLANQUE.
  30   * @author mbruneau: Marc BRUNEAU / PROGIDISTRI
  31   *
  32   * @version $Id: item_statuses.ctrl.php 6136 2014-03-08 07:59:48Z manuel $
  33   */
  34  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  35  
  36  /**
  37   * @var AdminUI
  38   */
  39  global $AdminUI;
  40  
  41  /**
  42   * @var User
  43   */
  44  global $current_User;
  45  
  46  global $dispatcher;
  47  
  48  // Check minimum permission:
  49  $current_User->check_perm( 'options', 'view', true );
  50  
  51  $tab = param( 'tab', 'string', 'settings', true );
  52  
  53  /**
  54   * We need make this call to build menu for all modules
  55   */
  56  $AdminUI->set_path( 'items' );
  57  
  58  /*
  59   * Add sub menu entries:
  60   * We do this here instead of _header because we need to include all filter params into regenerate_url()
  61   */
  62  attach_browse_tabs();
  63  
  64  $AdminUI->set_path( 'items', 'settings', 'statuses' );
  65  
  66  $AdminUI->breadcrumbpath_init();
  67  $AdminUI->breadcrumbpath_add( T_('Contents'), '?ctrl=items&amp;blog=$blog$&amp;tab=full&amp;filter=restore' );
  68  $AdminUI->breadcrumbpath_add( T_('Settings'), '?ctrl=itemtypes&amp;blog=$blog$&amp;tab=settings&amp;tab3=statuses' );
  69  $AdminUI->breadcrumbpath_add( T_('Post statuses'), '?ctrl=itemtypes&amp;blog=$blog$&amp;tab=settings&amp;tab3=statuses' );
  70  
  71  
  72  
  73  $list_title = T_('Post statuses');
  74  $default_col_order = 'A';
  75  $edited_name_maxlen = 30;
  76  $perm_name = 'options';
  77  $perm_level = 'edit';
  78  $form_below_list = true;
  79  
  80  /**
  81   * Delete restrictions
  82   */
  83  $delete_restrictions = array(
  84          array( 'table'=>'T_items__item', 'fk'=>'post_pst_ID', 'msg'=>T_('%d related items') ),
  85      );
  86  
  87  $restrict_title = T_('Cannot delete item status');     //&laquo;%s&raquo;
  88  
  89  // Used to know if the element can be deleted, so to display or not display confirm delete dialog (true:display, false:not display)
  90  // It must be initialized to false before checking the delete restrictions
  91  $checked_delete = false;
  92  
  93  $GenericElementCache = new GenericCache( 'GenericElement', false, 'T_items__status', 'pst_', 'pst_ID' );
  94  
  95  require $inc_path.'generic/inc/_generic_listeditor.php';
  96  
  97  ?>

title

Description

title

Description

title

Description

title

title

Body