Feature #15162
closeddate-params are hardcoded
0%
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
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');
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
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']
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']);
Updated by Dmitry Dulepov over 14 years ago
I checked the code, it is already fixed.
Updated by Dmitry Dulepov over 14 years ago
Resolving the issue was incorrect step. It is still actual.
Updated by Dmitry Dulepov over 14 years ago
Version 2 of the patch uses strftime() because strftime(0 supports locales.