From 2eaf10edde3604b02e10b6f64cff2e1357fc3b7c Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Sun, 22 Mar 2009 23:27:27 +0000 Subject: [PATCH] Make changes link for first filter revision link to the history item (bug 18027) --- Views/AbuseFilterViewDiff.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Views/AbuseFilterViewDiff.php b/Views/AbuseFilterViewDiff.php index dd65cc6a6..889e9a7fb 100644 --- a/Views/AbuseFilterViewDiff.php +++ b/Views/AbuseFilterViewDiff.php @@ -92,6 +92,14 @@ class AbuseFilterViewDiff extends AbuseFilterView { __METHOD__, array( 'ORDER BY' => 'afh_timestamp desc' ) ); + if ($other && !$row) { + $t = $this->getTitle( + "history/".$this->mFilter."/item/".$other['meta']['history_id'] ); + global $wgOut; + $wgOut->redirect( $t->getFullURL() ); + return; + } + } elseif ($spec == 'next' && !in_array( $otherSpec, $dependentSpecs ) ) { // cached $other = $this->loadSpec( $otherSpec, $spec ); @@ -106,6 +114,14 @@ class AbuseFilterViewDiff extends AbuseFilterView { __METHOD__, array( 'ORDER BY' => 'afh_timestamp desc' ) ); + + if ($other && !$row) { + $t = $this->getTitle( + "history/".$this->mFilter."/item/".$other['meta']['history_id'] ); + global $wgOut; + $wgOut->redirect( $t->getFullURL() ); + return; + } } if (!$row)