} else {
$id = $title->getArticleID( Title::GAID_FOR_UPDATE );
$article = new Article( $title );
- $error = '';
$dbw = wfGetDB( DB_MASTER );
try {
// delete the associated article first
$this->params = $params;
}
+ /**
+ * @return Title
+ */
function getTitle() {
return $this->title;
}
}
if ( is_array( $wgSMTP ) ) {
- $found = false;
if ( function_exists( 'stream_resolve_include_path' ) ) {
$found = stream_resolve_include_path( 'Mail.php' );
} else {
*/
function getStructSize( $struct ) {
$size = 0;
- foreach ( $struct as $key => $type ) {
+ foreach ( $struct as $type ) {
if ( is_array( $type ) ) {
list( $typeName, $fieldSize ) = $type;
$size += $fieldSize;
}
public function removeIdentifierQuotes( $s ) {
- return strpos($s, '/*Q*/') === FALSE ? $s : substr($s, 5); ;
+ return strpos($s, '/*Q*/') === FALSE ? $s : substr($s, 5);
}
public function isQuotedIdentifier( $s ) {
}
// Try to grant to all the users we know exist or we were able to create
- $escPass = $this->db->addQuotes( $password );
$dbAllTables = $this->db->addIdentifierQuotes( $dbName ) . '.*';
foreach( $grantableNames as $name ) {
try {
* Compact the titles, only serialize the text form.
*/
function __sleep() {
- foreach ( $this->internals as $ns => &$nsLinks ) {
- foreach ( $nsLinks as $key => &$entry ) {
+ foreach ( $this->internals as &$nsLinks ) {
+ foreach ( $nsLinks as &$entry ) {
unset( $entry['title'] );
}
}
unset( $nsLinks );
unset( $entry );
- foreach ( $this->interwikis as $key => &$entry ) {
+ foreach ( $this->interwikis as &$entry ) {
unset( $entry['title'] );
}
unset( $entry );
* Recreate the Title objects
*/
function __wakeup() {
- foreach ( $this->internals as $ns => &$nsLinks ) {
- foreach ( $nsLinks as $key => &$entry ) {
+ foreach ( $this->internals as &$nsLinks ) {
+ foreach ( $nsLinks as &$entry ) {
$entry['title'] = Title::newFromText( $entry['pdbk'] );
}
}
wfProfileIn( __METHOD__.'-check' );
$dbr = wfGetDB( DB_SLAVE );
- $page = $dbr->tableName( 'page' );
$threshold = $this->parent->getOptions()->getStubThreshold();
# Sort by namespace
$linkcolour_ids = array();
# Generate query
- $query = false;
- $current = null;
$queries = array();
foreach ( $this->internals as $ns => $entries ) {
foreach ( $entries as $entry ) {
$this->setHeaders();
$this->outputHeader();
-
// create the form, which will also be used to execute a callback to process incoming form data
// this design is extremely dubious, but supposedly HTMLForm is our standard now?
$roundFrontVowels = array( "ө", "ү", "ö", "ü" );
$unroundBackVowels = array( "а", "ы", "я", "a", "y" );
$roundBackVowels = array( "ё", "о", "у", "ю", "o", "u" );
- $voicedPhonemes = array( "д", "б", "з", "ж", "г", "d", "b", "z", "g" );
+ //$voicedPhonemes = array( "д", "б", "з", "ж", "г", "d", "b", "z", "g" );
$unvoicedPhonemes = array( "т", "п", "с", "ш", "к", "ч", "х", "t", "p", "s", "k", "x" );
$directiveUnvoicedStems = array( "т", "п", "с", "ш", "к", "ч", "х", "л", "м", "н", "ң", "t", "p", "s", "k", "x", "l", "m", "n", "ŋ" );
$directiveVoicedStems = array( "д", "б", "з", "ж", "г", "р", "й", "d", "b", "z", "g", "r", "j" );
function resolveFailedDiff( $origText, $diff ) {
$context = array();
- $rxRange = '\d+(?:,(\d+))?';
$diffLines = explode( "\n", $diff );
for ( $i = 0; $i < count( $diffLines ); $i++ ) {
$diffLine = $diffLines[$i];
$removedLinks = array_diff( $sourceLinks, $destLinks );
// Match up the removed links with the new links
- foreach ( $newLinks as $j => $newLink ) {
+ foreach ( $newLinks as $newLink ) {
$minDistance = 100000000;
$bestRemovedLink = false;
- foreach ( $removedLinks as $k => $removedLink ) {
+ foreach ( $removedLinks as $removedLink ) {
$editDistance = levenshtein( $newLink, $removedLink );
if ( $editDistance < $minDistance ) {
$minDistance = $editDistance;
}
}
- $maxlag = intval( $maxlag );
$throttle = intval( $throttle );
if ( $begin !== '' ) {
$where = 'cl_to > ' . $dbw->addQuotes( $begin );
* array is correctly set through the FormOptions::add() function.
*/
class FormOptionsExposed extends FormOptions {
- public $options;
+ public function getOptions() {
+ return $this->options;
+ }
}
/**
'value' => null,
)
),
- $this->object->options
+ $this->object->getOptions()
);
}
'type' => FormOptions::INT,
)
),
- $this->object->options
+ $this->object->getOptions
);
}
$this->setUser( $this->userName );
global $wgUser, $wgContLang;
$wgUser = $this->user;
- $prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
$this->setTitle( NS_SPECIAL );
class PHPUnitMaintClass extends Maintenance {
public function finalSetup() {
- $settings = parent::finalSetup();
+ parent::finalSetup();
global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgUseDatabaseMessages;