diff -r d807dcd7aed7 -r a8891e108c95 plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Sun Aug 26 16:48:15 2007 -0400 +++ b/plugins/SpecialAdmin.php Sun Aug 26 20:45:33 2007 -0400 @@ -128,10 +128,19 @@ $q = $db->sql_query($l); while($r = $db->fetchrow()) { + if ( $r['action'] == 'illegal_page' ) + { + list($illegal_id, $illegal_ns) = unserialize($r['page_text']); + $url = makeUrlNS($illegal_ns, $illegal_id, false, true); + $title = get_page_title_ns($illegal_id, $illegal_ns); + $class = ( isPage($paths->nslist[$illegal_ns] . $illegal_id) ) ? '' : ' class="wikilink-nonexistent"'; + $illegal_link = '' . $title . ''; + } if($cls == 'row2') $cls = 'row1'; else $cls = 'row2'; echo ''; - switch($r['action']) { + switch($r['action']) + { case "admin_auth_good": echo 'Successful elevated authentication'; if ( !empty($r['page_text']) ) { $level = $session->userlevel_to_string( intval($r['page_text']) ); echo "
Authentication level: $level"; } break; case "admin_auth_bad": echo 'Failed elevated authentication'; if ( !empty($r['page_text']) ) { $level = $session->userlevel_to_string( intval($r['page_text']) ); echo "
Attempted auth level: $level"; } break; case "activ_good": echo 'Successful account activation'; break; @@ -142,6 +151,7 @@ case "db_backup": echo 'Database backup created
Tables: ' . $r['page_text'] . ''; break; case "install_enano": echo "Installed Enano version {$r['page_text']}"; break; case "upgrade_enano": echo "Upgraded Enano to version {$r['page_text']}"; break; + case "illegal_page": echo "Unauthorized viewing attempt
Page: {$illegal_link}"; break; } echo ''.date('d M Y h:i a', $r['time_id']).''.$r['author'].''.$r['edit_summary'].''; } @@ -790,6 +800,12 @@ return; } + if ( isset($_GET['src']) && $_GET['src'] == 'get' && !empty($_GET['user']) ) + { + $_POST['go'] = true; + $_POST['username'] = $_GET['user']; + } + if(isset($_POST['go'])) { // We need the user ID before we can do anything @@ -2312,7 +2328,7 @@ @set_time_limit(300); // five minutes // Do the actual export $aesext = ( defined('SQL_BACKUP_CRYPT') ) ? '.tea' : ''; - $filename = 'enano_backup_' . date('dmy') . '.sql' . $aesext; + $filename = 'enano_backup_' . date('ymd') . '.sql' . $aesext; ob_start(); header('Content-disposition: attachment, filename="'.$filename.'";'); header('Content-type: application/transact-sql'); @@ -2342,6 +2358,7 @@ } foreach($tables as $t) { + // THE FOLLOWING COMMENT DOES NOT APPLY AS OF 1.0. // Sorry folks - this script CAN'T backup enano_files, enano_search_index, and enano_search_cache due to the sheer size of the tables. // If encryption is enabled the log data will be excluded too. echo export_table(