aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_html.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-02-05 03:03:30 +0000
committerrvelices <rv-github@modusoptimus.com>2009-02-05 03:03:30 +0000
commite34c68cb891bf7382958056d4d3c9e56cf6f4a43 (patch)
treef9e92716b4729704b8a4e57c09eb182ab16f1436 /include/functions_html.inc.php
parente71d84ebfbb3659a08ff4034f0f35113d7243a6d (diff)
- embellish_url compacts now ..
- some trigger improvements (render_category_description) - improved perf of duplicate_xxx_url ( rewrote func params_for_duplication and remove some vars from $page ) git-svn-id: http://piwigo.org/svn/trunk@3126 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_html.inc.php')
-rw-r--r--include/functions_html.inc.php39
1 files changed, 13 insertions, 26 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index f5d1f9dea..462bfe222 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -23,32 +23,32 @@
function get_icon($date, $is_child_date = false)
{
- global $page, $user;
+ global $cache, $user;
if (empty($date))
{
return '';
}
- if (isset($page['get_icon_cache'][$date]))
+ if (isset($cache['get_icon'][$date]))
{
- if (! $page['get_icon_cache'][$date] )
+ if (! $cache['get_icon'][$date] )
return '';
- return $page['get_icon_cache']['_icons_'][$is_child_date];
+ return $cache['get_icon']['_icons_'][$is_child_date];
}
- if (!isset($page['get_icon_cache']['sql_recent_date']))
+ if (!isset($cache['get_icon']['sql_recent_date']))
{
// Use MySql date in order to standardize all recent "actions/queries"
- list($page['get_icon_cache']['sql_recent_date']) =
+ list($cache['get_icon']['sql_recent_date']) =
mysql_fetch_array(pwg_query('select SUBDATE(
CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'));
}
- $page['get_icon_cache'][$date] = false;
- if ( $date > $page['get_icon_cache']['sql_recent_date'] )
+ $cache['get_icon'][$date] = false;
+ if ( $date > $cache['get_icon']['sql_recent_date'] )
{
- if ( !isset($page['get_icon_cache']['_icons_'] ) )
+ if ( !isset($cache['get_icon']['_icons_'] ) )
{
$icons = array(false => 'recent', true => 'recent_by_child' );
$title = sprintf(
@@ -62,15 +62,15 @@ function get_icon($date, $is_child_date = false)
$icon_url = get_root_url().$icon_url;
$output = '<img title="'.$title.'" src="'.$icon_url.'" class="icon" style="border:0;';
$output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="(!)" />';
- $page['get_icon_cache']['_icons_'][$key] = $output;
+ $cache['get_icon']['_icons_'][$key] = $output;
}
}
- $page['get_icon_cache'][$date] = true;
+ $cache['get_icon'][$date] = true;
}
- if (! $page['get_icon_cache'][$date] )
+ if (! $cache['get_icon'][$date] )
return '';
- return $page['get_icon_cache']['_icons_'][$is_child_date];
+ return $cache['get_icon']['_icons_'][$is_child_date];
}
function create_navigation_bar(
@@ -776,19 +776,6 @@ function set_status_header($code, $text='')
trigger_action('set_status_header', $code, $text);
}
-/** returns the category comment for rendering in html.
- * this is an event handler. don't call directly
- */
-function render_category_description($desc)
-{
- global $conf;
- if ( !$conf['allow_html_descriptions'] )
- {
- $desc = nl2br($desc);
- }
- return $desc;
-}
-
/** returns the category comment for rendering in html textual mode (subcatify)
* this is an event handler. don't call directly
*/