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


PHP write_array_to_file函数代码示例

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


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

示例1: setUp

 public function setUp()
 {
     SugarTestHelper::setUp('current_user', array(true, 1));
     SugarTestHelper::setUp('app_list_strings');
     SugarTestHelper::setUp('beanFiles');
     SugarTestHelper::setUp('beanList');
     parent::setUp();
     $this->relationships = new DeployedRelationships('Products');
     $definition = array('lhs_module' => 'Accounts', 'relationship_type' => 'one-to-many', 'rhs_module' => 'ProjectTask');
     $this->relationship = RelationshipFactory::newRelationship($definition);
     $this->relationships->add($this->relationship);
     $this->relationships->save();
     $this->relationships->build();
     SugarTestHelper::setUp('relation', array('Accounts', 'ProjectTask'));
     $searchDefs = array('layout' => array('advanced_search' => array($this->relationship->getName() . '_name' => array('type' => 'relate', 'link' => true, 'label' => '', 'id' => strtoupper($this->relationship->getJoinKeyLHS()), 'width' => '10%', 'default' => true, 'name' => $this->relationship->getName() . '_name'))), 'templateMeta' => array('maxColumns' => '3', 'maxColumnsBasic' => '4', 'widths' => array('label' => '10', 'field' => '30')));
     // Add new field to advanced search layout
     if (file_exists("custom/modules/ProjectTask/metadata/searchdefs.php")) {
         $this->_savedSearchDefs = file_get_contents("custom/modules/ProjectTask/metadata/searchdefs.php");
     }
     write_array_to_file("searchdefs['ProjectTask']", $searchDefs, 'custom/modules/ProjectTask/metadata/searchdefs.php');
     if (file_exists("modules/ProjectTask/metadata/SearchFields.php")) {
         $this->_savedSearchFields = file_get_contents("modules/ProjectTask/metadata/SearchFields.php");
     }
     write_array_to_file("searchFields['ProjectTask']", $this->_localSearchFields['ProjectTask'], 'modules/ProjectTask/metadata/SearchFields.php');
     // Creates linked test account, project and project task
     $this->_project = SugarTestProjectUtilities::createProject();
     $this->_account = SugarTestAccountUtilities::createAccount();
     $projectTaskData = array('project_id' => $this->_project->id, 'parent_task_id' => '', 'project_task_id' => '1', 'percent_complete' => '0', 'name' => 'Test Task 1', 'duration_unit' => 'Days', 'duration' => '1');
     $this->_projectTask = SugarTestProjectTaskUtilities::createProjectTask($projectTaskData);
     $this->_projectTask->{$this->relationship->getName()}->add($this->_account);
     $this->_projectTask->save();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:32,代码来源:Bug50575Test.php

示例2: run

 public function run()
 {
     if (!version_compare($this->from_version, '7.5.1.0', '<')) {
         // only need to run this upgrading from pre 7.5.1 versions
         return;
     }
     // get custom modules
     $customModules = array();
     $customFiles = glob('modules' . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . '*_sugar.php', GLOB_NOSORT);
     // file header
     $header = file_get_contents('modules/ModuleBuilder/MB/header.php');
     // iterate custom modules
     foreach ($customFiles as $customFile) {
         $moduleName = str_replace('_sugar', '', pathinfo($customFile, PATHINFO_FILENAME));
         $modulePath = pathinfo($customFile, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR . 'metadata' . DIRECTORY_SEPARATOR . 'subpanels';
         $layoutFiles = glob($modulePath . DIRECTORY_SEPARATOR . '*.php', GLOB_NOSORT);
         // iterate layout file
         foreach ($layoutFiles as $layoutFile) {
             include $layoutFile;
             if (isset($subpanel_layout) && isset($subpanel_layout['list_fields']) && isset($subpanel_layout['list_fields']['email1'])) {
                 $subpanel_layout['list_fields']['email'] = $subpanel_layout['list_fields']['email1'];
                 $subpanel_layout['list_fields']['email']['name'] = 'email';
                 unset($subpanel_layout['list_fields']['email1']);
                 write_array_to_file('subpanel_layout', $subpanel_layout, $layoutFile, 'w', $header);
             }
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:28,代码来源:7_FixBWCSubpanelEmail.php

示例3: setUp

 public function setUp()
 {
     global $argv;
     if (isset($argv)) {
         $this->original_argv = $argv;
     }
     $this->current_working_dir = getcwd();
     if (file_exists('config_si.php')) {
         $this->has_original_config_si_file = true;
         copy('config_si.php', 'config_si.php.bug40129');
     } else {
         $this->has_original_config_si_file = false;
         copy('config.php', 'config_si.php');
     }
     $sugar_config_si = array('setup_db_host_name' => 'localhost', 'setup_db_database_name' => 'pineapple', 'setup_db_drop_tables' => 0, 'setup_db_create_database' => 1, 'setup_db_pop_demo_data' => false, 'setup_site_admin_user_name' => 'admin', 'setup_site_admin_password' => 'a', 'setup_db_create_sugarsales_user' => 0, 'setup_db_admin_user_name' => 'root', 'setup_db_admin_password' => '', 'setup_db_sugarsales_user' => 'root', 'setup_db_sugarsales_password' => '', 'setup_db_type' => 'mysql', 'setup_license_key_users' => 100, 'setup_license_key_expire_date' => '2010-12-25', 'setup_license_key_oc_licences' => 1, 'setup_license_key' => 'internal sugar user 20100224', 'setup_site_url' => 'http://localhost/pineapple/build/rome/builds/ent/sugarcrm', 'setup_system_name' => 'pineapple', 'default_currency_iso4217' => 'USD', 'default_currency_name' => 'US Dollars', 'default_currency_significant_digits' => '2', 'default_currency_symbol' => '$', 'default_date_format' => 'Y-m-d', 'default_time_format' => 'H:i', 'default_decimal_seperator' => '.', 'default_export_charset' => 'ISO-8859-1', 'default_language' => 'en_us', 'default_locale_name_format' => 's f l', 'default_number_grouping_seperator' => ',', 'export_delimiter' => ',', 'disable_count_query' => true, 'external_cache_disabled_apc' => true, 'external_cache_disabled_zend' => true, 'external_cache_disabled_memcache' => true, 'external_cache_disabled' => true);
     write_array_to_file("sugar_config_si", $sugar_config_si, 'config_si.php');
     if (file_exists('config.php')) {
         copy('config.php', 'config.php.bug40129');
         include 'config.php';
         // remove items since merge_config_si_settings does not merge existing keys
         foreach ($sugar_config_si as $k => $v) {
             unset($sugar_config[$k]);
         }
         write_array_to_file("sugar_config", $sugar_config, 'config.php');
     }
 }
开发者ID:appomattox,项目名称:sugarcrm_dev,代码行数:26,代码来源:Bug40129Test.php

示例4: run

 public function run()
 {
     if (!version_compare($this->from_version, '7.2.1', '<')) {
         // only needed for upgrades from pre-7.2.1
         return;
     }
     if (!file_exists("custom/include/Sugarpdf/sugarpdf_default.php")) {
         return;
     }
     require "custom/include/Sugarpdf/sugarpdf_default.php";
     $rewrite = false;
     foreach ($this->config_keys as $key) {
         if (empty($sugarpdf_default[$key])) {
             continue;
         }
         if (strncmp($sugarpdf_default[$key], "include/tcpdf/", 14) === 0) {
             $sugarpdf_default[$key] = str_replace("include/tcpdf/", "vendor/tcpdf/", $sugarpdf_default[$key]);
             $rewrite = true;
         }
     }
     if ($rewrite) {
         $this->log("Writing fixed custom/include/Sugarpdf/sugarpdf_default.php");
         write_array_to_file("sugarpdf_default", $sugarpdf_default, "custom/include/Sugarpdf/sugarpdf_default.php");
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:25,代码来源:3_FixSugarPDF.php

示例5: run

 public function run()
 {
     if (version_compare($this->from_version, '7.0', '>=')) {
         return;
     }
     $files = $this->getFilesToProcess();
     foreach ($files as $file) {
         if (!file_exists($file)) {
             return;
         }
         $needUpdate = false;
         require $file;
         if (isset($viewdefs['Quotes']['DetailView']['templateMeta']['form']['buttons'])) {
             $source = $viewdefs['Quotes']['DetailView']['templateMeta']['form']['buttons'];
             foreach ($source as $i => $item) {
                 if (isset($item['customCode']) && strpos($item['customCode'], 'LBL_VIEW_PDF_BUTTON_LABEL') !== false) {
                     unset($source[$i]);
                     $needUpdate = true;
                 }
             }
             if ($needUpdate) {
                 if ($source) {
                     $viewdefs['Quotes']['DetailView']['templateMeta']['form']['buttons'] = array_values($source);
                 } else {
                     unset($viewdefs['Quotes']['DetailView']['templateMeta']['form']['buttons']);
                 }
             }
         }
         if ($needUpdate) {
             $this->backupFile($file);
             $this->log("Removed Print as PDF link in {$file}");
             write_array_to_file("viewdefs", $viewdefs, $file);
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:35,代码来源:7_DeletePdfFromQuotesDropDown.php

示例6: saveTabGroups

 /**
  * Takes in the request params from a save request and processes 
  * them for the save.
  *
  * @param REQUEST params  $params
  */
 function saveTabGroups($params)
 {
     $tabGroups = array();
     $selected_lang = !empty($params['dropdown_lang']) ? $params['dropdown_lang'] : $_SESSION['authenticated_user_language'];
     for ($count = 0; isset($params['slot_' . $count]); $count++) {
         if ($params['delete_' . $count] == 1) {
             continue;
         }
         $index = $params['slot_' . $count];
         $labelID = !empty($params['tablabelid_' . $index]) ? $params['tablabelid_' . $index] : 'LBL_GROUPTAB' . $count . '_' . time();
         $labelValue = $params['tablabel_' . $index];
         if (empty($GLOBALS['app_strings'][$labelID]) || $GLOBALS['app_strings'][$labelID] != $labelValue) {
             $contents = return_custom_app_list_strings_file_contents($selected_lang);
             $new_contents = replace_or_add_app_string($labelID, $labelValue, $contents);
             save_custom_app_list_strings_contents($new_contents, $selected_lang);
             $app_strings[$labelID] = $labelValue;
         }
         $tabGroups[$labelID] = array('label' => $labelID);
         $tabGroups[$labelID]['modules'] = array();
         for ($subcount = 0; isset($params[$index . '_' . $subcount]); $subcount++) {
             $tabGroups[$labelID]['modules'][] = $params[$index . '_' . $subcount];
         }
     }
     sugar_cache_put('app_strings', $GLOBALS['app_strings']);
     $newFile = create_custom_directory('include/tabConfig.php');
     write_array_to_file("GLOBALS['tabStructure']", $tabGroups, $newFile);
     $GLOBALS['tabStructure'] = $tabGroups;
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:34,代码来源:TabGroupHelper.php

示例7: run

 public function run()
 {
     if (!version_compare($this->from_version, '7.0', '<')) {
         // only need to run this upgrading from pre 7.0 versions
         return;
     }
     // get singular module names
     $my_list_strings = return_app_list_strings_language($GLOBALS['current_language']);
     $moduleSingular = $my_list_strings['moduleListSingular'];
     // get custom modules
     $customModules = array();
     $customFiles = glob('modules' . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . '*_sugar.php', GLOB_NOSORT);
     // file header
     $header = file_get_contents('modules/ModuleBuilder/MB/header.php');
     // iterate custom modules
     foreach ($customFiles as $customFile) {
         $moduleName = str_replace('_sugar', '', pathinfo($customFile, PATHINFO_FILENAME));
         $modulePath = pathinfo($customFile, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR . 'language';
         $langFiles = glob($modulePath . DIRECTORY_SEPARATOR . '*.lang.php', GLOB_NOSORT);
         // iterate language file
         foreach ($langFiles as $langFile) {
             // add LBL_MODULE_NAME_SINGULAR if not already there
             unset($mod_strings);
             include $langFile;
             if (isset($mod_strings) && !isset($mod_strings['LBL_MODULE_NAME_SINGULAR']) && isset($moduleSingular[$moduleName])) {
                 $mod_strings['LBL_MODULE_NAME_SINGULAR'] = $moduleSingular[$moduleName];
                 write_array_to_file('mod_strings', $mod_strings, $langFile, 'w', $header);
             }
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:7_FixMissingLabels.php

示例8: run

 public function run()
 {
     if (version_compare($this->from_version, '6.6.2', '>=')) {
         return;
     }
     $files = $this->getFilesToProcess();
     foreach ($files as $file) {
         if (!file_exists($file)) {
             return;
         }
         require $file;
         if (isset($viewdefs['Quotes']['DetailView']['templateMeta']['form']['links'])) {
             $data = $viewdefs['Quotes']['DetailView']['templateMeta']['form']['links'];
             if (count($data) == 1 && strpos($data[0], '$LAYOUT_OPTIONS')) {
                 unset($viewdefs['Quotes']['DetailView']['templateMeta']['form']['links']);
             } else {
                 foreach ($data as $i => $value) {
                     if (strpos($value, '$LAYOUT_OPTIONS')) {
                         // array_splice() for deleting and re-indexing.
                         array_splice($viewdefs['Quotes']['DetailView']['templateMeta']['form']['links'], $i, 1);
                     }
                 }
             }
         }
         $this->log("Removed obsolete LAYOUT_OPTIONS in {$file}");
         write_array_to_file("viewdefs", $viewdefs, $file);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:28,代码来源:7_FixCustomQuotesDetailView.php

示例9: buildCache

 /**
  * Builds the cache of Dashlets by scanning the system
  */
 function buildCache()
 {
     global $beanList;
     $dashletFiles = array();
     $dashletFilesCustom = array();
     getFiles($dashletFiles, 'modules', '/^.*\\/Dashlets\\/[^\\.]*\\.php$/');
     getFiles($dashletFilesCustom, 'custom/modules', '/^.*\\/Dashlets\\/[^\\.]*\\.php$/');
     $cacheDir = create_cache_directory('dashlets/');
     $allDashlets = array_merge($dashletFiles, $dashletFilesCustom);
     $dashletFiles = array();
     foreach ($allDashlets as $num => $file) {
         if (substr_count($file, '.meta') == 0) {
             // ignore meta data files
             $class = substr($file, strrpos($file, '/') + 1, -4);
             $dashletFiles[$class] = array();
             $dashletFiles[$class]['file'] = $file;
             $dashletFiles[$class]['class'] = $class;
             if (is_file(preg_replace('/(.*\\/.*)(\\.php)/Uis', '$1.meta$2', $file))) {
                 // is there an associated meta data file?
                 $dashletFiles[$class]['meta'] = preg_replace('/(.*\\/.*)(\\.php)/Uis', '$1.meta$2', $file);
                 require $dashletFiles[$class]['meta'];
                 if (isset($dashletMeta[$class]['module'])) {
                     $dashletFiles[$class]['module'] = $dashletMeta[$class]['module'];
                 }
             }
             $filesInDirectory = array();
             getFiles($filesInDirectory, substr($file, 0, strrpos($file, '/')), '/^.*\\/Dashlets\\/[^\\.]*\\.icon\\.(jpg|jpeg|gif|png)$/i');
             if (!empty($filesInDirectory)) {
                 $dashletFiles[$class]['icon'] = $filesInDirectory[0];
                 // take the first icon we see
             }
         }
     }
     write_array_to_file('dashletsFiles', $dashletFiles, $cacheDir . 'dashlets.php');
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:38,代码来源:DashletCacheBuilder.php

示例10: setUp

 public function setUp()
 {
     global $argv;
     if (isset($argv)) {
         $this->original_argv = $argv;
     }
     $this->current_working_dir = getcwd();
     $sugar_config_si = array('disable_count_query' => true, 'external_cache_disabled_apc' => true, 'external_cache_disabled_zend' => true, 'external_cache_disabled_memcache' => true, 'external_cache_disabled' => true);
     if (file_exists('config.php')) {
         copy('config.php', 'config.php.bug37214');
         include 'config.php';
         // remove items since merge_config_si_settings does not merge existing keys
         foreach ($sugar_config_si as $k => $v) {
             unset($sugar_config[$k]);
         }
         write_array_to_file("sugar_config", $sugar_config, 'config.php');
     }
     if (file_exists('config_si.php')) {
         $this->has_original_config_si_file = true;
         copy('config_si.php', 'config_si.php.bug37214');
     } else {
         $this->has_original_config_si_file = false;
         copy('config.php', 'config_si.php');
     }
     write_array_to_file("sugar_config_si", $sugar_config_si, 'config_si.php');
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:26,代码来源:Bug37214Test.php

示例11: get_user_info

function get_user_info()
{
    $app_id = $_POST['app_id'];
    $ajax_response = array('msg' => '');
    if (!file_exists($app_id . '_access_token')) {
        $ajax_response['msg'] = 'access_token not exist';
        echo json_encode($ajax_response);
    }
    //获取关注者openid列表
    $url = 'https://api.weixin.qq.com/cgi-bin/user/get?access_token=' . L($app_id . '_access_token') . '&next_openid=owogBtzPp97oFlUuhKTjPfO7jMq8';
    $ret_array = json_decode(http_get($url), true);
    $file_name = $app_id . '_user_openid_list';
    //write_array_to_file($file_name, $ret_array['data']['openid'], $file_name);
    $ret_array['next_openid'] = 'owogBt8P7Ik7X_toVjFx0pdbd7ds';
    while ($ret_array['next_openid'] != '') {
        $url = 'https://api.weixin.qq.com/cgi-bin/user/get?access_token=' . L($app_id . '_access_token') . '&next_openid=' . $ret_array['next_openid'];
        $ret_array = json_decode(http_get($url), true);
        print_r($ret_array);
        die;
        write_array_to_file($file_name, $ret_array['data']['openid'], $file_name);
    }
    $ajax_response['msg'] = 'get user amount successful';
    $ajax_response['amount'] = $ret_array['total'];
    echo json_encode($ajax_response);
}
开发者ID:rollandlau,项目名称:wechat-official-account-extractor,代码行数:25,代码来源:wechat_function.php

示例12: run

 public function run()
 {
     if (version_compare($this->from_version, '7.2.0', '<') || version_compare($this->from_version, '7.2.2', '>=')) {
         // only need to run this upgrading from 7.2.0 or 7.2.1
         return;
     }
     $file = 'custom/modules/Emails/clients/base/views/subpanel-for-accounts/subpanel-for-accounts.php';
     if (!file_exists($file)) {
         return;
     }
     require $file;
     $rewrite = false;
     if (isset($viewdefs['Emails']['base']['view']['subpanel-for-accounts']['panels'][0]['fields'])) {
         foreach ($viewdefs['Emails']['base']['view']['subpanel-for-accounts']['panels'][0]['fields'] as &$field) {
             if (isset($field['name']) && $field['name'] == 'name') {
                 if (!isset($field['link'])) {
                     $field['link'] = true;
                     $rewrite = true;
                 }
             }
         }
     }
     if ($rewrite) {
         $this->log('Adding link=true to subpanel-for-accounts.php');
         write_array_to_file("viewdefs['Emails']['base']['view']['subpanel-for-accounts']", $viewdefs['Emails']['base']['view']['subpanel-for-accounts'], $file);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:7_FixMissingLink.php

示例13: 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

示例14: run

 public function run()
 {
     // Only run this when coming from a version lower than 7.2.0
     if (version_compare($this->from_version, '7.2', '>=')) {
         return;
     }
     // Find all the classes we want to convert.
     $customModules = $this->getCustomModules();
     foreach ($customModules as $moduleName) {
         $path = $this->getModuleLangPath($moduleName);
         if (file_exists($path)) {
             $mod_strings = array();
             require $path;
             $labels = $this->compileLabels($moduleName, $this->missingLabels);
             $missingLabels = array_diff($labels, array_keys($mod_strings));
             if (!empty($missingLabels)) {
                 $this->upgrader->log('FixCustomModuleLabels: Missing import labels for ' . $moduleName . ' module - ' . var_export($missingLabels, true));
                 $header = file_get_contents('modules/ModuleBuilder/MB/header.php');
                 $translations = $this->translateLabels($missingLabels, $mod_strings, $moduleName);
                 $this->upgrader->backupFile($path);
                 write_array_to_file('mod_strings', $translations, $path, 'w', $header);
                 $this->upgrader->log('FixCustomModuleLabels: Module ' . $moduleName . '. Saving Complete');
             }
         }
     }
     return true;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:7_FixCustomModuleLabels.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     //If somehow this package already exists copy it
     if (file_exists('custom/modules/' . $this->package)) {
         $this->packageExists = true;
         mkdir_recursive('custom/modules/' . $this->package . '_bak');
         copy_recursive('custom/modules/' . $this->package, 'custom/modules/' . $this->package . '_bak');
     }
     //Make the custom package directory and simulate copying the file in
     mkdir_recursive('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs');
     $theArray = array($this->package => array('subpanel_setup' => array($this->package . '_accounts' => array('order' => 100, 'module' => 'Contacts', 'subpanel_name' => 'default', 'title_key' => 'LBL_BUG48784TEST', 'get_subpanel_data' => 'Bug48748Test'))));
     $theFile = 'custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php';
     write_array_to_file('layout_defs', $theArray, $theFile);
     sugar_chmod('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php', 0655);
     global $beanList, $beanFiles, $current_user;
     //$beanList['Contacts'] = 'Contact';
     //$beanFiles['Bug48784Mock'] = 'modules/Contacts/Contact.php';
     //Create an anonymous user for login purposes/
     $current_user = SugarTestUserUtilities::createAnonymousUser();
     $current_user->status = 'Active';
     $current_user->is_admin = 1;
     $current_user->save();
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
     $_SESSION['avail_modules'][$this->package] = 'write';
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:27,代码来源:Bug48748Test.php


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