* ResourceLoaderFileModule#getAllStyleFiles now returns all style files and all
skin style files used by the module.
* Removed getLang() from IContextSource and subclasses. (deprecated since 1.19)
+* Removed setLang() from subclasses of IContextSource. (deprecated since 1.19)
* Removed WebRequest::escapeAppendQuery(). (deprecated since 1.20)
* Removed info(), purge(), revert() and rollback() from the Article class; they
have since become subclasses of the Action class. (deprecated since 1.19)
*/
protected function getWithPrefix( $prefix, $name ) {
$var = $prefix . $name;
- if ( !isset( $GLOBALS[ $var ] ) ) {
+ if ( !array_key_exists( $var, $GLOBALS ) ) {
throw new ConfigException( __METHOD__ . ": undefined variable: '$var'" );
}
return $GLOBALS[ $var ];
}
}
- /**
- * Set the Language object
- *
- * @deprecated since 1.19 Use setLanguage instead
- * @param Language|string $l Language instance or language code
- */
- public function setLang( $l ) {
- wfDeprecated( __METHOD__, '1.19' );
- $this->setLanguage( $l );
- }
-
/**
* Set the Language object
*
return $code;
}
- /**
- * Set the Language object
- *
- * @deprecated since 1.19 Use setLanguage instead
- * @param Language|string $l Language instance or language code
- */
- public function setLang( $l ) {
- wfDeprecated( __METHOD__, '1.19' );
- $this->setLanguage( $l );
- }
-
/**
* Set the Language object
*
wfProfileIn( __METHOD__ );
$page = WikiPage::newFromId( $this->id, WikiPage::READ_LATEST );
- $indexTitle = $this->indexTitle();
foreach ( SearchEngine::getSearchTypes() as $type ) {
$search = SearchEngine::create( $type );
+ $indexTitle = $this->indexTitle( $search );
if ( !$search->supports( 'search-update' ) ) {
continue;
}
*
* @return string A stripped-down title string ready for the search index
*/
- private function indexTitle() {
+ private function indexTitle( SearchEngine $search ) {
global $wgContLang;
$ns = $this->title->getNamespace();
$title = $this->title->getText();
- $lc = SearchEngine::legalSearchChars() . '&#;';
+ $lc = $search->legalSearchChars() . '&#;';
$t = $wgContLang->normalizeForSearch( $title );
$t = preg_replace( "/[^{$lc}]+/", ' ', $t );
$t = $wgContLang->lc( $t );
$this->db = wfGetDB( DB_SLAVE );
}
}
+
+ /**
+ * Return a 'cleaned up' search string
+ *
+ * @param string $text
+ * @return string
+ */
+ protected function filter( $text ) {
+ $lc = $this->legalSearchChars();
+ return trim( preg_replace( "/[^{$lc}]/", " ", $text ) );
+ }
}
return $formatted;
}
- /**
- * Return a 'cleaned up' search string
- *
- * @param string $text
- * @return string
- */
- function filter( $text ) {
- $lc = $this->legalSearchChars();
- return trim( preg_replace( "/[^{$lc}]/", " ", $text ) );
- }
-
/**
* Load up the appropriate search engine class for the currently
* active database backend, and return a configured instance.
return $this->mRestriction;
}
- /**
- * Get the file which will be included by SpecialPage::execute() if your extension is
- * still stuck in the past and hasn't overridden the execute() method. No modern code
- * should want or need to know this.
- * @return string
- * @deprecated since 1.18
- */
- function getFile() {
- wfDeprecated( __METHOD__, '1.18' );
-
- return $this->mFile;
- }
-
// @todo FIXME: Decide which syntax to use for this, and stick to it
/**
* Whether this special page is listed in Special:SpecialPages
us_status varchar(50) not null,
- -- file properties from File::getPropsFromPath. these may prove unnecessary.
+ -- file properties from FSFile::getProps(). these may prove unnecessary.
--
us_size int unsigned NOT NULL,
- -- this hash comes from File::sha1Base36(), and is 31 characters
+ -- this hash comes from FSFile::getSha1Base36(), and is 31 characters
us_sha1 varchar(31) NOT NULL,
us_mime varchar(255),
-- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table
-- chunk counter starts at 0, current offset is stored in us_size
us_chunk_inx int NULL,
- -- Serialized file properties from File::getPropsFromPath
+ -- Serialized file properties from FSFile::getProps()
us_props nvarchar(max),
-- file size in bytes
us_size int NOT NULL,
- -- this hash comes from File::sha1Base36(), and is 31 characters
+ -- this hash comes from FSFile::getSha1Base36(), and is 31 characters
us_sha1 nvarchar(31) NOT NULL,
us_mime nvarchar(255),
-- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table
-- chunk counter starts at 0, current offset is stored in us_size
us_chunk_inx int unsigned NULL,
- -- Serialized file properties from File::getPropsFromPath
+ -- Serialized file properties from FSFile::getProps()
us_props blob,
-- file size in bytes
us_size int unsigned NOT NULL,
- -- this hash comes from File::sha1Base36(), and is 31 characters
+ -- this hash comes from FSFile::getSha1Base36(), and is 31 characters
us_sha1 varchar(31) NOT NULL,
us_mime varchar(255),
-- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table