本文整理汇总了PHP中VardefManager::clearVardef方法的典型用法代码示例。如果您正苦于以下问题:PHP VardefManager::clearVardef方法的具体用法?PHP VardefManager::clearVardef怎么用?PHP VardefManager::clearVardef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VardefManager
的用法示例。
在下文中一共展示了VardefManager::clearVardef方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: repairDictionary
protected function repairDictionary()
{
$this->df->buildCache($this->modulename);
VardefManager::clearVardef();
VardefManager::refreshVardefs($this->modulename, $this->objectname);
$this->seed->field_defs = $GLOBALS['dictionary'][$this->objectname]['fields'];
}
示例2: createRelationship
private function createRelationship($lhs_module, $rhs_module = null, $relationship_type = 'one-to-many')
{
$rhs_module = $rhs_module == null ? $lhs_module : $rhs_module;
// Adding relation between products and users
$this->relationships = new DeployedRelationships($lhs_module);
$definition = array('lhs_module' => $lhs_module, 'relationship_type' => $relationship_type, 'rhs_module' => $rhs_module, 'lhs_label' => $lhs_module, 'rhs_label' => $rhs_module, 'rhs_subpanel' => 'default');
$this->relationship = RelationshipFactory::newRelationship($definition);
$this->relationships->add($this->relationship);
$this->relationships->save();
$this->relationships->build();
LanguageManager::clearLanguageCache($lhs_module);
// Updating $dictionary by created relation
global $dictionary;
$moduleInstaller = new ModuleInstaller();
$moduleInstaller->silent = true;
$moduleInstaller->rebuild_tabledictionary();
require 'modules/TableDictionary.php';
// Updating vardefs
VardefManager::$linkFields = array();
VardefManager::clearVardef();
VardefManager::refreshVardefs($lhs_module, BeanFactory::getObjectName($lhs_module));
if ($lhs_module != $rhs_module) {
VardefManager::refreshVardefs($rhs_module, BeanFactory::getObjectName($rhs_module));
}
SugarRelationshipFactory::rebuildCache();
}
示例3: tearDown
public function tearDown()
{
global $dictionary, $bean_list;
$dictionary = $this->old_dictionary;
$bean_list = $this->old_bean_list;
VardefManager::clearVardef('Accounts', 'Account');
VardefManager::refreshVardefs('Accounts', 'Account');
}
示例4: setUp
public function setUp()
{
$beanList = array();
$beanFiles = array();
require 'include/modules.php';
$GLOBALS['beanList'] = $beanList;
$GLOBALS['beanFiles'] = $beanFiles;
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$GLOBALS['current_user']->status = 'Active';
$GLOBALS['current_user']->is_admin = 1;
$GLOBALS['current_user']->save();
$this->field = get_widget('varchar');
$this->field->id = 'Accountstest_custom_c';
$this->field->name = 'test_custom_c';
$this->field->vanme = 'LBL_TEST_CUSTOM_C';
$this->field->comments = NULL;
$this->field->help = NULL;
$this->field->custom_module = 'Accounts';
$this->field->type = 'varchar';
$this->field->label = 'LBL_TEST_CUSTOM_C';
$this->field->len = 255;
$this->field->required = 0;
$this->field->default_value = NULL;
$this->field->date_modified = '2009-09-14 02:23:23';
$this->field->deleted = 0;
$this->field->audited = 0;
$this->field->massupdate = 0;
$this->field->duplicate_merge = 0;
$this->field->reportable = 1;
$this->field->importable = 'true';
$this->field->ext1 = NULL;
$this->field->ext2 = NULL;
$this->field->ext3 = NULL;
$this->field->ext4 = NULL;
$this->df = new DynamicField('Accounts');
$this->mod = new Account();
$this->df->setup($this->mod);
$this->df->addFieldObject($this->field);
$this->df->buildCache('Accounts');
VardefManager::clearVardef();
VardefManager::refreshVardefs('Accounts', 'Account');
$this->mod->field_defs = $GLOBALS['dictionary']['Account']['fields'];
$this->_contact = SugarTestContactUtilities::createContact();
$this->_account = SugarTestAccountUtilities::createAccount();
$this->_contact->load_relationship('accounts');
$this->_contact->accounts->add($this->_account->id);
$this->_account->test_custom_c = 'Custom Field';
$this->_account->save();
$GLOBALS['db']->commit();
// Making sure we commit any changes
}
示例5: createCustom
public function createCustom()
{
//create new varchar widget and associate with Accounts
$this->custField = get_widget('varchar');
$this->custField->id = 'Accounts' . $this->custFieldName;
$this->custField->name = $this->custFieldName;
$this->custField->type = 'varchar';
$this->custField->label = 'LBL_' . strtoupper($this->custFieldName);
$this->custField->vname = 'LBL_' . strtoupper($this->custFieldName);
$this->custField->len = 255;
$this->custField->custom_module = 'Accounts';
$this->custField->required = 0;
$this->custField->default = 'goofy';
$this->acc = new Account();
$this->df = new DynamicField('Accounts');
$this->df->setup($this->acc);
$this->df->addFieldObject($this->custField);
$this->df->buildCache('Accounts');
$this->custField->save($this->df);
VardefManager::clearVardef();
VardefManager::refreshVardefs('Accounts', 'Account');
//Now create the meta files to make this a Calculated Field.
$fn = $this->custFieldName;
$extensionContent = <<<EOQ
<?php
\$dictionary['Account']['fields']['{$fn}']['duplicate_merge_dom_value']=0;
\$dictionary['Account']['fields']['{$fn}']['calculated']='true';
\$dictionary['Account']['fields']['{$fn}']['formula']='related(\$assigned_user_link,"name")';
\$dictionary['Account']['fields']['{$fn}']['enforced']='true';
\$dictionary['Account']['fields']['{$fn}']['dependency']='';
\$dictionary['Account']['fields']['{$fn}']['type']='varchar';
\$dictionary['Account']['fields']['{$fn}']['name']='{$fn}';
EOQ;
//create custom field file
$this->custFileDirPath = create_custom_directory($this->custFileDirPath);
$fileLoc = $this->custFileDirPath . 'sugarfield_' . $this->custFieldName . '.php';
file_put_contents($fileLoc, $extensionContent);
//run repair and clear to make sure the meta gets picked up
$_REQUEST['repair_silent'] = 1;
$rc = new RepairAndClear();
$rc->repairAndClearAll(array("clearAll", "rebuildExtensions"), array("Accounts"), false, false);
$fn = $this->custFieldName;
}
示例6: tearDown
public function tearDown()
{
$GLOBALS['db']->dropTableName($this->_tablename . '_cstm');
$GLOBALS['db']->query("DELETE FROM fields_meta_data WHERE id in ('Accountsbug34993_test_c', 'Accountsbug34993_test2_c')");
if (isset($this->_old_installing)) {
$GLOBALS['installing'] = $this->_old_installing;
} else {
unset($GLOBALS['installing']);
}
if (file_exists('custom/Extension/modules/Accounts/Ext/Vardefs/sugarfield_bug34993_test_c.php')) {
unlink('custom/Extension/modules/Accounts/Ext/Vardefs/sugarfield_bug34993_test_c.php');
}
if (file_exists('custom/Extension/modules/Accounts/Ext/Vardefs/sugarfield_bug34993_test2_c.php')) {
unlink('custom/Extension/modules/Accounts/Ext/Vardefs/sugarfield_bug34993_test2_c.php');
}
VardefManager::clearVardef('Accounts', 'Account');
VardefManager::refreshVardefs('Accounts', 'Account');
}
示例7: setUp
public function setUp()
{
$this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v2/soap.php';
SugarTestHelper::setUp('beanFiles');
SugarTestHelper::setUp('beanList');
SugarTestHelper::setUp('current_user', array(true, 1));
$this->field = get_widget('varchar');
$this->field->id = 'Accountstest_custom_c';
$this->field->name = 'test_custom_c';
$this->field->vanme = 'LBL_TEST_CUSTOM_C';
$this->field->comments = NULL;
$this->field->help = NULL;
$this->field->custom_module = 'Accounts';
$this->field->type = 'varchar';
$this->field->label = 'LBL_TEST_CUSTOM_C';
$this->field->len = 255;
$this->field->required = 0;
$this->field->default_value = NULL;
$this->field->date_modified = '2009-09-14 02:23:23';
$this->field->deleted = 0;
$this->field->audited = 0;
$this->field->massupdate = 0;
$this->field->duplicate_merge = 0;
$this->field->reportable = 1;
$this->field->importable = 'true';
$this->field->ext1 = NULL;
$this->field->ext2 = NULL;
$this->field->ext3 = NULL;
$this->field->ext4 = NULL;
$this->df = new DynamicField('Accounts');
$this->mod = new Account();
$this->df->setup($this->mod);
$this->df->addFieldObject($this->field);
$this->df->buildCache('Accounts');
VardefManager::clearVardef();
VardefManager::refreshVardefs('Accounts', 'Account');
$this->mod->field_defs = $GLOBALS['dictionary']['Account']['fields'];
$this->_account = SugarTestAccountUtilities::createAccount();
$this->_account->test_custom_c = 'Custom Field';
$this->_account->save();
$GLOBALS['db']->commit();
// Making sure we commit any changes
parent::setUp();
}
示例8: build
function build()
{
$basepath = "custom/Extension/modules";
$this->activitiesToAdd = false;
// and mark all as built so that the next time we come through we'll know and won't build again
foreach ($this->relationships as $name => $relationship) {
$definition = $relationship->getDefinition();
// activities will always appear on the rhs only - lhs will be always be this module in MB
if (strtolower($definition['rhs_module']) == 'activities') {
$this->activitiesToAdd = true;
$relationshipName = $definition['relationship_name'];
foreach (self::$activities as $activitiesSubModuleLower => $activitiesSubModuleName) {
$definition['rhs_module'] = $activitiesSubModuleName;
$definition['for_activities'] = true;
$definition['relationship_name'] = $relationshipName . '_' . $activitiesSubModuleLower;
$this->relationships[$definition['relationship_name']] = RelationshipFactory::newRelationship($definition);
}
unset($this->relationships[$name]);
}
}
$GLOBALS['log']->info(get_class($this) . "->build(): installing relationships");
$MBModStrings = $GLOBALS['mod_strings'];
$adminModStrings = return_module_language('', 'Administration');
// required by ModuleInstaller
foreach ($this->relationships as $name => $relationship) {
$relationship->setFromStudio();
$GLOBALS['mod_strings'] = $MBModStrings;
$installDefs = parent::build($basepath, "<basepath>", array($name => $relationship));
// and mark as built so that the next time we come through we'll know and won't build again
$relationship->setReadonly();
$this->relationships[$name] = $relationship;
// now install the relationship - ModuleInstaller normally only does this as part of a package load where it installs the relationships defined in the manifest. However, we don't have a manifest or a package, so...
// If we were to chose to just use the Extension mechanism, without using the ModuleInstaller install_...() methods, we must :
// 1) place the information for each side of the relationship in the appropriate Ext directory for the module, which means specific $this->save...() methods for DeployedRelationships, and
// 2) we must also manually add the relationship into the custom/application/Ext/TableDictionary/tabledictionary.ext.php file as install_relationship doesn't handle that (install_relationships which requires the manifest however does)
// Relationships must be in tabledictionary.ext.php for the Admin command Rebuild Relationships to reliably work:
// Rebuild Relationships looks for relationships in the modules vardefs.php, in custom/modules/<modulename>/Ext/vardefs/vardefs.ext.php, and in modules/TableDictionary.php and custom/application/Ext/TableDictionary/tabledictionary.ext.php
// if the relationship is not defined in one of those four places it could be deleted during a rebuilt, or during a module installation (when RebuildRelationships.php deletes all entries in the Relationships table)
// So instead of doing this, we use common save...() methods between DeployedRelationships and UndeployedRelationships that will produce installDefs,
// and rather than building a full manifest file to carry them, we manually add these installDefs to the ModuleInstaller, and then
// individually call the appropriate ModuleInstaller->install_...() methods to take our relationship out of our staging area and expand it out to the individual module Ext areas
$GLOBALS['mod_strings'] = $adminModStrings;
require_once 'ModuleInstall/ModuleInstaller.php';
$mi = new ModuleInstaller();
$mi->id_name = 'custom' . $name;
// provide the moduleinstaller with a unique name for this relationship - normally this value is set to the package key...
$mi->installdefs = $installDefs;
$mi->base_dir = $basepath;
$mi->silent = true;
VardefManager::clearVardef();
$mi->install_relationships();
$mi->install_languages();
$mi->install_vardefs();
$mi->install_layoutdefs();
}
// now clear all caches so that our changes are visible
require_once 'modules/Administration/QuickRepairAndRebuild.php';
$rac = new RepairAndClear();
$rac->repairAndClearAll(array('clearAll'), array($GLOBALS['mod_strings']['LBL_ALL_MODULES']), true, false);
$GLOBALS['mod_strings'] = $MBModStrings;
// finally, restore the ModuleBuilder mod_strings
// save out the updated definitions so that we keep track of the change in built status
$this->save();
$GLOBALS['log']->info(get_class($this) . "->build(): finished relationship installation");
}
示例9: repairDBForUpgrade
function repairDBForUpgrade($execute = false, $path = '')
{
global $current_user, $beanFiles;
global $dictionary;
set_time_limit(3600);
$db =& DBManagerFactory::getInstance();
$sql = '';
VardefManager::clearVardef();
require_once 'include/ListView/ListView.php';
foreach ($beanFiles as $bean => $file) {
require_once $file;
$focus = new $bean();
$sql .= $db->repairTable($focus, $execute);
}
//echo $sql;
$olddictionary = $dictionary;
unset($dictionary);
include 'modules/TableDictionary.php';
foreach ($dictionary as $meta) {
$tablename = $meta['table'];
$fielddefs = $meta['fields'];
$indices = $meta['indices'];
$sql .= $db->repairTableParams($tablename, $fielddefs, $indices, $execute);
}
$qry_str = "";
foreach (explode("\n", $sql) as $line) {
if (!empty($line) && substr($line, -2) != "*/") {
$line .= ";";
}
$qry_str .= $line . "\n";
}
$sql = str_replace(array("\n", '''), array('', "'"), preg_replace('#(/\\*.+?\\*/\\n*)#', '', $qry_str));
logThis("*******START EXECUTING DB UPGRADE QUERIES***************", $path);
logThis($sql, $path);
logThis("*******END EXECUTING DB UPGRADE QUERIES****************", $path);
if (!$execute) {
return $sql;
}
}
示例10: install
function install($base_dir, $is_upgrade = false, $previous_version = '')
{
if (defined('TEMPLATE_URL')) {
SugarTemplateUtilities::disableCache();
}
if (defined('MODULE_INSTALLER_PACKAGE_SCAN') && MODULE_INSTALLER_PACKAGE_SCAN || !empty($GLOBALS['sugar_config']['moduleInstaller']['packageScan'])) {
$this->ms->scanPackage($base_dir);
if ($this->ms->hasIssues()) {
$this->ms->displayIssues();
sugar_cleanup(true);
}
}
// workaround for bug 45812 - refresh vardefs cache before unpacking to avoid partial vardefs in cache
global $beanList;
foreach ($this->modules as $module_name) {
if (!empty($beanList[$module_name])) {
$objectName = BeanFactory::getObjectName($module_name);
VardefManager::loadVardef($module_name, $objectName);
}
}
global $app_strings, $mod_strings;
$this->base_dir = $base_dir;
$total_steps = 5;
//minimum number of steps with no tasks
$current_step = 0;
$tasks = array('pre_execute', 'install_copy', 'install_extensions', 'install_images', 'install_dcactions', 'install_dashlets', 'install_connectors', 'install_layoutfields', 'install_relationships', 'enable_manifest_logichooks', 'post_execute', 'reset_opcodes');
$total_steps += count($tasks);
if (file_exists($this->base_dir . '/manifest.php')) {
if (!$this->silent) {
$current_step++;
display_progress_bar('install', $current_step, $total_steps);
echo '<div id ="displayLoglink" ><a href="#" onclick="document.getElementById(\'displayLog\').style.display=\'\'">' . $app_strings['LBL_DISPLAY_LOG'] . '</a> </div><div id="displayLog" style="display:none">';
}
include $this->base_dir . '/manifest.php';
if ($is_upgrade && !empty($previous_version)) {
//check if the upgrade path exists
if (!empty($upgrade_manifest)) {
if (!empty($upgrade_manifest['upgrade_paths'])) {
if (!empty($upgrade_manifest['upgrade_paths'][$previous_version])) {
$installdefs = $upgrade_manifest['upgrade_paths'][$previous_version];
} else {
$errors[] = 'No Upgrade Path Found in manifest.';
$this->abort($errors);
}
//fi
}
//fi
}
//fi
}
//fi
$this->id_name = $installdefs['id'];
$this->installdefs = $installdefs;
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
foreach ($tasks as $task) {
$this->{$task}();
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
}
$this->install_beans($this->installed_modules);
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $total_steps, $total_steps);
}
if (isset($installdefs['custom_fields'])) {
$this->log(translate('LBL_MI_IN_CUSTOMFIELD'));
$this->install_custom_fields($installdefs['custom_fields']);
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
echo '</div>';
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
echo '</div>';
}
$selectedActions = array('clearTpls', 'clearJsFiles', 'clearDashlets', 'clearVardefs', 'clearJsLangFiles', 'rebuildAuditTables', 'repairDatabase');
VardefManager::clearVardef();
global $beanList, $beanFiles, $moduleList;
if (file_exists('custom/application/Ext/Include/modules.ext.php')) {
include 'custom/application/Ext/Include/modules.ext.php';
}
require_once "modules/Administration/upgrade_custom_relationships.php";
upgrade_custom_relationships($this->installed_modules);
$this->rebuild_all(true);
require_once 'modules/Administration/QuickRepairAndRebuild.php';
$rac = new RepairAndClear();
$rac->repairAndClearAll($selectedActions, $this->installed_modules, true, false);
$this->rebuild_relationships();
UpdateSystemTabs('Add', $this->tab_modules);
//Clear out all the langauge cache files.
clearAllJsAndJsLangFilesWithoutOutput();
$cache_key = 'app_list_strings.' . $GLOBALS['current_language'];
//.........这里部分代码省略.........
示例11: repairTables
function repairTables()
{
global $db;
VardefManager::clearVardef();
$repairedTables = array();
include 'include/modules.php';
$GLOBALS['reload_vardefs'] = true;
foreach ($beanList as $module => $bean) {
if (empty($beanFiles[$bean])) {
continue;
}
$file = $beanFiles[$bean];
$object = BeanFactory::getObjectName($module);
writeLog("Repairing {$bean}:{$object}");
if (file_exists($file)) {
require_once $file;
unset($GLOBALS['dictionary'][$object]);
$focus = new $bean();
if ($focus instanceof SugarBean && !isset($repairedTables[$focus->table_name])) {
$db->repairTable($focus, true);
$repairedTables[$focus->table_name] = true;
}
}
}
$GLOBALS['reload_vardefs'] = false;
unset($dictionary);
include 'modules/TableDictionary.php';
foreach ($dictionary as $meta) {
if (!isset($meta['table']) || isset($repairedTables[$meta['table']])) {
continue;
}
$tablename = $meta['table'];
$fielddefs = $meta['fields'];
$indices = $meta['indices'];
$engine = isset($meta['engine']) ? $meta['engine'] : null;
$db->repairTableParams($tablename, $fielddefs, $indices, true, $engine);
$repairedTables[$tablename] = true;
}
}
示例12: deleteField
/**
* Deletes the field from fields_meta_data and drops the database column then it rebuilds the cache
* Use the widgets get_db_modify_alter_table() method to get the table sql - some widgets do not need any custom table modifications
* @param STRING $name - field name
*/
function deleteField($widget)
{
require_once 'modules/DynamicFields/templates/Fields/TemplateField.php';
global $beanList;
if (!$widget instanceof TemplateField) {
$field_name = $widget;
$widget = new TemplateField();
$widget->name = $field_name;
}
$object_name = $beanList[$this->module];
//Some modules like cases have a bean name that doesn't match the object name
if (empty($GLOBALS['dictionary'][$object_name])) {
$newName = BeanFactory::getObjectName($this->module);
$object_name = $newName != false ? $newName : $object_name;
}
$GLOBALS['db']->query("DELETE FROM fields_meta_data WHERE id='" . $this->module . $widget->name . "'");
$sql = $widget->get_db_delete_alter_table($this->bean->table_name . "_cstm");
if (!empty($sql)) {
$GLOBALS['db']->query($sql);
}
$this->removeVardefExtension($widget);
VardefManager::clearVardef();
VardefManager::refreshVardefs($this->module, $object_name);
}
示例13: install
//.........这里部分代码省略.........
$installdefs = $upgrade_manifest['upgrade_paths'][$previous_version];
} else {
$errors[] = 'No Upgrade Path Found in manifest.';
$this->abort($errors);
}
//fi
}
//fi
}
//fi
}
//fi
$this->id_name = $installdefs['id'];
$this->installdefs = $installdefs;
$installed_modules = array();
$tab_modules = array();
if (isset($installdefs['beans'])) {
$str = "<?php \n //WARNING: The contents of this file are auto-generated\n";
foreach ($installdefs['beans'] as $bean) {
if (!empty($bean['module']) && !empty($bean['class']) && !empty($bean['path'])) {
$module = $bean['module'];
$class = $bean['class'];
$path = $bean['path'];
$str .= "\$beanList['{$module}'] = '{$class}';\n";
$str .= "\$beanFiles['{$class}'] = '{$path}';\n";
if ($bean['tab']) {
$str .= "\$moduleList[] = '{$module}';\n";
$this->install_user_prefs($module, empty($bean['hide_by_default']));
$tab_modules[] = $module;
} else {
$str .= "\$modules_exempt_from_availability_check['{$module}'] = '{$module}';\n";
$str .= "\$modInvisList[] = '{$module}';\n";
}
$installed_modules[] = $module;
} else {
$errors[] = 'Bean array not well defined.';
$this->abort($errors);
}
}
$str .= "\n?>";
if (!file_exists("custom/Extension/application/Ext/Include")) {
mkdir_recursive("custom/Extension/application/Ext/Include", true);
}
$out = sugar_fopen("custom/Extension/application/Ext/Include/{$this->id_name}.php", 'w');
fwrite($out, $str);
fclose($out);
$this->rebuild_modules();
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
foreach ($tasks as $task) {
$this->{$task}();
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
}
$this->install_beans($installed_modules);
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $total_steps, $total_steps);
}
if (isset($installdefs['custom_fields'])) {
$this->log(translate('LBL_MI_IN_CUSTOMFIELD'));
$this->install_custom_fields($installdefs['custom_fields']);
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
echo '</div>';
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
echo '</div>';
}
$selectedActions = array('clearTpls', 'clearJsFiles', 'clearDashlets', 'clearVardefs', 'clearJsLangFiles', 'rebuildAuditTables', 'repairDatabase');
VardefManager::clearVardef();
global $beanList, $beanFiles, $moduleList;
if (file_exists('custom/application/Ext/Include/modules.ext.php')) {
include 'custom/application/Ext/Include/modules.ext.php';
}
require_once "modules/Administration/upgrade_custom_relationships.php";
upgrade_custom_relationships($installed_modules);
$this->rebuild_all(true);
require_once 'modules/Administration/QuickRepairAndRebuild.php';
$rac = new RepairAndClear();
$rac->repairAndClearAll($selectedActions, $installed_modules, true, false);
$this->rebuild_relationships();
UpdateSystemTabs('Add', $tab_modules);
//clear the unified_search_module.php file
require_once 'modules/Home/UnifiedSearchAdvanced.php';
UnifiedSearchAdvanced::unlinkUnifiedSearchModulesFile();
$this->log('<br><b>' . translate('LBL_MI_COMPLETE') . '</b>');
} else {
die("No \$installdefs Defined In {$this->base_dir}/manifest.php");
}
}
示例14: deleteField
/**
* Deletes the field from fields_meta_data and drops the database column then it rebuilds the cache
* Use the widgets get_db_modify_alter_table() method to get the table sql - some widgets do not need any custom table modifications
* @param STRING $name - field name
*/
function deleteField($widget)
{
require_once 'modules/DynamicFields/templates/Fields/TemplateField.php';
global $beanList;
if (!$widget instanceof TemplateField) {
$field_name = $widget;
$widget = new TemplateField();
$widget->name = $field_name;
}
$object_name = $beanList[$this->module];
if ($object_name == 'aCase') {
$object_name = 'Case';
}
$GLOBALS['db']->query("DELETE FROM fields_meta_data WHERE id='" . $this->module . $widget->name . "'");
$sql = $widget->get_db_delete_alter_table($this->bean->table_name . "_cstm");
if (!empty($sql)) {
$GLOBALS['db']->query($sql);
}
$this->removeVardefExtension($widget);
VardefManager::clearVardef();
VardefManager::refreshVardefs($this->module, $object_name);
}
示例15: check_now
check_now(get_sugarbeat());
ob_end_clean();
logThis('End Updating the license ', $path);
set_upgrade_progress('end', 'done');
logThis('Cleaning up the session. Goodbye.');
unlinkUWTempFiles();
logThis('Cleaning up the session. Goodbye.');
resetUwSession();
// flag to say upgrade has completed
$_SESSION['upgrade_complete'] = true;
//Clear any third party caches
sugar_cache_reset_full();
//add the clean vardefs here
if (!class_exists('VardefManager')) {
}
VardefManager::clearVardef();
require_once 'include/TemplateHandler/TemplateHandler.php';
TemplateHandler::clearAll();
//also add the cache cleaning here.
if (function_exists('deleteCache')) {
deleteCache();
}
global $mod_strings;
global $current_language;
if (!isset($current_language) || $current_language == null) {
$current_language = 'en_us';
}
if (isset($GLOBALS['current_language']) && $GLOBALS['current_language'] != null) {
$current_language = $GLOBALS['current_language'];
}
$mod_strings = return_module_language($current_language, 'UpgradeWizard');