Esempio n. 1
0
    foreach ($bottle as $bottle_message) {
        $bottleMsg .= "{$bottle_message}\n";
    }
} else {
    $bottleMsg = $mod_strings['LBL_PERFORM_SUCCESS'];
}
installerHook('post_installModules');
installerHook('pre_handleMissingSmtpServerSettingsNotifications');
handleMissingSmtpServerSettingsNotifications();
installerHook('post_handleMissingSmtpServerSettingsNotifications');
// rebuild cache after all is said and done
installLog("Populating file cache");
SugarAutoLoader::buildCache();
// Build the base platform metadata caches after everything else is done.
installLog("Populating metadata cache");
MetaDataManager::enableCache();
$app_list_strings = return_app_list_strings_language('en_us');
MetaDataManager::setupMetadata(array('base'), array('en_us'));
// TODO: Remove the following. (See MAR-1314)
// Restore the activity stream behaviour.
Activity::enable();
installerHook('post_performSetup');
$out = <<<EOQ
<br><p><b>{$mod_strings['LBL_PERFORM_OUTRO_1']} {$setup_sugar_version} {$mod_strings['LBL_PERFORM_OUTRO_2']}</b></p>

{$mod_strings['LBL_PERFORM_OUTRO_3']} {$deltaTime} {$mod_strings['LBL_PERFORM_OUTRO_4']}<br />
{$memoryUsed}
{$errTcpip}
    </td>
</tr>
<tr>
Esempio n. 2
0
 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();
 }