Newer
Older

Angie Byron
committed
<?php
db_insert('variable')->fields(array(
'name',
'value',
))
->values(array(
'name' => 'menu_default_node_menu',
'value' => 's:15:"secondary-links";',
))
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
->values(array(
'name' => 'menu_primary_links_source',
'value' => 's:15:"secondary-links";',
))
->values(array(
'name' => 'menu_secondary_links_source',
'value' => 's:13:"primary-links";',
))
->execute();
// Add some links to the menus.
db_insert('menu_links')->fields(array(
'menu_name',
'mlid',
'plid',
'link_path',
'router_path',
'link_title',
'options',
'module',
'hidden',
'external',
'has_children',
'expanded',
'weight',
'depth',
'customized',
'p1',
'p2',
'p3',
'p4',
'p5',
'p6',
'p7',
'p8',
'p9',
'updated',
))
->values(array(
'menu_name' => 'navigation',
'mlid' => '201',
'plid' => '0',
'link_path' => 'node/add',
'router_path' => 'node/add',
'link_title' => 'nodeadd-navigation',
'options' => 'a:0:{}',
'module' => 'menu',
'hidden' => '0',
'external' => '0',
'has_children' => '1',
'expanded' => '0',
'weight' => '1',
'depth' => '1',
'customized' => '0',
'p1' => '201',
'p2' => '0',
'p3' => '0',
'p4' => '0',
'p5' => '0',
'p6' => '0',
'p7' => '0',
'p8' => '0',
'p9' => '0',
'updated' => '0',
))
->values(array(
'menu_name' => 'primary-links',
'mlid' => '204',
'plid' => '0',
'link_path' => 'node/add',
'router_path' => 'node/add',
'link_title' => 'nodeadd-primary',
'options' => 'a:0:{}',
'module' => 'menu',
'hidden' => '0',
'external' => '0',
'has_children' => '1',
'expanded' => '0',
'weight' => '1',
'depth' => '1',
'customized' => '0',
'p1' => '204',
'p2' => '0',
'p3' => '0',
'p4' => '0',
'p5' => '0',
'p6' => '0',
'p7' => '0',
'p8' => '0',
'p9' => '0',
'updated' => '0',
))
->values(array(
'menu_name' => 'secondary-links',
'mlid' => '205',
'plid' => '0',
'link_path' => 'node/add',
'router_path' => 'node/add',
'link_title' => 'nodeadd-secondary',
'options' => 'a:0:{}',
'module' => 'menu',
'hidden' => '0',
'external' => '0',
'has_children' => '1',
'expanded' => '0',
'weight' => '1',
'depth' => '1',
'customized' => '0',
'p1' => '205',
'p2' => '0',
'p3' => '0',
'p4' => '0',
'p5' => '0',
'p6' => '0',
'p7' => '0',
'p8' => '0',
'p9' => '0',
'updated' => '0',
))

Angie Byron
committed
->execute();