diff -r dc08c70ca550 -r e2cb5f1432c8 index.php --- a/index.php Sun Dec 02 15:27:21 2007 -0500 +++ b/index.php Sun Dec 02 16:00:10 2007 -0500 @@ -54,7 +54,7 @@ switch($_GET['do']) { default: - die_friendly('Invalid action', '
The action "'.$_GET['do'].'" is not defined. Return to viewing this page\'s text.
'); + die_friendly('Invalid action', 'The action "'.htmlspecialchars($_GET['do']).'" is not defined. Return to viewing this page\'s text.
'); break; case 'view': // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false )); @@ -118,10 +118,18 @@ $template->footer(); break; case 'edit': - if(isset($_POST['_cancel'])) { header('Location: '.makeUrl($paths->page)); echo ''.nl2br($r).' ' . $lang->get('etc_return_to_page') . '.
'); + die_friendly($lang->get('page_rename_success_title'), ''.nl2br($r).' ' . $lang->get('etc_return_to_page') . '.
'); } $template->header(); ?> @@ -434,6 +442,17 @@ $data = ( isset($_POST['data']) ) ? $_POST['data'] : Array('mode' => 'listgroups'); PageUtils::aclmanager($data); break; + case 'sql_report': + $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 ); + $page = new PageProcessor( $paths->cpage['urlname_nons'], $paths->namespace, $rev_id ); + $page->send_headers = true; + $pagepass = ( isset($_REQUEST['pagepass']) ) ? sha1($_REQUEST['pagepass']) : ''; + $page->password = $pagepass; + $page->send(true); + ob_end_clean(); + ob_start(); + $db->sql_report(); + break; } // @@ -443,7 +462,7 @@ { // Load up the HTML $html = ob_get_contents(); - ob_end_clean(); + @ob_end_clean(); $html = aggressive_optimize_html($html);