aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Apps.php124
-rw-r--r--Zotlabs/Module/Siteinfo.php2
-rw-r--r--view/ru/hmessages.po19
-rw-r--r--view/ru/hstrings.php18
-rw-r--r--view/ru/lostpass_eml.tpl2
-rw-r--r--view/ru/passchanged_eml.tpl2
6 files changed, 120 insertions, 47 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index abac2090e..f7aff1722 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -56,12 +56,8 @@ class Apps {
}
-
- static public function import_system_apps() {
- if(! local_channel())
- return;
-
- self::$base_apps = get_config('system','base_apps',[
+ static public function get_base_apps() {
+ return get_config('system','base_apps',[
'Connections',
'Suggest Channels',
'Grid',
@@ -77,7 +73,16 @@ class Apps {
'Mail',
'Profile Photo'
]);
+ }
+
+
+
+ static public function import_system_apps() {
+ if(! local_channel())
+ return;
+ self::$base_apps = self::get_base_apps();
+
$apps = self::get_system_apps(false);
self::$available_apps = q("select * from app where app_channel = 0");
@@ -140,10 +145,15 @@ class Apps {
foreach(self::$available_apps as $iapp) {
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
$notfound = false;
- if(($iapp['app_version'] != $app['version'])
+ if(($iapp['app_version'] !== $app['version'])
|| ($app['plugin'] && (! $iapp['app_plugin']))) {
return intval($iapp['app_id']);
}
+
+ if(($iapp['app_url'] !== $app['url'])
+ || ($iapp['app_photo'] !== $app['photo'])) {
+ return intval($iapp['app_id']);
+ }
}
}
@@ -198,12 +208,11 @@ class Apps {
if($lines) {
foreach($lines as $x) {
if(preg_match('/^([a-zA-Z].*?):(.*?)$/ism',$x,$matches)) {
- $ret[$matches[1]] = trim(str_replace(array('$baseurl','$nick'),array($baseurl,$address),$matches[2]));
+ $ret[$matches[1]] = trim($matches[2]);
}
}
}
-
if(! $ret['photo'])
$ret['photo'] = $baseurl . '/' . get_default_profile_photo(80);
@@ -376,9 +385,24 @@ class Apps {
$papp['papp'] = self::papp_encode($papp);
+ // This will catch somebody clicking on a system "available" app that hasn't had the path macros replaced
+ // and they are allowed to see the app
+
+
+ if(strstr($papp['url'],'$baseurl') || strstr($papp['url'],'$nick') || strstr($papp['photo'],'$baseurl') || strstr($pap['photo'],'$nick')) {
+ $view_channel = local_channel();
+ if(! $view_channel) {
+ $sys = get_sys_channel();
+ $view_channel = $sys['channel_id'];
+ }
+ self::app_macros($view_channel,$papp);
+ }
+
if(! strstr($papp['url'],'://'))
$papp['url'] = z_root() . ((strpos($papp['url'],'/') === 0) ? '' : '/') . $papp['url'];
+
+
foreach($papp as $k => $v) {
if(strpos($v,'http') === 0 && $k != 'papp') {
if(! (local_channel() && strpos($v,z_root()) === 0)) {
@@ -507,7 +531,7 @@ class Apps {
intval($uid)
);
if($r) {
- if(! $r[0]['app_system']) {
+ if(($app['uid']) && (! $r[0]['app_system'])) {
if($app['categories'] && (! $app['term'])) {
$r[0]['term'] = q("select * from term where otype = %d and oid = %d",
intval(TERM_OBJ_APP),
@@ -522,8 +546,25 @@ class Apps {
return false;
}
- static public function app_destroy($uid,$app) {
+ static public function can_delete($uid,$app) {
+ if(! $uid) {
+ return false;
+ }
+
+ $base_apps = self::get_base_apps();
+ if($base_apps) {
+ foreach($base_apps as $b) {
+ if($app['guid'] === hash('whirlpool',$b)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+
+ static public function app_destroy($uid,$app) {
if($uid && $app['guid']) {
@@ -534,17 +575,23 @@ class Apps {
if($x) {
if(! intval($x[0]['app_deleted'])) {
$x[0]['app_deleted'] = 1;
- q("delete from term where otype = %d and oid = %d",
- intval(TERM_OBJ_APP),
- intval($x[0]['id'])
- );
- if ($uid) {
+ if(self::can_delete($uid,$app)) {
$r = q("delete from app where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
-
- // we don't sync system apps - they may be completely different on the other system
+ q("delete from term where otype = %d and oid = %d",
+ intval(TERM_OBJ_APP),
+ intval($x[0]['id'])
+ );
+ }
+ else {
+ $r = q("update app set app_deleted = 1 where app_id = '%s' and app_channel = %d",
+ dbesc($app['guid']),
+ intval($uid)
+ );
+ }
+ if(! intval($x[0]['app_system'])) {
build_sync_packet($uid,array('app' => $x));
}
}
@@ -553,6 +600,7 @@ class Apps {
}
}
}
+
}
static public function app_undestroy($uid,$app) {
@@ -815,6 +863,29 @@ class Apps {
}
+ static public function app_macros($uid,&$arr) {
+
+ if(! intval($uid))
+ return;
+
+ $baseurl = z_root();
+ $channel = channelx_by_n($uid);
+ $address = (($channel) ? $channel['channel_address'] : '');
+
+ //future expansion
+
+ $observer = \App::get_observer();
+
+ $arr['url'] = str_replace(array('$baseurl','$nick'),array($baseurl,$address),$arr['url']);
+ $arr['photo'] = str_replace(array('$baseurl','$nick'),array($baseurl,$address),$arr['photo']);
+
+ }
+
+
+
+
+
+
static public function app_store($arr) {
//logger('app_store: ' . print_r($arr,true));
@@ -824,6 +895,7 @@ class Apps {
$sys = get_sys_channel();
+ self::app_macros($arr['uid'],$arr);
$darray['app_url'] = ((x($arr,'url')) ? $arr['url'] : '');
$darray['app_channel'] = ((x($arr,'uid')) ? $arr['uid'] : 0);
@@ -835,8 +907,8 @@ class Apps {
$arr['author'] = $sys['channel_hash'];
}
- if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) {
- $x = import_xchan_photo($arr['photo'],get_observer_hash(),true);
+ if($arr['photo'] && (strpos($arr['photo'],'icon:') === false) && (! strstr($arr['photo'],z_root()))) {
+ $x = import_xchan_photo(str_replace('$baseurl',z_root(),$arr['photo']),get_observer_hash(),true);
$arr['photo'] = $x[1];
}
@@ -909,15 +981,18 @@ class Apps {
$darray = array();
$ret = array('success' => false);
+ self::app_macros($arr['uid'],$arr);
+
+
$darray['app_url'] = ((x($arr,'url')) ? $arr['url'] : '');
$darray['app_channel'] = ((x($arr,'uid')) ? $arr['uid'] : 0);
$darray['app_id'] = ((x($arr,'guid')) ? $arr['guid'] : 0);
- if((! $darray['app_url']) || (! $darray['app_channel']) || (! $darray['app_id']))
+ if((! $darray['app_url']) || (! $darray['app_id']))
return $ret;
- if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) {
- $x = import_xchan_photo($arr['photo'],get_observer_hash(),true);
+ if($arr['photo'] && (strpos($arr['photo'],'icon:') === false) && (! strstr($arr['photo'],z_root()))) {
+ $x = import_xchan_photo(str_replace('$baseurl',z_root(),$arr['photo']),get_observer_hash(),true);
$arr['photo'] = $x[1];
}
@@ -1003,9 +1078,6 @@ class Apps {
if($app['app_id'])
$ret['guid'] = $app['app_id'];
- if($app['app_id'])
- $ret['guid'] = $app['app_id'];
-
if($app['app_sig'])
$ret['sig'] = $app['app_sig'];
diff --git a/Zotlabs/Module/Siteinfo.php b/Zotlabs/Module/Siteinfo.php
index 25276815d..79b94662d 100644
--- a/Zotlabs/Module/Siteinfo.php
+++ b/Zotlabs/Module/Siteinfo.php
@@ -32,7 +32,7 @@ class Siteinfo extends \Zotlabs\Web\Controller {
'$transport_link' => '<a href="https://zotlabs.com">https://zotlabs.com</a>',
'$additional_text' => t('Additional federated transport protocols:'),
- '$additional_fed' => implode(',',$federated),
+ '$additional_fed' => implode(', ',array_unique($federated)),
'$prj_version' => ((get_config('system','hidden_version_siteinfo')) ? '' : sprintf( t('Version %s'), \Zotlabs\Lib\System::get_project_version())),
'$prj_linktxt' => t('Project homepage'),
'$prj_srctxt' => t('Developer homepage'),
diff --git a/view/ru/hmessages.po b/view/ru/hmessages.po
index f7ea3df15..15b1c136b 100644
--- a/view/ru/hmessages.po
+++ b/view/ru/hmessages.po
@@ -3390,7 +3390,7 @@ msgstr "Задания Cron / планировщика не запущены."
#: ../../boot.php:2535 ../../include/datetime.php:238
msgid "never"
-msgstr "никогд"
+msgstr "никогда"
#: ../../view/theme/redbasic/php/config.php:15 ../../include/text.php:3078
#: ../../Zotlabs/Module/Admin/Site.php:198
@@ -3733,17 +3733,17 @@ msgstr "Воздерживаюсь"
#: ../../include/conversation.php:621 ../../Zotlabs/Module/Photos.php:1144
msgctxt "title"
msgid "Attending"
-msgstr "Присоединившиеся"
+msgstr "Посещаю"
#: ../../include/conversation.php:621 ../../Zotlabs/Module/Photos.php:1144
msgctxt "title"
msgid "Not attending"
-msgstr "Не присоединившиеся"
+msgstr "Не посещаю"
#: ../../include/conversation.php:621 ../../Zotlabs/Module/Photos.php:1144
msgctxt "title"
msgid "Might attend"
-msgstr "Могут присоединиться"
+msgstr "Возможно посещу"
#: ../../include/conversation.php:690 ../../Zotlabs/Lib/ThreadItem.php:158
msgid "Select"
@@ -7365,7 +7365,7 @@ msgstr "Пожалуйста, посетите %s для просмотра и/
#: ../../Zotlabs/Lib/Enotify.php:144
msgid "commented on"
-msgstr " прокомментировал в"
+msgstr "прокомментировал"
#: ../../Zotlabs/Lib/Enotify.php:155
msgid "liked"
@@ -7974,7 +7974,7 @@ msgstr "Настройки аккаунта"
#: ../../Zotlabs/Widget/Settings_menu.php:41
msgid "Channel settings"
-msgstr "Выбор канала"
+msgstr "Настройки канала"
#: ../../Zotlabs/Widget/Settings_menu.php:50
msgid "Additional features"
@@ -12844,7 +12844,7 @@ msgstr "Членство одобрено автоматически"
#: ../../Zotlabs/Module/Settings/Channel.php:514
msgid "Channel Settings"
-msgstr "Выбор канала"
+msgstr "Настройки канала"
#: ../../Zotlabs/Module/Settings/Channel.php:521
msgid "Basic Settings"
@@ -14753,7 +14753,7 @@ msgstr "Участник сайта (%s)"
#: ../../Zotlabs/Module/Lostpass.php:44 ../../Zotlabs/Module/Lostpass.php:49
#, php-format
msgid "Password reset requested at %s"
-msgstr "Запроше сброс пароля на %s"
+msgstr "Запрошен сброс пароля на %s"
#: ../../Zotlabs/Module/Lostpass.php:68
msgid ""
@@ -14781,7 +14781,7 @@ msgstr "нажмите здесь чтобы войти"
msgid ""
"Your password may be changed from the <em>Settings</em> page after "
"successful login."
-msgstr "Ваш пароль может быть изменён на странице <em>Настройки</em>после успешного входа."
+msgstr "Ваш пароль может быть изменён на странице <em>Настройки</em> после успешного входа."
#: ../../Zotlabs/Module/Lostpass.php:117
#, php-format
@@ -14884,3 +14884,4 @@ msgstr "Загрузить файл"
#: ../../Zotlabs/Storage/Browser.php:404
msgid "Drop files here to immediately upload"
msgstr "Поместите файлы сюда для немедленной загрузки"
+
diff --git a/view/ru/hstrings.php b/view/ru/hstrings.php
index 45fc75773..cedd38a31 100644
--- a/view/ru/hstrings.php
+++ b/view/ru/hstrings.php
@@ -682,7 +682,7 @@ App::$strings["[\$Projectname] Website SSL error for %s"] = "[\$Projectname] О
App::$strings["Website SSL certificate is not valid. Please correct."] = "SSL/TLS сертификат веб-сайт недействителен. Исправьте это.";
App::$strings["[\$Projectname] Cron tasks not running on %s"] = "[\$Projectname] Задания Cron не запущены на %s";
App::$strings["Cron/Scheduled tasks not running."] = "Задания Cron / планировщика не запущены.";
-App::$strings["never"] = "никогд";
+App::$strings["never"] = "никогда";
App::$strings["Default"] = "По умолчанию";
App::$strings["Focus (Hubzilla default)"] = "Фокус (по умолчанию Hubzilla)";
App::$strings["Theme settings"] = "Настройки темы";
@@ -759,9 +759,9 @@ App::$strings["__ctx:title__ Dislikes"] = "Не нравится";
App::$strings["__ctx:title__ Agree"] = "Согласен";
App::$strings["__ctx:title__ Disagree"] = "Против";
App::$strings["__ctx:title__ Abstain"] = "Воздерживаюсь";
-App::$strings["__ctx:title__ Attending"] = "Присоединившиеся";
-App::$strings["__ctx:title__ Not attending"] = "Не присоединившиеся";
-App::$strings["__ctx:title__ Might attend"] = "Могут присоединиться";
+App::$strings["__ctx:title__ Attending"] = "Посещаю";
+App::$strings["__ctx:title__ Not attending"] = "Не посещаю";
+App::$strings["__ctx:title__ Might attend"] = "Возможно посещу";
App::$strings["Select"] = "Выбрать";
App::$strings["Delete"] = "Удалить";
App::$strings["Toggle Star Status"] = "Переключить статус пометки";
@@ -1645,7 +1645,7 @@ App::$strings["%1\$s sent you a new private message at %2\$s."] = "%1\$s отп
App::$strings["%1\$s sent you %2\$s."] = "%1\$s послал вам %2\$s.";
App::$strings["a private message"] = "личное сообщение";
App::$strings["Please visit %s to view and/or reply to your private messages."] = "Пожалуйста, посетите %s для просмотра и/или ответа на ваши личные сообщения.";
-App::$strings["commented on"] = " прокомментировал в";
+App::$strings["commented on"] = "прокомментировал";
App::$strings["liked"] = "понравилось";
App::$strings["disliked"] = "не понравилось";
App::$strings["%1\$s %2\$s [zrl=%3\$s]a %4\$s[/zrl]"] = "";
@@ -1780,7 +1780,7 @@ App::$strings["Export Calendar"] = "Экспортировать календа
App::$strings["Import Calendar"] = "Импортировать календарь";
App::$strings["Wiki List"] = "Список Wiki";
App::$strings["Account settings"] = "Настройки аккаунта";
-App::$strings["Channel settings"] = "Выбор канала";
+App::$strings["Channel settings"] = "Настройки канала";
App::$strings["Additional features"] = "Дополнительные функции";
App::$strings["Addon settings"] = "Настройки расширений";
App::$strings["Display settings"] = "Настройки отображения";
@@ -2896,7 +2896,7 @@ App::$strings["or"] = "или";
App::$strings["Your channel address is"] = "Адрес вашего канала";
App::$strings["Your files/photos are accessible via WebDAV at"] = "Ваши файы / фотографии доступны через WebDAV по";
App::$strings["Automatic membership approval"] = "Членство одобрено автоматически";
-App::$strings["Channel Settings"] = "Выбор канала";
+App::$strings["Channel Settings"] = "Настройки канала";
App::$strings["Basic Settings"] = "Основные настройки";
App::$strings["Email Address:"] = "Адрес email:";
App::$strings["Your Timezone:"] = "Часовой пояс:";
@@ -3348,13 +3348,13 @@ App::$strings["Unknown error"] = "Неизвестная ошибка";
App::$strings["No valid account found."] = "Действительный аккаунт не найден.";
App::$strings["Password reset request issued. Check your email."] = "Запрос на сброс пароля отправлен. Проверьте вашу электронную почту.";
App::$strings["Site Member (%s)"] = "Участник сайта (%s)";
-App::$strings["Password reset requested at %s"] = "Запроше сброс пароля на %s";
+App::$strings["Password reset requested at %s"] = "Запрошен сброс пароля на %s";
App::$strings["Request could not be verified. (You may have previously submitted it.) Password reset failed."] = "Запрос не может быть проверен. (Вы могли отправить его раньше). Сброс пароля не возможен.";
App::$strings["Your password has been reset as requested."] = "Ваш пароль в соответствии с просьбой сброшен.";
App::$strings["Your new password is"] = "Ваш новый пароль";
App::$strings["Save or copy your new password - and then"] = "Сохраните ваш новый пароль и затем";
App::$strings["click here to login"] = "нажмите здесь чтобы войти";
-App::$strings["Your password may be changed from the <em>Settings</em> page after successful login."] = "Ваш пароль может быть изменён на странице <em>Настройки</em>после успешного входа.";
+App::$strings["Your password may be changed from the <em>Settings</em> page after successful login."] = "Ваш пароль может быть изменён на странице <em>Настройки</em> после успешного входа.";
App::$strings["Your password has changed at %s"] = "Пароль был изменен на %s";
App::$strings["Forgot your Password?"] = "Забыли ваш пароль?";
App::$strings["Enter your email address and submit to have your password reset. Then check your email for further instructions."] = "Введите ваш адрес электронной почты и нажмите отправить чтобы сбросить пароль. Затем проверьте ваш почтовый ящик для дальнейших инструкций. ";
diff --git a/view/ru/lostpass_eml.tpl b/view/ru/lostpass_eml.tpl
index 76ccb0f01..6cff3c485 100644
--- a/view/ru/lostpass_eml.tpl
+++ b/view/ru/lostpass_eml.tpl
@@ -1,5 +1,5 @@
-
Уважаемый {{$username}},
+
Недавно {{$sitename}} был получен запрос на сброс пароля вашей
учётной записи. Для подтверждения этого запроса, пожалуйста перейдите по ссылке
проверки ниже или вставьте его в адресную строку вашего браузера.
diff --git a/view/ru/passchanged_eml.tpl b/view/ru/passchanged_eml.tpl
index 86a0ea3f2..a9b689f1d 100644
--- a/view/ru/passchanged_eml.tpl
+++ b/view/ru/passchanged_eml.tpl
@@ -1,5 +1,5 @@
-
Дорогой {{$username}},
+
Ваш пароль был изменен, как вы и просили. Пожалуйста, сохраните эту
информацию в ваших записях (или смените свой пароль на такой
который вы точно не забудете).