当前位置: 首页>>代码示例>>PHP>>正文


PHP RepairAndClear类代码示例

本文整理汇总了PHP中RepairAndClear的典型用法代码示例。如果您正苦于以下问题:PHP RepairAndClear类的具体用法?PHP RepairAndClear怎么用?PHP RepairAndClear使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RepairAndClear类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: zd_TicketsViewDetail

 function zd_TicketsViewDetail()
 {
     parent::SugarView();
     $repair = new RepairAndClear();
     $repair->module_list = array('zd_Tickets');
     $repair->clearTpls();
 }
开发者ID:nunoabc,项目名称:Web2,代码行数:7,代码来源:view.detail.php

示例2: action_savelanguages

 public function action_savelanguages()
 {
     global $sugar_config;
     $toDecode = html_entity_decode($_REQUEST['disabled_langs'], ENT_QUOTES);
     $disabled_langs = json_decode($toDecode);
     $toDecode = html_entity_decode($_REQUEST['enabled_langs'], ENT_QUOTES);
     $enabled_langs = json_decode($toDecode);
     if (count($sugar_config['languages']) === count($disabled_langs)) {
         sugar_die(translate('LBL_CAN_NOT_DISABLE_ALL_LANG'));
     } else {
         $cfg = new Configurator();
         if (in_array($sugar_config['default_language'], $disabled_langs)) {
             reset($enabled_langs);
             $cfg->config['default_language'] = current($enabled_langs);
         }
         if (in_array($GLOBALS['current_user']->preferred_language, $disabled_langs)) {
             $GLOBALS['current_user']->preferred_language = current($enabled_langs);
             $GLOBALS['current_user']->save();
         }
         $cfg->config['disabled_languages'] = join(',', $disabled_langs);
         // TODO: find way to enforce order
         $cfg->handleOverride();
         // Clear the metadata cache so changes to languages are picked up right away
         MetaDataManager::refreshLanguagesCache($enabled_langs);
         require_once 'modules/Administration/QuickRepairAndRebuild.php';
         $repair = new RepairAndClear();
         $repair->clearLanguageCache();
     }
     //Call Ping API to refresh the language list.
     die("\n            <script>\n            var app = window.parent.SUGAR.App;\n            app.api.call('read', app.api.buildURL('ping'));\n            app.router.navigate('#bwc/index.php?module=Administration&action=Languages', {trigger:true, replace:true});\n            </script>");
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:controller.php

示例3: display

    /**
     * @see SugarView::display()
     */
    public function display()
    {
        $randc = new RepairAndClear();
        $randc->repairAndClearAll(array('clearAll'), array(translate('LBL_ALL_MODULES')), false, true);
        echo <<<EOHTML
<br /><br /><a href="index.php?module=Administration&action=index">{$GLOBALS['mod_strings']['LBL_DIAGNOSTIC_DELETE_RETURN']}</a>
EOHTML;
    }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:11,代码来源:view.repair.php

示例4: run

 public function run()
 {
     // we just finished with the layouts, we need to rebuild the extensions
     include "include/modules.php";
     require_once "modules/Administration/QuickRepairAndRebuild.php";
     $rac = new RepairAndClear('', '', false, false);
     $rac->rebuildExtensions();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:8,代码来源:9_RebuildExtensions.php

示例5: post_install

function post_install()
{
    $autoexecute = false;
    //execute the SQL
    $show_output = true;
    //output to the screen
    require_once "modules/Administration/QuickRepairAndRebuild.php";
    $randc = new RepairAndClear();
    $randc->repairAndClearAll(array('clearAll', 'clearMetadataAPICache'), array(translate('LBL_ALL_MODULES')), $autoexecute, $show_output);
}
开发者ID:delkyd,项目名称:examples,代码行数:10,代码来源:post_install.php

示例6: tearDown

 public function tearDown()
 {
     if ($this->accountFieldWidget) {
         $this->accountFieldWidget->delete($this->accountField);
     }
     if ($this->opportunityFieldWidget) {
         $this->opportunityFieldWidget->delete($this->opportunityField);
     }
     $repair = new RepairAndClear();
     $repair->repairAndClearAll(array('rebuildExtensions', 'clearVardefs'), array($GLOBALS['beanList']['Accounts'], $GLOBALS['beanList']['Opportunities']), true, false);
     $_REQUEST = $_POST = array();
     SugarTestHelper::tearDown();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:13,代码来源:Bug56423Test.php

示例7: display

    /**
     * @see SugarView::display()
     */
    public function display()
    {
        // To prevent lag in the rendering of the page after clicking the quick repair link...
        echo "<h2>{$GLOBALS['mod_strings']['LBL_BEGIN_QUICK_REPAIR_AND_REBUILD']}</h2>";
        ob_flush();
        $randc = new RepairAndClear();
        $actions = array();
        $actions[] = 'clearAll';
        $randc->repairAndClearAll($actions, array(translate('LBL_ALL_MODULES')), false, true, '');
        echo <<<EOHTML
<br /><br /><a href="index.php?module=Administration&action=index">{$GLOBALS['mod_strings']['LBL_DIAGNOSTIC_DELETE_RETURN']}</a>
EOHTML;
    }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:16,代码来源:view.repair.php

示例8: createCustomField

 /**
  * Create the custom field with type 'relate'
  */
 protected function createCustomField()
 {
     $field = get_widget('relate');
     $field->id = 'Contacts' . $this->field_name_c;
     $field->name = $this->field_name_c;
     $field->type = 'relate';
     $field->label = 'LBL_' . strtoupper($this->field_name_c);
     $field->ext2 = 'Accounts';
     $field->view_module = 'Contacts';
     $this->relateField = $field;
     $this->bean = BeanFactory::getBean('Contacts');
     $this->df = new DynamicField($this->bean->module_name);
     $this->df->setup($this->bean);
     $field->save($this->df);
     $this->rc = new RepairAndClear();
     $this->rc->repairAndClearAll(array("rebuildExtensions", "clearVardefs"), array('Contact'), false, false);
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:20,代码来源:Bug52173Test.php

示例9: post_install

function post_install()
{
    if (strtolower($_POST['mode']) == 'install') {
        ?>
<br/>
	<h3>Advanced OpenSales by <a href="http://www.salesagility.com">SalesAgility</a></h3>
	<br/>
	German translation by Claudia Haring & Georg Schütz <a href="http://www.kamux.de">www.kamux.de</a><br/>
	Russian tranlsation by likhobory <a href="mailto:likhobory@mail.ru">likhobory@mail.ru</a><br/>
	Dutch translation by OpenSesame ICT <a href="http://www.osict.com">www.osict.com</a> <a href="mailto:bdm@osict.com">bdm@osict.com</a><br/>
	Finnish translation by Henri Vuolle <a href="mailto:henri.vuolle@kiwai.fi">henri.vuolle@kiwai.fi</a><br/>
	Italian translation by Andrea Motta<br/>
	Spanish translation by Morris X<br/>
	<br/><?php 
        $modules = array('AOS_Contracts', 'AOS_Invoices', 'AOS_PDF_Templates', 'AOS_Products', 'AOS_Products_Quotes', 'AOS_Quotes');
        $actions = array('clearAll', 'rebuildAuditTables', 'rebuildExtensions', 'repairDatabase');
        require_once 'modules/Administration/QuickRepairAndRebuild.php';
        $randc = new RepairAndClear();
        $randc->repairAndClearAll($actions, $modules, true, false);
        $_REQUEST['upgradeWizard'] = true;
        require_once 'modules/ACL/install_actions.php';
        unset($_REQUEST['upgradeWizard']);
    }
}
开发者ID:santara12,项目名称:advanced-opensales,代码行数:24,代码来源:post_install.php

示例10: die

<?php

if (!defined('sugarEntry') || !sugarEntry) {
    die('Not A Valid Entry Point');
}
global $db;
//***********************************************************//
//********** Restauramos los ficheros originales ************//
//***********************************************************//
echo "<b>Restored Files:</b><br/><br/>";
//***********************************************************//
//********** Restauramos los ficheros originales ************//
//***********************************************************//
echo "<br/><br/><br/><b>Modified Files:</b><br/><br/>";
echo "<br/><b>AlineaSol Repair Done.</b>";
//Repair and Rebuild
$module = array('All Modules');
$selected_actions = array('clearAll');
require_once 'modules/Administration/QuickRepairAndRebuild.php';
$randc = new RepairAndClear();
$randc->repairAndClearAll($selected_actions, $module, false, false);
//Repair and Rebuild
echo "<br/><b>SugarCRM Repair & Rebuild Done.</b>";
开发者ID:jeffcao,项目名称:fzglsys_v5,代码行数:23,代码来源:asolRepair.php

示例11: strtolower

                                if (is_array($entry) && isset($entry['name'])) {
                                    $parser->_viewdefs['panels'][$panel_id][$row_id][$entry_id]['name'] = strtolower($entry['name']);
                                }
                            }
                        }
                    }
                } else {
                    //For basic_search and advanced_search views, just process the fields
                    foreach ($parser->_viewdefs as $entry_id => $entry) {
                        if (is_array($entry) && isset($entry['name'])) {
                            $parser->_viewdefs[$entry_id]['name'] = strtolower($entry['name']);
                        }
                    }
                }
                //Save the changes
                $parser->handleSave(false);
            }
            //foreach
            //Now clear the cache of the .tpl files
            TemplateHandler::clearCache($module);
        }
        //foreach
        echo '<br>' . $mod_strings['LBL_CLEAR_VARDEFS_DATA_CACHE_TITLE'];
        require_once 'modules/Administration/QuickRepairAndRebuild.php';
        $repair = new RepairAndClear();
        $repair->show_output = false;
        $repair->module_list = array($class_names);
        $repair->clearVardefs();
    }
    echo '<br>' . $mod_strings['LBL_DIAGNOSTIC_DONE'];
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:31,代码来源:RepairFieldCasing.php

示例12: action_SaveField

 function action_SaveField()
 {
     require_once 'modules/DynamicFields/FieldCases.php';
     $field = get_widget($_REQUEST['type']);
     $_REQUEST['name'] = trim($_POST['name']);
     $field->populateFromPost();
     if (!isset($_REQUEST['view_package'])) {
         require_once 'modules/DynamicFields/DynamicField.php';
         if (!empty($_REQUEST['view_module'])) {
             $module = $_REQUEST['view_module'];
             $df = new DynamicField($module);
             $class_name = $GLOBALS['beanList'][$module];
             require_once $GLOBALS['beanFiles'][$class_name];
             $mod = new $class_name();
             $df->setup($mod);
             $field->save($df);
             $this->action_SaveLabel();
             include_once 'modules/Administration/QuickRepairAndRebuild.php';
             global $mod_strings;
             $mod_strings['LBL_ALL_MODULES'] = 'all_modules';
             $repair = new RepairAndClear();
             $repair->show_output = false;
             $repair->module_list = array($class_name);
             $repair->clearVardefs();
             //#28707 ,clear all the js files in cache
             $repair->module_list = array();
             $repair->clearJsFiles();
         }
     } else {
         $mb = new ModuleBuilder();
         $module =& $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']);
         $field->save($module);
         $module->mbvardefs->save();
         // get the module again to refresh the labels we might have saved with the $field->save (e.g., for address fields)
         $module =& $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']);
         if (isset($_REQUEST['label']) && isset($_REQUEST['labelValue'])) {
             $module->setLabel($GLOBALS['current_language'], $_REQUEST['label'], $_REQUEST['labelValue']);
         }
         $module->save();
     }
     $this->view = 'modulefields';
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:42,代码来源:controller.php

示例13: cleanUp

 /**
  * Clean up the Cache
  */
 protected function cleanUp()
 {
     // clear out any js cache, as the reports will screw up if they are not cleared
     require_once "modules/Administration/QuickRepairAndRebuild.php";
     $rac = new RepairAndClear();
     $rac->clearJsFiles();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:10,代码来源:OpportunityReports.php

示例14: logThis

global $unzip_dir;
global $path;
global $sugar_config;
if ($unzip_dir == null) {
    $unzip_dir = $_SESSION['unzip_dir'];
}
//First repair the databse to ensure it is up to date with the new vardefs/tabledefs
logThis('About to repair the database.', $path);
//Use Repair and rebuild to update the database.
global $dictionary, $beanFiles;
require_once 'modules/Trackers/TrackerManager.php';
$trackerManager = TrackerManager::getInstance();
$trackerManager->pause();
$trackerManager->unsetMonitors();
require_once "modules/Administration/QuickRepairAndRebuild.php";
$rac = new RepairAndClear();
$rac->clearVardefs();
$rac->rebuildExtensions();
//bug: 44431 - defensive check to ensure the method exists since upgrades to 6.2.0 may not have this method define yet.
if (method_exists($rac, 'clearExternalAPICache')) {
    $rac->clearExternalAPICache();
}
$repairedTables = array();
foreach ($beanFiles as $bean => $file) {
    if (file_exists($file)) {
        require_once $file;
        unset($GLOBALS['dictionary'][$bean]);
        $focus = new $bean();
        if ($focus instanceof SugarBean) {
            if (!isset($repairedTables[$focus->table_name])) {
                $sql = $GLOBALS['db']->repairTable($focus, true);
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:31,代码来源:end.php

示例15: 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");
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:65,代码来源:DeployedRelationships.php


注:本文中的RepairAndClear类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。