* Localized page numbers in drop-down for DjVu page selection
* Fixed linktrail for vi
* (bug 6893) "Call to a member function exists() on a non-object" on trackback.php with bad input
+* (bug 6886) PHP undefined offset on bad input to Special:Revisiondelete
+* (bug 6887) PHP error for call to getId() on bad input to Special:Revisiondelete
+* (bug 6888) PHP error for call to getTimestamp() on bad input to Special:Revisiondelete
== Languages updated ==
global $wgOut, $wgRequest, $wgUser;
$target = $wgRequest->getVal( 'target' );
- $oldid = $wgRequest->getInt( 'oldid' );
+ $oldid = $wgRequest->getIntArray( 'oldid' );
$sk = $wgUser->getSkin();
$page = Title::newFromUrl( $target );
return;
}
+ if( is_null( $oldid ) ) {
+ $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
+ return;
+ }
+
$form = new RevisionDeleteForm( $wgRequest );
if( $wgRequest->wasPosted() ) {
$form->submit( $wgRequest );
function show( $request ) {
global $wgOut, $wgUser;
- $first = $this->revisions[0];
-
$wgOut->addWikiText( wfMsg( 'revdelete-selected', $this->page->getPrefixedText() ) );
$wgOut->addHtml( "<ul>" );
foreach( $this->revisions as $revid ) {
$rev = Revision::newFromTitle( $this->page, $revid );
+ if( !isset( $rev ) ) {
+ $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
+ return;
+ }
$wgOut->addHtml( $this->historyLine( $rev ) );
$bitfields[] = $rev->mDeleted; // FIXME
}
// To work!
foreach( $items as $revid ) {
$rev = Revision::newFromId( $revid );
+ if( !isset( $rev ) ) {
+ return false;
+ }
$this->updateRevision( $rev, $bitfield );
$this->updateRecentChanges( $rev, $bitfield );
# Revision deletion
#
'revisiondelete' => 'Delete/undelete revisions',
+'revdelete-nooldid-title' => 'No target revision',
+'revdelete-nooldid-text' => 'You have not specified target revision or revisions
+to perform this function on.',
'revdelete-selected' => 'Selected revision of [[:$1]]:',
'revdelete-text' => "Deleted revisions will still appear in the page history,
but their text contents will be inaccessible to the public.
# Revision deletion
"revisiondelete" => "מחיקת ושחזור גרסאות",
+"revdelete-nooldid-title" => "אין גרסת מטרה",
+"revdelete-nooldid-text" => "לא ציינתם גרסת או גרסאות מטרה עליהן תבוצע פעולה זו.",
"revdelete-selected" => "הגרסאות שנבחרו של [[:$1]]:",
"revdelete-text" => "גרסאות מחוקות עדיין יופיעו בהיסטוריית הדף, אך התוכן שלהן לא יהיה זמין לציבור.