From 13c5b9217bbb280f9dfd164a4790b47f7ed0f3db Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Fri, 11 Jun 2004 15:46:42 +0000 Subject: [PATCH] PG: old->"old" --- includes/RawPage.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/RawPage.php b/includes/RawPage.php index 3d99586128..4116f00566 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -60,7 +60,7 @@ class RawPage { } function getrawtext () { - global $wgInputEncoding, $wgLang; + global $wgInputEncoding, $wgLang, $wgIsPg; if( !$this->mTitle ) return ''; $t = wfStrencode( $this->mTitle->getDBKey() ); $ns = $this->mTitle->getNamespace(); @@ -73,7 +73,9 @@ class RawPage { } # else get it from the DB if(!empty($this->mOldId)) { - $sql = "SELECT old_text as text,old_timestamp as timestamp,old_user as user,old_flags as flags FROM old " . + $oldtable=$wgIsPg?'"old"':'old'; + $sql = "SELECT old_text AS text,old_timestamp AS timestamp,". + "old_user AS user,old_flags AS flags FROM $oldtable " . "WHERE old_id={$this->mOldId}"; } else { $sql = "SELECT cur_id as id,cur_timestamp as timestamp,cur_user as user,cur_user_text as user_text," . -- 2.20.1