~quam-plures-core/quam-plures/qp5_colls-blogs_chaps-cats

« back to all changes in this revision

Viewing changes to qp_inc/items/item_types.ctrl.php

  • Committer: EdB
  • Date: 2013-03-12 06:26:03 UTC
  • Revision ID: 1912webworks@gmail.com-20130312062603-tnlb5zco5mglydqj
lots of changes in this branch. tested and functional, but not going into merge just yet ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/**
3
 
 * This file implements the controller for item types management.
4
 
 *
5
 
 * This file is part of Quam Plures - {@link http://quamplures.net/}
6
 
 * See also {@link https://launchpad.net/quam-plures}.
7
 
 *
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/}
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
 
 * }}
22
 
 *
23
 
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
24
 
 * @author fplanque: Francois PLANQUE.
25
 
 *
 
3
 * $ctrl_mappings: 'itemtypes' || Global settings -> Post types
 
4
 *
 
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
26
9
 * @package items
27
10
 */
28
 
if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
 
11
if(!defined('QP_MAIN_INIT')) die('fail');
29
12
 
30
 
// Check minimum permission:
 
13
// Check minimum permission
31
14
$current_User->check_perm( 'options', 'view', true );
32
15
 
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;
42
26
 
43
 
/**
44
 
 * Delete restrictions
45
 
 */
 
27
// Delete restrictions
46
28
$delete_restrictions = array(
47
 
                array( 'table'=>'T_items__item', 'fk'=>'post_ptyp_ID', 'msg'=>T_('%d related items') ),
48
 
        );
49
 
 
50
 
$restrict_title = T_('Cannot delete item type');         //&laquo;%s&raquo;
51
 
 
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') ),
 
30
);
 
31
 
 
32
$restrict_title = T_('Cannot delete item type');
 
33
 
 
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;
55
38
 
56
39
$GenericElementCache = new GenericCache( 'GenericElement', false, 'T_items__type', 'ptyp_', 'ptyp_ID' );
57
40
 
 
41
/**
 
42
 * require generic list editor
 
43
 */
58
44
require $inc_path.'generic/inc/_generic_listeditor.php';
59
45
 
60
 
?>
 
 
b'\\ No newline at end of file'
 
46
?>