#
function doWikiPass2( $text, $linestart )
{
- global $wgUser, $wgLang, $wgMungeDates;
+ global $wgUser, $wgLang, $wgUseDynamicDates;
wfProfileIn( "OutputPage::doWikiPass2" );
$text = $this->removeHTMLtags( $text );
$text = $this->doHeadings( $text );
$text = $this->doBlockLevels( $text, $linestart );
- if($wgMungeDates)
+ if($wgUseDynamicDates) {
$text = $wgLang->replaceDates( $text );
+ }
+
$text = $this->replaceExternalLinks( $text );
$text = $this->replaceInternalLinks ( $text );
<?
function wfSpecialPreferences()
{
- global $wgUser, $wgOut, $action;
+ global $wgUser, $wgOut, $wgUseDynamicDates, $action;
global $wpSaveprefs, $wpReset;
$fields = array( "wpOldpass", "wpNewpass", "wpRetype",
/* private */ function mainPrefsForm( $err )
{
- global $wgUser, $wgOut, $wgLang;
+ global $wgUser, $wgOut, $wgLang, $wgUseDynamicDates;
global $wpQuickbar, $wpOldpass, $wpNewpass, $wpRetype;
global $wpSkin, $wpMath, $wpDate, $wpEmail, $wpEmailFlag, $wpNick, $wpSearch, $wpRecent;
global $wpRows, $wpCols, $wpSaveprefs, $wpReset, $wpHourDiff;
$yem = wfMsg( "youremail" );
$emf = wfMsg( "emailflag" );
$ynn = wfMsg( "yournick" );
- $stt = wfMsg ( "stubthreshold" ) ;
+ $stt = wfMsg ( "stubthreshold" ) ;
$srh = wfMsg( "searchresultshead" );
$rpp = wfMsg( "resultsperpage" );
$scl = wfMsg( "contextlines" );
# Various checkbox options
#
- $wgOut->addHTML( "</td><td rowspan=3 valign=top nowrap>\n" );
+ if ( $wgUseDynamicDates ) {
+ $wgOut->addHTML( "</td><td rowspan=3 valign=top nowrap>\n" );
+ } else {
+ $wgOut->addHTML( "</td><td rowspan=2 valign=top nowrap>\n" );
+ }
foreach ( $togs as $tname => $ttext ) {
if ( 1 == $wgUser->getOption( $tname ) ) {
$checked = " checked";
# Date format
#
- $wgOut->addHTML( "<tr><td valign=top nowrap><b>$dateFormat:</b><br>" );
- for ( $i = 0; $i < count( $dateopts ); ++$i) {
- if ( $i == $wpDate ) {
- $checked = " checked";
- } else {
- $checked = "";
+ if ( $wgUseDynamicDates ) {
+ $wgOut->addHTML( "<tr><td valign=top nowrap><b>$dateFormat:</b><br>" );
+ for ( $i = 0; $i < count( $dateopts ); ++$i) {
+ if ( $i == $wpDate ) {
+ $checked = " checked";
+ } else {
+ $checked = "";
+ }
+ $wgOut->addHTML( "<label><input type=radio name=\"wpDate\" ".
+ "value=\"$i\"$checked> {$dateopts[$i]}</label><br>\n" );
}
- $wgOut->addHTML( "<label><input type=radio name=\"wpDate\" value=\"$i\"$checked> {$dateopts[$i]}</label><br>\n" );
+ $wgOut->addHTML( "</td></tr>");
}
- $wgOut->addHTML( "</td></tr>");
# Textbox rows, cols
#
$nowlocal = $wgLang->time( $now = wfTimestampNow(), true );
function date( $ts, $adj = false )
{
- global $wgAmericanDates, $wgUser;
+ global $wgAmericanDates, $wgUser, $wgUseDynamicDates;
if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $datePreference = $wgUser->getOption( 'date' );
- if ( $datePreference == 0 ) {
+
+ if ( $wgUseDynamicDates ) {
+ $datePreference = $wgUser->getOption( 'date' );
+ if ( $datePreference == 0 ) {
+ $datePreference = $wgAmericanDates ? 1 : 2;
+ }
+ } else {
$datePreference = $wgAmericanDates ? 1 : 2;
}
function replaceDates( $text )
{
- global $wgUser, $wgInputEncoding;
+ global $wgUser, $wgInputEncoding, $wgUseDynamicDates;
+ # Feature can be disabled
+ if ( !$wgUseDynamicDates ) {
+ return;
+ }
+
# Setup
$datePreference = $wgUser->getOption( 'date' );