Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -1275,6 +1275,15 @@ |
1276 | 1276 | # Update article, but only if changed. |
1277 | 1277 | $status->value['new'] = false; |
1278 | 1278 | |
| 1279 | + if ( !$oldid ) { |
| 1280 | + # Article gone missing |
| 1281 | + wfDebug( __METHOD__ . ": EDIT_UPDATE specified but article doesn't exist\n" ); |
| 1282 | + $status->fatal( 'edit-gone-missing' ); |
| 1283 | + |
| 1284 | + wfProfileOut( __METHOD__ ); |
| 1285 | + return $status; |
| 1286 | + } |
| 1287 | + |
1279 | 1288 | # Make sure the revision is either completely inserted or not inserted at all |
1280 | 1289 | if ( !$wgDBtransactions ) { |
1281 | 1290 | $userAbort = ignore_user_abort( true ); |
— | — | @@ -1294,15 +1303,6 @@ |
1295 | 1304 | $changed = ( strcmp( $text, $oldtext ) != 0 ); |
1296 | 1305 | |
1297 | 1306 | if ( $changed ) { |
1298 | | - if ( !$this->mLatest ) { |
1299 | | - # Article gone missing |
1300 | | - wfDebug( __METHOD__ . ": EDIT_UPDATE specified but article doesn't exist\n" ); |
1301 | | - $status->fatal( 'edit-gone-missing' ); |
1302 | | - |
1303 | | - wfProfileOut( __METHOD__ ); |
1304 | | - return $status; |
1305 | | - } |
1306 | | - |
1307 | 1307 | $dbw->begin(); |
1308 | 1308 | $revisionId = $revision->insertOn( $dbw ); |
1309 | 1309 | |