Make WordPress Core

Changeset 1099


Ignore:
Timestamp:
04/19/2004 06:13:26 AM (21 years ago)
Author:
saxmatt
Message:

Might fix some OPML imports but I'm pretty sure I just broke others.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r956 r1099  
    3333<div class="wrap">
    3434
    35     <h3>Import your blogroll from another system </h3>
     35    <h2>Import your blogroll from another system </h2>
    3636    <!-- <form name="blogroll" action="link-import.php" method="get"> -->
    3737    <form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll">
     
    8787<div class="wrap">
    8888
    89      <h3>Importing...</h3>
     89     <h2>Importing...</h2>
    9090<?php
    9191                $cat_id = $HTTP_POST_VARS['cat_id'];
     
    123123                        if ('http' == substr($titles[$i], 0, 4))
    124124                            $titles[$i] = '';
    125                         $query = "INSERT INTO $tablelinks (link_url, link_name, link_target, link_category, link_description, link_owner)
    126                                   VALUES('{$urls[$i]}', '".addslashes($names[$i])."', '', $cat_id, '".addslashes($descriptions[$i])."', $user_ID)\n";
     125                        $query = "INSERT INTO $tablelinks (link_url, link_name, link_target, link_category, link_description, link_owner, link_rss)
     126                                  VALUES('{$urls[$i]}', '".addslashes($names[$i])."', '', $cat_id, '".addslashes($descriptions[$i])."', $user_ID, {$feeds[$i]})\n";
    127127                        $result = $wpdb->query($query);
    128128                        echo "<p>Inserted <strong>{$names[$i]}</strong></p>";
  • trunk/wp-admin/link-parse-opml.php

    r741 r1099  
    77// if we are doing OPML use this map
    88$opml_map = array(
    9                   'link_url' => 'URL',
    10                   'link_name' => 'TEXT',
    11                   'link_target' => 'TARGET',
    12                   'link_description' => 'DESCRIPTION'
    13                  );
     9'link_url' => 'URL',
     10'link_url' => 'HTMLURL',
     11'link_name' => 'TEXT',
     12'link_name' => 'TITLE',
     13'link_target' => 'TARGET',
     14'link_description' => 'DESCRIPTION',
     15'link_rss' => 'XMLURL'
     16);
    1417
    1518$map = $opml_map;
     
    2124function startElement($parser, $tagName, $attrs) {
    2225    global $updated_timestamp, $all_links, $map;
    23     global $names, $urls, $targets, $descriptions;
     26    global $names, $urls, $targets, $descriptions, $feeds;
    2427
    2528    if ($tagName == 'OUTLINE') {
     
    3235        if ($map['link_description'] != '')
    3336            $link_description  = $attrs[$map['link_description']];
     37        if ($map['link_rss'] != '')
     38            $link_rss  = $attrs[$map['link_rss']];
    3439        //echo("got data: link_url = [$link_url], link_name = [$link_name], link_target = [$link_target], link_description = [$link_description]<br />\n");
    3540        // save the data away.
     
    3742        $urls[] = $link_url;
    3843        $targets[] = $link_target;
     44        $feeds[] = $link_rss;
    3945        $descriptions[] = $link_description;
    4046    }
Note: See TracChangeset for help on using the changeset viewer.