Changeset 1279
- Timestamp:
- 01/19/08 15:15:36 (7 months ago)
- Files:
-
- branches/punbb-1.3-dev/upload/admin/reindex.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/punbb-1.3-dev/upload/admin/reindex.php
r1236 r1279 65 65 } 66 66 67 $end_at = $start_at + $per_page;68 69 67 ?> 70 68 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> … … 92 90 93 91 // Fetch posts to process 94 $result = $db->query('SELECT p.id, p.message, t.id, t.subject, t.first_post_id FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id WHERE p.id>='.$start_at.' AND p.id<'.$end_at.' ORDER BY p.id') or error(__FILE__, __LINE__);92 $result = $db->query('SELECT p.id, p.message, t.id, t.subject, t.first_post_id FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id WHERE p.id>='.$start_at.' ORDER BY p.id LIMIT '.$per_page) or error(__FILE__, __LINE__); 95 93 94 $post_id = 0; 96 95 echo '<p>'; 97 96 while ($cur_post = $db->fetch_row($result)) … … 103 102 else 104 103 update_search_index('post', $cur_post[0], $cur_post[1]); 104 105 $post_id = $cur_post[0]; 105 106 } 106 107 echo '</p>'; 107 108 108 109 // Check if there is more work to do 109 $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE id>'.$ end_at.' ORDER BY id ASC LIMIT 1') or error(__FILE__, __LINE__);110 $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE id>'.$post_id.' ORDER BY id ASC LIMIT 1') or error(__FILE__, __LINE__); 110 111 111 112 $query_str = ($db->num_rows($result)) ? '?i_per_page='.$per_page.'&i_start_at='.$db->result($result) : '';
