public function doUpdateAction($params)
 {
     $result = true;
     if (strlen($params['file'])) {
         $params['file'] = $this->basedir . '/core/db/' . $params['file'];
         if (file_exists($this->container->getHome() . 'core/db/' . basename($params['file']) . '.old')) {
             @copy($this->container->getHome() . 'core/db/' . basename($params['file']) . '.old', $this->container->getHome() . 'core/db/' . basename($params['file']) . '.old2');
         }
         @copy($this->container->getHome() . 'core/db/' . basename($params['file']), $this->container->getHome() . 'core/db/' . basename($params['file']) . '.old');
         $xml_upd = new \Innomatic\Dataaccess\DataAccessXmlTableUpdater($this->rootda, $this->container->getHome() . 'core/db/' . basename($params['file']), $params['file']);
         $xml_upd->CheckDiffs();
         $old_columns = $xml_upd->getOldColumns();
         if (is_array($old_columns)) {
             while (list(, $column) = each($old_columns)) {
                 $upd_data['tablename'] = $params['name'];
                 $upd_data['column'] = $column;
                 $this->rootda->RemoveColumn($upd_data);
             }
         }
         $new_columns = $xml_upd->getNewColumns();
         if (is_array($new_columns)) {
             while (list(, $column) = each($new_columns)) {
                 $upd_data['tablename'] = $params['name'];
                 $upd_data['columnformat'] = $column;
                 $this->rootda->AddColumn($upd_data);
             }
         }
         if (@copy($params['file'], $this->container->getHome() . 'core/db/' . basename($params['file']))) {
             @chmod($this->container->getHome() . 'core/db/' . basename($params['file']), 0644);
             $result = true;
         } else {
             $this->mLog->logEvent('innomatic.roottablecomponent.roottablecomponent.doupdateaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Unable to copy ' . $params['file'] . ' to destination ' . $this->container->getHome() . 'core/db/' . basename($params['file']), \Innomatic\Logging\Logger::ERROR);
         }
     } else {
         $this->mLog->logEvent('innomatic.roottablecomponent.roottablecomponent.doupdateaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Empty table file name', \Innomatic\Logging\Logger::ERROR);
     }
     return $result;
 }
 public function doUpdateDomainAction($domainid, $params)
 {
     $result = true;
     if (strlen($params['file'])) {
         $params['file'] = $this->basedir . '/core/db/' . $params['file'];
         $xml_upd = new \Innomatic\Dataaccess\DataAccessXmlTableUpdater($this->domainda, $this->container->getHome() . 'core/db/' . basename($params['file']) . '.old', $params['file']);
         $xml_upd->applyDiffs($params);
     } else {
         $this->mLog->logEvent('innomatic.domaintablecomponent.domaintablecomponent.doupdatedomainaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Empty table file name', \Innomatic\Logging\Logger::ERROR);
     }
     return $result;
 }