/**
  * Delete all blocks associated with module
  * @param Vtiger_Module Instnace of module to use
  * @param Boolean true to delete associated fields, false otherwise
  * @access private
  */
 static function deleteForModule($moduleInstance, $recursive = true)
 {
     global $adb;
     if ($recursive) {
         Vtiger_Field::deleteForModule($moduleInstance);
     }
     $adb->pquery("DELETE FROM vtiger_blocks WHERE tabid=?", array($moduleInstance->id));
     self::log("Deleting blocks for module ... DONE");
 }
示例#2
0
 /**
  * Delete all blocks associated with module
  * @param Vtiger_Module Instnace of module to use
  * @param Boolean true to delete associated fields, false otherwise
  * @access private
  */
 static function deleteForModule($moduleInstance, $recursive = true)
 {
     $adb = PearDatabase::getInstance();
     if ($recursive) {
         Vtiger_Field::deleteForModule($moduleInstance);
     }
     $adb->delete('vtiger_module_dashboard_blocks', 'tabid = ?', [$moduleInstance->tabId]);
     $adb->pquery('DELETE vtiger_blocks, vtiger_blocks_hide' . ' FROM vtiger_blocks' . ' INNER JOIN `vtiger_blocks_hide`' . ' ON vtiger_blocks.`blockid` = vtiger_blocks_hide.`blockid`' . '  WHERE vtiger_blocks.`tabid` =?', [$moduleInstance->id]);
     $adb->delete('vtiger_blocks', 'tabid=?', [$moduleInstance->id]);
     self::log("Deleting blocks for module ... DONE");
 }