cms/drupal/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
changeset 541 e756a8c72c3d
equal deleted inserted replaced
540:07239de796bb 541:e756a8c72c3d
       
     1 <?php
       
     2 db_insert('variable')->fields(array(
       
     3   'name',
       
     4   'value',
       
     5 ))
       
     6 ->values(array(
       
     7   'name' => 'menu_default_node_menu',
       
     8   'value' => 's:15:"secondary-links";',
       
     9 ))
       
    10 ->values(array(
       
    11   'name' => 'menu_primary_links_source',
       
    12   'value' => 's:15:"secondary-links";',
       
    13 ))
       
    14 ->values(array(
       
    15   'name' => 'menu_secondary_links_source',
       
    16   'value' => 's:13:"primary-links";',
       
    17 ))
       
    18 ->execute();
       
    19 
       
    20 // Add some links to the menus.
       
    21 db_insert('menu_links')->fields(array(
       
    22   'menu_name',
       
    23   'mlid',
       
    24   'plid',
       
    25   'link_path',
       
    26   'router_path',
       
    27   'link_title',
       
    28   'options',
       
    29   'module',
       
    30   'hidden',
       
    31   'external',
       
    32   'has_children',
       
    33   'expanded',
       
    34   'weight',
       
    35   'depth',
       
    36   'customized',
       
    37   'p1',
       
    38   'p2',
       
    39   'p3',
       
    40   'p4',
       
    41   'p5',
       
    42   'p6',
       
    43   'p7',
       
    44   'p8',
       
    45   'p9',
       
    46   'updated',
       
    47 ))
       
    48 ->values(array(
       
    49   'menu_name' => 'navigation',
       
    50   'mlid' => '201',
       
    51   'plid' => '0',
       
    52   'link_path' => 'node/add',
       
    53   'router_path' => 'node/add',
       
    54   'link_title' => 'nodeadd-navigation',
       
    55   'options' => 'a:0:{}',
       
    56   'module' => 'menu',
       
    57   'hidden' => '0',
       
    58   'external' => '0',
       
    59   'has_children' => '1',
       
    60   'expanded' => '0',
       
    61   'weight' => '1',
       
    62   'depth' => '1',
       
    63   'customized' => '0',
       
    64   'p1' => '201',
       
    65   'p2' => '0',
       
    66   'p3' => '0',
       
    67   'p4' => '0',
       
    68   'p5' => '0',
       
    69   'p6' => '0',
       
    70   'p7' => '0',
       
    71   'p8' => '0',
       
    72   'p9' => '0',
       
    73   'updated' => '0',
       
    74 ))
       
    75 ->values(array(
       
    76   'menu_name' => 'primary-links',
       
    77   'mlid' => '204',
       
    78   'plid' => '0',
       
    79   'link_path' => 'node/add',
       
    80   'router_path' => 'node/add',
       
    81   'link_title' => 'nodeadd-primary',
       
    82   'options' => 'a:0:{}',
       
    83   'module' => 'menu',
       
    84   'hidden' => '0',
       
    85   'external' => '0',
       
    86   'has_children' => '1',
       
    87   'expanded' => '0',
       
    88   'weight' => '1',
       
    89   'depth' => '1',
       
    90   'customized' => '0',
       
    91   'p1' => '204',
       
    92   'p2' => '0',
       
    93   'p3' => '0',
       
    94   'p4' => '0',
       
    95   'p5' => '0',
       
    96   'p6' => '0',
       
    97   'p7' => '0',
       
    98   'p8' => '0',
       
    99   'p9' => '0',
       
   100   'updated' => '0',
       
   101 ))
       
   102 ->values(array(
       
   103   'menu_name' => 'secondary-links',
       
   104   'mlid' => '205',
       
   105   'plid' => '0',
       
   106   'link_path' => 'node/add',
       
   107   'router_path' => 'node/add',
       
   108   'link_title' => 'nodeadd-secondary',
       
   109   'options' => 'a:0:{}',
       
   110   'module' => 'menu',
       
   111   'hidden' => '0',
       
   112   'external' => '0',
       
   113   'has_children' => '1',
       
   114   'expanded' => '0',
       
   115   'weight' => '1',
       
   116   'depth' => '1',
       
   117   'customized' => '0',
       
   118   'p1' => '205',
       
   119   'p2' => '0',
       
   120   'p3' => '0',
       
   121   'p4' => '0',
       
   122   'p5' => '0',
       
   123   'p6' => '0',
       
   124   'p7' => '0',
       
   125   'p8' => '0',
       
   126   'p9' => '0',
       
   127   'updated' => '0',
       
   128 ))
       
   129 ->values(array(
       
   130   'menu_name' => 'secondary-links',
       
   131   'mlid' => '206',
       
   132   'plid' => '0',
       
   133   'link_path' => 'node',
       
   134   'router_path' => 'node',
       
   135   'link_title' => 'node-page-with-query',
       
   136   'options' => 'a:2:{s:5:"query";s:14:"page=1&node=10";s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
       
   137   'module' => 'menu',
       
   138   'hidden' => '0',
       
   139   'external' => '0',
       
   140   'has_children' => '0',
       
   141   'expanded' => '0',
       
   142   'weight' => '2',
       
   143   'depth' => '1',
       
   144   'customized' => '1',
       
   145   'p1' => '206',
       
   146   'p2' => '0',
       
   147   'p3' => '0',
       
   148   'p4' => '0',
       
   149   'p5' => '0',
       
   150   'p6' => '0',
       
   151   'p7' => '0',
       
   152   'p8' => '0',
       
   153   'p9' => '0',
       
   154   'updated' => '0',
       
   155 ))
       
   156 ->execute();
       
   157 db_insert('blocks')->fields(array(
       
   158   'bid',
       
   159   'module',
       
   160   'delta',
       
   161   'theme',
       
   162   'status',
       
   163   'weight',
       
   164   'region',
       
   165   'custom',
       
   166   'throttle',
       
   167   'visibility',
       
   168   'pages',
       
   169   'title',
       
   170   'cache',
       
   171 ))
       
   172 ->values(array(
       
   173   'bid' => '4',
       
   174   'module' => 'menu',
       
   175   'delta' => 'primary-links',
       
   176   'theme' => 'garland',
       
   177   'status' => '1',
       
   178   'weight' => '0',
       
   179   'region' => 'left',
       
   180   'custom' => '0',
       
   181   'throttle' => '0',
       
   182   'visibility' => '0',
       
   183   'pages' => '',
       
   184   'title' => 'My Primary Links',
       
   185   'cache' => '-1',
       
   186 ))
       
   187 ->values(array(
       
   188   'bid' => '5',
       
   189   'module' => 'menu',
       
   190   'delta' => 'secondary-links',
       
   191   'theme' => 'garland',
       
   192   'status' => '1',
       
   193   'weight' => '0',
       
   194   'region' => 'left',
       
   195   'custom' => '0',
       
   196   'throttle' => '0',
       
   197   'visibility' => '0',
       
   198   'pages' => '',
       
   199   'title' => 'My Secondary Links',
       
   200   'cache' => '-1',
       
   201 ))
       
   202 ->execute();