Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin.php
r152 r153 10 10 switch ($request[0]) { 11 11 case "login": 12 $admin->login();13 //why?14 // Reinitalise the admin variable now the user is logged in15 // (fixes the bug whereby the date is not displayed on recent posts when you first log in16 // because there is no date format string provided)17 $admin = new admin();12 //if login was suscessfull.. 13 if ($admin->login()) { 14 //Reinitalise the admin variable now the user is logged in, thus setting up the stuff thats dependent on having a username 15 $admin = new admin(); 16 } 17 //otherwise dont mess with it, so we dont lose the error 18 18 break; 19 19 case "logout": … … 21 21 break; 22 22 } 23 23 24 ?> 24 25 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> … … 28 29 <link rel="stylesheet" href="<? echo $admin->httpPath; ?>blog.css" type="text/css" /> 29 30 <?php 30 if ($admin->blog->editor) { 31 //No point loading all that java script gubbins if its not going to be used 32 if ($admin->blog->editor && ($request[0] == "newentry" || $request[0] == "update" || $request[0] == "postupdate" || $request[0] == "postentry")) { 31 33 ?> 32 34 <script language="javascript" type="text/javascript" src="<?php echo $admin->httpPath; ?>tinymce/jscripts/tiny_mce/tiny_mce.js"></script> … … 116 118 break; 117 119 case "adduser": 118 echo "<div class=\"login\"><h3><a href=\"{$admin->adminPath}\">"._("Not logged in")."</a></h3> </div>\n";120 echo "<div class=\"login\"><h3><a href=\"{$admin->adminPath}\">"._("Not logged in")."</a></h3>\n"; 119 121 $admin->addUser(); 120 122 break;
