當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RepairAndClear::clearExternalAPICache方法代碼示例

本文整理匯總了PHP中RepairAndClear::clearExternalAPICache方法的典型用法代碼示例。如果您正苦於以下問題:PHP RepairAndClear::clearExternalAPICache方法的具體用法?PHP RepairAndClear::clearExternalAPICache怎麽用?PHP RepairAndClear::clearExternalAPICache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RepairAndClear的用法示例。


在下文中一共展示了RepairAndClear::clearExternalAPICache方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: RepairAndClear

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();
$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);
                logThis('Running sql:' . $sql, $path);
                $repairedTables[$focus->table_name] = true;
            }
            //Check to see if we need to create the audit table
            if ($focus->is_AuditEnabled() && !$focus->db->tableExists($focus->get_audit_table_name())) {
                logThis('Creating audit table:' . $focus->get_audit_table_name(), $path);
開發者ID:sysraj86,項目名稱:carnivalcrm,代碼行數:31,代碼來源:end.php

示例2: run

 public function run()
 {
     global $dictionary, $beanFiles;
     include "include/modules.php";
     require_once "modules/Administration/QuickRepairAndRebuild.php";
     $rac = new RepairAndClear('', '', false, false);
     $rac->clearVardefs();
     $rac->rebuildExtensions();
     $rac->clearExternalAPICache();
     // this is dirty, but otherwise SugarBean caches old defs :(
     $GLOBALS['reload_vardefs'] = true;
     $repairedTables = array();
     foreach ($beanFiles as $bean => $file) {
         if (file_exists($file)) {
             unset($GLOBALS['dictionary'][$bean]);
             require_once $file;
             $focus = new $bean();
             if (empty($focus->table_name) || isset($repairedTables[$focus->table_name])) {
                 continue;
             }
             if ($focus instanceof SugarBean) {
                 if (!isset($repairedTables[$focus->table_name])) {
                     $sql = $this->db->repairTable($focus, true);
                     if (trim($sql) != '') {
                         $this->log('Running sql: ' . $sql);
                     }
                     $repairedTables[$focus->table_name] = true;
                 }
                 //Check to see if we need to create the audit table
                 if ($focus->is_AuditEnabled() && !$focus->db->tableExists($focus->get_audit_table_name())) {
                     $this->log('Creating audit table:' . $focus->get_audit_table_name());
                     $focus->create_audit_table();
                 }
             }
         }
     }
     unset($dictionary);
     include "modules/TableDictionary.php";
     foreach ($dictionary as $meta) {
         $tablename = $meta['table'];
         if (isset($repairedTables[$tablename])) {
             continue;
         }
         $fielddefs = $meta['fields'];
         $indices = $meta['indices'];
         $sql = $this->db->repairTableParams($tablename, $fielddefs, $indices, true);
         if (!empty($sql)) {
             $this->log('Running sql: ' . $sql);
             $repairedTables[$tablename] = true;
         }
     }
     $this->log('Database repaired');
     $this->log('Start rebuilding relationships');
     $_REQUEST['silent'] = true;
     include 'modules/Administration/RebuildRelationship.php';
     $_REQUEST['upgradeWizard'] = true;
     include 'modules/ACL/install_actions.php';
     $this->log('Done rebuilding relationships');
     unset($GLOBALS['reload_vardefs']);
     // enable metadata caching once the database schema has been rebuilt
     MetaDataManager::enableCache();
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:62,代碼來源:2_Rebuild.php


注:本文中的RepairAndClear::clearExternalAPICache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。