? files
? install_form.patch
? install_form_7_0.patch
? no_settings_php.patch
? tplify_theme.inc.patch
? sites/logrus.com.x
? sites/all/modules
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.42
diff -u -p -r1.42 install.php
--- install.php	6 May 2007 11:56:41 -0000	1.42
+++ install.php	8 May 2007 04:04:50 -0000
@@ -114,7 +114,7 @@ function install_verify_settings() {
   global $db_prefix, $db_type, $db_url;
 
   // Verify existing settings (if any).
-  if ($_SERVER['REQUEST_METHOD'] == 'GET' && $db_url != 'mysql://username:password@localhost/databasename') {
+  if ($_SERVER['REQUEST_METHOD'] == 'GET' && !empty($db_url)) {
     // We need this because we want to run form_get_errors.
     include_once './includes/form.inc';
 
@@ -146,7 +146,8 @@ function install_change_settings($profil
   $db_host = urldecode($url['host']);
   $db_port = isset($url['port']) ? urldecode($url['port']) : '';
   $db_path = ltrim(urldecode($url['path']), '/');
-  $settings_file = './'. conf_path() .'/settings.php';
+  $conf_path = './'. conf_path();
+  $settings_file = $conf_path .'/settings.php';
 
   // We always need this because we want to run form_get_errors.
   include_once './includes/form.inc';
@@ -155,18 +156,30 @@ function install_change_settings($profil
 
   // The existing database settings are not working, so we need write access
   // to settings.php to change them.
-  if (!drupal_verify_install_file($settings_file, FILE_EXIST|FILE_READABLE|FILE_WRITABLE)) {
-    drupal_set_message(st('The @drupal installer requires write permissions to %file during the installation process.', array('@drupal' => drupal_install_profile_name(), '%file' => $settings_file)), 'error');
+  $writeable = FALSE;
+  $file = $conf_path;
+  // Verify the directory exists.
+  if (drupal_verify_install_file($conf_path, FILE_EXIST, 'dir')) {
+    // Check to see if a settings.php already exists
+    if (drupal_verify_install_file($settings_file, FILE_EXIST)) {
+      // If it does, make sure it is writeable
+      $writeable = drupal_verify_install_file($settings_file, FILE_READABLE|FILE_WRITEABLE);
+      $file = $settings_file;
+    }
+    else {
+      // If not, makes sure the directory is.
+      $writeable = drupal_verify_install_file($conf_path, FILE_READABLE|FILE_WRITEABLE, 'dir');
+    }
+  }
+  
+  if (!$writeable) {
+    drupal_set_message(st('The @drupal installer requires write permissions to %file during the installation process.', array('@drupal' => drupal_install_profile_name(), '%file' => $file)), 'error');
 
     drupal_set_title(st('Drupal database setup'));
     print theme('install_page', '');
     exit;
   }
 
-  // Don't fill in placeholders
-  if ($db_url == 'mysql://username:password@localhost/databasename') {
-    $db_user = $db_pass = $db_path = '';
-  }
   $output = drupal_get_form('install_settings_form', $profile, $install_locale, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host, $db_port, $db_path);
   drupal_set_title(st('Database configuration'));
   print theme('install_page', $output);
@@ -178,6 +191,9 @@ function install_change_settings($profil
  * Form API array definition for install_settings.
  */
 function install_settings_form($profile, $install_locale, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host, $db_port, $db_path) {
+  if (empty($db_host)) {
+    $db_host = 'localhost';
+  }
   $db_types = drupal_detect_database_types();
   if (count($db_types) == 0) {
     $form['no_db_types'] = array(
@@ -311,11 +327,6 @@ function install_settings_form_validate(
 function _install_settings_form_validate($db_prefix, $db_type, $db_user, $db_pass, $db_host, $db_port, $db_path, $settings_file, $form = NULL) {
   global $db_url;
 
-  // Check for default username/password
-  if ($db_user == 'username' && $db_pass == 'password') {
-    form_set_error('db_user', st('You have configured @drupal to use the default username and password. This is not allowed for security reasons.', array('@drupal' => drupal_install_profile_name())));
-  }
-
   // Verify the table prefix
   if (!empty($db_prefix) && is_string($db_prefix) && !preg_match('/^[A-Za-z0-9_.]+$/', $db_prefix)) {
     form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters, underscores or dots.', array('%db_prefix' => $db_prefix)), 'error');
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.164
diff -u -p -r1.164 bootstrap.inc
--- includes/bootstrap.inc	6 May 2007 05:47:51 -0000	1.164
+++ includes/bootstrap.inc	8 May 2007 04:04:51 -0000
@@ -266,7 +266,9 @@ function conf_init() {
   global $db_url, $db_prefix, $cookie_domain, $conf, $installed_profile;
   $conf = array();
 
-  include_once './'. conf_path() .'/settings.php';
+  if (file_exists('./'. conf_path() .'/settings.php')) {
+    include_once './'. conf_path() .'/settings.php';
+  }
 
   if (isset($base_url)) {
     // Parse fixed base URL from settings.php.
Index: includes/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.inc,v
retrieving revision 1.67
diff -u -p -r1.67 database.inc
--- includes/database.inc	13 Apr 2007 08:56:57 -0000	1.67
+++ includes/database.inc	8 May 2007 04:04:51 -0000
@@ -102,6 +102,11 @@ function db_set_active($name = 'default'
   global $db_url, $db_type, $active_db;
   static $db_conns;
 
+  if (empty($db_url)) {
+    include_once 'includes/install.inc';
+    install_goto('install.php');   
+  }
+
   if (!isset($db_conns[$name])) {
     // Initiate a new connection, using the named DB URL specified.
     if (is_array($db_url)) {
Index: includes/database.mysql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysql.inc,v
retrieving revision 1.70
diff -u -p -r1.70 database.mysql.inc
--- includes/database.mysql.inc	21 Apr 2007 18:08:41 -0000	1.70
+++ includes/database.mysql.inc	8 May 2007 04:04:51 -0000
@@ -57,11 +57,6 @@ function db_connect($url) {
 
   // Check if MySQL support is present in PHP
   if (!function_exists('mysql_connect')) {
-    // Redirect to installer if using default DB credentials
-    if ($url['user'] == 'username' && $url['pass'] == 'password') {
-      include_once 'includes/install.inc';
-      install_goto('install.php');
-    }
     drupal_maintenance_theme();
     drupal_set_title('PHP MySQL support not enabled');
     print theme('maintenance_page', '<p>We were unable to use the MySQL database because the MySQL extension for PHP is not installed. Check your <code>PHP.ini</code> to see how you can enable it.</p>
@@ -94,12 +89,6 @@ function db_connect($url) {
   //   (matched) rows, not the number of affected rows.
   $connection = @mysql_connect($url['host'], $url['user'], $url['pass'], TRUE, 2);
   if (!$connection) {
-    // Redirect to installer if using default DB credentials
-    if ($url['user'] == 'username' && $url['pass'] == 'password') {
-      include_once 'includes/install.inc';
-      install_goto('install.php');
-    }
-
     // Show error screen otherwise
     drupal_maintenance_theme();
     drupal_set_header('HTTP/1.1 503 Service Unavailable');
Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.37
diff -u -p -r1.37 install.inc
--- includes/install.inc	17 Apr 2007 07:19:38 -0000	1.37
+++ includes/install.inc	8 May 2007 04:04:52 -0000
@@ -165,8 +165,9 @@ function drupal_detect_database_types() 
  *   An array of settings that need to be updated.
  */
 function drupal_rewrite_settings($settings = array(), $prefix = '') {
+  $default_settings = './sites/default/default.settings.php';
   $settings_file = './'. conf_path() .'/'. $prefix .'settings.php';
-
+  
   // Build list of setting names and insert the values into the global namespace.
   $keys = array();
   foreach ($settings as $setting => $data) {
@@ -176,7 +177,7 @@ function drupal_rewrite_settings($settin
 
   $buffer = NULL;
   $first = TRUE;
-  if ($fp = @fopen($settings_file, 'r+')) {
+  if ($fp = fopen($default_settings, 'r')) {
     // Step line by line through settings.php.
     while (!feof($fp)) {
       $line = fgets($fp);
Index: sites/default/default.settings.php
===================================================================
RCS file: sites/default/default.settings.php
diff -N sites/default/default.settings.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sites/default/default.settings.php	8 May 2007 04:04:52 -0000
@@ -0,0 +1,179 @@
+<?php
+// $Id: settings.php,v 1.56 2007/05/04 08:32:00 goba Exp $
+
+/**
+ * @file
+ * Drupal site-specific configuration file.
+ *
+ * IMPORTANT NOTE:
+ * This file may have been set to read-only by the Drupal installation
+ * program. If you make changes to this file, be sure to protect it again
+ * after making your modifications. Failure to remove write permissions
+ * to this file is a security risk.
+ *
+ * The configuration file to be loaded is based upon the rules below.
+ *
+ * The configuration directory will be discovered by stripping the
+ * website's hostname from left to right and pathname from right to
+ * left. The first configuration file found will be used and any
+ * others will be ignored. If no other configuration file is found
+ * then the default configuration file at 'sites/default' will be used.
+ *
+ * For example, for a fictitious site installed at
+ * http://www.drupal.org/mysite/test/, the 'settings.php'
+ * is searched in the following directories:
+ *
+ *  1. sites/www.drupal.org.mysite.test
+ *  2. sites/drupal.org.mysite.test
+ *  3. sites/org.mysite.test
+ *
+ *  4. sites/www.drupal.org.mysite
+ *  5. sites/drupal.org.mysite
+ *  6. sites/org.mysite
+ *
+ *  7. sites/www.drupal.org
+ *  8. sites/drupal.org
+ *  9. sites/org
+ *
+ * 10. sites/default
+ *
+ * If you are installing on a non-standard port number, prefix the
+ * hostname with that number. For example,
+ * http://www.drupal.org:8080/mysite/test/ could be loaded from
+ * sites/8080.www.drupal.org.mysite.test/.
+ */
+
+/**
+ * Database settings:
+ *
+ * Note that the $db_url variable gets parsed using PHP's built-in
+ * URL parser (i.e. using the "parse_url()" function) so make sure
+ * not to confuse the parser. If your username, password
+ * or database name contain characters used to delineate
+ * $db_url parts, you can escape them via URI hex encodings:
+ *
+ *   : = %3a   / = %2f   @ = %40
+ *   + = %2b   ( = %28   ) = %29
+ *   ? = %3f   = = %3d   & = %26
+ *
+ * To specify multiple connections to be used in your site (i.e. for
+ * complex custom modules) you can also specify an associative array
+ * of $db_url variables with the 'default' element used until otherwise
+ * requested.
+ *
+ * You can optionally set prefixes for some or all database table names
+ * by using the $db_prefix setting. If a prefix is specified, the table
+ * name will be prepended with its value. Be sure to use valid database
+ * characters only, usually alphanumeric and underscore. If no prefixes
+ * are desired, leave it as an empty string ''.
+ *
+ * To have all database names prefixed, set $db_prefix as a string:
+ *
+ *   $db_prefix = 'main_';
+ *
+ * To provide prefixes for specific tables, set $db_prefix as an array.
+ * The array's keys are the table names and the values are the prefixes.
+ * The 'default' element holds the prefix for any tables not specified
+ * elsewhere in the array. Example:
+ *
+ *   $db_prefix = array(
+ *     'default'   => 'main_',
+ *     'users'     => 'shared_',
+ *     'sessions'  => 'shared_',
+ *     'role'      => 'shared_',
+ *     'authmap'   => 'shared_',
+ *     'sequences' => 'shared_',
+ *   );
+ *
+ * Database URL format:
+ *   $db_url = 'mysql://username:password@localhost/databasename';
+ *   $db_url = 'mysqli://username:password@localhost/databasename';
+ *   $db_url = 'pgsql://username:password@localhost/databasename';
+ */
+$db_url = 'mysql://username:password@localhost/databasename';
+$db_prefix = '';
+
+/**
+ * Base URL (optional).
+ *
+ * If you are experiencing issues with different site domains,
+ * uncomment the Base URL statement below (remove the leading hash sign)
+ * and fill in the URL to your Drupal installation.
+ *
+ * You might also want to force users to use a given domain.
+ * See the .htaccess file for more information.
+ *
+ * Examples:
+ *   $base_url = 'http://www.example.com';
+ *   $base_url = 'http://www.example.com:8888';
+ *   $base_url = 'http://www.example.com/drupal';
+ *   $base_url = 'https://www.example.com:8888/drupal';
+ *
+ * It is not allowed to have a trailing slash; Drupal will add it
+ * for you.
+ */
+# $base_url = 'http://www.example.com';  // NO trailing slash!
+
+/**
+ * PHP settings:
+ *
+ * To see what PHP settings are possible, including whether they can
+ * be set at runtime (ie., when ini_set() occurs), read the PHP
+ * documentation at http://www.php.net/manual/en/ini.php#ini.list
+ * and take a look at the .htaccess file to see which non-runtime
+ * settings are used there. Settings defined here should not be
+ * duplicated there so as to avoid conflict issues.
+ */
+ini_set('arg_separator.output',     '&amp;');
+ini_set('magic_quotes_runtime',     0);
+ini_set('magic_quotes_sybase',      0);
+ini_set('session.cache_expire',     200000);
+ini_set('session.cache_limiter',    'none');
+ini_set('session.cookie_lifetime',  2000000);
+ini_set('session.gc_maxlifetime',   200000);
+ini_set('session.save_handler',     'user');
+ini_set('session.use_only_cookies', 1);
+ini_set('session.use_trans_sid',    0);
+ini_set('url_rewriter.tags',        '');
+
+/**
+ * Drupal automatically generates a unique session cookie name for each site
+ * based on on its full domain name. If you have multiple domains pointing at
+ * the same Drupal site, you can either redirect them all to a single
+ * domain (see comment in .htaccess), or uncomment the line below and specify
+ * their shared base domain. Doing so assures that users remain logged in as they
+ * cross between your various domains.
+*/
+
+#$cookie_domain = 'example.com';
+
+/**
+ * Variable overrides:
+ *
+ * To override specific entries in the 'variable' table for this site,
+ * set them here. You usually don't need to use this feature. This is
+ * useful in a configuration file for a vhost or directory, rather than
+ * the default settings.php. Any configuration setting from the 'variable'
+ * table can be given a new value.
+ *
+ * Remove the leading hash signs to enable.
+ */
+# $conf = array(
+#   'site_name' => 'My Drupal site',
+#   'theme_default' => 'minnelli',
+#   'anonymous' => 'Visitor',
+# );
+
+/**
+ * String overrides:
+ *
+ * To override specific strings on your site with or without enabling locale
+ * module, add an entry to this list. This functionality allows you to change
+ * a small number of your site's default English language interface strings.
+ *
+ * Remove the leading hash signs to enable.
+ */
+# $conf['locale_custom_strings_en'] = array(
+#   'forum'      => 'Discussion board',
+#   '@count min' => '@count minutes',
+# );
Index: sites/default/settings.php
===================================================================
RCS file: sites/default/settings.php
diff -N sites/default/settings.php
--- sites/default/settings.php	4 May 2007 08:32:00 -0000	1.56
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,179 +0,0 @@
-<?php
-// $Id: settings.php,v 1.56 2007/05/04 08:32:00 goba Exp $
-
-/**
- * @file
- * Drupal site-specific configuration file.
- *
- * IMPORTANT NOTE:
- * This file may have been set to read-only by the Drupal installation
- * program. If you make changes to this file, be sure to protect it again
- * after making your modifications. Failure to remove write permissions
- * to this file is a security risk.
- *
- * The configuration file to be loaded is based upon the rules below.
- *
- * The configuration directory will be discovered by stripping the
- * website's hostname from left to right and pathname from right to
- * left. The first configuration file found will be used and any
- * others will be ignored. If no other configuration file is found
- * then the default configuration file at 'sites/default' will be used.
- *
- * For example, for a fictitious site installed at
- * http://www.drupal.org/mysite/test/, the 'settings.php'
- * is searched in the following directories:
- *
- *  1. sites/www.drupal.org.mysite.test
- *  2. sites/drupal.org.mysite.test
- *  3. sites/org.mysite.test
- *
- *  4. sites/www.drupal.org.mysite
- *  5. sites/drupal.org.mysite
- *  6. sites/org.mysite
- *
- *  7. sites/www.drupal.org
- *  8. sites/drupal.org
- *  9. sites/org
- *
- * 10. sites/default
- *
- * If you are installing on a non-standard port number, prefix the
- * hostname with that number. For example,
- * http://www.drupal.org:8080/mysite/test/ could be loaded from
- * sites/8080.www.drupal.org.mysite.test/.
- */
-
-/**
- * Database settings:
- *
- * Note that the $db_url variable gets parsed using PHP's built-in
- * URL parser (i.e. using the "parse_url()" function) so make sure
- * not to confuse the parser. If your username, password
- * or database name contain characters used to delineate
- * $db_url parts, you can escape them via URI hex encodings:
- *
- *   : = %3a   / = %2f   @ = %40
- *   + = %2b   ( = %28   ) = %29
- *   ? = %3f   = = %3d   & = %26
- *
- * To specify multiple connections to be used in your site (i.e. for
- * complex custom modules) you can also specify an associative array
- * of $db_url variables with the 'default' element used until otherwise
- * requested.
- *
- * You can optionally set prefixes for some or all database table names
- * by using the $db_prefix setting. If a prefix is specified, the table
- * name will be prepended with its value. Be sure to use valid database
- * characters only, usually alphanumeric and underscore. If no prefixes
- * are desired, leave it as an empty string ''.
- *
- * To have all database names prefixed, set $db_prefix as a string:
- *
- *   $db_prefix = 'main_';
- *
- * To provide prefixes for specific tables, set $db_prefix as an array.
- * The array's keys are the table names and the values are the prefixes.
- * The 'default' element holds the prefix for any tables not specified
- * elsewhere in the array. Example:
- *
- *   $db_prefix = array(
- *     'default'   => 'main_',
- *     'users'     => 'shared_',
- *     'sessions'  => 'shared_',
- *     'role'      => 'shared_',
- *     'authmap'   => 'shared_',
- *     'sequences' => 'shared_',
- *   );
- *
- * Database URL format:
- *   $db_url = 'mysql://username:password@localhost/databasename';
- *   $db_url = 'mysqli://username:password@localhost/databasename';
- *   $db_url = 'pgsql://username:password@localhost/databasename';
- */
-$db_url = 'mysql://username:password@localhost/databasename';
-$db_prefix = '';
-
-/**
- * Base URL (optional).
- *
- * If you are experiencing issues with different site domains,
- * uncomment the Base URL statement below (remove the leading hash sign)
- * and fill in the URL to your Drupal installation.
- *
- * You might also want to force users to use a given domain.
- * See the .htaccess file for more information.
- *
- * Examples:
- *   $base_url = 'http://www.example.com';
- *   $base_url = 'http://www.example.com:8888';
- *   $base_url = 'http://www.example.com/drupal';
- *   $base_url = 'https://www.example.com:8888/drupal';
- *
- * It is not allowed to have a trailing slash; Drupal will add it
- * for you.
- */
-# $base_url = 'http://www.example.com';  // NO trailing slash!
-
-/**
- * PHP settings:
- *
- * To see what PHP settings are possible, including whether they can
- * be set at runtime (ie., when ini_set() occurs), read the PHP
- * documentation at http://www.php.net/manual/en/ini.php#ini.list
- * and take a look at the .htaccess file to see which non-runtime
- * settings are used there. Settings defined here should not be
- * duplicated there so as to avoid conflict issues.
- */
-ini_set('arg_separator.output',     '&amp;');
-ini_set('magic_quotes_runtime',     0);
-ini_set('magic_quotes_sybase',      0);
-ini_set('session.cache_expire',     200000);
-ini_set('session.cache_limiter',    'none');
-ini_set('session.cookie_lifetime',  2000000);
-ini_set('session.gc_maxlifetime',   200000);
-ini_set('session.save_handler',     'user');
-ini_set('session.use_only_cookies', 1);
-ini_set('session.use_trans_sid',    0);
-ini_set('url_rewriter.tags',        '');
-
-/**
- * Drupal automatically generates a unique session cookie name for each site
- * based on on its full domain name. If you have multiple domains pointing at
- * the same Drupal site, you can either redirect them all to a single
- * domain (see comment in .htaccess), or uncomment the line below and specify
- * their shared base domain. Doing so assures that users remain logged in as they
- * cross between your various domains.
-*/
-
-#$cookie_domain = 'example.com';
-
-/**
- * Variable overrides:
- *
- * To override specific entries in the 'variable' table for this site,
- * set them here. You usually don't need to use this feature. This is
- * useful in a configuration file for a vhost or directory, rather than
- * the default settings.php. Any configuration setting from the 'variable'
- * table can be given a new value.
- *
- * Remove the leading hash signs to enable.
- */
-# $conf = array(
-#   'site_name' => 'My Drupal site',
-#   'theme_default' => 'minnelli',
-#   'anonymous' => 'Visitor',
-# );
-
-/**
- * String overrides:
- *
- * To override specific strings on your site with or without enabling locale
- * module, add an entry to this list. This functionality allows you to change
- * a small number of your site's default English language interface strings.
- *
- * Remove the leading hash signs to enable.
- */
-# $conf['locale_custom_strings_en'] = array(
-#   'forum'      => 'Discussion board',
-#   '@count min' => '@count minutes',
-# );
