Operator: Organize configuration options
authorBen Klang <ben@alkaloid.net>
Tue, 19 Jan 2010 13:25:12 +0000 (08:25 -0500)
committerBen Klang <ben@alkaloid.net>
Wed, 20 Jan 2010 12:36:56 +0000 (07:36 -0500)
operator/config/conf.xml
operator/graphgen.php

index 54de86f..a0f4597 100644 (file)
@@ -1,31 +1,35 @@
 <?xml version="1.0"?>
 <configuration>
- <configsection name="storage">
-  <configheader>Storage System Settings</configheader>
-  <configswitch name="driver" desc="What storage driver should we use?">asterisksql
-   <case name="asterisksql" desc="Asterisk SQL">
-    <configsection name="params">
-     <configsql switchname="driverconfig">
-      <configstring name="table" desc="Database table">cdr</configstring>
-     </configsql>
-    </configsection>
-   </case>
-  </configswitch>
-  <configinteger name="searchlimit" desc="Maximum number of records to include in CDR searches.  Does not apply to graphs.">5000
-  </configinteger>
- </configsection>
-
- <configstring name="ttf_font" desc="Full path to a True-Type font to use when rendering the graph" required="false" />
-
- <configsection name="menu">
-  <configheader>Menu Settings</configheader>
-  <configboolean name="export" desc="Should we display an Export
-  link in Operator's menu?">true</configboolean>
-  <configmultienum name="apps" desc="Select any applications that should be
-  linked in Operator's menu">
-   <values>
-    <configspecial name="list-horde-apps"/>
-   </values>
-  </configmultienum>
- </configsection>
+ <configtab name="General">
+  <configsection name="graph">
+   <configstring name="ttf_font" desc="Full path to a True-Type font to use when rendering the graph" required="false" />
+  </configsection>
+  <configsection name="menu">
+   <configheader>Menu Settings</configheader>
+   <configboolean name="export" desc="Should we display an Export
+   link in Operator's menu?">true</configboolean>
+   <configmultienum name="apps" desc="Select any applications that should be
+   linked in Operator's menu">
+    <values>
+     <configspecial name="list-horde-apps"/>
+    </values>
+   </configmultienum>
+  </configsection>
+ </configtab>
+ <configtab name="Storage">
+  <configsection name="storage">
+   <configheader>Storage System Settings</configheader>
+   <configswitch name="driver" desc="What storage driver should we use?">asterisksql
+    <case name="asterisksql" desc="Asterisk SQL">
+     <configsection name="params">
+      <configsql switchname="driverconfig">
+       <configstring name="table" desc="Database table">cdr</configstring>
+      </configsql>
+     </configsection>
+    </case>
+   </configswitch>
+   <configinteger name="searchlimit" desc="Maximum number of records to include in CDR searches.  Does not apply to graphs.">5000
+   </configinteger>
+  </configsection>
+ </configtab>
 </configuration>
index fecd8a0..d7da100 100644 (file)
@@ -56,9 +56,9 @@ if (isset($graphinfo['orientation']) &&
     $graph->horizontal = false;
 }
 
-if (!empty($conf['ttf_font'])) {
+if (!empty($conf['graph']['ttf_font'])) {
     // add a TrueType font
-    $Font =& $graph->addNew('ttf_font', $conf['ttf_font']);
+    $Font =& $graph->addNew('ttf_font', $conf['graph']['ttf_font']);
     // Set the font size to 11 pixels.  Yes, 8 really does mean 11
     $Font->setSize(8);
     $graph->setFont($Font);