sanityzed record class fields access
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 27 Nov 2013 17:55:43 +0000 (18:55 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 27 Nov 2013 17:55:43 +0000 (18:55 +0100)
web/Obj/brisk.phh
web/Obj/dbase_base.phh
web/Obj/user.phh

index 7fa2f36..20e6e3a 100644 (file)
@@ -759,7 +759,7 @@ class Client_prefs {
         fprintf(STDERR, "QQ %s: %x\n", __FUNCTION__, $user->flags);
         $this->listen = ($user->flags & USER_FLAG_MAP_AUTH) >> 2;
         if ($user->rec != FALSE) {
-            $this->supp_comp = $user->rec->supp_comp;
+            $this->supp_comp = $user->rec->supp_comp_get();
         }
         else {
             $this->supp_comp = "000000000000";
@@ -811,7 +811,7 @@ class Client_prefs {
         fprintf(STDERR, "QQ %s::%s %x\n", __CLASS__, __FUNCTION__,
                 $user->flags);
         if ($user->is_supp_custom()) {
-            $user->rec->supp_comp = $this->supp_comp;
+            $user->rec->supp_comp_set($this->supp_comp);
         }
         if ($is_save)
             $user->store_set();
@@ -2262,7 +2262,7 @@ class Room
 
       // sql record exists AND last donate > 2013-01-01
       if ($this->user[$i]->is_supp_custom()) {
-          $supp_comp_s = sprintf(', "%s"', $this->user[$i]->rec->supp_comp);
+          $supp_comp_s = sprintf(', "%s"', $this->user[$i]->rec->supp_comp_get());
       }
       else {
           $supp_comp_s = '';
@@ -2310,7 +2310,7 @@ class Room
         
         log_main($user_cur->name. sprintf(" IN TABLE [%d]", $table_idx));
         if ($user_cur->is_supp_custom())
-            $supp_comp_s = sprintf(', "%s"', $user_cur->rec->supp_comp);
+            $supp_comp_s = sprintf(', "%s"', $user_cur->rec->supp_comp_get());
         else
             $supp_comp_s = '';
 
index 2464f81..ab20e6c 100644 (file)
@@ -90,6 +90,10 @@ class LoginDBItem {
     {
         return $this->supp_comp;
     }
+    function supp_comp_set($supp_comp)
+    {
+        $this->supp_comp = $supp_comp;
+    }
 
     function lice_vers_get()
     {
index 80d3ce9..8ae6b32 100644 (file)
@@ -322,7 +322,7 @@ class User {
           return FALSE;
       }
       return ($bdb->user_prefs_update($this->code, ($this->flags & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
-                                      $this->rec->supp_comp));
+                                      $this->rec->supp_comp_get()));
   }
 
   function rd_data_set($curtime, $transp, $enc, $stat, $subst, $step, $from)
@@ -818,7 +818,7 @@ function is_supp_custom()
             return (TRUE);
         }
         /*
-          if ($this->rec->last_dona > 1356994800) {
+          if ($this->rec->last_dona_get() > 1356994800) {
               return (TRUE);
           }
         */