X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWatchedItemStore.php;h=fcf6d3b6e696045948ae4647009b76b9d5f8c36d;hb=f141d25d1a3e3b125c87f023f3e26dd061740e40;hp=8ae7932be0b48826f11b65a3692794e9631bf500;hpb=29906d505b9b3d5f0fd1e6534f077b7fe2c623dc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php index 8ae7932be0..fcf6d3b6e6 100644 --- a/includes/WatchedItemStore.php +++ b/includes/WatchedItemStore.php @@ -1,6 +1,7 @@ reuseConnection( $dbr ); foreach ( $res as $row ) { - $timestamps[(int)$row->wl_namespace][$row->wl_title] = $row->wl_notificationtimestamp; + $timestamps[$row->wl_namespace][$row->wl_title] = $row->wl_notificationtimestamp; } return $timestamps; @@ -905,12 +906,8 @@ class WatchedItemStore implements StatsdAwareInterface { * @param LinkTarget $newTarget */ public function duplicateAllAssociatedEntries( LinkTarget $oldTarget, LinkTarget $newTarget ) { - if ( !$oldTarget instanceof Title ) { - $oldTarget = Title::newFromLinkTarget( $oldTarget ); - } - if ( !$newTarget instanceof Title ) { - $newTarget = Title::newFromLinkTarget( $newTarget ); - } + $oldTarget = Title::newFromLinkTarget( $oldTarget ); + $newTarget = Title::newFromLinkTarget( $newTarget ); $this->duplicateEntry( $oldTarget->getSubjectPage(), $newTarget->getSubjectPage() ); $this->duplicateEntry( $oldTarget->getTalkPage(), $newTarget->getTalkPage() );