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


PHP CRM_Logging_Schema::disableLogging方法代码示例

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


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

示例1: testMultilingualAlterSchemaLogging

 /**
  * Test creating logging schema when database is in multilingual mode.
  * Also test altering a multilingual table.
  */
 public function testMultilingualAlterSchemaLogging()
 {
     CRM_Core_I18n_Schema::makeMultilingual('en_US');
     $logging = new CRM_Logging_Schema();
     $logging->enableLogging();
     $value = CRM_Core_DAO::singleValueQuery("SELECT id FROM log_civicrm_contact LIMIT 1", array(), FALSE, FALSE);
     $this->assertNotNull($value, 'Logging not enabled successfully');
     $logging->disableLogging();
     CRM_Core_DAO::executeQuery("ALTER TABLE `civicrm_option_value` ADD COLUMN `logging_test` INT DEFAULT NULL", array(), FALSE, NULL, FALSE, TRUE);
     CRM_Core_I18n_Schema::rebuildMultilingualSchema(array('en_US'));
     $logging->enableLogging();
     $query = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE `log_civicrm_option_value`", array(), TRUE, NULL, FALSE, FALSE);
     $query->fetch();
     $create = explode("\n", $query->Create_Table);
     CRM_Core_DAO::executeQuery("ALTER TABLE `civicrm_option_value` DROP COLUMN `logging_test`", array(), FALSE, NULL, FALSE, TRUE);
     $this->assertTrue(in_array("  `logging_test` int(11) DEFAULT NULL", $create));
     $logging->disableLogging();
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:22,代码来源:LoggingTest.php

示例2: postProcess

 public function postProcess()
 {
     parent::postProcess();
     // handle logging
     // FIXME: do it only if the setting changed
     require_once 'CRM/Logging/Schema.php';
     $values = $this->exportValues();
     $logging = new CRM_Logging_Schema();
     $values['logging'] ? $logging->enableLogging() : $logging->disableLogging();
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:10,代码来源:Miscellaneous.php

示例3: onToggle

 /**
  * Setting Callback - On Change.
  *
  * Respond to changes in the "logging" setting. Set up or destroy
  * triggers, etal.
  *
  * @param array $oldValue
  *   List of component names.
  * @param array $newValue
  *   List of component names.
  * @param array $metadata
  *   Specification of the setting (per *.settings.php).
  */
 public static function onToggle($oldValue, $newValue, $metadata)
 {
     if ($oldValue == $newValue) {
         return;
     }
     $logging = new CRM_Logging_Schema();
     if ($newValue) {
         $logging->enableLogging();
     } else {
         $logging->disableLogging();
     }
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:25,代码来源:Schema.php

示例4: postProcess

 public function postProcess()
 {
     // store the submitted values in an array
     $config = CRM_Core_Config::singleton();
     $params = $this->controller->exportValues($this->_name);
     // get current logging status
     $values = $this->exportValues();
     parent::postProcess();
     if ($config->logging != $values['logging']) {
         $logging = new CRM_Logging_Schema();
         if ($values['logging']) {
             $logging->enableLogging();
         } else {
             $logging->disableLogging();
         }
     }
 }
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:17,代码来源:Miscellaneous.php

示例5: postProcess

 public function postProcess()
 {
     // store the submitted values in an array
     $config = CRM_Core_Config::singleton();
     $params = $this->controller->exportValues($this->_name);
     // update upload max size in DB
     $params['maxImportFileSize'] = CRM_Core_Config_Defaults::formatUnitSize(ini_get('upload_max_filesize'));
     CRM_Core_BAO_ConfigSetting::create($params);
     // get current logging status
     $values = $this->exportValues();
     parent::postProcess();
     if ($config->logging != $values['logging']) {
         $logging = new CRM_Logging_Schema();
         if ($values['logging']) {
             $logging->enableLogging();
         } else {
             $logging->disableLogging();
         }
     }
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:20,代码来源:Miscellaneous.php


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