From: Matteo Nastasi (mop) Date: Wed, 20 Nov 2013 07:21:17 +0000 (+0100) Subject: add lice_vers field in db and managed by associated class (read only) X-Git-Tag: v4.11.0~27 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=aa98b7f65908a7b9e6a7bacf2c1672999eba1992;p=brisk.git add lice_vers field in db and managed by associated class (read only) --- diff --git a/TODO.txt b/TODO.txt index 9fad55f..3f4974f 100644 --- a/TODO.txt +++ b/TODO.txt @@ -6,9 +6,10 @@ - AUTO-MAINTENANCE . policy acceptance . policy version - . user policy acceptance (db field) + WIP . user policy acceptance (db field) . show licence ([show me later, yes, no]/[yes, no]) . switch-off date + . opt - button on when arrived to the bottom of the licence . show guaranteer diff --git a/sql/sql.d/062-guar-policy-expire.sql b/sql/sql.d/062-guar-policy-expire.sql new file mode 100644 index 0000000..76d568c --- /dev/null +++ b/sql/sql.d/062-guar-policy-expire.sql @@ -0,0 +1,3 @@ +-- add current licence version accepted by users +ALTER TABLE #PFX#users DROP COLUMN lice_vers; +ALTER TABLE #PFX#users ADD COLUMN lice_vers text DEFAULT ''; -- current accepted licence version diff --git a/web/Obj/dbase_base.phh b/web/Obj/dbase_base.phh index 3cb94d8..d8bc1d7 100644 --- a/web/Obj/dbase_base.phh +++ b/web/Obj/dbase_base.phh @@ -31,8 +31,9 @@ class LoginDBItem { var $type; var $last_dona; var $supp_comp; + var $lice_vers; - function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp) + function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp, $lice_vers) { $this->code = $code; $this->login = $login; @@ -41,13 +42,14 @@ class LoginDBItem { $this->type = $type; $this->last_dona = $last_dona; $this->supp_comp = $supp_comp; + $this->lice_vers = $lice_vers; } static function LoginDBItemFromRecord($rec) { $ret = new LoginDBItem($rec->code, $rec->login, $rec->pass, $rec->email, $rec->type, $rec->last_dona, - $rec->supp_comp); + $rec->supp_comp, $ret->lice_vers); return ($ret); } @@ -87,6 +89,11 @@ class LoginDBItem { return $this->supp_comp; } + function lice_vers_get() + { + return $this->lice_vers; + } + } ?> \ No newline at end of file