From: VirtualTam Date: Mon, 3 Dec 2018 23:13:42 +0000 (+0100) Subject: namespacing: \Shaarli\Netscape\NetscapeBookmarkUtils X-Git-Tag: v0.11.0~43^2~5 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=349b0144011e25f2b1a727b1d28d49d55b3b2ebb namespacing: \Shaarli\Netscape\NetscapeBookmarkUtils Signed-off-by: VirtualTam --- 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 e0022fe1..2bf928c2 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 af763472..c1f47317 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 1dec569c..bff8e8ff 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 adf854c5..6de9876d 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 98c989bc..ccafc161 100644 --- a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php +++ b/tests/netscape/BookmarkImportTest.php @@ -1,7 +1,7 @@