=== modified file 'modules/node/node.module'
--- modules/node/node.module	2009-01-08 09:00:13 +0000
+++ modules/node/node.module	2009-01-08 12:05:47 +0000
@@ -1771,6 +1771,11 @@
  * Implementation of hook_init().
  */
 function node_init() {
+  if ($_GET['q'] == 'node') {
+    if (!db_query("SELECT n.nid FROM {node} n WHERE n.promote = 1 AND n.status = 1 LIMIT 1")->fetch()) {
+      $_GET['q'] = drupal_get_normal_path(variable_get('site_empty_frontpage', 'admin/help'));
+    }
+  }
   drupal_add_css(drupal_get_path('module', 'node') . '/node.css');
 }
 

=== modified file 'modules/system/system.admin.inc'
--- modules/system/system.admin.inc	2009-01-06 14:00:12 +0000
+++ modules/system/system.admin.inc	2009-01-08 11:51:34 +0000
@@ -1242,6 +1242,15 @@
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
     '#required' => TRUE,
   );
+  $form['site_empty_frontpage'] = array(
+    '#type' => 'textfield',
+    '#title' => t('No content front page'),
+    '#default_value' => variable_get('site_empty_frontpage', 'admin/help'),
+    '#size' => 40,
+    '#description' => t('The home page displays this content if there are no promoted posts. If unsure, specify "admin/help".'),
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
+    '#required' => TRUE,
+  );
   $form['#validate'][] = 'system_site_information_settings_validate';
 
   return system_settings_form($form);
@@ -1265,6 +1274,17 @@
   if (!empty($item) && !menu_valid_path($item)) {
     form_set_error('site_frontpage', t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $item['link_path'])));
   }
+
+  $item = array('link_path' => $form_state['values']['site_empty_frontpage']);
+  $normal_path = drupal_get_normal_path($item['link_path']);
+  if ($item['link_path'] != $normal_path) {
+    drupal_set_message(t('The menu system stores system paths only, but will use the URL alias for display. %link_path has been stored as %normal_path', array('%link_path' => $item['link_path'], '%normal_path' => $normal_path)));
+    $item['link_path'] = $normal_path;
+  }
+  $normal_path = drupal_get_normal_path($item['link_path']);
+  if (!empty($item) && !menu_valid_path($item)) {
+    form_set_error('site_empty+frontpage', t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $item['link_path'])));
+  }
 }
 
 /**

