From 25c015d22ace86c3b81ce4a87e37068d48f5e6d6 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 20 Nov 2014 15:36:44 +0000 Subject: [PATCH] authzgroups : Add titles in Objects git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1870 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- authzgroups.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/authzgroups.php b/authzgroups.php index fec22a2..e5191d5 100644 --- a/authzgroups.php +++ b/authzgroups.php @@ -126,6 +126,10 @@ class authzgroups "comment"=> array ("varchar", "255")); $this->dbObject->primary = "idobject"; $this->dbObject->unique = array ("idobject", array ("object", "module")); + $this->dbObject->titles = array ("idobject"=>_("idobject"), + "module"=>_("Module"), + "object"=>_("Object"), + "comment"=>_("Comment")); $this->dbGroup = new dblayer ($dsn, $username, $password, $driver_options); $this->dbGroup->debug = $this->debug; @@ -270,6 +274,20 @@ class authzgroups return $this->dbObject->read ($select); } + /** Return an array containing the titles of the table translating in the user + language */ + public function objectTitles () + { + return $this->dbObject->titles; + } + + /** Check if the provided datas are compilant with the object specification + @return array The errors found in the datas */ + public function objectVerify ($datas, $idobject=false) + { + return $this->dbObject->verify ($datas, $idobject); + } + //////////////// // GROUPS // ////////////////