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


PHP CRM_Core_BAO_ConfigSetting::doSiteMove方法代码示例

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


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

示例1: run

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2016
 */
function run()
{
    session_start();
    require_once '../../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    CRM_Utils_System::authenticateScript(TRUE);
    require_once 'CRM/Core/BAO/ConfigSetting.php';
    $moveStatus = CRM_Core_BAO_ConfigSetting::doSiteMove();
    echo $moveStatus . '<br />';
    echo ts("If no errors are displayed above, the site move steps have completed successfully. Please visit <a href=\"{$config->userFrameworkBaseURL}\">your moved site</a> and test the move.");
}
开发者ID:saurabhbatra96,项目名称:civicrm-core,代码行数:18,代码来源:move.php

示例2: postProcess

 public function postProcess()
 {
     if (!empty($_POST['_qf_UpdateConfigBackend_next_cleanup'])) {
         $config = CRM_Core_Config::singleton();
         // cleanup templates_c directory
         $config->cleanup(1, FALSE);
         // clear all caches
         CRM_Core_Config::clearDBCache();
         CRM_Utils_System::flushCache();
         parent::rebuildMenu();
         CRM_Core_BAO_WordReplacement::rebuild();
         CRM_Core_Session::setStatus(ts('Cache has been cleared and menu has been rebuilt successfully.'), ts("Success"), "success");
     }
     if (!empty($_POST['_qf_UpdateConfigBackend_next_resetpaths'])) {
         $msg = CRM_Core_BAO_ConfigSetting::doSiteMove();
         CRM_Core_Session::setStatus($msg, ts("Success"), "success");
     }
     return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/setting/updateConfigBackend', 'reset=1'));
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:19,代码来源:UpdateConfigBackend.php

示例3: updateConfig

 /**
  * Implementation of command 'update-cfg'
  */
 private function updateConfig()
 {
     civicrm_initialize();
     $defaultValues = array();
     $states = array('old', 'new');
     for ($i = 1; $i <= 3; $i++) {
         foreach ($states as $state) {
             $name = "{$state}Val_{$i}";
             $value = $this->getOption($name, NULL);
             if ($value) {
                 $defaultValues[$name] = $value;
             }
         }
     }
     $webserver_user = $this->getWebServerUser();
     $webserver_group = $this->getWebServerGroup();
     require_once 'CRM/Core/I18n.php';
     require_once 'CRM/Core/BAO/ConfigSetting.php';
     $result = CRM_Core_BAO_ConfigSetting::doSiteMove($defaultValues);
     if ($result) {
         # attempt to preserve webserver ownership of templates_c, civicrm/upload
         if ($webserver_user and $webserver_group) {
             $civicrm_files_dir = ABSPATH . '/wp-content/plugins/files/civicrm';
             system(sprintf('chown -R %s:%s %s/templates_c', $webserver_user, $webserver_group, $civicrm_files_dir));
             system(sprintf('chown -R %s:%s %s/upload', $webserver_user, $webserver_group, $civicrm_files_dir));
         }
         WP_CLI::success('Config successfully updated.');
     } else {
         WP_CLI::error('Config update failed.');
     }
 }
开发者ID:samuelsov,项目名称:civicrm-wordpress,代码行数:34,代码来源:civicrm.php


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