# 다음의 함수를 통채로 바꿈 sub PrintPageList { my ($pagename); my $count = 0; my $titleIsPrinted = 0; my @han = qw(가 나 다 라 마 바 사 아 자 차 카 타 파 하); my @indexTitle = (0, "A".."Z"); push (@indexTitle, @han, "기타"); my @indexSearch=("A".."Z"); push (@indexSearch, @han, "豈"); print "<a name='TOC'></a><h2>", Ts('%s pages found:', ($#_ + 1)), "</h2>\n"; # 상단에 앵커를 가리키는 인덱스 나열 my $count2 = 0; print("\n|"); while ( $count2 <= $#indexTitle ) { if ($count2 == 27) { print("<br>\n|"); } print("<a href=\"#H_$indexTitle[$count2]\"><b>"); print(" $indexTitle[$count2] "); print("</b></a>|"); $count2++; } print "<br><br>"; $count2 = 0; foreach $pagename(@_) { next if (&PageIsHidden($pagename)); until ( $pagename lt @indexSearch[$count] && ($count == 0 || $pagename ge @indexSearch[$count-1]) ) { $count++; $titleIsPrinted = 0; last if $count > 40; } if (!$titleIsPrinted) { # 페이지가 없는 색인의 앵커 처리 while ( $count2 <= ($count - 1) ) { print "\n<a name=\"H_$indexTitle[$count2]\">"; print "</a>"; $count2++; } print $q->h3("<a name=\"H_$indexTitle[$count]\" title=\"". T('Top') ."\" href=\"#TOC\">$indexTitle[$count]</A>"); $count2 = $count + 1; $titleIsPrinted=1; } print ".... " if ($pagename =~ m|/|); print &GetPageLink($pagename); if (&UserIsAdmin()) { if (-f &GetLockedPageFile($pagename)) { print " " . T('(locked)'); } print " | " . &ScriptLink("action=pagelock&set=1&id=" . $pagename, T('lock')); print " | " . &ScriptLink("action=pagelock&set=0&id=" . $pagename, T('unlock')); if (defined($HiddenPage{$pagename})) { print " | " . T('(hidden)'); } print " | " . &ScriptLink("action=pagehide&set=1&id=" . $pagename, T('hide')); print " | " . &ScriptLink("action=pagehide&set=0&id=" . $pagename, T('unhide')); } print $q->br; print "\n"; } }
diff -u -r1.271 -r1.273 --- wiki.pl 14 Feb 2005 03:55:06 -0000 1.271 +++ wiki.pl 19 Feb 2005 06:28:42 -0000 1.273 @@ -6488,7 +6488,7 @@ my @indexSearch=("A".."Z"); push (@indexSearch, @han, "豈"); - print "<h2>", Ts('%s pages found:', ($#_ + 1)), "</h2>\n"; + print "<a name='TOC'></a><h2>", Ts('%s pages found:', ($#_ + 1)), "</h2>\n"; ############### ### replaced by gypark @@ -6548,10 +6548,7 @@ $count2++; } # 앵커를 삽입 - print "\n<a name=\"H_$indexTitle[$count]\"></a>"; - print $q->h3($indexTitle[$count] - . " <a href=\"#PAGE_TOP\"><img src=\"$IconDir/gotop.gif\" align=\"texttop\" alt=\"" . T('Top') - . "\"></a>"); + print $q->h3("<a name=\"H_$indexTitle[$count]\" title=\"". T('Top') ."\" href=\"#TOC\">$indexTitle[$count]</A>"); $count2 = $count + 1; ### gypark 의 색인 패치 ###############
ext1.90b - "A", "B", ... ,"가", "나", ... ,"하"라는 이름의 페이지가 있을 경우 index 출력이 엉망이 되는 문제 수정