r119 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r118‎ | r119 | r120 >
Date:14:37, 11 February 2002
Author:magnus_manske
Status:old
Tags:
Comment:
# of Recent Changes as user preference
Modified paths:
  • /trunk/phpwiki/fpw/special_editusersettings.php (modified) (history)
  • /trunk/phpwiki/fpw/special_recentchanges.php (modified) (history)
  • /trunk/phpwiki/fpw/wikiTextEn.php (modified) (history)
  • /trunk/phpwiki/fpw/wikiUser.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/wikiUser.php
@@ -140,6 +140,7 @@
141141 if ( $this->options["encoding"] == "") $this->options["encoding"] = 0;
142142 if ( $this->options["numberHeadings"] == "" ) $this->options["numberHeadings"] = "no" ;
143143 if ( $this->options["viewFrames"] == "" ) $this->options["viewFrames"] = "no" ;
 144+ if ( $this->options["viewRecentChanges"] == "" ) $this->options["viewRecentChanges"] = "50" ;
144145
145146 # if ( $this->options["showStructure"] == "" ) # NO SUBPAGES ANYMORE
146147 $this->options["showStructure"] = "no" ;
Index: trunk/phpwiki/fpw/special_editusersettings.php
@@ -9,7 +9,7 @@
1010
1111 if ( isset ( $ButtonSave ) ) {
1212 unset ( $ButtonSave ) ;
13 - global $QuickBar , $NewTopics , $UnderlineLinks , $ShowHover , $ROWS , $COLS , $doSkin ;
 13+ global $QuickBar , $NewTopics , $UnderlineLinks , $ShowHover , $ROWS , $COLS , $doSkin , $VIEWRC ;
1414 global $OLDPASSWORD , $NEWPASSWORD , $RETYPEPASSWORD , $EMAIL , $RESULTSPERPAGE , $doJustify , $ChangesLayout ;
1515 global $SHOWSTRUCTURE , $HOURDIFF , $NumberHeadings , $ViewFrames , $encoding , $HideMinor ;
1616 if ( $RESULTSPERPAGE < 2 ) $RESULTSPERPAGE = 20 ;
@@ -40,6 +40,7 @@
4141 $user->email = $EMAIL ;
4242 $user->options["hourDiff"] = $HOURDIFF ;
4343 $user->options["encoding"] = $encoding ;
 44+ $user->options["viewRecentChanges"] = $VIEWRC ;
4445
4546 if ( $OLDPASSWORD == $user->password ) {
4647 global $wikiUserSettingsNewPasswordError ;
@@ -52,7 +53,7 @@
5354 $msg = $wikiUserSettingsSaved ;
5455 }
5556
56 - global $wikiLoggedInAs , $wikiID_Help ;
 57+ global $wikiLoggedInAs , $wikiID_Help , $wikiViewRecentChanges ;
5758 global $wikiQuickBarSettings , $wikiSettingsNone , $wikiSettingsStandard , $wikiSettingsLeft , $wikiSettingsRight ;
5859 global $wikiOldPassword , $wikiNewPassword , $wikiYourPasswordAgain , $wikiSkin , $wikiStarTrek ;
5960 global $wikiShowHoverBox , $wikiUnderlineLinks , $wikiNewTopicsRed , $wikiJustifyParagraphs , $wikiShowRecentChangesTable ;
@@ -142,7 +143,9 @@
143144 $n = explode ( "$1" , $wikiResultsPerPage ) ;
144145 $ret .= "<font face=courier>".$n[0]."</font><INPUT TYPE=text NAME=RESULTSPERPAGE VALUE=\"".$user->options["resultsPerPage"]."\" SIZE=4>".$n[1]."<br>\n" ;
145146 $n = explode ( "$1" , $wikiTimeDiff ) ;
146 - $ret .= "<font face=courier>".$n[0]."</font><INPUT TYPE=text NAME=HOURDIFF VALUE=\"".$user->options["hourDiff"]."\" SIZE=4>".$n[1]."\n" ;
 147+ $ret .= "<font face=courier>".$n[0]."</font><INPUT TYPE=text NAME=HOURDIFF VALUE=\"".$user->options["hourDiff"]."\" SIZE=4>".$n[1]."<br>\n" ;
 148+ $n = explode ( "$1" , $wikiViewRecentChanges ) ;
 149+ $ret .= "<font face=courier>".$n[0]."</font><INPUT TYPE=text NAME=VIEWRC VALUE=\"".$user->options["viewRecentChanges"]."\" SIZE=4>".$n[1]."\n" ;
147150
148151 # Encoding
149152 if(count($wikiEncodingNames) > 1) {
Index: trunk/phpwiki/fpw/special_recentchanges.php
@@ -7,7 +7,8 @@
88 global $wikiRecentChangesLastDays , $wikiRecentChangesSince , $wikiViewLastDays , $wikiViewMaxNum , $wikiListOnlyNewChanges ;
99 $vpage->special ( $wikiRecentChangesTitle ) ;
1010 $vpage->makeSecureTitle() ;
11 - if ( !isset ( $maxcnt ) ) $maxcnt = 50 ;
 11+ if ( !isset ( $maxcnt ) ) $maxcnt = $user->options["viewRecentChanges"] ;
 12+ if ( $maxcnt == "" ) $maxcnt = 50 ;
1213 if ( !isset ( $daysAgo ) ) $daysAgo = 3 ;
1314
1415 $from2 = substr ( $from , 0 , 4 ) . "-" . substr ( $from , 4 , 2 ) . "-" . substr ( $from , 6 , 2 ) ;
Index: trunk/phpwiki/fpw/wikiTextEn.php
@@ -214,6 +214,7 @@
215215 $wikiYourEmail = "Your email : " ;
216216 $wikiResultsPerPage = "Return up to $1 search results per page" ;
217217 $wikiTimeDiff = "Time diff. : $1 hours" ;
 218+$wikiViewRecentChanges = "See the last $1 changes on ''Recent Changes''" ;
218219 $wikiOutputEncoding = "Output encoding : ";
219220
220221 # Misc

Status & tagging log