dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce01f4f
)
wfQuery now takes three parameters -- one extra for DB replication purposes
author
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 20 Sep 2003 01:34:06 +0000
(
01:34
+0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 20 Sep 2003 01:34:06 +0000
(
01:34
+0000)
18 files changed:
includes/ImagePage.php
patch
|
blob
|
history
includes/LinkCache.php
patch
|
blob
|
history
includes/LinksUpdate.php
patch
|
blob
|
history
includes/LogPage.php
patch
|
blob
|
history
includes/Math.php
patch
|
blob
|
history
includes/OutputPage.php
patch
|
blob
|
history
includes/SearchEngine.php
patch
|
blob
|
history
includes/SearchUpdate.php
patch
|
blob
|
history
includes/SiteStatsUpdate.php
patch
|
blob
|
history
includes/Skin.php
patch
|
blob
|
history
includes/SpecialAllpages.php
patch
|
blob
|
history
includes/SpecialAncientpages.php
patch
|
blob
|
history
includes/SpecialAsksql.php
patch
|
blob
|
history
includes/SpecialBooksources.php
patch
|
blob
|
history
includes/SpecialCategories.php
patch
|
blob
|
history
includes/SpecialContributions.php
patch
|
blob
|
history
includes/SpecialImagelist.php
patch
|
blob
|
history
includes/SpecialListusers.php
patch
|
blob
|
history
diff --git
a/includes/ImagePage.php
b/includes/ImagePage.php
index
e86efa1
..
300883f
100644
(file)
--- a/
includes/ImagePage.php
+++ b/
includes/ImagePage.php
@@
-30,7
+30,7
@@
class ImagePage extends Article {
$sql = "SELECT img_size,img_description,img_user," .
"img_user_text,img_timestamp FROM image WHERE " .
"img_name='" . wfStrencode( $this->mTitle->getDBkey() ) . "'";
$sql = "SELECT img_size,img_description,img_user," .
"img_user_text,img_timestamp FROM image WHERE " .
"img_name='" . wfStrencode( $this->mTitle->getDBkey() ) . "'";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
if ( 0 == wfNumRows( $res ) ) { return; }
if ( 0 == wfNumRows( $res ) ) { return; }
@@
-46,7
+46,7
@@
class ImagePage extends Article {
"oi_user_text,oi_timestamp,oi_archive_name FROM oldimage WHERE " .
"oi_name='" . wfStrencode( $this->mTitle->getDBkey() ) . "' " .
"ORDER BY oi_timestamp DESC";
"oi_user_text,oi_timestamp,oi_archive_name FROM oldimage WHERE " .
"oi_name='" . wfStrencode( $this->mTitle->getDBkey() ) . "' " .
"ORDER BY oi_timestamp DESC";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
while ( $line = wfFetchObject( $res ) ) {
$s .= $sk->imageHistoryLine( false, $line->oi_timestamp,
while ( $line = wfFetchObject( $res ) ) {
$s .= $sk->imageHistoryLine( false, $line->oi_timestamp,
@@
-65,7
+65,7
@@
class ImagePage extends Article {
$sql = "SELECT il_from FROM imagelinks WHERE il_to='" .
wfStrencode( $this->mTitle->getDBkey() ) . "'";
$sql = "SELECT il_from FROM imagelinks WHERE il_to='" .
wfStrencode( $this->mTitle->getDBkey() ) . "'";
- $res = wfQuery( $sql, "Article::imageLinks" );
+ $res = wfQuery( $sql,
DB_READ,
"Article::imageLinks" );
if ( 0 == wfNumRows( $res ) ) {
$wgOut->addHtml( "<p>" . wfMsg( "nolinkstoimage" ) . "\n" );
if ( 0 == wfNumRows( $res ) ) {
$wgOut->addHtml( "<p>" . wfMsg( "nolinkstoimage" ) . "\n" );
@@
-137,18
+137,18
@@
class ImagePage extends Article {
}
$sql = "DELETE FROM image WHERE img_name='" .
wfStrencode( $image ) . "'";
}
$sql = "DELETE FROM image WHERE img_name='" .
wfStrencode( $image ) . "'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
$sql = "SELECT oi_archive_name FROM oldimage WHERE oi_name='" .
wfStrencode( $image ) . "'";
$sql = "SELECT oi_archive_name FROM oldimage WHERE oi_name='" .
wfStrencode( $image ) . "'";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
while ( $s = wfFetchObject( $res ) ) {
$this->doDeleteOldImage( $s->oi_archive_name );
}
$sql = "DELETE FROM oldimage WHERE oi_name='" .
wfStrencode( $image ) . "'";
while ( $s = wfFetchObject( $res ) ) {
$this->doDeleteOldImage( $s->oi_archive_name );
}
$sql = "DELETE FROM oldimage WHERE oi_name='" .
wfStrencode( $image ) . "'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
# Image itself is now gone, and database is cleaned.
# Now we remove the image description page.
# Image itself is now gone, and database is cleaned.
# Now we remove the image description page.
@@
-161,7
+161,7
@@
class ImagePage extends Article {
$this->doDeleteOldImage( $oldimage );
$sql = "DELETE FROM oldimage WHERE oi_archive_name='" .
wfStrencode( $oldimage ) . "'";
$this->doDeleteOldImage( $oldimage );
$sql = "DELETE FROM oldimage WHERE oi_archive_name='" .
wfStrencode( $oldimage ) . "'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
$deleted = $oldimage;
} else {
$deleted = $oldimage;
} else {
diff --git
a/includes/LinkCache.php
b/includes/LinkCache.php
index
fdac736
..
379da89
100644
(file)
--- a/
includes/LinkCache.php
+++ b/
includes/LinkCache.php
@@
-91,7
+91,7
@@
class LinkCache {
if( $id === FALSE ) {
$sql = "SELECT HIGH_PRIORITY cur_id FROM cur WHERE cur_namespace=" .
"{$ns} AND cur_title='" . wfStrencode( $t ) . "'";
if( $id === FALSE ) {
$sql = "SELECT HIGH_PRIORITY cur_id FROM cur WHERE cur_namespace=" .
"{$ns} AND cur_title='" . wfStrencode( $t ) . "'";
- $res = wfQuery( $sql, "LinkCache::addLink" );
+ $res = wfQuery( $sql,
DB_READ,
"LinkCache::addLink" );
if ( 0 == wfNumRows( $res ) ) {
$id = 0;
if ( 0 == wfNumRows( $res ) ) {
$id = 0;
@@
-115,7
+115,7
@@
class LinkCache {
$sql = "SELECT HIGH_PRIORITY cur_id,cur_namespace,cur_title
FROM cur,links
WHERE cur_id=l_to AND l_from='{$dbkeyfrom}'";
$sql = "SELECT HIGH_PRIORITY cur_id,cur_namespace,cur_title
FROM cur,links
WHERE cur_id=l_to AND l_from='{$dbkeyfrom}'";
- $res = wfQuery( $sql, "LinkCache::preFill" );
+ $res = wfQuery( $sql,
DB_READ,
"LinkCache::preFill" );
while( $s = wfFetchObject( $res ) ) {
$this->addGoodLink( $s->cur_id,
Title::makeName( $s->cur_namespace, $s->cur_title )
while( $s = wfFetchObject( $res ) ) {
$this->addGoodLink( $s->cur_id,
Title::makeName( $s->cur_namespace, $s->cur_title )
@@
-129,7
+129,7
@@
class LinkCache {
$sql = "SELECT HIGH_PRIORITY bl_to
FROM brokenlinks
WHERE bl_from='{$id}'";
$sql = "SELECT HIGH_PRIORITY bl_to
FROM brokenlinks
WHERE bl_from='{$id}'";
- $res = wfQuery( $sql, "LinkCache::preFill" );
+ $res = wfQuery( $sql,
DB_READ,
"LinkCache::preFill" );
while( $s = wfFetchObject( $res ) ) {
$this->addBadLink( $s->bl_to );
}
while( $s = wfFetchObject( $res ) ) {
$this->addBadLink( $s->bl_to );
}
diff --git
a/includes/LinksUpdate.php
b/includes/LinksUpdate.php
index
2b30abb
..
de4b861
100644
(file)
--- a/
includes/LinksUpdate.php
+++ b/
includes/LinksUpdate.php
@@
-32,7
+32,7
@@
class LinksUpdate {
if( $wgDBtransactions ) {
$sql = "BEGIN";
if( $wgDBtransactions ) {
$sql = "BEGIN";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
#------------------------------------------------------------------------------
}
#------------------------------------------------------------------------------
@@
-43,12
+43,12
@@
class LinksUpdate {
if ( count( $del ) ) {
$sql = "DELETE FROM links WHERE l_from='{$this->mTitleEnc}' AND l_to IN(".
implode( ",", $del ) . ")";
if ( count( $del ) ) {
$sql = "DELETE FROM links WHERE l_from='{$this->mTitleEnc}' AND l_to IN(".
implode( ",", $del ) . ")";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
} else {
# Delete everything
$sql = "DELETE FROM links WHERE l_from='{$this->mTitleEnc}'";
}
} else {
# Delete everything
$sql = "DELETE FROM links WHERE l_from='{$this->mTitleEnc}'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
# Get the addition list
$add = $wgLinkCache->getGoodLinks();
# Get the addition list
$add = $wgLinkCache->getGoodLinks();
@@
-68,7
+68,7
@@
class LinksUpdate {
}
}
if ( "" != $sql ) {
}
}
if ( "" != $sql ) {
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
#------------------------------------------------------------------------------
}
#------------------------------------------------------------------------------
@@
-79,12
+79,12
@@
class LinksUpdate {
if ( count( $del ) ) {
$sql = "DELETE FROM brokenlinks WHERE bl_from={$this->mId} AND bl_to IN('" .
implode( "','", $del ) . "')";
if ( count( $del ) ) {
$sql = "DELETE FROM brokenlinks WHERE bl_from={$this->mId} AND bl_to IN('" .
implode( "','", $del ) . "')";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
} else {
# Delete all
$sql = "DELETE FROM brokenlinks WHERE bl_from={$this->mId}";
}
} else {
# Delete all
$sql = "DELETE FROM brokenlinks WHERE bl_from={$this->mId}";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
# Get addition list
$add = $wgLinkCache->getBadLinks();
# Get addition list
$add = $wgLinkCache->getBadLinks();
@@
-104,13
+104,13
@@
class LinksUpdate {
}
}
if ( "" != $sql ) {
}
}
if ( "" != $sql ) {
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
#------------------------------------------------------------------------------
# Image links
$sql = "DELETE FROM imagelinks WHERE il_from='{$this->mTitleEnc}'";
}
#------------------------------------------------------------------------------
# Image links
$sql = "DELETE FROM imagelinks WHERE il_from='{$this->mTitleEnc}'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
# Get addition list
$add = $wgLinkCache->getImageLinks();
# Get addition list
$add = $wgLinkCache->getImageLinks();
@@
-128,13
+128,13
@@
class LinksUpdate {
$sql .= "('{$this->mTitleEnc}','{$iname}')";
}
}
$sql .= "('{$this->mTitleEnc}','{$iname}')";
}
}
- if ( "" != $sql ) { wfQuery( $sql, $fname ); }
+ if ( "" != $sql ) { wfQuery( $sql,
DB_WRITE,
$fname ); }
$this->fixBrokenLinks();
if( $wgDBtransactions ) {
$sql = "COMMIT";
$this->fixBrokenLinks();
if( $wgDBtransactions ) {
$sql = "COMMIT";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
wfProfileOut();
}
}
wfProfileOut();
}
@@
-149,11
+149,11
@@
class LinksUpdate {
if( $wgDBtransactions ) {
$sql = "BEGIN";
if( $wgDBtransactions ) {
$sql = "BEGIN";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
$sql = "DELETE FROM links WHERE l_from='{$this->mTitleEnc}'";
}
$sql = "DELETE FROM links WHERE l_from='{$this->mTitleEnc}'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
$a = $wgLinkCache->getGoodLinks();
$sql = "";
$a = $wgLinkCache->getGoodLinks();
$sql = "";
@@
-167,10
+167,10
@@
class LinksUpdate {
$sql .= "('{$this->mTitleEnc}',{$lid})";
}
}
$sql .= "('{$this->mTitleEnc}',{$lid})";
}
}
- if ( "" != $sql ) { wfQuery( $sql, $fname ); }
+ if ( "" != $sql ) { wfQuery( $sql,
DB_WRITE,
$fname ); }
$sql = "DELETE FROM brokenlinks WHERE bl_from={$this->mId}";
$sql = "DELETE FROM brokenlinks WHERE bl_from={$this->mId}";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
$a = $wgLinkCache->getBadLinks();
$sql = "";
$a = $wgLinkCache->getBadLinks();
$sql = "";
@@
-185,10
+185,10
@@
class LinksUpdate {
$sql .= "({$this->mId},'{$blt}')";
}
}
$sql .= "({$this->mId},'{$blt}')";
}
}
- if ( "" != $sql ) { wfQuery( $sql, $fname ); }
+ if ( "" != $sql ) { wfQuery( $sql,
DB_WRITE,
$fname ); }
$sql = "DELETE FROM imagelinks WHERE il_from='{$this->mTitleEnc}'";
$sql = "DELETE FROM imagelinks WHERE il_from='{$this->mTitleEnc}'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
$a = $wgLinkCache->getImageLinks();
$sql = "";
$a = $wgLinkCache->getImageLinks();
$sql = "";
@@
-203,13
+203,13
@@
class LinksUpdate {
$sql .= "('{$this->mTitleEnc}','{$iname}')";
}
}
$sql .= "('{$this->mTitleEnc}','{$iname}')";
}
}
- if ( "" != $sql ) { wfQuery( $sql, $fname ); }
+ if ( "" != $sql ) { wfQuery( $sql,
DB_WRITE,
$fname ); }
$this->fixBrokenLinks();
if( $wgDBtransactions ) {
$sql = "COMMIT";
$this->fixBrokenLinks();
if( $wgDBtransactions ) {
$sql = "COMMIT";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
wfProfileOut();
}
}
wfProfileOut();
}
@@
-219,7
+219,7
@@
class LinksUpdate {
/* Call for a newly created page, or just to make sure state is consistent */
$sql = "SELECT bl_from FROM brokenlinks WHERE bl_to='{$this->mTitleEnc}'";
/* Call for a newly created page, or just to make sure state is consistent */
$sql = "SELECT bl_from FROM brokenlinks WHERE bl_to='{$this->mTitleEnc}'";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
if ( 0 == wfNumRows( $res ) ) { return; }
$sql = "INSERT INTO links (l_from,l_to) VALUES ";
if ( 0 == wfNumRows( $res ) ) { return; }
$sql = "INSERT INTO links (l_from,l_to) VALUES ";
@@
-235,11
+235,11
@@
class LinksUpdate {
$sql2 .= $row->bl_from;
}
$sql2 .= ")";
$sql2 .= $row->bl_from;
}
$sql2 .= ")";
- wfQuery( $sql, $fname );
- wfQuery( $sql2, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
+ wfQuery( $sql2,
DB_WRITE,
$fname );
$sql = "DELETE FROM brokenlinks WHERE bl_to='{$this->mTitleEnc}'";
$sql = "DELETE FROM brokenlinks WHERE bl_to='{$this->mTitleEnc}'";
- wfQuery( $sql, $fname );
+ wfQuery( $sql,
DB_WRITE,
$fname );
}
}
}
}
diff --git
a/includes/LogPage.php
b/includes/LogPage.php
index
08ad054
..
a2d5e92
100644
(file)
--- 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 ) . "'";
$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 );
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}')";
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}', " .
$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}";
"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
}
# 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})";
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;
}
}
return true;
}
diff --git
a/includes/Math.php
b/includes/Math.php
index
60fe6a8
..
3479a99
100644
(file)
--- a/
includes/Math.php
+++ b/
includes/Math.php
@@
-25,7
+25,7
@@
function renderMath( $tex )
else
$sql = "SELECT math_outputhash,math_html_conservativeness,math_html FROM math WHERE math_inputhash = '".$md5_sql."'";
else
$sql = "SELECT math_outputhash,math_html_conservativeness,math_html FROM math WHERE math_inputhash = '".$md5_sql."'";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
if ( wfNumRows( $res ) == 0 )
{
$cmd = "./math/texvc ".escapeshellarg($wgTmpDirectory)." ".
if ( wfNumRows( $res ) == 0 )
{
$cmd = "./math/texvc ".escapeshellarg($wgTmpDirectory)." ".
@@
-94,7
+94,7
@@
function renderMath( $tex )
$sql = "REPLACE INTO math VALUES ('".$md5_sql."', '".$outmd5_sql."', ".$conservativeness.", ".$sql_html.", ".$sql_mathml.")";
$sql = "REPLACE INTO math VALUES ('".$md5_sql."', '".$outmd5_sql."', ".$conservativeness.", ".$sql_html.", ".$sql_mathml.")";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_WRITE,
$fname );
# we don't really care if it fails
if (($math == 0) || ($rpage->math_html == '') || (($math == 1) && ($conservativeness != 2)) || (($math == 4) && ($conservativeness == 0)))
# we don't really care if it fails
if (($math == 0) || ($rpage->math_html == '') || (($math == 1) && ($conservativeness != 2)) || (($math == 4) && ($conservativeness == 0)))
diff --git
a/includes/OutputPage.php
b/includes/OutputPage.php
index
2fd15de
..
3919d21
100644
(file)
--- a/
includes/OutputPage.php
+++ b/
includes/OutputPage.php
@@
-561,7
+561,7
@@
class OutputPage {
global $wgUser ;
$sk = $wgUser->getSkin() ;
$sql = "SELECT l_from FROM links WHERE l_to={$id}" ;
global $wgUser ;
$sk = $wgUser->getSkin() ;
$sql = "SELECT l_from FROM links WHERE l_to={$id}" ;
- $res = wfQuery ( $sql ) ;
+ $res = wfQuery ( $sql
, DB_READ
) ;
while ( $x = wfFetchObject ( $res ) )
{
# $t = new Title ;
while ( $x = wfFetchObject ( $res ) )
{
# $t = new Title ;
diff --git
a/includes/SearchEngine.php
b/includes/SearchEngine.php
index
210286e
..
314cf3f
100644
(file)
--- a/
includes/SearchEngine.php
+++ b/
includes/SearchEngine.php
@@
-175,7
+175,7
@@
class SearchEngine {
"WHERE cur_id=si_page AND {$this->mTitlecond} " .
"{$searchnamespaces} {$redircond}" .
"LIMIT {$offset}, {$limit}";
"WHERE cur_id=si_page AND {$this->mTitlecond} " .
"{$searchnamespaces} {$redircond}" .
"LIMIT {$offset}, {$limit}";
- $res1 = wfQuery( $sql, $fname );
+ $res1 = wfQuery( $sql,
DB_READ,
$fname );
$num = wfNumRows($res1);
if ( $wgDisableTextSearch ) {
$num = wfNumRows($res1);
if ( $wgDisableTextSearch ) {
@@
-186,7
+186,7
@@
class SearchEngine {
"WHERE cur_id=si_page AND {$this->mTextcond} " .
"{$searchnamespaces} {$redircond} " .
"LIMIT {$offset}, {$limit}";
"WHERE cur_id=si_page AND {$this->mTextcond} " .
"{$searchnamespaces} {$redircond} " .
"LIMIT {$offset}, {$limit}";
- $res2 = wfQuery( $sql, $fname );
+ $res2 = wfQuery( $sql,
DB_READ,
$fname );
$num = $num + wfNumRows($res2);
}
$num = $num + wfNumRows($res2);
}
@@
-422,7
+422,7
@@
class SearchEngine {
"WHERE cur_id=si_page AND {$this->mTitlecond} ORDER BY cur_namespace LIMIT 1";
if ( "" != $this->mTitlecond ) {
"WHERE cur_id=si_page AND {$this->mTitlecond} ORDER BY cur_namespace LIMIT 1";
if ( "" != $this->mTitlecond ) {
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
}
if ( isset( $res ) && 0 != wfNumRows( $res ) ) {
$s = wfFetchObject( $res );
}
if ( isset( $res ) && 0 != wfNumRows( $res ) ) {
$s = wfFetchObject( $res );
diff --git
a/includes/SearchUpdate.php
b/includes/SearchUpdate.php
index
9e9ff2a
..
f77ba41
100644
(file)
--- a/
includes/SearchUpdate.php
+++ b/
includes/SearchUpdate.php
@@
-28,7
+28,7
@@
class SearchUpdate {
$sql = "UPDATE LOW_PRIORITY searchindex SET si_title='" .
wfStrencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) .
"' WHERE si_page={$this->mId}";
$sql = "UPDATE LOW_PRIORITY searchindex SET si_title='" .
wfStrencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) .
"' WHERE si_page={$this->mId}";
- wfQuery( $sql, "SearchUpdate::doUpdate" );
+ wfQuery( $sql,
DB_WRITE,
"SearchUpdate::doUpdate" );
return;
}
return;
}
@@
-71,7
+71,7
@@
class SearchUpdate {
$sql = "REPLACE DELAYED INTO searchindex (si_page,si_title,si_text) VALUES ({$this->mId},'" .
wfStrencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) . "','" .
wfStrencode( $text ) . "')";
$sql = "REPLACE DELAYED INTO searchindex (si_page,si_title,si_text) VALUES ({$this->mId},'" .
wfStrencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) . "','" .
wfStrencode( $text ) . "')";
- wfQuery( $sql, "SearchUpdate::doUpdate" );
+ wfQuery( $sql,
DB_WRITE,
"SearchUpdate::doUpdate" );
}
}
}
}
diff --git
a/includes/SiteStatsUpdate.php
b/includes/SiteStatsUpdate.php
index
61ca846
..
f8ab804
100644
(file)
--- a/
includes/SiteStatsUpdate.php
+++ b/
includes/SiteStatsUpdate.php
@@
-33,7
+33,7
@@
class SiteStatsUpdate {
$sql = "UPDATE LOW_PRIORITY site_stats SET " . implode ( ",", $a ) .
" WHERE ss_row_id=1";
$sql = "UPDATE LOW_PRIORITY site_stats SET " . implode ( ",", $a ) .
" WHERE ss_row_id=1";
- wfQuery( $sql, "SiteStatsUpdate::doUpdate" );
+ wfQuery( $sql,
DB_WRITE,
"SiteStatsUpdate::doUpdate" );
}
}
}
}
diff --git
a/includes/Skin.php
b/includes/Skin.php
index
dc6886c
..
2ea643d
100644
(file)
--- a/
includes/Skin.php
+++ b/
includes/Skin.php
@@
-6,7
+6,7
@@
# Language class has internationalized names
#
/* private */ $wgValidSkinNames = array(
# Language class has internationalized names
#
/* private */ $wgValidSkinNames = array(
- "Standard", "Nostalgia", "CologneBlue", "Smarty", "Montparnasse"
+ "Standard", "Nostalgia", "CologneBlue"
#
, "Smarty", "Montparnasse"
);
# For some odd PHP bug, this function can't be part of a class
);
# For some odd PHP bug, this function can't be part of a class
@@
-1140,7
+1140,7
@@
if ( isset ( $wgUseApproval ) && $wgUseApproval )
} else {
$threshold = $wgUser->getOption("stubthreshold") ;
if ( $threshold > 0 ) {
} else {
$threshold = $wgUser->getOption("stubthreshold") ;
if ( $threshold > 0 ) {
- $res = wfQuery ( "SELECT HIGH_PRIORITY length(cur_text) AS x, cur_namespace, cur_is_redirect FROM cur WHERE cur_id='{$aid}'" ) ;
+ $res = wfQuery ( "SELECT HIGH_PRIORITY length(cur_text) AS x, cur_namespace, cur_is_redirect FROM cur WHERE cur_id='{$aid}'"
, DB_READ
) ;
if ( wfNumRows( $res ) > 0 ) {
$s = wfFetchObject( $res );
if ( wfNumRows( $res ) > 0 ) {
$s = wfFetchObject( $res );
@@
-1812,6
+1812,7
@@
if ( isset ( $wgUseApproval ) && $wgUseApproval )
include_once( "SkinStandard.php" );
include_once( "SkinNostalgia.php" );
include_once( "SkinCologneBlue.php" );
include_once( "SkinStandard.php" );
include_once( "SkinNostalgia.php" );
include_once( "SkinCologneBlue.php" );
-include_once( "SkinSmarty.php" );
+
+#include_once( "SkinSmarty.php" );
?>
?>
diff --git
a/includes/SpecialAllpages.php
b/includes/SpecialAllpages.php
index
8ba8225
..
2e01937
100644
(file)
--- a/
includes/SpecialAllpages.php
+++ b/
includes/SpecialAllpages.php
@@
-37,13
+37,13
@@
function indexShowToplevel()
$out = "";
$sql = "SELECT COUNT(*) AS count $fromwhere";
$out = "";
$sql = "SELECT COUNT(*) AS count $fromwhere";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
$s = wfFetchObject( $res );
$count = $s->count;
$sections = ceil( $count / $indexMaxperpage );
$sql = "SELECT cur_title $fromwhere $order LIMIT 1";
$s = wfFetchObject( $res );
$count = $s->count;
$sections = ceil( $count / $indexMaxperpage );
$sql = "SELECT cur_title $fromwhere $order LIMIT 1";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
$s = wfFetchObject( $res );
$inpoint = $s->cur_title;
$s = wfFetchObject( $res );
$inpoint = $s->cur_title;
@@
-52,7
+52,7
@@
function indexShowToplevel()
for( $i = 1; $i < $sections; $i++ ) {
$from = $i * $indexMaxperpage;
$sql = "SELECT cur_title $fromwhere $order LIMIT $from,2";
for( $i = 1; $i < $sections; $i++ ) {
$from = $i * $indexMaxperpage;
$sql = "SELECT cur_title $fromwhere $order LIMIT $from,2";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
$s = wfFetchObject( $res );
$outpoint = $s->cur_title;
$s = wfFetchObject( $res );
$outpoint = $s->cur_title;
@@
-66,7
+66,7
@@
function indexShowToplevel()
$from = $i * $indexMaxperpage;
$sql = "SELECT cur_title $fromwhere $order LIMIT " . ($count-1) . ",1";
$from = $i * $indexMaxperpage;
$sql = "SELECT cur_title $fromwhere $order LIMIT " . ($count-1) . ",1";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
$s = wfFetchObject( $res );
$outpoint = $s->cur_title;
$out .= indexShowline( $inpoint, $outpoint );
$s = wfFetchObject( $res );
$outpoint = $s->cur_title;
$out .= indexShowline( $inpoint, $outpoint );
@@
-106,7
+106,7
@@
FROM cur
WHERE cur_namespace=0 AND cur_title >= '" . wfStrencode( $from ) . "'
ORDER BY cur_title
LIMIT {$indexMaxperpage}";
WHERE cur_namespace=0 AND cur_title >= '" . wfStrencode( $from ) . "'
ORDER BY cur_title
LIMIT {$indexMaxperpage}";
- $res = wfQuery( $sql, "indexShowChunk" );
+ $res = wfQuery( $sql,
DB_READ,
"indexShowChunk" );
# FIXME: Dynamic column widths, backlink to main list,
# side links to next and previous
# FIXME: Dynamic column widths, backlink to main list,
# side links to next and previous
diff --git
a/includes/SpecialAncientpages.php
b/includes/SpecialAncientpages.php
index
95f8334
..
60c736a
100644
(file)
--- a/
includes/SpecialAncientpages.php
+++ b/
includes/SpecialAncientpages.php
@@
-11,7
+11,7
@@
function wfSpecialAncientpages()
"cur_timestamp FROM cur USE INDEX (cur_timestamp) " .
"WHERE cur_namespace=0 AND cur_is_redirect=0 " .
" ORDER BY cur_timestamp LIMIT {$offset}, {$limit}";
"cur_timestamp FROM cur USE INDEX (cur_timestamp) " .
"WHERE cur_namespace=0 AND cur_is_redirect=0 " .
" ORDER BY cur_timestamp LIMIT {$offset}, {$limit}";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
$top = wfShowingResults( $offset, $limit );
$wgOut->addHTML( "<p>{$top}\n" );
$top = wfShowingResults( $offset, $limit );
$wgOut->addHTML( "<p>{$top}\n" );
diff --git
a/includes/SpecialAsksql.php
b/includes/SpecialAsksql.php
index
062e1c1
..
5466dad
100644
(file)
--- a/
includes/SpecialAsksql.php
+++ b/
includes/SpecialAsksql.php
@@
-72,7
+72,7
@@
class SqlQueryForm {
$connection = wfGetDB( $wgDBsqluser, $wgDBsqlpassword );
}
$this->logQuery( $wpSqlQuery );
$connection = wfGetDB( $wgDBsqluser, $wgDBsqlpassword );
}
$this->logQuery( $wpSqlQuery );
- $res = wfQuery( $wpSqlQuery, "SpecialAsksql::doSubmit" );
+ $res = wfQuery( $wpSqlQuery,
DB_READ,
"SpecialAsksql::doSubmit" );
$this->logFinishedQuery();
$n = 0;
$this->logFinishedQuery();
$n = 0;
diff --git
a/includes/SpecialBooksources.php
b/includes/SpecialBooksources.php
index
b1ae00f
..
c7630f5
100644
(file)
--- a/
includes/SpecialBooksources.php
+++ b/
includes/SpecialBooksources.php
@@
-34,7
+34,7
@@
class BookSourceList {
$sql = "SELECT cur_text FROM cur " .
"WHERE cur_namespace=4 and cur_title='" .
wfStrencode( $bstitle->getDBkey() ) . "'";
$sql = "SELECT cur_text FROM cur " .
"WHERE cur_namespace=4 and cur_title='" .
wfStrencode( $bstitle->getDBkey() ) . "'";
- $res = wfQuery( $sql, $fname );
+ $res = wfQuery( $sql,
DB_READ,
$fname );
if( ( $s = wfFetchObject( $res ) ) and ( $s->cur_text != "" ) ) {
$bstext = $s->cur_text;
$bstext = str_replace( "MAGICNUMBER", $this->mIsbn, $bstext );
if( ( $s = wfFetchObject( $res ) ) and ( $s->cur_text != "" ) ) {
$bstext = $s->cur_text;
$bstext = str_replace( "MAGICNUMBER", $this->mIsbn, $bstext );
diff --git
a/includes/SpecialCategories.php
b/includes/SpecialCategories.php
index
831cc9b
..
c23dc08
100644
(file)
--- a/
includes/SpecialCategories.php
+++ b/
includes/SpecialCategories.php
@@
-10,7
+10,7
@@
function wfSpecialCategories()
$r .= "<OL>\n" ;
$cat = ucfirst ( wfMsg ( "category" ) ) ;
$sql = "SELECT cur_title FROM cur WHERE cur_title LIKE \"{$cat}:%\"" ;
$r .= "<OL>\n" ;
$cat = ucfirst ( wfMsg ( "category" ) ) ;
$sql = "SELECT cur_title FROM cur WHERE cur_title LIKE \"{$cat}:%\"" ;
- $res = wfQuery ( $sql ) ;
+ $res = wfQuery ( $sql
, DB_READ
) ;
while ( $x = wfFetchObject ( $res ) )
{
$t = explode ( ":" , $x->cur_title , 2 ) ;
while ( $x = wfFetchObject ( $res ) )
{
$t = explode ( ":" , $x->cur_title , 2 ) ;
@@
-24,7
+24,7
@@
function wfSpecialCategories()
$r .= "<hr>\n" ;
$sql = "SELECT DISTINCT bl_to FROM brokenlinks WHERE bl_to LIKE \"{$cat}:%\"" ;
$r .= "<hr>\n" ;
$sql = "SELECT DISTINCT bl_to FROM brokenlinks WHERE bl_to LIKE \"{$cat}:%\"" ;
- $res = wfQuery ( $sql ) ;
+ $res = wfQuery ( $sql
, DB_READ
) ;
$r .= "<OL>\n" ;
while ( $x = wfFetchObject ( $res ) )
{
$r .= "<OL>\n" ;
while ( $x = wfFetchObject ( $res ) )
{
diff --git
a/includes/SpecialContributions.php
b/includes/SpecialContributions.php
index
fc88af8
..
d25a0ac
100644
(file)
--- a/
includes/SpecialContributions.php
+++ b/
includes/SpecialContributions.php
@@
-49,20
+49,20
@@
function wfSpecialContributions( $par = "" )
$sql = "SELECT cur_namespace,cur_title,cur_timestamp,cur_comment FROM cur " .
"WHERE cur_user_text='" . wfStrencode( $nt->getText() ) . "' {$cmq} " .
"ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
$sql = "SELECT cur_namespace,cur_title,cur_timestamp,cur_comment FROM cur " .
"WHERE cur_user_text='" . wfStrencode( $nt->getText() ) . "' {$cmq} " .
"ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
- $res1 = wfQuery( $sql, $fname );
+ $res1 = wfQuery( $sql,
DB_READ,
$fname );
$sql = "SELECT old_namespace,old_title,old_timestamp,old_comment FROM old " .
"WHERE old_user_text='" . wfStrencode( $nt->getText() ) . "' {$omq} " .
"ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
$sql = "SELECT old_namespace,old_title,old_timestamp,old_comment FROM old " .
"WHERE old_user_text='" . wfStrencode( $nt->getText() ) . "' {$omq} " .
"ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
- $res2 = wfQuery( $sql, $fname );
+ $res2 = wfQuery( $sql,
DB_READ,
$fname );
} else {
$sql = "SELECT cur_namespace,cur_title,cur_timestamp,cur_comment FROM cur " .
"WHERE cur_user={$id} {$cmq} ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
} else {
$sql = "SELECT cur_namespace,cur_title,cur_timestamp,cur_comment FROM cur " .
"WHERE cur_user={$id} {$cmq} ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
- $res1 = wfQuery( $sql, $fname );
+ $res1 = wfQuery( $sql,
DB_READ,
$fname );
$sql = "SELECT old_namespace,old_title,old_timestamp,old_comment FROM old " .
"WHERE old_user={$id} {$omq} ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
$sql = "SELECT old_namespace,old_title,old_timestamp,old_comment FROM old " .
"WHERE old_user={$id} {$omq} ORDER BY inverse_timestamp LIMIT {$offset}, {$limit}";
- $res2 = wfQuery( $sql, $fname );
+ $res2 = wfQuery( $sql,
DB_READ,
$fname );
}
$nCur = wfNumRows( $res1 );
$nOld = wfNumRows( $res2 );
}
$nCur = wfNumRows( $res1 );
$nOld = wfNumRows( $res2 );
diff --git
a/includes/SpecialImagelist.php
b/includes/SpecialImagelist.php
index
4c02240
..
2b0a49f
100644
(file)
--- a/
includes/SpecialImagelist.php
+++ b/
includes/SpecialImagelist.php
@@
-85,7
+85,7
@@
function wfSpecialImagelist()
$text = str_replace( "$2", $bydate, $text );
$wgOut->addHTML( "{$text}<br>\n<p>" );
$text = str_replace( "$2", $bydate, $text );
$wgOut->addHTML( "{$text}<br>\n<p>" );
- $res = wfQuery( $sql, "wfSpecialImagelist" );
+ $res = wfQuery( $sql,
DB_READ,
"wfSpecialImagelist" );
while ( $s = wfFetchObject( $res ) ) {
$name = $s->img_name;
$ut = $s->img_user_text;
while ( $s = wfFetchObject( $res ) ) {
$name = $s->img_name;
$ut = $s->img_user_text;
diff --git
a/includes/SpecialListusers.php
b/includes/SpecialListusers.php
index
7fb1bf0
..
629776f
100644
(file)
--- a/
includes/SpecialListusers.php
+++ b/
includes/SpecialListusers.php
@@
-15,7
+15,7
@@
function wfSpecialListusers()
$sql = "SELECT user_name,user_rights FROM user ORDER BY " .
"user_name LIMIT {$offset}, {$limit}";
$sql = "SELECT user_name,user_rights FROM user ORDER BY " .
"user_name LIMIT {$offset}, {$limit}";
- $res = wfQuery( $sql, "wfSpecialListusers" );
+ $res = wfQuery( $sql,
DB_READ,
"wfSpecialListusers" );
$sk = $wgUser->getSkin();
while ( $s = wfFetchObject( $res ) ) {
$sk = $wgUser->getSkin();
while ( $s = wfFetchObject( $res ) ) {