includes/common.php
changeset 147 d8156d18ac58
parent 145 6f0bbf88c325
child 229 97ae8e9d5e29
--- a/includes/common.php	Mon Sep 24 23:59:42 2007 -0400
+++ b/includes/common.php	Thu Sep 27 15:55:37 2007 -0400
@@ -2,7 +2,7 @@
 
 /*
  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0.2 (Coblynau)
+ * Version 1.0 (Banshee)
  * Copyright (C) 2006-2007 Dan Fuhry
  *
  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
@@ -23,7 +23,7 @@
   exit;
 }
 
-$version = '1.0.2b1';
+$version = '1.0.1';
 
 function microtime_float()
 {
@@ -56,7 +56,12 @@
 
 if(defined('ENANO_DEBUG'))
 {
-  require_once(ENANO_ROOT.'/includes/debugger/debugConsole.php');
+//  require_once(ENANO_ROOT.'/includes/debugger/debugConsole.php');
+  function dc_here($m)     { return false; }
+  function dc_dump($a, $g) { return false; }
+  function dc_watch($n)    { return false; }
+  function dc_start_timer($u) { return false; }
+  function dc_stop_timer($m) { return false; }
 } else {
   function dc_here($m)     { return false; }
   function dc_dump($a, $g) { return false; }
@@ -149,44 +154,6 @@
   grinding_halt('Version mismatch', '<p>It seems that the Enano release we\'re trying to run ('.$version.') is different from the version specified in your database ('.enano_version().'). Perhaps you need to <a href="'.scriptPath.'/upgrade.php">upgrade</a>?</p>');
 }
 
-//
-// Low level maintenance
-//
-
-// If the search algorithm backend has been changed, empty out the search cache (the two cache formats are incompatible with each other)
-if ( getConfig('last_search_algo') != SEARCH_MODE )
-{
-  if ( !$db->sql_query('DELETE FROM '.table_prefix.'search_cache;') )
-    $db->_die();
-  setConfig('last_search_algo', SEARCH_MODE);
-}
-
-// If the AES key size has been changed, bail out and fast
-if ( !getConfig('aes_key_size') )
-{
-  setConfig('aes_key_size', AES_BITS);
-}
-else if ( $ks = getConfig('aes_key_size') )
-{
-  if ( intval($ks) != AES_BITS )
-  {
-    grinding_halt('AES key size changed', '<p>Enano has detected that the AES key size in constants.php has been changed. This change cannot be performed after installation, otherwise the private key would have to be re-generated and all passwords would have to be re-encrypted.</p><p>Please change the key size back to ' . $ks . ' bits and reload this page.</p>');
-  }
-}
-
-// Same for AES block size
-if ( !getConfig('aes_block_size') )
-{
-  setConfig('aes_block_size', AES_BLOCKSIZE);
-}
-else if ( $ks = getConfig('aes_block_size') )
-{
-  if ( intval($ks) != AES_BLOCKSIZE )
-  {
-    grinding_halt('AES block size changed', '<p>Enano has detected that the AES block size in constants.php has been changed. This change cannot be performed after installation, otherwise all passwords would have to be re-encrypted.</p><p>Please change the block size back to ' . $ks . ' bits and reload this page.</p>');
-  }
-}
-
 // Our list of tables included in Enano
 $system_table_list = Array(
     table_prefix.'categories',
@@ -209,10 +176,7 @@
     table_prefix.'groups',
     table_prefix.'group_members',
     table_prefix.'acl',
-    table_prefix.'search_cache',
-    table_prefix.'page_groups',
-    table_prefix.'page_group_members',
-    table_prefix.'tags'
+    table_prefix.'search_cache'
   );
 
 dc_here('common: initializing base classes');
@@ -268,7 +232,7 @@
       
       $text = RenderMan::render($n) . '
       <div class="info-box">
-        If you have an administrative account, you may <a href="'.makeUrlNS('Special', 'Login').'">log in</a> to the site.
+        If you have an administrative account, you may <a href="'.makeUrlNS('Special', 'Login').'">log in</a> to the site or <a href="'.makeUrlNS('Special', 'Administration').'">use the administration panel</a>.
       </div>';
       $paths->wiki_mode = 0;
       die_semicritical('Site disabled', $text);