Revision: 18996
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18996
Author: Caeies
Date: 2008-11-19 17:59:33 +0000 (Wed, 19 Nov 2008)
Log Message:
-----------
Fix accessibility things (private/public) add a read() function as others
classes
Modified Paths:
--------------
core/trunk/phpgwapi/inc/class.config.inc.php
Modified: core/trunk/phpgwapi/inc/class.config.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.config.inc.php 2008-11-19 17:58:28 UTC
(rev 18995)
+++ core/trunk/phpgwapi/inc/class.config.inc.php 2008-11-19 17:59:33 UTC
(rev 18996)
@@ -64,7 +64,7 @@
$this->appname = $this->db->db_addslashes($appname);
}
- function read_repository()
+ protected function read_repository()
{
$this->config_data = array();
@@ -83,8 +83,22 @@
}
}
- function save_repository()
+ //XXX Caeies nov08 -> possible bugs here if the config_data is
updated. Should not occurs if using the value method ?
+ /**
+ * @todo to deprecate ! (use the __get|set instead)
+ * @return array the whole config
+ */
+ public function read()
{
+ if(!count($this->config_data))
+ {
+ $this->read_repository();
+ }
+ return $this->config_data;
+ }
+
+ public function save_repository()
+ {
$config_data = $this->config_data;
if ( is_array($config_data) && count($config_data) )
@@ -113,12 +127,12 @@
}
}
- function delete_repository()
+ public function delete_repository()
{
$this->db->query("DELETE FROM phpgw_config WHERE
config_app='{$this->appname}'",__LINE__,__FILE__);
}
- function value($variable_name,$variable_data)
+ public function value($variable_name,$variable_data)
{
$this->config_data[$variable_name] = $variable_data;
}
_______________________________________________
phpGroupWare-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs