Ejegg has submitted this change and it was merged.
Change subject: CRM-18193 remove arbitrary setting of log_date when not
provided.
......................................................................
CRM-18193 remove arbitrary setting of log_date when not provided.
In order to be able to ignore the log_conn_date where it is not relevant the
logging detail reports need to stop making up a log_conn_date where one is not
provided. The code that does that was part of the inital report commit and on
removing it I could not replicate any issues - ie. accessing the detail reports
without criteria worked fine
Change-Id: Ib426eff48bd866d52bfb43efa67b1d3570d1f45a
---
M CRM/Logging/ReportDetail.php
M templates/CRM/Logging/ReportDetail.tpl
2 files changed, 1 insertion(+), 10 deletions(-)
Approvals:
Ejegg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/CRM/Logging/ReportDetail.php b/CRM/Logging/ReportDetail.php
index 1211ac7..974b7ca 100644
--- a/CRM/Logging/ReportDetail.php
+++ b/CRM/Logging/ReportDetail.php
@@ -90,15 +90,6 @@
$this->revert();
}
- // make sure the report works even without the params
- if (!$this->log_conn_id or !$this->log_date) {
- $dao = new CRM_Core_DAO();
- $dao->query("SELECT log_conn_id, log_date FROM
`{$this->db}`.log_{$this->tables[0]} WHERE log_action = 'Update' ORDER BY
log_date DESC LIMIT 1");
- $dao->fetch();
- $this->log_conn_id = $dao->log_conn_id;
- $this->log_date = $dao->log_date;
- }
-
$this->_columnHeaders = array(
'field' => array('title' => ts('Field')),
'from' => array('title' => ts('Changed From')),
diff --git a/templates/CRM/Logging/ReportDetail.tpl
b/templates/CRM/Logging/ReportDetail.tpl
index 601e772..6946288 100644
--- a/templates/CRM/Logging/ReportDetail.tpl
+++ b/templates/CRM/Logging/ReportDetail.tpl
@@ -43,7 +43,7 @@
{/if}
{else}
<div class='messages status'>
- <div class='icon inform-icon'></div> {ts}This report can not be
displayed because there are no entries in the logging tables yet.{/ts}
+ <div class='icon inform-icon'></div> {ts}This report can not be
displayed because there are no relevant entries in the logging tables.{/ts}
</div>
{/if}
{if $layout neq 'overlay'}
--
To view, visit https://gerrit.wikimedia.org/r/282089
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib426eff48bd866d52bfb43efa67b1d3570d1f45a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits