Exemplo n.º 1
0
 /**
  * Uninstalls all of blocks which $module specifies, and its permissions.
  * 
  * This function gets informations about templates from the database.
  * 
  * @static
  * @param XoopsModule $module
  * @param Legacy_ModuleInstallLog $log
  * @return bool
  * 
  * @note FOR THE CUSTOM-INSTALLER
  * @see Legacy_ModuleInstallUtils::installAllOfBlocks()
  * @see Legacy_ModuleInstallUtils::uninstallBlock()
  */
 function uninstallAllOfBlocks(&$module, &$log)
 {
     $handler =& xoops_gethandler('block');
     $criteria = new Criteria('mid', $module->get('mid'));
     $blockArr =& $handler->getObjectsDirectly($criteria);
     $successFlag = true;
     foreach (array_keys($blockArr) as $idx) {
         $successFlag &= Legacy_ModuleInstallUtils::uninstallBlock($blockArr[$idx], $log);
     }
     return $successFlag;
 }