From 36c6e35c7ed45ef6b18d48359b38f9c869f63245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Fri, 20 Jul 2018 02:52:18 +0200 Subject: [PATCH] Misc cleanups (#5417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed http://github to https://github Signed-off-by: Roland Häder * reverted back Signed-off-by: Roland Häder * Added type-hint 'array' as the method uses foreach() on it. Signed-off-by: Roland Häder * Tpzo fixed ... Signed-off-by: Roland Häder * Added missing new-line at end of file, will make some POSIX parsers being lesser confused ... Signed-off-by: Roland Häder --- composer.lock | 57 ++++++++++++++++++++++++++++--- config/addon-sample.ini.php | 2 +- config/config.ini.php | 4 +-- config/local-sample.ini.php | 2 +- config/settings.ini.php | 2 +- src/Core/NotificationsManager.php | 2 +- view/theme/vier/theme.php | 8 ++--- 7 files changed, 61 insertions(+), 16 deletions(-) diff --git a/composer.lock b/composer.lock index 5ba270983..409deb2e8 100644 --- a/composer.lock +++ b/composer.lock @@ -2297,6 +2297,53 @@ ], "time": "2017-10-19T19:58:43+00:00" }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -3052,7 +3099,7 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", @@ -3154,7 +3201,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -3222,7 +3269,7 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" @@ -3274,7 +3321,7 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], @@ -3376,7 +3423,7 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "time": "2016-11-19T07:33:16+00:00" }, { diff --git a/config/addon-sample.ini.php b/config/addon-sample.ini.php index 7d8054cd2..2665412a5 100644 --- a/config/addon-sample.ini.php +++ b/config/addon-sample.ini.php @@ -7,4 +7,4 @@ ;consumersecret = mysqlusername INI; -// Keep this line \ No newline at end of file +// Keep this line diff --git a/config/config.ini.php b/config/config.ini.php index 9808c970d..827439984 100644 --- a/config/config.ini.php +++ b/config/config.ini.php @@ -3,7 +3,7 @@ ; CONFIG.INI.PHP ; This file declares the default values for the base config of Friendica. -; These configuration values aren't accessible from the admin settings page and custom values must be set in config/loca.ini.php +; These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.ini.php ; Please don't edit this file directly as its content may change in the upcoming versions. @@ -405,4 +405,4 @@ debug = false lockpath = INI; -// Keep this line \ No newline at end of file +// Keep this line diff --git a/config/local-sample.ini.php b/config/local-sample.ini.php index 0e46f22f9..359f3ee68 100644 --- a/config/local-sample.ini.php +++ b/config/local-sample.ini.php @@ -38,4 +38,4 @@ default_timezone = UTC language = en INI; -// Keep this line \ No newline at end of file +// Keep this line diff --git a/config/settings.ini.php b/config/settings.ini.php index c3acdaa6d..3a30bc386 100644 --- a/config/settings.ini.php +++ b/config/settings.ini.php @@ -105,4 +105,4 @@ url = [featurelock] INI; -// Keep this line \ No newline at end of file +// Keep this line diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index fa8476b90..6605abf79 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -224,7 +224,7 @@ class NotificationsManager extends BaseObject * string 'ago' => T relative date of the notification * bool 'seen' => Is the notification marked as "seen" */ - private function formatNotifs($notifs, $ident = "") + private function formatNotifs(array $notifs, $ident = "") { $notif = []; $arr = []; diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 58f099b83..bd7ccf008 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -29,12 +29,10 @@ function vier_init(App $a) $a->set_template_engine('smarty3'); - if (!empty($a->argv[0])) { - if ($a->argv[0] . defaults($a->argv, 1, '') === "profile".$a->user['nickname'] || $a->argv[0] === "network" && local_user()) { - vier_community_info(); + if (!empty($a->argv[0]) && $a->argv[0] . defaults($a->argv, 1, '') === "profile".$a->user['nickname'] || $a->argv[0] === "network" && local_user()) { + vier_community_info(); - $a->page['htmlhead'] .= "\n"; - } + $a->page['htmlhead'] .= "\n"; } if ($a->is_mobile || $a->is_tablet) {