From 0ef68e6fc9ed4104534580338b162ccd09b70031 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 23 Jan 2009 09:07:54 +0100 Subject: headline subtoolbar: code cleanup --- functions.php | 96 ++++++++++++++++++----------------------------------------- 1 file changed, 29 insertions(+), 67 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index af3dfe809..b4636927c 100644 --- a/functions.php +++ b/functions.php @@ -3312,8 +3312,6 @@ $feed_title = "?"; } - if ($feed < -10) error_reporting (0); - $content_query_part = "content as content_preview,"; if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) { @@ -3870,29 +3868,10 @@ } function print_headline_subtoolbar($link, $feed_site_url, $feed_title, - $bottom = false, $rtl_content = false, $feed_id = 0, - $is_cat = false, $search = false, $match_on = false, - $search_mode = false, $offset = 0, $limit = 0, - $dashboard_menu = 0, $disable_feed = 0, $feed_small_icon = 0) { - - $user_page_offset = $offset + 1; + $feed_id, $is_cat, $search, $match_on, + $search_mode) { - if (!$bottom) { - $class = "headlinesSubToolbar"; - $tid = "headlineActionsTop"; - } else { - $class = "headlinesSubToolbar"; - $tid = "headlineActionsBottom"; - } - - print ""; - - if ($rtl_content) { - $rtl_cpart = "RTL"; - } else { - $rtl_cpart = ""; - } + print "
"; $page_prev_link = "javascript:viewFeedGoPage(-1)"; $page_next_link = "javascript:viewFeedGoPage(1)"; @@ -3927,8 +3906,30 @@ } - print "
"; - - print ""; - print "
"; + print "
"; + + if ($feed_site_url) { + if (!$bottom) { + $target = "target=\"_blank\""; + } + print "". + truncate_string($feed_title,30).""; + } else { + print $feed_title; + } + + if ($search) { + $search_q = "&q=$search&m=$match_on&smode=$search_mode"; + } + + print " + + \"".__('Generated + "; + print "
"; print __('Select:')." ".__('All').", @@ -3964,46 +3965,8 @@ print_labels_headlines_dropdown($link, $feed_id); print ""; - print "
"; - - print ""; - - if ($feed_site_url) { - if (!$bottom) { - $target = "target=\"_blank\""; - } - print "". - truncate_string($feed_title,30).""; - } else { - print $feed_title; - } - - if ($search) { - $search_q = "&q=$search&m=$match_on&smode=$search_mode"; - } - - if ($user_page_offset > 1) { - print " [$user_page_offset] "; - } - - if (!$bottom && !$disable_feed) { - print " - - \"".__('Generated - "; - } else if ($feed_small_icon) { - print "\"\""; - } - - print ""; - - print "
"; + print ""; } function printCategoryHeader($link, $cat_id, $hidden = false, $can_browse = true) { @@ -4863,9 +4826,8 @@ return; } - print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, - $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, - $offset, $limit); + print_headline_subtoolbar($link, $feed_site_url, $feed_title, + $feed, $cat_view, $search, $match_on, $search_mode); print "
"; } -- cgit v1.2.3-54-g00ecf