• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getInstallType函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: die

if (!isset($_REQUEST['version'])) {
    die($mod_strings['ERR_UW_NO_MODE']);
}
$version = $_REQUEST['version'];
if (!isset($_REQUEST['copy_count']) || $_REQUEST['copy_count'] == "") {
    die($mod_strings['ERR_UW_NO_FILES']);
}
if (!isset($_REQUEST['unzip_dir']) || $_REQUEST['unzip_dir'] == "") {
    die($mod_strings['ERR_UW_NO_TEMP_DIR']);
}
$unzip_dir = $_REQUEST['unzip_dir'];
if (empty($_REQUEST['install_file'])) {
    die($mod_strings['ERR_UW_NO_INSTALL_FILE']);
}
$install_file = hashToFile($_REQUEST['install_file']);
$install_type = getInstallType($install_file);
$id_name = '';
if (isset($_REQUEST['id_name'])) {
    $id_name = $_REQUEST['id_name'];
}
$s_manifest = '';
if (isset($_REQUEST['s_manifest'])) {
    $s_manifest = $_REQUEST['s_manifest'];
}
$previous_version = '';
if (isset($_REQUEST['previous_version'])) {
    $previous_version = $_REQUEST['previous_version'];
}
$previous_id = '';
if (isset($_REQUEST['previous_id'])) {
    $previous_id = $_REQUEST['previous_id'];
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:UpgradeWizard_commit.php


示例2: validate_manifest

function validate_manifest($manifest)
{
    // takes a manifest.php manifest array and validates contents
    global $subdirs;
    global $sugar_version;
    global $sugar_flavor;
    global $mod_strings;
    if (!isset($manifest['type'])) {
        die($mod_strings['ERROR_MANIFEST_TYPE']);
    }
    $type = $manifest['type'];
    if (getInstallType("/{$type}/") == "") {
        die($mod_strings['ERROR_PACKAGE_TYPE'] . ": '" . $type . "'.");
    }
    if (isset($manifest['acceptable_sugar_versions'])) {
        $version_ok = false;
        $matches_empty = true;
        if (isset($manifest['acceptable_sugar_versions']['exact_matches'])) {
            $matches_empty = false;
            foreach ($manifest['acceptable_sugar_versions']['exact_matches'] as $match) {
                if ($match == $sugar_version) {
                    $version_ok = true;
                }
            }
        }
        if (!$version_ok && isset($manifest['acceptable_sugar_versions']['regex_matches'])) {
            $matches_empty = false;
            foreach ($manifest['acceptable_sugar_versions']['regex_matches'] as $match) {
                if (preg_match("/{$match}/", $sugar_version)) {
                    $version_ok = true;
                }
            }
        }
        if (!$matches_empty && !$version_ok) {
            die($mod_strings['ERROR_VERSION_INCOMPATIBLE'] . $sugar_version);
        }
    }
    if (isset($manifest['acceptable_sugar_flavors']) && sizeof($manifest['acceptable_sugar_flavors']) > 0) {
        $flavor_ok = false;
        foreach ($manifest['acceptable_sugar_flavors'] as $match) {
            if ($match == $sugar_flavor) {
                $flavor_ok = true;
            }
        }
        if (!$flavor_ok) {
            die($mod_strings['ERROR_FLAVOR_INCOMPATIBLE'] . $sugar_flavor);
        }
    }
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:49,代码来源:UpgradeWizardCommon.php


示例3: validate_manifest

 /**
  * Verifies a manifest from a patch or module to be compatible with the current Sugar version and flavor
  * @param array manifest Standard manifest array
  * @return string Error message, blank on success
  */
 function validate_manifest($manifest)
 {
     logThis('validating manifest.php file');
     // takes a manifest.php manifest array and validates contents
     global $subdirs;
     global $sugar_version;
     global $sugar_config;
     global $sugar_flavor;
     global $mod_strings;
     include_once 'suitecrm_version.php';
     if (!isset($manifest['type'])) {
         return $mod_strings['ERROR_MANIFEST_TYPE'];
     }
     $type = $manifest['type'];
     if (getInstallType("/{$type}/") == "") {
         return $mod_strings['ERROR_PACKAGE_TYPE'] . ": '" . $type . "'.";
     }
     if (isset($manifest['acceptable_php_versions'])) {
         $version_ok = false;
         $matches_empty = true;
         if (isset($manifest['acceptable_php_versions']['exact_matches'])) {
             $matches_empty = false;
             foreach ($manifest['acceptable_php_versions']['exact_matches'] as $match) {
                 if ($match == PHP_VERSION) {
                     $version_ok = true;
                 }
             }
         }
         if (!$version_ok && isset($manifest['acceptable_php_versions']['regex_matches'])) {
             $matches_empty = false;
             foreach ($manifest['acceptable_php_versions']['regex_matches'] as $match) {
                 if (preg_match("/{$match}/", PHP_VERSION)) {
                     $version_ok = true;
                 }
             }
         }
         if (!$matches_empty && !$version_ok) {
             return $mod_strings['ERROR_PHP_VERSION_INCOMPATIBLE'] . "<br />" . $mod_strings['ERR_UW_PHP_VERSION'] . PHP_VERSION;
         }
     }
     if (!isset($manifest['acceptable_suitecrm_versions'])) {
         // If sugarcrm version set 'acceptable_sugar_versions', and acceptable_suitecrm_versions not set check on sugar version.
         if (isset($manifest['acceptable_sugar_versions'])) {
             $version_ok = false;
             $matches_empty = true;
             if (isset($manifest['acceptable_sugar_versions']['exact_matches'])) {
                 $matches_empty = false;
                 foreach ($manifest['acceptable_sugar_versions']['exact_matches'] as $match) {
                     if ($match == $sugar_version) {
                         $version_ok = true;
                     }
                 }
             }
             if (!$version_ok && isset($manifest['acceptable_sugar_versions']['regex_matches'])) {
                 $matches_empty = false;
                 foreach ($manifest['acceptable_sugar_versions']['regex_matches'] as $match) {
                     if (preg_match("/{$match}/", $sugar_version)) {
                         $version_ok = true;
                     }
                 }
             }
             if (!$matches_empty && !$version_ok) {
                 return $mod_strings['ERROR_VERSION_INCOMPATIBLE'] . "<br />" . $mod_strings['ERR_UW_VERSION'] . $sugar_version;
             }
         } else {
             // if neither set reject
             return $mod_strings['ERROR_NO_VERSION_SET'];
         }
     } else {
         // If sugarcrm version set 'acceptable_sugar_versions', and acceptable_suitecrm_versions set check only on suitecrm version
         // If sugarcrm version not set 'acceptable_sugar_versions', and acceptable_suitecrm_versions set check only on suitecrm version
         $version_ok = false;
         $matches_empty = true;
         if (isset($manifest['acceptable_suitecrm_versions']['exact_matches'])) {
             $matches_empty = false;
             foreach ($manifest['acceptable_suitecrm_versions']['exact_matches'] as $match) {
                 if ($match == $suitecrm_version) {
                     $version_ok = true;
                 }
             }
         }
         if (!$version_ok && isset($manifest['acceptable_suitecrm_versions']['regex_matches'])) {
             $matches_empty = false;
             foreach ($manifest['acceptable_suitecrm_versions']['regex_matches'] as $match) {
                 if (preg_match("/{$match}/", $suitecrm_version)) {
                     $version_ok = true;
                 }
             }
         }
         if (!$matches_empty && !$version_ok) {
             return $mod_strings['ERROR_SUITECRM_VERSION_INCOMPATIBLE'] . "<br />" . $mod_strings['ERR_UW_SUITECRM_VERSION'] . $suitecrm_version;
         }
     }
     if (isset($manifest['acceptable_sugar_flavors']) && sizeof($manifest['acceptable_sugar_flavors']) > 0) {
         $flavor_ok = false;
//.........这里部分代码省略.........
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:101,代码来源:uw_utils.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getInstance函数代码示例发布时间:2022-05-15
下一篇:
PHP getInstallDbInstance函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap