* (bug 26160) Upload description set by extensions are not propagated
* (bug 9675) generateSitemap.php now takes an --urlpath parameter to allow
absolute URLs in the sitemap index (as required e.g. by Google)
+* Partial workaround for bug 6220: at least make files on shared repositories
+ show up as (struck-out) bluelinks instead of redlinks on Special:WantedFiles
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
$db->dataSeek( $res, 0 );
}
+ /**
+ * Should formatResult() always check page existence, even if
+ * the results are fresh? This is a (hopefully temporary)
+ * kluge for Special:WantedFiles, which may contain false
+ * positives for files that exist e.g. in a shared repo (bug
+ * 6220).
+ */
+ function forceExistenceCheck() {
+ return false;
+ }
+
/**
* Format an individual result
*
public function formatResult( $skin, $result ) {
$title = Title::makeTitleSafe( $result->namespace, $result->title );
if( $title instanceof Title ) {
- if( $this->isCached() ) {
- $pageLink = $title->exists()
+ if( $this->isCached() || $this->forceExistenceCheck() ) {
+ $pageLink = $title->isKnown()
? '<del>' . $skin->link( $title ) . '</del>'
: $skin->link(
$title,
return 'Wantedfiles';
}
+ /**
+ * KLUGE: The results may contain false positives for files
+ * that exist e.g. in a shared repo. Setting this at least
+ * keeps them from showing up as redlinks in the output, even
+ * if it doesn't fix the real problem (bug 6220).
+ */
+ function forceExistenceCheck() {
+ return true;
+ }
+
function getSQL() {
$dbr = wfGetDB( DB_SLAVE );
- list( $imagelinks, $page ) = $dbr->tableNamesN( 'imagelinks', 'page' );
+ list( $imagelinks, $image ) = $dbr->tableNamesN( 'imagelinks', 'image' );
$name = $dbr->addQuotes( $this->getName() );
return
"
il_to as title,
COUNT(*) as value
FROM $imagelinks
- LEFT JOIN $page ON il_to = page_title AND page_namespace = ". NS_FILE ."
- WHERE page_title IS NULL
+ LEFT JOIN $image ON il_to = img_name
+ WHERE img_name IS NULL
GROUP BY il_to
";
}