Make WordPress Core


Ignore:
Timestamp:
11/19/2006 07:56:05 AM (18 years ago)
Author:
ryan
Message:

Remove trailing spaces and convert spaces to tabs. Props Nazgul. fixes #986

File:
1 edited

Legend:

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

    r3295 r4495  
    55// we need to map XML attribute names to our columns
    66$opml_map = array('URL'         => 'link_url',
    7                   'HTMLURL'     => 'link_url',
    8                   'TEXT'        => 'link_name',
    9                   'TITLE'       => 'link_name',
    10                   'TARGET'      => 'link_target',
    11                   'DESCRIPTION' => 'link_description',
    12                   'XMLURL'      => 'link_rss'
     7    'HTMLURL'     => 'link_url',
     8    'TEXT'        => 'link_name',
     9    'TITLE'       => 'link_name',
     10    'TARGET'      => 'link_target',
     11    'DESCRIPTION' => 'link_description',
     12    'XMLURL'      => 'link_rss'
    1313);
    1414
     
    2121function startElement($parser, $tagName, $attrs) {
    2222    global $updated_timestamp, $all_links, $map;
    23     global $names, $urls, $targets, $descriptions, $feeds;
     23    global $names, $urls, $targets, $descriptions, $feeds;
    2424
    2525    if ($tagName == 'OUTLINE') {
    26         foreach (array_keys($map) as $key) {
    27             if (isset($attrs[$key])) {
    28                 $$map[$key] = $attrs[$key];
    29             }
    30         }
     26        foreach (array_keys($map) as $key) {
     27            if (isset($attrs[$key])) {
     28                $$map[$key] = $attrs[$key];
     29            }
     30        }
    3131
    32         //echo("got data: link_url = [$link_url], link_name = [$link_name], link_target = [$link_target], link_description = [$link_description]<br />\n");
     32        //echo("got data: link_url = [$link_url], link_name = [$link_name], link_target = [$link_target], link_description = [$link_description]<br />\n");
    3333
    34         // save the data away.
    35         $names[] = $link_name;
    36         $urls[] = $link_url;
    37         $targets[] = $link_target;
     34        // save the data away.
     35        $names[] = $link_name;
     36        $urls[] = $link_url;
     37        $targets[] = $link_target;
    3838        $feeds[] = $link_rss;
    39         $descriptions[] = $link_description;
    40     } // end if outline
     39        $descriptions[] = $link_description;
     40    } // end if outline
    4141}
    4242
     
    5656
    5757if (!xml_parse($xml_parser, $opml, true)) {
    58     echo(sprintf(__('XML error: %1$s at line %2$s'),
    59                    xml_error_string(xml_get_error_code($xml_parser)),
    60                    xml_get_current_line_number($xml_parser)));
     58    echo(sprintf(__('XML error: %1$s at line %2$s'),
     59    xml_error_string(xml_get_error_code($xml_parser)),
     60    xml_get_current_line_number($xml_parser)));
    6161}
    6262
Note: See TracChangeset for help on using the changeset viewer.