new non-stub Indonesian language file
[mediawiki.git] / includes / SpecialUnusedimages.php
blob77bce4d9047e3861121c042eba4f3ecd1302c704
1 <?php
2 /**
4 * @package MediaWiki
5 * @subpackage SpecialPage
6 */
8 /** */
9 require_once("QueryPage.php");
11 /**
14 class UnusedimagesPage extends QueryPage {
16 function getName() {
17 return 'Unusedimages';
20 function sortDescending() {
21 return false;
24 function getSQL() {
25 $dbr =& wfGetDB( DB_SLAVE );
26 extract( $dbr->tableNames( 'image','imagelinks' ) );
28 return 'SELECT img_name as title, img_user, img_user_text, img_timestamp as value, img_description' .
29 ' FROM '.$image.' LEFT JOIN '.$imagelinks.' ON img_name=il_to WHERE il_to IS NULL ';
32 function formatResult( $skin, $result ) {
33 global $wgLang;
34 $title = Title::makeTitle( NS_IMAGE, $result->title );
35 $ins = $wgLang->getNsText(NS_IMAGE);
37 $return =
38 # The 'desc' linking to the image page
39 '('.$skin->makeKnownLink( $ins.':'.$result->title, wfMsg('imgdesc') ).') '
40 # Link to the image itself
41 . '<a href="'.Image::wfImageUrl($title->getText()).'">'.$title->getText().'</a>'
42 # Last modified date
43 . ' . . '.$wgLang->timeanddate($result->value)
44 # Link to username
45 . ' . . '.$skin->makeLink($wgLang->getNsText(NS_USER).':'.$result->img_user_text,$result->img_user_text);
47 # If there is a description, show it
48 if($result->img_description != '') {
49 $return .= ' <em>('.$result->img_description.')</em>';
51 return $return;
54 function getPageHeader() {
55 return wfMsg( "unusedimagestext" );
60 /**
61 * Entry point
63 function wfSpecialUnusedimages() {
64 list( $limit, $offset ) = wfCheckLimits();
65 $uip = new UnusedimagesPage();
67 return $uip->doQuery( $offset, $limit );