Revision | 7b6b8acff829065892eca5408520041eb1e8e573 (tree) |
---|---|
Time | 2007-09-23 22:19:41 |
Author | henoheno <henoheno> |
Commiter | henoheno |
$rows['_match'] is not needed for your memory
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone |
3 | -// $Id: tracker.inc.php,v 1.74 2007/09/23 12:56:42 henoheno Exp $ | |
3 | +// $Id: tracker.inc.php,v 1.75 2007/09/23 13:19:41 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 | // |
@@ -838,22 +838,21 @@ class Tracker_list | ||
838 | 838 | '_real' => $basename, |
839 | 839 | '_update' => $filetime, |
840 | 840 | '_past' => $filetime, |
841 | - '_match' => FALSE, | |
842 | 841 | ); |
843 | 842 | |
844 | 843 | // Load / Redefine cell |
845 | 844 | $matches = array(); |
846 | - $row['_match'] = preg_match($this->pattern, $source, $matches); | |
847 | - unset($source); | |
848 | - if ($row['_match']) { | |
845 | + if (preg_match($this->pattern, $source, $matches)) { | |
849 | 846 | array_shift($matches); // $matches[0] = all of the captured string |
850 | 847 | foreach ($this->pattern_fields as $key => $fieldname) { |
851 | 848 | $row[$fieldname] = trim($matches[$key]); |
852 | 849 | unset($matches[$key]); |
853 | 850 | } |
851 | + $this->rows[$basename] = $row; | |
852 | + } else if (PLUGIN_TRACKER_LIST_SHOW_ERROR_PAGE) { | |
853 | + $this->rows[$basename] = $row; // Error | |
854 | 854 | } |
855 | 855 | |
856 | - $this->rows[$basename] = $row; | |
857 | 856 | return TRUE; |
858 | 857 | } |
859 | 858 |
@@ -1190,7 +1189,6 @@ class Tracker_list | ||
1190 | 1189 | unset($t_header); |
1191 | 1190 | // Repeat |
1192 | 1191 | foreach ($rows as $row) { |
1193 | - if (! PLUGIN_TRACKER_LIST_SHOW_ERROR_PAGE && ! $row['_match']) continue; | |
1194 | 1192 | $this->_items = $row; |
1195 | 1193 | foreach ($t_body as $line) { |
1196 | 1194 | if (ltrim($line) != '') { |