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.
* @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();