Update of /cvsroot/python/python/dist/src/Doc/perl In directory usw-pr-cvs1:/tmp/cvs-serv21539/perl Modified Files: l2hinit.perl Log Message: Do not cache <img> tags for navigation icons as agressively; this fixes bug #127151. Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** l2hinit.perl 2000/10/25 16:18:10 1.50 --- l2hinit.perl 2001/01/02 22:08:48 1.51 *************** *** 108,139 **** } ! sub make_my_icon { ! my($name, $text) = @_; my $iconserver = ($ICONSERVER eq '.') ? '' : "$ICONSERVER/"; ! return "<img src=\"$iconserver$name.$IMAGE_TYPE\" border=\"0\"" . " height=\"32\"\n alt=\"$text\" width=\"32\">"; } - $BLANK_ICON = make_my_icon('blank', ''); - - @my_icons = (); - $my_icons{'next_page_inactive'} = $BLANK_ICON; - $my_icons{'previous_page_inactive'} = $BLANK_ICON; - $my_icons{'up_page_inactive'} = $BLANK_ICON; - $x = make_my_icon('next', 'Next Page'); - $my_icons{'next_page'} = $x; - $my_icons{'next'} = $x; - $x = make_my_icon('previous', 'Previous Page'); - $my_icons{'previous_page'} = $x; - $my_icons{'previous'} = $x; - $my_icons{'up'} = make_my_icon('up', 'Up One Level'); - $my_icons{'contents'} = make_my_icon('contents', 'Contents'); - $my_icons{'index'} = make_my_icon('index', 'Index'); - $my_icons{'modules'} = make_my_icon('modules', 'Module Index'); - - sub use_my_icon { my $s = @_[0]; ! $s =~ s/\<tex2html_([a-z_]+)_visible_mark\>/$my_icons{$1}/; return $s; } --- 108,138 ---- } ! @my_icon_tags = (); ! $my_icon_tags{'next'} = 'Next Page'; ! $my_icon_tags{'next_page'} = 'Next Page'; ! $my_icon_tags{'previous'} = 'Previous Page'; ! $my_icon_tags{'previous_page'} = 'Previous Page'; ! $my_icon_tags{'up'} = 'Up One Level'; ! $my_icon_tags{'contents'} = 'Contents'; ! $my_icon_tags{'index'} = 'Index'; ! $my_icon_tags{'modules'} = 'Module Index'; ! ! sub get_my_icon { ! my $name = @_[0]; ! my $text = $my_icon_tags{$name}; ! if ($text eq '') { ! $name = 'blank'; ! } my $iconserver = ($ICONSERVER eq '.') ? '' : "$ICONSERVER/"; ! return "<img src=\"$iconserver$name.$IMAGE_TYPE\"\n border=\"0\"" . " height=\"32\"\n alt=\"$text\" width=\"32\">"; } sub use_my_icon { my $s = @_[0]; ! if ($s =~ /\<tex2html_([a-z_]+)_visible_mark\>/) { ! my $r = get_my_icon($1); ! $s =~ s/\<tex2html_[a-z_]+_visible_mark\>/$r/; ! } return $s; } *************** *** 141,144 **** --- 140,144 ---- sub make_nav_panel { my $s; + my $BLANK_ICON = get_my_icon('blank'); $NEXT = $NEXT_TITLE ? use_my_icon("$NEXT") : $BLANK_ICON; $UP = $UP_TITLE ? use_my_icon("$UP") : $BLANK_ICON; *************** *** 209,213 **** my($dummy, $file, $title) = split($delim, $section_info{join(' ',@link)}); ! $icon =~ s/\<tex2html_([_a-z]+)_visible_mark\>/$my_icons{$1}/; if ($title && ($file ne $current_file)) { $title = purify($title); --- 209,216 ---- my($dummy, $file, $title) = split($delim, $section_info{join(' ',@link)}); ! if ($icon =~ /\<tex2html_([_a-z]+)_visible_mark\>/) { ! my $r = get_my_icon($1); ! $icon =~ s/\<tex2html_[_a-z]+_visible_mark\>/$r/; ! } if ($title && ($file ne $current_file)) { $title = purify($title); *************** *** 215,228 **** return (make_href($file, $icon), make_href($file, "$title")) } ! elsif ($icon eq $my_icons{"up"} && $EXTERNAL_UP_LINK) { return (make_href($EXTERNAL_UP_LINK, $icon), make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) } ! elsif ($icon eq $my_icons{"previous"} && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { return (make_href($EXTERNAL_PREV_LINK, $icon), make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) } ! elsif ($icon eq $my_icons{"next"} && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { return (make_href($EXTERNAL_DOWN_LINK, $icon), --- 218,231 ---- return (make_href($file, $icon), make_href($file, "$title")) } ! elsif ($icon eq get_my_icon('up') && $EXTERNAL_UP_LINK) { return (make_href($EXTERNAL_UP_LINK, $icon), make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) } ! elsif ($icon eq get_my_icon('previous') && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { return (make_href($EXTERNAL_PREV_LINK, $icon), make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) } ! elsif ($icon eq get_my_icon('next') && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { return (make_href($EXTERNAL_DOWN_LINK, $icon), *************** *** 234,238 **** sub add_special_link { my($icon, $file, $current_file) = @_; ! $icon =~ s/\<tex2html_([_a-z]+)_visible_mark\>/$my_icons{$1}/; return (($file && ($file ne $current_file)) ? make_href($file, $icon) --- 237,244 ---- sub add_special_link { my($icon, $file, $current_file) = @_; ! if ($icon =~ /\<tex2html_([_a-z]+)_visible_mark\>/) { ! my $r = get_my_icon($1); ! $icon =~ s/\<tex2html_[_a-z]+_visible_mark\>/$r/; ! } return (($file && ($file ne $current_file)) ? make_href($file, $icon) *************** *** 321,326 **** close(MODIDXFILE); if (!$allthesame) { ! $prefix = <<PLAT_DISCUSS; ! <p> Some module names are followed by an annotation indicating what --- 327,331 ---- close(MODIDXFILE); if (!$allthesame) { ! $prefix .= <<PLAT_DISCUSS; <p> Some module names are followed by an annotation indicating what *************** *** 463,471 **** # Add a button to the navigation areas: $CUSTOM_BUTTONS .= ('<a href="modindex.html" title="Module Index">' ! . $my_icons{'modules'} . '</a>'); } else { ! $CUSTOM_BUTTONS .= $BLANK_ICON; $global{'max_id'} = $id; # not sure why.... s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; --- 468,476 ---- # Add a button to the navigation areas: $CUSTOM_BUTTONS .= ('<a href="modindex.html" title="Module Index">' ! . get_my_icon('modules') . '</a>'); } else { ! $CUSTOM_BUTTONS .= get_my_icon('blank'); $global{'max_id'} = $id; # not sure why.... s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o;
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4