* (bug 2262) Hide math preferences when TeX is not enabled
* (bug 2267) Don't generate thumbnail at the same size as the source image.
* Fix rebuildtextindex.inc for new schema
+* Remove linkscc table code, no longer used.
=== Caveats ===
\$wgDBprefix = \"{$slconf['DBprefix']}\";
# If you're on MySQL 3.x, this next line must be FALSE:
-\$wgDBmysql4 = \$wgEnablePersistentLC = {$conf->DBmysql4};
+\$wgDBmysql4 = {$conf->DBmysql4};
## Shared memory settings
\$wgMainCacheType = $cacheType;
$u = new SquidUpdate( $urls );
array_push( $wgPostCommitUpdateList, $u );
}
-
- # Clear persistent link cache
- LinkCache::linksccClearLinksTo( $title_obj );
}
function onArticleDelete($title_obj) {
$title_obj->touchLinks();
- LinkCache::linksccClearLinksTo( $title_obj );
}
+
function onArticleEdit($title_obj) {
- LinkCache::linksccClearPage( $title_obj->getArticleID() );
+ // This would be an appropriate place to purge caches.
+ // Why's this not in here now?
}
+
/**#@-*/
/**
*/
$wgUseCategoryBrowser = false;
-$wgEnablePersistentLC = false; # Obsolete, do not use
-$wgCompressedPersistentLC = true; # use gzcompressed blobs
-$wgUseOldExistenceCheck = false; # use old prefill link method, for debugging only
-
/**
* Keep parsed pages in a cache (objectcache table, turck, or memcached)
* to speed up output of the same page viewed by another user with the
* @param Title $fromtitle
*/
function preFill( &$fromtitle ) {
- global $wgEnablePersistentLC;
-
$fname = 'LinkCache::preFill';
wfProfileIn( $fname );
return;
}
- if ( $wgEnablePersistentLC ) {
- if( $this->fillFromLinkscc( $id ) ){
- wfProfileOut( $fname );
- return;
- }
- }
if ( $this->mForUpdate ) {
$db =& wfGetDB( DB_MASTER );
$options = 'FOR UPDATE';
}
$this->mPreFilled = true;
- if ( $wgEnablePersistentLC ) {
- $this->saveToLinkscc( $id );
- }
wfProfileOut( $fname );
}
$this->mOldPageLinks = array();
}
- /**
- * @access private
- */
- function fillFromLinkscc( $id ){
- $fname = 'LinkCache::fillFromLinkscc';
-
- $id = IntVal( $id );
- if ( $this->mForUpdate ) {
- $db =& wfGetDB( DB_MASTER );
- $options = 'FOR UPDATE';
- } else {
- $db =& wfGetDB( DB_SLAVE );
- $options = '';
- }
- $raw = $db->selectField( 'linkscc', 'lcc_cacheobj', array( 'lcc_pageid' => $id ), $fname, $options );
- if ( $raw === false ) {
- return false;
- }
-
- $cacheobj = false;
- if( function_exists( 'gzuncompress' ) )
- $cacheobj = @gzuncompress( $raw );
-
- if($cacheobj == FALSE){
- $cacheobj = $raw;
- }
- $cc = @unserialize( $cacheobj );
- if( isset( $cc->mClassVer ) and ($cc->mClassVer == $this->mClassVer ) ){
- $this->mOldPageLinks = $this->mPageLinks = $cc->mPageLinks;
- $this->mOldGoodLinks = $this->mGoodLinks = $cc->mGoodLinks;
- $this->mOldBadLinks = $this->mBadLinks = $cc->mBadLinks;
- $this->mPreFilled = true;
- return TRUE;
- } else {
- return FALSE;
- }
-
- }
-
- /**
- * @access private
- */
- function saveToLinkscc( $pid ){
- global $wgCompressedPersistentLC;
- if( $wgCompressedPersistentLC and function_exists( 'gzcompress' ) ) {
- $ser = gzcompress( serialize( $this ), 3 );
- } else {
- $ser = serialize( $this );
- }
- $db =& wfGetDB( DB_MASTER );
- $db->replace( 'linkscc', array( 'lcc_pageid' ), array( 'lcc_pageid' => $pid, 'lcc_cacheobj' => $ser ) );
- }
-
- /**
- * Delete linkscc rows which link to here
- * @param $title The page linked to
- * @static
- */
- function linksccClearLinksTo( $title ){
- global $wgEnablePersistentLC;
- if ( $wgEnablePersistentLC ) {
- $fname = 'LinkCache::linksccClearLinksTo';
- $pid = intval( $pid );
- $dbw =& wfGetDB( DB_MASTER );
- # Delete linkscc rows which link to here
- $dbw->deleteJoin( 'linkscc', 'pagelinks', 'lcc_pageid', 'pl_from',
- array(
- 'pl_namespace' => $title->getNamespace(),
- 'pl-title' => $title->getDbKey() ),
- $fname );
- # Delete linkscc row representing this page
- $dbw->delete( 'linkscc', array( 'lcc_pageid' => $pid ), $fname);
- }
-
- }
-
- /**
- * @param $pid is a page id
- * @static
- */
- function linksccClearPage( $pid ){
- global $wgEnablePersistentLC;
- if ( $wgEnablePersistentLC ) {
- $pid = intval( $pid );
- $dbw =& wfGetDB( DB_MASTER );
- $dbw->delete( 'linkscc', array( 'lcc_pageid' => $pid ) );
- }
- }
-
/**
* Swaps old and current link registers
*/
function doUpdate() {
global $wgUseDumbLinkUpdate, $wgLinkCache, $wgDBtransactions;
- global $wgEnablePersistentLC, $wgUseCategoryMagic;
+ global $wgUseCategoryMagic;
if ( $wgUseDumbLinkUpdate ) {
$this->doDumbUpdate();
wfDebug( $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . "\n" );
}
-# Disable linkscc except if the old existence check method is enabled
-if (!$wgUseOldExistenceCheck) {
- $wgEnablePersistentLC = false;
-}
-
if ( $wgSkipSkin ) {
$wgSkipSkins[] = $wgSkipSkin;
}
'pl_title' => $this->getDbKey() ),
$fname );
- # Clear linkscc
- LinkCache::linksccClearLinksTo( $this );
- LinkCache::linksccClearLinksTo( $nt );
-
# Purge squid
if ( $wgUseSquid ) {
$urls = array_merge( $nt->getSquidURLs(), $this->getSquidURLs() );
$log = new LogPage( 'move' );
$log->addEntry( 'move', $this, $reason, array( 1 => $nt->getPrefixedText()) );
- # Purge squid and linkscc as per article creation
+ # Purge caches as per article creation
Article::onArticleCreate( $nt );
# Record the just-created redirect's linking to the page
*/
function updateAll() {
$this->lockTables( array(
- 'linkscc', 'objectcache', 'searchindex', 'querycache',
+ 'objectcache', 'searchindex', 'querycache',
'ipblocks', 'user', 'page', 'revision', 'recentchanges',
'brokenlinks', 'categorylinks', 'imagelinks', 'watchlist',
'image', 'oldimage', 'archive' ) );
# These are safe to clear out:
- $this->clearTable( 'linkscc' );
$this->clearTable( 'objectcache' );
# These need to be rebuild if used:
require_once( 'commandLine.inc' );
require_once( "$IP/includes/ObjectCache.php" );
+require_once( "$IP/includes/BagOStuff.php" );
require_once( "$IP/languages/LanguageUtf8.php" );
/**
function listTables() {
return array('user', 'page', 'revision', 'text',
'pagelinks', 'imagelinks', 'categorylinks',
- 'linkscc', 'site_stats', 'hitcounter',
+ 'site_stats', 'hitcounter',
'ipblocks', 'image', 'oldimage',
'recentchanges',
'watchlist', 'math', 'searchindex',
define( "PAUSE_INTERVAL", 50 );
function refreshLinks( $start ) {
- global $wgUser, $wgTitle, $wgArticle, $wgEnablePersistentLC, $wgLinkCache, $wgOut;
+ global $wgUser, $wgTitle, $wgArticle, $wgLinkCache, $wgOut;
$dbw =& wfGetDB( DB_MASTER );
$wgOut->transformBuffer( RLH_FOR_UPDATE );
$wgOut->clearHTML();
- if ( $wgEnablePersistentLC ) {
- $wgLinkCache->saveToLinkscc( $id, $dbw->strencode( $wgTitle->getPrefixedDBkey() ) );
- }
-
$linksUpdate = new LinksUpdate( $id, $wgTitle->getPrefixedDBkey() );
$linksUpdate->doDumbUpdate();
$dbw->query("COMMIT");
) TYPE=InnoDB;
---
--- Stores (possibly gzipped) serialized objects with
--- cache arrays to reduce database load slurping up
--- from links and brokenlinks.
---
-CREATE TABLE /*$wgDBprefix*/linkscc (
- lcc_pageid INT UNSIGNED NOT NULL UNIQUE KEY,
- lcc_cacheobj MEDIUMBLOB NOT NULL
-
-) TYPE=InnoDB;
-
--
-- Contains a single row with some aggregate info
-- on the state of the site.
$wgNewTables = array(
# table patch file (in maintenance/archives)
- array( 'linkscc', 'patch-linkscc.sql' ),
array( 'hitcounter', 'patch-hitcounter.sql' ),
array( 'querycache', 'patch-querycache.sql' ),
array( 'objectcache', 'patch-objectcache.sql' ),
return false;
}
-function do_linkscc_1_3_update() {
- // Update linkscc table to 1.3 schema if necessary
- global $wgDatabase, $wgVersion;
- if( $wgDatabase->tableExists( "linkscc" )
- && $wgDatabase->fieldExists( "linkscc", "lcc_title" ) ) {
- echo "Altering lcc_title field from linkscc table... ";
- dbsource( "maintenance/archives/patch-linkscc-1.3.sql", $wgDatabase );
- echo "ok\n";
- } else {
- echo "...linkscc is up to date, or does not exist. Good.\n";
- }
-}
-
function do_image_name_unique_update() {
global $wgDatabase;
if( $wgDatabase->indexExists( 'image', 'PRIMARY' ) ) {
# Do schema updates which require special handling
do_interwiki_update(); flush();
do_index_update(); flush();
- do_linkscc_1_3_update(); flush();
do_old_links_update(); flush();
do_image_name_unique_update(); flush();
do_watchlist_update(); flush();