/** * Sets the status of a module. * Therefore you have to be member of the admin-group. * * @permissions edit */ protected function actionModuleStatus() { //status: for setting the status of modules, you have to be member of the admin-group $objModule = new class_module_system_module($this->getSystemid()); if ($objModule->rightEdit() && class_carrier::getInstance()->getObjSession()->isSuperAdmin()) { $objModule->setIntRecordStatus($objModule->getIntRecordStatus() == 0 ? 1 : 0); $objModule->updateObjectToDb(); $this->adminReload(class_link::getLinkAdminHref($this->getArrModule("modul"))); } }
/** * Writes the data of a module to the database * * @param string $strName * @param int $intModuleNr * @param string $strFilePortal * @param string $strFileAdmin * @param string $strVersion * @param bool $bitNavi * @param string $strXmlPortal * @param string $strXmlAdmin * @return string the new SystemID of the record */ protected function registerModule($strName, $intModuleNr, $strFilePortal, $strFileAdmin, $strVersion, $bitNavi, $strXmlPortal = "", $strXmlAdmin = "") { $this->objDB->flushQueryCache(); //The previous id is the the id of the Root-Record -> 0 $strPrevId = "0"; $objModule = new class_module_system_module(); $objModule->setStrName($strName); $objModule->setIntNr($intModuleNr); $objModule->setStrNamePortal($strFilePortal); $objModule->setStrNameAdmin($strFileAdmin); $objModule->setStrVersion($strVersion); $objModule->setIntNavigation($bitNavi ? 1 : 0); $objModule->setStrXmlNamePortal($strXmlPortal); $objModule->setStrXmlNameAdmin($strXmlAdmin); $objModule->setIntDate(time()); $objModule->setIntModuleNr($intModuleNr); $objModule->setArrModuleEntry("moduleId", $intModuleNr); $objModule->updateObjectToDb($strPrevId); class_logger::getInstance()->addLogRow("New module registered: " . $objModule->getSystemid() . "(" . $strName . ")", class_logger::$levelInfo); //flush db-cache afterwards class_carrier::getInstance()->flushCache(class_carrier::INT_CACHE_TYPE_DBQUERIES | class_carrier::INT_CACHE_TYPE_DBTABLES | class_carrier::INT_CACHE_TYPE_MODULES | class_carrier::INT_CACHE_TYPE_ORMCACHE | class_carrier::INT_CACHE_TYPE_OBJECTFACTORY); return $objModule->getSystemid(); }