Project

General

Profile

Actions

Feature #15162

closed

date-params are hardcoded

Added by Thomas Murphy about 19 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Indexed Search
Target version:
-
Start date:
2005-10-29
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

class.tx_indexedsearch.php - function makeInfo()::line 1917

Date params are hardcoded, should be easy to put it into typoscript setup instead.

(issue imported from #M1740)


Files

1740.diff (1.74 KB) 1740.diff Administrator Admin, 2010-03-24 11:32
1740_v2.diff (2.8 KB) 1740_v2.diff Administrator Admin, 2010-03-24 13:47
Actions #1

Updated by Bjrn Kraus almost 19 years ago

Change the two lines for 'created' and 'modified' into:

$tmplArray['created'] = $this->pi_getLL('res_created','',1).' '.t3lib_BEfunc::date($row['item_crdate']);
$tmplArray['modified'] = $this->pi_getLL('res_modified','',1).' '.t3lib_BEfunc::datetime($row['item_mtime']);

Don't forget to include

require_once(PATH_t3lib.'class.t3lib_befunc.php');

Actions #2

Updated by Franz Koch over 18 years ago

hmm, it's really anyoing that this bug didn't make it into shipped version of typo3 4.0.

@Bjoern
your patch isn't really a good solution.
a) BE-funcs should stay where they belong to
b) the label shouldn't be prepended as it has it's own marker

Actions #3

Updated by Martin Kutschker over 17 years ago

Currently (TYPO3 4.1) they are affected by the system globals:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']
$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']

Actions #4

Updated by Michael Stopp about 15 years ago

The format of these dates should configurable with TS.
The makeInfo() function could be changed like this:

// existing format definition
$dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
$timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];

// insert the following two lines:
$createdFormat = ( $this->conf['dateFormat.']['created'] ) ? $this->conf['dateFormat.']['created'] : $dateFormat;
$modifiedFormat = ( $this->conf['dateFormat.']['modified'] ) ? $this->conf['dateFormat.']['modified'] : $dateFormat.' '.$timeFormat;

// modify these existing two lines of code:
$tmplArray['created'] = date($createdFormat, $row['item_crdate']);
$tmplArray['modified'] = date($modifiedFormat, $row['item_mtime']);

Actions #5

Updated by Dmitry Dulepov over 14 years ago

I checked the code, it is already fixed.

Actions #6

Updated by Dmitry Dulepov over 14 years ago

Resolving the issue was incorrect step. It is still actual.

Actions #7

Updated by Dmitry Dulepov over 14 years ago

Version 2 of the patch uses strftime() because strftime(0 supports locales.

Actions #8

Updated by Dmitry Dulepov over 14 years ago

rev 7339

Actions #9

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF