Changeset 872
- Timestamp:
- 06/21/07 22:54:41 (1 year ago)
- Files:
-
- trunk/bb-admin/admin-functions.php (modified) (1 diff)
- trunk/bb-admin/content.php (modified) (2 diffs)
- trunk/bb-includes/classes.php (modified) (1 diff)
- trunk/bb-includes/deprecated.php (modified) (1 diff)
- trunk/bb-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bb-admin/admin-functions.php
r866 r872 694 694 /* Topics */ 695 695 696 function bb_get_deleted_topics_count() {697 global $bbdb;698 return $bbdb->get_var("SELECT COUNT(*) FROM $bbdb->topics WHERE topic_status <> 0");699 }700 701 696 function bb_move_forum_topics( $from_forum_id, $to_forum_id ) { 702 697 global $bb_cache, $bbdb; trunk/bb-admin/content.php
r792 r872 4 4 <?php if ( !bb_current_user_can('browse_deleted') ) 5 5 die(__("Now how'd you get here? And what did you think you'd being doing?")); //This should never happen. 6 add_filter( 'get_latest_topics_where', 'deleted_topics' );7 6 add_filter( 'topic_link', 'bb_make_link_view_all' ); 8 $topics = get_latest_topics( 0, $page ); 7 $topic_query = new BB_Query('topic', array('topic_status' => 1) ); 8 $topics = $topic_query->results; 9 9 10 ?> 10 11 … … 27 28 </table> 28 29 29 <?php $total = bb_get_deleted_topics_count(); echo get_page_number_links( $page, $total); ?>30 <?php echo get_page_number_links( $page, $topic_query->row_count ); ?> 30 31 31 32 <?php bb_get_admin_footer(); ?> trunk/bb-includes/classes.php
r859 r872 133 133 134 134 // Both 135 $array['page'] = isset($array['page']) ? (int) $array['page'] : 1; 135 if ( isset($array['page']) ) 136 $array['page'] = (int) $array['page']; 137 elseif ( isset($GLOBALS['page']) ) 138 $array['page'] = (int) $GLOBALS['page']; 139 else 140 $array['page'] = bb_get_uri_page(); 141 136 142 if ( $array['page'] < 1 ) 137 143 $array['page'] = 1; trunk/bb-includes/deprecated.php
r838 r872 346 346 } 347 347 348 function deleted_topics( $where ) { 349 return preg_replace( '/(\w+\.)?topic_status = ["\']?0["\']?/', "\\1topic_status = 1", $where); 350 } 351 348 352 ?> trunk/bb-includes/functions.php
r869 r872 1928 1928 } 1929 1929 1930 function deleted_topics( $where ) {1931 return str_replace('topic_status = 0', 'topic_status = 1', $where);1932 }1933 1934 1930 function no_where( $where ) { 1935 1931 return;