diff options
author | Tim Starling <tstarling@users.mediawiki.org> | 2003-09-20 01:34:06 +0000 |
---|---|---|
committer | Tim Starling <tstarling@users.mediawiki.org> | 2003-09-20 01:34:06 +0000 |
commit | 7057b4e6098bee9c086a3261c40b4b1d2079c7a2 (patch) | |
tree | 68a216d9fd12a690dda08b55f0bed5a899ae628c /includes/LogPage.php | |
parent | ce01f4f3208f2d7254ce08bdfaa565ddfb85b691 (diff) | |
download | mediawikicore-7057b4e6098bee9c086a3261c40b4b1d2079c7a2.tar.gz mediawikicore-7057b4e6098bee9c086a3261c40b4b1d2079c7a2.zip |
wfQuery now takes three parameters -- one extra for DB replication purposes
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/1680
Diffstat (limited to 'includes/LogPage.php')
-rw-r--r-- | includes/LogPage.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/LogPage.php b/includes/LogPage.php index 08ad054ee5cc..a2d5e92fc2d5 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -21,7 +21,7 @@ class LogPage { $sql = "SELECT cur_id,cur_text,cur_timestamp FROM cur " . "WHERE cur_namespace=" . Namespace::getWikipedia() . " AND " . "cur_title='" . wfStrencode($this->mTitle ) . "'"; - $res = wfQuery( $sql, "LogPage::getContent" ); + $res = wfQuery( $sql, DB_READ, "LogPage::getContent" ); if( wfNumRows( $res ) > 0 ) { $s = wfFetchObject( $res ); @@ -67,7 +67,7 @@ class LogPage { wfStrencode( $this->mTitle ) . "', '" . wfStrencode( $this->mContent ) . "', '" . wfStrencode( $this->mComment ) . "', 'sysop', '{$won}','{$now}')"; - wfQuery( $sql, $fname ); + wfQuery( $sql, DB_WRITE, $fname ); $this->mId = wfInsertId(); } else { $sql = "UPDATE cur SET cur_timestamp='{$now}', " . @@ -76,7 +76,7 @@ class LogPage { "cur_comment='" . wfStrencode( $this->mComment ) . "', " . "cur_restrictions='sysop', inverse_timestamp='{$won}', cur_touched='{$now}' " . "WHERE cur_id={$this->mId}"; - wfQuery( $sql, $fname ); + wfQuery( $sql, DB_WRITE, $fname ); } # And update recentchanges @@ -86,7 +86,7 @@ class LogPage { rc_cur_id) VALUES ('{$now}','{$now}',{$uid},'{$ut}',4,'" . wfStrencode( $this->mTitle ) . "','" . wfStrencode( $this->mComment ) . "',{$this->mId})"; - wfQuery( $sql, $fname ); + wfQuery( $sql, DB_WRITE, $fname ); } return true; } |