From: Brion Vibber Date: Tue, 18 Apr 2006 07:29:10 +0000 (+0000) Subject: Code cleanup: fit in an 80-column window, avoid unneeded parens on return statement. X-Git-Tag: 1.31.0-rc.0~57436 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=62a259fb62e789fb2253cdbc5eac76b55849ed1a;p=lhc%2Fweb%2Fwiklou.git Code cleanup: fit in an 80-column window, avoid unneeded parens on return statement. --- diff --git a/includes/SpecialUnusedtemplates.php b/includes/SpecialUnusedtemplates.php index 59cd212a99..0e990b0365 100644 --- a/includes/SpecialUnusedtemplates.php +++ b/includes/SpecialUnusedtemplates.php @@ -20,26 +20,34 @@ require_once 'QueryPage.php'; class UnusedtemplatesPage extends QueryPage { function getName() { return( 'Unusedtemplates' ); } - function isExpensive() { return( true ); } - function isSyndicated() { return( false ); } - function sortDescending() { return( false ); } + function isExpensive() { return true; } + function isSyndicated() { return false; } + function sortDescending() { return false; } function getSQL() { $dbr =& wfGetDB( DB_SLAVE ); extract( $dbr->tableNames( 'page', 'templatelinks' ) ); - $sql = "SELECT 'Unusedtemplates' AS type, page_title AS title, page_namespace AS namespace, 0 AS value FROM $page LEFT JOIN $templatelinks ON page_namespace = tl_namespace AND page_title = tl_title WHERE page_namespace = 10 AND tl_from IS NULL"; - return( $sql ); + $sql = "SELECT 'Unusedtemplates' AS type, page_title AS title, + page_namespace AS namespace, 0 AS value + FROM $page + LEFT JOIN $templatelinks + ON page_namespace = tl_namespace AND page_title = tl_title + WHERE page_namespace = 10 AND tl_from IS NULL"; + return $sql; } function formatResult( $skin, $result ) { $title = Title::makeTitle( NS_TEMPLATE, $result->title ); $pageLink = $skin->makeKnownLinkObj( $title, '', 'redirect=no' ); - $wlhLink = $skin->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' ), wfMsgHtml( 'unusedtemplateswlh' ), 'target=' . $title->getPrefixedUrl() ); + $wlhLink = $skin->makeKnownLinkObj( + Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' ), + wfMsgHtml( 'unusedtemplateswlh' ), + 'target=' . $title->getPrefixedUrl() ); return( $pageLink . ' (' . $wlhLink . ')' ); } function getPageHeader() { - return( wfMsgHtml( 'unusedtemplatestext' ) ); + return wfMsgHtml( 'unusedtemplatestext' ); } }