From e2c99c9d37d905882a51d1858128905b2c194658 Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Mon, 7 May 2007 07:57:29 +0000 Subject: [PATCH] (bug 9812) (regression) Edit links in regular pages now include "oldid" Article::isCurrent() is called with no Revision object when the article was retrieved from the parser cache. in this case, and then no oldid was given in the URL, it would return false, causing spurious &oldid= parameters in the edit link. instead, if no oldid was given, assume we are viewing the current revision. --- includes/Article.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/Article.php b/includes/Article.php index a2f8b3b005..79bc6e5114 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -500,6 +500,10 @@ class Article { * @return bool */ function isCurrent() { + # If no oldid, this is the current version. + if ($this->getOldID() == 0) + return true; + return $this->exists() && isset( $this->mRevision ) && $this->mRevision->isCurrent(); -- 2.20.1