aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/hidden_configs.bb3
-rw-r--r--include/follow.php15
-rw-r--r--view/js/main.js14
3 files changed, 16 insertions, 16 deletions
diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb
index 8b5429deb..dc3906df1 100644
--- a/doc/hidden_configs.bb
+++ b/doc/hidden_configs.bb
@@ -51,6 +51,7 @@ Options are:
[*= system.email_notify_icon_url ] URL of image (32x32) to display in email notifications (HTML bodies).
[*= system.expire_delivery_reports ] Expiration in days for delivery reports - default 10
[*= system.expire_limit ] Don't expire any more than this number of posts per channel per expiration run to keep from exhausting memory. Default 5000.
+ [*= system.filesystem_storage_thumbnails ] If '1', use filesystem instead SQL database to store thumbnails. Default is '0'. Introduced in 4.2
[*= system.hidden_version_siteinfo ] If true, do not report the software version on siteinfo pages (system.hide_version also hides the version on these pages, this setting *only* hides the version on siteinfo pages).
[*= system.hide_help ] Don't display help documentation link in nav bar
[*= system.hide_in_statistics ] Tell the red statistics servers to completely hide this hub in hub lists.
@@ -79,7 +80,7 @@ Options are:
[*= system.startpage ] Set the default page to be taken to after a login for all channels at this website. Can be overwritten by user settings.
[*= system.sys_expire_days ] How many days to keep discovered public content from other sites
[*= system.taganyone ] Allow the @mention tagging of anyone whether you are connected or not.
- [*= system.tempdir ] Place to store temporary files (currently unused), default is defined in the PHP configuration
+ [*= system.tempdir ] Place to store temporary files (currently unused), default is defined in the PHP configuration.
[*= system.tos_url ] Set an alternative link for the ToS location.
[*= system.transport_security_header ] if non-zero and SSL is being used, include a strict-transport-security header on webpages
[*= system.uploaddir ] Location to upload files (default is system.tempdir, currently used only by js_upload plugin)
diff --git a/include/follow.php b/include/follow.php
index 1b35f1b32..50b952881 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -142,7 +142,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
$sql_options = (($protocol) ? " and xchan_network = '" . dbesc($protocol) . "' " : '');
- $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' $sql_options limit 1",
+ $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' $sql_options ",
dbesc($url),
dbesc($url)
);
@@ -169,18 +169,19 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
}
if($wf || $d) {
- $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' limit 1",
+ $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s'",
dbesc(($wf) ? $wf : $url),
dbesc($url)
);
}
}
+ $xchan = zot_record_preferred($r,'xchan_network');
+
// if discovery was a success we should have an xchan record in $r
- if($r) {
- $xchan = $r[0];
- $xchan_hash = $r[0]['xchan_hash'];
+ if($xchan) {
+ $xchan_hash = $xchan['xchan_hash'];
$their_perms = 0;
}
}
@@ -191,9 +192,9 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
return $result;
}
- $allowed = (($is_zot || in_array($r[0]['xchan_network'],['rss','zot6'])) ? 1 : 0);
+ $allowed = (($is_zot || in_array($xchan['xchan_network'],['rss','zot6'])) ? 1 : 0);
- $x = array('channel_id' => $uid, 'follow_address' => $url, 'xchan' => $r[0], 'allowed' => $allowed, 'singleton' => 0);
+ $x = array('channel_id' => $uid, 'follow_address' => $url, 'xchan' => $xchan, 'allowed' => $allowed, 'singleton' => 0);
call_hooks('follow_allow',$x);
diff --git a/view/js/main.js b/view/js/main.js
index 5592fd63d..48159e6e8 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1160,15 +1160,12 @@ function doreply(parent, ident, owner, hint) {
}
function doscroll(parent, hidden) {
- var back = $('.back-to-reply');
- if(back.length == 0) {
- var pos = Math.round($(window).scrollTop());
- }
- else {
- var pos = back.attr('href').replace(/\D/g,'')
- }
- back.remove();
var x = '#hide-comments-outer-' + hidden.toString();
+ var back = $('.back-to-reply');
+ if(back.length == 0)
+ var pos = $(window).scrollTop();
+ else
+ var pos = back.attr('href').replace(/[^\d|\.]/g,'');
if($(x).length !== 0) {
x = $(x).attr("onclick").replace(/\D/g,'');
var c = '#collapsed-comments-' + x;
@@ -1177,6 +1174,7 @@ function doscroll(parent, hidden) {
pos += $(c).height();
}
}
+ back.remove();
var id = $('[data-mid="' + parent + '"]');
$('html, body').animate({scrollTop:(id.offset().top) - 50}, 'slow');
$('<a href="javascript:doscrollback(' + pos + ');" class="back-to-reply" title="' + aStr['to_reply'] + '"><i class="fa fa-angle-double-down float-right">&nbsp;&nbsp;&nbsp;</i></a>').insertBefore('#wall-item-info-' + id.attr('id').replace(/\D/g,''));