public function doUninstallAction($params) { $result = false; if (strlen($params['file'])) { $xmldb = new \Innomatic\Dataaccess\DataAccessXmlTable($this->rootda, \Innomatic\Dataaccess\DataAccessXmlTable::SQL_DROP); $xmldb->load_deffile($this->container->getHome() . 'core/db/' . basename($params['file'])); if ($this->rootda->execute($xmldb->getSQL())) { if (@unlink($this->container->getHome() . 'core/db/' . basename($params['file']))) { $result = true; } else { $this->mLog->logEvent('innomatic.roottablecomponent.roottablecomponent.douninstallaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Unable to remove root table file ' . $this->container->getHome() . 'core/db/' . basename($params['file']), \Innomatic\Logging\Logger::ERROR); } } else { $this->mLog->logEvent('innomatic.roottablecomponent.roottablecomponent.douninstallaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Unable to drop root table from ' . basename($params['file']) . ' table file', \Innomatic\Logging\Logger::ERROR); } $xmldb->free(); } else { $this->mLog->logEvent('innomatic.roottablecomponent.roottablecomponent.douninstallaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Empty table file name', \Innomatic\Logging\Logger::ERROR); } return $result; }
public function doDisableDomainAction($domainid, $params) { $result = false; if (strlen($params['file'])) { $xmldb = new \Innomatic\Dataaccess\DataAccessXmlTable($this->domainda, \Innomatic\Dataaccess\DataAccessXmlTable::SQL_DROP); $xmldb->load_deffile($this->container->getHome() . 'core/db/' . $params['file']); if ($this->domainda->execute($xmldb->getSQL())) { $result = true; } else { $this->mLog->logEvent('innomatic.domaintablecomponent.domaintablecomponent.dodisabledomainaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Unable to remove table from ' . $params['file'] . ' table file', \Innomatic\Logging\Logger::ERROR); } } else { $this->mLog->logEvent('innomatic.domaintablecomponent.domaintablecomponent.dodisabledomainaction', 'In application ' . $this->appname . ', component ' . $params['name'] . ': Empty table file name', \Innomatic\Logging\Logger::ERROR); } return $result; }