$wgInputEncoding = "ISO-8859-1";
$wgOutputEncoding = "ISO-8859-1";
+# Extremely high-traffic wikis may want to disable
+# some database-intensive features here:
+#
+# $wgDisableTextSearch = true;
+# $wgDisableCounters = true;
+# $wgMiserMode = true;
+
?>
<?
# DO NOT EDIT THIS FILE!
# To customize your installation, edit "LocalSettings.php".
+# Note that since all these string interpolations are expanded
+# before LocalSettings is included, if you localize something
+# like $wgScriptPath, you must also localize everything that
+# depends on it.
$wgServer = "http://" . getenv( "SERVER_NAME" );
$wgScriptPath = "/wiki";
function doUpdate()
{
+ global $wgDisableCounters;
+ if ( $wgDisableCounters ) { return; }
+
$a = array();
if ( $this->mViews < 0 ) { $m = "-1"; }
if ( isset( $oldid ) || isset( $diff ) ) { return ""; }
if ( 0 == $wgArticle->getID() ) { return ""; }
- $count = $wgArticle->getCount();
- $s = str_replace( "$1", $count, wfMsg( "viewcount" ) );
-
+ if ( $wgDisableCounts ) {
+ $s = "";
+ } else {
+ $count = $wgArticle->getCount();
+ $s = str_replace( "$1", $count, wfMsg( "viewcount" ) );
+ }
$s .= $this->lastModified();
- $s .= " ".wfMsg( "gnunote" ) ;
+ $s .= " " . wfMsg( "gnunote" );
return "<span id='pagestats'>{$s}</span>";
}
mainPrefsForm( wfMsg( "badretype" ) );
return;
}
- $ep = User::encryptPassword( $wpOldpass );
+ $ep = $wgUser->encryptPassword( $wpOldpass );
if ( $ep != $wgUser->getPassword() ) {
if ( $ep != $wgUser->getNewpassword() ) {
mainPrefsForm( wfMsg( "wrongpassword" ) );
function doUpdate()
{
+ global $wgDisableCounters;
+ if ( $wgDisableCounters ) { return; }
+
$sql = "UPDATE LOW_PRIORITY cur SET cur_counter=(1+cur_counter)," .
"cur_timestamp=cur_timestamp WHERE cur_id={$this->mPageID}";
$res = wfQuery( $sql, "ViewCountUpdate::doUpdate" );