other users.
* Add an ID if 'missingsummary' is triggered to allow styling of the summary
line
+
=== Bug fixes in 1.15 ===
* (bug 16968) Special:Upload no longer throws useless warnings.
* (bug 17000) Special:RevisionDelete now checks if the database is locked
* (bug 1061) CSS-added icons next to links display through the text and makes
it unreadable in RTL
* Special:Wantedtemplates now works on PostgreSQL
+* (bug 14414) maintenance/updateSpecialPages.php no longer throws error with
+ PostgreSQL
== API changes in 1.15 ==
* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
* Clear the cache and save new results
*/
function recache( $limit, $ignoreErrors = true ) {
- $fname = get_class($this) . '::recache';
+ $fname = get_class( $this ) . '::recache';
$dbw = wfGetDB( DB_MASTER );
$dbr = wfGetDB( DB_SLAVE, array( $this->getName(), 'QueryPage::recache', 'vslow' ) );
if ( !$dbw || !$dbr ) {
$dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname );
# Do query
$sql = $this->getSQL() . $this->getOrder();
- if ($limit !== false)
- $sql = $dbr->limitResult($sql, $limit, 0);
- $res = $dbr->query($sql, $fname);
+ if ( $limit !== false )
+ $sql = $dbr->limitResult( $sql, $limit, 0 );
+ $res = $dbr->query( $sql, $fname );
$num = false;
if ( $res ) {
$num = $dbr->numRows( $res );
$insertSql .= ',';
}
if ( isset( $row->value ) ) {
- $value = $row->value;
+ $value = intval( $row->value ); // @bug 14414
} else {
$value = 0;
}
function isSyndicated() { return false; }
function getSQL() {
- global $wgCountCategorizedImagesAsUsed;
+ global $wgCountCategorizedImagesAsUsed, $wgDBtype;
$dbr = wfGetDB( DB_SLAVE );
+ $epoch = $wgDBtype == 'mysql' ?
+ 'UNIX_TIMESTAMP(img_timestamp)' :
+ 'EXTRACT(epoch FROM img_timestamp)';
+
if ( $wgCountCategorizedImagesAsUsed ) {
list( $page, $image, $imagelinks, $categorylinks ) = $dbr->tableNamesN( 'page', 'image', 'imagelinks', 'categorylinks' );
- return "SELECT 'Unusedimages' as type, 6 as namespace, img_name as title, img_timestamp as value,
+ return "SELECT 'Unusedimages' as type, 6 as namespace, img_name as title, $epoch as value,
img_user, img_user_text, img_description
FROM ((($page AS I LEFT JOIN $categorylinks AS L ON I.page_id = L.cl_from)
LEFT JOIN $imagelinks AS P ON I.page_title = P.il_to)
} else {
list( $image, $imagelinks ) = $dbr->tableNamesN( 'image','imagelinks' );
- return "SELECT 'Unusedimages' as type, 6 as namespace, img_name as title, img_timestamp as value,
+ return "SELECT 'Unusedimages' as type, 6 as namespace, img_name as title, $epoch as value,
img_user, img_user_text, img_description
FROM $image LEFT JOIN $imagelinks ON img_name=il_to WHERE il_to IS NULL ";
}
}
function getPageHeader() {
- return wfMsgExt( 'unusedimagestext', array( 'parse') );
+ return wfMsgExt( 'unusedimagestext', array( 'parse' ) );
}
}