t('Holds the configuration data for panels pages.'), 'fields' => array( 'pid' => array( 'type' => 'serial', 'not null' => TRUE, ), 'name' => array( 'type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '', ), 'did' => array( 'type' => 'int', 'default' => NULL, ), 'title' => array( 'type' => 'varchar', 'length' => 128, ), 'access' => array( 'type' => 'varchar', 'length' => 128, 'storage_type' => 'implode', ), 'path' => array( 'type' => 'varchar', 'length' => 128, ), 'load_flags' => array( 'description' => t('Bitval-as-integer metadata used in determining panel_page behavior at runtime.'), 'type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0, ), 'css_id' => array( 'type' => 'varchar', 'length' => 128, ), 'css' => array( 'type' => 'text', 'size' => 'big', ), 'arguments' => array( 'type' => 'text', 'size' => 'big', 'storage_type' => 'serialize', ), 'displays' => array( 'type' => 'text', 'size' => 'big', 'storage_type' => 'serialize', ), 'contexts' => array( 'type' => 'text', 'size' => 'big', 'storage_type' => 'serialize', ), 'relationships' => array( 'type' => 'text', 'size' => 'big', 'storage_type' => 'serialize', ), 'no_blocks' => array( 'type' => 'int', 'size' => 'tiny', 'default' => 0, ), 'switcher_options' => array( 'type' => 'text', 'size' => 'big', 'not null' => FALSE, 'storage_type' => 'serialize', ), 'switcher_name' => array( 'type' => 'varchar', 'length' => 128, 'not null' => FALSE, ), 'switcher_type' => array( 'type' => 'varchar', 'length' => 128, 'not null' => FALSE, ), 'menu' => array( 'type' => 'int', 'size' => 'tiny', 'default' => 0, ), 'menu_tab' => array( 'type' => 'int', 'size' => 'tiny', 'not null' => FALSE, ), 'menu_tab_weight' => array( 'type' => 'int', 'size' => 'tiny', ), 'menu_title' => array( 'type' => 'varchar', 'length' => 255, ), 'menu_tab_default' => array( 'type' => 'int', 'size' => 'small', ), 'menu_tab_default_parent_type' => array( 'type' => 'varchar', 'length' => 10, ), 'menu_parent_title' => array( 'type' => 'varchar', 'length' => 255, ), 'menu_parent_tab_weight' => array( 'type' => 'int', 'size' => 'tiny', ), ), 'primary key' => array('pid'), 'unique keys' => array( 'name' => array('name'), ), 'indexes' => array( 'path_idx' => array('path'), 'did_idx' => array('did'), ), ); // Straight copy from the menu schema; duping it for storage purposes. $schema['panels_page_router_store'] = array( 'description' => t('Maps paths to various callbacks (access, page and title)'), 'fields' => array( 'path' => array( 'description' => t('The Drupal path this entry describes.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'load_functions' => array( 'description' => t('A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'to_arg_functions' => array( 'description' => t('A serialized array of function names (like user_uid_optional_to_arg) to be called to replace a part of the router path with another string.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'access_callback' => array( 'description' => t('The callback which determines the access to this router path. Defaults to user_access.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'access_arguments' => array( 'description' => t('A serialized array of arguments for the access callback.'), 'type' => 'text', 'not null' => FALSE, ), 'page_callback' => array( 'description' => t('The name of the function that renders the page.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'page_arguments' => array( 'description' => t('A serialized array of arguments for the page callback.'), 'type' => 'text', 'not null' => FALSE, ), 'fit' => array( 'description' => t('A numeric representation of how specific the path is.'), 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'number_parts' => array( 'description' => t('Number of parts in this router path.'), 'type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small', ), 'tab_parent' => array( 'description' => t('Only for local tasks (tabs) - the router path of the parent page (which may also be a local task).'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'tab_root' => array( 'description' => t('Router path of the closest non-tab parent page. For pages that are not local tasks, this will be the same as the path.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'title' => array( 'description' => t('The title for the current page, or the title for the tab if this is a local task.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'title_callback' => array( 'description' => t('A function which will alter the title. Defaults to t()'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'title_arguments' => array( 'description' => t('A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'type' => array( 'description' => t('Numeric representation of the type of the menu item, like MENU_LOCAL_TASK.'), 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'block_callback' => array( 'description' => t('Name of a function used to render the block on the system administration page for this item.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'description' => array( 'description' => t('A description of this item.'), 'type' => 'text', 'not null' => TRUE, ), 'position' => array( 'description' => t('The position of the block (left or right) on the system administration page for this item.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'weight' => array( 'description' => t('Weight of the element. Lighter weights are higher up, heavier weights go down.'), 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'file' => array( 'description' => t('The file to include for this element, usually the page callback function lives in this file.'), 'type' => 'text', 'size' => 'medium', ), ), 'indexes' => array( 'fit_idx' => array('fit'), 'number_parts_idx' => array('number_parts'), ), 'primary key' => array('path'), ); return $schema; } /** * Strips out any whitespace in the access string. * * The ONLY time this should do anything is via some really weird upgrade paths. * However, it's harmless if the string is already correct (i.e., the value * separator is already ',' instead of the old ', '), so this update function is * included by the "better safe than sorry" mantra. */ function panels_page_update_6001() { $result = db_query('SELECT pid, access from {panels_page}'); while ($row = db_fetch_object($result)) { $row->access = str_replace(' ', '', $row->access); db_query("UPDATE {panels_page} SET access = '%s' WHERE pid = %d", $row->access, $row->pid); } return array(); } function panels_page_install() { db_query("UPDATE {system} SET weight = 15 WHERE name = 'panels_page'"); drupal_install_schema('panels_page'); } function panels_page_uninstall() { drupal_uninstall_schema('panels_page'); }