Commit 0860a295 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #4824 Removed support for tabs in config file, allowing several calls to...

Fixes #4824 Removed support for tabs in config file, allowing several calls to loadPlist with less problems
parent d58d746d
......@@ -56,11 +56,9 @@ class config {
* - $data['SERVERS'] contains server informations.
*/
var $data = array(
'TABS' => array(),
'LOCATIONS' => array(),
'SERVERS' => array(),
'MAIN' => array(),
'MENU' => array()
);
var $basedir = "";
......@@ -145,10 +143,9 @@ class config {
function parse_data ($xmldata)
{
$this->data = array(
"TABS" => array(),
"LOCATIONS" => array(),
"MAIN" => array(),
"MENU" => array()
'LOCATIONS' => array(),
'SERVERS' => array(),
'MAIN' => array(),
);
$this->parser = xml_parser_create();
......@@ -203,19 +200,6 @@ class config {
/* Look through attributes */
switch ($this->tags[$this->level - 1]) {
/* Handle tab section */
case 'TAB':
$name = $this->tags[$this->level - 2];
/* Create new array? */
if (!isset($this->data['TABS'][$name])) {
$this->data['TABS'][$name] = array();
}
/* Add elements */
$this->data['TABS'][$name][] = $attrs;
break;
/* Handle location */
case 'LOCATION':
if ($this->tags[$this->level - 2] == 'MAIN') {
......@@ -933,6 +917,8 @@ class config {
$this->data['OBJECTS'] = array();
$this->data['SECTIONS'] = array();
$this->data['CATEGORIES'] = array();
$this->data['MENU'] = array();
$this->data['TABS'] = array();
foreach ($plist->info as $class => &$plInfo) {
if (isset($plInfo['plObjectType'])) {
$entry = array('CLASS' => $class,'NAME' => $plInfo['plShortName']);
......
......@@ -301,8 +301,8 @@ class setup
$cv['fdDisplayErrors'] = FALSE;
$cv['fdForceSSL'] = TRUE;
$cv['debugLevel'] = 0;
$smarty->assign("cv", xmlentities($cv));
$smarty->assign("templateCompileDirectory", SPOOL_DIR);
$smarty->assign('cv', xmlentities($cv));
$smarty->assign('templateCompileDirectory', SPOOL_DIR);
$xml = $smarty->fetch(CONFIG_TEMPLATE_DIR.CONFIG_FILE);
$config->parse_data($xml);
$config->set_current($config->data['MAIN']['DEFAULT']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment