From 9ea1d6e8af731606d8876c2e22c951946ac98a14 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 31 Jul 2019 17:09:24 +0200 Subject: [PATCH 1/5] Do not limit channel if service class property value set with 0 --- include/account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/account.php b/include/account.php index 7546657fd..4bd218a5b 100644 --- a/include/account.php +++ b/include/account.php @@ -761,7 +761,7 @@ function service_class_fetch($uid, $property) { if(! is_array($arr) || (! count($arr))) return false; - return((array_key_exists($property, $arr)) ? $arr[$property] : false); + return((array_key_exists($property, $arr) && $arr[$property]) ? $arr[$property] : false); } /** From aaffc7485daf01dba56f2020b284fb06dd5a1ce1 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 31 Jul 2019 17:18:11 +0200 Subject: [PATCH 2/5] Update account.php --- include/account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/account.php b/include/account.php index 4bd218a5b..bea84cea7 100644 --- a/include/account.php +++ b/include/account.php @@ -761,7 +761,7 @@ function service_class_fetch($uid, $property) { if(! is_array($arr) || (! count($arr))) return false; - return((array_key_exists($property, $arr) && $arr[$property]) ? $arr[$property] : false); + return((array_key_exists($property, $arr) && $arr[$property] != 0) ? $arr[$property] : false); } /** From d4b92141fda161db990c871530a833ebe5bcb903 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 31 Jul 2019 19:49:51 +0200 Subject: [PATCH 3/5] Update hmessages.po --- view/ru/hmessages.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/view/ru/hmessages.po b/view/ru/hmessages.po index 4590d36af..0845841bf 100644 --- a/view/ru/hmessages.po +++ b/view/ru/hmessages.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: hubzilla\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-06-18 20:23+0200\n" -"PO-Revision-Date: 2019-06-18 20:27+0200\n" +"PO-Revision-Date: 2019-07-31 19:37+0200\n" "Last-Translator: Max Kostikov \n" "Language-Team: Russian (http://www.transifex.com/Friendica/hubzilla/language/ru/)\n" "MIME-Version: 1.0\n" @@ -4697,7 +4697,7 @@ msgstr "Публикация не найдена" #: ../../Zotlabs/Module/Tagger.php:119 #, php-format msgid "%1$s tagged %2$s's %3$s with %4$s" -msgstr "%1$s отметил тегом %2$s %3$s с %4$s" +msgstr "%1$s отметил тегом %4$s %3$s %2$s" #: ../../Zotlabs/Module/Directory.php:116 msgid "No default suggestions were found." @@ -7257,7 +7257,7 @@ msgstr "Центр уведомлений по email (имя хоста)" msgid "" "If your channel is mirrored to multiple hubs, set this to your preferred " "location. This will prevent duplicate email notifications. Example: %s" -msgstr "Если ваш канал зеркалируется в нескольких местах, это ваше предпочтительное местоположение. Это должно предотвратить дублирование уведомлений по email. Например: %s" +msgstr "Если ваш канал зеркалируется в нескольких местах, это ваше предпочтительное местоположение. Это должно предотвратить дублировать уведомлений по email. Например: %s" #: ../../Zotlabs/Module/Settings/Channel.php:581 msgid "Show new wall posts, private messages and connections under Notices" From 95805d2e7c029fb9b7938102b46ec11d2b69ed7b Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 31 Jul 2019 19:50:07 +0200 Subject: [PATCH 4/5] Update hstrings.php --- view/ru/hstrings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/ru/hstrings.php b/view/ru/hstrings.php index 8e3cc6680..0e26fc70d 100644 --- a/view/ru/hstrings.php +++ b/view/ru/hstrings.php @@ -1036,7 +1036,7 @@ App::$strings["Make this post private"] = "Сделать эту публика App::$strings["Remote privacy information not available."] = "Удаленная информация о конфиденциальности недоступна."; App::$strings["Visible to:"] = "Видимо для:"; App::$strings["Post not found."] = "Публикация не найдена"; -App::$strings["%1\$s tagged %2\$s's %3\$s with %4\$s"] = "%1\$s отметил тегом %2\$s %3\$s с %4\$s"; +App::$strings["%1\$s tagged %2\$s's %3\$s with %4\$s"] = "%1\$s отметил тегом %4\$s %3\$s %2\$s"; App::$strings["No default suggestions were found."] = "Предложений по умолчанию не найдено."; App::$strings["%d rating"] = array( 0 => "%d оценка", @@ -1627,7 +1627,7 @@ App::$strings["Unseen public stream activity"] = "Невидимая актив App::$strings["Unseen likes and dislikes"] = "Невидимые лайки и дислайки"; App::$strings["Unseen forum posts"] = "Невидимые публикации на форуме"; App::$strings["Email notification hub (hostname)"] = "Центр уведомлений по email (имя хоста)"; -App::$strings["If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s"] = "Если ваш канал зеркалируется в нескольких местах, это ваше предпочтительное местоположение. Это должно предотвратить дублирование уведомлений по email. Например: %s"; +App::$strings["If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s"] = "Если ваш канал зеркалируется в нескольких местах, это ваше предпочтительное местоположение. Это должно предотвратить дублировать уведомлений по email. Например: %s"; App::$strings["Show new wall posts, private messages and connections under Notices"] = "Показать новые сообщения на стене, личные сообщения и контакты в \"Уведомлениях\""; App::$strings["Notify me of events this many days in advance"] = "Уведомлять меня о событиях заранее, дней"; App::$strings["Must be greater than 0"] = "Должно быть больше 0"; From c96a1632f52651fd4acf1a9beae1613caa3962a7 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 1 Aug 2019 20:55:08 +0200 Subject: [PATCH 5/5] Minor optimizations on static file serve --- boot.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index a3bdb994e..d28405428 100755 --- a/boot.php +++ b/boot.php @@ -919,8 +919,7 @@ class App { $staticfilecwd = getcwd(); $staticfilerealpath = realpath(self::$cmd); if(strpos($staticfilerealpath,$staticfilecwd) !== 0) { - header("HTTP/1.1 404 Not Found", true, 404); - killme(); + http_status_exit(404,'not found'); } $staticfileetag = '"'.md5($staticfilerealpath.filemtime(self::$cmd)).'"'; @@ -930,8 +929,7 @@ class App { // If HTTP_IF_NONE_MATCH is same as the generated ETag => content is the same as browser cache // So send a 304 Not Modified response header and exit if($_SERVER['HTTP_IF_NONE_MATCH'] == $staticfileetag) { - header('HTTP/1.1 304 Not Modified', true, 304); - killme(); + http_status_exit(304,'not modified'); } } header("Content-type: ".$serve_rawfiles[$filext]);