No reason to have the filebased state driver as an option in Horde now
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 5 Sep 2010 18:09:25 +0000 (14:09 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 5 Sep 2010 18:09:25 +0000 (14:09 -0400)
that we have a fully functional history driver.

horde/config/conf.xml
horde/rpc.php

index a050194..5c13642 100644 (file)
     <case name="true" desc="Enabled">
      <configsection name="state">
       <configheader>State Storage Settings</configheader>
-      <configswitch name="driver" desc="Choose the state driver to use.">history
-       <case name="history" desc="Native Horde history driver">
-         <configsection name="params">
-          <configstring name="devicetable" desc="Name of table to hold device
-          information:">horde_activesync_device</configstring>
-          <configstring name="statetable" desc="Name of table to hold state
-          data:">horde_activesync_state</configstring>
-          <configstring name="maptable" desc="Name of table to hold mapping data
-          for device-sent changes.">horde_activesync_map</configstring>
-          <configstring name="userstable" desc="Name of table to hold user-device
-          data:">horde_activesync_device_users</configstring>
-         </configsection>
-       </case>
-       <case name="file" desc="Generic file based driver">
-        <configsection name="params">
-         <configstring name="directory" desc="Directory to hold state files (this
-         directory should be writeable by the webserver):">/tmp</configstring>
-        </configsection>
-       </case>
-      </configswitch>
+       <configsection name="params">
+        <configstring name="devicetable" desc="Name of table to hold device
+        information:">horde_activesync_device</configstring>
+        <configstring name="statetable" desc="Name of table to hold state
+        data:">horde_activesync_state</configstring>
+        <configstring name="maptable" desc="Name of table to hold mapping data
+        for device-sent changes.">horde_activesync_map</configstring>
+        <configstring name="userstable" desc="Name of table to hold user-device
+        data:">horde_activesync_device_users</configstring>
+       </configsection>
      </configsection>
      <configheader>Logging</configheader>
      <configsection name="logging">
index a35a20a..d085af8 100644 (file)
@@ -101,21 +101,10 @@ case 'ActiveSync':
         $params['logger'] = new Horde_Log_Logger(new Horde_Log_Handler_Stream(fopen($conf['activesync']['logging']['path'], 'a')));
     }
 
-    switch ($conf['activesync']['state']['driver']) {
-    case 'file':
-        $stateMachine = new Horde_ActiveSync_State_File($conf['activesync']['state']['params']);
-        break;
-
-    case 'history':
-        $state_params = $conf['activesync']['state']['params'];
-        $state_params['db'] = $injector->getInstance('Horde_Db_Adapter_Base');
-        $stateMachine = new Horde_ActiveSync_State_History($state_params);
-        break;
-    }
-
-    /* TODO: Probably want to bind a factory to injector for this? */
+    $state_params = $conf['activesync']['state']['params'];
+    $state_params['db'] = $injector->getInstance('Horde_Db_Adapter_Base');
+    $stateMachine = new Horde_ActiveSync_State_History($state_params);
     $params['registry'] = $registry;
-
     $driver_params = array(
         'connector' => new Horde_ActiveSync_Driver_Horde_Connector_Registry($params),
         'ping' => $conf['activesync']['ping'],