コード例 #1
0
 function delete($rel_name)
 {
     require_once "ModuleInstall/ModuleInstaller.php";
     require_once 'modules/Administration/QuickRepairAndRebuild.php';
     $mi = new ModuleInstaller();
     $mi->silent = true;
     $mi->uninstall_relationship("custom/metadata/{$rel_name}MetaData.php");
     // now clear all caches so that our changes are visible
     Relationship::delete_cache();
     $mi->rebuild_tabledictionary();
     $MBmodStrings = $GLOBALS['mod_strings'];
     $GLOBALS['mod_strings'] = return_module_language('', 'Administration');
     $rac = new RepairAndClear();
     $rac->repairAndClearAll(array('clearAll', 'rebuildExtensions'), array($GLOBALS['mod_strings']['LBL_ALL_MODULES']), true, false);
     $GLOBALS['mod_strings'] = $MBmodStrings;
 }
コード例 #2
0
 function delete($rel_name)
 {
     //Remove any fields from layouts
     $rel = $this->get($rel_name);
     if (!empty($rel)) {
         $this->removeFieldsFromDeployedLayout($rel);
     }
     require_once "ModuleInstall/ModuleInstaller.php";
     require_once 'modules/Administration/QuickRepairAndRebuild.php';
     $mi = new ModuleInstaller();
     $mi->silent = true;
     $mi->uninstall_relationship("custom/metadata/{$rel_name}MetaData.php");
     // now clear all caches so that our changes are visible
     Relationship::delete_cache();
     $mi->rebuild_tabledictionary();
     $MBmodStrings = $GLOBALS['mod_strings'];
     $GLOBALS['mod_strings'] = return_module_language('', 'Administration');
     $rac = new RepairAndClear();
     $rac->repairAndClearAll(array('clearAll', 'rebuildExtensions'), array($GLOBALS['mod_strings']['LBL_ALL_MODULES']), true, false);
     $GLOBALS['mod_strings'] = $MBmodStrings;
     //Bug 41070, supercedes the previous 40941 fix in this section
     if (isset($this->relationships[$rel_name])) {
         unset($this->relationships[$rel_name]);
     }
 }