Eileen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/282090
Change subject: Sync Logging_Schema with upstream incl comma from CRM-17685
......................................................................
Sync Logging_Schema with upstream incl comma from CRM-17685
Bug: T131223
Change-Id: Icdad37effb0d756e96314f6359e74fe747399fc1
---
M CRM/Logging/Schema.php
1 file changed, 9 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm
refs/changes/90/282090/1
diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php
index 308dc83..d9e1bae 100644
--- a/CRM/Logging/Schema.php
+++ b/CRM/Logging/Schema.php
@@ -644,14 +644,17 @@
/**
* Create a log table with schema mirroring the given table’s structure and
seeding it with the given table’s contents.
+ *
+ * @param string $table
*/
private function createLogTableFor($table) {
- $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table",
CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+ $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table",
CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
$dao->fetch();
$query = $dao->Create_Table;
// rewrite the queries into CREATE TABLE queries for log tables:
$cols = <<<COLS
+ ,
log_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
log_conn_id VARCHAR(17),
log_user_id INTEGER,
@@ -880,15 +883,14 @@
}
/**
- * This allow logging to be temporarily disabled for certain cases
- * where we want to do a mass cleanup but dont want to bother with
- * an audit trail
+ * Disable logging temporarily.
*
+ * This allow logging to be temporarily disabled for certain cases
+ * where we want to do a mass cleanup but do not want to bother with
+ * an audit trail.
*/
public static function disableLoggingForThisConnection() {
- // do this only if logging is enabled
- $config = CRM_Core_Config::singleton();
- if ($config->logging) {
+ if (CRM_Core_Config::singleton()->logging) {
CRM_Core_DAO::executeQuery('SET @civicrm_disable_logging = 1');
}
}
--
To view, visit https://gerrit.wikimedia.org/r/282090
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdad37effb0d756e96314f6359e74fe747399fc1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits