X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/d74142948db5d27a3bf144a8ee485318cc1330c3..9819bb63bec83c13dd40ebb2ffc24df5fcfeda33:/WEB-INF/lib/ttGroup.class.php diff --git a/WEB-INF/lib/ttGroup.class.php b/WEB-INF/lib/ttGroup.class.php index 9c12e95b..c6693bec 100644 --- a/WEB-INF/lib/ttGroup.class.php +++ b/WEB-INF/lib/ttGroup.class.php @@ -54,9 +54,13 @@ class ttGroup { var $password_complexity = null; // Password complexity example. var $currency = null; // Currency. var $plugins = null; // Comma-separated list of enabled plugins. + var $config = null; // Comma-separated list of miscellaneous config options. + var $configHelper = null; // An instance of ttConfigHelper class. + var $custom_logo = 0; // Whether to use a custom logo for group. var $lock_spec = null; // Cron specification for record locking. + var $holidays = null; // Holidays specification. var $workday_minutes = 480; // Number of work minutes in a regular day. var $active_users = 0; // Count of active users in group. @@ -100,17 +104,20 @@ class ttGroup { $this->currency = $val['currency']; $this->plugins = $val['plugins']; $this->lock_spec = $val['lock_spec']; + $this->holidays = $val['holidays']; $this->workday_minutes = $val['workday_minutes']; /* $this->custom_logo = $val['custom_logo']; */ + + // TODO: refactor this. $this->config = $val['config']; - $config = new ttConfigHelper($this->config); + $this->configHelper = new ttConfigHelper($val['config']); // Set user config options. - $this->show_holidays = $config->getDefinedValue('show_holidays'); - $this->punch_mode = $config->getDefinedValue('punch_mode'); - $this->allow_overlap = $config->getDefinedValue('allow_overlap'); - $this->future_entries = $config->getDefinedValue('future_entries'); + $this->show_holidays = $this->configHelper->getDefinedValue('show_holidays'); + $this->punch_mode = $this->configHelper->getDefinedValue('punch_mode'); + $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); + $this->future_entries = $this->configHelper->getDefinedValue('future_entries'); } // Determine active user count in a separate query.