tableName( 'page' );
$revision = $db->tableName( 'revision' );
return
"SELECT 'PageCreateOrder' AS type,a.page_namespace AS namespace,a.page_title AS title,
UNIX_TIMESTAMP(MIN(b.rev_timestamp)) AS value,rev_user_text AS user
FROM $page a, $revision b
WHERE a.page_id=b.rev_page AND a.page_namespace=".NS_MAIN." AND a.page_is_redirect=0
GROUP BY page_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, $wgContLang->convert( $title->getPrefixedText() ) );
$user = ''.$result->user.'';
return "{$link} (started on {$d} by $user)";
}
}
function wfExtensionSpecialPageCreateOrder() {
global $wgMessageCache;
$wgMessageCache->addMessages(array('pagecreateorder' => 'List Pages by Creation Date')); //will expand
SpecialPage::addPage( new SpecialPage( 'PageCreateOrder' ) );
}
?>