Fix deprecation notices and add placeholder for eaccelerator_* functions

This commit is contained in:
Aleksei Miheev
2013-02-11 22:16:39 +00:00
parent 27805502b0
commit 2ad646c4c1

View File

@@ -768,19 +768,19 @@ function timeformat($logTime, $show_today = true)
if (setlocale(LC_TIME, @$txt['lang_locale']))
{
$str = ereg_replace('%a', ucwords(strftime('%a', $time)), $str);
$str = ereg_replace('%A', ucwords(strftime('%A', $time)), $str);
$str = ereg_replace('%b', ucwords(strftime('%b', $time)), $str);
$str = ereg_replace('%B', ucwords(strftime('%B', $time)), $str);
$str = preg_replace('#%a#', ucwords(strftime('%a', $time)), $str);
$str = preg_replace('#%A#', ucwords(strftime('%A', $time)), $str);
$str = preg_replace('#%b#', ucwords(strftime('%b', $time)), $str);
$str = preg_replace('#%B#', ucwords(strftime('%B', $time)), $str);
}
else
{
// Do-it-yourself time localization. Fun.
$str = ereg_replace('%a', @$days_short[(int) strftime('%w', $time)], $str);
$str = ereg_replace('%A', @$days[(int) strftime('%w', $time)], $str);
$str = ereg_replace('%b', @$months_short[(int) strftime('%m', $time)], $str);
$str = ereg_replace('%B', @$months[(int) strftime('%m', $time)], $str);
$str = ereg_replace('%p', (strftime('%H', $time) < 12 ? 'am' : 'pm'), $str);
$str = preg_replace('#%a#', @$days_short[(int) strftime('%w', $time)], $str);
$str = preg_replace('#%A#', @$days[(int) strftime('%w', $time)], $str);
$str = preg_replace('#%b#', @$months_short[(int) strftime('%m', $time)], $str);
$str = preg_replace('#%B#', @$months[(int) strftime('%m', $time)], $str);
$str = preg_replace('#%p#', (strftime('%H', $time) < 12 ? 'am' : 'pm'), $str);
}
// Format any other characters..
@@ -1251,6 +1251,14 @@ function parseVideoDailymotion($url)
eaccelerator_put($url, $html, $ttl);
return $html;
}
function eaccelerator_get($param) {
return NULL;
}
function eaccelerator_put($param, $value) {
return NULL;
}
function parseVideoYoutube($url)
{
$ttl = 3600;