Example #1
0
function oxRemClassModule($sModuleClass, $sClass = '')
{
    //$myConfig = modConfig::getInstance();
    //$aModules = $myConfig->getConfigParam( 'aModules' );
    //unsetting _possible_ registry instance
    oxRegistry::set($sClass, null);
    $oFactory = new oxUtilsObject();
    $aModules = $oFactory->getModuleVar("aModules");
    if (!$aModules) {
        $aModules = array();
    }
    if ($sClass) {
        // force for now        if ($aModules[$sClass] == $sModuleClass)
        unset($aModules[$sClass]);
    } else {
        while (($sKey = array_search($sModuleClass, $aModules)) !== false) {
            unset($aModules[$sKey]);
        }
    }
    //$myConfig->setConfigParam( 'aModules', $aModules );
    $oFactory->setModuleVar("aModules", $aModules);
    oxClassCacheKey(true);
}