From 183851b06bd6c52f3cae5375f433da720d410447 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 18:12:39 +0000 Subject: MediaWiki 1.7.1 wiederhergestellt --- includes/SpecialAncientpages.php | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 includes/SpecialAncientpages.php (limited to 'includes/SpecialAncientpages.php') diff --git a/includes/SpecialAncientpages.php b/includes/SpecialAncientpages.php new file mode 100644 index 00000000..39a3c8ea --- /dev/null +++ b/includes/SpecialAncientpages.php @@ -0,0 +1,65 @@ +tableName( 'page' ); + $revision = $db->tableName( 'revision' ); + #$use_index = $db->useIndexClause( 'cur_timestamp' ); # FIXME! this is gone + $epoch = $wgDBtype == 'mysql' ? 'UNIX_TIMESTAMP(rev_timestamp)' : + 'EXTRACT(epoch FROM rev_timestamp)'; + return + "SELECT 'Ancientpages' as type, + page_namespace as namespace, + page_title as title, + $epoch as value + FROM $page, $revision + WHERE page_namespace=".NS_MAIN." AND page_is_redirect=0 + AND page_latest=rev_id"; + } + + function sortDescending() { + return false; + } + + function formatResult( $skin, $result ) { + global $wgLang, $wgContLang; + + $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true ); + $title = Title::makeTitle( $result->namespace, $result->title ); + $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); + return wfSpecialList($link, $d); + } +} + +function wfSpecialAncientpages() { + list( $limit, $offset ) = wfCheckLimits(); + + $app = new AncientPagesPage(); + + $app->doQuery( $offset, $limit ); +} + +?> -- cgit v1.2.3-54-g00ecf