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


PHP installerHook函数代码示例

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


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

示例1: installerHook

$tabs->set_system_tabs($enabled_tabs);
installerHook('post_setSystemTabs');
post_install_modules();
//Call rebuildSprites
if (function_exists('imagecreatetruecolor')) {
    require_once 'modules/UpgradeWizard/uw_utils.php';
    rebuildSprites(true);
}
if (count($bottle) > 0) {
    foreach ($bottle as $bottle_message) {
        $bottleMsg .= "{$bottle_message}\n";
    }
} else {
    $bottleMsg = $mod_strings['LBL_PERFORM_SUCCESS'];
}
installerHook('post_installModules');
$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>
<td align="right" colspan="2">
<hr>
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
<tr>
<td>
{$fpResult}
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:31,代码来源:performSetup.php

示例2: create_writable_dir

            create_writable_dir(sugar_cached('modules'));
            create_writable_dir(sugar_cached('layout'));
            create_writable_dir(sugar_cached('pdf'));
            create_writable_dir(sugar_cached('upload/import'));
            create_writable_dir(sugar_cached('xml'));
            create_writable_dir(sugar_cached('include/javascript'));
            recursive_make_writable(sugar_cached('modules'));
            // check whether we're getting this request from a command line tool
            // we want to output brief messages if we're outputting to a command line tool
            $cli_mode = false;
            if (isset($_REQUEST['cli']) && $_REQUEST['cli'] == 'true') {
                $_SESSION['cli'] = true;
                // if we have errors, just shoot them back now
                if (count($validation_errors) > 0) {
                    foreach ($validation_errors as $error) {
                        print $mod_strings['ERR_ERROR_GENERAL'] . "\n";
                        print "    " . $error . "\n";
                        print "Exit 1\n";
                        exit(1);
                    }
                }
            }
            break;
    }
}
$the_file = clean_string($the_file, 'FILE');
installerHook('pre_installFileRequire', array('the_file' => $the_file));
// change to require to get a good file load error message if the file is not available.
require 'install/' . $the_file;
installerHook('post_installFileRequire', array('the_file' => $the_file));
开发者ID:switcode,项目名称:SuiteCRM,代码行数:30,代码来源:install.php

示例3: create_writable_dir

            create_writable_dir(sugar_cached('modules'));
            create_writable_dir(sugar_cached('layout'));
            create_writable_dir(sugar_cached('pdf'));
            create_writable_dir(sugar_cached('upload/import'));
            create_writable_dir(sugar_cached('xml'));
            create_writable_dir(sugar_cached('include/javascript'));
            recursive_make_writable(sugar_cached('modules'));
            // check whether we're getting this request from a command line tool
            // we want to output brief messages if we're outputting to a command line tool
            $cli_mode = false;
            if (isset($_REQUEST['cli']) && $_REQUEST['cli'] == 'true') {
                $_SESSION['cli'] = true;
                // if we have errors, just shoot them back now
                if (count($validation_errors) > 0) {
                    foreach ($validation_errors as $error) {
                        print $mod_strings['ERR_ERROR_GENERAL'] . "\n";
                        print "    " . $error . "\n";
                        print "Exit 1\n";
                        exit(1);
                    }
                }
            }
            break;
    }
}
$the_file = clean_string($the_file, 'FILE');
installerHook('pre_installFileRequire', ['the_file' => $the_file]);
// change to require to get a good file load error message if the file is not available.
require 'install/' . $the_file;
installerHook('post_installFileRequire', ['the_file' => $the_file]);
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:30,代码来源:install.php

示例4: runCheck


//.........这里部分代码省略.........
        }
        $error_txt .= '
            </td>
          </tr>';
    } else {
        installLog("/module  directory and subdirectory check passed");
    }
    // check upload dir
    if (!make_writable('./upload')) {
        $uploadStatus = "<b><span class='stop'>{$mod_strings['ERR_CHECKSYS_NOT_WRITABLE']}</span></b>";
        installLog("ERROR: Upload directory is not writable.");
        $error_found = true;
        $error_txt .= '
    <tr>
        <td><strong>' . $mod_strings['LBL_CHECKSYS_UPLOAD'] . '</strong></td>
        <td align="right" class="error">' . $uploadStatus . '</td>
    </tr>';
    } else {
        installLog("/upload directory check passed");
    }
    // check zip file support
    if (!class_exists("ZipArchive")) {
        $zipStatus = "<span class='stop'><b>{$mod_strings['ERR_CHECKSYS_ZIP']}</b></span>";
        installLog("ERROR: Zip support not found.");
        $error_found = true;
        $error_txt .= '
          <tr>
            <td><strong>' . $mod_strings['LBL_CHECKSYS_ZIP'] . '</strong></td>
            <td  align="right" class="error">' . $zipStatus . '</td>
          </tr>';
    } else {
        installLog("/zip check passed");
    }
    $customSystemChecks = installerHook('additionalCustomSystemChecks');
    if ($customSystemChecks != 'undefined') {
        if ($customSystemChecks['error_found'] == true) {
            $error_found = true;
        }
        if (!empty($customSystemChecks['error_txt'])) {
            $error_txt .= $customSystemChecks['error_txt'];
        }
    }
    // PHP.ini
    $phpIniLocation = get_cfg_var("cfg_file_path");
    installLog("php.ini location found. {$phpIniLocation}");
    // disable form if error found
    if ($error_found) {
        installLog("Outputting HTML for System check");
        installLog("Errors were found *************");
        $disabled = $error_found ? 'disabled="disabled"' : '';
        $help_url = get_help_button_url();
        ///////////////////////////////////////////////////////////////////////////////
        ////    BEGIN PAGE OUTPUT
        $out = <<<EOQ

  <table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
    <tr>
      <th width="400">{$mod_strings['LBL_CHECKSYS_TITLE']}</th>
      <th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target=
      "_blank"><IMG src="include/images/sugarcrm_login.png" alt="SugarCRM" border="0"></a>
       <br><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a>
       </th>
    </tr>

    <tr>
      <td colspan="2" width="600">
开发者ID:omusico,项目名称:sugar_work,代码行数:67,代码来源:installSystemCheck.php

示例5: installerHook

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>
<td align="right" colspan="2">
<hr>
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
<tr>
<td>
{$fpResult}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:performSetup.php


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