install.php
changeset 220 2d4bb97fa75a
parent 218 e0ec986c0af3
child 222 acfdccf7a2bf
--- a/install.php	Wed Nov 21 15:11:51 2007 -0500
+++ b/install.php	Wed Nov 21 15:13:06 2007 -0500
@@ -310,7 +310,7 @@
   if ( !$conn )
     return false;
   // Our list of tables included in Enano
-  $tables = Array( 'categories', 'comments', 'config', 'logs', 'page_text', 'session_keys', 'pages', 'users', 'users_extra', 'themes', 'buddies', 'banlist', 'files', 'privmsgs', 'sidebar', 'hits', 'search_index', 'groups', 'group_members', 'acl', 'search_cache', 'tags', 'page_groups', 'page_group_members' );
+  $tables = Array( 'categories', 'comments', 'config', 'logs', 'page_text', 'session_keys', 'pages', 'users', 'users_extra', 'themes', 'buddies', 'banlist', 'files', 'privmsgs', 'sidebar', 'hits', 'search_index', 'groups', 'group_members', 'acl', 'tags', 'page_groups', 'page_group_members' );
   
   // Drop each table individually; if it fails, it probably means we're trying to drop a
   // table that didn't exist in the Enano version we're deleting the database for.
@@ -563,6 +563,14 @@
   return true;
 }
 
+function stg_build_index()
+{
+  global $db, $session, $paths, $template, $plugins; // Common objects;
+  if ( $paths->rebuild_search_index() )
+    return true;
+  return false;
+}
+
 function stg_rename_config()
 {
   if ( !@rename('./config.new.php', './config.php') )
@@ -1602,6 +1610,8 @@
                              properly set cookies due to limitations with PHP. These limitations are exposed primarily when this issue is encountered during installation. If you choose
                              to finish the installation, please be aware that you may be unable to log into your site.');
         
+        run_installer_stage('buildindex', 'Initialize search index', 'stg_build_index', 'Something went wrong while the page manager was attempting to build a search index.');
+        
         /*
          * HACKERS:
          * If you're making a custom distribution of Enano, put all your custom plugin-related code here.