From: Aaron Schulz Date: Thu, 15 Jan 2009 17:48:14 +0000 (+0000) Subject: Avoid extra parent id query on rev creation; only needs to be done if the current... X-Git-Tag: 1.31.0-rc.0~43403 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=de2d73876a296fa55dcadd785a8b3aa9e49aeda0;p=lhc%2Fweb%2Fwiklou.git Avoid extra parent id query on rev creation; only needs to be done if the current value is null, not 0 --- diff --git a/includes/Revision.php b/includes/Revision.php index 37c22607b0..5fef68c296 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -819,7 +819,8 @@ class Revision { 'rev_timestamp' => $dbw->timestamp( $this->mTimestamp ), 'rev_deleted' => $this->mDeleted, 'rev_len' => $this->mSize, - 'rev_parent_id' => $this->mParentId ? $this->mParentId : $this->getPreviousRevisionId( $dbw ) + 'rev_parent_id' => is_null($this->mParentId) ? + $this->getPreviousRevisionId( $dbw ) : $this->mParentId ), __METHOD__ );