diff -r d5376271f96b -r 07bf15b066bc index.php --- a/index.php Thu Mar 06 20:53:26 2008 -0500 +++ b/index.php Thu Mar 06 22:45:41 2008 -0500 @@ -267,9 +267,23 @@ case 'rollback': $id = (isset($_GET['id'])) ? $_GET['id'] : false; if(!$id || !preg_match('#^([0-9]+)$#', $id)) die_friendly('Invalid action ID', '
The URL parameter "id" is not an integer. Exiting to prevent nasties like SQL injection, etc.
'); - $rb = PageUtils::rollback( (int) $id ); + + $id = intval($id); + + $page = new PageProcessor($paths->page_id, $paths->namespace); + $result = $page->rollback_log_entry($id); + + if ( $result['success'] ) + { + $result = $lang->get("page_msg_rb_success_{$result['action']}", array('dateline' => $result['dateline'])); + } + else + { + $result = $lang->get("page_err_{$result['error']}", array('action' => @$result['action'])); + } + $template->header(); - echo ''.$rb.' Return to the page.
'; + echo ''.$result.' ' . $lang->get('etc_return_to_page') . '
'; $template->footer(); break; case 'catedit':