includes/clientside/static/ajax.js
changeset 60 71b50f8c8f85
parent 57 b354deeaa4c4
child 76 608dee512bf0
--- a/includes/clientside/static/ajax.js	Tue Jul 10 03:38:19 2007 -0400
+++ b/includes/clientside/static/ajax.js	Tue Jul 10 11:59:02 2007 -0400
@@ -783,7 +783,27 @@
     return true;
   ajaxPromptAdminAuth(function(k) {
       window.location.reload();
-    }, 2);
+    }, USER_LEVEL_MEMBER);
+}
+
+function ajaxStartAdminLogin()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
+  if ( auth_level < USER_LEVEL_ADMIN )
+  {
+    ajaxPromptAdminAuth(function(k) {
+      ENANO_SID = k;
+      auth_level = USER_LEVEL_ADMIN;
+      var loc = makeUrlNS('Special', 'Administration');
+      if ( (ENANO_SID + ' ').length > 1 )
+        window.location = loc;
+    }, USER_LEVEL_ADMIN);
+    return false;
+  }
+  var loc = makeUrlNS('Special', 'Administration');
+  window.location = loc;
 }
 
 function ajaxAdminPage()