Make WordPress Core


Ignore:
Timestamp:
02/14/2006 10:32:25 PM (19 years ago)
Author:
ryan
Message:

dotclear importer fix from thomasq. fixes #2430

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/dotclear.php

    r3517 r3530  
    11<?php
     2/*
     3 * Dotclear import plugin
     4 * by Thomas Quinot - http://thomas.quinot.org/
     5 */
     6
    27/**
    38    Add These Functions to make our lives easier
     
    202207        $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost'));
    203208        set_magic_quotes_runtime(0);
    204         $prefix = get_option('tpre');
    205 
    206         return $dcdb->get_results('SELECT * FROM dc_link ORDER BY position', ARRAY_A);
     209        $dbprefix = get_option('dbprefix');
     210
     211        return $dcdb->get_results('SELECT * FROM '.$dbprefix.'link ORDER BY position', ARRAY_A);
    207212    }
    208213
     
    350355                $Title = $wpdb->escape(csc ($post_titre));
    351356                $post_content = textconv ($post_content);
     357                $post_excerpt = "";
    352358                if ($post_chapo != "") {
    353359                    $post_excerpt = textconv ($post_chapo);
     
    604610    function cleanup_dcimport()
    605611    {
    606         delete_option('tpre');
     612        delete_option('dbprefix');
    607613        delete_option('dc_cats');
    608614        delete_option('dcid2wpid');
     
    645651        printf('<li><label for="dbname">%s</label> <input type="text" name="dbname" /></li>', __('Dotclear Database Name:'));
    646652        printf('<li><label for="dbhost">%s</label> <input type="text" name="dbhost" value="localhost" /></li>', __('Dotclear Database Host:'));
    647         /* printf('<li><label for="dbprefix">%s</label> <input type="text" name="dbprefix" /></li>', __('Dotclear Table prefix (if any):')); */
     653        printf('<li><label for="dbprefix">%s</label> <input type="text" name="dbprefix" value="dc_"/></li>', __('Dotclear Table prefix:'));
    648654        printf('<li><label for="dccharset">%s</label> <input type="text" name="dccharset" value="ISO-8859-15"/></li>', __('Originating character set:'));
    649655        echo '</ul>';
Note: See TracChangeset for help on using the changeset viewer.