Changeset 858 for plugins/mtimport/trunk/mtimport.plugin.php
- Timestamp:
- 08/30/08 17:12:44 (4 months ago)
- Files:
-
- 1 modified
-
plugins/mtimport/trunk/mtimport.plugin.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/mtimport/trunk/mtimport.plugin.php
r857 r858 531 531 532 532 /** 533 * The plugin sink for the auth_ajax_mt_import_t ackbacks hook.533 * The plugin sink for the auth_ajax_mt_import_trackbacks hook. 534 534 * Responds via authenticated ajax to requests for comment importing. 535 535 * … … 537 537 * @param AjaxHandler $handler The handler that handled the request, contains $_POST info 538 538 */ 539 public function action_auth_ajax_mt_import_t ackbacks($handler)540 { 541 $valid_fields = array( 'db_name','db_host','db_user','db_pass','db_prefix', 'blog_id', 't ackbackindex');539 public function action_auth_ajax_mt_import_trackbacks($handler) 540 { 541 $valid_fields = array( 'db_name','db_host','db_user','db_pass','db_prefix', 'blog_id', 'trackbackindex'); 542 542 $inputs= array_intersect_key( $_POST, array_flip( $valid_fields ) ); 543 543 extract( $inputs ); … … 549 549 } 550 550 551 $t ackbackcount= $mtdb->get_value("SELECT count(tackback_id) FROM {$db_prefix}tackback WHERE tackback_blog_id = '{$blog_id}';");552 $min = $t ackbackindex * MT_IMPORT_BATCH + 1;553 $max = min( ( $t ackbackindex + 1 ) * MT_IMPORT_BATCH, $tackbackcount );554 555 echo sprintf(_t('<p>Importing t ackbacks %d-%d of %d.</p>'), $min, $max, $tackbackcount);551 $trackbackcount= $mtdb->get_value("SELECT count(trackback_id) FROM {$db_prefix}trackback WHERE trackback_blog_id = '{$blog_id}';"); 552 $min = $trackbackindex * MT_IMPORT_BATCH + 1; 553 $max = min( ( $trackbackindex + 1 ) * MT_IMPORT_BATCH, $trackbackcount ); 554 555 echo sprintf(_t('<p>Importing trackbacks %d-%d of %d.</p>'), $min, $max, $trackbackcount); 556 556 557 557 $post_info= DB::get_results("SELECT post_id, value FROM " . DB::table('postinfo') . " WHERE name= 'mp_id';"); … … 561 561 } 562 562 563 $t ackbacks = $mtdb->get_results("SELECT563 $trackbacks = $mtdb->get_results("SELECT 564 564 trackback_title AS name, 565 565 trackback_url AS url, … … 620 620 echo '</ul>'; 621 621 } 622 return; 622 623 } 623 624
