3
* This file implements the controller for item types management.
5
* This file is part of Quam Plures - {@link http://quamplures.net/}
6
* See also {@link https://launchpad.net/quam-plures}.
8
* @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
9
* @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
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
20
* {@internal Open Source relicensing agreement:
23
* {@internal Below is a list of authors who have contributed to design/coding of this file: }}
24
* @author fplanque: Francois PLANQUE.
3
* $ctrl_mappings: 'itemtypes' || Global settings -> Post types
5
* @author {@link http://wonderwinds.com/ Ed Bennett}
6
* @author {@link http://fplanque.net/ Francois PLANQUE}
7
* @copyright (c) 2009 by {@link http://quamplures.net/ the Quam Plures project}
8
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3
28
if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
11
if(!defined('QP_MAIN_INIT')) die('fail');
30
// Check minimum permission:
13
// Check minimum permission
31
14
$current_User->check_perm( 'options', 'view', true );
33
16
$AdminUI->set_path( 'options', 'types' );
35
18
$list_title = T_('Item/Post/Page types');
36
19
$default_col_order = '-A';
37
20
$edited_name_maxlen = 40;
38
$locked_IDs = array_merge( $posttypes_locked_IDs, $posttypes_reserved_IDs ); // Prevent editing of reserved and locked post types
21
// Prevent editing of reserved and locked post types
22
$locked_IDs = array_merge( $posttypes_locked_IDs, $posttypes_reserved_IDs );
39
23
$perm_name = 'options';
40
24
$perm_level = 'edit';
41
25
$form_below_list = true;
27
// Delete restrictions
46
28
$delete_restrictions = array(
47
array( 'table'=>'T_items__item', 'fk'=>'post_ptyp_ID', 'msg'=>T_('%d related items') ),
50
$restrict_title = T_('Cannot delete item type'); //«%s»
52
// Used to know if the element can be deleted, so to display or not display confirm delete dialog (true:display, false:not display)
53
// It must be initialized to false before checking the delete restrictions
29
array( 'table' => 'T_items__item', 'fk' => 'post_ptyp_ID', 'msg' => T_('%d related items') ),
32
$restrict_title = T_('Cannot delete item type');
34
// Used to know if the element can be deleted, so to display or not display
35
// confirm delete dialog (true:display, false:not display) It must be initialized
36
// to false before checking the delete restrictions
54
37
$checked_delete = false;
56
39
$GenericElementCache = new GenericCache( 'GenericElement', false, 'T_items__type', 'ptyp_', 'ptyp_ID' );
42
* require generic list editor
58
44
require $inc_path.'generic/inc/_generic_listeditor.php';
b'\\ No newline at end of file'