Mercurial > hg > mgallery
comparison mgallery.php @ 287:290a42c52e35
Use instanceOf instead of is_object().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 21 May 2019 14:00:36 +0300 |
parents | 25324e33fc78 |
children | cad9e459e12f |
comparison
equal
deleted
inserted
replaced
286:878d2a772fd6 | 287:290a42c52e35 |
---|---|
351 function mgTimeStr($stamp) | 351 function mgTimeStr($stamp) |
352 { | 352 { |
353 global $pageLang, $pageCharset; | 353 global $pageLang, $pageCharset; |
354 $pageLocale = strtolower($pageLang)."_".strtoupper($pageLang).".".$pageCharset; | 354 $pageLocale = strtolower($pageLang)."_".strtoupper($pageLang).".".$pageCharset; |
355 setlocale(LC_TIME, $pageLocale); | 355 setlocale(LC_TIME, $pageLocale); |
356 return strftime("%d %b %Y (%H:%M:%S)", is_object($stamp) ? $stamp->getTimestamp() : $stamp); | 356 return strftime("%d %b %Y (%H:%M:%S)", ($stamp instanceOf DateTime) ? $stamp->getTimestamp() : $stamp); |
357 } | 357 } |
358 | 358 |
359 | 359 |
360 function mgFileSize($size) | 360 function mgFileSize($size) |
361 { | 361 { |