Changeset 1280
- Timestamp:
- 01/19/08 15:16:24 (7 months ago)
- Files:
-
- trunk/upload/admin_maintenance.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/upload/admin_maintenance.php
r858 r1280 70 70 } 71 71 72 $end_at = $start_at + $per_page;73 74 72 ?> 75 73 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> … … 96 94 97 95 // Fetch posts to process 98 $result = $db->query('SELECT DISTINCT t.id, p.id, p.message FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id WHERE t.id>='.$start_at.' AND t.id<'.$end_at.' ORDER BY t.id') or error('Unable to fetch topic/post info', __FILE__, __LINE__, $db->error());96 $result = $db->query('SELECT DISTINCT t.id, p.id, p.message FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id WHERE t.id>='.$start_at.' ORDER BY t.id LIMIT '.$per_page) or error('Unable to fetch topic/post info', __FILE__, __LINE__, $db->error()); 99 97 100 98 $cur_topic = 0; … … 119 117 120 118 // Check if there is more work to do 121 $result = $db->query('SELECT id FROM '.$db->prefix.'topics WHERE id>'.$ end_at) or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());119 $result = $db->query('SELECT id FROM '.$db->prefix.'topics WHERE id>'.$cur_topic.' ORDER BY id ASC LIMIT 1') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error()); 122 120 123 $query_str = ($db->num_rows($result)) ? '?i_per_page='.$per_page.'&i_start_at='.$ end_at: '';121 $query_str = ($db->num_rows($result)) ? '?i_per_page='.$per_page.'&i_start_at='.$db->result($result) : ''; 124 122 125 123 $db->end_transaction();
