本文整理汇总了PHP中sugar_cached函数的典型用法代码示例。如果您正苦于以下问题:PHP sugar_cached函数的具体用法?PHP sugar_cached怎么用?PHP sugar_cached使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sugar_cached函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: buildActionCache
static function buildActionCache($silent = true)
{
if (!is_dir(ActionFactory::$action_directory)) {
return false;
}
// First get a list of all the files in this directory.
$entries = array();
$actions = array();
$javascript = "";
foreach (SugarAutoLoader::getFilesCustom(ActionFactory::$action_directory) as $path) {
$entry = basename($path);
if (strtolower(substr($entry, -4)) != ".php" || in_array($entry, ActionFactory::$exclude_files)) {
continue;
}
require_once $path;
$className = substr($entry, 0, strlen($entry) - 4);
$actionName = call_user_func(array($className, "getActionName"));
$actions[$actionName] = array('class' => $className, 'file' => $path);
$javascript .= call_user_func(array($className, "getJavascriptClass"));
if (!$silent) {
echo "added action {$actionName} <br/>";
}
}
if (empty($actions)) {
return "";
}
create_cache_directory("Expressions/actions_cache.php");
write_array_to_file('actions', $actions, sugar_cached('Expressions/actions_cache.php'));
ActionFactory::$loaded_actions = $actions;
return $javascript;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:ActionFactory.php
示例2: setUp
public function setUp()
{
//Just need base class but its abstract so we use the google implementation for this test.
$this->extAPI = new ExtAPIGoogle();
$this->fileData1 = sugar_cached('unittest');
file_put_contents($this->fileData1, "Unit test for mime type");
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:7,代码来源:Bug43652.php
示例3: tearDown
public function tearDown()
{
$GLOBALS['db']->query("DELETE FROM contacts WHERE id= '{$this->_contact->id}'");
unset($this->_contact);
if ($this->_hasUnifiedSearchModulesConfig) {
copy(sugar_cached('modules/unified_search_modules.php.bak'), sugar_cached('modules/unified_search_modules.php'));
unlink(sugar_cached('modules/unified_search_modules.php.bak'));
} else {
unlink(sugar_cached('modules/unified_search_modules.php'));
}
if ($this->_hasUnifiedSearchModulesDisplay) {
copy('custom/modules/unified_search_modules_display.php.bak', 'custom/modules/unified_search_modules_display.php');
unlink('custom/modules/unified_search_modules_display.php.bak');
} else {
unlink('custom/modules/unified_search_modules_display.php');
}
SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
if (isset($_REQUEST['module'])) {
unset($_REQUEST['module']);
}
if (isset($_REQUEST['query_string'])) {
unset($_REQUEST['query_string']);
}
if (isset($_REQUEST['enabled_modules'])) {
unset($_REQUEST['enabled_modules']);
}
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:27,代码来源:UnifiedSearchAdvancedTest.php
示例4: run
public function run()
{
if (is_file(sugar_cached('dashlets/dashlets.php'))) {
unlink(sugar_cached('dashlets/dashlets.php'));
}
require_once 'include/Dashlets/DashletCacheBuilder.php';
$dc = new DashletCacheBuilder();
$dc->buildCache();
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:9,代码来源:3_RebuildDashlets.php
示例5: setUp
public function setUp()
{
$this->testdir = sugar_cached("tests/include/utils/ziptest");
sugar_mkdir($this->testdir . '/testarchive', null, true);
sugar_touch($this->testdir . '/testarchive/testfile1.txt');
sugar_touch($this->testdir . '/testarchive/testfile2.txt');
sugar_touch($this->testdir . '/testarchive/testfile3.txt');
sugar_mkdir($this->testdir . '/testarchiveoutput', null, true);
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:9,代码来源:ZipTest.php
示例6: extractFile
function extractFile($zip_file, $file_in_zip)
{
global $base_tmp_upgrade_dir;
if (empty($base_tmp_upgrade_dir)) {
$base_tmp_upgrade_dir = sugar_cached("upgrades/temp");
}
$my_zip_dir = mk_temp_dir($base_tmp_upgrade_dir);
unzip_file($zip_file, $file_in_zip, $my_zip_dir);
return "{$my_zip_dir}/{$file_in_zip}";
}
开发者ID:sunmo,项目名称:snowlotus,代码行数:10,代码来源:UpgradeWizardCommon.php
示例7: extractFile
public static function extractFile($zip_file, $file_in_zip)
{
global $base_tmp_upgrade_dir;
if (empty($base_tmp_upgrade_dir)) {
$base_tmp_upgrade_dir = sugar_cached("upgrades/temp");
}
$my_zip_dir = mk_temp_dir($base_tmp_upgrade_dir);
register_shutdown_function('rmdir_recursive', $my_zip_dir);
unzip_file($zip_file, $file_in_zip, $my_zip_dir);
return "{$my_zip_dir}/{$file_in_zip}";
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:11,代码来源:UpgradeWizardCommon.php
示例8: setUp
public function setUp()
{
if (!class_exists('ZipArchive')) {
$this->markTestSkipped('ZipArchive class not loaded');
}
$this->testdir = sugar_cached("tests/include/utils/ziptest");
sugar_mkdir($this->testdir . '/testarchive', null, true);
sugar_touch($this->testdir . '/testarchive/testfile1.txt');
sugar_touch($this->testdir . '/testarchive/testfile2.txt');
sugar_touch($this->testdir . '/testarchive/testfile3.txt');
sugar_mkdir($this->testdir . '/testarchiveoutput', null, true);
}
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:12,代码来源:ZipTest.php
示例9: create_cache_directory
function create_cache_directory($file)
{
$paths = explode('/', $file);
$dir = rtrim(sugar_cached(""), '/');
if (!file_exists($dir)) {
sugar_mkdir($dir, 0775);
}
for ($i = 0; $i < sizeof($paths) - 1; $i++) {
$dir .= '/' . $paths[$i];
if (!file_exists($dir)) {
sugar_mkdir($dir, 0775);
}
}
return $dir . '/' . $paths[sizeof($paths) - 1];
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:file_utils.php
示例10: __construct
function __construct()
{
global $sugar_config;
$config = HTMLPurifier_Config::createDefault();
if (!is_dir(sugar_cached("htmlclean"))) {
create_cache_directory("htmlclean/");
}
$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
$config->set('Core.Encoding', 'UTF-8');
$hidden_tags = array('script' => true, 'style' => true, 'title' => true, 'head' => true);
$config->set('Core.HiddenElements', $hidden_tags);
$config->set('Cache.SerializerPath', sugar_cached("htmlclean"));
$config->set('URI.Base', $sugar_config['site_url']);
$config->set('CSS.Proprietary', true);
$config->set('HTML.TidyLevel', 'light');
$config->set('HTML.ForbiddenElements', array('body' => true, 'html' => true));
$config->set('AutoFormat.RemoveEmpty', false);
$config->set('Cache.SerializerPermissions', 0775);
// for style
//$config->set('Filter.ExtractStyleBlocks', true);
$config->set('Filter.ExtractStyleBlocks.TidyImpl', false);
// can't use csstidy, GPL
if (!empty($GLOBALS['sugar_config']['html_allow_objects'])) {
// for object
$config->set('HTML.SafeObject', true);
// for embed
$config->set('HTML.SafeEmbed', true);
}
$config->set('Output.FlashCompat', true);
// for iframe and xmp
$config->set('Filter.Custom', array(new HTMLPurifier_Filter_Xmp()));
// for link
$config->set('HTML.DefinitionID', 'Sugar HTML Def');
$config->set('HTML.DefinitionRev', 2);
$config->set('Cache.SerializerPath', sugar_cached('htmlclean/'));
// IDs are namespaced
$config->set('Attr.EnableID', true);
$config->set('Attr.IDPrefix', 'sugar_text_');
if ($def = $config->maybeGetRawHTMLDefinition()) {
$form = $def->addElement('link', 'Flow', 'Empty', 'Core', array('href*' => 'URI', 'rel' => 'Enum#stylesheet', 'type' => 'Enum#text/css'));
$iframe = $def->addElement('iframe', 'Flow', 'Optional: #PCDATA | Flow | Block', 'Core', array('src*' => 'URI', 'frameborder' => 'Enum#0,1', 'marginwidth' => 'Pixels', 'marginheight' => 'Pixels', 'scrolling' => 'Enum#|yes,no,auto', 'align' => 'Enum#top,middle,bottom,left,right,center', 'height' => 'Length', 'width' => 'Length'));
$iframe->excludes = array('iframe');
}
$uri = $config->getDefinition('URI');
$uri->addFilter(new SugarURIFilter(), $config);
HTMLPurifier_URISchemeRegistry::instance()->register('cid', new HTMLPurifier_URIScheme_cid());
$this->purifier = new HTMLPurifier($config);
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:48,代码来源:clean.php
示例11: display
function display()
{
global $app_strings, $current_user, $mod_strings, $theme, $beanList, $beanFiles;
if (!is_file($cachefile = sugar_cached('Expressions/functionmap.php'))) {
$GLOBALS['updateSilent'] = true;
include 'include/Expressions/updatecache.php';
}
include $cachefile;
require_once 'include/JSON.php';
$desc = "";
if (!empty($_REQUEST['function']) && !empty($FUNCTION_MAP[$_REQUEST['function']])) {
$func_def = $FUNCTION_MAP[$_REQUEST['function']];
require_once $func_def['src'];
$class = new ReflectionClass($func_def['class']);
$doc = $class->getDocComment();
if (!empty($doc)) {
//Remove the javadoc style comment *'s
$desc = preg_replace("/((\\/\\*+)|(\\*+\\/)|(\n\\s*\\*)[^\\/])/", "", $doc);
} else {
if (isset($mod_strings['func_descriptions'][$_REQUEST['function']])) {
$desc = $mod_strings['func_descriptions'][$_REQUEST['function']];
} else {
$seed = $func_def['class'];
$count = call_user_func(array($seed, "getParamCount"));
$type = call_user_func(array($seed, "getParameterTypes"));
$desc = $_REQUEST['function'] . "(";
if ($count == -1) {
$desc .= $type . ", ...";
} else {
for ($i = 0; $i < $count; $i++) {
if ($i != 0) {
$desc .= ", ";
}
if (is_array($type)) {
$desc .= $type[$i] . ($i + 1);
} else {
$desc .= $type . ($i + 1);
}
}
}
$desc .= ")";
}
}
} else {
$desc = "function not found";
}
echo json_encode(array("func" => empty($_REQUEST['function']) ? "" : $_REQUEST['function'], "desc" => $desc));
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:48,代码来源:view.functiondetail.php
示例12: testSugarCacheFile
public function testSugarCacheFile()
{
if (file_exists(sugar_cached("testevil.php"))) {
@unlink(sugar_cached("testevil.php"));
}
$obj = 'test';
try {
$obj = unserialize('O:14:"SugarCacheFile":3:{s:13:"_cacheChanged";b:1;s:14:"_cacheFileName";s:12:"testevil.php";s:11:"_localStore";b:1;}');
} catch (Exception $e) {
$obj = null;
}
$this->assertNull($obj);
unset($obj);
// call dtor if object created
$this->assertFileNotExists(sugar_cached("testevil.php"));
}
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:16,代码来源:SerializeEvilTest.php
示例13: __construct
public function __construct()
{
$this->queue = new SugarJobQueue();
$this->lockfile = sugar_cached("modules/Schedulers/lastrun");
if (!empty($GLOBALS['sugar_config']['cron']['max_cron_jobs'])) {
$this->max_jobs = $GLOBALS['sugar_config']['cron']['max_cron_jobs'];
}
if (!empty($GLOBALS['sugar_config']['cron']['max_cron_runtime'])) {
$this->max_runtime = $GLOBALS['sugar_config']['cron']['max_cron_runtime'];
}
if (isset($GLOBALS['sugar_config']['cron']['min_cron_interval'])) {
$this->min_interval = $GLOBALS['sugar_config']['cron']['min_cron_interval'];
}
if (isset($GLOBALS['sugar_config']['cron']['enforce_runtime'])) {
$this->enforceHardLimit = $GLOBALS['sugar_config']['cron']['enforce_runtime'];
}
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:17,代码来源:SugarCronJobs.php
示例14: getJSLanguage
/**
* Retrieves the requested js language file, building it if it doesn't exist.
*/
function getJSLanguage()
{
require_once 'include/language/jsLanguage.php';
global $app_list_strings;
if (empty($_REQUEST['lang'])) {
echo "No language specified";
return;
}
$lang = clean_path($_REQUEST['lang']);
$languages = get_languages();
if (!preg_match("/^\\w\\w_\\w\\w\$/", $lang) || !isset($languages[$lang])) {
if (!preg_match("/^\\w\\w_\\w\\w\$/", $lang)) {
echo "did not match regex<br/>";
} else {
echo "{$lang} was not in list . <pre>" . print_r($languages, true) . "</pre>";
}
echo "Invalid language specified";
return;
}
if (empty($_REQUEST['module']) || $_REQUEST['module'] === 'app_strings') {
$file = sugar_cached('jsLanguage/') . $lang . '.js';
if (!sugar_is_file($file)) {
$jsLanguage = new jsLanguage();
$jsLanguage->createAppStringsCache($lang);
}
} else {
$module = clean_path($_REQUEST['module']);
$fullModuleList = array_merge($GLOBALS['moduleList'], $GLOBALS['modInvisList']);
if (!isset($app_list_strings['moduleList'][$module]) && !in_array($module, $fullModuleList)) {
echo "Invalid module specified";
return;
}
$file = sugar_cached('jsLanguage/') . $module . "/" . $lang . '.js';
if (!sugar_is_file($file)) {
jsLanguage::createModuleStringsCache($module, $lang);
}
}
//Setup cache headers
header("Content-Type: application/javascript");
header("Cache-Control: max-age=31556940, private");
header("Pragma: ");
header("Expires: " . gmdate('D, d M Y H:i:s \\G\\M\\T', time() + 31556940));
readfile($file);
}
开发者ID:BilalArcher,项目名称:SuiteCRM,代码行数:47,代码来源:getJSLanguage.php
示例15: SearchForm
/**
* loads SearchFields MetaData, sets member variables
*
* @param string $module moduleDir
* @param bean $seedBean seed bean to use
* @param string $tpl template to use, defaults to moduleDir/SearchForm.html
*
*/
function SearchForm($module, $seedBean, $tpl = null)
{
global $app_strings;
$this->module = $module;
$searchFields = SugarAutoLoader::loadSearchFields($module);
$this->searchFields = $searchFields[$module];
if (empty($tpl)) {
if (!empty($GLOBALS['layout_edit_mode'])) {
$this->tpl = sugar_cached('studio/custom/working/modules/' . $module . '/SearchForm.html');
} else {
$this->tpl = get_custom_file_if_exists('modules/' . $module . '/SearchForm.html');
}
} else {
$this->tpl = $tpl;
}
$this->bean = $seedBean;
$this->tabs = array(array('title' => $app_strings['LNK_BASIC_SEARCH'], 'link' => $module . '|basic_search', 'key' => $module . '|basic_search'), array('title' => $app_strings['LNK_ADVANCED_SEARCH'], 'link' => $module . '|advanced_search', 'key' => $module . '|advanced_search'));
if (SugarAutoLoader::fileExists('modules/' . $this->module . '/index.php')) {
$this->tabs[] = array('title' => $app_strings['LNK_SAVED_VIEWS'], 'link' => $module . '|saved_views', 'key' => $module . '|saved_views');
}
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:29,代码来源:SearchForm.php
示例16: tearDown
public function tearDown()
{
if (isset($GLOBALS['listViewDefs'])) {
unset($GLOBALS['listViewDefs']);
}
if (isset($GLOBALS['viewdefs'])) {
unset($GLOBALS['viewdefs']);
}
unset($GLOBALS['app_list_strings']);
unset($GLOBALS['app_strings']);
unset($GLOBALS['mod_strings']);
if (!empty($this->unified_search_modules_content)) {
file_put_contents(sugar_cached('modules/unified_search_modules.php'), $this->unified_search_modules_content);
}
$GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM calls WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM tasks WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM meetings WHERE name like 'UNIT TEST%' ");
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:21,代码来源:RESTAPI3Test.php
示例17: addDashlet
function addDashlet()
{
if (!is_file(sugar_cached('dashlets/dashlets.php'))) {
require_once 'include/Dashlets/DashletCacheBuilder.php';
$dc = new DashletCacheBuilder();
$dc->buildCache();
}
require_once sugar_cached('dashlets/dashlets.php');
global $current_user;
if (isset($_REQUEST['id'])) {
$pages = $current_user->getPreference('pages', $this->type);
$dashlets = $current_user->getPreference('dashlets', $this->type);
$guid = create_guid();
$options = array();
if (isset($_REQUEST['type']) && $_REQUEST['type'] == 'web') {
$dashlet_module = 'Home';
require_once 'include/Dashlets/DashletRssFeedTitle.php';
$options['url'] = $_REQUEST['type_module'];
$webDashlet = new DashletRssFeedTitle($options['url']);
$options['title'] = $webDashlet->generateTitle();
unset($webDashlet);
} elseif (!empty($_REQUEST['type_module'])) {
$dashlet_module = $_REQUEST['type_module'];
} elseif (isset($dashletsFiles[$_REQUEST['id']]['module'])) {
$dashlet_module = $dashletsFiles[$_REQUEST['id']]['module'];
} else {
$dashlet_module = 'Home';
}
$dashlets[$guid] = array('className' => $dashletsFiles[$_REQUEST['id']]['class'], 'module' => $dashlet_module, 'options' => $options, 'fileLocation' => $dashletsFiles[$_REQUEST['id']]['file']);
if (!array_key_exists('current_tab', $_SESSION)) {
$_SESSION["current_tab"] = '0';
}
array_unshift($pages[$_SESSION['current_tab']]['columns'][0]['dashlets'], $guid);
$current_user->setPreference('dashlets', $dashlets, 0, $this->type);
echo $guid;
} else {
echo 'ofdaops';
}
}
开发者ID:switcode,项目名称:SuiteCRM,代码行数:39,代码来源:MySugar.php
示例18: process_page
function process_page()
{
global $theme;
global $mod_strings;
global $app_strings;
global $currentModule;
global $current_language;
global $current_module_strings;
if (!is_file(sugar_cached('jsLanguage/WorkFlow/') . $GLOBALS['current_language'] . '.js')) {
require_once 'include/language/jsLanguage.php';
jsLanguage::createModuleStringsCache('WorkFlow', $GLOBALS['current_language']);
}
$javascript_language_files = getVersionedScript("cache/jsLanguage/WorkFlow/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
$current_module_strings = return_module_language($current_language, 'WorkFlowAlertShells');
$ListView = new ListView();
$header_text = '';
if (isset($_REQUEST['workflow_id'])) {
$workflow = BeanFactory::getBean('WorkFlow', $_REQUEST['workflow_id']);
//TODO GET ALL ALERTS HERE
//$focus_alerts_list = $workflow->get_linked_beans('wf_alerts','WorkFlowAlertShell');
$alerts = BeanFactory::getBean('WorkFlowAlertShells');
$current_module_strings = return_module_language($current_language, $alerts->module_dir);
insert_popup_header($theme);
$ListView->initNewXTemplate('modules/WorkFlowAlertShells/Popup_picker.html', $current_module_strings);
$ListView->xTemplateAssign("WORKFLOW_ID", $workflow->id);
$ListView->xTemplateAssign("JAVASCRIPT_LANGUAGE_FILES", $javascript_language_files);
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$workflow->id}");
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
$ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text);
//$ListView->setHeaderText($button);
//$ListView->setQuery("workflow_alertshells.alert_type = 'Email'","","", "ALERT");
$list = $alerts->get_list("", "workflow_alertshells.alert_type = 'Email'");
$display_list = $this->cullFromList($list['list'], $workflow->base_module, $workflow->type);
$ListView->processListViewTwo($display_list, "main", "ALERT");
insert_popup_footer();
}
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:38,代码来源:Popup_picker.php
示例19: testSilentUpgradeSessionVars
public function testSilentUpgradeSessionVars()
{
require_once 'modules/UpgradeWizard/uw_utils.php';
$varsCacheFileName = sugar_cached("/silentUpgrader/silentUpgradeCache.php");
$loaded = loadSilentUpgradeVars();
$this->assertTrue($loaded, "Could not load the silent upgrade vars");
global $silent_upgrade_vars_loaded;
$this->assertTrue(!empty($silent_upgrade_vars_loaded), "\$silent_upgrade_vars_loaded array should not be empty");
$set = setSilentUpgradeVar('SDizzle', 'BSnizzle');
$this->assertTrue($set, "Could not set a silent upgrade var");
$get = getSilentUpgradeVar('SDizzle');
$this->assertEquals('BSnizzle', $get, "Unexpected value when getting silent upgrade var before resetting");
$write = writeSilentUpgradeVars();
$this->assertTrue($write, "Could not write the silent upgrade vars to the cache file. Function returned false");
$this->assertFileExists($varsCacheFileName, "Cache file doesn't exist after call to writeSilentUpgradeVars()");
$output = shell_exec("php {$this->externalTestFileName}");
$this->assertEquals('BSnizzle', $output, "Running custom script didn't successfully retrieve the value");
$remove = removeSilentUpgradeVarsCache();
$this->assertTrue(empty($silent_upgrade_vars_loaded), "Silent upgrade vars variable should have been unset in removeSilentUpgradeVarsCache() call");
$this->assertFileNotExists($varsCacheFileName, "Cache file exists after call to removeSilentUpgradeVarsCache()");
$get = getSilentUpgradeVar('SDizzle');
$this->assertNotEquals('BSnizzle', $get, "Unexpected value when getting silent upgrade var after resetting");
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:23,代码来源:SilentUpgradeSessionVarsTest.php
示例20: 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
注:本文中的sugar_cached函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论