? .DS_Store
? garland_theme_default_00.patch
? locale_modules_enabled_00.patch
? make_node_optional_14.patch
? make_node_optional_15.patch
? node_decouple_system_00.patch
? node_decouple_system_01.patch
? node_decouple_system_02.patch
? node_decouple_system_03.patch
? node_decouple_system_04.patch
? node_decouple_system_05.patch
? includes/.new.TT4Svd
? modules/.DS_Store
? modules/simpletest/.DS_Store
? modules/simpletest/tests/.DS_Store
? sites/.DS_Store
? sites/default/files
? sites/default/settings.php
? themes/.DS_Store
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.956
diff -u -p -r1.956 common.inc
--- includes/common.inc 8 Aug 2009 20:52:32 -0000 1.956
+++ includes/common.inc 11 Aug 2009 18:32:03 -0000
@@ -4887,8 +4887,7 @@ function drupal_flush_all_caches() {
}
drupal_theme_rebuild();
- // Rebuild content types, menu will be rebuilt as well.
- node_types_rebuild();
+ menu_rebuild();
// Don't clear cache_form - in-progress form submissions may break.
// Ordered so clearing the page cache will always be the last action.
$core = array('cache', 'cache_filter', 'cache_registry', 'cache_page');
Index: modules/blog/blog.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.pages.inc,v
retrieving revision 1.22
diff -u -p -r1.22 blog.pages.inc
--- modules/blog/blog.pages.inc 10 Aug 2009 22:39:24 -0000 1.22
+++ modules/blog/blog.pages.inc 11 Aug 2009 18:32:03 -0000
@@ -37,7 +37,7 @@ function blog_page_user($account) {
->condition('status', 1)
->orderBy('sticky', 'DESC')
->orderBy('created', 'DESC')
- ->limit(variable_get('default_nodes_main', 10))
+ ->limit(variable_get('node_list_count', 10))
->addTag('node_access')
->execute()
->fetchCol();
@@ -86,7 +86,7 @@ function blog_page_last() {
->condition('status', 1)
->orderBy('sticky', 'DESC')
->orderBy('created', 'DESC')
- ->limit(variable_get('default_nodes_main', 10))
+ ->limit(variable_get('node_list_count', 10))
->addTag('node_access')
->execute()
->fetchCol();
Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.85
diff -u -p -r1.85 content_types.inc
--- modules/node/content_types.inc 9 Aug 2009 01:15:33 -0000 1.85
+++ modules/node/content_types.inc 11 Aug 2009 18:32:04 -0000
@@ -334,6 +334,7 @@ function node_type_form_submit($form, &$
}
node_types_rebuild();
+ menu_rebuild();
$t_args = array('%name' => $type->name);
if ($status == SAVED_UPDATED) {
@@ -415,6 +416,7 @@ function node_type_delete_confirm_submit
watchdog('menu', 'Deleted content type %name.', $t_args, WATCHDOG_NOTICE);
node_types_rebuild();
+ menu_rebuild();
$form_state['redirect'] = 'admin/structure/types';
return;
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.60
diff -u -p -r1.60 node.admin.inc
--- modules/node/node.admin.inc 30 Jul 2009 19:24:21 -0000 1.60
+++ modules/node/node.admin.inc 11 Aug 2009 18:32:05 -0000
@@ -7,6 +7,53 @@
*/
/**
+ * Implement hook_modules_enabled().
+ */
+function node_modules_enabled($modules) {
+ node_types_rebuild();
+}
+
+/**
+ * Implement hook_modules_disabled().
+ */
+function node_modules_disabled($modules) {
+ node_types_rebuild();
+}
+
+/**
+ * Implement hook_form_FORM_ID_alter().
+ */
+function node_form_system_themes_form_alter(&$form, $form_state) {
+ $form['#submit'][] = 'node_system_themes_form_submit';
+ $form['admin_theme']['node_admin_theme'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Use administration theme for content editing'),
+ '#description' => t('Use the administration theme when creating or editing content.'),
+ '#default_value' => variable_get('node_admin_theme', FALSE),
+ );
+}
+
+/**
+ * Form submit handler for system_themes_form().
+ */
+function node_system_themes_form_submit($form, &$form_state) {
+ variable_set('node_admin_theme', $form_state['values']['node_admin_theme']);
+}
+
+/**
+ * Implement hook_form_FORM_ID_alter().
+ */
+function node_form_system_site_information_settings_alter(&$form, $form_state) {
+ $form['node_list_count'] = array(
+ '#type' => 'select', '#title' => t('Pieces of content at %node', array('%node' => '/node')),
+ '#default_value' => variable_get('node_list_count', 10),
+ '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
+ '#description' => t('The maximum number of pieces of content displayed at !node.', array('!node' => l('/node', 'node'))),
+ );
+ $form['buttons']['#weight'] = 1;
+}
+
+/**
* Menu callback: confirm rebuilding of permissions.
*/
function node_configure_rebuild_confirm() {
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.25
diff -u -p -r1.25 node.install
--- modules/node/node.install 27 Jul 2009 19:26:31 -0000 1.25
+++ modules/node/node.install 11 Aug 2009 18:32:05 -0000
@@ -331,10 +331,74 @@ function node_schema() {
'primary key' => array('type'),
);
+ $schema['history'] = array(
+ 'description' => 'A record of which {users} have read which {node}s.',
+ 'fields' => array(
+ 'uid' => array(
+ 'description' => 'The {users}.uid that read the {node} nid.',
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'nid' => array(
+ 'description' => 'The {node}.nid that was read.',
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'timestamp' => array(
+ 'description' => 'The Unix timestamp at which the read occurred.',
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'primary key' => array('uid', 'nid'),
+ 'indexes' => array(
+ 'nid' => array('nid'),
+ ),
+ );
+
return $schema;
}
/**
+ * Implementation of hook_install().
+ */
+function node_install() {
+ drupal_install_schema('node');
+
+ db_insert('node_access')
+ ->fields(array(
+ 'nid' => 0,
+ 'gid' => 0,
+ 'realm' => 'all',
+ 'grant_view' => 1,
+ 'grant_update' => 0,
+ 'grant_delete' => 0,
+ ))
+ ->execute();
+
+ variable_set('node_options_forum', array(0 => 'status'));
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function node_uninstall() {
+ global $conf;
+
+ $variables = db_query("SELECT name FROM {variable} WHERE name LIKE 'node_%'")->fetchCol();
+ foreach ($variables as $variable) {
+ unset($conf[$variable]);
+ }
+ db_query("DELETE FROM {variable} WHERE name LIKE 'node_%'");
+ cache_clear_all('variables', 'cache');
+
+ drupal_uninstall_schema('node');
+}
+
+/**
* @defgroup updates-6.x-to-7.x System updates from 6.x to 7.x
* @{
*/
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1095
diff -u -p -r1.1095 node.module
--- modules/node/node.module 8 Aug 2009 22:52:59 -0000 1.1095
+++ modules/node/node.module 11 Aug 2009 18:32:06 -0000
@@ -1684,7 +1684,7 @@ function node_menu() {
);
$items['node'] = array(
'title' => 'Content',
- 'page callback' => 'node_page_default',
+ 'page callback' => 'node_page',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
@@ -1956,7 +1956,7 @@ function node_build_multiple($nodes, $bu
/**
* Menu callback; Generate a listing of promoted nodes.
*/
-function node_page_default() {
+function node_page() {
$select = db_select('node', 'n')
->fields('n', array('nid'))
->condition('promote', 1)
@@ -1964,7 +1964,7 @@ function node_page_default() {
->orderBy('sticky', 'DESC')
->orderBy('created', 'DESC')
->extend('PagerDefault')
- ->limit(variable_get('default_nodes_main', 10))
+ ->limit(variable_get('node_list_count', 10))
->addTag('node_access');
$nids = $select->execute()->fetchCol();
@@ -1979,27 +1979,17 @@ function node_page_default() {
'#theme' => 'pager',
'#weight' => 5,
);
- drupal_set_title('');
}
else {
- drupal_set_title(t('Welcome to @site-name', array('@site-name' => variable_get('site_name', 'Drupal'))));
-
- $default_message = '
' . t('No front page content has been created yet.') . '
';
-
- if (user_access('access administration pages')) {
- $default_links = array (
- l(t('Create content'), 'node/add'),
- l(t('Change the default front page'), 'admin/settings/site-information'),
- );
- $default_message .= theme('item_list', $default_links);
- }
-
- $build['default_message'] = array(
- '#markup' => $default_message,
+ $build['message'] = array(
+ '#markup' => t('No content has been promoted yet.'),
'#prefix' => '',
'#suffix' => '
',
);
}
+
+ drupal_set_title('');
+
return $build;
}
Index: modules/simpletest/simpletest.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.test,v
retrieving revision 1.26
diff -u -p -r1.26 simpletest.test
--- modules/simpletest/simpletest.test 13 Jul 2009 21:51:41 -0000 1.26
+++ modules/simpletest/simpletest.test 11 Aug 2009 18:32:06 -0000
@@ -43,7 +43,7 @@ class SimpleTestFunctionalTest extends D
function testInternalBrowser() {
global $conf;
if (!$this->inCURL()) {
- $this->drupalGet('node');
+ $this->drupalGet('frontpage');
$this->assertTrue($this->drupalGetHeader('Date'), t('An HTTP header was received.'));
$this->assertTitle(t('Welcome to @site-name | @site-name', array('@site-name' => variable_get('site_name', 'Drupal'))), t('Site title matches.'));
$this->assertNoTitle('Foo', t('Site title does not match.'));
Index: modules/simpletest/tests/common.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
retrieving revision 1.58
diff -u -p -r1.58 common.test
--- modules/simpletest/tests/common.test 11 Aug 2009 11:52:46 -0000 1.58
+++ modules/simpletest/tests/common.test 11 Aug 2009 18:32:08 -0000
@@ -375,7 +375,7 @@ class DrupalHTTPRequestTestCase extends
$this->assertEqual($unable_to_parse->error, 'unable to parse URL', t('Returned with "unable to parse URL" error.'));
// Fetch page.
- $result = drupal_http_request(url('node', array('absolute' => TRUE)));
+ $result = drupal_http_request(url('frontpage', array('absolute' => TRUE)));
$this->assertEqual($result->code, 200, t('Fetched page successfully.'));
$this->drupalSetContent($result->data);
$this->assertTitle(t('Welcome to @site-name | @site-name', array('@site-name' => variable_get('site_name', 'Drupal'))), t('Site title matches.'));
Index: modules/simpletest/tests/menu.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/menu.test,v
retrieving revision 1.13
diff -u -p -r1.13 menu.test
--- modules/simpletest/tests/menu.test 14 Jul 2009 20:53:16 -0000 1.13
+++ modules/simpletest/tests/menu.test 11 Aug 2009 18:32:08 -0000
@@ -44,7 +44,7 @@ class MenuIncTestCase extends DrupalWebT
// Move second link to the main-menu, to test caching later on.
db_update('menu_links')
->fields(array('menu_name' => 'main-menu'))
- ->condition('link_title', 'Menu link #1-1')
+ ->condition('link_title', array('Menu link #1-1', 'Menu link #2'), 'IN')
->condition('customized', 0)
->condition('module', 'menu_test')
->execute();
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.169
diff -u -p -r1.169 system.admin.inc
--- modules/system/system.admin.inc 5 Aug 2009 19:40:55 -0000 1.169
+++ modules/system/system.admin.inc 11 Aug 2009 18:32:09 -0000
@@ -222,12 +222,6 @@ function system_themes_form() {
'#description' => t('Choose which theme the administration pages should display in. If you choose "Default theme" the administration pages will use the same theme as the rest of the site.'),
'#default_value' => variable_get('admin_theme', 0),
);
- $form['admin_theme']['node_admin_theme'] = array(
- '#type' => 'checkbox',
- '#title' => t('Use administration theme for content editing'),
- '#description' => t('Use the administration theme when editing existing posts or creating new ones.'),
- '#default_value' => variable_get('node_admin_theme', '0'),
- );
$form['buttons']['submit'] = array(
'#type' => 'submit',
@@ -280,13 +274,11 @@ function system_themes_form_submit($form
// Save the variables.
variable_set('theme_default', $form_state['values']['theme_default']);
variable_set('admin_theme', $form_state['values']['admin_theme']);
- variable_set('node_admin_theme', $form_state['values']['node_admin_theme']);
}
else {
// Revert to defaults: only Garland is enabled.
variable_del('theme_default');
variable_del('admin_theme');
- variable_del('node_admin_theme');
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
@@ -951,7 +943,7 @@ function system_modules_submit($form, &$
// Clear all caches.
registry_rebuild();
drupal_theme_rebuild();
- node_types_rebuild();
+ menu_rebuild();
cache_clear_all('schema', 'cache');
drupal_clear_css_cache();
drupal_clear_js_cache();
@@ -1231,18 +1223,12 @@ function system_site_information_setting
$form['site_frontpage'] = array(
'#type' => 'textfield',
'#title' => t('Default front page'),
- '#default_value' => 'node',
+ '#default_value' => 'frontpage',
'#size' => 40,
- '#description' => t('The home page displays content from this relative URL. If unsure, specify "node".'),
+ '#description' => t('The home page displays content from this relative URL. If unsure, specify %frontpage.', array('%frontpage' => 'frontpage')),
'#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
'#required' => TRUE,
);
- $form['default_nodes_main'] = array(
- '#type' => 'select', '#title' => t('Number of posts on front page'),
- '#default_value' => 10,
- '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
- '#description' => t('The maximum number of posts displayed on overview pages like the frontpage.')
- );
$form['site_403'] = array(
'#type' => 'textfield',
'#title' => t('Default 403 (access denied) page'),
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.365
diff -u -p -r1.365 system.install
--- modules/system/system.install 8 Aug 2009 20:52:32 -0000 1.365
+++ modules/system/system.install 11 Aug 2009 18:32:10 -0000
@@ -312,7 +312,7 @@ function system_requirements($phase) {
*/
function system_install() {
// Create tables.
- $modules = array('system', 'filter', 'user', 'node');
+ $modules = array('system', 'filter', 'user');
foreach ($modules as $module) {
drupal_install_schema($module);
}
@@ -386,17 +386,6 @@ function system_install() {
->condition('name', 'garland')
->execute();
- db_insert('node_access')
- ->fields(array(
- 'nid' => 0,
- 'gid' => 0,
- 'realm' => 'all',
- 'grant_view' => 1,
- 'grant_update' => 0,
- 'grant_delete' => 0,
- ))
- ->execute();
-
// Add text formats.
$filtered_html_format = db_insert('filter_format')
->fields(array(
@@ -473,8 +462,6 @@ function system_install() {
// Set the default input format to Filtered HTML.
variable_set('filter_default_format', $filtered_html_format);
- variable_set('node_options_forum', array(0 => 'status'));
-
$cron_key = md5(mt_rand());
variable_set('cron_key', $cron_key);
@@ -779,33 +766,6 @@ function system_schema() {
),
);
- $schema['history'] = array(
- 'description' => 'A record of which {users} have read which {node}s.',
- 'fields' => array(
- 'uid' => array(
- 'description' => 'The {users}.uid that read the {node} nid.',
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- ),
- 'nid' => array(
- 'description' => 'The {node}.nid that was read.',
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- ),
- 'timestamp' => array(
- 'description' => 'The Unix timestamp at which the read occurred.',
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- ),
- ),
- 'primary key' => array('uid', 'nid'),
- 'indexes' => array(
- 'nid' => array('nid'),
- ),
- );
$schema['menu_router'] = array(
'description' => 'Maps paths to various callbacks (access, page and title)',
'fields' => array(
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.737
diff -u -p -r1.737 system.module
--- modules/system/system.module 5 Aug 2009 19:40:55 -0000 1.737
+++ modules/system/system.module 11 Aug 2009 18:32:11 -0000
@@ -782,12 +782,23 @@ function system_menu() {
'access arguments' => array('administer site configuration'),
'type' => MENU_CALLBACK,
);
+
// Default page for batch operations.
$items['batch'] = array(
'page callback' => 'system_batch_page',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
+
+ // Default front page.
+ $items['frontpage'] = array(
+ 'title' => 'Front page',
+ 'description' => 'The default front page.',
+ 'page callback' => 'system_frontpage',
+ 'access callback' => TRUE,
+ 'type' => MENU_CALLBACK,
+ );
+
return $items;
}
@@ -3019,3 +3030,27 @@ function system_retrieve_file($url, $des
return $local;
}
+
+/**
+ * Display the default front page.
+ */
+function system_frontpage() {
+ drupal_set_title(t('Welcome to @site-name', array('@site-name' => variable_get('site_name', 'Drupal'))));
+
+ $links = array(t("The front page hasn't yet been configured."));
+
+ if (user_access('access administration pages')) {
+ $links[0] = $links[0] . ' ' . l(t('Change the default front page'), 'admin/settings/site-information');
+ if (module_exists('node')) {
+ $links[] = l(t('Add new content'), 'node/add');
+ }
+ }
+
+ $build['message'] = array(
+ '#markup' => theme('item_list', $links),
+ '#prefix' => '',
+ '#suffix' => '
',
+ );
+
+ return $build;
+}
\ No newline at end of file
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.493
diff -u -p -r1.493 taxonomy.module
--- modules/taxonomy/taxonomy.module 4 Aug 2009 06:50:07 -0000 1.493
+++ modules/taxonomy/taxonomy.module 11 Aug 2009 18:32:12 -0000
@@ -1591,7 +1591,7 @@ function taxonomy_select_nodes($tids = a
$query = $query
->extend('PagerDefault')
- ->limit(variable_get('default_nodes_main', 10));
+ ->limit(variable_get('node_list_count', 10));
$query->setCountQuery($count_query);
}
else {