작은숲:위키노트/모니위키 패치/1.1.0-20050409
적용한 MoniWiki Release: 1.1.0-20050409
WantedPages 매크로 오류
WantedPages 매크로에서 만약 WantedPage가 하나도 존재하지 않는 경우에 asort() 함수와 foreach에서 경고 문구를 출력한다. 이를 보완.
--- WantedPages.php 2005/04/14 00:03:27 1.1
+++ WantedPages.php 2005/04/14 00:04:58
@@ -25,6 +25,9 @@
}
}
}
++ if (!count($wants)) return;
+ asort($wants);
$out="<ul>\n";
while (list($name,$owns) = each($wants)) {Please see: http://kldp.net/tracker/index.php?func=detail&aid=300842&group_id=210&atid=100210
페이지 하단에 TwinPages가 나오기 전에 빈줄 삽입
--- wiki.php 2005/04/14 00:38:56 1.1
+++ wiki.php 2005/04/14 00:39:17
@@ -11,9 +11,9 @@
$lines=array();
if ($twins === true) {
if ($DBInfo->interwiki['TwinPages']) {
- if ($lines) $lines[]="----";
+ if ($lines) { $lines[]=''; $lines[]="----"; }
$lines[]=sprintf(_("See %s"),"[wiki:TwinPages:".$this->page->name." "._("TwinPages")."]");
}
} else if ($twins) {
- if ($lines) $lines[]="----";
+ if ($lines) { $lines[]=''; $lines[]="----"; }
$twins[0]=_("See TwinPages: ").$twins[0];
$lines=array_merge($lines,$twins);
}RecentChanges의 테이블 형식에서 넉넉하게 보이기
답답한 건 싫다! 넉넉하게 보고 싶다. RecentChanges를 테이블 형식으로 볼 때 넉넉하게 볼 수 있도록 수정한다.
--- RecentChanges.php 2005/04/14 00:42:39 1.1
+++ RecentChanges.php 2005/04/14 00:43:17
@@ -57,7 +57,7 @@
'$out.= "<li>$title $date</li>\n";';
}
if (in_array ("table", $args)) {
- $bra="<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
+ $bra="<table border='0' cellpadding='2' cellspacing='0' width='100%'>";
$template=들여쓰기 상태에서 빈줄 삽입하면 한줄 띄기
현재 cvs 버전에서는 수정된 문제.
--- wiki.php 2005/04/14 00:39:16 1.2
+++ wiki.php 2005/04/14 07:02:52
@@ -2438,6 +2438,8 @@
}
if ($DBInfo->auto_linebreak && !$in_table && !$this->nobr)
$text.=$line."<br />\n";
+ else if (!$DBInfo->auto_linebreak and $in_li)
+ $text .= $line ."<br />\n";
else
$text.=$line."\n";
$this->nobr=0;Please see: http://kldp.net/tracker/index.php?func=detail&aid=300838&group_id=210&atid=100210
Navigation 매크로가 제대로 동작하도록 normalize_word() 함수 수정
[[wiki:something 어떤 것]]과 같은 형식일 경우 제대로 동작하지 않는 문제 수정.
--- wikilib.php 2005/04/14 07:13:57 1.1
+++ wikilib.php 2005/04/14 07:14:09
@@ -139,7 +139,7 @@
}
if (preg_match("/^wiki:/", $page)) { # wiki:
- $text=$page=substr($page,6);
+ $text=$page=substr($page,5);
if (strpos($page,' ')) { # have a space ?
list($page,$text)= explode(' ',$page,2);Please see: http://kldp.net/tracker/index.php?func=detail&aid=300847&group_id=210&atid=100210
Navigation 매크로 오류 수정
첫번째 페이지에 들어갔을 경우 이전 페이지가 제대로 나오지 않는 문제 수정.
--- Navigation.php 2005/04/14 07:21:01 1.1
+++ Navigation.php 2005/04/14 07:24:42
@@ -67,11 +67,9 @@
#print ':'.$formatter->page->name;
if ($indices[$i]==$current) {
if ($i > 0) $prev=$i-1;
- if ($i < ($count - 1)) {
- $next=$i+1;
- } else {
- $next = 0;
- }
+ else $prev = $count - 1;
+ if ($i < ($count - 1)) $next=$i+1;
+ else $next = 0;
}
}
#print $prev.':'.$next;Please see: http://kldp.net/tracker/index.php?func=detail&aid=300848&group_id=210&atid=100210
테마에서 아이콘 설정할 때 설정되지 않은 아이콘 재설정
테마 디렉토리의 theme.php에서 아이콘을 설정하는 경우, 설정되지 않은 아이콘들은 기존 아이콘 설정을 유지하도록 한다.
--- wiki.php 2005/04/14 07:02:51 1.3
+++ wiki.php 2005/04/14 08:10:48
@@ -1442,6 +1442,16 @@
$this->icon_cat=$DBInfo->icon_cat;
$this->icon_sep=$DBInfo->icon_sep;
}
+ else {
+ foreach ($DBInfo->icon as $key => $value) {
+ if ($this->icon[$key]) continue;
+ else $this->icon[$key] = $value;
+ }
++ if (!$this->icon_bra) $this->icon_bra = $DBInfo->icon_bra;
+ if (!$this->icon_cat) $this->icon_cat = $DBInfo->icon_cat;
+ if (!$this->icon_sep) $this->icon_sep = $DBInfo->icon_sep;
+ }
if (!$this->menu) {
$this->menu=&$DBInfo->menu;Please see: http://kldp.net/tracker/index.php?func=detail&aid=300849&group_id=210&atid=100210
InterWiki 링크의 경우 다른 윈도우 타겟에서 열릴 수 있도록 interwiki_target을 설정
config.php에서 $interwiki_target을 따로 설정하게 하고, 이 값이 설정된 경우 InterWiki 링크가 이 타겟에서 열리도록 한다.
--- wiki.php 2005/04/14 08:14:49 1.5
+++ wiki.php 2005/04/15 01:19:39
@@ -1743,6 +1743,8 @@
$img='';
}
+ if ($DBInfo->interwiki_target) $attr .= " target='$DBInfo->interwiki_target'";
+ if (preg_match("/\.(png|gif|jpeg|jpg)$/i",$url))
return "<a href='".$url."' $attr title='$wiki:$page'><img border='0' align='middle' alt='$text' src='$url' /></a>$extra";$auto_linebreak 설정시 pre 블럭 시작과 끝에서 줄바꿈 없애기
$auto_linebreak을 설정했을 때 pre 블럭을 사용하기 위해 한 라인에 {{{, }}}, {{|, |}} 만을 적을 때는 해당 라인에서 줄바꿈이 일어나지 않도록 한다.
--- wiki.php 2005/04/15 01:32:38 1.8
+++ wiki.php 2005/04/16 02:11:30
@@ -2302,6 +2302,7 @@
if (trim($this->pre_line))
$this->pre_line.="\n";
$line=substr($line,0,$p);
+ if ($DBInfo->auto_linebreak and !$line) $this->nobr = 1;
}
# $line=str_replace("<","<",$line);
#$line=preg_replace("/\\$/","$",$line);
@@ -2408,6 +2409,7 @@
#$line=preg_replace(array("/{{\|/","/\|}}/"),
# array("</div><table class='closure'><tr class='closure'><td class='closure'><div>","</div></td></tr></table><div>"),$line);
+ if ($DBInfo->auto_linebreak and !trim(preg_replace(array("/{{\|/", "/\|}}/"), array('', ''), $line))) $this->nobr = 1;
$line=preg_replace($this->extrarule,$this->extrarepl,$line);
$line=$close.$p_close.$open.$line;Please see: http://kldp.net/tracker/index.php?func=detail&aid=300852&group_id=210&atid=100210
ISBN 매크로 버그 수정
ISBN 매크로에서 $lang을 'K'로 주었을 때 책표지 이미지의 URL 형식이 다르기 때문에 기존 GIF 형식의 책표지를 가져오지 못한다.
--- ISBN.php 2005/04/21 01:16:53 1.3
+++ ISBN.php 2005/04/21 01:17:54
@@ -3,13 +3,13 @@
function macro_ISBN($formatter="",$value="") {
$ISBN_MAP="IsbnMap";
$DEFAULT=<<<EOS
Amazon http://www.amazon.com/exec/obidos/ISBN= http://images.amazon.com/images/P/\$ISBN.01.MZZZZZZZ.gif
-Aladdin http://www.aladdin.co.kr/catalog/book.asp?ISBN= http://image.aladdin.co.kr/cover/cover/\$ISBN_1.\$EXT?jpg\n
+Aladdin http://www.aladdin.co.kr/catalog/book.asp?ISBN= http://image.aladdin.co.kr/cover/cover/\$ISBN_1.\$EXT\n
EOS;
$DEFAULT_ISBN="Amazon";
@@ -29,7 +29,7 @@
} else $lang=$DEFAULT_ISBN;
$attr='';
- $ext='';
+ $ext='gif';
if ($match[2]) {
$args=explode(',',$match[2]);
foreach ($args as $arg) {Please see: http://kldp.net/tracker/index.php?func=detail&aid=300854&group_id=210&atid=100210
SisterWiki Index 나오는 형태 수정
SisterWiki Index 나오는 줄 위에 나오는 ----를 <hr>로 바꾼다.
--- wiki.php 2005/04/16 02:11:29 1.11
+++ wiki.php 2005/04/20 12:24:30
@@ -2499,7 +2499,7 @@
if ($this->sisters and !$options['nosisters']) {
$sisters=join("\n",$this->sisters);
$sisters=preg_replace("/(".$wordrule.")/e","\$this->link_repl('\\1')",$sisters);
- print "<div id='wikiSister'>\n<tt class='foot'>----</tt><br/>\nSister Sites Index<br />\n$sisters</div>\n";
+ print "<div id='wikiSister'>\n<hr class='wiki' />\nSister Sites Index<br />\n$sisters</div>\n";
}
if ($options['pagelinks']) $this->store_pagelinks();