- xml_set_element_handler($xml_parser, "startElement", "endElement");
-
- $fp = fopen($_FILES['opml_file']['tmp_name'], "r");
-
- if ($fp) {
-
- while ($data = fread($fp, 4096)) {
-
- if (!xml_parse($xml_parser, $data, feof($fp))) {
-
- print sprintf("Unable to parse OPML file, XML error: %s at line %d",
- xml_error_string(xml_get_error_code($xml_parser)),
- xml_get_current_line_number($xml_parser));
-
- print "<p><a class=\"button\" href=\"prefs.php\">
- Return to preferences</a>";
-
- return;
-
- }
- }
+ if (db_num_rows($result) == 0) {
+ db_query($link, "INSERT INTO ttrss_feed_categories
+ (title,owner_uid)
+ VALUES ('Imported feeds', '$owner_uid')");
+ }