Ignore:
Timestamp:
2009-10-08T18:32:03+13:00 (13 years ago)
Author:
ak19
Message:

Cosmetic adjustments to the code (use of curly brackets on single-line if and else statements).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/recpt/authenaction.cpp

    r15589 r20798  
    154154  // no need to go further unless authentication is
    155155  // required by this page
    156   if (args["uan"].empty()) return true;
     156  if (args["uan"].empty()) {
     157    return true;
     158  }
    157159
    158160  // failure means we have to redirect to this action to get authentication
     
    169171  // do any authentication
    170172  args_ua.clear(); // default = false;
    171   if (args_un.empty() || args_pw.empty()) args_us = "invalid";
    172   else args_us = "failed";
     173  if (args_un.empty() || args_pw.empty()) {
     174    args_us = "invalid";
     175  }
     176  else {
     177    args_us = "failed";
     178  }
    173179
    174180  // make sure we have a username                                                                                                 
     
    177183    if (!args_pw.empty()) {
    178184      // we are authenticating using a password
    179       if (user_database->check_passwd (thisuser.username, args_pw) == ERRNO_SUCCEED) args_ua = "1"; // succeeded
     185      if (user_database->check_passwd (thisuser.username, args_pw) == ERRNO_SUCCEED) {
     186    args_ua = "1"; // succeeded
     187      }
    180188     
    181189    } else if (!args_ky.empty()) {
    182190      // we are authenticating using a key
    183       if (key_database->check_key(thisuser, args_ky, args_ug, keydecay)) args_ua = "1";
    184       else args_us = "stalekey";
     191      if (key_database->check_key(thisuser, args_ky, args_ug, keydecay)) {
     192    args_ua = "1";
     193      }
     194      else {
     195    args_us = "stalekey";
     196      }
    185197    }
    186198  }
     
    197209      if (!args_ug.empty()) {
    198210
    199      // Since we recieve a comma seperated list
     211     // Since we receive a comma separated list
    200212     // of groups like mygroup,yourgroup,ourgroup
    201213     // we want to split them into individual groups
     
    261273    // need to save the current arguments in "er"
    262274    text_t &arg_er = args["er"];
    263     if (!compress_save_args(argsinfo, saveconf, args, arg_er, outconvert, logout))
     275    if (!compress_save_args(argsinfo, saveconf, args, arg_er, outconvert, logout)) {
    264276      arg_er.clear();
     277    }
    265278   
    266279    // needs to be decoded for use within forms
Note: See TracChangeset for help on using the changeset viewer.