cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ovi...@apache.org
Subject cvs commit: xml-cocoon2/src/webapp/samples/flow/examples/prefs prefs.js
Date Thu, 09 Jan 2003 05:49:17 GMT
ovidiu      2003/01/08 21:49:17

  Modified:    src/webapp/samples/flow/examples/prefs prefs.js
  Log:
  Let the "user" variable undefined and check for the undefined value rather than the null
one.
  
  Revision  Changes    Path
  1.4       +4 -4      xml-cocoon2/src/webapp/samples/flow/examples/prefs/prefs.js
  
  Index: prefs.js
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/flow/examples/prefs/prefs.js,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- prefs.js	4 Dec 2002 11:25:40 -0000	1.3
  +++ prefs.js	9 Jan 2003 05:49:17 -0000	1.4
  @@ -15,7 +15,7 @@
   // existing ones.
   var userRegistry = Packages.samples.flow.prefs.logic.UserRegistry.getUserRegistry();
   
  -var user = null;
  +var user;
   
   // This top-level function is called from the sitemap to start the
   // process of registering a user.
  @@ -130,7 +130,7 @@
   
       user = userRegistry.getUserWithLogin(login, password);
       
  -    if (user != null)
  +    if (user != undefined)
         break;
       else {
         // TODO: I18N
  @@ -158,7 +158,7 @@
   // happens the user is redirected to the login page first.
   function edit()
   {
  -  if (user == null)
  +  if (user == undefined)
       login("Please login before continuing");
   
     var login = user.login;
  @@ -219,6 +219,6 @@
   
   function logout()
   {
  -  user = null;
  +  user = undefined;
     login("You're successfully logged out. Please log in to continue");
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message