Changeset 860

Show
Ignore:
Timestamp:
08/30/08 17:35:19 (3 months ago)
Author:
ayunyan
Message:

plugin:mtimport fixes typo

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/mtimport/trunk/mtimport.plugin.php

    r859 r860  
    11<?php 
    22/** 
    3  * MovableType Importer 
     3 * Movable Type Importer 
     4 * Import Movable Type Database 
    45 * 
    56 * @package mtimport 
     
    89 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 
    910 * @link http://habariproject.org/ 
     11 * 
     12 * Tested with Movable Type Ver 4.12 (MySQL) 
    1013 */ 
    1114define('MT_IMPORT_BATCH', 100); 
     
    2326    { 
    2427        return array( 
    25             'name' => 'MovableType Importer', 
     28            'name' => 'Movable Type Importer', 
    2629            'version' => '0.01-alpha', 
    2730            'url' => 'http://habariproject.org/', 
     
    6366     * Plugin filter that supplies the UI for the MT importer 
    6467     * 
     68     * @access public 
    6569     * @param string $stageoutput The output stage UI 
    6670     * @param string $import_name The name of the selected importer 
     
    103107            'db_pass' => '', 
    104108            'db_prefix' => 'mt_', 
    105             'warning' => '', 
    106             'category_import' => 1, 
    107             'utw_import' => 0, 
     109            'warning' => '' 
    108110         ); 
    109111        $inputs= array_merge( $default_values, $inputs ); 
     
    141143    private function stage_2($inputs) 
    142144    { 
    143         $valid_fields= array( 'db_name','db_host','db_user','db_pass','db_prefix', 'category_import', 'utw_import' ); 
     145        $valid_fields= array('db_name','db_host','db_user','db_pass','db_prefix'); 
    144146        $inputs= array_intersect_key($_POST, array_flip($valid_fields)); 
    145147        extract($inputs); 
     
    156158<table> 
    157159    <tr><td><?php echo _t('Import Blog', 'mtimport'); ?></td><td> 
    158     <select name="blog_id" size="1"> 
    159     <?php while (list(, $blog) = @each($blogs)): ?> 
    160       <option value="<?php echo $blog->blog_id; ?>"><?php echo htmlspecialchars($blog->blog_name); ?></option> 
    161     <?php endwhile; ?> 
    162     </select> 
    163     </td></tr> 
     160    <select name="blog_id" size="1"> 
     161    <?php while (list(, $blog) = @each($blogs)): ?> 
     162      <option value="<?php echo $blog->blog_id; ?>"><?php echo htmlspecialchars($blog->blog_name); ?></option> 
     163    <?php endwhile; ?> 
     164    </select> 
     165    </td></tr> 
    164166</table> 
    165167<input type="hidden" name="stage" value="3"> 
     
    341343            LEFT JOIN {$db_prefix}category ON entry_category_id = category_id 
    342344            WHERE entry_blog_id = '{$blog_id}' 
    343             ORDER BY id DESC LIMIT {$min}," . MT_IMPORT_BATCH . ';', 
     345            ORDER BY id DESC LIMIT {$min}," . MT_IMPORT_BATCH . ';', 
    344346            array(), 'Post'); 
    345347 
     
    448450        echo sprintf(_t('<p>Importing comments %d-%d of %d.</p>'), $min, $max, $commentcount); 
    449451 
    450         $post_info= DB::get_results("SELECT post_id, value FROM " . DB::table('postinfo') . " WHERE name= 'mp_id';"); 
     452        $post_info= DB::get_results("SELECT post_id, value FROM " . DB::table('postinfo') . " WHERE name= 'mt_id';"); 
    451453        @reset($post_info); 
    452454        while (list(, $info) = @each($post_info)) { 
     
    484486                $carray['status']= Comment::STATUS_UNAPPROVED; 
    485487            } 
     488            unset($carray['comment_junk_status']); 
    486489 
    487490            if (!isset($post_map[$carray['mt_post_id']] ) ) { 
     
    555558        echo sprintf(_t('<p>Importing trackbacks %d-%d of %d.</p>'), $min, $max, $trackbackcount); 
    556559 
    557         $post_info= DB::get_results("SELECT post_id, value FROM " . DB::table('postinfo') . " WHERE name= 'mp_id';"); 
     560        $post_info= DB::get_results("SELECT post_id, value FROM " . DB::table('postinfo') . " WHERE name= 'mt_id';"); 
    558561        @reset($post_info); 
    559562        while (list(, $info) = @each($post_info)) { 
     
    584587                $carray['status']= Comment::STATUS_UNAPPROVED; 
    585588            } 
     589            unset($carray['trackback_is_disabled']); 
    586590 
    587591            if (!isset($post_map[$carray['mt_post_id']] ) ) {