Index: trunk/extensions/Offline/SearchBz2.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | if ($result === false) |
89 | 89 | return false; |
90 | 90 | |
91 | | - list ($bzfile, $title) = $result; |
| 91 | + list ($bzfile, $offset, $title) = $result; |
92 | 92 | |
93 | 93 | $matches = array(); |
94 | 94 | $row = new stdClass(); |
Index: trunk/extensions/Offline/SpecialOffline.php |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | // lookup a real article in the index can be searched |
49 | 49 | $results = DumpReader::index_search(wfMsg('offline_test_article')); |
50 | 50 | if (count($results) > 0) |
51 | | - list ($bz_file, $entry_title) = $results[0]; |
| 51 | + list ($bz_file, $offset, $entry_title) = $results[0]; |
52 | 52 | |
53 | 53 | $test_index = isset($bz_file); |
54 | 54 | $this->printTest($test_index, 'offline_index_test'); |
Index: trunk/extensions/Offline/DumpReader.php |
— | — | @@ -10,7 +10,8 @@ |
11 | 11 | $results = self::index_search($title); |
12 | 12 | if (count($results) > 0) { |
13 | 13 | $archive_file = $results[0][0]; |
14 | | - $title = $results[0][1]; |
| 14 | + $plaintext_offset = $results[0][1]; |
| 15 | + $title = $results[0][2]; |
15 | 16 | |
16 | 17 | $article_wml = self::load_all_data($title, $archive_file); |
17 | 18 | } else { |
— | — | @@ -104,9 +105,7 @@ |
105 | 106 | for ($i = $matches->begin(); !$i->equals($matches->end()); $i->next()) |
106 | 107 | { |
107 | 108 | $entry = $i->get_document()->get_data(); |
108 | | - $fsep = strpos($entry, ':'); |
109 | | - $row = array(substr($entry, 0, $fsep), substr($entry, $fsep + 1)); |
110 | | - $result[] = $row; |
| 109 | + $result[] = explode(':', $entry, 3); |
111 | 110 | } |
112 | 111 | # not in Xapian 1.0.X |
113 | 112 | #$db->close(); |