/** * Check if this post type is special( reserved in system ) * * @param integer Use this param ID of post type when object is not created * @return boolean */ function is_special($ID = NULL) { $special_range = ItemType::get_special_range(); if ($ID === NULL) { // Get ID of this object $ID = $this->ID; } return $ID >= $special_range[0] && $ID <= $special_range[1]; }
die('Please, do not access this page directly.'); } // Load Itemtype class: load_class('items/model/_itemtype.class.php', 'ItemType'); /** * @var AdminUI */ global $AdminUI; /** * @var User */ global $current_User; global $dispatcher; // get reserved ids global $special_range; $special_range = ItemType::get_special_range(); // Check minimum permission: $current_User->check_perm('options', 'view', true); // We should activate toolbar menu items for this controller $activate_collection_toolbar = true; $tab = param('tab', 'string', 'settings', true); $tab3 = param('tab3', 'string', 'types', true); $AdminUI->set_path('collections', $tab, $tab3); // Get action parameter from request: param_action(); if (param('ityp_ID', 'integer', '', true)) { // Load itemtype from cache: $ItemtypeCache =& get_ItemTypeCache(); if (($edited_Itemtype =& $ItemtypeCache->get_by_ID($ityp_ID, false)) === false) { // We could not find the post type to edit: unset($edited_Itemtype);