Merging branches from Scribus and Nighthawk
authorDan
Sun, 30 Sep 2007 19:22:04 -0400
changeset 152 9b4279c25d33
parent 151 824821224153 (diff)
parent 150 134ed87c8950 (current diff)
child 180 c63c5ee6c6d6
child 196 54b3e14bf19d
Merging branches from Scribus and Nighthawk
.hgtags
install.php
schema.sql
upgrade.php
upgrade.sql
--- a/.hgtags	Sun Sep 30 19:16:36 2007 -0400
+++ b/.hgtags	Sun Sep 30 19:22:04 2007 -0400
@@ -3,5 +3,3 @@
 8df3abef66473fef1a8ecbbd60a4e94e4f466ec4 release
 ca9118d9c0f2be22407860f41523f47b2862b34a rebrand
 6f0bbf88c3251ca597cb76ac8b59a1ee61d6dd3d rebrand
-0b5244001799fa29e83bf06c5f14eb69350f171c rebrand
-42c6c83b8a004163c9cc2d85f3c8eada3b73adf6 rebrand
--- a/includes/clientside/static/acl.js	Sun Sep 30 19:16:36 2007 -0400
+++ b/includes/clientside/static/acl.js	Sun Sep 30 19:22:04 2007 -0400
@@ -4,6 +4,9 @@
 var aclPermList = false;
 var aclDataCache = false;
 
+// Can be set to true by slow themes (St. Patty)
+var aclDisableTransitionFX = false;
+
 function ajaxOpenACLManager(page_id, namespace)
 {
   if(IE)
@@ -494,7 +497,7 @@
 
 function __aclBuildWizardWindow()
 {
-  darken();
+  darken(aclDisableTransitionFX);
   box = document.createElement('div');
   box.style.width = '640px'
   box.style.height = '440px';
@@ -570,7 +573,16 @@
   
   body = document.getElementsByTagName('body')[0];
   body.appendChild(box);
-  setTimeout("document.getElementById('"+aclManagerID+"').style.display = 'block'; opacity('"+aclManagerID+"', 0, 100, 500); opacity('"+aclManagerID + '_panel'+"', 0, 100, 500);", 1000);
+  if ( aclDisableTransitionFX )
+  {
+    document.getElementById(aclManagerID).style.display = 'block';
+    changeOpac(100, aclManagerID);
+    changeOpac(100, aclManagerID + '_panel');
+  }
+  else
+  {
+    setTimeout("document.getElementById('"+aclManagerID+"').style.display = 'block'; opacity('"+aclManagerID+"', 0, 100, 500); opacity('"+aclManagerID + '_panel'+"', 0, 100, 500);", 1000);
+  }
 }
 
 function killACLManager()
@@ -578,8 +590,16 @@
   el = document.getElementById(aclManagerID);
   if(el)
   {
-    opacity(aclManagerID, 100, 0, 500);
-    setTimeout('var el = document.getElementById(aclManagerID); el.parentNode.removeChild(el); enlighten();', 750);
+    if ( aclDisableTransitionFX )
+    {
+      enlighten(true);
+      el.parentNode.removeChild(el);
+    }
+    else
+    {
+      opacity(aclManagerID, 100, 0, 500);
+      setTimeout('var el = document.getElementById(aclManagerID); el.parentNode.removeChild(el); enlighten();', 750);
+    }
   }
 }
 
--- a/includes/clientside/static/faders.js	Sun Sep 30 19:16:36 2007 -0400
+++ b/includes/clientside/static/faders.js	Sun Sep 30 19:22:04 2007 -0400
@@ -93,18 +93,29 @@
   var y = getScrollOffset();
   if(document.getElementById('messageBox')) return;
   darken(true);
+  if ( aclDisableTransitionFX )
+  {
+    document.getElementById('specialLayer_darkener').style.zIndex = '5';
+  }
   var master_div = document.createElement('div');
+  master_div.style.zIndex = '6';
   var mydiv = document.createElement('div');
   mydiv.style.width = '400px';
   mydiv.style.height = '200px';
   w = getWidth();
   h = getHeight();
-  //master_div.style.left = (w / 2) - 200+'px';
-  //master_div.style.top = (h / 2) + y - 120+'px';
-  master_div.style.top = '-10000px';
-  master_div.style.position = ( IE ) ? 'absolute' : 'fixed';
-  z = getHighestZ(); // document.getElementById('specialLayer_darkener').style.zIndex;
-  mydiv.style.zIndex = parseInt(z) + 1;
+  if ( aclDisableTransitionFX )
+  {
+    master_div.style.left = ((w / 2) - 200)+'px';
+    master_div.style.top = ((h / 2) + y - 120)+'px';
+    master_div.style.position = 'absolute';
+  }
+  else
+  {
+    master_div.style.top = '-10000px';
+    master_div.style.position = ( IE ) ? 'absolute' : 'fixed';
+  }
+  z = ( aclDisableTransitionFX ) ? document.getElementById('specialLayer_darkener').style.zIndex : getHighestZ();
   mydiv.style.backgroundColor = '#FFFFFF';
   mydiv.style.padding = '10px';
   mydiv.style.marginBottom = '1px';
@@ -115,11 +126,13 @@
   buttondiv.style.width = '400px';
   w = getWidth();
   h = getHeight();
-  // buttondiv.style.left = (w / 2) - 200+'px';
-  // buttondiv.style.top = (h / 2) + y + 101+'px';
-  // buttondiv.style.position = ( IE ) ? 'absolute' : 'fixed';
-  z = getHighestZ(); // document.getElementById('specialLayer_darkener').style.zIndex;
-  buttondiv.style.zIndex = parseInt(z) + 1;
+  if ( aclDisableTransitionFX )
+  {
+    //buttondiv.style.left = ((w / 2) - 200)+'px';
+    //buttondiv.style.top = ((h / 2) + y + 101)+'px';
+  }
+  //buttondiv.style.position = ( IE ) ? 'absolute' : 'fixed';
+  z = ( aclDisableTransitionFX ) ? document.getElementById('specialLayer_darkener').style.zIndex : getHighestZ();
   buttondiv.style.backgroundColor = '#C0C0C0';
   buttondiv.style.padding = '10px';
   buttondiv.style.textAlign = 'right';
@@ -265,7 +278,8 @@
   
   body.appendChild(master_div);
   
-  setTimeout('mb_runFlyIn();', 100);
+  if ( !aclDisableTransitionFX )
+    setTimeout('mb_runFlyIn();', 100);
   
   this.onclick = new Array();
   this.onbeforeclick = new Array();
@@ -293,9 +307,19 @@
   
   var mydiv = document.getElementById('messageBox');
   var maindiv = mydiv.parentNode;
-  var to = fly_out_top(maindiv, true, false);
   
-  setTimeout("var mbdiv = document.getElementById('messageBox'); mbdiv.parentNode.removeChild(mbdiv.nextSibling); mbdiv.parentNode.removeChild(mbdiv); enlighten(true);", to);
+  if ( aclDisableTransitionFX )
+  {
+    var mbdiv = document.getElementById('messageBox');
+    mbdiv.parentNode.removeChild(mbdiv.nextSibling);
+    mbdiv.parentNode.removeChild(mbdiv);
+    enlighten(true);
+  }
+  else
+  {
+    var to = fly_out_top(maindiv, true, false);
+    setTimeout("var mbdiv = document.getElementById('messageBox'); mbdiv.parentNode.removeChild(mbdiv.nextSibling); mbdiv.parentNode.removeChild(mbdiv); enlighten(true);", to);
+  }
   if(typeof mb.onclick[val] == 'function')
   {
     o = mb.onclick[val];
--- a/includes/common.php	Sun Sep 30 19:16:36 2007 -0400
+++ b/includes/common.php	Sun Sep 30 19:22:04 2007 -0400
@@ -23,7 +23,7 @@
   exit;
 }
 
-$version = '1.0.2';
+$version = '1.0.2b1';
 
 function microtime_float()
 {
--- a/includes/paths.php	Sun Sep 30 19:16:36 2007 -0400
+++ b/includes/paths.php	Sun Sep 30 19:22:04 2007 -0400
@@ -857,7 +857,7 @@
     
     $page_id = $db->escape(sanitize_page_id($page_id));
     if ( !isset($this->nslist[$namespace]) )
-      die('$paths->get_page_groups(): HACKING ATTEMPT');
+      die('$paths->get_page_groups(): HACKING ATTEMPT: namespace "'. htmlspecialchars($namespace) .'" doesn\'t exist');
     
     $group_list = array();
     
--- a/install.php	Sun Sep 30 19:16:36 2007 -0400
+++ b/install.php	Sun Sep 30 19:22:04 2007 -0400
@@ -15,7 +15,7 @@
  
 @include('config.php');
 if( ( defined('ENANO_INSTALLED') || defined('MIDGET_INSTALLED') ) && ((isset($_GET['mode']) && ($_GET['mode']!='finish' && $_GET['mode']!='css')) || !isset($_GET['mode']))) {
-  $_GET['title'] = 'Enano:Installation_locked';
+  $_GET['title'] = 'Enano:WhoCaresWhatThisIs';
   require('includes/common.php');
   die_friendly('Installation locked', '<p>The Enano installer has found a Enano installation in this directory. You MUST delete config.php if you want to re-install Enano.</p><p>If you wish to upgrade an older Enano installation to this version, please use the <a href="upgrade.php">upgrade script</a>.</p>');
   exit;
@@ -25,6 +25,7 @@
 
 define('ENANO_VERSION', '1.0.2');
 // In beta versions, define ENANO_BETA_VERSION here
+define('ENANO_BETA_VERSION', '1');
 
 if(!defined('scriptPath')) {
   $sp = dirname($_SERVER['REQUEST_URI']);
@@ -260,7 +261,7 @@
 }
 
 $template = new template_nodb();
-$template->load_theme('oxygen', 'bleu', false);
+$template->load_theme('stpatty', 'shamrock', false);
 
 $modestrings = Array(
               'welcome' => 'Welcome',
@@ -313,9 +314,9 @@
   case 'welcome':
     ?>
     <div style="text-align: center; margin-top: 10px;">
-      <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-blue.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
+      <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-green.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
       <h2>Welcome to Enano</h2>
-      <h3>version 1.0.2 &ndash; stable<br />
+      <h3>version 1.0.2 &ndash; beta 1<br />
       <span style="font-weight: normal;">also affectionately known as "coblynau" <tt>:)</tt></span></h3>
       <?php
       if ( file_exists('./_nightly.php') )
@@ -1065,8 +1066,7 @@
       $schema = str_replace('{{TABLE_PREFIX}}', $_POST['table_prefix'],                          $schema);
       $schema = str_replace('{{VERSION}}',      ENANO_VERSION,                                   $schema);
       $schema = str_replace('{{ADMIN_EMBED_PHP}}', $_POST['admin_embed_php'],                    $schema);
-      // Not anymore!! :-D
-      // $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION,                              $schema);
+      $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION,                              $schema);
       
       if(isset($_POST['wiki_mode']))
       {
--- a/schema.sql	Sun Sep 30 19:16:36 2007 -0400
+++ b/schema.sql	Sun Sep 30 19:22:04 2007 -0400
@@ -1,5 +1,5 @@
 -- 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
@@ -278,7 +278,7 @@
   ('copyright_notice', '{{COPYRIGHT}}'),
   ('wiki_edit_notice_text', '== Why can I edit this page? ==\n\nEveryone can edit almost any page in this website. This concept is called a wiki. It gives everyone the opportunity to make a change for the best. While some spam and vandalism may occur, it is believed that most contributions will be legitimate and helpful.\n\nFor security purposes, a history of all page edits is kept, and administrators are able to restore vandalized or spammed pages with just a few clicks.'),
   ('cache_thumbs', '{{ENABLE_CACHE}}'),
-  ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ),
+  ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),('enano_beta_version', '{{BETA_VERSION}}'),( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ),
   ('contact_email', '{{ADMIN_EMAIL}}'),
   ('powered_btn', '1');
 
--- a/themes/stpatty/header.tpl	Sun Sep 30 19:16:36 2007 -0400
+++ b/themes/stpatty/header.tpl	Sun Sep 30 19:22:04 2007 -0400
@@ -13,6 +13,11 @@
     <![endif]-->
     <script type="text/javascript">
     // <![CDATA[
+    
+      // Disable transition effects for the ACL editor
+      // (they're real slow in this theme, at least in fx/opera/IE)
+      var aclDisableTransitionFX = true;
+    
       function ajaxRenameInline()
       {
         // This trick is _so_ vBulletin...
--- a/upgrade.php	Sun Sep 30 19:16:36 2007 -0400
+++ b/upgrade.php	Sun Sep 30 19:22:04 2007 -0400
@@ -61,7 +61,7 @@
 // Everything related to versions goes here!
 
 // Valid versions to upgrade from
-$valid_versions = Array('1.0b1', '1.0b2', '1.0b3', '1.0b4', '1.0RC1', '1.0RC2', '1.0RC3', '1.0', '1.0.1', '1.0.1.1', '1.0.2b1');
+$valid_versions = Array('1.0b1', '1.0b2', '1.0b3', '1.0b4', '1.0RC1', '1.0RC2', '1.0RC3', '1.0', '1.0.1', '1.0.1.1');
 
 // Basically a list of dependencies, which should be resolved automatically
 // If, for example, upgrading from 1.0b1 to 1.0RC1 requires one extra query that would not
@@ -75,10 +75,9 @@
     '1.0RC2' => Array('1.0RC3'),
     '1.0RC3' => Array('1.0'),
     '1.0' => Array('1.0.1'),
-    '1.0.1' => Array('1.0.1.1'),
-    '1.0.1.1' => Array('1.0.2b1')
+    '1.0.1' => Array('1.0.1.1')
   );
-$this_version   = '1.0.2';
+$this_version   = '1.0.2b1';
 $func_list = Array(
     '1.0' => Array('u_1_0_1_update_del_votes'),
     '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text'), // ,
@@ -158,7 +157,7 @@
 $session->start();
 
 $template = new template_nodb();
-$template->load_theme('oxygen', 'bleu', false);
+$template->load_theme('stpatty', 'shamrock', false);
 
 $modestrings = Array(
               'login'      => 'Administrative login',
@@ -526,7 +525,7 @@
     ?>
     
     <div style="text-align: center; margin-top: 10px;">
-      <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-blue.png" style="display: block; margin: 0 auto; padding-left: 134px;" />
+      <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-green.png" style="display: block; margin: 0 auto; padding-left: 134px;" />
       <h2>Welcome to the Enano upgrade wizard</h2>
       <?php
       if ( file_exists('./_nightly.php') )
@@ -620,10 +619,10 @@
       $schema = file_get_contents('upgrade.sql');
       
       // Strip out and process version blocks
-      preg_match_all('#---BEGIN ([0-9A-z\.\-]*?)---'."\n".'((.*?)'."\n)?".'---END \\1---#is', $schema, $matches);
+      preg_match_all('#---BEGIN ([0-9A-z\.\-]*?)---'."\n".'(.*?)'."\n".'---END \\1---#is', $schema, $matches);
       
       $from_list  =& $matches[1];
-      $query_list =& $matches[3];
+      $query_list =& $matches[2];
       
       foreach($matches[0] as $m)
       {
--- a/upgrade.sql	Sun Sep 30 19:16:36 2007 -0400
+++ b/upgrade.sql	Sun Sep 30 19:22:04 2007 -0400
@@ -3,12 +3,12 @@
 -- ALL NON-SQL LINES, even otherwise blank lines, must start with "--" or they will get sent to MySQL!
 -- Common tasks (version numbers)
 DELETE FROM {{TABLE_PREFIX}}config WHERE config_name='enano_version' OR config_name='enano_beta_version' OR config_name='enano_alpha_version' OR config_name='enano_rc_version';
-INSERT INTO {{TABLE_PREFIX}}config (config_name, config_value) VALUES( 'enano_version', '1.0.2' );
----BEGIN 1.0.2b1---
----END 1.0.2b1---
+INSERT INTO {{TABLE_PREFIX}}config (config_name, config_value) VALUES( 'enano_version', '1.0.2' ),( 'enano_beta_version', '1' );
 ---BEGIN 1.0.1.1---
+-- No changes in this release
 ---END 1.0.1.1---
 ---BEGIN 1.0.1---
+-- No changes in this release
 ---END 1.0.1---
 ---BEGIN 1.0---
 -- Fix for obnoxious $_GET issue