Skip to content
Snippets Groups Projects
Commit 068e9f67 authored by Michael's avatar Michael
Browse files

Merge remote-tracking branch 'osticket-develop/develop' into patch-17

parents fdb043ef 6e0e6c57
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,10 @@ class Config { ...@@ -30,6 +30,10 @@ class Config {
# new settings and the corresponding default values. # new settings and the corresponding default values.
var $defaults = array(); # List of default values var $defaults = array(); # List of default values
# Items
var $items = null;
function __construct($section=null, $defaults=array()) { function __construct($section=null, $defaults=array()) {
if ($section) if ($section)
$this->section = $section; $this->section = $section;
...@@ -129,16 +133,18 @@ class Config { ...@@ -129,16 +133,18 @@ class Config {
function destroy() { function destroy() {
unset($this->session); unset($this->session);
return $this->items()->delete(); if ($this->items)
$this->items->delete();
return true;
} }
function items() { function items() {
static $items;
if (!isset($items)) if (!isset($this->items))
$items = ConfigItem::items($this->section, $this->section_column); $this->items = ConfigItem::items($this->section, $this->section_column);
return $items; return $this->items;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment