Permalink
Browse files

SAK-20328 Tab preferences uses previous value for range validation an…

…d upper limit isn't inclusive.

git-svn-id: https://source.sakaiproject.org/svn/user/branches/sakai-2.8.x@93828 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information...
1 parent d4ad76d commit ee2587b0af72a9ce022f622cb860a70336dcc903 matthew.buckett@oucs.ox.ac.uk committed Jun 15, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/UserPrefsTool.java
@@ -382,11 +382,11 @@ public void setTabCount( String count )
// make sure this is a valid number
int countInt;
try {
- countInt = Integer.parseInt(prefTabCount);
+ countInt = Integer.parseInt(count);
} catch (NumberFormatException e) {
countInt = DEFAULT_TAB_COUNT;
}
- if ( countInt > 0 && countInt >= DEFAULT_TAB_COUNT && countInt < MAX_TAB_COUNT ) {
+ if ( countInt > 0 && countInt >= DEFAULT_TAB_COUNT && countInt <= MAX_TAB_COUNT ) {
this.prefTabCount = count;
} else {
this.prefTabCount = String.valueOf(DEFAULT_TAB_COUNT);

0 comments on commit ee2587b

Please sign in to comment.