/* private */ function getKey( $title ) {
global $wgDBname;
- return "$wgDBname:lc:title:$title";
+ return $wgDBname.':lc:title:'.$title;
}
function LinkCache()
$id = $this->getGoodLinkID( $title );
if ( 0 != $id ) { return $id; }
- $fname = "LinkCache::addLinkObj";
+ $fname = 'LinkCache::addLinkObj';
wfProfileIn( $fname );
$ns = $nt->getNamespace();
$t = $nt->getDBkey();
- if ( "" == $title ) {
+ if ( '' == $title ) {
wfProfileOut( $fname );
return 0;
}
{
global $wgEnablePersistentLC;
- $fname = "LinkCache::preFill";
+ $fname = 'LinkCache::preFill';
wfProfileIn( $fname );
# Note -- $fromtitle is a Title *object*
}
$cacheobj = false;
- if( function_exists( "gzuncompress" ) )
+ if( function_exists( 'gzuncompress' ) )
$cacheobj = @gzuncompress( $raw );
if($cacheobj == FALSE){
/* private */ function saveToLinkscc( $pid ){
global $wgCompressedPersistentLC;
- if( $wgCompressedPersistentLC and function_exists( "gzcompress" ) ) {
+ if( $wgCompressedPersistentLC and function_exists( 'gzcompress' ) ) {
$ser = gzcompress( serialize( $this ), 3 );
} else {
$ser = serialize( $this );
/* static */ function linksccClearLinksTo( $pid ){
global $wgEnablePersistentLC;
if ( $wgEnablePersistentLC ) {
- $fname = "LinkCache::linksccClearLinksTo";
+ $fname = 'LinkCache::linksccClearLinksTo';
$pid = intval( $pid );
$dbw =& wfGetDB( DB_MASTER );
# Delete linkscc rows which link to here