diff --git a/application/NetscapeBookmarkUtils.php b/application/netscape/NetscapeBookmarkUtils.php similarity index 90% rename from application/NetscapeBookmarkUtils.php rename to application/netscape/NetscapeBookmarkUtils.php index e0022fe..2bf928c 100644 --- a/application/NetscapeBookmarkUtils.php +++ b/application/netscape/NetscapeBookmarkUtils.php @@ -1,5 +1,10 @@ get('resource.data_dir'), - ! $conf->get('dev.debug') ? LogLevel::INFO : LogLevel::DEBUG, + !$conf->get('dev.debug') ? LogLevel::INFO : LogLevel::DEBUG, [ 'prefix' => 'import.', 'extension' => 'log', @@ -195,7 +200,7 @@ class NetscapeBookmarkUtils } // Add a new link - @ used for UNIX timestamps - $newLinkDate = new DateTime('@'.strval($bkm['time'])); + $newLinkDate = new DateTime('@' . strval($bkm['time'])); $newLinkDate->setTimezone(new DateTimeZone(date_default_timezone_get())); $newLink['created'] = $newLinkDate; $newLink['id'] = $linkDb->getNextId(); diff --git a/composer.json b/composer.json index af76347..c1f4731 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,7 @@ "Shaarli\\Exceptions\\": "application/exceptions", "Shaarli\\Feed\\": "application/feed", "Shaarli\\Http\\": "application/http", + "Shaarli\\Netscape\\": "application/netscape", "Shaarli\\Render\\": "application/render", "Shaarli\\Security\\": "application/security", "Shaarli\\Updater\\": "application/updater", diff --git a/index.php b/index.php index 1dec569..bff8e8f 100644 --- a/index.php +++ b/index.php @@ -63,7 +63,6 @@ require_once 'application/http/HttpUtils.php'; require_once 'application/http/UrlUtils.php'; require_once 'application/updater/UpdaterUtils.php'; require_once 'application/FileUtils.php'; -require_once 'application/NetscapeBookmarkUtils.php'; require_once 'application/TimeZone.php'; require_once 'application/Utils.php'; require_once 'application/PluginManager.php'; @@ -76,6 +75,7 @@ use \Shaarli\Feed\CachedPage; use \Shaarli\Feed\FeedBuilder; use \Shaarli\History; use \Shaarli\Languages; +use \Shaarli\Netscape\NetscapeBookmarkUtils; use \Shaarli\Render\PageBuilder; use \Shaarli\Render\ThemeUtils; use \Shaarli\Router; diff --git a/tests/NetscapeBookmarkUtils/BookmarkExportTest.php b/tests/netscape/BookmarkExportTest.php similarity index 94% rename from tests/NetscapeBookmarkUtils/BookmarkExportTest.php rename to tests/netscape/BookmarkExportTest.php index adf854c..6de9876 100644 --- a/tests/NetscapeBookmarkUtils/BookmarkExportTest.php +++ b/tests/netscape/BookmarkExportTest.php @@ -1,13 +1,14 @@ write(self::$testDatastore); self::$linkDb = new LinkDB(self::$testDatastore, true, false); } diff --git a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php b/tests/netscape/BookmarkImportTest.php similarity index 99% rename from tests/NetscapeBookmarkUtils/BookmarkImportTest.php rename to tests/netscape/BookmarkImportTest.php index 98c989b..ccafc16 100644 --- a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php +++ b/tests/netscape/BookmarkImportTest.php @@ -1,7 +1,7 @@