X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBookmark%2Fdeliciousbackupimporter.php;h=1eb015f380efa63a6f2a313c867439cd9cb2f51b;hb=524b98bfa3fd340ade6ce8b0e7f23ce773db5d92;hp=01b996bbe534df1103db8d9725a7bfa7bed712f6;hpb=ccb290cb6831d519f7be530f9ad00a24d9663d8f;p=quix0rs-gnu-social.git diff --git a/plugins/Bookmark/deliciousbackupimporter.php b/plugins/Bookmark/deliciousbackupimporter.php index 01b996bbe5..1eb015f380 100644 --- a/plugins/Bookmark/deliciousbackupimporter.php +++ b/plugins/Bookmark/deliciousbackupimporter.php @@ -4,7 +4,7 @@ * Copyright (C) 2010, StatusNet, Inc. * * Importer class for Delicious.com backups - * + * * PHP version 5 * * This program is free software: you can redistribute it and/or modify @@ -44,7 +44,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class DeliciousBackupImporter extends QueueHandler { /** @@ -52,7 +51,6 @@ class DeliciousBackupImporter extends QueueHandler * * @return string transport string */ - function transport() { return 'dlcsback'; @@ -65,14 +63,13 @@ class DeliciousBackupImporter extends QueueHandler * and import to StatusNet as Bookmark activities. * * The document format is terrible. It consists of a
's lost inside. * * @param array $data pair of user, text * * @return boolean success value */ - function handle($data) { list($user, $body) = $data; @@ -82,7 +79,8 @@ class DeliciousBackupImporter extends QueueHandler $dls = $doc->getElementsByTagName('dl'); if ($dls->length != 1) { - throw new ClientException(_("Bad import file.")); + // TRANS: Client exception thrown when a file upload is incorrect. + throw new ClientException(_m('Bad import file.')); } $dl = $dls->item(0); @@ -97,9 +95,11 @@ class DeliciousBackupImporter extends QueueHandler if ($child->nodeType != XML_ELEMENT_NODE) { continue; } - common_log(LOG_INFO, $child->tagName); switch (strtolower($child->tagName)) { case 'dt': + //
in the