Issue Bug Closed

#16535Format of created and modified date hardcoded in class

Andreas Wagner 09/07/06, 00:53 updated 06/27/08, 10:49

Description

The date format of the created and modified date that are shown in the search results are hardcoded in class.tx_indexedsearch.php, function makeInfo():
$tmplArray[‘created’] = date(‘d-m-y’,$row[‘item_crdate’]);
$tmplArray[‘modified’] = date(‘d-m-y H:i’,$row[‘item_mtime’]);

It would be nice to be able to set the date format from TS.

The attached patch adds

created_stdWrap {
strftime = %d-%m-%y
}
modified_stdWrap {
strftime = %d-%m-%y %H:%M
}

to ext_typoscript_setup.php and uses that in the class instead.

This is my first patch (and the first time I’ve used diff), so I’m not sure if I have done it right.

I used diff -u against the files from /TYPO3core/branches/TYPO3_4-0, and then merged the two diffs to the same file.
(issue imported from #M4169)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.