Skip to content

Commit b523e67

Browse files
twister65Quyzero-24laoneo
authored andcommitted
Fix timestamp format for track_date (banner) (joomla#24651)
* Fix Editor change does not work joomla#21943 * Update Factory.php * omit caching functions I only need opcache_invalidate function to solve issue joomla#21943 * Invalidates the cached configuration file joomla#21949 (comment) * Invalidates cached file after write joomla#21949 (comment) * Update application.php * Fix issue joomla#24649 * Format trackdate to SQL. * Format trackdate in 2 steps. See joomla#24651 (comment) Co-authored-by: Quy <[email protected]> Co-authored-by: Tobias Zulauf <[email protected]> Co-authored-by: Allon Moritz <[email protected]>
1 parent e0f94a9 commit b523e67

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

components/com_banners/models/banner.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ public function click()
7878

7979
if ($trackClicks > 0)
8080
{
81-
$trackDate = JFactory::getDate()->toSql();
81+
$trackDate = JFactory::getDate()->format('Y-m-d H:00:00');
82+
$trackDate = JFactory::getDate($trackDate)->toSql();
8283

8384
$query->clear()
8485
->select($db->quoteName('count'))

components/com_banners/models/banners.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,9 @@ public function getItems()
239239
*/
240240
public function impress()
241241
{
242-
$trackDate = JFactory::getDate()->toSql();
242+
$trackDate = JFactory::getDate()->format('Y-m-d H:00:00');
243+
$trackDate = JFactory::getDate($trackDate)->toSql();
244+
243245
$items = $this->getItems();
244246
$db = $this->getDbo();
245247
$query = $db->getQuery(true);

0 commit comments

Comments
 (0)