Suggestion: Booleans and Language
Page 1 of 1

Author:  langtee [ Wed Apr 04, 2012 5:55 pm ]
Post subject:  Suggestion: Booleans and Language

I just realized when looking into the result for a user on a machine, that OAv2 writes "True", "False", "Wahr", "Falsch" into sys_sw_user.user_password_changeable depending on the language the system which was audited is running.

That is surely no bug but perhaps something to improve because it would make evaluating the results via sql quite easier if boolean values would appear all in the same language (english)

Is there a way to improve the script that it already sends true or false via xml or if not

perhaps a function which converts expected Boolean Values into an english string could make sense. Perhaps something like:
function convertboolStringToEnglish ($input)
      $fsReturn = $input;
      if (strtolower($input)=="wahr")
         $fsReturn = "True";
      if (strtolower($input) == "falsch")
         $fsReturn = "False";
      return $fsreturn;

and then modifying the insert commands
               sys_sw_user (   
               first_timestamp )
            VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,? )";
         $data = array("$details->system_id",

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group