aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Network.php4
-rw-r--r--Zotlabs/Update/_1215.php26
-rwxr-xr-xboot.php2
-rwxr-xr-xview/tpl/jot-header.tpl4
4 files changed, 31 insertions, 5 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 82c88e565..942b48109 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -131,7 +131,7 @@ class Network extends \Zotlabs\Web\Controller {
if(x($_GET,'search') || x($_GET,'file'))
$nouveau = true;
if($cid) {
- $r = q("SELECT abook_xchan FROM abook WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
+ $r = q("SELECT abook_xchan, xchan_addr, xchan_url FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
intval($cid),
intval(local_channel())
);
@@ -144,7 +144,7 @@ class Network extends \Zotlabs\Web\Controller {
// NOTREACHED
}
if($_GET['pf'] === '1')
- $deftag = '!' . t('forum') . '+' . intval($cid);
+ $deftag = '!{' . (($r[0]['xchan_addr']) ? $r[0]['xchan_addr'] : $r[0]['xchan_url']) . '}';
else
$def_acl = [ 'allow_cid' => '<' . $r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ];
}
diff --git a/Zotlabs/Update/_1215.php b/Zotlabs/Update/_1215.php
new file mode 100644
index 000000000..3acaab587
--- /dev/null
+++ b/Zotlabs/Update/_1215.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1215 {
+
+ function run() {
+ q("START TRANSACTION");
+
+ // this will fix mastodon hubloc_url
+ $r1 = q("UPDATE hubloc SET hubloc_url = LEFT(hubloc_url, POSITION('/users' IN hubloc_url)-1) WHERE POSITION('/users' IN hubloc_url)>0");
+
+ // this will fix peertube hubloc_url
+ $r2 = q("UPDATE hubloc SET hubloc_url = LEFT(hubloc_url, POSITION('/account' IN hubloc_url)-1) WHERE POSITION('/account' IN hubloc_url)>0");
+
+ if($r1 && $r2) {
+ q("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+ else {
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+ }
+ }
+
+}
diff --git a/boot.php b/boot.php
index 9b3b86381..c0d749c2e 100755
--- a/boot.php
+++ b/boot.php
@@ -54,7 +54,7 @@ define ( 'STD_VERSION', '3.5.6' );
define ( 'ZOT_REVISION', '6.0a' );
-define ( 'DB_UPDATE_VERSION', 1214 );
+define ( 'DB_UPDATE_VERSION', 1215 );
define ( 'PROJECT_BASE', __DIR__ );
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 22413f350..365a922f9 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -365,12 +365,12 @@ var activeCommentText = '';
if($('#jot-nocomment').val() > 0) {
$('#jot-nocomment').val(0);
$('#profile-nocomment, #profile-nocomment-sub').removeClass('fa-comments-o').addClass('fa-comments');
- $('#profile-nocomment-wrapper').attr('title', '{{$nocomment_enabled}}');
+ $('#profile-nocomment-wrapper').attr('title', '{{$nocomment_enabled|escape:'javascript'}}');
}
else {
$('#jot-nocomment').val(1);
$('#profile-nocomment, #profile-nocomment-sub').removeClass('fa-comments').addClass('fa-comments-o');
- $('#profile-nocomment-wrapper').attr('title', '{{$nocomment_disabled}}');
+ $('#profile-nocomment-wrapper').attr('title', '{{$nocomment_disabled|escape:'javascript'}}');
}
}