Merge pull request #437 from PrestaEdit/patch-35
[-] Class: Tools / displayDate (displayParameterAsDeprecated)
This commit is contained in:
+7
-2
@@ -605,13 +605,18 @@ class ToolsCore
|
|||||||
* Display date regarding to language preferences
|
* Display date regarding to language preferences
|
||||||
*
|
*
|
||||||
* @param string $date Date to display format UNIX
|
* @param string $date Date to display format UNIX
|
||||||
* @param integer $id_lang Language id
|
* @param integer $id_lang Language id DEPRECATED
|
||||||
* @param boolean $full With time or not (optional)
|
* @param boolean $full With time or not (optional)
|
||||||
* @param string $separator DEPRECATED
|
* @param string $separator DEPRECATED
|
||||||
* @return string Date
|
* @return string Date
|
||||||
*/
|
*/
|
||||||
public static function displayDate($date, $id_lang, $full = false, $separator = '-')
|
public static function displayDate($date, $id_lang = null, $full = false, $separator = null)
|
||||||
{
|
{
|
||||||
|
if ($id_lang !== null)
|
||||||
|
Tools::displayParameterAsDeprecated('id_lang');
|
||||||
|
if ($separator !== null)
|
||||||
|
Tools::displayParameterAsDeprecated('separator');
|
||||||
|
|
||||||
if (!$date || !($time = strtotime($date)))
|
if (!$date || !($time = strtotime($date)))
|
||||||
return $date;
|
return $date;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user