Installer: payload: fixed two minor PHP errors with .htaccess.new and wrong form field name
authorDan
Fri, 15 May 2009 15:04:40 -0400
changeset 984 18f5a15b810c
parent 983 36e42d787d1d
child 985 4ecf46e5eeab
Installer: payload: fixed two minor PHP errors with .htaccess.new and wrong form field name
install/includes/payload.php
--- a/install/includes/payload.php	Fri May 15 14:40:12 2009 -0400
+++ b/install/includes/payload.php	Fri May 15 15:04:40 2009 -0400
@@ -425,7 +425,7 @@
   global $db, $session, $paths, $template, $plugins; // Common objects
   global $installer_version;
   
-  $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . enano_date('d M Y h:i a') . '\', \'' . $db->escape($_POST['admin_user']) . '\', \'' . $db->escape(enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');');
+  $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . enano_date('d M Y h:i a') . '\', \'' . $db->escape($_POST['username']) . '\', \'' . $db->escape(enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');');
   if ( !$q )
   {
     echo '<p><tt>MySQL return: ' . $db->sql_error() . '</tt></p>';
@@ -477,7 +477,7 @@
     return false;
   }
   
-  if ( filesize(ENANO_ROOT . '/.htaccess.new') > 1 )
+  if ( @filesize(ENANO_ROOT . '/.htaccess.new') > 1 )
   {
     // rename/possibly concatenate .htaccess.new
     $htaccess_base = '';