horfic
2011-01-06 07405653f111c4eb8fd1c83d45e66287807036d7
server/mods-available/remoteaction_core_module.inc.php
@@ -27,7 +27,7 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
class remoteaction_core_module extends modules_base {
class remoteaction_core_module {
   var $module_name = 'remoteaction_core_module';
   var $class_name = 'remoteaction_core_module';
   /* No actions at this time. maybe later... */
@@ -110,20 +110,22 @@
      /*
       * process all actions
      */
      foreach ($actions as $action) {
         if ($action['action_type'] == 'os_update') {
            /* do the update */
            $this->_doOsUpdate($action);
            /* this action takes so much time,
              * we stop executing the actions not to waste more time */
            return;
         }
         if ($action['action_type'] == 'ispc_update') {
            /* do the update */
            $this->_doIspCUpdate($action);
            /* this action takes so much time,
              * we stop executing the actions not to waste more time */
            return;
      if(is_array($actions)) {
         foreach ($actions as $action) {
            if ($action['action_type'] == 'os_update') {
               /* do the update */
               $this->_doOsUpdate($action);
               /* this action takes so much time,
               * we stop executing the actions not to waste more time */
               return;
            }
            if ($action['action_type'] == 'ispc_update') {
               /* do the update */
               $this->_doIspCUpdate($action);
               /* this action takes so much time,
               * we stop executing the actions not to waste more time */
               return;
            }
         }
      }
   }
@@ -148,6 +150,10 @@
   }
   private function _doIspCUpdate($action) {
      // Ensure that this code is not executed twice as this would cause a loop in case of a failure
      $this->_actionDone($action['action_id'], 'ok');
      /*
       * Get the version-number of the newest version 
       */
@@ -193,7 +199,7 @@
      /*
       * All well done!
       */
      $this->_actionDone($action['action_id'], 'ok');
      //$this->_actionDone($action['action_id'], 'ok');
   }
}
?>