dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix order of @var parameter in PHP"
[lhc/web/wiklou.git]
/
includes
/
deferred
/
LinksUpdate.php
diff --git
a/includes/deferred/LinksUpdate.php
b/includes/deferred/LinksUpdate.php
index
7a31e26
..
9d3309b
100644
(file)
--- a/
includes/deferred/LinksUpdate.php
+++ b/
includes/deferred/LinksUpdate.php
@@
-122,7
+122,11
@@
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
parent::__construct();
$this->mTitle = $title;
parent::__construct();
$this->mTitle = $title;
- $this->mId = $title->getArticleID( Title::GAID_FOR_UPDATE );
+
+ if ( !$this->mId ) {
+ // NOTE: subclasses may initialize mId before calling this constructor!
+ $this->mId = $title->getArticleID( Title::GAID_FOR_UPDATE );
+ }
if ( !$this->mId ) {
throw new InvalidArgumentException(
if ( !$this->mId ) {
throw new InvalidArgumentException(
@@
-611,7
+615,8
@@
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
$nt = Title::makeTitleSafe( NS_CATEGORY, $name );
$contLang->findVariantLink( $name, $nt, true );
$nt = Title::makeTitleSafe( NS_CATEGORY, $name );
$contLang->findVariantLink( $name, $nt, true );
- $type = MWNamespace::getCategoryLinkType( $this->mTitle->getNamespace() );
+ $type = MediaWikiServices::getInstance()->getNamespaceInfo()->
+ getCategoryLinkType( $this->mTitle->getNamespace() );
# Treat custom sortkeys as a prefix, so that if multiple
# things are forced to sort as '*' or something, they'll
# Treat custom sortkeys as a prefix, so that if multiple
# things are forced to sort as '*' or something, they'll
@@
-1180,7
+1185,7
@@
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
/**
* @return IDatabase
*/
/**
* @return IDatabase
*/
- pr
ivate
function getDB() {
+ pr
otected
function getDB() {
if ( !$this->db ) {
$this->db = wfGetDB( DB_MASTER );
}
if ( !$this->db ) {
$this->db = wfGetDB( DB_MASTER );
}
@@
-1205,7
+1210,7
@@
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
}
return [
}
return [
- '
wiki' => WikiMap::getWikiIdFromDbDomain( $this->getDB()->getDomainID()
),
+ '
domain' => $this->getDB()->getDomainID(
),
'job' => new JobSpecification(
'refreshLinksPrioritized',
[
'job' => new JobSpecification(
'refreshLinksPrioritized',
[