drupal-6.translatable.database.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /**
  3. * Database additions for translatable tests.
  4. */
  5. db_insert('node')->fields(array(
  6. 'nid',
  7. 'vid',
  8. 'type',
  9. 'language',
  10. 'title',
  11. 'uid',
  12. 'status',
  13. 'created',
  14. 'changed',
  15. 'comment',
  16. 'promote',
  17. 'moderate',
  18. 'sticky',
  19. 'tnid',
  20. 'translate',
  21. ))
  22. ->values(array(
  23. 'nid' => '53',
  24. 'vid' => '63',
  25. 'type' => 'translatable_page',
  26. 'language' => 'fr',
  27. 'title' => 'First translatable page',
  28. 'uid' => '1',
  29. 'status' => '1',
  30. 'created' => '1298363952',
  31. 'changed' => '1298363952',
  32. 'comment' => '2',
  33. 'promote' => '0',
  34. 'moderate' => '0',
  35. 'sticky' => '0',
  36. 'tnid' => '0',
  37. 'translate' => '0',
  38. ))
  39. ->execute();
  40. db_insert('node_revisions')->fields(array(
  41. 'nid',
  42. 'vid',
  43. 'uid',
  44. 'title',
  45. 'body',
  46. 'teaser',
  47. 'log',
  48. 'timestamp',
  49. 'format',
  50. ))
  51. ->values(array(
  52. 'nid' => '53',
  53. 'vid' => '63',
  54. 'uid' => '1',
  55. 'title' => 'First translatable page',
  56. 'body' => 'Body of the first translatable page.',
  57. 'teaser' => 'Teaser of the first translatable page.',
  58. 'log' => '',
  59. 'timestamp' => '1298363952',
  60. 'format' => '1',
  61. ))
  62. ->execute();
  63. db_insert('node_comment_statistics')->fields(array(
  64. 'nid',
  65. 'last_comment_timestamp',
  66. 'last_comment_name',
  67. 'last_comment_uid',
  68. 'comment_count',
  69. ))
  70. ->values(array(
  71. 'nid' => '53',
  72. 'last_comment_timestamp' => '1298363952',
  73. 'last_comment_name' => NULL,
  74. 'last_comment_uid' => '1',
  75. 'comment_count' => '0',
  76. ))
  77. ->execute();
  78. db_insert('node_type')->fields(array(
  79. 'type',
  80. 'name',
  81. 'module',
  82. 'description',
  83. 'help',
  84. 'has_title',
  85. 'title_label',
  86. 'has_body',
  87. 'body_label',
  88. 'min_word_count',
  89. 'custom',
  90. 'modified',
  91. 'locked',
  92. 'orig_type',
  93. ))
  94. ->values(array(
  95. 'type' => 'translatable_page',
  96. 'name' => 'Translatable page',
  97. 'module' => 'node',
  98. 'description' => 'A <em>translatable page</em> is like a normal page, but with multilanguage support.',
  99. 'help' => '',
  100. 'has_title' => '1',
  101. 'title_label' => 'Title',
  102. 'has_body' => '1',
  103. 'body_label' => 'Body',
  104. 'min_word_count' => '0',
  105. 'custom' => '0',
  106. 'modified' => '0',
  107. 'locked' => '1',
  108. 'orig_type' => '',
  109. ))
  110. ->execute();
  111. db_insert('variable')->fields(array(
  112. 'name',
  113. 'value',
  114. ))
  115. ->values(array(
  116. 'name' => 'language_content_type_translatable_page',
  117. 'value' => 's:1:"1";',
  118. ))
  119. ->execute();