From 36d0da30d307cd821413ccb8ea1ccc68de1d8538 Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 11 Mar 2009 17:25:26 +0000 Subject: Move get_icon function. git-svn-id: http://piwigo.org/svn/trunk@3188 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_html.inc.php | 52 ------------------------------------------ 1 file changed, 52 deletions(-) (limited to 'include/functions_html.inc.php') diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 4dac9cb88..4be5ef077 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -21,58 +21,6 @@ // | USA. | // +-----------------------------------------------------------------------+ -function get_icon($date, $is_child_date = false) -{ - global $cache, $user; - - if (empty($date)) - { - return ''; - } - - if (isset($cache['get_icon'][$date])) - { - if (! $cache['get_icon'][$date] ) - return ''; - return $cache['get_icon']['_icons_'][$is_child_date]; - } - - if (!isset($cache['get_icon']['sql_recent_date'])) - { - // Use MySql date in order to standardize all recent "actions/queries" - list($cache['get_icon']['sql_recent_date']) = - mysql_fetch_array(pwg_query('select SUBDATE( - CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)')); - } - - $cache['get_icon'][$date] = false; - if ( $date > $cache['get_icon']['sql_recent_date'] ) - { - if ( !isset($cache['get_icon']['_icons_'] ) ) - { - $icons = array(false => 'recent', true => 'recent_by_child' ); - $title = sprintf( - l10n('elements posted during the last %d days'), - $user['recent_period'] - ); - foreach ($icons as $key => $icon) - { - $icon_url = get_themeconf('icon_dir').'/'.$icon.'.png'; - $size = getimagesize( PHPWG_ROOT_PATH.$icon_url ); - $icon_url = get_root_url().$icon_url; - $output = '(!)'; - $cache['get_icon']['_icons_'][$key] = $output; - } - } - $cache['get_icon'][$date] = true; - } - - if (! $cache['get_icon'][$date] ) - return ''; - return $cache['get_icon']['_icons_'][$is_child_date]; -} - /** * returns the list of categories as a HTML string * -- cgit v1.2.3