/**
* Callback for usort() to do title sorts by (namespace, title)
*
- * @param Title $a
- * @param Title $b
+ * @param LinkTarget $a
+ * @param LinkTarget $b
*
* @return int Result of string comparison, or namespace comparison
*/
- public static function compare( $a, $b ) {
+ public static function compare( LinkTarget $a, LinkTarget $b ) {
if ( $a->getNamespace() == $b->getNamespace() ) {
return strcmp( $a->getText(), $b->getText() );
} else {
* This clears some fields in this object, and clears any associated
* keys in the "bad links" section of the link cache.
*
- * - This is called from WikiPage::doEdit() and WikiPage::insertOn() to allow
+ * - This is called from WikiPage::doEditContent() and WikiPage::insertOn() to allow
* loading of the new page_id. It's also called from
* WikiPage::doDeleteArticleReal()
*
$conds + [ 'page_touched < ' . $dbw->addQuotes( $dbTimestamp ) ],
$fname
);
+ MediaWikiServices::getInstance()->getLinkCache()->invalidateTitle( $this );
}
),
DeferredUpdates::PRESEND