Index: trunk/phase3/includes/SpecialAncientpages.php |
— | — | @@ -0,0 +1,50 @@ |
| 2 | +<? |
| 3 | + |
| 4 | +function wfSpecialAncientpages() |
| 5 | +{ |
| 6 | + global $wgUser, $wgOut, $wgLang, $wgTitle; |
| 7 | + global $limit, $offset; # From query string |
| 8 | + $fname = "wfSpecialAncientpages"; |
| 9 | + |
| 10 | + if ( ! $limit ) { |
| 11 | + $limit = $wgUser->getOption( "rclimit" ); |
| 12 | + if ( ! $limit ) { $limit = 50; } |
| 13 | + } |
| 14 | + if ( ! $offset ) { $offset = 0; } |
| 15 | + |
| 16 | + $sql = "SELECT cur_title,cur_user,cur_user_text,cur_comment," . |
| 17 | + "cur_timestamp FROM cur " . |
| 18 | + "WHERE cur_namespace=0 AND cur_is_redirect=0 " . |
| 19 | + " ORDER BY cur_timestamp LIMIT {$offset}, {$limit}"; |
| 20 | + $res = wfQuery( $sql, $fname ); |
| 21 | + |
| 22 | + $top = wfShowingResults( $offset, $limit ); |
| 23 | + $wgOut->addHTML( "<p>{$top}\n" ); |
| 24 | + |
| 25 | + $sl = wfViewPrevNext( $offset, $limit, |
| 26 | + $wgLang->specialPage( "Ancientpages" ) ); |
| 27 | + $wgOut->addHTML( "<br>{$sl}\n" ); |
| 28 | + |
| 29 | + $sk = $wgUser->getSkin(); |
| 30 | + $s = "<ol start=" . ( $offset + 1 ) . ">"; |
| 31 | + while ( $obj = wfFetchObject( $res ) ) { |
| 32 | + $u = $obj->cur_user; |
| 33 | + $ut = $obj->cur_user_text; |
| 34 | + $c = wfEscapeHTML( $obj->cur_comment ); |
| 35 | + if ( 0 == $u ) { $ul = $ut; } |
| 36 | + else { $ul = $sk->makeLink( $wgLang->getNsText(2).":{$ut}", $ut ); } |
| 37 | + |
| 38 | + $d = $wgLang->timeanddate( $obj->cur_timestamp, true ); |
| 39 | + $link = $sk->makeKnownLink( $obj->cur_title, "" ); |
| 40 | + $s .= "<li>{$d} {$link} . . {$ul}"; |
| 41 | + |
| 42 | + if ( "" != $c && "*" != $c ) { $s .= " <em>({$c})</em>"; } |
| 43 | + $s .= "</li>\n"; |
| 44 | + } |
| 45 | + wfFreeResult( $res ); |
| 46 | + $s .= "</ol>"; |
| 47 | + $wgOut->addHTML( $s ); |
| 48 | + $wgOut->addHTML( "<p>{$sl}\n" ); |
| 49 | +} |
| 50 | + |
| 51 | +?> |
Property changes on: trunk/phase3/includes/SpecialAncientpages.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 52 | + native |
Added: svn:keywords |
2 | 53 | + Author Date Id Revision |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -250,6 +250,7 @@ |
251 | 251 | "Shortpages" => "Short articles", |
252 | 252 | "Longpages" => "Long articles", |
253 | 253 | "Newpages" => "Newly created articles", |
| 254 | + "Ancientpages" => "Oldest articles", |
254 | 255 | "Intl" => "Interlanguage links", |
255 | 256 | "Allpages" => "All pages by title", |
256 | 257 | |
— | — | @@ -817,6 +818,7 @@ |
818 | 819 | "rclsub" => "(to pages linked from \"$1\")", |
819 | 820 | "debug" => "Debug", |
820 | 821 | "newpages" => "New pages", |
| 822 | +"ancientpages" => "Oldest articles", |
821 | 823 | "intl" => "Interlanguage links", |
822 | 824 | "movethispage" => "Move this page", |
823 | 825 | "unusedimagestext" => "<p>Please note that other web sites |