Merging Nighthawk (anti-spam work) and Scribus (AJAX work + debugging + CLI installer) branches
authorDan
Sun, 25 Jan 2009 21:21:07 -0500
changeset 827 2c20563245b2
parent 826 dcf5381ce8ba (current diff)
parent 824 28d9fbcd4f0d (diff)
child 828 c5bca53b857a
Merging Nighthawk (anti-spam work) and Scribus (AJAX work + debugging + CLI installer) branches
includes/clientside/static/comments.js
includes/pageprocess.php
--- a/.htaccess.new	Sun Jan 25 21:20:14 2009 -0500
+++ b/.htaccess.new	Sun Jan 25 21:21:07 2009 -0500
@@ -0,0 +1,1 @@
+
--- a/config.new.php	Sun Jan 25 21:20:14 2009 -0500
+++ b/config.new.php	Sun Jan 25 21:21:07 2009 -0500
@@ -0,0 +1,1 @@
+
--- a/includes/clientside/static/acl.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/acl.js	Sun Jan 25 21:21:07 2009 -0500
@@ -24,7 +24,7 @@
     };
   params = toJSONString(params);
   params = ajaxEscape(params);
-  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
+  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         var response = String(ajax.responseText + '');
@@ -61,7 +61,7 @@
     mode: 'seltarget_id'
   };
   params = ajaxEscape(toJSONString(params));
-  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
+  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         var response = String(ajax.responseText + '');
@@ -113,7 +113,7 @@
   }
   params = toJSONString(params);
   params = ajaxEscape(params);
-  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
+  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         document.getElementById(aclManagerID+'_main').innerHTML = '';
@@ -401,7 +401,7 @@
 {
   params = toJSONString(params);
   params = ajaxEscape(params);
-  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
+  ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         var response = String(ajax.responseText + '');
@@ -482,7 +482,7 @@
             };
           params = toJSONString(params);
           params = ajaxEscape(params);
-          ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
+          ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
               if ( ajax.readyState == 4 && ajax.status == 200 )
               {
                 document.getElementById(aclManagerID+'_main').innerHTML = '';
@@ -1499,7 +1499,7 @@
   var request = toJSONString({
       mode: 'list_presets'
     });
-  ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(request), function()
+  ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(request), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -1758,7 +1758,7 @@
   
   var whitey = whiteOutElement(document.getElementById(aclManagerID));
   
-  ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(packet), function()
+  ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(packet), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
--- a/includes/clientside/static/ajax.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/ajax.js	Sun Jan 25 21:21:07 2009 -0500
@@ -13,7 +13,7 @@
   enableUnload();
   setAjaxLoading();
   var redir = ( disable_redirect ) ? '&redirect=no' : '';
-  ajaxGet(append_sid(scriptPath + '/ajax.php?title=' + physical_title +'&_mode=getpage&noheaders' + redir), function() {
+  ajaxGet(append_sid(scriptPath + '/ajax.php?title=' + physical_title +'&_mode=getpage&noheaders' + redir), function(ajax) {
     // Allow for 404 here, it's generated by the "page not found" error message
     // (even with noheaders specified, probably should be fixed)
     if ( ajax.readyState == 4 && ( ajax.status == 200 || ajax.status == 404 ) ) {
@@ -50,7 +50,7 @@
   document.getElementById('protbtn_1').style.textDecoration = 'none';
   document.getElementById('protbtn_2').style.textDecoration = 'none';
   document.getElementById('protbtn_'+l).style.textDecoration = 'underline';
-  ajaxPost(stdAjaxPrefix+'&_mode=protect', 'reason='+ajaxEscape(r)+'&level='+l, function() {
+  ajaxPost(stdAjaxPrefix+'&_mode=protect', 'reason='+ajaxEscape(r)+'&level='+l, function(ajax) {
     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       unsetAjaxLoading();
       if(ajax.responseText == 'good')
@@ -177,7 +177,7 @@
   whiteout.style.width = ( $dynano(whiteout).Width() - 78 ) + 'px';
   whiteout.style.left = ( $dynano(whiteout).Left() + 44 ) + 'px';
   
-  ajaxPost(stdAjaxPrefix + '&_mode=rename', 'newtitle=' + ajaxEscape(newname), function()
+  ajaxPost(stdAjaxPrefix + '&_mode=rename', 'newtitle=' + ajaxEscape(newname), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -367,7 +367,7 @@
   
   // tenemos la confirmación y la razón - borre la página.
   setAjaxLoading();
-  ajaxPost(stdAjaxPrefix + '&_mode=deletepage', 'reason=' + ajaxEscape(trim(reason.value)), function()
+  ajaxPost(stdAjaxPrefix + '&_mode=deletepage', 'reason=' + ajaxEscape(trim(reason.value)), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -424,7 +424,7 @@
           {
             miniPromptDestroy(this);
             setAjaxLoading();
-            ajaxGet(stdAjaxPrefix+'&_mode=delvote', function() {
+            ajaxGet(stdAjaxPrefix+'&_mode=delvote', function(ajax) {
               if ( ajax.readyState == 4 && ajax.status == 200 ) {
                 unsetAjaxLoading();
                 alert(ajax.responseText);
@@ -464,7 +464,7 @@
           {
             miniPromptDestroy(this);
             setAjaxLoading();
-            ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function() {
+            ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function(ajax) {
               if ( ajax.readyState == 4 && ajax.status == 200 ) {
                 unsetAjaxLoading();
                 alert(ajax.responseText);
@@ -499,7 +499,7 @@
   if ( KILL_SWITCH )
     return true;
   setAjaxLoading();
-  ajaxGet(stdAjaxPrefix+'&_mode=catedit', function() {
+  ajaxGet(stdAjaxPrefix+'&_mode=catedit', function(ajax) {
     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       unsetAjaxLoading();
       edit_open = false;
@@ -526,7 +526,7 @@
   }
   setAjaxLoading();
   query = query.substring(1, query.length);
-  ajaxPost(stdAjaxPrefix+'&_mode=catsave', query, function() {
+  ajaxPost(stdAjaxPrefix+'&_mode=catsave', query, function(ajax) {
     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       unsetAjaxLoading();
       edit_open = false;
@@ -544,7 +544,7 @@
   if ( KILL_SWITCH )
     return true;
   setAjaxLoading();
-  ajaxGet(stdAjaxPrefix+'&_mode=histlist', function() {
+  ajaxGet(stdAjaxPrefix+'&_mode=histlist', function(ajax) {
     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       unsetAjaxLoading();
       edit_open = false;
@@ -562,7 +562,7 @@
     return true;
   if(!ttl) ttl=title;
   setAjaxLoading();
-  ajaxGet(append_sid(scriptPath+'/ajax.php?title='+ttl+'&_mode=getpage&oldid='+oldid), function() {
+  ajaxGet(append_sid(scriptPath+'/ajax.php?title='+ttl+'&_mode=getpage&oldid='+oldid), function(ajax) {
     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       unsetAjaxLoading();
       edit_open = false;
@@ -576,7 +576,7 @@
   if ( KILL_SWITCH )
     return true;
   setAjaxLoading();
-  ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function() {
+  ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function(ajax) {
     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       unsetAjaxLoading();
       
@@ -629,7 +629,7 @@
           {
             miniPromptDestroy(this);
             setAjaxLoading();
-            ajaxGet(stdAjaxPrefix+'&_mode=flushlogs', function() {
+            ajaxGet(stdAjaxPrefix+'&_mode=flushlogs', function(ajax) {
               if ( ajax.readyState == 4 && ajax.status == 200 ) {
                 unsetAjaxLoading();
                 alert(ajax.responseText);
@@ -721,7 +721,7 @@
   }
   if(!id1 || !id2) { alert('BUG: Couldn\'t get checked radiobutton state'); return; }
   setAjaxLoading();
-  ajaxGet(stdAjaxPrefix+'&_mode=pagediff&diff1='+id1+'&diff2='+id2, function()
+  ajaxGet(stdAjaxPrefix+'&_mode=pagediff&diff1='+id1+'&diff2='+id2, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -765,12 +765,11 @@
   {
     return null;
   }
-  ajaxGet(stdAjaxPrefix + '&_mode=getstyles&id=' + id, function() {
+  ajaxGet(stdAjaxPrefix + '&_mode=getstyles&id=' + id, function(ajax) {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         // IE doesn't like substr() on ajax.responseText
-        var response = String(ajax.responseText + ' ');
-        response = response.substr(0, response.length - 1);
+        var response = String(ajax.responseText + '');
         if ( response.substr(0,1) != '[' )
         {
           alert('Invalid or unexpected JSON response from server:\n' + response);
@@ -839,7 +838,7 @@
     return true;
   }
   
-  ajaxPost(stdAjaxPrefix + '&_mode=change_theme', 'theme_id=' + ajaxEscape(theme_id) + '&style_id=' + ajaxEscape(style_id), function()
+  ajaxPost(stdAjaxPrefix + '&_mode=change_theme', 'theme_id=' + ajaxEscape(theme_id) + '&style_id=' + ajaxEscape(style_id), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -885,7 +884,7 @@
   load_component('crypto');
   pass = hex_sha1(document.getElementById('mdgPassSetField').value);
   setAjaxLoading();
-  ajaxPost(stdAjaxPrefix+'&_mode=setpass', 'password='+pass, function()
+  ajaxPost(stdAjaxPrefix+'&_mode=setpass', 'password='+pass, function(ajax)
     {
       unsetAjaxLoading();
       if ( ajax.readyState == 4 && ajax.status == 200 )
@@ -910,7 +909,7 @@
   }
   $killdiv.object.innerHTML = '<img alt="Loading..." src="' + scriptPath + '/images/loading-big.gif" /><br />Making request...';
   var url = makeUrlNS('Admin', 'Home', 'src=ajax');
-  ajaxPost(url, 'act=kill_php', function() {
+  ajaxPost(url, 'act=kill_php', function(ajax) {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         if ( ajax.responseText == '1' )
@@ -941,7 +940,7 @@
   if ( KILL_SWITCH )
     return false;
   setAjaxLoading();
-  ajaxGet(stdAjaxPrefix + '&_mode=get_tags', function()
+  ajaxGet(stdAjaxPrefix + '&_mode=get_tags', function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -1039,7 +1038,7 @@
   addtag_nukeme = nukeme;
   tag = ajaxEscape(tag);
   setAjaxLoading();
-  ajaxPost(stdAjaxPrefix + '&_mode=addtag', 'tag=' + tag, function()
+  ajaxPost(stdAjaxPrefix + '&_mode=addtag', 'tag=' + tag, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -1111,7 +1110,7 @@
     if ( parentobj.nextSibling.nextSibling.firstChild.nodeValue == $lang.get('tags_btn_add_tag'))
       writeNoTags = true;
     
-  ajaxPost(stdAjaxPrefix + '&_mode=deltag', 'tag_id=' + String(tag_id), function()
+  ajaxPost(stdAjaxPrefix + '&_mode=deltag', 'tag_id=' + String(tag_id), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -1159,7 +1158,7 @@
 
 window.ajaxPingServer = function()
 {
-  ajaxGet(stdAjaxPrefix + '&_mode=ping', function()
+  ajaxGet(stdAjaxPrefix + '&_mode=ping', function(ajax)
     {
     });
 }
@@ -1221,7 +1220,7 @@
   img.src = cdnPath + '/images/loading.gif';
   img.alt = 'Loading...';
   target.appendChild(img);
-  ajaxGet(makeUrlNS('Admin', 'Home/updates.xml'), function()
+  ajaxGet(makeUrlNS('Admin', 'Home/updates.xml'), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -1441,7 +1440,7 @@
       mode: action,
       plugin: plugin_filename
     });
-  ajaxPost(makeUrlNS('Admin', 'PluginManager/action.json'), 'r=' + ajaxEscape(request), function()
+  ajaxPost(makeUrlNS('Admin', 'PluginManager/action.json'), 'r=' + ajaxEscape(request), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -1502,7 +1501,7 @@
   else var ipaddr = o.innerHTML;
   rDnsObj = o;
   rDnsBannerObj = bannerOn('Retrieving reverse DNS info...');
-  ajaxGet(stdAjaxPrefix+'&_mode=rdns&ip='+ipaddr, function() {
+  ajaxGet(stdAjaxPrefix+'&_mode=rdns&ip='+ipaddr, function(ajax) {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         off = fetch_offset(rDnsObj);
--- a/includes/clientside/static/comments.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/comments.js	Sun Jan 25 21:21:07 2009 -0500
@@ -19,7 +19,7 @@
   if(comment_template)
     parms.have_template = true;
   parms = ajaxEscape(toJSONString(parms));
-  ajaxPost(stdAjaxPrefix+'&_mode=comments', 'data=' + parms, function() {
+  ajaxPost(stdAjaxPrefix+'&_mode=comments', 'data=' + parms, function(ajax) {
     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       unsetAjaxLoading();
       selectButtonMajor('discussion');
--- a/includes/clientside/static/editor.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/editor.js	Sun Jan 25 21:21:07 2009 -0500
@@ -18,7 +18,7 @@
   setAjaxLoading();
   
   var rev_id_uri = ( revid ) ? '&revid=' + revid : '';
-  ajaxGet(stdAjaxPrefix + '&_mode=getsource' + rev_id_uri, function()
+  ajaxGet(stdAjaxPrefix + '&_mode=getsource' + rev_id_uri, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -581,7 +581,7 @@
   }
   
   json_packet = ajaxEscape(toJSONString(json_packet));
-  ajaxPost(stdAjaxPrefix + '&_mode=savepage_json', 'r=' + json_packet, function()
+  ajaxPost(stdAjaxPrefix + '&_mode=savepage_json', 'r=' + json_packet, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -669,7 +669,7 @@
             editor_save_lock = false;
             enableUnload();
             changeOpac(0, 'ajaxEditContainer');
-            ajaxGet(stdAjaxPrefix + '&_mode=getpage&noheaders', function()
+            ajaxGet(stdAjaxPrefix + '&_mode=getpage&noheaders', function(ajax)
               {
                 if ( ajax.readyState == 4 && ajax.status == 200 )
                 {
@@ -736,7 +736,7 @@
   {
     opacity('enano_editor_preview', 100, 0, 500);
   }
-  ajaxPost(stdAjaxPrefix + '&_mode=preview', 'text=' + ta_content, function()
+  ajaxPost(stdAjaxPrefix + '&_mode=preview', 'text=' + ta_content, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -761,7 +761,7 @@
 window.ajaxEditorRevertToLatestReal = function()
 {
   ajaxSetEditorLoading();
-  ajaxGet(stdAjaxPrefix + '&_mode=getsource', function()
+  ajaxGet(stdAjaxPrefix + '&_mode=getsource', function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -803,7 +803,7 @@
   {
     opacity('enano_editor_preview', 100, 0, 500);
   }
-  ajaxPost(stdAjaxPrefix + '&_mode=diff_cur', 'text=' + ta_content, function()
+  ajaxPost(stdAjaxPrefix + '&_mode=diff_cur', 'text=' + ta_content, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -982,7 +982,7 @@
   if ( !aed )
     return false;
   ajaxSetEditorLoading();
-  ajaxGet(stdAjaxPrefix + '&_mode=getsource&get_draft=1', function()
+  ajaxGet(stdAjaxPrefix + '&_mode=getsource&get_draft=1', function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
--- a/includes/clientside/static/enano-lib-basic.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/enano-lib-basic.js	Sun Jan 25 21:21:07 2009 -0500
@@ -472,6 +472,19 @@
 /*!END_INCLUDER*/
 
 addOnloadHook(function() {
+  if ( $_REQUEST['auth'] )
+  {
+    var key = $_REQUEST['auth'];
+    var loc = String(window.location);
+    loc = loc.replace(/#.+$/, '').replace(/&auth=[0-9a-f]+/, '').replace(/\?auth=[0-9a-f]+(&)?/, '$1');
+    if ( key != 'false' )
+    {
+      var sep = loc.indexOf('?') != -1 ? '&' : '?';
+      loc = loc + sep + 'auth=' + key;
+    }
+    console.debug(loc);
+    window.location = loc;
+  }
   if ( $_REQUEST['do'] )
   {
     var act = $_REQUEST['do'];
--- a/includes/clientside/static/functions.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/functions.js	Sun Jan 25 21:21:07 2009 -0500
@@ -105,16 +105,20 @@
     editor_open = false;
     enableUnload();
   }
-  ajax = ajaxMakeXHR();
+  var ajax = ajaxMakeXHR();
   if ( !ajax )
   {
     console.error('ajaxMakeXHR() failed');
     return false;
   }
-  ajax.onreadystatechange = f;
+  ajax.onreadystatechange = function()
+  {
+    f(ajax);
+  };
   ajax.open('GET', uri, true);
   ajax.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );
   ajax.send(null);
+  window.ajax = ajax;
 }
 
 function ajaxPost(uri, parms, f, call_editor_safe) {
@@ -133,13 +137,16 @@
     editor_open = false;
     enableUnload();
   }
-  ajax = ajaxMakeXHR();
+  var ajax = ajaxMakeXHR();
   if ( !ajax )
   {
     console.error('ajaxMakeXHR() failed');
     return false;
   }
-  ajax.onreadystatechange = f;
+  ajax.onreadystatechange = function()
+  {
+    f(ajax);
+  };
   ajax.open('POST', uri, true);
   ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
   // Setting Content-length in Safari triggers a warning
@@ -149,6 +156,7 @@
   }
   ajax.setRequestHeader("Connection", "close");
   ajax.send(parms);
+  window.ajax = ajax;
 }
 
 /**
--- a/includes/clientside/static/login.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/login.js	Sun Jan 25 21:21:07 2009 -0500
@@ -366,7 +366,7 @@
 {
   json = toJSONString(json);
   json = ajaxEscape(json);
-  ajaxPost(makeUrlNS('Special', 'Login/action.json'), 'r=' + json, function()
+  ajaxPost(makeUrlNS('Special', 'Login/action.json'), 'r=' + json, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -1298,6 +1298,7 @@
     {
       auth_level = level;
     }
+    window.location.hash = '#auth:' + key;
   }
   else
   {
@@ -1314,5 +1315,6 @@
         }
       }
     }
+    window.location.hash = '#auth:false';
   }
 }
--- a/includes/clientside/static/rank-manager.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/rank-manager.js	Sun Jan 25 21:21:07 2009 -0500
@@ -489,7 +489,7 @@
     rank_id: rank_id
   };
   json_packet = ajaxEscape(toJSONString(json_packet));
-  ajaxPost(makeUrlNS('Admin', 'UserRanks/action.json'), 'r=' + json_packet, function()
+  ajaxPost(makeUrlNS('Admin', 'UserRanks/action.json'), 'r=' + json_packet, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -561,7 +561,7 @@
   /// ... pack it in
   var json_packet = ajaxEscape(toJSONString(json_packet));
   
-  ajaxPost(makeUrlNS('Admin', 'UserRanks/action.json'), 'r=' + json_packet, function()
+  ajaxPost(makeUrlNS('Admin', 'UserRanks/action.json'), 'r=' + json_packet, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -718,7 +718,7 @@
   var rank_id = editor.rankdata.rank_id;
   
   json_packet = ajaxEscape(toJSONString(json_packet));
-  ajaxPost(makeUrlNS('Admin', 'UserRanks/action.json'), 'r=' + json_packet, function()
+  ajaxPost(makeUrlNS('Admin', 'UserRanks/action.json'), 'r=' + json_packet, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
--- a/includes/clientside/static/theme-manager.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/theme-manager.js	Sun Jan 25 21:21:07 2009 -0500
@@ -46,7 +46,7 @@
       theme_id: theme_id
     });
   // we've finished nukeing the existing interface, request editor data
-  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function()
+  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -121,7 +121,7 @@
           theme_id: theme_id
         });
       // we've finished nukeing the existing interface, request editor data
-      ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function()
+      ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function(ajax)
         {
           if ( ajax.readyState == 4 && ajax.status == 200 )
           {
@@ -484,7 +484,7 @@
       mode: 'uid_lookup',
       username: f_useradd.value
     });
-  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function()
+  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -604,7 +604,7 @@
   
   // Request the save
   var parent = document.getElementById('ajaxPageContainer');
-  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function()
+  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
@@ -638,7 +638,7 @@
   
   // Request the action
   var parent = document.getElementById('ajaxPageContainer');
-  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function()
+  ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function(ajax)
     {
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
--- a/includes/pageprocess.php	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/pageprocess.php	Sun Jan 25 21:21:07 2009 -0500
@@ -504,10 +504,11 @@
   /**
    * Creates the page if it doesn't already exist.
    * @param string Optional page title.
+   * @param bool Visibility (allow indexing) flag
    * @return bool True on success, false on failure.
    */
   
-  function create_page($title = false)
+  function create_page($title = false, $visible = true)
   {
     global $db, $session, $paths, $template, $plugins; // Common objects
     global $lang;
@@ -552,7 +553,7 @@
         'namespace' => $this->namespace,
         'name' => $name,
         'special' => 0,
-        'visible' => 1,
+        'visible' => $visible ? 1 : 0,
         'comments_on' => 1,
         'protected' => ( $this->namespace == 'System' ? 1 : 0 ),
         'delvotes' => 0,
@@ -569,8 +570,8 @@
     $blank_array = $db->escape(serialize(array()));
     
     // Query 1: Metadata entry
-    $q = $db->sql_query('INSERT INTO ' . table_prefix . "pages(name, urlname, namespace, protected, delvotes, delvote_ips, wiki_mode)\n"
-                        . "VALUES ( '$name', '$page_id', '$namespace', $protect, 0, '$blank_array', 2 );");
+    $q = $db->sql_query('INSERT INTO ' . table_prefix . "pages(name, urlname, namespace, visible, protected, delvotes, delvote_ips, wiki_mode)\n"
+                      . "  VALUES ( '$name', '$page_id', '$namespace', {$metadata['visible']}, $protect, 0, '$blank_array', 2 );");
     if ( !$q )
       $db->_die('PageProcessor page creation - metadata stage');
     
@@ -590,6 +591,9 @@
     // Update the cache
     $paths->update_metadata_cache();
     
+    // Make sure that when/if we save the page later in this instance it doesn't get re-created
+    $this->page_exists = true;
+    
     // Page created. We're good!
     return true;
   }
--- a/install/includes/cli-core.php	Sun Jan 25 21:20:14 2009 -0500
+++ b/install/includes/cli-core.php	Sun Jan 25 21:21:07 2009 -0500
@@ -314,7 +314,10 @@
 if ( !$result )
 {
   if ( !$silent )
+  {
     echo parse_shellcolor_string($lang->get('cli_test_fail')) . "\n";
+    echo "[$driver] " . $dbal->sql_error() . "\n";
+  }
   installer_fail($lang->get('cli_err_db_connect_fail'));
 }
 
--- a/install/includes/payload.php	Sun Jan 25 21:20:14 2009 -0500
+++ b/install/includes/payload.php	Sun Jan 25 21:21:07 2009 -0500
@@ -290,6 +290,9 @@
 # Enable mod_rewrite
 RewriteEngine on
 
+# Required under some aliased setups
+RewriteBase $scriptpath
+
 # Don't rewrite if the user requested a real directory or file
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
--- a/install/install-cli.php	Sun Jan 25 21:20:14 2009 -0500
+++ b/install/install-cli.php	Sun Jan 25 21:21:07 2009 -0500
@@ -17,5 +17,7 @@
  * Thanks to Stephan for helping out with l10n in the installer (his work is in includes/stages/*.php).
  */
 
-require(dirname(__FILE__) . '/includes/cli-core.php');
+echo "INSTALLER STARTED\n";
+$result = require(dirname(__FILE__) . '/includes/cli-core.php');
+exit( $result ? 0 : 1 );
 
--- a/themes/oxygen/css/mint.css	Sun Jan 25 21:20:14 2009 -0500
+++ b/themes/oxygen/css/mint.css	Sun Jan 25 21:21:07 2009 -0500
@@ -190,7 +190,11 @@
 td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #408060; }
 
 /* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */
-div.contentDiv h2 {
+div.contentDiv h1 {
+  margin-top: 0.3em;
+}
+
+div.contentDiv h1, div.contentDiv h2 {
   border-bottom: 1px solid #90D0B0;
   margin-bottom: 0;
 }
@@ -379,7 +383,7 @@
 }
 
 div.tblholder th a:hover {
-  color: #FF00FF !important;
+  color: #FFFF00 !important;
   text-decoration: underline !important;
 }
 
@@ -524,6 +528,12 @@
   padding: 3px;
 }
 
+input.ac_loading {
+  background-image: url(../../../images/loading.gif);
+  background-position: right center;
+  background-repeat: no-repeat;
+}
+
 label {
   padding: 3px;
   cursor: pointer;
@@ -538,13 +548,23 @@
 }
 
 input#pageheading {
-  font-size: 14pt;
+  font-family: trebuchet ms, verdana, arial, helvetica, sans-serif;
+  font-size: 18pt;
+  font-weight: bold;
+  border-width: 0 0 1px 0;
+  width: 100%;
   border-bottom: 1px solid #90D0B0;
-  margin-bottom: 0;
+  margin: 0;
+  padding: 0;
+}
+
+input#pageheading:focus {
+  background-color: #fafafa;
 }
 
 input[type ^="button"], input[type ^="submit"], button {
-  background-image: url(../images/buttonbg.gif);
+  background-image: url(../images/mint/sprite-horiz.gif);
+  background-position: 0% -60px;
   background-repeat: repeat-x;
   color: #202020;
 }
@@ -648,7 +668,8 @@
 div.toolbar {
   border: 1px solid #3b9c61;
   background-color: #D0D0D0;
-  background-image: url(../images/tb-bkg.gif);
+  background-image: url(../images/mint/sprite-horiz.gif);
+  background-position: 0 -90px;
   padding: 1px 0;
   height: 22px;
   font-family: arial, sans-serif;
@@ -683,13 +704,14 @@
 div.toolbar a:hover, div.toolbar a:focus {
   border: 1px solid #008000;
   background-color: #ceedce;
-  background-image: url(../images/tb-frg.gif);
+  background-image: url(../images/mint/sprite-horiz.gif);
+  background-position: 0 -118px;
   color: #000000;
   text-decoration: none;
 }
 div.toolbar a:active {
   background-color: #E0E0E0;
-  background-image: url(../images/tb-psh.gif);
+  background-position: 0 -138px;
 }
 div.toolbar img {
   margin: 0;
@@ -773,3 +795,29 @@
   padding-right: 5px;
 }
 
+/*
+ * Userpage styles
+ */
+
+ul.userpage_links li {
+  background-image: url('../images/buttonbg.gif');
+  background-repeat: repeat-x;
+}
+
+ul.userpage_links li a {
+  color: #202020;
+}
+
+ul.userpage_links li.userpage_tab_active {
+  background-image: url('../images/buttonbg-lite.gif');
+}
+
+ul.userpage_links li:hover {
+  background-image: url('../images/buttonbg-lite.gif');
+  border-color: #404040 #404040 #ffffff #404040;
+  border-bottom-width: 0;
+}
+
+ul.userpage_links li.userpage_tab_active:hover {
+  border-bottom-width: 1px;
+}
--- a/themes/oxygen/elements.tpl	Sun Jan 25 21:20:14 2009 -0500
+++ b/themes/oxygen/elements.tpl	Sun Jan 25 21:21:07 2009 -0500
@@ -55,9 +55,9 @@
           <div class="rectbot">
             <table border="0" width="100%" cellspacing="0" cellpadding="0" style="font-size: 1px;">
               <tr>
-                <td style="margin: 0; padding: 0; height: 12px;"> <img alt=" " src="{CDNPATH}/images/spacer.gif" style="background-image: url({CDNPATH}/themes/oxygen/images/{STYLE_ID}/sprite-horiz.gif); background-position: -24px 0; background-repeat: no-repeat;" width="12" height="12" /> </td>
-                <td style="margin: 0; padding: 0; height: 12px;" class="rectbottop"></td>
-                <td style="margin: 0; padding: 0; height: 12px;"> <img alt=" " src="{CDNPATH}/images/spacer.gif" style="background-image: url({CDNPATH}/themes/oxygen/images/{STYLE_ID}/sprite-horiz.gif); background-position: -36px 0; background-repeat: no-repeat;" width="12" height="12" /> </td>
+                <td style="margin: 0; padding: 0;"><img                    alt=" " src="{CDNPATH}/images/spacer.gif" style="background-image: url({CDNPATH}/themes/oxygen/images/{STYLE_ID}/sprite-horiz.gif); background-position: -24px 0; background-repeat: no-repeat;" width="12" height="12" /></td>
+                <td style="margin: 0; padding: 0;" class="rectbottop"><img alt=" " src="{CDNPATH}/images/spacer.gif" width="12" height="12" /></td>
+                <td style="margin: 0; padding: 0;"><img                    alt=" " src="{CDNPATH}/images/spacer.gif" style="background-image: url({CDNPATH}/themes/oxygen/images/{STYLE_ID}/sprite-horiz.gif); background-position: -36px 0; background-repeat: no-repeat;" width="12" height="12" /></td>
               </tr>
             </table>
           </div>