Don't attempt to copy to ip_changes in PageArchive class.
[lhc/web/wiklou.git] / includes / page / PageArchive.php
index c98d4f7..af936cc 100644 (file)
@@ -734,18 +734,9 @@ class PageArchive {
                                                'deleted' => $unsuppress ? 0 : $row->ar_deleted
                                        ] );
 
+                               // This will also copy the revision to ip_changes if it was an IP edit.
                                $revision->insertOn( $dbw );
 
-                               // Also restore reference to the revision in ip_changes if it was an IP edit.
-                               if ( (int)$row->ar_rev_id === 0 && IP::isValid( $row->ar_user_text ) ) {
-                                       $ipcRow = [
-                                               'ipc_rev_id' => $row->ar_rev_id,
-                                               'ipc_rev_timestamp' => $row->ar_timestamp,
-                                               'ipc_hex' => IP::toHex( $row->ar_user_text ),
-                                       ];
-                                       $dbw->insert( 'ip_changes', $ipcRow, __METHOD__ );
-                               }
-
                                $restored++;
 
                                Hooks::run( 'ArticleRevisionUndeleted',