修訂 | 02887f16864e3bb6051ca090be3f7af78735fc53 (tree) |
---|---|
時間 | 2007-09-23 14:00:24 |
作者 | henoheno <henoheno> |
Commiter | henoheno |
Footer should be shown at the bottom of the wiki table
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone |
3 | -// $Id: tracker.inc.php,v 1.71 2007/09/23 04:47:42 henoheno Exp $ | |
3 | +// $Id: tracker.inc.php,v 1.72 2007/09/23 05:00:24 henoheno Exp $ | |
4 | 4 | // Copyright (C) 2003-2005, 2007 PukiWiki Developers Team |
5 | 5 | // License: GPL v2 or (at your option) any later version |
6 | 6 | // |
@@ -1163,11 +1163,15 @@ class Tracker_list | ||
1163 | 1163 | } |
1164 | 1164 | |
1165 | 1165 | // Loading template |
1166 | - $header = $body = array(); | |
1166 | + // TODO: How do you feel single/multiple table rows with 'c'(decolation)? | |
1167 | + $matches = $header = $body = $footer = array(); | |
1167 | 1168 | foreach (plugin_tracker_get_source($list) as $line) { |
1168 | - if (preg_match('/^\|(.+)\|[hfc]$/i', $line)) { | |
1169 | - // TODO: Why c and f here | |
1170 | - $header[] = $line; // Table header, footer, and decoration | |
1169 | + if (preg_match('/^\|.+\|([hfc])$/i', $line, $matches)) { | |
1170 | + if (strtolower($matches[1]) == 'jf') { | |
1171 | + $footer[] = $line; // Table footer | |
1172 | + } else { | |
1173 | + $header[] = $line; // Table header, and decoration | |
1174 | + } | |
1171 | 1175 | } else { |
1172 | 1176 | $body[] = $line; // The others |
1173 | 1177 | } |
@@ -1187,6 +1191,9 @@ class Tracker_list | ||
1187 | 1191 | $source[] = $line; |
1188 | 1192 | } |
1189 | 1193 | } |
1194 | + foreach($footer as $line) { | |
1195 | + $source[] = preg_replace_callback($regex, array(& $this, '_replace_title'), $line); | |
1196 | + } | |
1190 | 1197 | |
1191 | 1198 | return implode('', $source); |
1192 | 1199 | } |