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


PHP PackageManager::performSetup方法代码示例

本文整理汇总了PHP中PackageManager::performSetup方法的典型用法代码示例。如果您正苦于以下问题:PHP PackageManager::performSetup方法的具体用法?PHP PackageManager::performSetup怎么用?PHP PackageManager::performSetup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PackageManager的用法示例。


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

示例1: post_install_modules

/**
*   This method will look for a file modules_post_install.php in the root directory and based on the
*   contents of this file, it will silently install any modules as specified in this array.
*/
function post_install_modules()
{
    if (is_file('modules_post_install.php')) {
        global $current_user, $mod_strings;
        $current_user = new User();
        $current_user->is_admin = '1';
        require_once 'ModuleInstall/PackageManager/PackageManager.php';
        require_once 'modules_post_install.php';
        //we now have the $modules_to_install array in memory
        $pm = new PackageManager();
        $old_mod_strings = $mod_strings;
        foreach ($modules_to_install as $module_to_install) {
            if (is_file($module_to_install)) {
                $pm->performSetup($module_to_install, 'module', false);
                $file_to_install = sugar_cached('upload/upgrades/module/') . basename($module_to_install);
                $_REQUEST['install_file'] = $file_to_install;
                $pm->performInstall($file_to_install);
            }
        }
        $mod_strings = $old_mod_strings;
    }
}
开发者ID:stefano6310,项目名称:SuiteCRM,代码行数:26,代码来源:install_utils.php

示例2: logThis

 case 'upload':
     logThis('running upload');
     $perform = false;
     $tempFile = '';
     if (isset($_REQUEST['release_id']) && $_REQUEST['release_id'] != "") {
         require_once 'ModuleInstall/PackageManager/PackageManager.php';
         $pm = new PackageManager();
         $tempFile = '';
         $perform = false;
         if (!empty($_SESSION['ML_PATCHES'])) {
             $release_map = $_SESSION['ML_PATCHES'][$_REQUEST['release_id']];
             if (!empty($release_map)) {
                 $tempFile = $pm->download($release_map['category_id'], $release_map['package_id'], $_REQUEST['release_id'], getcwd() . '/' . $sugar_config['upload_dir']);
                 $perform = true;
                 if ($release_map['type'] != 'patch') {
                     $pm->performSetup($tempFile, $release_map['type'], false);
                     header('Location: index.php?module=Administration&action=UpgradeWizard&view=module');
                 }
             }
         }
         $base_filename = urldecode($tempFile);
     } else {
         if (empty($_FILES['upgrade_zip']['tmp_name'])) {
             logThis('ERROR: no file uploaded!');
             echo $mod_strings['ERR_UW_NO_FILE_UPLOADED'];
             // add PHP error if isset
             if (isset($_FILES['upgrade_zip']['error']) && !empty($_FILES['upgrade_zip']['error'])) {
                 $out = "<b><span class='error'>{$mod_strings['ERR_UW_PHP_FILE_ERRORS'][$_FILES['upgrade_zip']['error']]}</span></b><br />";
             }
         } else {
             if (!move_uploaded_file($_FILES['upgrade_zip']['tmp_name'], getcwd() . '/' . $sugar_config['upload_dir'] . $_FILES['upgrade_zip']['name'])) {
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:upload.php


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