Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
This commit is contained in:
commit
4837f9cdad
10
CHANGELOG
10
CHANGELOG
@ -1,3 +1,13 @@
|
||||
Hubzilla 3.8.9 (2018-02-03)
|
||||
- Fix typos in mod oep
|
||||
- Fix page jumping when liking collapsed/expanded post
|
||||
- Fix failure to import mail in mod import
|
||||
- Fix wrong channel count in mod new_channel
|
||||
- Fix diaspora addon regression
|
||||
- Remove deprecated diaspora addon endpoint
|
||||
- Fix wrong function call in gallery addon
|
||||
|
||||
|
||||
Hubzilla 3.8.8 (2018-12-22)
|
||||
- Fix issue with linkinfo
|
||||
- Fix cURL with HTTP/2
|
||||
|
@ -101,6 +101,7 @@ class ThreadItem {
|
||||
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
|
||||
? t('Private Message')
|
||||
: false);
|
||||
|
||||
$shareable = ((($conv->get_profile_owner() == local_channel() && local_channel()) && ($item['item_private'] != 1)) ? true : false);
|
||||
|
||||
// allow an exemption for sharing stuff from your private feeds
|
||||
@ -115,6 +116,16 @@ class ThreadItem {
|
||||
$privacy_warning = true;
|
||||
}
|
||||
|
||||
if ($lock) {
|
||||
if (count(get_terms_oftype($item['term'],TERM_FORUM))) {
|
||||
$privacy_warning = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($lock && $privacy_warning) {
|
||||
$lock = t('Privacy conflict. Discretion advised.');
|
||||
}
|
||||
|
||||
$mode = $conv->get_mode();
|
||||
|
||||
switch($item['item_type']) {
|
||||
@ -418,9 +429,9 @@ class ThreadItem {
|
||||
'rawmid' => $item['mid'],
|
||||
'plink' => get_plink($item),
|
||||
'edpost' => $edpost, // ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
|
||||
'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''),
|
||||
'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts') && ($item['item_type'] == ITEM_TYPE_POST)) ? $star : ''),
|
||||
'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''),
|
||||
'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
|
||||
'filer' => ((feature_enabled($conv->get_profile_owner(),'filing') && ($item['item_type'] == ITEM_TYPE_POST)) ? $filer : ''),
|
||||
'bookmark' => (($conv->get_profile_owner() == local_channel() && local_channel() && $has_bookmarks) ? t('Save Bookmarks') : ''),
|
||||
'addtocal' => (($has_event) ? t('Add to Calendar') : ''),
|
||||
'drop' => $drop,
|
||||
|
@ -181,7 +181,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||
dbesc($res)
|
||||
);
|
||||
if($r) {
|
||||
$sql_extra = "and item.id = " . intval($r[0]['iid']) . " ";
|
||||
$sql_extra .= " and item.id = " . intval($r[0]['iid']) . " ";
|
||||
}
|
||||
else {
|
||||
return $ret;
|
||||
@ -194,6 +194,9 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||
intval(ITEM_TYPE_CARD)
|
||||
);
|
||||
|
||||
if(! $r)
|
||||
return;
|
||||
|
||||
$item_normal = " and item.item_hidden = 0 and item.item_type in (0,6) and item.item_deleted = 0
|
||||
and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0
|
||||
and item.item_blocked = 0 ";
|
||||
@ -255,7 +258,6 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||
if(! $channel)
|
||||
return $ret;
|
||||
|
||||
|
||||
if(! perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_pages'))
|
||||
return $ret;
|
||||
|
||||
@ -265,7 +267,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||
dbesc($res)
|
||||
);
|
||||
if($r) {
|
||||
$sql_extra = "and item.id = " . intval($r[0]['iid']) . " ";
|
||||
$sql_extra .= " and item.id = " . intval($r[0]['iid']) . " ";
|
||||
}
|
||||
else {
|
||||
return $ret;
|
||||
@ -278,6 +280,9 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||
intval(ITEM_TYPE_ARTICLE)
|
||||
);
|
||||
|
||||
if(! $r)
|
||||
return;
|
||||
|
||||
$item_normal = " and item.item_hidden = 0 and item.item_type in (0,7) and item.item_deleted = 0
|
||||
and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0
|
||||
and item.item_blocked = 0 ";
|
||||
|
@ -28,7 +28,7 @@ class Viewsrc extends \Zotlabs\Web\Controller {
|
||||
$item_normal = item_normal();
|
||||
|
||||
if(local_channel() && $item_id) {
|
||||
$r = q("select id, item_flags, mimetype, item_obscured, body, llink, plink from item where uid in (%d , %d) and id = %d $item_normal limit 1",
|
||||
$r = q("select id, mid, item_flags, mimetype, item_obscured, body, llink, plink from item where uid in (%d , %d) and id = %d $item_normal limit 1",
|
||||
intval(local_channel()),
|
||||
intval($sys['channel_id']),
|
||||
intval($item_id)
|
||||
@ -53,7 +53,7 @@ class Viewsrc extends \Zotlabs\Web\Controller {
|
||||
|
||||
if(is_ajax()) {
|
||||
echo '<div class="p-1">';
|
||||
echo '<div>id: ' . $r[0]['id'] . ' | <a href="' . $r[0]['plink'] . '" target="_blank">plink</a> | <a href="' . $r[0]['llink'] . '" target="_blank">llink</a></div>';
|
||||
echo '<div>id: ' . $r[0]['id'] . ' | <a href="' . $r[0]['plink'] . '" target="_blank">plink</a> | <a href="' . $r[0]['llink'] . '" target="_blank">llink</a><br>mid: ' . $r[0]['mid'] . '</div>';
|
||||
echo '<hr>';
|
||||
echo '<pre class="p-1">' . $o . '</pre>';
|
||||
echo '</div>';
|
||||
|
1
boot.php
1
boot.php
@ -513,6 +513,7 @@ define ( 'ACTIVITY_MOOD', NAMESPACE_ZOT . '/activity/mood' );
|
||||
define ( 'ACTIVITY_OBJ_COMMENT', NAMESPACE_ACTIVITY_SCHEMA . 'comment' );
|
||||
define ( 'ACTIVITY_OBJ_ACTIVITY',NAMESPACE_ACTIVITY_SCHEMA . 'activity' );
|
||||
define ( 'ACTIVITY_OBJ_NOTE', NAMESPACE_ACTIVITY_SCHEMA . 'note' );
|
||||
define ( 'ACTIVITY_OBJ_ARTICLE', NAMESPACE_ACTIVITY_SCHEMA . 'article' );
|
||||
define ( 'ACTIVITY_OBJ_PERSON', NAMESPACE_ACTIVITY_SCHEMA . 'person' );
|
||||
define ( 'ACTIVITY_OBJ_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'photo' );
|
||||
define ( 'ACTIVITY_OBJ_P_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'profile-photo' );
|
||||
|
5
doc/hook/jot_header_tpl_filter.bb
Normal file
5
doc/hook/jot_header_tpl_filter.bb
Normal file
@ -0,0 +1,5 @@
|
||||
[h2]jot_header_tpl_filter[/h2]
|
||||
|
||||
Allows addon developers to modify the values of replacements fed into jot-header.tpl
|
||||
|
||||
cxref: include/conversation.php
|
5
doc/hook/jot_tpl_filter.bb
Normal file
5
doc/hook/jot_tpl_filter.bb
Normal file
@ -0,0 +1,5 @@
|
||||
[h2]jot_tpl_filter[/h2]
|
||||
|
||||
Allows addon developers to alter the macro replacements prior to being fed into jot.tpl
|
||||
|
||||
cxref: include/conversation.php
|
@ -370,6 +370,12 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
|
||||
[zrl=[baseurl]/help/hook/jot_tool]jot_tool[/zrl]
|
||||
Deprecated and possibly obsolete. Allows one to add action buttons to the post editor.
|
||||
|
||||
[zrl=[baseurl]/help/hook/jot_tpl_filter]jot_tpl_filter[/zrl]
|
||||
Called to filter template vars before replacement in jot.tpl.
|
||||
|
||||
[zrl=[baseurl]/help/hook/jot_header_tpl_filter]jot_header_tpl_filter[/zrl]
|
||||
Called to filter template vars before replacement in jot_header.tpl.
|
||||
|
||||
[zrl=[baseurl]/help/hook/legal_webbie]legal_webbie[/zrl]
|
||||
Called to validate a channel address
|
||||
|
||||
|
@ -1328,7 +1328,7 @@ function hz_status_editor($a, $x, $popup = false) {
|
||||
|
||||
$tpl = get_markup_template('jot-header.tpl');
|
||||
|
||||
App::$page['htmlhead'] .= replace_macros($tpl, array(
|
||||
$tplmacros = [
|
||||
'$baseurl' => z_root(),
|
||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
'$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''),
|
||||
@ -1349,7 +1349,10 @@ function hz_status_editor($a, $x, $popup = false) {
|
||||
'$nocomment_disabled' => t('Comments disabled'),
|
||||
'$auto_save_draft' => $feature_auto_save_draft,
|
||||
'$reset' => $reset
|
||||
));
|
||||
];
|
||||
|
||||
call_hooks('jot_header_tpl_filter',$tplmacros);
|
||||
App::$page['htmlhead'] .= replace_macros($tpl, $tplmacros);
|
||||
|
||||
$tpl = get_markup_template('jot.tpl');
|
||||
|
||||
@ -1389,7 +1392,7 @@ function hz_status_editor($a, $x, $popup = false) {
|
||||
$sharebutton = (x($x,'button') ? $x['button'] : t('Share'));
|
||||
$placeholdtext = (x($x,'content_label') ? $x['content_label'] : $sharebutton);
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
$tplmacros = [
|
||||
'$return_path' => ((x($x, 'return_path')) ? $x['return_path'] : App::$query_string),
|
||||
'$action' => z_root() . '/item',
|
||||
'$share' => $sharebutton,
|
||||
@ -1463,9 +1466,15 @@ function hz_status_editor($a, $x, $popup = false) {
|
||||
'$bbcode' => ((x($x, 'bbcode')) ? $x['bbcode'] : false),
|
||||
'$parent' => ((array_key_exists('parent',$x) && $x['parent']) ? $x['parent'] : 0),
|
||||
'$reset' => $reset,
|
||||
'$is_owner' => ((local_channel() && (local_channel() == $x['profile_uid'])) ? true : false)
|
||||
));
|
||||
'$is_owner' => ((local_channel() && (local_channel() == $x['profile_uid'])) ? true : false),
|
||||
'$custommoretoolsdropdown' => '',
|
||||
'$custommoretoolsbuttons' => '',
|
||||
'$customsubmitright' => []
|
||||
];
|
||||
|
||||
call_hooks('jot_tpl_filter',$tplmacros);
|
||||
|
||||
$o .= replace_macros($tpl, $tplmacros);
|
||||
if ($popup === true) {
|
||||
$o = '<div id="jot-popup" style="display:none">' . $o . '</div>';
|
||||
}
|
||||
|
@ -1107,7 +1107,7 @@ function searchbox($s,$id='search-box',$url='/search',$save = false) {
|
||||
* @return string
|
||||
*/
|
||||
function linkify($s, $me = false) {
|
||||
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\@\~\#\'\%\$\!\+\,\@]*)/u", (($me) ? ' <a href="$1" rel="me" >$1</a>' : ' <a href="$1" >$1</a>'), $s);
|
||||
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\@\~\#\'\%\$\!\+\,\@]*)/u", (($me) ? ' <a href="$1" rel="me nofollow" >$1</a>' : ' <a href="$1" >$1</a>'), $s);
|
||||
$s = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$s);
|
||||
|
||||
return($s);
|
||||
|
@ -2230,7 +2230,7 @@ msgstr "Не удалось сохранить информацию аккаун
|
||||
#: ../../include/account.php:314
|
||||
#, php-format
|
||||
msgid "Registration confirmation for %s"
|
||||
msgstr "Подтверждение регистрации для %s"
|
||||
msgstr "Подтверждение регистрации на %s"
|
||||
|
||||
#: ../../include/account.php:385
|
||||
#, php-format
|
||||
@ -4523,7 +4523,7 @@ msgid ""
|
||||
"A verification token was sent to your email address [%s]. Enter that token "
|
||||
"here to complete the account verification step. Please allow a few minutes "
|
||||
"for delivery, and check your spam folder if you do not see the message."
|
||||
msgstr "Проверочный токен был выслн на ваш адрес электронной почты [%s]. Введите этот токен здесь для завершения этапа проверки учётной записи. Пожалуйста, подождите несколько минут для завершения доставки и проверьте вашу папку \"Спам\" если вы не видите письма."
|
||||
msgstr "Проверочный токен был отправлен на ваш адрес электронной почты [%s]. Введите этот токен здесь для завершения этапа проверки учётной записи. Пожалуйста, подождите несколько минут для завершения доставки и проверьте вашу папку \"Спам\" если вы не видите письма."
|
||||
|
||||
#: ../../Zotlabs/Module/Email_validation.php:38
|
||||
msgid "Resend Email"
|
||||
|
@ -444,7 +444,7 @@ App::$strings["An invitation is required."] = "Требуется приглаш
|
||||
App::$strings["Invitation could not be verified."] = "Не удалось проверить приглашение.";
|
||||
App::$strings["Please enter the required information."] = "Пожалуйста, введите необходимую информацию.";
|
||||
App::$strings["Failed to store account information."] = "Не удалось сохранить информацию аккаунта.";
|
||||
App::$strings["Registration confirmation for %s"] = "Подтверждение регистрации для %s";
|
||||
App::$strings["Registration confirmation for %s"] = "Подтверждение регистрации на %s";
|
||||
App::$strings["Registration request at %s"] = "Запрос регистрации на %s";
|
||||
App::$strings["your registration password"] = "ваш пароль регистрации";
|
||||
App::$strings["Registration details for %s"] = "Регистрационные данные для %s";
|
||||
@ -998,7 +998,7 @@ App::$strings["Privacy group: "] = "Группа безопасности: ";
|
||||
App::$strings["Invalid channel."] = "Недействительный канал.";
|
||||
App::$strings["Token verification failed."] = "Не удалось выполнить проверку токена.";
|
||||
App::$strings["Email Verification Required"] = "Требуется проверка адреса email";
|
||||
App::$strings["A verification token was sent to your email address [%s]. Enter that token here to complete the account verification step. Please allow a few minutes for delivery, and check your spam folder if you do not see the message."] = "Проверочный токен был выслн на ваш адрес электронной почты [%s]. Введите этот токен здесь для завершения этапа проверки учётной записи. Пожалуйста, подождите несколько минут для завершения доставки и проверьте вашу папку \"Спам\" если вы не видите письма.";
|
||||
App::$strings["A verification token was sent to your email address [%s]. Enter that token here to complete the account verification step. Please allow a few minutes for delivery, and check your spam folder if you do not see the message."] = "Проверочный токен был отправлен на ваш адрес электронной почты [%s]. Введите этот токен здесь для завершения этапа проверки учётной записи. Пожалуйста, подождите несколько минут для завершения доставки и проверьте вашу папку \"Спам\" если вы не видите письма.";
|
||||
App::$strings["Resend Email"] = "Выслать повторно";
|
||||
App::$strings["Validation token"] = "Проверочный токен";
|
||||
App::$strings["No channel."] = "Канала нет.";
|
||||
|
@ -198,12 +198,11 @@ var activeCommentText = '';
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function jotShare(id,post_type) {
|
||||
$('#like-rotator-' + id).show();
|
||||
$.get('{{$baseurl}}/share/' + id, function(data) {
|
||||
$('#like-rotator-' + id).hide();
|
||||
notificationsUpdate();
|
||||
updateInit();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -137,8 +137,11 @@
|
||||
<i id="profile-nocomment" class="fa fa-comments jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $custommoretoolsbuttons}}
|
||||
{{$custommoretoolsbuttons}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{if $writefiles || $weblink || $setloc || $clearloc || $feature_expire || $feature_encrypt || $feature_voting}}
|
||||
{{if $writefiles || $weblink || $setloc || $clearloc || $feature_expire || $feature_encrypt || $feature_voting || $custommoretoolsdropdown}}
|
||||
<div class="btn-group d-lg-none">
|
||||
<button type="button" id="more-tools" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
<i id="more-tools-icon" class="fa fa-cog jot-icons"></i>
|
||||
@ -176,6 +179,8 @@
|
||||
{{if $feature_nocomment}}
|
||||
<a class="dropdown-item" href="#" onclick="toggleNoComment(); return false;"><i id="profile-nocomment-sub" class="fa fa-comments"></i> {{$nocommenttitlesub}}</a>
|
||||
{{/if}}
|
||||
<hr />
|
||||
{{$custommoretoolsdropdown}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
@ -186,6 +191,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="profile-jot-submit-right" class="btn-group float-right">
|
||||
{{foreach $customsubmitright as $csr}}
|
||||
<button class="btn btn-outline-secondary btn-sm" {{$csr.buttonparams}} title="{{$csr.preview}}">
|
||||
{{$csr.buttoncontent}}
|
||||
</button>
|
||||
{{/foreach}}
|
||||
{{if $preview}}
|
||||
<button class="btn btn-outline-secondary btn-sm" onclick="preview_post();return false;" title="{{$preview}}">
|
||||
<i class="fa fa-eye jot-icons" ></i>
|
||||
|
Reference in New Issue
Block a user