Go to the source code of this file.
Functions | |
| panels_node_install () | |
| panels_node_uninstall () | |
| panels_node_update_5000 () | |
| panels_node_update_5001 () | |
| panels_node_install | ( | ) |
Install the panels node tables.
Definition at line 8 of file panels_node.install.
00008 { 00009 switch ($GLOBALS['db_type']) { 00010 case 'pgsql': 00011 db_query(<<<EOT 00012 CREATE TABLE {panels_node} ( 00013 nid integer NOT NULL DEFAULT 0, 00014 css_id varchar(255), 00015 did integer, 00016 contexts text, 00017 relationships text, 00018 PRIMARY KEY (nid) 00019 ); 00020 EOT 00021 ); 00022 break; 00023 00024 case 'mysql': 00025 case 'mysqli': 00026 db_query(<<<EOT 00027 CREATE TABLE {panels_node} ( 00028 nid int(10) NOT NULL DEFAULT 0 PRIMARY KEY, 00029 css_id varchar(255), 00030 did int(10), 00031 contexts text, 00032 relationships text 00033 ); 00034 EOT 00035 ); 00036 break; 00037 } 00038 }
| panels_node_uninstall | ( | ) |
Uninstall the panels node tables.
Definition at line 43 of file panels_node.install.
00043 { 00044 // TODO: Delete all actual nodes that are panels_nodes. 00045 db_query("DELETE FROM {node} WHERE type = 'panel'"); 00046 switch ($GLOBALS['db_type']) { 00047 case 'pgsql': 00048 db_query("DROP TABLE {panels_node}"); 00049 break; 00050 00051 case 'mysql': 00052 case 'mysqli': 00053 db_query("DROP TABLE IF EXISTS {panels_node}"); 00054 break; 00055 } 00056 }
| panels_node_update_5000 | ( | ) |
Definition at line 58 of file panels_node.install.
00058 { 00059 $ret = array(); 00060 $ret[] = update_sql("UPDATE {system} SET weight = 11 WHERE name = 'panels_node'"); 00061 menu_rebuild(); 00062 return $ret; 00063 }
| panels_node_update_5001 | ( | ) |
Add arguments, contexts, and relationships to panels_node.
Definition at line 68 of file panels_node.install.
00068 { 00069 $ret = array(); 00070 // db_add_column() is sufficient for MySQL and PostGreSQL in this case. 00071 db_add_column($ret, 'panels_node', 'contexts', 'text'); 00072 db_add_column($ret, 'panels_node', 'relationships', 'text'); 00073 return $ret; 00074 }
1.5.6