diff -r dc8741857bde -r 4d87aad3c4c0 install.php
--- a/install.php Thu Jun 28 15:26:40 2007 -0400
+++ b/install.php Sun Jul 01 14:08:39 2007 -0400
@@ -1128,13 +1128,43 @@
fwrite($cf_handle, $config_file);
fclose($cf_handle);
+ echo 'done!
Starting the Enano API...';
+
+ $template_bak = $template;
+
+ // Get Enano loaded
+ $_GET['title'] = 'Main_Page';
+ require('includes/common.php');
+
+ // We need to be logged in (with admin rights) before logs can be flushed
+ $session->login_without_crypto($_POST['admin_user'], $dec, false);
+
+ // Now that login cookies are set, initialize the session manager and ACLs
+ $session->start();
+ $paths->init();
+
+ unset($template);
+ $template =& $template_bak;
+
echo 'done!
Initializing logs...';
- $q = mysql_query('INSERT INTO ' . $_POST['table_prefix'] . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . date('d M Y h:i a') . '\', \'' . mysql_real_escape_string($_POST['admin_user']) . '\', \'' . mysql_real_escape_string(ENANO_VERSION) . '\', \'' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '\');', $conn);
+ $q = $db->sql_query('INSERT INTO ' . $_POST['table_prefix'] . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . date('d M Y h:i a') . '\', \'' . mysql_real_escape_string($_POST['admin_user']) . '\', \'' . mysql_real_escape_string(ENANO_VERSION) . '\', \'' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '\');', $conn);
if ( !$q )
- err('Error setting up logs: '.mysql_error());
+ err('Error setting up logs: '.$db->get_error());
+
+ if ( !$session->get_permissions('clear_logs') )
+ {
+ echo '
Error: session manager won\'t permit flushing logs, these is a bug.';
+ break;
+ }
- echo 'done!
Review any warnings above, and then click here to finish the installation.'; + // unset($session); + // $session = new sessionManager(); + // $session->start(); + + PageUtils::flushlogs('Main_Page', 'Article'); + + echo 'done!
Review any warnings above, and then click here to finish the installation.'; // echo '';