X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=b23bd5a36457e036d643759acdf8e598b51a3543;hb=18403eef5bfda5c2bb4adfeafab88b2b515642d5;hp=d043b442ac56074f1a3fd57393e33b0f5e9c4d34;hpb=f8b3f04ae6d78a13b5793a0c4e3bc7080b2c72af;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index d043b442ac..b23bd5a364 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -108,7 +108,12 @@ class Title implements LinkTarget { /** @var array Array of groups allowed to edit this article */ public $mRestrictions = []; - /** @var string|bool */ + /** + * @var string|bool Comma-separated set of permission keys + * indicating who can move or edit the page from the page table, (pre 1.10) rows. + * Edit and move sections are separated by a colon + * Example: "edit=autoconfirmed,sysop:move=sysop" + */ protected $mOldRestrictions = false; /** @var bool Cascade restrictions on this page to included templates and images? */ @@ -1464,7 +1469,9 @@ class Title implements LinkTarget { public function getFragmentForURL() { if ( !$this->hasFragment() ) { return ''; - } elseif ( $this->isExternal() && !$this->getTransWikiID() ) { + } elseif ( $this->isExternal() + && !self::getInterwikiLookup()->fetch( $this->mInterwiki )->isLocal() + ) { return '#' . Sanitizer::escapeIdForExternalInterwiki( $this->getFragment() ); } return '#' . Sanitizer::escapeIdForLink( $this->getFragment() ); @@ -3044,8 +3051,10 @@ class Title implements LinkTarget { * Public for usage by LiquidThreads. * * @param array $rows Array of db result objects - * @param string $oldFashionedRestrictions Comma-separated list of page - * restrictions from page table (pre 1.10) + * @param string $oldFashionedRestrictions Comma-separated set of permission keys + * indicating who can move or edit the page from the page table, (pre 1.10) rows. + * Edit and move sections are separated by a colon + * Example: "edit=autoconfirmed,sysop:move=sysop" */ public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = null ) { $dbr = wfGetDB( DB_REPLICA ); @@ -3114,8 +3123,10 @@ class Title implements LinkTarget { /** * Load restrictions from the page_restrictions table * - * @param string $oldFashionedRestrictions Comma-separated list of page - * restrictions from page table (pre 1.10) + * @param string $oldFashionedRestrictions Comma-separated set of permission keys + * indicating who can move or edit the page from the page table, (pre 1.10) rows. + * Edit and move sections are separated by a colon + * Example: "edit=autoconfirmed,sysop:move=sysop" */ public function loadRestrictions( $oldFashionedRestrictions = null ) { if ( $this->mRestrictionsLoaded ) { @@ -4622,9 +4633,11 @@ class Title implements LinkTarget { * on the number of links. Typically called on create and delete. */ public function touchLinks() { - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks' ) ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks', 'page-touch' ) ); if ( $this->getNamespace() == NS_CATEGORY ) { - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'categorylinks' ) ); + DeferredUpdates::addUpdate( + new HTMLCacheUpdate( $this, 'categorylinks', 'category-touch' ) + ); } }