define('MAG_NAMESPACE', 32);
define('MAG_TOC', 33);
define('MAG_GRAMMAR', 34);
+define('MAG_NOTITLECONVERT', 35);
+define('MAG_NOCONTENTCONVERT', 36);
+define('MAG_CURRENTWEEK', 37);
+define('MAG_CURRENTDOW', 38);
$wgVariableIDs = array(
MAG_CURRENTMONTH,
MAG_SERVER,
MAG_PAGENAME,
MAG_PAGENAMEE,
- MAG_NAMESPACE
+ MAG_NAMESPACE,
+ MAG_CURRENTWEEK,
+ MAG_CURRENTDOW
);
/**
# Initialises this object with an ID
function load( $id ) {
- global $wgLang;
+ global $wgContLang;
$this->mId = $id;
- $wgLang->getMagic( $this );
+ $wgContLang->getMagic( $this );
}
/**
$matchcount = preg_match( $this->getVariableStartToEndRegex(), $text, $matches );
if ( $matchcount == 0 ) {
return NULL;
- } elseif ( count($matches) == 1 ) {
+ } elseif ( count($matches) == 2 ) {
return $matches[0];
} else {
- return $matches[1];
+ return $matches[2];
}
}