Changeset 3126 for trunk/include/functions_html.inc.php
- Timestamp:
- Feb 5, 2009, 4:03:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_html.inc.php
r3049 r3126 24 24 function get_icon($date, $is_child_date = false) 25 25 { 26 global $ page, $user;26 global $cache, $user; 27 27 28 28 if (empty($date)) … … 31 31 } 32 32 33 if (isset($ page['get_icon_cache'][$date]))34 { 35 if (! $ page['get_icon_cache'][$date] )33 if (isset($cache['get_icon'][$date])) 34 { 35 if (! $cache['get_icon'][$date] ) 36 36 return ''; 37 return $ page['get_icon_cache']['_icons_'][$is_child_date];38 } 39 40 if (!isset($ page['get_icon_cache']['sql_recent_date']))37 return $cache['get_icon']['_icons_'][$is_child_date]; 38 } 39 40 if (!isset($cache['get_icon']['sql_recent_date'])) 41 41 { 42 42 // Use MySql date in order to standardize all recent "actions/queries" 43 list($ page['get_icon_cache']['sql_recent_date']) =43 list($cache['get_icon']['sql_recent_date']) = 44 44 mysql_fetch_array(pwg_query('select SUBDATE( 45 45 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)')); 46 46 } 47 47 48 $ page['get_icon_cache'][$date] = false;49 if ( $date > $ page['get_icon_cache']['sql_recent_date'] )50 { 51 if ( !isset($ page['get_icon_cache']['_icons_'] ) )48 $cache['get_icon'][$date] = false; 49 if ( $date > $cache['get_icon']['sql_recent_date'] ) 50 { 51 if ( !isset($cache['get_icon']['_icons_'] ) ) 52 52 { 53 53 $icons = array(false => 'recent', true => 'recent_by_child' ); … … 63 63 $output = '<img title="'.$title.'" src="'.$icon_url.'" class="icon" style="border:0;'; 64 64 $output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="(!)" />'; 65 $ page['get_icon_cache']['_icons_'][$key] = $output;65 $cache['get_icon']['_icons_'][$key] = $output; 66 66 } 67 67 } 68 $ page['get_icon_cache'][$date] = true;69 } 70 71 if (! $ page['get_icon_cache'][$date] )68 $cache['get_icon'][$date] = true; 69 } 70 71 if (! $cache['get_icon'][$date] ) 72 72 return ''; 73 return $ page['get_icon_cache']['_icons_'][$is_child_date];73 return $cache['get_icon']['_icons_'][$is_child_date]; 74 74 } 75 75 … … 777 777 } 778 778 779 /** returns the category comment for rendering in html.780 * this is an event handler. don't call directly781 */782 function render_category_description($desc)783 {784 global $conf;785 if ( !$conf['allow_html_descriptions'] )786 {787 $desc = nl2br($desc);788 }789 return $desc;790 }791 792 779 /** returns the category comment for rendering in html textual mode (subcatify) 793 780 * this is an event handler. don't call directly
Note: See TracChangeset
for help on using the changeset viewer.