Compare commits

...

3139 Commits
3.8 ... 5.4

Author SHA1 Message Date
Mario
951e9c8c4f Merge branch '5.4RC' 2021-03-08 09:31:23 +00:00
Mario
89415e1731 release 5.4 2021-03-08 09:26:50 +00:00
Mario
f9ab020d1d Merge branch '5.4RC' of https://framagit.org/hubzilla/core into 5.4RC 2021-03-08 09:23:11 +00:00
Mario
1828ef6b68 changelog 2021-03-08 09:21:22 +00:00
Mario
4903d7b1e9 update sbom
(cherry picked from commit c67fdd9480)
2021-03-06 18:56:53 +01:00
Mario
c67fdd9480 update sbom 2021-03-06 17:55:24 +00:00
Mario
9b5979c83a fix varable name and more changelog
(cherry picked from commit 7460b1eecb)
2021-03-06 09:51:45 +01:00
Mario
7460b1eecb fix varable name and more changelog 2021-03-06 08:50:36 +00:00
Mario
7d03ff2043 sse_bs: if Enotify::format() returns an empty array do not add it to notifications (the item has probably been blocked)
(cherry picked from commit 1da494a2a5)
2021-03-05 09:26:30 +01:00
Mario
1da494a2a5 sse_bs: if Enotify::format() returns an empty array do not add it to notifications (the item has probably been blocked) 2021-03-05 08:15:41 +00:00
Mario
00ccafc90d more changelog
(cherry picked from commit e0c619519f)
2021-03-04 12:21:27 +01:00
Mario
b767e7ddec even more changelog
(cherry picked from commit 31da1362de)
2021-03-04 12:20:56 +01:00
Mario
31da1362de even more changelog 2021-03-04 11:19:23 +00:00
Mario
e0c619519f more changelog 2021-03-04 10:13:48 +00:00
Mario
f1f1e56f87 revert revert isset()
(cherry picked from commit 33e4b6db72)
2021-03-04 10:53:29 +01:00
Mario
33e4b6db72 revert revert isset() 2021-03-04 09:52:54 +00:00
Mario
1eae7b92d1 revert isset() 2021-03-04 09:50:03 +00:00
Mario
5b7a10401f version 5.4RC2 2021-03-04 09:48:19 +00:00
Mario
1b8c5b9727 changelog
(cherry picked from commit 548936c6ca)
2021-03-04 10:46:56 +01:00
Mario
548936c6ca changelog 2021-03-04 09:45:51 +00:00
Max Kostikov
7beb500fb4 Check if custom CSP is set 2021-03-04 08:36:20 +00:00
Mario
9c110e7b9b revert isset 2021-03-04 08:20:16 +00:00
Mario
129f8107d3 merge conflict 2021-03-04 08:17:07 +00:00
Mario
cb01996039 Merge branch 'dev' into 'dev'
Fix frame-src CSP error on video embedding

See merge request hubzilla/core!1918
2021-03-04 08:05:27 +00:00
Max Kostikov
33b738d00b Fix frame-src CSP error on video embedding 2021-03-04 08:05:26 +00:00
Mario
c2dc3e8dec set the default collection acl if indicated so by the role permissions but always set the created friends group as channel_default_group when creating a new channel
(cherry picked from commit 9389abdb75)
2021-03-03 14:12:42 +01:00
Mario
7d1599f9b0 group_add(): return hash if success
(cherry picked from commit f8f15f526f)
2021-03-03 14:11:54 +01:00
Mario
3d264f5a55 php8: fix warnings during install procedure
(cherry picked from commit 48bae9d421)
2021-03-03 14:11:29 +01:00
Mario
9389abdb75 set the default collection acl if indicated so by the role permissions but always set the created friends group as channel_default_group when creating a new channel 2021-03-03 14:09:17 +01:00
Mario
f8f15f526f group_add(): return hash if success 2021-03-03 13:44:38 +01:00
Mario
48bae9d421 php8: fix warnings during install procedure 2021-03-03 13:39:41 +01:00
Mario
55b4eb7b22 version 5.4RC1 2021-02-26 10:15:56 +00:00
Mario
fbb1d6aa41 Merge branch 'dev' into 'dev'
Do not overwrite HTTP schema for Youtube on embedding

See merge request hubzilla/core!1917
2021-02-26 09:03:58 +00:00
Max Kostikov
5440a65607 Do not overwrite HTTP schema for Youtube on embedding 2021-02-25 16:35:19 +00:00
Mario
36c9f9abff Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-02-25 15:43:13 +00:00
Mario
8295ccdda7 a possible fix for #1518 2021-02-25 15:43:01 +00:00
Mario
65892ba555 Merge branch 'dev' into 'dev'
small adjustment

See merge request hubzilla/core!1915
2021-02-25 15:10:41 +00:00
Zot
78938df133 small adjustment 2021-02-25 15:10:41 +00:00
Mario
ac6dec91f1 Merge branch 'dev' into 'dev'
Enable multimedia in podcasts

See merge request hubzilla/core!1916
2021-02-25 15:09:31 +00:00
Mario
373612a046 do not poll feeds if feed_contacts are not allowed 2021-02-25 15:05:49 +00:00
Mario
c1afa306c9 fix logic 2021-02-25 14:15:13 +00:00
Mario
65a20a780d bump version 2021-02-25 12:56:57 +00:00
Mario
b29e121113 replace sticky_kit with a simpler homwgrown solution (still a bit raw) and slightly change the way we load new content so that people with a long aside column do not have to scroll all the way to the bottom for loading the next page 2021-02-25 12:55:19 +00:00
Michal Klodner
f45ebfa223 - Enable enclosures in Atom/RSS (podcasts)
- Remove checking of audio/video URLs for pattern at the end
2021-02-24 21:03:05 +00:00
Mario
a033c439f3 zap compat export fixes 2021-02-24 10:19:15 +00:00
Mario
66e4bc327f Merge branch 'dev' into 'dev'
export compatibility from hubzilla to zap

See merge request hubzilla/core!1910
2021-02-24 08:35:30 +00:00
Zot
df362e4f81 export compatibility from hubzilla to zap 2021-02-24 08:35:29 +00:00
Max Kostikov
82ee980172 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1912
2021-02-23 12:33:17 +00:00
Max Kostikov
463a8d338e Update hmessages.po 2021-02-23 12:29:02 +00:00
Max Kostikov
d074bb65da Update Russian hstrings.php 2021-02-23 12:26:20 +00:00
Max Kostikov
b7c411470b Update Russian hmessages.po 2021-02-23 12:24:59 +00:00
Max Kostikov
e09e6c5524 Missprint 2021-02-23 12:22:19 +00:00
Mario
fa73c8d15e bump dev version to 5.5 2021-02-23 10:57:37 +00:00
Mario
6060ca127b composer dump-autoload 2021-02-23 10:54:27 +00:00
Mario
ca4e0351cf update strings 2021-02-23 10:52:38 +00:00
Mario
f3be2ecc9d version 5.4RC 2021-02-23 10:48:47 +00:00
Mario
135305d975 Merge branch 'dev' into 'dev'
Rename photo storage type system variable

See merge request hubzilla/core!1911
2021-02-23 10:02:16 +00:00
Max Kostikov
34aa8ba3cc Rename photo storage type system variable 2021-02-23 10:02:15 +00:00
Mario
28fe91dfa7 Merge branch 'dev' of https://codeberg.org/hubzilla/hubzilla into dev 2021-02-23 09:53:12 +00:00
mjfriaza
883b519714 Update Spanish version 2021-02-23 09:52:24 +00:00
hubzilla
9dae590c64 Merge pull request 'Update Spanish version' (#4) from mjfriaza/hubzilla:dev into dev
Reviewed-on: https://codeberg.org/hubzilla/hubzilla/pulls/4
2021-02-23 10:49:21 +01:00
Mario
d4159e8333 streamline iconf names and make sure to save the correct data 2021-02-22 10:32:05 +00:00
Max Kostikov
90d04082a1 Fix missprint 2021-02-21 14:13:46 +01:00
Max Kostikov
a84c7271f2 Formatting 2021-02-20 14:49:31 +01:00
Max Kostikov
f46ddf2273 Bump DB version 2021-02-20 14:47:50 +01:00
Max Kostikov
b401869d30 Rename photo storage type system variable 2021-02-20 14:47:14 +01:00
Max Kostikov
cc55716879 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!1
2021-02-20 13:39:54 +00:00
Mario
ddad4f604b provide raw base64 encoded crypto 2021-02-19 17:37:53 +00:00
Mario
dc553ab309 summary edit actions 2021-02-19 10:24:20 +00:00
Mario
a2d170385b deprecate summary tag in favour of a separate input field 2021-02-19 10:11:24 +00:00
Mario
a275726988 update site once a day 2021-02-19 09:26:39 +00:00
Mario
863d4d83a1 fix recursive shares 2021-02-19 07:41:29 +00:00
Mario
d50381c9c6 fix summary regex after recent bbcode chane 2021-02-18 20:36:56 +00:00
Mario
c9bbe1a735 adjust error reporting for php8 to not report warnings - they are too many 2021-02-18 20:04:34 +00:00
Mario
18b9d1efd8 this setting is probably not required anymoreà 2021-02-18 20:00:20 +00:00
Mario
85f1845d15 fix usage of null coalescing operator 2021-02-18 19:46:26 +00:00
Mario
c34fc416a2 php8 warnings 2021-02-18 19:32:45 +00:00
Mario
7794ee5a88 php8 warnings 2021-02-18 13:32:02 +00:00
Mario
65068479b9 php8 warnings 2021-02-18 13:29:15 +00:00
mjfriaza
655ae9d1cd Merge branch 'dev' into dev 2021-02-18 13:28:05 +01:00
mjfriaza
76163fc37b Update Spanish version 2021-02-18 13:22:57 +01:00
Mario
92f3c5ae21 backward compatibility with recent crypto changes 2021-02-18 09:36:22 +00:00
Mario
c3ec5d4d6a do not try to fetch legacy zot zotfeed - they will not return anything useful 2021-02-17 20:16:20 +00:00
Mario
0aeb4d6fb5 php8: fix mod mail if there are no messages 2021-02-17 19:41:27 +00:00
Mario
edd4ac791f remove logging 2021-02-17 18:15:09 +00:00
Mario
27577824de fix php8 issue in include/oembed and unencapsulate for zot_refresh() 2021-02-17 18:14:29 +00:00
Mario Vavti
281b2261af reduce loglevel until the most glaring php8 issues will be resolved 2021-02-16 14:35:01 +01:00
Mario
3eaf0b7f23 php8 another fix 2021-02-16 12:56:34 +00:00
Mario
76ad2c0fa4 php8 fix 2021-02-16 12:41:27 +00:00
Mario
efaadf54d3 make sure we do not try to update columns which do not exist 2021-02-16 09:21:55 +00:00
Mario
6f71c6d950 fix detection of multiline codeblocks after recent change to bbcode() 2021-02-15 19:18:49 +00:00
Mario
ad0b0364b8 missing files 2021-02-15 18:42:21 +00:00
Mario
e8c2e17bc9 compser update twbs/bootstrap 2021-02-15 18:41:44 +00:00
Mario
6fae291cc8 missing file 2021-02-15 18:40:00 +00:00
Mario
1e48be7ab7 compser update symfony/polyfill-ctype 2021-02-15 18:39:11 +00:00
Mario
0cd4c34101 compser update sabre/dav /vobject 2021-02-15 18:35:40 +00:00
Mario
02401ea9fd composer update ramsey/collection 2021-02-15 18:29:24 +00:00
Mario
18c8f1b903 composer update brick/math 2021-02-15 18:27:20 +00:00
Mario
4171a0136a revert debug code 2021-02-15 18:25:04 +00:00
Mario
ba29a6ce4d composer update smarty 2021-02-15 18:23:26 +00:00
Mario
d72a096fa5 fix preview generating duplicate IDs 2021-02-15 10:15:57 +00:00
Mario
ed99392001 move substitution of new lines with <br> to the end of bbcode(). This will fix issue #1512. 2021-02-15 08:20:42 +00:00
Mario
50e9a12ca5 Merge branch 'fix-public-permissions-in-display' into 'dev'
FIX: Display urls won't show to permitted remote observers

See merge request hubzilla/core!1909
2021-02-14 16:16:26 +00:00
M. Dent
d6b259bb27 FIX: Display urls won't show to permitted remote observers 2021-02-14 17:16:25 +01:00
Mario
f94b046333 changelog
(cherry picked from commit 5e8e6dc458)
2021-02-13 21:23:04 +01:00
Mario
5e8e6dc458 changelog 2021-02-13 20:20:46 +00:00
Mario
9751efb709 version 5.2.2 2021-02-13 21:17:13 +01:00
Mario
7b2f53cc69 fix ping_site() issue
(cherry picked from commit 22e0175ab7)
2021-02-13 21:15:49 +01:00
Mario
22e0175ab7 fix ping_site() issue 2021-02-13 19:30:15 +00:00
Mario
0ffb09aa40 onepoll: add date_begin argument to poll url 2021-02-11 21:05:45 +00:00
Mario
8054d7ad66 remove logging 2021-02-11 21:01:16 +00:00
Mario
d3e70acacd make encode_item_collection() deal with extra query args 2021-02-11 21:00:10 +00:00
Mario
6f520cadb7 actor will be stored in the next step decode_note() 2021-02-11 11:13:06 +00:00
Mario
becdd64257 update 1242 2021-02-10 20:59:30 +00:00
Mario
464a0634d6 use (un)obscurify 2021-02-10 20:40:28 +00:00
Mario
391db61629 revert z_(un)obscure() until (un)obscurify() will be implemented and a update will take care of the data in db 2021-02-10 19:27:00 +00:00
Mario
e6450acc03 version 2021-02-09 19:13:32 +00:00
Mario
e75ae17662 whitespace 2021-02-09 14:09:26 +00:00
Mario
3b3c93f9b3 undo accidental revert in last commit 2021-02-09 14:05:00 +00:00
Mario
b4693870ba port Lib/Crypto from zap 2021-02-09 13:50:03 +00:00
Mario
5aee2f172e restructure keyutiÃls tests 2021-02-08 20:05:05 +00:00
Mario
6b8b42fb21 fix line separators 2021-02-08 16:16:56 +00:00
Mario
320e95aaae composer 2021-02-08 16:08:31 +00:00
Mario
1bcf84f275 fix test 2021-02-08 16:04:56 +00:00
Mario
a8e0bd1f12 keyutils tests 2021-02-08 13:37:48 +00:00
Mario
eb05e5a205 revert include/crypto to its previous state for reference - we are now using Lib/Keyutils for key conversion 2021-02-08 10:55:35 +00:00
Mario
d316d9436b mixed up variables 2021-02-08 10:17:05 +00:00
Max Kostikov
b2e4a4b2b1 Merge branch 'dev' into 'dev'
Use datetime interval in public tag cloud query to support queueworker deduplication

See merge request hubzilla/core!1908
2021-02-06 10:41:33 +00:00
Max Kostikov
e1d622c49f Use datetime interval in public tag cloud query to support queueworker deduplication 2021-02-06 11:36:22 +01:00
Max Kostikov
8bb77bcfd6 Fix new Imagemagick object 2021-02-05 15:32:09 +01:00
Mario Vavti
a9070382e7 bump version 2021-02-04 22:26:29 +01:00
Mario Vavti
9e22641425 add Lib/Keyutils 2021-02-04 22:20:55 +01:00
Mario Vavti
19007dd8eb move key conversion to separate lib 2021-02-04 22:16:48 +01:00
Mario Vavti
03e1f5f8a4 remove unused function 2021-02-04 21:49:25 +01:00
Mario Vavti
6bb73e14b6 key conversion functions cleanup 2021-02-04 21:31:37 +01:00
Mario Vavti
41f84dabcc use phpseclib for key transformations 2021-02-04 21:21:22 +01:00
Mario Vavti
cd79d12e5b phpseclib missing files 2021-02-04 21:05:17 +01:00
Mario Vavti
a6162d3134 downgrade phpseclib to version 2 2021-02-04 21:01:25 +01:00
Mario Vavti
34b28cd8d3 fix wrong operand 2021-02-03 10:22:34 +01:00
Mario Vavti
9a170791e4 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-02-03 10:12:02 +01:00
Mario
44b559fb1d Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-02-02 12:58:01 +00:00
Mario
2167d12b3f composer add phpseclib 2021-02-02 12:57:46 +00:00
Mario Vavti
e312c381d8 import_xchan() $arr photo structure has changed 2021-02-02 11:47:38 +01:00
Mario Vavti
af6f7f244e Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-02-02 10:58:28 +01:00
Mario Vavti
f3f49cf80f fix php8 issues 2021-02-02 10:58:10 +01:00
Mario
08c9152abd fix getting mimetype via getimagesize() and do not default to image/jpeg yet if it could not be found 2021-02-01 22:58:55 +00:00
Mario
70fa7ad8d0 too many arguments 2021-02-01 20:52:35 +00:00
Mario
cd081ac077 remove unused/commented out code 2021-02-01 14:32:28 +00:00
Mario
197338a727 remove logging 2021-02-01 09:30:22 +00:00
Mario
61e7791d31 Merge branch 'dev' into 'dev'
Better profile photo fetch processing

See merge request hubzilla/core!1906
2021-02-01 08:53:10 +00:00
Max Kostikov
de91d2c804 Better profile photo fetch processing 2021-02-01 09:53:09 +01:00
Mario
11f5550512 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-31 20:37:29 +00:00
Mario
d99611e7dd add fetch_provider hook 2021-01-31 20:37:16 +00:00
Max Kostikov
c0933c90e8 Fix copypaste 2021-01-31 15:26:55 +01:00
Max Kostikov
21b3ba38e7 Fix polish plurals function 2021-01-31 12:05:02 +01:00
Max Kostikov
bac87a8aec Fix polish plurals function 2021-01-31 12:04:26 +01:00
Max Kostikov
a235917d48 Merge branch 'translation-pl' into 'dev'
New fixes & translations

See merge request hubzilla/core!1907
2021-01-30 18:40:37 +00:00
Andrzej Budziński
d2eb10d7ff Fixes (!1905):
- view/pl/hmessages.po
- view/pl/hstrings.php
2021-01-30 18:42:47 +01:00
Andrzej Budziński
89bf71b227 New fixes & translatosns:
- doc/pl/tutorials/*: 100%
- doc/pl/checking_account_guota_usage.bb: 100%
- doc/pl/member/member_guide.bb: fixes
- doc/pl/admin/hub_snapshots.md: fixes
- view/pl/hmessage.po: fixes
- view/pl/hstrings.po: fixes to generated code
2021-01-30 14:03:39 +01:00
Mario
7686b48723 code format only 2021-01-29 07:36:56 +00:00
Mario
840dbbe8ba code format only 2021-01-28 15:50:34 +00:00
Mario
ab4863a2e0 AS discovery for mod profile 2021-01-28 15:44:57 +00:00
Mario
8c2442eca5 AS channel discovery with custom access header 2021-01-28 14:57:37 +00:00
Mario Vavti
8b78e18fb8 keep file permissions in util folder at 755 2021-01-27 11:56:58 +01:00
Mario
66640a206e fix issue in view/pl/hstrings.php 2021-01-27 10:35:17 +00:00
Mario
15c90371e0 Merge branch 'customjotheaders' into 'dev'
Custom "headers" in item creation form.

See merge request hubzilla/core!1901
2021-01-27 10:25:26 +00:00
M. Dent
00fe7bb1bb Custom "headers" in item creation form. 2021-01-27 11:25:26 +01:00
Mario
a2728167bc Merge branch 'dev' into 'dev'
Rebuild public tags cloud not often than once per 5 mins.

See merge request hubzilla/core!1900
2021-01-27 10:23:59 +00:00
Max Kostikov
6326605c99 Revert "Fix directory permissions on create"
This reverts commit 85c5e1178a57865ad977c260725da2839ebb4d98
2021-01-27 11:23:59 +01:00
Mario
7cd4f60922 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-27 10:15:37 +00:00
Mario
af719fea40 fix file permissions. 755 for dirs, 644 for files 2021-01-27 10:15:26 +00:00
Max Kostikov
0af458768f Fix wrong redbasic theme permissions 2021-01-27 12:14:30 +02:00
Mario
3ba46873ba Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-27 09:59:40 +00:00
Mario
f4cc91f0f5 Merge branch 'translation-pl' into 'dev'
Translation pl

Polish translations (used on hub.hubzilla.pl)
- view/pl: 100%
- doc/pl: ~40%
- doc/context/pl: 100%
- doc/macros/pl: 100%

See merge request hubzilla/core!1902
2021-01-27 09:57:30 +00:00
Andrzej S. Budziński
f813671b67 Merge branch 'translation-pl' into 'dev'
Translation pl

Polish translations (used on hub.hubzilla.pl)
- view/pl: 100%
- doc/pl: ~40%
- doc/context/pl: 100%
- doc/macros/pl: 100%

See merge request hubzilla/core!1902
2021-01-27 10:57:30 +01:00
Mario
74f8f2d956 thread listener improvements 2021-01-26 12:11:01 +00:00
Mario
f0ee4c3cef port fix from zap: catch a complex edge case where some public stream comments were not being delivered and should have been 2021-01-26 10:35:24 +00:00
Mario
6878445319 use mail envelope instead of lock icon for direct messages 2021-01-26 10:29:03 +00:00
Mario
de34dac6cc port youtube embed fix from zap 2021-01-26 09:56:28 +00:00
Mario
1c8d298f3f Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-26 09:21:21 +00:00
Mario
777af6e7ad Libzot::fetch_conversation() fixes 2021-01-26 09:21:16 +00:00
Mario Vavti
82dbdf7c70 fix issues in Activity::encode_item_collection() after recent changes 2021-01-26 10:07:41 +01:00
Mario Vavti
4cf05891d7 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-25 21:52:29 +01:00
Mario Vavti
d4198223bc invoke channel discovery by hash instead of address and add thread listeners only if we also send them the post 2021-01-25 21:52:17 +01:00
Mario
1b4bbcc891 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-25 20:28:03 +00:00
Mario
0e9d99c603 expose manual public item import from searchbar, set commen_policy in Activity::store() to what we get if we get something otherwise default to authenticated, comments by the owner have the relay flag set and therefor $perm will be not be set to post_comments - always check if we own the parent in lib/libzot (not only if $perm = send_stream) if otherwise not allowed 2021-01-25 20:27:50 +00:00
Charlie Root
3ed444b4b4 Run storageconv from web server user 2021-01-25 18:35:28 +02:00
Mario
77793e17c0 Merge branch 'dev' into 'dev'
Add support filesystem storage for xchan profile photos

See merge request hubzilla/core!1898
2021-01-24 20:03:35 +00:00
Max Kostikov
552796286e Add support filesystem storage for xchan profile photos 2021-01-24 21:03:34 +01:00
Mario
e486442eb1 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-24 19:55:50 +00:00
Mario
2035828042 revert externals/zotfeed functionality due to scaling issues. Save zotfeed consumers that are not our contacts in thread listeners 2021-01-24 19:55:29 +00:00
Mario
4fbedb6750 extra check for item_private in fetch_and_store_parents() 2021-01-24 15:00:01 +00:00
Max Kostikov
6b0c61ac6b Merge branch 'dev' into 'dev'
Variable typo

See merge request hubzilla/core!1897
2021-01-23 20:57:47 +00:00
Max Kostikov
0a13c794ab Variable typo 2021-01-23 21:55:50 +01:00
Max Kostikov
a53f286467 Merge branch 'dev' into 'dev'
Don't fetch profile photos from own hub

See merge request hubzilla/core!1896
2021-01-23 20:47:06 +00:00
Max Kostikov
e4ed5ed264 Do not store multiple profile images thumbnails 2021-01-23 21:45:20 +01:00
Max Kostikov
74441f2f00 Don't fetch profile photos from own hub 2021-01-23 21:38:03 +01:00
Max Kostikov
007de17702 Merge branch 'dev' into 'dev'
Bump DB update version

See merge request hubzilla/core!1895
2021-01-23 15:24:44 +00:00
Max Kostikov
ecf2e4e0ee Bump DB update version 2021-01-23 16:22:29 +01:00
Max Kostikov
03910453a9 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!3
2021-01-23 13:07:09 +00:00
Max Kostikov
30962dadbf Merge branch 'dev' into 'dev'
# Conflicts:
#   Zotlabs/Daemon/Cache_query.php
#   include/contact_widgets.php
#   include/taxonomy.php
2021-01-23 14:04:42 +01:00
Max Kostikov
33951dc1e4 Remove duplicated profile photos 2021-01-23 14:00:38 +01:00
Max Kostikov
893847c649 Fix duplicate profile photos creation for clones 2021-01-23 13:58:05 +01:00
Mario
fbbc53838c fix ramsey/uuid exception 2021-01-23 12:35:02 +00:00
Max Kostikov
7bc0340106 Encode SQL query array 2021-01-22 15:39:48 +01:00
Max Kostikov
bfb9f10234 Encode SQL query array 2021-01-22 15:38:40 +01:00
Max Kostikov
3f34c73f09 Decode SQL query array 2021-01-22 15:37:49 +01:00
Mario
92f420f77c cleanup 2021-01-22 10:42:58 +00:00
Mario Vavti
78716c42d6 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-22 11:16:43 +01:00
Mario Vavti
e6aed4fb8e implement externals via zot6 and zotfeed - part 2 2021-01-22 11:12:39 +01:00
Mario
064effe5fd fix encode_item_collection() 2021-01-22 10:11:27 +00:00
Mario
93ac3c985f implement externals via zot6 and zotfeed - part 1 2021-01-22 10:06:50 +00:00
Mario
fe97b63e0b Merge branch 'dev' into 'dev'
Implement SQL query background caching

See merge request hubzilla/core!1894
2021-01-21 09:08:53 +01:00
Max Kostikov
3836e75c89 Implement SQL query background caching 2021-01-21 09:08:53 +01:00
Max Kostikov
28ae78c579 Higher log level 2021-01-21 08:16:15 +01:00
Mario
bdd6d878f1 cleanup lib/libsync 2021-01-21 07:09:19 +00:00
Max Kostikov
8134e9cae0 Process channel categories list in background 2021-01-20 22:28:38 +01:00
Max Kostikov
70ee41f252 Process public tags cloud in background 2021-01-20 22:24:00 +01:00
Max Kostikov
491dffd9b7 Implement SQL query background caching 2021-01-20 22:18:27 +01:00
Max Kostikov
ad42890a0b Swap key and cat for running pid tracking 2021-01-20 22:15:01 +01:00
Mario
5a971a3731 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-20 21:14:29 +00:00
Max Kostikov
ab4455c54c Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!2
2021-01-20 22:12:15 +01:00
Max Kostikov
6cca06f641 Merge branch 'dev' into 'dev'
Use Zot6 on pinned content sync between clones

See merge request hubzilla/core!1893
2021-01-20 22:09:21 +01:00
Mario
c5d37a0831 remove logging 2021-01-20 20:43:51 +00:00
Mario
57645386b2 looks like we get arrays or json strings here for some reason 2021-01-20 20:42:59 +00:00
Mario
b242347fa1 onepoll via zot6 to /zotfeed which implements an outbox 2021-01-20 20:17:50 +00:00
Max Kostikov
15b2aa660b Update Pin.php 2021-01-20 13:53:09 +01:00
Max Kostikov
4da4f2367f Use Zot6 on pinned content sync between clones 2021-01-20 13:18:48 +01:00
Max Kostikov
9612a69a64 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!1
2021-01-20 13:15:40 +01:00
Mario
4e9d8e1a83 fix abandon days setting for onepoll 2021-01-18 21:10:59 +00:00
Mario
6083bfea2f lib/activity cleanup and remove unused code - requires addon update 2021-01-18 20:39:23 +00:00
Mario
08264f8d11 more cleanup daemon/thumbnail 2021-01-18 14:35:40 +00:00
Mario
8b93136773 more cleanup daemon/queue 2021-01-18 14:35:00 +00:00
Mario
c7a82a6a84 more cleanup daemon/poller 2021-01-18 14:33:19 +00:00
Mario
ef67e18161 more cleanup daemon/onepoll 2021-01-18 14:29:01 +00:00
Mario
08d2fb4ed4 more cleanup daemon/onedirsync 2021-01-18 14:24:44 +00:00
Mario
836637621d more cleanup daemon/notifier 2021-01-18 14:23:23 +00:00
Mario
6e7a2d0d96 more cleanup daemon/master 2021-01-18 14:13:58 +00:00
Mario
101005f3d2 more cleanup daemon/importfile 2021-01-18 14:11:29 +00:00
Mario
8f88543478 more cleanup daemon/importdoc 2021-01-18 14:10:38 +00:00
Mario
f1ac5bb667 more cleanup daemon/gprobe 2021-01-18 14:09:48 +00:00
Mario
8e5df2dd22 more cleanup daemon/externals 2021-01-18 14:08:31 +00:00
Mario
441525750f more cleanup daemon/expire 2021-01-18 14:02:37 +00:00
Mario
9acfc44ac9 cleanup daemon/expire 2021-01-18 14:00:21 +00:00
Mario
d5bd09b983 cleanup daemon/deliver_hooks, daemon/directory 2021-01-18 13:49:58 +00:00
Mario
45350179b4 cleanup daemon/deliver 2021-01-18 13:41:34 +00:00
Mario
d0f3d2b2a5 cleanup daemon/curlauth 2021-01-18 13:40:01 +00:00
Mario
3742fe80fc only var can be passed by reference, cleanup 2021-01-18 13:37:54 +00:00
Mario
e191966e69 only var can be passed by reference, cleanup 2021-01-18 13:36:47 +00:00
Mario
2c8e122008 cleanup daemon/checksites 2021-01-18 13:29:48 +00:00
Mario
2729f466d5 cleanup 2021-01-18 13:23:29 +00:00
Mario
f4b71fbec1 cleanup 2021-01-18 13:21:13 +00:00
Mario
6695225492 cleanup 2021-01-18 13:08:13 +00:00
Mario
4f74d1d877 cleanup 2021-01-18 13:00:39 +00:00
Mario
bee84e9b00 whitespace 2021-01-18 12:56:07 +00:00
Mario
faaa2d4472 $match should be array 2021-01-18 11:21:37 +00:00
Mario
917c6caa14 force arg is not used anymore in drop_item_lolevel() 2021-01-18 08:46:37 +00:00
Mario
cd59c67c67 fix undefined variable 2021-01-18 08:43:08 +00:00
Mario
37f1b774b7 missing import 2021-01-17 15:19:00 +00:00
Mario
828636847e get_item_elements() check against zot6 2021-01-17 14:13:31 +00:00
Mario
06b5f71075 port util/connect to Lib/Connect 2021-01-17 14:06:35 +00:00
Mario
8d37a4239a mark_orphan_hubsxchans() check against zot6 2021-01-17 13:56:23 +00:00
Mario
a925b08e80 get_bookmark_link() check against zot6 2021-01-17 13:52:55 +00:00
Mario
46aefd8883 fix fetch vcard menu entry for zot6 connections 2021-01-17 13:41:27 +00:00
Mario
38a48de826 app_render() check against zot6 2021-01-17 13:35:13 +00:00
Mario
254e30bea1 version 5.2.1 2021-01-16 10:33:46 +01:00
Mario
a16692eeb0 changelog
(cherry picked from commit 485a232ae6)
2021-01-16 10:33:13 +01:00
Mario
485a232ae6 changelog 2021-01-16 09:31:51 +00:00
Mario
d3f8118874 wrong logic
(cherry picked from commit 0d544e2294)
2021-01-16 10:18:29 +01:00
Mario
0d544e2294 wrong logic 2021-01-16 09:17:45 +00:00
Mario
cb3131a166 also check for zot6
(cherry picked from commit 3bcb322156)
2021-01-16 10:14:16 +01:00
Mario
3105f514e4 make attach_upgrade() catch entries where only display_path is missing
(cherry picked from commit 42812078c5)
2021-01-16 10:13:43 +01:00
Mario
395b427787 cleanup mod like 2021-01-16 09:09:54 +00:00
Mario
4d63c37c38 HTTPSig::get_zotfinger_key() only takes the id arg 2021-01-15 21:23:14 +00:00
Mario
a2776ade81 exec is marked deprecated 2021-01-15 21:19:07 +00:00
Mario
5f5b3f3d4c remove unused global var 2021-01-15 21:02:13 +00:00
Mario
60b76c53fc fix undefined var 2021-01-15 20:58:31 +00:00
Mario
e55ea8b126 undefined variable $filename 2021-01-15 20:52:18 +00:00
Mario
889581e35b wrong variable name 2021-01-15 20:36:48 +00:00
Mario
f7222d43c9 only vars can be passed by reference 2021-01-15 20:26:22 +00:00
Mario
1e474c9689 unused variable and missing break statement 2021-01-15 20:14:48 +00:00
Mario
50fb658776 fix undefined variable 2021-01-15 20:10:44 +00:00
Mario
dde0f3a403 formatting 2021-01-15 20:03:49 +00:00
Mario
597d7bd532 formatting 2021-01-15 20:02:03 +00:00
Mario
aa27f93a9c cleanup unused/undefined variables 2021-01-15 20:00:47 +00:00
Mario
ae4b5231bb fix undefined vars in mod cal 2021-01-15 19:37:47 +00:00
Mario
28ef42a424 make functions public static 2021-01-15 19:31:50 +00:00
Mario
70233ea903 remove redundant import and add ext-zip to composer 2021-01-15 19:28:15 +00:00
Mario
63c15c2c8d remove redundant import 2021-01-15 19:11:14 +00:00
Mario
3e1f387b2b Receiver::run() does not take an argument 2021-01-15 19:09:27 +00:00
Mario
77c777512c fix issue in unused function 2021-01-15 19:04:20 +00:00
Mario
02059fb663 bump composer php version 2021-01-15 19:00:04 +00:00
Mario
3205429d24 more wiki issues 2021-01-15 18:57:56 +00:00
Mario
aa8eb9522f wiki issues 2021-01-15 18:55:07 +00:00
Mario
5030157246 argument must be of type boolean 2021-01-15 18:39:07 +00:00
Mario
a3bc9251bf $msg must be array 2021-01-15 18:37:08 +00:00
Mario
5a325cfa7b remove unused variables 2021-01-15 17:21:33 +00:00
Mario
583d3b5580 whitespace 2021-01-15 15:49:22 +00:00
Mario
43e3663721 fix wrong/undefined variables and add sleep interval to notifier calls 2021-01-15 15:48:17 +00:00
Mario
9f8a512eb5 only var can be passed by reference 2021-01-15 15:07:54 +00:00
Mario
3bcb322156 also check for zot6 2021-01-15 15:06:07 +00:00
Mario
1e645cabd4 style fixes 2021-01-15 15:00:53 +00:00
Mario
ee82763d45 add ext-json to composer 2021-01-15 14:47:26 +00:00
Mario
42812078c5 make attach_upgrade() catch entries where only display_path is missing 2021-01-15 10:00:13 +00:00
Mario
83f0c3d1dd some work to fix r_preview in list mode 2021-01-14 14:28:35 +00:00
Mario
e5a70744c0 update changelog
(cherry picked from commit 299c4bda1b)
2021-01-13 11:35:06 +01:00
Mario
5eefdc6485 Merge branch '5.2RC' 2021-01-13 09:50:53 +00:00
Mario
4d2bcbc583 release 5.2 2021-01-13 09:48:47 +00:00
Mario
299c4bda1b update changelog 2021-01-13 09:47:44 +00:00
Mario
f4b9291d42 Merge branch 'dev' into 5.2RC 2021-01-13 09:39:55 +00:00
Mario
b7afc905ec Revert "keyid adapt for backward compatibility to current release part 2"
This reverts commit efb8a29b5f.
2021-01-13 09:34:38 +00:00
Mario
01bd846433 Revert "keyid adapt for backward compatibility to current release"
This reverts commit ff100a499a.
2021-01-13 09:34:03 +00:00
Mario
08f717d4fc Merge branch 'dev' into 5.2RC 2021-01-13 09:01:31 +00:00
Mario
b9fd87b004 do not turn the groups own direkt messages into group items - fixes #1510 2021-01-13 08:54:58 +00:00
Mario
1615f2c79a Merge branch 'dev' into 5.2RC 2021-01-12 09:08:28 +00:00
Mario
f430db0de7 changelog 2021-01-12 09:04:32 +00:00
Mario
32eb603643 lukasreschke/id3parser is not maintained anymore. fix it so that composer dump-autoload will not complain 2021-01-12 08:52:08 +00:00
Mario
c3f387f22a more changelog 2021-01-12 08:35:22 +00:00
Mario
8703caff5f restrict length of short profile title/description to 190characters to omit sql warnings about too long string data 2021-01-12 08:25:09 +00:00
Mario
c5d50c9e47 Ãupdate changelog 2021-01-11 20:33:17 +00:00
Mario
fed4e3e03a Ãupdate changelog 2021-01-11 20:32:33 +00:00
Mario
9d1f73e179 5.2RC4 2021-01-11 19:02:26 +00:00
Mario
ba164d9488 Merge branch 'dev' into 5.2RC 2021-01-11 19:01:02 +00:00
Mario
3fe67eb646 more libzotdir
(cherry picked from commit e339e897ff)
2021-01-11 19:55:07 +01:00
Mario
12ba2c30b9 can not access global from statc method 2021-01-11 08:59:16 +00:00
Mario Vavti
7c1b41019e missing constant definition 2021-01-10 22:42:57 +01:00
Mario Vavti
707110e5a7 sync_directories() omit known dead sites 2021-01-10 21:46:31 +01:00
Mario Vavti
ba9a9cb016 undefined variable 2021-01-10 21:32:42 +01:00
Mario
c1c75c4b67 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-10 00:32:45 +00:00
Mario
0446349b89 missing use statement 2021-01-10 00:32:34 +00:00
Mario Vavti
915cb44601 typo 2021-01-09 23:06:56 +01:00
Mario
17a153fb6d Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-09 21:54:55 +00:00
Mario
e339e897ff more libzotdir 2021-01-09 21:54:41 +00:00
Mario
6b57f163bd fix markup
(cherry picked from commit 4ace4819ff)
2021-01-09 22:05:40 +01:00
Mario
4ace4819ff fix markup 2021-01-09 22:04:47 +01:00
mjfriaza
ce893122af Update Spanish translation
(cherry picked from commit c90d1fc8ef)
2021-01-09 22:02:35 +01:00
Mario
fb5188a8c6 Merge remote-tracking branch 'codeberg/dev' into dev 2021-01-09 21:01:24 +00:00
hubzilla
c17f452fc7 Merge pull request 'Update Spanish translation' (#2) from mjfriaza/hubzilla:dev into dev
Reviewed-on: https://codeberg.org/hubzilla/hubzilla/pulls/2
2021-01-09 21:59:22 +01:00
Mario
71b0f54b7a update sbom 2021-01-09 20:55:40 +00:00
Mario
d387d021fe update sbom 2021-01-09 20:54:48 +00:00
Mario
d6fefc3603 5.2RC3 2021-01-09 20:34:21 +00:00
Mario
efb8a29b5f keyid adapt for backward compatibility to current release part 2 2021-01-09 20:20:48 +00:00
Mario
ff100a499a keyid adapt for backward compatibility to current release 2021-01-09 19:57:55 +00:00
Mario
d89dc65330 remove redundant mail.apd
(cherry picked from commit 898df6287a)
2021-01-09 20:33:12 +01:00
Mario
fa41527f85 fix some php8 fatal errors
(cherry picked from commit 2522d42c71)
2021-01-09 20:32:40 +01:00
Mario
f48d844e42 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-09 19:27:46 +00:00
Mario
898df6287a remove redundant mail.apd 2021-01-09 19:27:32 +00:00
Mario
2522d42c71 fix some php8 fatal errors 2021-01-09 20:22:47 +01:00
Mario
39c5e85564 RC2 2021-01-09 15:50:57 +01:00
Mario
1294c05a91 version 2021-01-09 13:27:57 +00:00
Mario
64f802d4f6 fix error in sql query
(cherry picked from commit 0e2af40329)
2021-01-09 14:25:41 +01:00
Mario
61e782389c more streamline keyid 2021-01-09 13:24:32 +00:00
Mario
7cfb230a5e streamline keyid 2021-01-09 13:22:43 +00:00
Mario
0e2af40329 fix error in sql query 2021-01-09 13:05:31 +00:00
Mario
7f51ff0a8d set resource_type = group_item and resource_id = original mid for forum items so we do not need to query the body for the original mid on edit. 2021-01-08 21:27:06 +00:00
Mario Vavti
d1a61c6dce allow deletes for e.g. w2w posts where we are the author but item wall is not set. ownership is checked at the receiving side anyway 2021-01-08 13:12:01 +01:00
mjfriaza
c90d1fc8ef Update Spanish translation 2021-01-08 11:29:32 +01:00
Mario
42cd046e90 RC1 2021-01-06 20:37:04 +01:00
Mario
52fa350138 error in logic
(cherry picked from commit 16082456df)
2021-01-06 20:35:16 +01:00
Mario
4ea8357c6a remove logging
(cherry picked from commit 49cc69ecc5)
2021-01-06 20:35:03 +01:00
Mario
dd0da70b06 filter out self and child folders from the folder list
(cherry picked from commit a0c8e1959a)
2021-01-06 20:34:49 +01:00
Mario
d80f2a621d simplify attach_folder_select_list()
(cherry picked from commit c7010dac3c)
2021-01-06 20:33:59 +01:00
Mario
16082456df error in logic 2021-01-06 19:32:36 +00:00
Mario
49cc69ecc5 remove logging 2021-01-06 19:27:26 +00:00
Mario
a0c8e1959a filter out self and child folders from the folder list 2021-01-06 19:26:40 +00:00
Mario
c7010dac3c simplify attach_folder_select_list() 2021-01-06 19:22:29 +00:00
Mario
99bfc3aaa0 version 5.3 2021-01-05 08:48:30 +00:00
Mario
43b3922803 dump autoload 2021-01-05 08:45:23 +00:00
Mario
ca70ad1a9f version and strings 2021-01-05 08:44:10 +00:00
Mario Vavti
a250419b59 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-04 20:36:37 +01:00
Mario Vavti
291644f29d fix issue where categories were not saved on forum wall post 2021-01-04 20:36:24 +01:00
Mario
d4e97ab64c more work on tiles 2021-01-04 13:43:46 +00:00
Mario
e92f98d3c6 rounded corners 2021-01-04 11:14:01 +00:00
Mario
999aac19de missing translateable string and adapt icons 2021-01-04 11:09:12 +00:00
Mario
b2f6e5673d some work on the tiles view 2021-01-04 10:58:41 +00:00
Mario
f0d1c962a7 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2021-01-03 20:18:05 +00:00
Mario
6999b8d9b4 fix no channel_id provided for contact_remove() in reply_purge(). fix wrong notifier command 2021-01-03 20:17:45 +00:00
Max Kostikov
46e704d507 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1892
2021-01-03 17:05:03 +01:00
Max Kostikov
308e94ea79 Update hstrings.php 2021-01-03 16:43:45 +01:00
Max Kostikov
0c839b2738 Update hmessages.po 2021-01-03 16:43:22 +01:00
Mario
cff5859c59 mod cloud strings 2021-01-03 14:28:02 +00:00
Mario
6d95f5fc98 files_ng: slightly change the way we display link bbcode 2021-01-03 10:07:54 +00:00
Mario
7684861249 do not check against undefined variable 2021-01-02 21:37:06 +00:00
Mario
9759cb7075 fix typo 2021-01-02 21:18:49 +00:00
Mario
b3a5f9bef4 wrong variable 2021-01-02 21:10:47 +00:00
Mario
3e3b6cc1e1 wrong variable 2021-01-02 21:01:42 +00:00
Mario
474103dc82 remove unused code and fix width and height not defined 2021-01-02 20:56:18 +00:00
Mario
092a8f2d05 fix wrong variable 2021-01-02 20:39:58 +00:00
Mario
2bcf0c354a fix wrong variable 2021-01-02 20:39:47 +00:00
Mario
73cc756cac fix wrong variable 2021-01-02 20:38:56 +00:00
Mario
6091c2dba0 fix wrong variable 2021-01-02 20:38:44 +00:00
Mario
2862a73253 fix typo 2021-01-02 20:38:11 +00:00
Mario
850c3f2b6a fix typos 2021-01-02 18:58:20 +00:00
Mario
98f3e4cbd3 set is_owner does not need to be a per item flag. fix post button visible for collections 2021-01-02 18:53:23 +00:00
Mario
efc8ed4845 make share title h3 2021-01-02 11:20:03 +00:00
Mario
0bc4c7d1a0 version 5.0.8 2020-12-30 15:01:17 +00:00
Mario
be2e754d78 changelog
(cherry picked from commit 817e72846e)
2020-12-30 15:59:13 +01:00
Mario
817e72846e changelog 2020-12-30 14:55:00 +00:00
Mario
220768bffc escape both single and double quotes for the notifications title. fixes issue #1503
(cherry picked from commit 11d61a744d)
2020-12-30 15:40:15 +01:00
Mario Vavti
3cd64bcb22 random_profile: return zot6 entries
(cherry picked from commit 5cefdbf985)
2020-12-30 15:40:03 +01:00
Mario Vavti
86bfb07c29 dirserach: return zot6 entries
(cherry picked from commit 5485f96625)
2020-12-30 15:39:48 +01:00
Max Kostikov
ad08bd62aa Revert "Fix sync item with Zot connections"
This reverts commit 3db4aa69440553788d8f46cf4bbfb38ca4f09130


(cherry picked from commit c063fe0720)
2020-12-30 15:39:33 +01:00
Max Kostikov
d79cab0680 Deduplicate contacts list on autocomplete
(cherry picked from commit d889547b26)
2020-12-30 15:38:26 +01:00
Mario
d1d6f7d838 sse: fix issue with direct message notificationss
(cherry picked from commit d5eeb948d5)
2020-12-30 15:38:09 +01:00
Max Kostikov
e31a7e5c9d Do not revalidate cached photos
(cherry picked from commit ca051e943f)
2020-12-30 15:37:47 +01:00
Max Kostikov
e6f0d9887c Implement Imagemagick resources consumption limiting
(cherry picked from commit 36d89d02e1)
2020-12-30 15:37:28 +01:00
Mario
2855d84fba owa specify key
(cherry picked from commit f2258d4202)
2020-12-30 15:36:25 +01:00
Mario
3c19648a56 fix issue where an array was passed to get_key() instead of a string
(cherry picked from commit 81a1aedeb9)
2020-12-30 15:35:38 +01:00
Mario
8db367c743 remove fallback code - it will not be required if compression is dismissed 2020-12-30 14:30:39 +00:00
Mario
2c4fabba35 store zip files without compression 2020-12-30 14:12:08 +00:00
Mario
dff42ffb41 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-12-29 20:16:35 +00:00
Mario
11d61a744d escape both single and double quotes for the notifications title. fixes issue #1503 2020-12-29 20:16:23 +00:00
Mario Vavti
5cefdbf985 random_profile: return zot6 entries 2020-12-29 20:37:23 +01:00
Mario Vavti
5485f96625 dirserach: return zot6 entries 2020-12-29 20:36:41 +01:00
Mario
af0f46d23d Merge branch 'cloneissue' into 'dev'
Fix sync comments with clones

See merge request hubzilla/core!1889
2020-12-29 15:50:33 +01:00
Max Kostikov
c063fe0720 Revert "Fix sync item with Zot connections"
This reverts commit 3db4aa69440553788d8f46cf4bbfb38ca4f09130
2020-12-29 15:50:32 +01:00
Mario
203ba7343c Merge branch 'autocomplete' into 'dev'
Deduplicate contacts list on autocomplete

See merge request hubzilla/core!1891
2020-12-29 11:49:52 +01:00
Max Kostikov
d889547b26 Deduplicate contacts list on autocomplete 2020-12-29 11:49:52 +01:00
Mario
b66e19dc43 Merge branch 'photocache' into 'dev'
Do not revalidate cached photos

See merge request hubzilla/core!1890
2020-12-29 11:49:33 +01:00
Mario
c84e3334bf Merge branch 'tuneimagick' into 'dev'
Implement Imagemagick resources consumption limiting

See merge request hubzilla/core!1888
2020-12-29 11:49:11 +01:00
Mario
d5eeb948d5 sse: fix issue with direct message notificationss 2020-12-28 13:19:40 +00:00
Mario
9670833a5d files_ng: provide a fallback in case the server timed out on compressing the zip file 2020-12-28 10:12:25 +00:00
Max Kostikov
ca051e943f Do not revalidate cached photos 2020-12-26 14:24:04 +01:00
Max Kostikov
36d89d02e1 Implement Imagemagick resources consumption limiting 2020-12-26 14:10:56 +01:00
Mario
f4bfa77942 version bump 2020-12-23 09:16:45 +00:00
Mario
f2258d4202 owa specify key 2020-12-23 08:32:59 +00:00
Mario
d56bf34326 fix javascript warning 2020-12-23 08:22:31 +00:00
Mario
9fa3dee522 remove deprecated forum autocomplete code 2020-12-23 08:19:11 +00:00
Mario
7ee2192c29 provide some info and remove unused code 2020-12-22 13:33:54 +00:00
Mario
3a38292bab files_ng: improve download handlÃing 2020-12-22 13:23:20 +00:00
Mario
60cbb65d84 files_ng: omit parent folders of a download 2020-12-22 09:01:52 +00:00
Mario
d118ab71e6 files_ng: implement directory and bulk file download 2020-12-21 21:37:10 +00:00
Mario
81a1aedeb9 fix issue where an array was passed to get_key() instead of a string 2020-12-21 21:31:52 +00:00
Mario
1fd576436b changelog
(cherry picked from commit 638f7a1c89)
2020-12-21 09:44:38 +01:00
Mario
fac05e7dcd version 5.0.7 2020-12-21 09:05:29 +01:00
Max Kostikov
eef3126f0b Fix CardDAV address book ID
(cherry picked from commit 6579007ca0)
2020-12-21 09:04:36 +01:00
Max Kostikov
2df5a2a66d Use Zot6 for CardDAV and CalDAV sync between clones
(cherry picked from commit c596fb14bb)
2020-12-21 09:04:26 +01:00
Mario Vavti
01e7e3c24a handle owa with hubloc_id_url only
(cherry picked from commit ed4bf1c13d)
2020-12-21 09:04:04 +01:00
Mario
8112dee91e do not json_encode the attach array - fixes #1499
(cherry picked from commit 5b24225251)
2020-12-21 09:03:46 +01:00
Mario
638f7a1c89 changelog 2020-12-21 08:03:17 +00:00
Max Kostikov
5de4c3cc3f Merge branch 'dev' into 'dev'
Use Zot6 for CardDAV and CalDAV sync between clones

See merge request hubzilla/core!1886
2020-12-20 00:01:50 +01:00
Max Kostikov
6579007ca0 Fix CardDAV address book ID 2020-12-19 23:57:14 +01:00
Max Kostikov
c596fb14bb Use Zot6 for CardDAV and CalDAV sync between clones 2020-12-19 22:58:17 +01:00
Max Kostikov
116fc4e00d Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!4
2020-12-19 22:02:51 +01:00
Mario
57f6f54f29 refresh_all will be called from the notifier in Daemon/Directory 2020-12-19 15:21:34 +00:00
Mario
8640e6d1df deprecate ! and !! forum tags 2020-12-18 13:26:51 +00:00
Mario
801583fd07 flag forums where we do not have post permissions and filter them from the acl selector 2020-12-18 12:40:36 +00:00
Mario Vavti
4987534eba Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-12-18 10:02:43 +01:00
Mario Vavti
ed4bf1c13d handle owa with hubloc_id_url only 2020-12-18 10:02:13 +01:00
Mario
5b24225251 do not json_encode the attach array - fixes #1499 2020-12-17 18:57:04 +00:00
Mario
886be8c452 changelog for version 5.0.6
(cherry picked from commit 269efb9c1e)
2020-12-17 14:46:08 +01:00
Mario
269efb9c1e changelog for version 5.0.6 2020-12-17 13:45:14 +00:00
Mario Vavti
612448e4ae update to fix empty hubloc_id_url caused by clone import bug for zot hublocs which was fixed in 4693069a06 2020-12-17 13:29:15 +00:00
Mario Vavti
82db19d54c restrict owa to zot6 and zot network until the hubloc madness with activitypub and possibly also diaspora will be solved
(cherry picked from commit 7ebba75fa2)
2020-12-17 14:26:32 +01:00
Mario
06aa3e6b8c fix issue with abconfig when cloning a channel
(cherry picked from commit f13bff2a76)
2020-12-17 14:26:00 +01:00
Mario
abf985c69e owa: dismiss deleted hublocs
(cherry picked from commit 006a409eb8)
2020-12-17 14:25:06 +01:00
Mario
c176b54f6b use refresh_all in mod import
(cherry picked from commit 59f1c038fe)
2020-12-17 14:24:49 +01:00
Mario
b24e691e7e try to fix more hubloc anomalies: use refresh_all in remove_obsolete_hublocs() and use Libzot::encode_locations() instead of zot_encode_locations() in notifier
(cherry picked from commit dec4ceabb5)
2020-12-17 14:24:16 +01:00
Mario
c2e43dc1b0 fix missing hubloc_id_url for zot hubloc when importing a channel
(cherry picked from commit 4693069a06)
2020-12-17 14:23:09 +01:00
Mario
7b7739c32c try to prevent hubloc confusion in some places
(cherry picked from commit 61cfeb5bdb749319357912d958cd13304b895bce)

(cherry picked from commit 634ace552d)
2020-12-17 14:22:44 +01:00
Mario
269172406f make gprobe look for zot6 only
(cherry picked from commit 1d3437aa419adde319d2a3f5d98e7f8fe4418f27)

(cherry picked from commit 751a1ba969)
2020-12-17 14:20:58 +01:00
Mario
4c054d6de9 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-12-17 12:27:49 +00:00
Mario Vavti
34a58369f2 update to fix empty hubloc_id_url caused by clone import bug for zot hublocs which was fixed in 4693069a06 2020-12-17 13:27:11 +01:00
Mario Vavti
59b4764a15 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-12-17 12:46:33 +01:00
Mario Vavti
7ebba75fa2 restrict owa to zot6 and zot network until the hubloc madness with activitypub and possibly also diaspora will be solved 2020-12-17 12:46:22 +01:00
Mario
b2e80efe3f files_ng: provide bbcode snippets in the info panel 2020-12-17 10:04:24 +00:00
Mario
b4b566318a files_ng: fix regression in finding the right path in certain situations and add a info panel with attach and zrl bbcode 2020-12-16 16:57:56 +00:00
Mario
27df896a9c files_ng: implement lockview 2020-12-16 08:26:19 +00:00
Mario
8188a551f3 fix regression in files aclselect 2020-12-15 12:12:38 +00:00
Mario
f13bff2a76 fix issue with abconfig when cloning a channel 2020-12-15 11:29:45 +00:00
Mario
59f1c038fe use refresh_all in mod import 2020-12-15 10:04:22 +00:00
Mario
006a409eb8 owa: dismiss deleted hublocs 2020-12-15 08:40:02 +00:00
Mario
dec4ceabb5 try to fix more hubloc anomalies: use refresh_all in remove_obsolete_hublocs() and use Libzot::encode_locations() instead of zot_encode_locations() in notifier 2020-12-15 08:36:14 +00:00
Mario
4a902dbbbe fix file sync issues 2020-12-14 22:06:47 +00:00
Mario
8e488e2913 handle removal of terms in attach_delete() when deleting a ressource 2020-12-14 21:56:19 +00:00
Mario
e58e27ce22 sync categories 2020-12-14 21:38:49 +00:00
Mario
78c0926a64 improve when to show link to parent path 2020-12-14 20:22:13 +00:00
Mario
4693069a06 fix missing hubloc_id_url for zot hubloc when importing a channel 2020-12-14 14:06:07 +00:00
Mario
70e529ef5d add another parent element to wrap the tools 2020-12-14 11:17:36 +00:00
Mario
2a154f8c9a merge branch files_ng into dev 2020-12-14 11:02:20 +00:00
Mario
634ace552d try to prevent hubloc confusion in some places
(cherry picked from commit 61cfeb5bdb749319357912d958cd13304b895bce)
2020-12-12 22:41:38 +01:00
Mario
751a1ba969 make gprobe look for zot6 only
(cherry picked from commit 1d3437aa419adde319d2a3f5d98e7f8fe4418f27)
2020-12-12 22:41:11 +01:00
Mario
d95573741d changelog 2020-12-12 19:02:28 +00:00
Max Kostikov
faf4bcdd62 Remove duplicate delete terms query
(cherry picked from commit a27c593a2a)
2020-12-12 19:56:24 +01:00
Mario
badae90051 Merge branch 'dev' into 'dev'
Remove duplicate delete terms query

See merge request hubzilla/core!1885
2020-12-12 19:44:01 +01:00
Max Kostikov
a27c593a2a Remove duplicate delete terms query 2020-12-12 19:43:57 +01:00
Mario
f699442bec bump version 2020-12-12 19:40:49 +01:00
Mario
8720931a53 fix hubloc issue in mod getfile
(cherry picked from commit b0b9b9f28974f9016e47491e81876224c57a7e3b)

(cherry picked from commit 8c1c49a45e)
2020-12-12 19:36:42 +01:00
Max Kostikov
600dcdfc58 Remove duplicate delete terms query 2020-12-12 10:10:32 +01:00
Max Kostikov
a4b83327c2 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!3
2020-12-12 10:07:39 +01:00
Mario
8c1c49a45e fix hubloc issue in mod getfile
(cherry picked from commit b0b9b9f28974f9016e47491e81876224c57a7e3b)
2020-12-11 12:35:54 +01:00
Mario
b1f0014429 Merge branch 'dev' into 'dev'
Skip profile photo query from addons for undefined channel id

See merge request hubzilla/core!1884
2020-12-07 11:08:41 +01:00
Max Kostikov
d984918c75 Skip profile photo query from addons for undefined channel id 2020-12-07 11:08:41 +01:00
Mario
21ac4b5139 remove announce activity from response activites array
(cherry picked from commit 52c78c757ae73082ed29e48707b2313e65020db3)
2020-12-07 11:03:03 +01:00
Max Kostikov
92eb7a0be4 Formatting 2020-12-04 14:45:27 +01:00
Max Kostikov
b26b1c0820 Skip profile photo query from addons for undefined channel id 2020-12-04 14:36:29 +01:00
Max Kostikov
a9dd6d6bdb Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!2
2020-12-04 14:33:34 +01:00
Mario
d60c53cd12 version 5.0.4 2020-12-01 08:46:22 +00:00
Mario
6b0fe6e0a0 changelog
(cherry picked from commit 9c7ec55b40)
2020-12-01 09:45:09 +01:00
Mario
9c7ec55b40 changelog 2020-12-01 08:43:59 +00:00
Mario
28f1f4cbdc missing parenthesis
(cherry picked from commit 45b41f0787)
2020-12-01 09:38:59 +01:00
Mario
508b3ce730 Ãfix regerssion in updating the primary
(cherry picked from commit c47434634d)
2020-12-01 09:38:48 +01:00
Mario
87ecc61fb4 dismiss title in response activity
(cherry picked from commit eb2ad3fc438544192cda95d88a4c2a54ec1e0014)

(cherry picked from commit b89355b9d8)
2020-12-01 09:38:17 +01:00
Mario
ce4d664abc Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-12-01 08:31:50 +00:00
Mario
45b41f0787 missing parenthesis 2020-12-01 08:31:27 +00:00
Mario
c47434634d Ãfix regerssion in updating the primary 2020-12-01 08:31:15 +00:00
Mario
b89355b9d8 dismiss title in response activity
(cherry picked from commit eb2ad3fc438544192cda95d88a4c2a54ec1e0014)
2020-11-28 11:40:03 +01:00
Mario
3f40d6f7b7 run composer install --no-dev 2020-11-27 11:09:48 +00:00
Mario
155daac8ad run composer install --no-dev 2020-11-27 11:08:45 +00:00
Mario
f9d24d07dd composer autoload dump 2020-11-27 10:50:46 +00:00
Mario
d91e35e197 bring back require but with the correct path 2020-11-27 10:47:24 +00:00
Mario
a967dd9d13 fix languagedetect warnming 2020-11-27 08:04:41 +00:00
Mario
f4bb7bcbff update composer libs 2020-11-27 08:04:00 +00:00
Mario
0f6166da00 Merge branch 'dev' 2020-11-26 18:43:53 +00:00
Mario
07e5b8295e changelog 2020-11-26 18:41:51 +00:00
Mario
9afdf86961 coverage config 2020-11-26 12:10:16 +00:00
Mario
f4f1974be0 those would require dbunit 2020-11-26 12:01:15 +00:00
Mario
6f6399ca0f fix test 2020-11-26 11:43:07 +00:00
Mario
5018c0fbb8 add dms/phpunit-arraysubset-asserts 2020-11-26 11:37:13 +00:00
Mario
188975ccbd update gitlab-ci 2020-11-26 11:20:16 +00:00
Mario
5e1addc75e revert folder renaming 2020-11-26 11:14:40 +00:00
Mario
138beeac41 wrong path 2020-11-26 10:24:00 +00:00
Mario
187364d94a set xdebug.mode=coverage in php.ini 2020-11-26 10:21:13 +00:00
Mario
6e74e76fcd update phpunit.xml 2020-11-26 10:12:35 +00:00
Mario
615424d272 update ci file 2020-11-26 10:04:33 +00:00
Mario
d40a7a609e run vendor/bin/phpunit --migrate-configuration 2020-11-26 10:03:39 +00:00
Mario
0ec40f00a9 minor adjustion 2020-11-26 09:52:24 +00:00
Mario
de054026f2 try phpunit 9, remove dbunit (not compatible and abandoned), re-enable xdebug 2020-11-26 09:26:37 +00:00
Mario
175b45d1ed update php-mock 2020-11-26 08:56:38 +00:00
Mario
e236b77817 more psr-4 autoloading standard 2020-11-26 08:48:09 +00:00
Mario
21cd4a1b48 psr-4 autoloading standard 2020-11-26 08:43:03 +00:00
Mario
e9a50371f5 comment out xdebug 2020-11-26 08:30:06 +00:00
Mario
71f8a08e5f update phpunit 2020-11-26 08:19:51 +00:00
Mario
4419c93d80 this should not be required anymore 2020-11-26 07:58:57 +00:00
Mario
fcc13ce02c version 2020-11-25 18:45:37 +00:00
Mario
941db04260 add a uuid version 5 based uuid to imported feeds. if rewrite author for sourced items, also rewrite mid to be fetchable 2020-11-25 13:52:27 +00:00
Mario
87d7a3053a do not reset item_origin to 1 for deleted items to prevent possible looping and do not set item_uplink for sourced rss items - we can not sen anything to them. 2020-11-25 11:01:25 +00:00
Mario
ae11b2c281 profile_load() requires channel_address 2020-11-24 22:14:24 +00:00
Mario
f43577ec27 add logging 2020-11-23 21:26:52 +00:00
Mario
c648c38fb0 fix warning 2020-11-23 20:23:17 +00:00
Mario
34d54fd309 simplify code and fix issue with categories 2020-11-23 19:57:28 +00:00
Mario
891b1428cc do not use chanlink_url() at this place 2020-11-23 18:23:46 +00:00
Mario
453dd38e51 missing include 2020-11-23 14:01:04 +00:00
Mario
f59aefd3d9 store actor of fetched acivities 2020-11-23 09:10:53 +00:00
Mario
451468d129 fix mod item issue with remote channels 2020-11-22 16:37:20 +00:00
Mario
c0adf31da9 fix like issue with remote channels 2020-11-22 13:07:03 +00:00
Mario
bb43c57b07 make simple update more simple again 2020-11-21 20:57:50 +00:00
Mario
6c94bbc93f collase the updated content 2020-11-21 20:52:38 +00:00
Mario
50422c608f fix #1492 2020-11-21 20:35:38 +00:00
Mario
7639157a49 restrict returned html usage to local_channel() until some issues will be worked out 2020-11-21 20:15:05 +00:00
Mario
f74cfaec5f fix pubstream id issue 2020-11-21 10:22:23 +00:00
Mario
d559b4a201 deliver to local hub first 2020-11-21 10:21:14 +00:00
Mario
2d4064aca4 returning the rendered html when liking a post or comment 2020-11-20 20:38:10 +00:00
Mario
337d8ea78c minor cleanup 2020-11-20 14:42:46 +00:00
Mario
4c0a26dbf9 move post_comment() handling via ctrl-enter out of handle_comment_form() - to many issues with multiple triggers 2020-11-20 10:45:35 +00:00
Mario
885edd6261 version 2020-11-20 09:15:19 +00:00
Mario
011de75706 returning the rendered html when posting a comment will make the following update (and its implication in mod pubstream) obsolete 2020-11-20 09:14:46 +00:00
Mario
852e456d44 this is silly but it seems to be required for firefox to stop scrolling in certain conditions 2020-11-18 20:34:41 +00:00
Mario
18136788e4 be more specific 2020-11-18 20:33:32 +00:00
Mario
f1101808b7 fix regression in relation to pustream notifications 2020-11-18 17:09:53 +00:00
Mario
791d5098a0 fix regression 2020-11-18 12:28:20 +00:00
Mario
f2fd12fbe5 Do away with auto updates except for our own actions. We might consider to re-implement this for single thread view like eg /display. Instead of calculating scroll positions during updates, keep track of expanded items and set the expanded state when updating - this fixes issue #1488 2020-11-18 09:52:44 +00:00
Mario
b5ab77908e implement submit on ctrl-enter for post editor and comments 2020-11-17 09:09:36 +00:00
Mario
25620081a1 translation 2020-11-16 09:36:27 +00:00
Mario
5750e6cada Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-11-16 09:34:08 +00:00
Mario
394aa76a8f changelog 2020-11-16 09:33:57 +00:00
Mario
35c4deb884 work around an edge case in acl selector
(cherry picked from commit e7c83a81c7)
2020-11-16 10:31:14 +01:00
Mario
0daccead12 changellog 2020-11-16 09:29:49 +00:00
Mario
e7c83a81c7 work around an edge case in acl selector 2020-11-16 09:28:18 +00:00
Mario
dcf8830752 Merge branch 'dev' 2020-11-16 08:26:44 +00:00
Mario
3d519f478a changelog 2020-11-15 13:49:25 +00:00
Mario
3f0fc40ef8 fix ping_site() 2020-11-15 13:44:13 +00:00
Mario
820494c7a6 deprecate daemon/ratenotif 2020-11-15 12:34:10 +00:00
Mario
60b82d3690 more changelog 2020-11-15 11:49:16 +00:00
Mario
57d9b1b332 fix directory post url 2020-11-15 11:48:23 +00:00
Mario
67f8b78a7d changelog 2020-11-15 11:35:26 +00:00
Mario
aada997601 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-11-15 11:03:47 +00:00
Mario
e5dd108bd7 outq_hash is unique - no need for limit 2020-11-15 11:03:17 +00:00
Mario
ad91ab68ce cleanup 2020-11-15 11:02:21 +00:00
Max Kostikov
66c3c32154 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1883
2020-11-15 11:17:59 +01:00
Max Kostikov
c9ce562369 Update hmessages.po 2020-11-15 11:10:49 +01:00
Max Kostikov
a1f01529a7 Update hstrings.php 2020-11-15 11:10:28 +01:00
Max Kostikov
38985dc4e2 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!1
2020-11-15 11:09:44 +01:00
Mario
e74c52094f remove dot 2020-11-14 21:37:49 +00:00
Mario
e05f1f95cf bump version 2020-11-14 21:31:45 +00:00
Mario
b63c5f2785 Polling fallback to server sent events. Polling is the default. SSE must be enabled in /admin/site > Advanced > Enable SSE Notifications if desired. 2020-11-14 21:28:50 +00:00
Mario
685c569eaf minor queue adjustments 2020-11-13 13:49:39 +00:00
Mario
b6e3469519 update to fix more broken hublocs and version bump 2020-11-13 09:26:04 +00:00
Mario
16071f300e better check for valid inbox 2020-11-13 09:18:54 +00:00
Mario
a8de999b7c do not store actors without an inbox - they are not valid 2020-11-12 20:17:03 +00:00
Mario
0dcbcf93c2 some work on include/import 2020-11-12 11:50:00 +00:00
Mario
06273e980e Merge branch 'dev' 2020-11-12 09:00:56 +00:00
Mario
c879e5de44 changelog and version bump 2020-11-12 08:57:51 +00:00
Mario
890290fff0 log the body if fetch failed 2020-11-11 12:10:35 +00:00
Mario
cddae14352 do not log exception - it could exhaust memory 2020-11-09 11:31:20 +00:00
Mario
b3e6a3c1e2 make share titles h3 to reflect the original titlÃe size 2020-11-08 19:07:44 +00:00
Mario
255b6a14a8 less hubloc confusion 2020-11-08 12:55:32 +00:00
Mario
bafbf04164 Merge branch '5.0RC' 2020-11-05 08:46:42 +00:00
Mario
fdefa101d8 version 5.0 2020-11-05 08:42:49 +00:00
Mario
7e40eeb52a Merge branch 'dev' into 5.0RC 2020-11-05 08:41:01 +00:00
Mario
e98804693d update changelog 2020-11-05 08:37:34 +00:00
Mario
953c294778 wrong variable name 2020-11-05 08:32:21 +00:00
Mario
20d2811cd5 Merge branch 'dev' into 5.0RC 2020-11-04 15:16:52 +00:00
Mario
207df132e6 make sure we attach the public key 2020-11-04 13:36:52 +00:00
Mario
40e0fe1d25 css issue 2020-11-04 11:06:30 +00:00
Mario
fe3f42ce10 call sse_setNotificationsStatus() after fading out buttons 2020-11-03 07:29:37 +00:00
Mario
b4ca5c133c Merge branch 'dev' into 5.0RC 2020-11-01 12:38:18 +00:00
Mario
8f1a579597 update changelog 2020-11-01 12:37:49 +00:00
Mario
aa69b43e0e fix vsprintf() warning 2020-11-01 12:33:45 +00:00
Mario
cadd6fdfff fix vsprintf() error 2020-11-01 12:24:55 +00:00
Mario
85b97014c9 version 5.0RC8 2020-10-31 20:33:48 +00:00
Mario
50ca95735d fix merge conflict 2020-10-31 20:32:39 +00:00
Mario
b55c7f794b Merge branch 'dev' into 5.0RC 2020-10-31 20:30:36 +00:00
Mario
205279f7f8 more changelog 2020-10-31 20:28:16 +00:00
Mario
934721a98d remove unmaintained and deprecated schemas 2020-10-31 20:27:23 +00:00
Mario
d02a8d733e update changelog 2020-10-31 20:24:21 +00:00
Mario
d59b81f11d if restarting a previously interrupted upload just return where we ended - fix issue #1485 2020-10-31 19:57:14 +00:00
Mario
b11d2c376b Merge branch 'dev' into 'dev'
Don't try to fetch profile photo for unknown channel

See merge request hubzilla/core!1880
2020-10-31 13:53:13 +01:00
Mario
6d83b5b68d Merge branch 'cherry-pick-16d450fc' into 'dev'
HTML parsing lib change to standard PHP in scrape_feed() and scrape_vcard()

See merge request hubzilla/core!1882
2020-10-31 09:19:30 +01:00
root
0ad7c8f69e HTML parsing lib change to standard PHP in scrape_feed() and scrape_vcard()
(cherry picked from commit 16d450fc6980bb70f13e574d1b20406dd313110e)
2020-10-31 09:15:37 +01:00
Mario Vavti
e24c769f8e fix issue #1484 2020-10-27 20:27:49 +01:00
Max Kostikov
7cf9b85a97 Don't try to fetch profile photo for unknown channel 2020-10-25 11:43:35 +01:00
Mario
dd3d65cb1c Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-10-25 10:32:07 +00:00
Mario
5e19632f2d update changelog 2020-10-25 10:32:02 +00:00
Mario
cc543d1ad2 remove redundant includesà 2020-10-25 10:30:12 +00:00
Mario
35299ed7c3 Merge branch 'dev' into 'dev'
Add results caching on public tag and profile categories fetching

See merge request hubzilla/core!1875
2020-10-25 11:28:41 +01:00
Max Kostikov
7008cf3269 Add results caching on public tag and profile categories fetching 2020-10-25 11:28:40 +01:00
Mario
6979ea44f4 more directory fixes 2020-10-25 08:26:25 +00:00
Mario
81775eebe2 directory fixes 2020-10-25 07:59:49 +00:00
Mario
e70802c6ad strings update 2020-10-25 07:47:07 +00:00
Mario
7112bcd134 bt_syslog() instead of syslog flag for btlogger 2020-10-25 07:27:07 +00:00
Mario
d3d5ddfb43 enable btlogging to syslog
(cherry picked from commit 5580fc1954)
2020-10-24 23:29:11 +02:00
Mario
5580fc1954 enable btlogging to syslog 2020-10-24 21:26:46 +00:00
Mario
d0e85f05af Merge branch 'dev' into 5.0RC 2020-10-23 12:18:53 +00:00
Mario
c136741db6 more remove logging 2020-10-23 12:18:04 +00:00
Mario
5724be1f8e Merge branch 'dev' into 5.0RC 2020-10-23 11:47:23 +00:00
Mario
29e89d1152 Ãremove loggingà 2020-10-23 11:46:43 +00:00
Mario
95dfde99c6 Merge branch 'dev' into 5.0RC 2020-10-23 09:29:22 +00:00
Mario
59fd3861a7 wrong extension 2020-10-23 09:28:49 +00:00
Mario
69d627a58b Merge branch 'dev' into 5.0RC 2020-10-23 06:52:18 +00:00
Mario
2772c33563 load eager in items - lazy breaks collapsing of long items with images 2020-10-22 19:22:52 +00:00
Mario
78f655f877 more lazy, less eager 2020-10-22 19:11:03 +00:00
Mario
75a73be60c lazy/eager loading and minor css fixes 2020-10-22 18:54:21 +00:00
Mario
690874fc6e fix minor regression 2020-10-22 12:12:53 +00:00
Mario
96de38a1f0 adapt notifications and mark item seen handling to play well with client side page caching 2020-10-22 11:33:25 +00:00
Mario
cef0c2ebb2 highlight events for today in notifications and remove some redundant css 2020-10-19 08:44:44 +00:00
Mario
5e0f5460f2 provide info about dead sites in delivery report and set site_dead when marking a hubloc down. 2020-10-19 07:25:30 +00:00
Mario
ff8c9cfd14 load more notifications if visible notifications count becomes < 15 2020-10-18 09:47:46 +00:00
Mario
b5b033fe22 reduce result set for notificationsà 2020-10-16 14:12:30 +00:00
Mario
5dc2f43d1d mark private forums in acl selector 2020-10-16 11:54:14 +00:00
Mario
f0acb9f01e get_forum_channels(): fix an issue where we would not look for private forums in case we did not have any channels where tag_deliver is set 2020-10-16 11:43:21 +00:00
Mario
b6ca9b6020 make acl selector work correctly if we provide a cid in mod network 2020-10-16 10:32:07 +00:00
Mario
9c6446edbe fix image src issue in template 2020-10-16 10:29:24 +00:00
Mario
d84f0030be on refresh, always set all perms 2020-10-16 10:21:58 +00:00
Mario
61f554e0d7 remove new lines and tabs from xchan_name 2020-10-15 10:54:59 +00:00
Mario
3b252d98b8 add forums to acl selector where appropriate 2020-10-15 10:51:58 +00:00
Mario
f5315ed6a2 use logger for logging 2020-10-14 14:25:22 +00:00
Mario
c1f36802a1 version 5.0RC6 2020-10-14 12:36:10 +00:00
Mario
ba0f24bf70 Merge branch 'dev' into 5.0RC 2020-10-14 12:33:38 +00:00
Mario
522b92128f use logger for logging 2020-10-14 12:32:18 +00:00
Mario
ea77043aaf more logging 2020-10-14 08:53:12 +00:00
Mario
91dd877c2d Merge branch 'dev' into 5.0RC 2020-10-14 08:17:35 +00:00
Mario
e2e160b8e8 In find_best_identity() only look for zot and zot6 network types. Otherwise we could end up rewriting activitypub contacts to their diaspora equivalent which would be counterproductive here. Dismiss deleted hublocs. Same applies for find_best_zot_identity(). Also add logging. 2020-10-14 07:33:30 +00:00
Mario
89c74868aa Merge branch 'dev' into 5.0RC 2020-10-13 09:20:16 +00:00
Mario
45a5a04189 do not overwrite $x variable 2020-10-13 09:03:13 +00:00
Mario
1f41b1837f version 5.0RC5 2020-10-13 08:33:22 +00:00
Mario
c01e1b6c33 Merge branch 'dev' into 5.0RC 2020-10-13 08:31:57 +00:00
Mario
08e7c7b249 use a more neutral default cover image provided by bggenerator.com 2020-10-13 08:16:14 +00:00
Mario
b103993ad1 this is not required here 2020-10-13 08:14:14 +00:00
Mario
e12f375624 return if author or owner is missing and add more logging 2020-10-13 07:25:33 +00:00
Mario
8cd67a5d4a fix more php warnings and remove temporary logging 2020-10-12 21:37:44 +00:00
Mario
31e030af69 missing parenthesis 2020-10-12 21:01:36 +00:00
Mario
375986437a fix php warnings 2020-10-12 20:58:30 +00:00
Mario
5f93157d5a improve find_best_identity() and fix wrong variable 2020-10-12 20:28:48 +00:00
Mario
8d3c201830 if we receive an item with a zot xchan as author or owner rewrite them to the zot6 xchan if we have their zot6 xchan in abook 2020-10-12 20:22:07 +00:00
Mario
612ef90523 version 5.0RC4 2020-10-12 06:50:29 +00:00
Mario
e64856e957 Merge branch 'dev' into 5.0RC 2020-10-12 06:47:41 +00:00
Mario
8595835aa0 revert linebreak removing 2020-10-11 19:48:35 +00:00
Mario
4d2507263d find best identity 2020-10-11 19:35:48 +00:00
Mario
4a671fe634 replace linebreaks with spaces 2020-10-11 10:50:03 +00:00
Mario
ed845d93bc 5.0RC testing: fix issue with event responses 2020-10-10 19:06:35 +00:00
Mario
595f3d99b4 quickfix localize_item() - requires more work 2020-10-10 08:00:25 +00:00
Mario
1e2d5b0c77 only call zid_init() if session is not yet authenticated 2020-10-09 12:44:14 +00:00
Mario
1215618589 add zot6 to the authenticatable options and fix array key in reshare header 2020-10-09 12:16:55 +00:00
Mario
67533ee478 add rss network authors to the not fetchable list 2020-10-09 12:03:33 +00:00
Mario
3acd5dcc07 remove source entries for removed contacts 2020-10-09 07:38:11 +00:00
Mario
c387902a44 5.0RC testing: correctly set permissions for rss feeds 2020-10-09 07:19:23 +00:00
Mario
ad51be7dd9 reduce result set for query in zid_init() and use Libzot::zot_record_preferred() in mod rmagic 2020-10-08 18:18:44 +00:00
Mario
3514f805ea more bdi tags 2020-10-07 15:38:04 +00:00
Mario
2690159f09 5.0RC testing: use the zot6 xchan if available 2020-10-07 08:02:04 +00:00
Mario
902151918c 5.0RC testing: do not attempt zot6 delivery of anonymous comments - the author is not a valid actor 2020-10-06 10:03:57 +00:00
Mario
5dd1ea21af 5.0RC testing: dismiss activities where an author could not be found 2020-10-06 10:01:20 +00:00
Mario
b37c8bf928 code optimisation 2020-10-06 08:25:53 +00:00
hubzilla
923ae14c47 Merge pull request 'Update Spanish' (#1) from mjfriaza/hubzilla:dev into dev
Reviewed-on: https://codeberg.org/hubzilla/hubzilla/pulls/1
2020-10-05 15:14:54 +02:00
Mario
7ec6550734 version 5.0RC3 2020-10-05 12:03:14 +00:00
Mario
e622802c24 Merge branch 'dev' into 5.0RC 2020-10-05 12:01:46 +00:00
Mario
244c8edfca Ãrework undo/delete to use inline objects 2020-10-05 11:47:22 +00:00
Mario
245c0c22cd Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-10-02 15:12:53 +00:00
Mario
93b90ab23a more work on delete/undo 2020-10-02 15:12:42 +00:00
Mario
765f9ffcf0 Revert "more work on delete/undo"
This reverts commit bdfdd515d8
2020-10-02 17:12:26 +02:00
Mario Vavti
bdfdd515d8 more work on delete/undo 2020-10-02 17:08:49 +02:00
Mario
72c6d3e7ba item/activity fetching 2020-10-02 12:09:23 +00:00
Mario
869ce64f87 Merge branch 'dev' into 5.0RC 2020-10-01 12:01:52 +00:00
Mario
86117c8859 more delete fixes 2020-10-01 11:51:20 +00:00
Mario
96c4c72ee3 minor issue 2020-10-01 11:16:03 +00:00
Mario
4b0d32eb14 Merge branch 'deletefixes' into 'dev'
deleting like/dislike/accept/reject/etc. activities should be Undo rather than Delete per the spec

See merge request hubzilla/core!1879
2020-10-01 12:35:35 +02:00
nobody
1d705b9805 deleting like/dislike/accept/reject/etc. activities should be Undo rather than Delete per the spec 2020-09-30 23:38:05 -07:00
Mario
8605aee533 use object url 2020-10-01 06:34:27 +00:00
Mario
e4de9ef903 Merge branch 'deletefixes' into 'dev'
delete fixes

See merge request hubzilla/core!1878
2020-10-01 08:26:03 +02:00
nobody
e529635952 delete fixes 2020-09-30 17:05:36 -07:00
Mario
21b71401d3 version 5.0RC2 2020-09-30 10:30:17 +00:00
Mario
80bdcbb3e6 Merge branch 'dev' into 5.0RC 2020-09-30 10:28:54 +00:00
Mario
b878b69028 5.0RC testing: fix issue in relation with deletes 2020-09-30 10:10:49 +00:00
nobody
48440e368c bug: undoing a like on a comment can remove the comment
(cherry picked from commit b999456bf16a5d457a16fab1299289cfb54bfed4)
2020-09-30 08:16:59 +02:00
Mario
a7bf07b864 5.0RC testing: fix uuid for likes/dislikes 2020-09-28 20:31:26 +00:00
Mario
a80e59812b RC5.0 testing: fix purge and some cleanup 2020-09-28 12:36:22 +00:00
Mario Vavti
3f784a974a deprecate \Zotlabs\Zot\Finger where apropriate 2020-09-26 15:05:16 +02:00
mjfriaza
5ce3565109 Update Spanish 2020-09-26 13:55:57 +02:00
Mario Vavti
b25054e891 if we do not have App::$poi here we would already have returned. No need to check here. 2020-09-25 13:47:40 +02:00
Mario Vavti
2c316c788e port mod chanview 2020-09-25 13:41:21 +02:00
Mario Vavti
2fe2cc5e65 5.0RC testing: channel is not set and not required here 2020-09-25 12:44:44 +02:00
Mario
5d6a7922c1 port mod gprobe
(cherry picked from commit d23e830955)
2020-09-23 16:35:03 +02:00
Mario
d23e830955 port mod gprobe 2020-09-23 14:28:04 +00:00
Mario
762de94900 5.0RC testing: comment out global remove
(cherry picked from commit 5edec37d57)
2020-09-23 14:16:33 +02:00
Mario
d938c79385 5.0RC testing: do not use intval() on hubloc_id_url
(cherry picked from commit 42ef6208c1)
2020-09-23 14:16:17 +02:00
Mario
987a369fec 5.0RC testing: update hublocs by hubloc_id_url of we mark it deleted or change primary to catch both zot and zot6 hublocs. only set the zot6 hubloc as primary.
(cherry picked from commit 6f508b81d6)
2020-09-23 14:15:47 +02:00
Mario
586e2ef2df 5.0RC testing: fix mod locs
(cherry picked from commit 81e2f73c98)
2020-09-23 14:15:31 +02:00
Mario
5edec37d57 5.0RC testing: comment out global remove 2020-09-23 12:14:16 +00:00
Mario
42ef6208c1 5.0RC testing: do not use intval() on hubloc_id_url 2020-09-23 11:50:30 +00:00
Mario
6f508b81d6 5.0RC testing: update hublocs by hubloc_id_url of we mark it deleted or change primary to catch both zot and zot6 hublocs. only set the zot6 hubloc as primary. 2020-09-23 11:44:10 +00:00
Mario
81e2f73c98 5.0RC testing: fix mod locs 2020-09-23 09:48:14 +00:00
Mario
be43d3e0fd 5.0RC testing: on channel removal mark both zot6 and zot xchans and hublocs deleted
(cherry picked from commit 60fd27eca4)
2020-09-23 11:19:17 +02:00
Mario
60fd27eca4 5.0RC testing: on channel removal mark both zot6 and zot xchans and hublocs deleted 2020-09-23 09:18:02 +00:00
Mario
ca4a3c3cc0 fix notifications html not reset on markRead()
(cherry picked from commit dfad87f674)
2020-09-23 09:44:37 +02:00
Mario
dfad87f674 fix notifications html not reset on markRead() 2020-09-23 07:43:35 +00:00
Mario
743e575701 changelog and use dbq() where apropriate in z6trans_connections()
(cherry picked from commit be627c3f3a)
2020-09-22 10:27:52 +02:00
Mario
be627c3f3a changelog and use dbq() where apropriate in z6trans_connections() 2020-09-22 08:23:28 +00:00
Mario
80fdf53cc3 5.0RC testing: Diagnostics app should point to mod zot_probe 2020-09-21 12:09:31 +00:00
Mario
759f297aae 5.0RC testing: provide hubloc_id_url for new created zot hublocs
(cherry picked from commit 1a41c44c2f)
2020-09-21 11:27:23 +02:00
Mario
1a41c44c2f 5.0RC testing: provide hubloc_id_url for new created zot hublocs 2020-09-21 09:14:39 +00:00
nobody
88b014e9a7 use channel index
(cherry picked from commit 846d30239d97091d1e6b56e923c1965471f6bbff)

(cherry picked from commit f422362747)
2020-09-21 10:37:57 +02:00
nobody
bd0b8d768e apply channel name changes to all associated xchans
(cherry picked from commit f2ac1e4b7d2aa4854ed08ded49b2ed2dd10fab59)

(cherry picked from commit 34217f5f90)
2020-09-21 10:37:41 +02:00
nobody
f422362747 use channel index
(cherry picked from commit 846d30239d97091d1e6b56e923c1965471f6bbff)
2020-09-21 10:35:56 +02:00
nobody
34217f5f90 apply channel name changes to all associated xchans
(cherry picked from commit f2ac1e4b7d2aa4854ed08ded49b2ed2dd10fab59)
2020-09-21 10:35:14 +02:00
Mario
56e503149d allow to show unchecked box if the value is 0 or false
(cherry picked from commit 04af502e3a)
2020-09-21 10:09:03 +02:00
Mario
04af502e3a allow to show unchecked box if the value is 0 or false 2020-09-21 08:06:57 +00:00
Mario
f2c1fd2a48 ÃRC1 2020-09-20 15:10:31 +00:00
Mario Vavti
a86fd554a3 adapt mod z6trans to point to util/z6convert.php in case anyone stumbles over outdated doco.
(cherry picked from commit c38fc0b906)
2020-09-20 17:04:34 +02:00
Mario Vavti
ef0a8bcde0 add z6convert.php
(cherry picked from commit 2758d3c3eb)
2020-09-20 17:01:22 +02:00
Mario Vavti
c38fc0b906 adapt mod z6trans to point to util/z6convert.php in case anyone stumbles over outdated doco. 2020-09-20 16:49:36 +02:00
Mario Vavti
2758d3c3eb add z6convert.php 2020-09-20 16:38:48 +02:00
Mario
521a5074c9 5.0RC testing: their_perms should be reset before they are recreated. Otherwise withdrawn permissions will not take effect locally.
(cherry picked from commit 9c8d732081)
2020-09-19 22:34:32 +02:00
Max Kostikov
430c48e828 Update Russian hmessages.po
(cherry picked from commit ba0410dd24)
2020-09-19 22:34:07 +02:00
Max Kostikov
2e747bec6f Update Russian hstrings.php
(cherry picked from commit da44cef9a3)
2020-09-19 22:33:46 +02:00
Max Kostikov
d945789e1b Boost DB conversion speed to Z6
(cherry picked from commit a9377d6a3f)
2020-09-19 22:33:05 +02:00
Max Kostikov
de306cd7b8 Missprint
(cherry picked from commit b223b71d0d)
2020-09-19 22:31:38 +02:00
Mario
aedde6600e Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-09-19 19:19:29 +00:00
Mario
9c8d732081 5.0RC testing: their_perms should be reset before they are recreated. Otherwise withdrawn permissions will not take effect locally. 2020-09-19 19:19:03 +00:00
Max Kostikov
5d1e10522f Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1874
2020-09-18 19:56:28 +02:00
Max Kostikov
ba0410dd24 Update Russian hmessages.po 2020-09-18 19:48:03 +02:00
Max Kostikov
da44cef9a3 Update Russian hstrings.php 2020-09-18 19:47:27 +02:00
Mario
e9227b0ffe Merge branch 'dev' into 'dev'
Boost DB conversion speed to Z6

See merge request hubzilla/core!1872
2020-09-18 13:43:02 +02:00
Max Kostikov
9299aff2af Boost DB conversion speed to Z6 2020-09-18 13:43:01 +02:00
Max Kostikov
a9377d6a3f Boost DB conversion speed to Z6 2020-09-17 23:25:55 +02:00
Max Kostikov
b223b71d0d Missprint 2020-09-17 19:49:30 +02:00
Max Kostikov
02cf85fa34 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!1
2020-09-17 19:47:44 +02:00
Mario
76a6e0b6fc bump dev version 2020-09-17 11:15:56 +00:00
Mario
2a2f032f17 update strings 2020-09-17 11:09:01 +00:00
Mario
e7ddd1a481 version 5.0RC 2020-09-17 10:57:24 +00:00
Mario
813ab2c5ed regenerate autoload file 2020-09-17 10:23:20 +00:00
Mario
4acdf9e817 deprecate $a variable for *_plugin_admin() and *_plugin_admin_post() 2020-09-16 09:16:27 +00:00
Mario
465da3a942 respect advanced profile setting in sexual preference selector - issue #1477 2020-09-14 07:41:20 +00:00
Mario
fb601cc280 Merge branch 'dev' into 'dev'
Support remote host cache directives on profile photo fetching

See merge request hubzilla/core!1871
2020-09-13 11:56:03 +02:00
Max Kostikov
25b9776bf6 Support remote host cache directives on profile photo fetching 2020-09-13 11:56:02 +02:00
Max Kostikov
5271232aa5 Fix variable name 2020-09-12 12:20:09 +02:00
Mario
7fa70108c4 whitespace 2020-09-11 12:19:24 +00:00
Mario
ff09b2131e disable community tags until we agree on how to implemnt this in zot6/activitypub 2020-09-11 12:11:09 +00:00
Max Kostikov
df758f40ef Avoid photo profile fetching more than once every 1 min 2020-09-09 11:11:52 +02:00
Max Kostikov
1d8dd949dc Update photo_driver.php 2020-09-08 22:50:59 +02:00
Max Kostikov
9dd333a2f4 Support remote host cache directives on profile photo fetching 2020-09-08 14:20:12 +02:00
Mario
d53b3b242d fix get_plink() for zot6 2020-09-04 18:56:21 +00:00
Mario
8e0e4b7b92 Merge branch 'dev' into 'dev'
Update of the .homeinstall folder

See merge request hubzilla/core!1869
2020-09-04 20:07:49 +02:00
Papa Dragon
adee24af6f Update of the home install setup script
- "hubzilla" replaced by "zotserver" in file names and file content when relevant
- Nginx can now be installed as the web server (Apache still chosen by default in the config file)
- Setup script now allows installation of multiple hub/instances on the same server
- Daily cron jobs script was updated an splitted : one global script launches shared commands
(SSL cert renewal + global backup on external device) and every instance has its own script for
git pull (individual scripts are launched by the global one)
2020-08-30 12:18:51 +02:00
Mario Vavti
1b161b0ee4 move z6trans_connections() to cron from cron daily 2020-08-26 21:13:32 +02:00
Mario Vavti
5aaa8f44a2 remove hublocs without a hubloc_hash and also remove hublocs where hubloc_id_url could not be fixed 2020-08-26 20:15:21 +02:00
Mario Vavti
1fbc6fa431 add check against null 2020-08-25 06:48:22 +02:00
Mario Vavti
6177ec9134 prefix table names 2020-08-24 20:31:59 +02:00
Mario Vavti
bd4867ef39 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-08-24 13:44:43 +02:00
Mario Vavti
0189d06375 provide some sort of feedback 2020-08-24 13:44:30 +02:00
Mario
aafdeb9000 Revert "more prefer zot6"
This reverts commit e9a264cb43
2020-08-24 11:26:52 +02:00
Mario Vavti
e9a264cb43 more prefer zot6 2020-08-24 11:18:47 +02:00
Mario Vavti
b996d82c5f prefer zot6 and also check for hubloc_deleted 2020-08-24 09:45:26 +02:00
Mario Vavti
c53794a8a2 an attempt to fix update 1238 for older hubs with broken xchan entries 2020-08-23 19:17:23 +02:00
Mario Vavti
170b2e4465 only show poke link if poke app is installed 2020-08-22 22:44:00 +02:00
Mario Vavti
4e0fc81e5d move cryptojs to addon 2020-08-22 22:14:29 +02:00
Mario
3b865d432f Revert "composer update pear/text_languagedetect"
This reverts commit 646dce7765
2020-08-22 21:32:06 +02:00
Mario Vavti
646dce7765 composer update pear/text_languagedetect 2020-08-22 20:01:59 +02:00
Mario Vavti
88a68f96da composer update html-to-markdown 2020-08-22 19:56:28 +02:00
Mario Vavti
32bdf42913 composer update htmlpurifier 2020-08-22 19:50:15 +02:00
Mario Vavti
53a010d1d4 bootstrap files 2020-08-22 19:41:57 +02:00
Mario Vavti
a9e19cb89e composer update bootstrap 2020-08-22 19:40:57 +02:00
Mario Vavti
4878611987 composer update jquery-file-upload 2020-08-22 19:36:43 +02:00
Mario Vavti
2c777acb25 composer update sabre libs 2020-08-22 19:31:29 +02:00
Mario Vavti
49df57df45 use the default setting and also add the mode to the cipher. aes-128 is to be preferred over aes-256 according to bruce schneier https://www.schneier.com/blog/archives/2009/07/another_new_aes.html#c386957 2020-08-21 10:55:55 +02:00
Mario Vavti
374c30999a whitespace 2020-08-20 22:51:19 +02:00
Mario Vavti
2ab480188a Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-08-20 22:47:53 +02:00
Mario Vavti
c4c47f7777 first cut on implementing additional encryption with the SJCL library. aes only and no backward compatibility. 2020-08-20 22:47:33 +02:00
Mario
c36b2ca915 be more clear in comment 2020-08-20 08:53:58 +00:00
Mario
e55a1a6aa8 fix item deletion 2020-08-20 08:43:13 +00:00
Mario
21e5b05b14 Merge branch 'dev' into 'dev'
issue with DAV - moveInto and variable scope

See merge request hubzilla/core!1868
2020-08-17 20:40:41 +02:00
nobody
ea845aeacd issue with DAV - moveInto and variable scope 2020-08-16 16:29:00 -07:00
nobody
ee3b077f26 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-08-16 16:28:17 -07:00
Mario Vavti
393cee6619 $id is expected to be an array with a calendarId and an instanceId for caldav 2020-08-15 13:17:04 +02:00
Mario
d9196bb82a Merge branch 'dev' into 'dev'
update profile|cover photo activities converted to z6

See merge request hubzilla/core!1865
2020-08-05 19:13:44 +02:00
Zot
5ecbbfc7df update profile|cover photo activities converted to z6 2020-08-05 19:13:44 +02:00
nobody
9244ee8094 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-08-04 16:26:44 -07:00
nobody
0b7ca61958 update profile|cover photo activities converted to z6 2020-08-04 16:25:33 -07:00
Mario
c56b140387 Ãthis should not be required anymore 2020-08-03 19:51:03 +00:00
Mario
3e7d3a20af css fix 2020-07-31 09:37:59 +00:00
Mario
2d2cab0aba event display zot/zot6 compatibility 2020-07-31 08:41:18 +00:00
Mario
364346b07c syntax 2020-07-30 19:22:02 +00:00
Mario
be15a395d8 use cursor-pointer for the lock 2020-07-30 12:32:00 +00:00
Mario
845f7e9382 add new lock icon as svg 2020-07-30 09:59:25 +00:00
Mario
976d6baf6a use the compact view in html2plain() 2020-07-30 08:48:02 +00:00
Mario
f9271bb0bd Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-07-30 08:22:01 +00:00
Mario
06f03eb13a respect notifications settings 2020-07-30 08:21:43 +00:00
Mario
1a1c0ca72c Merge branch 'dev' into 'dev'
Add minimum form displaying time before login

See merge request hubzilla/core!1863
2020-07-30 09:26:30 +02:00
Mario
73f2db09ae Merge branch 'dev' into 'dev'
foreach warning and a minor update to util/zotsh

See merge request hubzilla/core!1864
2020-07-30 09:19:32 +02:00
Mario
be533679dd raise cache lifetime - this should probably be configurable 2020-07-30 06:56:25 +00:00
Mario
e31903cbc9 add some context to the notifications 2020-07-29 19:53:00 +00:00
Mario
33d417955d version 2020-07-26 07:47:52 +00:00
Mario
9f0f794a0a whitespace 2020-07-26 07:46:22 +00:00
Mario
33e4d7c0d8 fix hubloc_id_url for activitypub with broken xchan_url 2020-07-26 07:45:20 +00:00
Mario
ad30834123 version 2020-07-26 07:31:05 +00:00
Mario
fba64e9451 improve profile detection and reduce feed result set 2020-07-26 07:16:06 +00:00
Mario
9b5e270379 tool to fix missing hubloc_id_url entries 2020-07-24 20:46:55 +00:00
Mario
ea5131db88 construct hubloc_id_url for imported legacy zot hublocs 2020-07-24 20:44:55 +00:00
zotlabs
7ae86d29d2 add api_verify to api_zot 2020-07-22 16:23:38 -07:00
zotlabs
13ff9a897d foreach warning 2020-07-22 16:20:36 -07:00
Max Kostikov
4db38ec64a Add minimum form displaying time before login 2020-07-21 23:59:26 +02:00
Mario
29c5a65e8f reset bParam_page in case of failure 2020-07-21 19:25:37 +00:00
Mario
dd2ffae8bf Revert "zot6 testing"
This reverts commit 4f95b44ff2.
2020-07-21 19:08:03 +00:00
Mario
ca969cd0ed those are not lÃikely to be parents 2020-07-21 17:54:14 +00:00
Mario
4f95b44ff2 zot6 testing 2020-07-21 17:29:40 +00:00
Mario
cb7aec0da5 slightly raise cache lifetime 2020-07-21 09:10:31 +00:00
Mario
62eebc86f6 no need to iterate the object twice 2020-07-21 09:09:41 +00:00
Max Kostikov
5ea7196e78 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!1
2020-07-19 14:58:19 +02:00
Mario
fcc47e69e4 do not cache single thread pages 2020-07-16 11:59:35 +00:00
Mario
d2f1c37431 more itemspage work 2020-07-16 10:49:08 +00:00
Mario
817fe8d485 version 2020-07-16 10:14:09 +00:00
Mario
1dbd85322d an attempt to improve lazy loading 2020-07-16 10:13:26 +00:00
Mario
fe90096ace bump zot revision to 6.0 std version to 4.7.9 2020-07-14 12:51:31 +00:00
Mario
ad60309187 minor adjustion 2020-07-14 12:48:21 +00:00
Mario
634a515ec1 reduce result sets and work around a regression in justifiedGallery 2020-07-14 12:43:34 +00:00
Mario
01abb82c37 prefer zot6 sys channel 2020-07-14 09:36:10 +00:00
Mario
1c88a8d4a0 Merge branch 'dev' into 'dev'
z6 work

See merge request hubzilla/core!1862
2020-07-14 09:24:11 +02:00
Mario
ce77f82966 more zot6 2020-07-13 20:52:15 +00:00
Mario
573af9e366 fix embeded shares 2020-07-13 18:59:23 +00:00
Mario
774cc852d4 fix php warning 2020-07-13 09:18:11 +00:00
zotlabs
c0735a5ca2 z6trans: don't swap xprof xchans on directory servers because it will fail with duplicate primary key in many cases and the migration will fail on each channel. What this means is that directory servers may take time to pick up zot6 entries if they haven't received them prior to the upgrade. I don't see an easier solution unless we check for existence of the zot6 xchan_hash in the xprof table before converting it. 2020-07-12 19:16:37 -07:00
zotlabs
fa752b0ac1 zot6 group updates to support edit and delete of top-level group posts. This is supported remotely by editing or removing the post that started it all. A W2W post can only be deleted at this time. 2020-07-12 19:06:24 -07:00
Mario
3f69fc70f1 sbom add jquery 2020-07-05 07:55:21 +00:00
Mario
137f56f994 only redirect to known sites 2020-06-19 08:18:43 +00:00
Mario
e2cbcf7039 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-06-18 19:40:18 +00:00
Mario
64f8df0a0d looks like fullcalendar now requires a date object instead of a string 2020-06-18 19:40:00 +00:00
Mario
274d556ec1 add a title 2020-06-18 10:46:45 +02:00
Mario
f28c3b441e start a software bill of materials - this is work in progress 2020-06-18 08:39:06 +00:00
Mario
4eaa893e0b Merge branch 'dev' into 'dev'
zap group support

See merge request hubzilla/core!1859
2020-06-17 09:12:15 +02:00
Zot
36e969fd79 zap group compatibility - rewrites DMs and wall-to-wall posts to group pages as new posts authored by the group with an embedded reshare. This currently has known delivery issues due to zot/zot6 xchan confusion which are already slated for resolution in hz5. Specifically "sender is not owner/author" and missing abconfig permissions on the zot6 identity for a channel we're connected with over traditional zot. 2020-06-17 09:12:15 +02:00
Mario
d8f16960c8 Merge branch 'dev_homeinstall_reminder' into 'dev'
Dev homeinstall reminder

See merge request hubzilla/core!1860
2020-06-17 09:08:20 +02:00
OJ Random
101a7648ee Dev homeinstall reminder 2020-06-17 09:08:20 +02:00
Mario
70a104f24f upÃdate copperjs to version 1.5.7 2020-06-16 07:32:55 +00:00
Mario
0f27db6271 uodate justified-gallery to version 3.8.1 2020-06-15 09:35:39 +00:00
Mario
56ec55110a update fullcalendar to version 4.4.2 2020-06-15 08:19:13 +00:00
Mario
570497071d Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-06-15 07:04:40 +00:00
Mario
49dee6312f new file 2020-06-15 07:02:18 +00:00
Mario
63a6b4a162 composer update commerceguys/intl 2020-06-15 07:01:35 +00:00
Mario Vavti
ec4dea0920 zot6 does not appear to use zfinger 2020-06-14 18:47:18 +02:00
Mario Vavti
7270da6a28 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-06-14 15:39:00 +02:00
Mario Vavti
8cd66145bd fix discovery 2020-06-14 15:38:44 +02:00
Mario
92ee27349c check for zot6 first 2020-06-14 13:35:17 +00:00
Mario
a88233a045 composer update jquery-file-upload 2020-06-13 12:01:27 +00:00
Mario
0259130cf3 update jquery to version 3.5.1 2020-06-13 11:18:57 +00:00
Mario
d0a1f0b8f9 revert additional top border 2020-06-13 11:18:26 +00:00
Mario
97dd350c61 css fixes due to bootstrap update 2020-06-13 11:13:47 +00:00
Mario
dc3b09c8f3 composer update bootstrap 2020-06-13 10:00:50 +00:00
Mario
c8c4513af9 Merge branch 'dev' into 'dev'
allow apps to be both pinned and starred independently

See merge request hubzilla/core!1858
2020-06-11 12:13:44 +02:00
Zot
3201a4bec5 allow apps to be both pinned and starred independently 2020-06-11 12:13:43 +02:00
Mario
9da8e30c37 Merge branch 'fix-invite-code-deletion' into 'dev'
Fix invite code deletion

See merge request hubzilla/core!1857
2020-06-01 14:46:47 +02:00
Keenan Pepper
6bfac1a907 Fix bug allowing invite codes to be reused unlimited times
The invite codes aren't deleted from the DB because of a malformed query.
2020-05-27 13:52:38 -07:00
Mario
d0c7c99d5e use strip_tags() on rss titles 2020-05-18 11:06:46 +00:00
Mario
934bcf5336 comment out code which is only required for loggingà 2020-05-18 08:46:30 +00:00
Mario
5b88873530 re-enable time logging 2020-05-18 07:33:32 +00:00
Mario
b161b02c51 bump version 2020-05-18 07:29:41 +00:00
Mario
ddc544e00a add images load status to spinnner if preload images is enabled 2020-05-18 07:28:25 +00:00
Mario
97d5ffe056 wrong path 2020-05-16 08:44:24 +00:00
Mario Vavti
13319985fd uuid for likes 2020-05-15 19:28:03 +02:00
Mario
e3aaa39f9e Revert "uuid for likes"
This reverts commit b6efb02ed2.
2020-05-15 15:26:05 +00:00
Mario
b6efb02ed2 uuid for likes 2020-05-15 15:08:57 +00:00
Mario
c358d8326e whitespace 2020-05-15 13:16:07 +00:00
Mario
f40fedcad6 rewriting the author for legacy compatibility only if author is from this site and add comment. 2020-05-15 12:40:06 +00:00
Mario
b4973ede44 rewriting the owner for legacy compatibility should be sufficient 2020-05-15 12:11:35 +00:00
Mario
81338e8086 use zot_record_preferred() when fetching keys 2020-05-15 10:10:07 +00:00
Mario
4270e17bc4 implement notifications for direct messages 2020-05-14 09:27:39 +00:00
Mario
1329662edc use dbq() in update 1238 2020-05-12 09:13:59 +00:00
Mario
249427365b bump version 2020-05-12 09:08:56 +00:00
Mario
326644104c really fix update for postgres 2020-05-12 08:56:05 +00:00
Mario
1520a26e0f fix update for postgres 2020-05-12 08:34:35 +00:00
Mario
6ffdc1b642 update file 2020-05-12 08:29:54 +00:00
Mario
22d8523e76 DB update 1238 to fix hubloc_id_url for existing hublocs and set hubloc_id_url in Activity::actor_store() 2020-05-12 08:23:41 +00:00
Mario
2d3740b912 Legacy Hubzilla compatibility: when we relay a comment from hubzilla < 4.0, we send it to ourself again but this time with a valid uri as mid. To catch this as duplicate, we need to check for the basename aswell. 2020-05-11 20:22:25 +00:00
Mario
c8ab5db768 Merge branch 'dev' into 'dev'
Dev

See merge request hubzilla/core!1856
2020-05-11 19:54:22 +02:00
zotlabs
c656478230 issue with quoted hashtags/mentions 2020-05-10 16:13:01 -07:00
Mario
3d02758fee deal with diaspora uuid 2020-05-10 10:55:57 +00:00
Mario
f473b5abfb as_vid_sort -> vid_sort 2020-05-10 07:53:21 +00:00
Mario
22d68ddf08 it looks like this was required at some point but is not required anymore for our autocomplete to work as expected. fixes #1463 2020-05-08 12:21:06 +00:00
Mario
2cba88f1eb new files 2020-05-07 21:49:08 +00:00
Mario
f132436af3 composer updates 2 2020-05-07 21:48:26 +00:00
Mario
fae70bf0a7 Revert "composer updates"
This reverts commit dbfe748d27
2020-05-07 23:35:02 +02:00
Mario
ffd2faf8a0 Revert "add new files"
This reverts commit c76ff4249e
2020-05-07 23:34:41 +02:00
Mario
64a8913385 tests: more declare return type 2020-05-07 21:00:49 +00:00
Mario
266dcd44bb tests: declare return type 2020-05-07 20:49:52 +00:00
Mario
8851921d6d bump php version to 7.3 for gitlab-ci 2020-05-07 20:36:45 +00:00
Mario
c76ff4249e add new files 2020-05-07 15:23:30 +00:00
Mario
dbfe748d27 composer updates 2020-05-07 15:22:25 +00:00
Mario
4ee809bed6 fix tests 2020-05-07 08:31:31 +00:00
Mario
4ebf6cda5d remove more traces of the premium channel app 2020-05-07 08:06:38 +00:00
Mario
a04b6d178b deprecate premium channel app 2020-05-07 07:55:05 +00:00
Mario
c8b45c3449 channelx caching 2020-05-07 06:57:33 +00:00
Mario
1bb74a5a01 css 2020-05-06 19:59:21 +00:00
Mario
ef94072cee Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-05-06 19:56:47 +00:00
Mario
ff3ff2478d allow to set different values for left and right aside width in $theme.php 2020-05-06 19:56:37 +00:00
Mario
2757822cd8 Merge branch 'dev' into 'dev'
Issue generating photo thumbnails when uploaded via davfs

See merge request hubzilla/core!1855
2020-05-06 11:00:30 +02:00
Zot
2cb0cade7b Revert "issue generating photo thumbnails when uploaded via davfs"
This reverts commit 7a0d9a4494.
2020-05-06 11:00:29 +02:00
zotlabs
191e01e3ec re-apply after removing from cherry-picked git hash from wrong branch 2020-05-05 20:01:09 -07:00
zotlabs
8c65e9cb4a Revert "issue generating photo thumbnails when uploaded via davfs"
This reverts commit 7a0d9a4494.
2020-05-05 19:59:22 -07:00
zotlabs
79968ea07a Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-05-05 19:42:00 -07:00
zotlabs
7a0d9a4494 issue generating photo thumbnails when uploaded via davfs 2020-05-05 19:39:09 -07:00
Mario
06d1cf83d2 deal with polls and votes in enotify 2020-05-05 14:51:00 +00:00
Mario
de058901c2 catch the owner_xchan for activity_share items in notifications filter 2020-05-05 07:40:24 +00:00
Mario
a40b882d72 typo 2020-05-04 09:26:06 +00:00
Mario
46242aeaae display complete perminfo only to owner 2020-05-04 09:24:22 +00:00
Mario
ad040a0b11 set CURLOPT_ENCODING in z_post_url() 2020-05-04 07:44:19 +00:00
Mario
4eaba326ce version 4.7.6 2020-05-03 12:33:42 +00:00
Mario
fd48f9d173 improve functionality of combined notification filters 2020-05-03 12:31:10 +00:00
Mario
104c45f6e6 Merge branch 'dev' into 'dev'
Display delayed posts on author's channel page

See merge request hubzilla/core!1854
2020-05-02 17:28:49 +02:00
Max Kostikov
f4a71db42d Display delayed posts on author's channel page 2020-05-02 17:28:49 +02:00
Mario
1ac2b93fd8 Merge branch 'iss1457' into 'dev'
stress the importance of  PHP mail()

See merge request hubzilla/core!1852
2020-05-02 17:27:40 +02:00
Mario
03c1419ad0 missing lib include 2020-05-02 11:48:11 +00:00
Mario
18938280f5 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-05-01 10:24:13 +00:00
Mario
01334d761a set CURLOPT_ENCODING to empty string so that compressed content will be uncompressed 2020-05-01 10:24:00 +00:00
Max Kostikov
446204f7d8 Merge branch 'dev' into 'dev'
Force browser photo revalidation

See merge request hubzilla/core!1853
2020-04-29 14:44:42 +02:00
Max Kostikov
328900cf3b Force browser photo revalidation 2020-04-29 14:38:11 +02:00
Mario
837dbb7a14 Ãfix photo items 2020-04-29 11:10:54 +00:00
Mario
c9794439bc adjust code comments and whitespace 2020-04-29 08:24:00 +00:00
Mario
079c13e633 more work on attach_store_item() 2020-04-29 08:21:33 +00:00
OJ Random
7b8c85cf3f stress the importance of PHP mail() 2020-04-27 09:59:17 +02:00
Mario
c229f058b4 fix mod filestorage and fetch the info from attach if only the hash is provided in attach_store_item() 2020-04-25 09:15:20 +00:00
Mario
e2b10f52e0 more work on deprecating ACTIVITY_OBJ_FILE and adapt mod sharedwithme 2020-04-24 14:25:49 +00:00
Mario
2b8afd5580 fix file notifications 2020-04-23 19:38:19 +00:00
Mario
7e89d816d7 more work on deprecating ACTIVITY_OBJ_FILE 2020-04-23 19:14:43 +00:00
Mario
77c87bcccf default item_wall to 0 2020-04-23 18:21:38 +00:00
Mario
b7a655917e some work on deprecating ACTIVITY_OBJ_FILE 2020-04-23 18:19:25 +00:00
Mario
d8bfa5dd96 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-04-22 18:15:38 +00:00
Mario
88eb19165b the parent id is required later in the process 2020-04-22 18:15:02 +00:00
Mario
2828b8cf5c Merge branch 'dev_homeinstall' into 'dev'
fixes for real installation for debian 10

See merge request hubzilla/core!1851
2020-04-22 14:18:50 +02:00
Mario
b1b9dbe55f more prefer zot6 over zot 2020-04-22 07:44:51 +00:00
Mario
579adb4897 fix onepoll 2020-04-21 09:42:40 +00:00
OJ Random
a9d52cd296 fixes for real intallation for debian 10 2020-04-20 17:56:52 +02:00
Mario
c71422e909 add the spec folder 2020-04-20 15:53:43 +00:00
Mario
03506bd6cf use $mid as plink to prevent to long plinks 2020-04-20 11:58:08 +00:00
Mario
244936b0fd some work on improving federation of item_private and make sure we deal with an array in array_path_exists() 2020-04-20 09:34:00 +00:00
Mario
f430a24fa3 missing lib import 2020-04-19 14:24:52 +00:00
Mario
ecb1c78173 make sure $post_tags is defined somewhere outsite a clause to prevent PHP warnings 2020-04-19 14:17:00 +00:00
Mario
42631b5943 revert 2020-04-18 14:22:40 +00:00
Mario
109f9eed61 just fetch the info we need 2020-04-18 14:09:08 +00:00
Mario
c7fdc53795 more do not include hublocs with no hubloc_id_url 2020-04-18 13:59:30 +00:00
Mario
602ca91700 remove debug code 2020-04-18 13:17:37 +00:00
Mario
4cfc0b1a64 de-duplicate $post_tags 2020-04-18 12:19:34 +00:00
Mario
3d5fdd086b only return hublocs with hubloc_id_url set 2020-04-18 11:30:19 +00:00
Mario
223c4c7b9a implement addressing and fix conversation fetching 2020-04-18 09:23:48 +00:00
Mario
f7e925beaa Revert "keychange and request packets via zot6"
This reverts commit 9d0f71bfcb
2020-04-16 12:33:02 +02:00
Mario
e588ea8a8b fix notification filtering 2020-04-15 15:39:33 +00:00
Mario
91cad21d33 fetch the item for asld in Lib/Share. This probably fixes addons issue #146 2020-04-15 11:56:56 +00:00
Mario
d6b9c8b93d Ãfix php warning 2020-04-15 08:43:28 +00:00
Mario
a7273668d8 Merge branch 'dev' into 'dev'
Remove unnecessary [summary] tag processing

See merge request hubzilla/core!1850
2020-04-15 10:22:54 +02:00
Max Kostikov
b1f74f4ef4 Remove unnecessary [summary] tag processing 2020-04-15 10:22:54 +02:00
Mario
c640d1c599 Merge branch 'dev' into 'dev'
event issue when using strict sql mode

See merge request hubzilla/core!1849
2020-04-15 10:22:31 +02:00
Mario
9d0f71bfcb keychange and request packets via zot6 2020-04-15 08:21:07 +00:00
Max Kostikov
bbca6be0f9 Update Item.php 2020-04-12 23:08:11 +02:00
Max Kostikov
31e1e9cbfb Remove unnecessary [summary] tag processing 2020-04-12 21:41:32 +02:00
Mario
6de823b532 discover_feed() does not exist yet 2020-04-12 08:59:42 +00:00
Mario
69878ed628 handle some basic friendica attachment bbcodes 2020-04-12 07:54:22 +00:00
Mario
27ae9c9d34 just comment out is_edit_activity() call and add comments on why it is commented out 2020-04-12 07:35:17 +00:00
Mario
52e698cae6 function is_edit_activity() is obsolete 2020-04-12 07:05:01 +00:00
zotlabs
6a0ac591d1 event issue when using strict sql mode 2020-04-10 14:27:20 -07:00
Mario
328685d2fb move from build_sync_packet() to Libsync::build_sync_packet() 2020-04-09 09:38:36 +00:00
Mario
806c738923 remove voting from UI in favour of polls 2020-04-08 18:41:54 +00:00
Mario
9c2d48bcd4 update 1236: we have seen situations in the wild where a zot6 xchan was present while its hubloc was missing. fix those separately if required so that we cover both situations. 2020-04-08 12:20:44 +00:00
Max Kostikov
d8802e4fc8 Merge branch 'dev' into 'dev'
Fix process id disclouse

See merge request hubzilla/core!1848
2020-04-08 11:40:32 +02:00
Max Kostikov
2c8a243ece Merge branch 'dev' into 'dev'
# Conflicts:
#   Zotlabs/Daemon/Expire.php
2020-04-08 11:34:29 +02:00
Max Kostikov
3372fb0761 Fix process id disclouse 2020-04-08 11:31:17 +02:00
Mario
af7a31cd14 owa: look for zot6 first 2020-04-06 12:12:44 +00:00
Mario
cb2996a40c another import fix and do not allow importing channels < version 4.7.4 for zot6 compatibility reasons 2020-04-05 15:00:08 +00:00
Mario
ea237a97a1 more mod import fixes 2020-04-05 11:37:42 +00:00
Mario
530b1d038f fix mod import 2020-04-05 11:19:12 +00:00
Mario
a31981966e fix warning if iconfig value is an array 2020-04-05 09:29:23 +00:00
Mario
84183d9f7e show event timezone only if adjust ist set and the offset of the event timezone is different from the channel default timezone offset 2020-04-05 09:11:12 +00:00
Mario
805f8bf983 show event timezone if it differs from the channel default timezone 2020-04-05 07:59:41 +00:00
Mario
67c9b5d049 fix unseen forum posts count 2020-04-05 06:47:12 +00:00
Mario
44b935f875 another attempt to get events right 2020-04-04 15:41:58 +00:00
Mario
cade25a112 Revert "more timezone changes"
This reverts commit cec2e92fe3
2020-04-03 22:01:44 +02:00
Mario
a4831b0f7c Revert "use timezone info for timezone display only- the actual time is in utc already."
This reverts commit 625438ff64
2020-04-03 22:01:24 +02:00
Mario
ec9418b262 Revert "set timezone iconfig a little earlier in the process so that it will be included in the object"
This reverts commit 6cfaa5cba3
2020-04-03 22:01:02 +02:00
Mario
cec2e92fe3 more timezone changes 2020-04-03 19:50:50 +00:00
Mario
625438ff64 use timezone info for timezone display only- the actual time is in utc already. 2020-04-03 19:22:31 +00:00
Mario
6cfaa5cba3 set timezone iconfig a little earlier in the process so that it will be included in the object 2020-04-03 18:34:15 +00:00
Mario
31fea1014e Merge branch 'dev' into 'dev'
fix app links in DB when doing a site rename

See merge request hubzilla/core!1846
2020-04-03 10:51:34 +02:00
Mario
898fea1e0e Merge branch 'dev' into 'dev'
Avoid multiple run of expiry procedure on large sites

See merge request hubzilla/core!1847
2020-04-03 10:49:57 +02:00
Max Kostikov
4b3979df04 Avoid multiple run of expiry procedure on large sites 2020-04-03 10:49:57 +02:00
Mario
ac52bebb88 ATOM_TIME format is not compatible with the DB 2020-04-02 12:33:57 +00:00
Mario
c568f7b8d1 bump version 2020-04-01 18:22:33 +00:00
Mario
d925ec6759 fix outgoing mails to zot connections 2020-04-01 18:13:00 +00:00
Max Kostikov
c136c142b8 Use config instead pconfig 2020-04-01 12:59:12 +02:00
Mario
38be2386dd cheat with guid_sig to reflect transition to zot6 and re-enable transition of connections 2020-04-01 09:26:27 +00:00
Mario
643b2f9205 do not enable transition of connections yet 2020-04-01 08:03:19 +00:00
Mario
ffe429be65 transition connections to zot6 if their site has been updated 2020-04-01 07:44:07 +00:00
Max Kostikov
4a56b77f64 Use pconfig 2020-03-31 21:00:21 +02:00
Max Kostikov
9773ab7aab Use POSIX kill 0 to check expire process status 2020-03-31 20:45:15 +02:00
Max Kostikov
6c02fa40f1 Check if POSIX PHP module is available on PID check 2020-03-31 20:15:09 +02:00
Max Kostikov
632996f53e Add check if expire procedure is still running 2020-03-31 20:03:29 +02:00
Max Kostikov
710448e73f Update Expire.php 2020-03-31 19:58:08 +02:00
Max Kostikov
084177a20c Avoid multiple run of expiry procedure on large sites 2020-03-31 19:57:05 +02:00
Max Kostikov
5a2c62466e Merge branch 'dev' into 'dev'
Sync dev

See merge request kostikov/core!2
2020-03-31 19:54:20 +02:00
Mario
b739f91caa use Libsync::build_sync_packet() in mod item, default Lib/Queue driver to zot6 and some whitespace cleanup in queue_deliver() 2020-03-29 15:18:49 +00:00
Mario
b1590ad645 fix check for existing hublocs 2020-03-29 10:47:22 +00:00
Mario
f49010bb12 port fhublocs to zot6 and fix issue with primary detection 2020-03-29 08:33:42 +00:00
Mario
6e1c3b6d48 Merge branch 'z6connect' into 'dev'
Transition to zot6

See merge request hubzilla/core!1823
2020-03-28 11:12:22 +01:00
Mario
bcdd75b817 prevent mod fhublocs breaking things. it needs porting to zot6 but has no priority for now. 2020-03-28 09:29:49 +00:00
Mario
0271f2a1ae fix z6_discover() to do the right thing after transition 2020-03-26 08:14:20 +00:00
Mario
0c1c386a0a do not use channel_portable_id in process_channel_sync_delivery(). we should only accept sync packages from channels which are already transitioned to zot6. 2020-03-25 11:29:00 +00:00
zotlabs
a3acec9674 issue 1454 - some photo item ActivityStreams links not returning json-ld; requires related fixes in addons/pubcrawl 2020-03-24 18:26:20 -07:00
Mario
4eaddd1279 do not sync with incompatible hubs 2020-03-24 08:32:37 +00:00
Mario
eb3dbcce7b one more typo 2020-03-16 22:04:28 +00:00
Mario
3ecf1cab5e typo 2020-03-16 21:55:59 +00:00
Mario
c536526196 Update 1236 and bump version to 4.7.4 2020-03-16 20:12:30 +00:00
Mario
b2de12442d wrong variable 2020-03-13 19:32:59 +00:00
zotlabs
8f5cb0c45a Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-03-12 17:55:35 -07:00
Mario
3b4503c971 use xchan_guid_sig instead of channel_guid_sig since it slightly differs depending on *default* protocol 2020-03-12 19:09:34 +00:00
Mario
c358aa2806 first batch of zot6 transition patches. basic communication with transitioned channels *should* work now 2020-03-12 18:27:16 +00:00
zotlabs
938d26ba3e fix app links in DB when doing a site rename 2020-03-11 15:18:33 -07:00
Mario
b23751128b port create_identity() to zot6 2020-03-11 10:43:19 +00:00
Mario
d54ff4fae5 Merge branch 'dev' into z6connect 2020-03-11 10:35:05 +00:00
Mario
720d3dcedc z6trans preparation for db update 1236 2020-03-11 10:34:25 +00:00
Mario
ce4fc30439 use 24h time format 2020-03-06 10:11:10 +00:00
Mario
b39474456f Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-03-06 09:51:10 +00:00
Mario
25cd9b4983 provide tool to transform channels to zot6. WARNING: transformed channels will not yet be functional without additional patches. 2020-03-06 09:50:53 +00:00
Max Kostikov
2d65ce542c Merge branch 'dev' into 'dev'
Dev

See merge request hubzilla/core!1845
2020-03-06 10:42:17 +01:00
Max Kostikov
c2b691fd01 Translate 'vote' button text 2020-03-06 10:33:25 +01:00
Max Kostikov
ae691bdc7c Merge branch 'dev' into 'dev'
Sync dev

See merge request kostikov/core!1
2020-03-06 10:26:19 +01:00
Mario
ba566fd64b Merge branch 'dev' into z6connect 2020-03-02 09:50:11 +00:00
Max Kostikov
85c07d57fe Merge branch 'dev' into 'dev'
rework img alt text - preserve legacy bbcode

See merge request hubzilla/core!1844
2020-03-01 16:23:24 +01:00
zotlabs
16fd618380 rework img alt text - preserve legacy bbcode 2020-02-29 13:08:16 -08:00
Mario
06f2979e04 prevent duplicate votes 2020-02-29 10:25:22 +00:00
Mario
1ff9d1afdd Merge branch 'dev' into 'dev'
alt attribute for images

See merge request hubzilla/core!1843
2020-02-29 11:15:55 +01:00
zotlabs
a776f69a59 alt attribute for images 2020-02-28 14:31:49 -08:00
Mario
a574290235 poll UI strings 2020-02-28 13:22:30 +00:00
Mario
84c9ae04fc Merge branch 'wiki-link-titles' into 'dev'
Allow wiki link titles

See merge request hubzilla/core!1842
2020-02-28 12:23:01 +01:00
BattleMage
c74c41c3b8 Allow wiki link titles
Allow linking to wiki pages with alternating titles by separating the
title from the link with a pipe, like regular wiki markup does.
2020-02-28 10:31:07 +01:00
Mario
7cf73e0533 Merge branch 'dev' into 'dev'
add iconfig to zot6 objects

See merge request hubzilla/core!1835
2020-02-27 10:22:48 +01:00
Mario
03e9ed71b4 version 4.7.3 2020-02-27 09:22:06 +00:00
Mario
e7e79f7423 bump version 2020-02-27 08:38:01 +00:00
Mario
589af1f9ee Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-02-26 09:51:56 +00:00
Mario
e7f25b8466 implement poll UI in jot 2020-02-26 09:51:40 +00:00
Max Kostikov
2100441b54 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1839
2020-02-26 00:17:58 +01:00
Max Kostikov
082826ee44 Update hstrings.php 2020-02-26 00:12:57 +01:00
Max Kostikov
93ad3eb6f1 Update hmessages.po 2020-02-26 00:12:23 +01:00
Max Kostikov
177209b5e9 Merge branch 'dev' into 'dev'
Fix missprint in Russian translation

See merge request hubzilla/core!1838
2020-02-25 21:43:48 +01:00
Max Kostikov
47d80df81c Update hmessages.po 2020-02-25 21:38:33 +01:00
Max Kostikov
3d6fa049da Update hstrings.php 2020-02-25 21:37:49 +01:00
Max Kostikov
16738dfe7f Merge branch 'dev' into 'dev'
Minor cdav related changes

See merge request hubzilla/core!1836
2020-02-24 12:10:00 +01:00
Max Kostikov
c28ba4be37 Update cdav import parameters comment 2020-02-24 11:39:26 +01:00
Max Kostikov
8bcdc24fcb Code reuse 2020-02-24 11:38:23 +01:00
Mario
b36eb9a91c Merge branch 'dev' into 'dev'
Implement DAV calendars sync with clones

See merge request hubzilla/core!1834
2020-02-24 10:02:09 +01:00
Max Kostikov
989fbe70cd Implement DAV calendars sync with clones 2020-02-24 10:02:09 +01:00
zotlabs
85cf25a2a8 add iconfig to zot6 objects 2020-02-23 15:28:16 -08:00
Mario
7bb94f9993 Merge branch 'patch-20200221a' into 'dev'
Fix: hang on too few items

See merge request hubzilla/core!1832
2020-02-23 14:40:18 +01:00
M. Dent
1297c8d2ae Fix: hang on too few items 2020-02-23 14:40:18 +01:00
Mario
ed28ef185e polls can also appear in shares 2020-02-23 08:45:39 +00:00
Mario
9d97cc2a1d implement optional events and polls filter 2020-02-21 10:44:26 +00:00
Mario
23acf02d58 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-02-20 21:25:52 +00:00
Mario
60311eb04b fix warning 2020-02-20 21:25:41 +00:00
Mario
b9a8b9e47b Merge branch 'dev' into 'dev'
Implement CardDAV address book sync with clones

See merge request hubzilla/core!1829
2020-02-20 20:03:50 +01:00
Max Kostikov
b7bac45427 Revert "Use argv() instead URI parsing"
This reverts commit bcfb69eeeef6a0506a0ec0574a03b673df84a55a
2020-02-20 20:03:50 +01:00
Mario
7d05b8e5fd vote issue 2020-02-20 17:16:14 +00:00
Mario
d5ae9aedc4 remove unused images 2020-02-13 10:38:47 +01:00
Max Kostikov
1b216e6019 Merge branch 'dev' into 'dev'
issue with multi-line poll elements

See merge request hubzilla/core!1831
2020-02-13 08:33:20 +01:00
zotlabs
83256c9ccd issue with multi-line poll elements 2020-02-12 14:17:28 -08:00
Mario
9f029336ca fix notifications for polls 2020-02-11 09:20:32 +00:00
Mario
95476cf33c Merge branch 'dev' into 'dev'
this allows polls to federate from hubzilla to zap, though still a remaining issue with voting

See merge request hubzilla/core!1830
2020-02-11 07:55:34 +01:00
zotlabs
bf7c96807a fix poll responses 2020-02-10 18:17:41 -08:00
zotlabs
d4a6aa7801 this allows polls to federate from hubzilla to zap, though still a remaining issue with voting 2020-02-10 15:34:33 -08:00
zotlabs
b767bda410 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-02-10 14:38:28 -08:00
Mario
a39d436f9f poll fixes 2020-02-10 20:37:35 +00:00
Mario
50dbe1e62d Merge branch 'dev' into 'dev'
poll updates

See merge request hubzilla/core!1828
2020-02-10 12:25:11 +01:00
zotlabs
be81a40b2b Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-02-09 16:33:12 -08:00
zotlabs
bbcb237f5b poll updates 2020-02-09 16:32:18 -08:00
Mario
33be244d8a Merge branch 'patch-1' into 'dev'
Add 'hook call' to be used for new addon 'NavBanner_options'

See merge request hubzilla/core!1827
2020-02-07 11:24:01 +01:00
Voryzen
ca75619518 Add 'hook call' to be used for new addon 'NavBanner_options' 2020-02-07 11:24:01 +01:00
Max Kostikov
82acfb75a1 Merge branch 'dev' into 'dev'
missing piece of poll code

See merge request hubzilla/core!1826
2020-02-05 14:28:27 +01:00
zotlabs
fc9e6d289a missing piece of poll code 2020-01-31 12:51:23 -08:00
Mario
6838342d62 fix php warningà 2020-01-31 10:29:20 +00:00
Mario
69b25e490e Merge branch 'dev' into 'dev'
polls and other backend z6 compat work

See merge request hubzilla/core!1825
2020-01-31 10:34:55 +01:00
zotlabs
b8d7647c48 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-01-30 15:58:36 -08:00
zotlabs
989443a569 basic poll support and patch to not call System::get_platform_name() within t() unless needed. Polls probably need refining and have not yet been fully tested after porting 2020-01-30 15:56:33 -08:00
Max Kostikov
c50a311ff3 Merge branch 'dev' into 'dev'
Prevent multiple database requests on name platform check

See merge request hubzilla/core!1824
2020-01-30 20:39:13 +01:00
Max Kostikov
b37e5a426a Update System.php 2020-01-30 20:36:00 +01:00
Max Kostikov
5e76318e44 Update System.php 2020-01-30 20:28:55 +01:00
Max Kostikov
8ed3971ef0 Prevent multiple database requests on name platform check 2020-01-30 20:18:25 +01:00
Mario
c2b6f0bc28 Merge branch 'dev' into 'dev'
z6 compat work

See merge request hubzilla/core!1822
2020-01-30 20:06:15 +01:00
Zot
2c42daf609 z6 compat work 2020-01-30 20:06:15 +01:00
Mario
8e2446a2fc provide img and zmg tags with image description 2020-01-30 17:24:08 +00:00
Mario
19bb9e0181 zap is storing perms different from hubzilla - revert Lib/Connect to use the hubzilla way. Eventually we might want to streamline this with zap. This will require a DB update to upgrade permissions in abconfig. 2020-01-30 10:12:45 +00:00
zotlabs
e9b2dacb61 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-01-29 14:33:43 -08:00
zotlabs
3df5d854b8 z6 transition work - prevent z6 sync packets from being unpacked into an incompatible schema 2020-01-29 14:29:06 -08:00
Mario
9545a81166 update create_identity() to use Lib/Connect via connect_and_sync() ported from zap 2020-01-26 19:41:52 +00:00
Mario
1712eceaf9 port Lib/Connect and Module/Follow from zap. Connect with new connections via zot6 2020-01-26 15:08:55 +00:00
Mario
7d8c6cb9ed Merge branch 'dev' into 'dev'
bugfix: event_addtocal not preserving original privacy expectation

See merge request hubzilla/core!1820
2020-01-26 13:54:00 +01:00
zotlabs
f123809d29 more work on zap export 2020-01-25 16:24:14 -08:00
Mario
7abcdd34af minor private forum notifications fixes 2020-01-25 14:32:35 +00:00
zotlabs
ead56c59e2 bugfix: event_addtocal not preserving original privacy expectation 2020-01-24 19:38:52 -08:00
zotlabs
19a8dfaa5c Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-01-24 19:38:21 -08:00
Mario
fa45ea1d84 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-01-23 14:25:01 +00:00
Mario
8789edb65d make sure we import the zot6 xchan if we do not have it yet 2020-01-23 14:24:46 +00:00
Max Kostikov
b6abc034cf Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1819
2020-01-22 21:11:27 +01:00
Max Kostikov
c92ea70453 Update hstrings.php 2020-01-22 21:02:46 +01:00
Max Kostikov
07eee20525 Update hmessages.po 2020-01-22 21:02:33 +01:00
Mario
6c9130be46 Merge branch 'dev' into 'dev'
Don't validate domain with PTR record; remove uneccessary CNAME check; add IPv6 check

See merge request hubzilla/core!1818
2020-01-22 20:26:10 +01:00
Mario
51f00cda92 fix typo 2020-01-21 08:55:11 +00:00
Mario
7973567a7c more shortlocalize and bdi tags 2020-01-20 09:30:24 +00:00
Max Kostikov
b81b18814e Don't validate domain with PTR record; remove uneccessary CNAME check; add IPv6 check 2020-01-19 21:55:15 +01:00
Mario
bbfe71b0c6 the address or URL as linktitle should be sufficient 2020-01-18 20:46:52 +00:00
Mario
7404183830 missing update file 2020-01-18 20:13:09 +00:00
Mario
43aea3ce38 we need 24h format 2020-01-18 20:05:05 +00:00
Mario
cbaf4b7536 introduce db_str_to_date() 2020-01-18 20:00:37 +00:00
Mario
570d84c031 fix shortlocalize 2020-01-18 16:04:40 +00:00
Mario
9eeccc087d move mail frontend to addons and remove mail app from system apps 2020-01-18 14:23:23 +00:00
Mario
7404a8ec1a implement bdi tags via bbcode where possible 2020-01-18 14:19:31 +00:00
Mario
bfae86bdb6 more bdi tags 2020-01-18 13:17:37 +00:00
Mario
66f6a1d186 wrap profile names in bdi tags to prevent mastodon-kiddies to mess with the layout 2020-01-18 10:54:53 +00:00
Mario
17a4aa983e $owner in get_feed_for() is the atom rendered channel, for atom_entry we need the owners channel_id though. 2020-01-17 21:31:37 +00:00
Mario
2a0a06d74a some work on zot6 DMs 2020-01-15 21:43:47 +00:00
Mario
ccaa93655a fix typo 2020-01-15 09:48:10 +00:00
Mario
65bc363685 Merge branch 'dev' into 'dev'
event compatibility work

See merge request hubzilla/core!1817
2020-01-15 10:30:02 +01:00
zotlabs
293d411efb Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-01-14 13:34:56 -08:00
zotlabs
2a287e6def event compatibility work 2020-01-14 13:29:45 -08:00
Mario
d96f4340e8 Merge branch 'dev' into 'dev'
Fix wrong URL detection with Markdown support enabled

See merge request hubzilla/core!1816
2020-01-14 10:38:06 +01:00
zotlabs
d3cbbe029c rework activitystreams events - send invite/event activities instead of create/event. Also a first pass at creating a Zap export file from Hubzilla. Much more work is needed before this is functional. 2020-01-12 22:41:28 -08:00
Max Kostikov
a1ccacb825 Fix wrong URL detection with Markdown support enabled 2020-01-12 18:24:59 +01:00
Mario
b04915161b composer update symfony/polyfill-ctype 2020-01-12 09:51:21 +00:00
Mario
8cb968c4b0 composer update sabre/dav 2020-01-12 09:18:07 +00:00
Mario
f645c6f3a5 update cropperjs to the recent version 2020-01-11 10:30:12 +00:00
Mario
4c1c690816 fix markdown test 2020-01-09 14:33:00 +00:00
Mario
537a7cf03d composer updates 2020-01-09 13:34:37 +00:00
Mario
662e8f8a4c Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2020-01-09 08:38:48 +00:00
Mario
7397348b9c Merge branch 'dev' into 'dev'
Add age choice on cached item retrieve

See merge request hubzilla/core!1813
2020-01-09 09:30:36 +01:00
Mario
5c43013692 deal with situations where we do not have an xchan_addr but only an xchan_url 2020-01-09 08:20:01 +00:00
Max Kostikov
908875a052 Update Cache.php 2020-01-06 20:40:18 +01:00
Max Kostikov
41ce2da080 Add age choice on cached item retrieve 2020-01-05 11:49:36 +01:00
Max Kostikov
6add6ce79b Merge branch 'dev' into 'dev'
Fixed es-es/hmessages.po

See merge request hubzilla/core!1812
2019-12-28 22:23:57 +01:00
mjfriaza
0fe9c029ab Fixed es-es/hmessages.po 2019-12-28 19:04:58 +01:00
Max Kostikov
a6522b34c7 Merge branch 'dev' into 'dev'
Update Spanish

See merge request hubzilla/core!1811
2019-12-28 18:47:08 +01:00
mjfriaza
229f99fe6b Update Spanish 2019-12-28 18:17:42 +01:00
Mario
bdc269d445 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-12-28 14:38:06 +00:00
Mario
ff63132a32 pubstream: use search mode for tag filter view and add a title 2019-12-28 14:37:52 +00:00
Max Kostikov
e7fb22edc1 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1810
2019-12-27 19:38:17 +01:00
Max Kostikov
3c59303b68 Update hstrings.php 2019-12-27 19:25:36 +01:00
Max Kostikov
fb4504c5a3 Update hmessages.po 2019-12-27 19:25:05 +01:00
Mario
db22578c16 re-add german translations for x minutes etc. which were removed in rkor's merge request 2019-12-21 09:49:24 +00:00
Mario
300727b8cf german translation fixes 2019-12-21 09:40:57 +00:00
Mario
448fb14fc4 Merge branch 'dev' into 'dev'
Some translations to German (#1418)

See merge request hubzilla/core!1809
2019-12-21 10:35:32 +01:00
Mario
c42e8613e5 sse: fix new posts only filter broken after aditional results loaded 2019-12-20 09:53:05 +00:00
Robert Kormann
12de30a2b1 German translations related to settings and apps, German context help 2019-12-18 18:27:00 +01:00
Mario
6f93d9848c Disable oembed in directory profile about 2019-12-17 10:53:40 +01:00
Mario
3d019fa2dd Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-12-17 09:33:08 +00:00
Max Kostikov
d5aeb13601 Merge branch 'dev' into 'dev'
Fix possibly unknown author

See merge request hubzilla/core!1808
2019-12-16 21:51:40 +01:00
Mario
230f7ab6d4 sse: remove redundant code 2019-12-16 13:50:43 +00:00
Max Kostikov
d71dd21abc Fix possibly unknown author 2019-12-16 10:23:33 +01:00
Robert Kormann
0d00b72569 Merge branch 'dev' into RKor.Info 2019-12-15 18:11:47 +01:00
Mario
00f6deb9bd remove redundant css 2019-12-15 09:14:51 +00:00
Robert Kormann
cce5054aec German translations of settings and apps elements 2019-12-14 16:46:26 +01:00
Mario
544ef3bc58 update composer libs and minor notifications display fixes 2019-12-12 14:51:10 +00:00
Mario
124cc43962 when ajax loading new posts, always scroll to top first 2019-12-12 09:09:31 +00:00
Max Kostikov
4237dd457e Merge branch 'dev' into 'dev'
missing translation "%d unseen"

See merge request hubzilla/core!1806
2019-12-10 12:34:45 +01:00
zotlabs
88ebbd90d8 missing translation "%d unseen" 2019-12-09 19:43:01 -08:00
Max Kostikov
298acb9645 Merge branch 'dev' into 'dev'
directory: port censoring from zap and disable oembed in profile about

See merge request hubzilla/core!1805
2019-12-09 18:47:55 +01:00
Mario
c4f4edd743 directory: port censoring from zap and disable oembed in profile about 2019-12-09 10:44:44 +00:00
Max Kostikov
258a4e5627 Merge branch 'dev' into 'dev'
Don't show pinned post on single post displaying

See merge request hubzilla/core!1804
2019-12-08 00:22:46 +01:00
Max Kostikov
e1400e5745 Don't show pinned post on single post displaying 2019-12-08 00:18:51 +01:00
Mario
593688d539 Merge branch 'dev' into 'dev'
Add .webp image format support

See merge request hubzilla/core!1802
2019-12-07 20:14:18 +01:00
Max Kostikov
aed6823051 Add .webp image format support 2019-12-07 20:14:17 +01:00
Mario
96f9e51546 sse: encode string instead of replacing quotes in the template, use decodeURIComponent() instead of unescape() which is marked deprecated. 2019-12-07 19:09:19 +00:00
Mario
161ea6d51f sse: initial commit to deal with forum notifications 2019-12-07 13:05:07 +00:00
Max Kostikov
88e755037b Merge branch 'dev' into 'dev'
Unpin pinned item on site admin deletion

See merge request hubzilla/core!1801
2019-12-05 12:43:00 +01:00
Max Kostikov
cde706748a Unpin pinned item on site admin deletion 2019-12-05 12:37:54 +01:00
Max Kostikov
3e833a5bcd Merge branch 'dev' into 'dev'
Add missed break

See merge request hubzilla/core!1800
2019-12-04 21:00:20 +01:00
Max Kostikov
475a39ff90 Add missed break 2019-12-04 20:57:35 +01:00
Max Kostikov
2dd2b755f1 Merge branch 'dev' into 'dev'
Show unpin button in pinned post for owner only

See merge request hubzilla/core!1799
2019-12-04 15:42:48 +01:00
Max Kostikov
a6516341c5 Show unpin button for pinned post for owner only 2019-12-04 15:35:46 +01:00
Max Kostikov
9a70c3c275 Show unpin button for pinned post for owner only 2019-12-04 15:33:53 +01:00
Max Kostikov
5998445841 Merge branch 'dev' into 'dev'
Remove pinned item on every change

See merge request hubzilla/core!1798
2019-12-04 12:01:24 +01:00
Max Kostikov
d9c39d0c41 Remove pinned item on every change 2019-12-04 11:58:42 +01:00
Max Kostikov
4038b78377 Merge branch 'dev' into 'dev'
More pinned items frontend processing fixes

See merge request hubzilla/core!1797
2019-12-04 11:53:37 +01:00
Max Kostikov
dce8516da4 More pinned items frontend processing fixes 2019-12-04 11:50:56 +01:00
Mario
bde429cff6 Merge branch '4.6RC' 2019-12-04 10:25:11 +00:00
Mario
4c8d33d1eb bump version 2019-12-04 10:24:03 +00:00
Mario
fac7826efa update changelog
(cherry picked from commit 295c08fcf3)
2019-12-04 11:22:56 +01:00
Max Kostikov
d439dee736 Merge branch 'dev' into 'dev'
Fix switching pinned items

See merge request hubzilla/core!1796
2019-12-04 11:16:36 +01:00
Mario
295c08fcf3 update changelog 2019-12-04 10:14:28 +00:00
Max Kostikov
efa11cbc74 Update pinned item markup 2019-12-04 11:13:33 +01:00
Max Kostikov
4a8e222763 Fix update pin / unpin button text on pinned item replace 2019-12-04 11:11:39 +01:00
Max Kostikov
75b9c7d6b8 Fix variables for unpin button 2019-12-04 10:21:03 +01:00
Max Kostikov
d1648fb258 Remove square 2019-12-04 10:12:29 +01:00
Max Kostikov
34cda095fe Remove square 2019-12-04 10:10:39 +01:00
Max Kostikov
dad7bc82c3 Merge branch 'dev' into 'dev'
Ad unpin button for pinned content and fix unpin on unpinned item drop

See merge request hubzilla/core!1795
2019-12-04 10:07:09 +01:00
Max Kostikov
0ee65ee954 Merge branch 'dev' into 'dev'
# Conflicts:
#   Zotlabs/Widget/Pinned.php
#   view/js/main.js
#   view/tpl/conv_item.tpl
#   view/tpl/pinned_item.tpl
2019-12-04 10:03:55 +01:00
Max Kostikov
ae0780fe3f Unpin only pinned items on item drop 2019-12-04 09:58:16 +01:00
Max Kostikov
d2a65ab1be Remove hint for pin button 2019-12-04 09:50:31 +01:00
Max Kostikov
f4516826ef Add unpin button for pinned item 2019-12-04 09:49:32 +01:00
Max Kostikov
b894380f86 Add unpin button for pinned item 2019-12-04 09:49:05 +01:00
M. Dent
b48a9d3f75 Merge branch 'dev' into 'dev'
Add content pinning support

See merge request hubzilla/core!1794
2019-12-04 03:44:25 +01:00
Max Kostikov
21b398252a Add content pinning support 2019-12-04 03:44:24 +01:00
Max Kostikov
80e03268fd Fix show share menu option for pinned post 2019-12-03 23:35:19 +01:00
Max Kostikov
135b3cf1ef Fix hide pinned post button for unauthenticated viewer 2019-12-03 17:17:06 +01:00
Max Kostikov
b9e083da61 Add layout for hiding pinned content and its processing 2019-12-03 16:58:46 +01:00
Max Kostikov
74aa446190 Add hiding pinned content 2019-12-03 16:56:24 +01:00
Max Kostikov
0d7548a381 Add hiding pinned content 2019-12-03 16:55:32 +01:00
Max Kostikov
428b2cca21 Minor pinned content processing fixes 2019-12-03 16:44:27 +01:00
Max Kostikov
28a316f73f Normalize SQL query 2019-12-03 10:33:46 +01:00
Max Kostikov
0532d639c2 Optimize pinned item verbs based activity processing 2019-12-03 10:26:49 +01:00
Max Kostikov
c17717c5db Remove debug logging 2019-12-03 10:14:49 +01:00
Max Kostikov
8b00913579 Show poll results in pinned items 2019-12-03 00:24:04 +01:00
Max Kostikov
cf95c4878d Add poll results in pinned item layout 2019-12-03 00:23:02 +01:00
Max Kostikov
4958e3b42c Unpin item on drop 2019-12-02 17:07:12 +01:00
Max Kostikov
cc3edeb6f5 Fix unique HTML elements id 2019-12-02 15:09:15 +01:00
Max Kostikov
20c296ce53 Add scroll to pinned item before removal 2019-12-01 16:30:16 +01:00
Max Kostikov
5ccbcb44f7 Add pinned content on channel page 2019-12-01 15:52:57 +01:00
Max Kostikov
adcf28af7c Add Russian strings for pinned content 2019-12-01 15:41:28 +01:00
Max Kostikov
5b206cd4a7 Add Russian strings for pinned content 2019-12-01 15:41:10 +01:00
Max Kostikov
1eb70b66d8 Add missed semicolon 2019-12-01 15:37:06 +01:00
Max Kostikov
3c1ff1fc63 Add base64 mids array 2019-12-01 15:22:38 +01:00
Max Kostikov
d711f2ad4c Add b64mids to support current JS 2019-12-01 15:21:32 +01:00
Max Kostikov
ae8a1c992a Formatting 2019-12-01 14:28:26 +01:00
Max Kostikov
580d3db5a8 Add pinned content widget 2019-12-01 14:26:18 +01:00
Max Kostikov
042cc96968 Add pinning processing module 2019-12-01 14:21:08 +01:00
Max Kostikov
d177043c9f Add pinned item layout 2019-12-01 14:17:32 +01:00
Max Kostikov
4c1e2c2dd8 Fix missprint 2019-12-01 14:12:52 +01:00
Max Kostikov
7dcb0cc11b Add pinning processing 2019-12-01 14:10:47 +01:00
Max Kostikov
837d9a4df0 Add pinnig controls to item layout 2019-12-01 14:08:19 +01:00
Max Kostikov
ec1d5ead93 Add description for system.pin_types variable 2019-12-01 14:06:14 +01:00
Max Kostikov
f485ed174d Add pinned items controls 2019-12-01 14:00:10 +01:00
Max Kostikov
e8560d56f5 Add pinned items strings 2019-12-01 13:56:52 +01:00
Max Kostikov
3a937fb969 Add pinned items JS strings 2019-12-01 13:55:51 +01:00
Mario
c1aa96ebf7 sse: template fixes, fix missing forum notifications and minor impovements 2019-11-29 19:46:13 +00:00
Mario
17e012afc6 remove logging 2019-11-29 15:31:46 +00:00
Mario
1c6796f907 sse: possible fix for race condition and fix notification count if we loaded unseen items but their notifications were not yet loaded 2019-11-29 15:30:58 +00:00
DM42.Net Hubzilla Development
3e133bbfa3 Move auto_save_draft to header from thread comment
(cherry picked from commit c86b35da70)
2019-11-28 09:42:59 +01:00
Max Kostikov
6c8d1bdffe Update CHANGELOG
(cherry picked from commit 9284b60a79)
2019-11-28 09:42:00 +01:00
Max Kostikov
59fc495593 Update Russian hstrings.php
(cherry picked from commit b69f8a3f29)
2019-11-28 09:41:40 +01:00
Max Kostikov
60827bdcc4 Update Russian hmessages.po
(cherry picked from commit 8ea7c08f43)
2019-11-28 09:41:19 +01:00
Mario
f2c73c0f45 Merge branch 'fix-listmode-spinner' into 'dev'
Move auto_save_draft to header from thread comment

See merge request hubzilla/core!1793
2019-11-28 09:30:57 +01:00
Mario
78492d0037 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-11-28 08:23:13 +00:00
Mario
2b08519f5a sse: improve caching fix an issue with removing notifications and move chatpresence expiration to cron 2019-11-28 08:22:53 +00:00
DM42.Net Hubzilla Development
c86b35da70 Move auto_save_draft to header from thread comment 2019-11-28 00:27:12 -05:00
Max Kostikov
b2003e2c3c Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1791
2019-11-25 22:32:53 +01:00
Max Kostikov
8a08cceccb Update CHANGELOG 2019-11-25 22:32:39 +01:00
Max Kostikov
9284b60a79 Update CHANGELOG 2019-11-25 22:25:44 +01:00
Max Kostikov
b69f8a3f29 Update Russian hstrings.php 2019-11-25 22:22:37 +01:00
Max Kostikov
8ea7c08f43 Update Russian hmessages.po 2019-11-25 22:22:17 +01:00
Max Kostikov
78197aa625 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!6
2019-11-25 22:20:49 +01:00
Mario
f992feb71c update changelog
(cherry picked from commit fcb065bcb2)
2019-11-25 22:06:59 +01:00
Mario
fcb065bcb2 update changelog 2019-11-25 21:06:12 +00:00
Mario
cf66e66db8 Merge branch '4.6RC' of https://framagit.org/hubzilla/core into 4.6RC 2019-11-25 21:03:35 +00:00
Max Kostikov
63aa3948e5 resolve merge conflict 2019-11-25 21:03:22 +00:00
Mario
3940fa5659 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-11-25 21:00:24 +00:00
Max Kostikov
7899ed6f69 Revert "Add daily cached embedded content cleanup"
This reverts commit 5c47c9ed95

(cherry picked from commit 38de059156)
2019-11-25 21:58:36 +01:00
Max Kostikov
5e44239657 Add daily cached embedded content cleanup
(cherry picked from commit 5c47c9ed95)
2019-11-25 21:58:18 +01:00
Mario
697fbf33c5 Merge branch 'dev' into 'dev'
Fix once cached embedded content is used and stored forever

See merge request hubzilla/core!1790
2019-11-25 21:50:03 +01:00
Max Kostikov
901785663e Fix once cached embedded content is used and stored forever 2019-11-25 21:50:02 +01:00
Max Kostikov
9e4ff8ce25 Update system.object_cache_days default value 2019-11-25 17:52:21 +01:00
Max Kostikov
5f1b2b4bf7 Use cached embedded content use up to 30 days by default 2019-11-25 17:51:28 +01:00
Max Kostikov
271d280c91 Fix orthography 2019-11-25 14:37:45 +01:00
Max Kostikov
8f708fef9c Add daily expired cached embedded content cleanup 2019-11-25 14:35:03 +01:00
Max Kostikov
38de059156 Revert "Add daily cached embedded content cleanup"
This reverts commit 5c47c9ed95
2019-11-25 14:32:58 +01:00
Max Kostikov
f0b40ac15e Add system.object_cache_days variable description 2019-11-25 14:27:36 +01:00
Max Kostikov
5c47c9ed95 Add daily cached embedded content cleanup 2019-11-25 14:16:07 +01:00
Max Kostikov
dafac11aaa Remove move unused cache cleanup to cron 2019-11-25 14:08:29 +01:00
Max Kostikov
1fc81457a1 Use cached embeds for a week by default 2019-11-25 14:07:39 +01:00
Mario
0d47bb6878 remove sysmsg and sysmsg_info from session - those are now stored in xconfig (sse) 2019-11-25 12:59:16 +00:00
Mario
17cd452fff changelog
(cherry picked from commit f6f7e7e8d2)
2019-11-25 12:33:36 +01:00
Mario
f6f7e7e8d2 changelog 2019-11-25 11:32:22 +00:00
Mario
004861fbb7 merge opengraph fixes from dev 2019-11-25 08:41:34 +00:00
Mario
483d450af4 sse: use fadeOut() to be consistent 2019-11-23 20:47:34 +00:00
Mario
decc14c324 sse: more cleanup 2019-11-23 20:41:20 +00:00
Mario
1134be8d30 sse: improve handling of notification status and major cleanup 2019-11-23 20:20:13 +00:00
Mario
fb65c54123 sse: minor improvements 2019-11-23 13:33:46 +00:00
Mario
fe803135d8 sse: fix another regression 2019-11-22 21:01:54 +00:00
Mario
908ebed9fd sse: remove some logging 2019-11-22 20:55:52 +00:00
Mario
bdb6b0d237 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-11-22 20:52:55 +00:00
Mario
73a0866ac4 sse: fix a regression where not all appearances of an notification were looped through and fix format_notify() to not look for the parent item anymore 2019-11-22 20:52:22 +00:00
Max Kostikov
e6b1b20565 Add space after comma in connection accepted interactions list 2019-11-22 19:28:37 +01:00
Max Kostikov
e40ea62c7c Add space after comma in connection accepted interactions list 2019-11-22 19:24:40 +01:00
Max Kostikov
7864579b1e Add space after comma in connection accepted interactions list 2019-11-22 19:20:02 +01:00
Mario
b62eb665c5 sse: store the item mid plus reactions mids in data-mids and change functions accordingly 2019-11-22 14:11:26 +00:00
Mario
c72716eca7 missing closing tags 2019-11-22 14:08:53 +00:00
Mario
530d816df6 Merge branch 'better-conn-status' into 'dev'
More descriptive connection status icons

See merge request hubzilla/core!1789
2019-11-22 14:59:46 +01:00
M. Dent
23c47f78ea More descriptive connection status icons 2019-11-22 14:59:45 +01:00
Manuel Jiménez Friaza
8727f12b18 no mention notifications from mastodon (and pleroma)
(cherry picked from commit ea235c0c67)


(cherry picked from commit 0159b631fc)
2019-11-21 14:49:59 +01:00
Mario
4a4c43bb2c Merge branch 'cherry-pick-cc1cca5e' into 'dev'
Cherry pick cc1cca5e

See merge request hubzilla/core!1788
2019-11-21 14:47:20 +01:00
Manuel Jiménez Friaza
0159b631fc no mention notifications from mastodon (and pleroma)
(cherry picked from commit ea235c0c67)
2019-11-21 14:47:20 +01:00
Mario
e74361c4db sse: introduce sse_updateNotifications() to be able to update the notifications from different places 2019-11-20 18:38:25 +00:00
Mario
21299c6fc1 sse: defins sse_mids as array and comment out logging of dismissed notifications 2019-11-19 09:39:09 +00:00
Mario
eec42d3bb3 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-11-19 09:33:13 +00:00
Mario
bd049eddd4 sse: fix notifications visible for loaded items when the items were loaded before the notifications 2019-11-19 09:33:00 +00:00
Max Kostikov
e762347080 Merge branch 'dev' into 'dev'
Remove duplicate Opengraph creation

See merge request hubzilla/core!1786
2019-11-18 20:36:46 +01:00
Max Kostikov
53ad04cdc4 Remove duplicate Opengraph creation 2019-11-18 20:33:55 +01:00
Max Kostikov
148c3f9dc5 Merge branch 'dev' into 'dev'
Better Opengraph markup for posts

See merge request hubzilla/core!1785
2019-11-18 15:58:35 +01:00
Max Kostikov
6f1188f44f Update Articles.php 2019-11-18 15:52:59 +01:00
Max Kostikov
78868314a7 Use channelx array on Opengraph markup procedure 2019-11-18 15:47:03 +01:00
Max Kostikov
dc2f293089 Update opengraph.php 2019-11-18 15:42:14 +01:00
Max Kostikov
c7a0526428 Move back Opengraph markup creation to init stage 2019-11-18 15:40:51 +01:00
Max Kostikov
498c021aec Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!5
2019-11-18 13:00:43 +01:00
Max Kostikov
5ee133843f Remove base64 decode check on Opengraph tags create 2019-11-18 12:55:09 +01:00
Max Kostikov
9ad2902add Remove unnecessary brackets 2019-11-18 12:55:02 +01:00
Mario
ef75d27afb cleanup local and session storage on channel change or logout 2019-11-15 21:12:40 +00:00
Mario
965c51c2d4 sse: implement notifications for anonymous visitors (info, notice and pubs) and fix a potential memory leak 2019-11-15 20:29:58 +00:00
Mario
05604e4bd2 onepoll: do not update dead feeds
(cherry picked from commit 5a6b14f878)
2019-11-15 11:03:54 +01:00
Mario
fd7d497cd1 make inline pdf a security option, move thumbnail security to security options from admin/site
(cherry picked from commit de9a7f0fa9)
2019-11-15 11:03:38 +01:00
Mario
a974d0d52d AP fixes
(cherry picked from commit 3009c88d24)
2019-11-15 11:02:55 +01:00
Mario
5a6b14f878 onepoll: do not update dead feeds 2019-11-15 10:01:21 +00:00
Mario
de9a7f0fa9 make inline pdf a security option, move thumbnail security to security options from admin/site 2019-11-15 09:55:44 +00:00
Mario
3009c88d24 AP fixes 2019-11-15 09:43:39 +00:00
Mario
c850a61a89 check if file exists
(cherry picked from commit 52bd27a028)
2019-11-13 16:26:57 +01:00
Mario
f3fa2d853a sse: make sure we have an observer 2019-11-13 14:30:54 +00:00
Mario
a982aecd5b sse: revert to reset to array 2019-11-13 13:51:00 +00:00
Mario
52bd27a028 check if file exists 2019-11-13 13:40:40 +00:00
Mario
e5e16da8cb sse: reset to empty string instead of empty array 2019-11-13 13:26:28 +00:00
zotlabs
3a2fdec241 wildcard tag issue
(cherry picked from commit 2f4c619d51)
2019-11-13 08:57:12 +01:00
Mario
b0adb70ffc Merge branch 'dev' into 'dev'
wildcard tag issue

See merge request hubzilla/core!1784
2019-11-13 08:56:27 +01:00
zotlabs
2f4c619d51 wildcard tag issue 2019-11-12 20:25:25 -08:00
Mario
6e36820b1b sse: do not delete xconfig - reset it 2019-11-12 21:15:01 +00:00
Mario
209d06a8f7 better detection for who to send sys notifications (needs addons update) 2019-11-12 10:11:58 +00:00
Max Kostikov
4a6d050e22 Merge branch 'sse_merge_core' into 'dev'
sse notifications

See merge request hubzilla/core!1783
2019-11-11 21:30:38 +01:00
Mario
b033597ada sse notifications 2019-11-11 21:30:38 +01:00
Mario
08b804cd2d use minified version of jquery
(cherry picked from commit 89342ca9fb)
2019-11-11 11:17:42 +01:00
Mario
89342ca9fb use minified version of jquery 2019-11-11 10:17:03 +00:00
Mario
892f4b4182 bump version 2019-11-11 08:20:30 +00:00
Mario
de7891771d update strings 2019-11-11 08:14:42 +00:00
Mario
602768209b bump version 2019-11-11 08:06:44 +00:00
Mario
73b1f8fcdd Merge branch 'cherry-pick-1affcb80' into 'dev'
fix language tests

See merge request hubzilla/core!1782
2019-11-10 14:21:13 +01:00
Mario
e1b923ab7d Merge branch 'cherry-pick-6685381f' into 'dev'
another bulk of composer updates

See merge request hubzilla/core!1781
2019-11-10 14:18:18 +01:00
Mario
bed9876d68 Merge branch 'cherry-pick-9ad4c652' into 'dev'
hopefully fix query for postgres

See merge request hubzilla/core!1780
2019-11-10 14:17:58 +01:00
Mario
d184e2708f fix language tests
(cherry picked from commit 1affcb80172576dc46e4434cd10e1a534a9bb6c2)
2019-11-10 14:10:51 +01:00
Mario
580c3f4ffe another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
2019-11-10 14:10:03 +01:00
Mario
158b8aea38 hopefully fix query for postgres
(cherry picked from commit 9ad4c6528cc3ee4e34d2b5d77027a1c33cbadf5c)
2019-11-10 12:02:12 +01:00
Max Kostikov
d22766f458 Merge branch 'cherry-pick-971e7eef' into 'dev'
remove some old unused javascript libraries

See merge request hubzilla/core!1779
2019-11-10 11:55:05 +01:00
Max Kostikov
70391243dc Merge branch 'cherry-pick-b444bf59' into 'dev'
update jquery to version 3.4.1

See merge request hubzilla/core!1778
2019-11-10 11:54:43 +01:00
Mario
61eef68ff3 Ãremove some old unused javascript libraries
(cherry picked from commit 971e7eef9c415a2ce82eb0cd22eaabee12ae719c)
2019-11-10 09:59:22 +01:00
Mario
41cc2854c5 update jquery to version 3.4.1
(cherry picked from commit b444bf59560b3d918aa13b52035c602b03e8d013)
2019-11-10 09:58:18 +01:00
Max Kostikov
ec68ede79f Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!4
2019-11-08 23:39:04 +01:00
Max Kostikov
478014f02a Better BBcode to Markdown conversion 2019-11-08 23:35:05 +01:00
M. Dent
aff7c2d771 Merge branch 'dev' into 'dev'
exempt svg from tag completion

See merge request hubzilla/core!1777
2019-11-08 23:30:30 +01:00
zotlabs
00dd52317a Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-11-08 13:10:24 -08:00
zotlabs
17522b31e9 exempt svg from tag completion 2019-11-08 13:07:42 -08:00
Max Kostikov
163b1ee9f8 Merge branch 'cherry-pick-fa437b79' into 'dev'
more fix date header format

See merge request hubzilla/core!1776
2019-11-08 21:35:06 +01:00
Mario
7b9a992f83 more fix date header format
(cherry picked from commit fa437b7977ba7fffd7368fa5c75e3d57fbf75424)
2019-11-08 21:27:43 +01:00
Max Kostikov
4efb258671 Merge branch 'cherry-pick-bb11cd15' into 'dev'
fix date header format

See merge request hubzilla/core!1775
2019-11-08 21:26:54 +01:00
Mario
7532358806 fix date header format
(cherry picked from commit bb11cd15d147ebbcc90b544788c9c2ef4925daa5)
2019-11-08 21:13:58 +01:00
Max Kostikov
13c05e7937 Merge branch 'dev' into 'dev'
Do not trim a sufficiently shortened Opengraph description

See merge request hubzilla/core!1774
2019-11-08 18:13:52 +01:00
Max Kostikov
c6e9bca76c Merge branch 'cherry-pick-2df15f35' into 'dev'
update composer libs

See merge request hubzilla/core!1773
2019-11-08 18:13:27 +01:00
Max Kostikov
3706afbd01 Do not trim a sufficiently shortened Opengraph description 2019-11-08 16:19:08 +01:00
Mario
bcd0802ea4 update composr libs
(cherry picked from commit 2df15f35d706d4608ff723ce6288391ca774f7ba)
2019-11-08 10:47:28 +01:00
Mario
9360148829 Merge branch 'dev' into 'dev'
svg stuff

See merge request hubzilla/core!1772
2019-11-08 10:47:00 +01:00
Zot
a6165c00ce svg stuff 2019-11-08 10:47:00 +01:00
zotlabs
a5826fec25 svg stuff 2019-11-07 14:51:29 -08:00
zotlabs
839c6668cf Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-11-07 14:48:44 -08:00
Max Kostikov
e9a9fc5050 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1771
2019-11-07 14:24:19 +01:00
Max Kostikov
426668cd2e Update hstrings.php 2019-11-07 14:14:41 +01:00
Max Kostikov
926d7c56a6 Update hmessages.po 2019-11-07 14:13:29 +01:00
Mario
9934dbfe69 Merge branch 'dev' into 'dev'
Sanitize title on Atom/RSS feed import

See merge request hubzilla/core!1770
2019-11-07 09:14:51 +01:00
Max Kostikov
b6314c109d Sanitize title on Atom/RSS feed import 2019-11-07 09:14:51 +01:00
Max Kostikov
f8955f90b8 Move title sanitizer code in the right place 2019-11-06 16:14:57 +01:00
Max Kostikov
9248fc96b3 Formatting 2019-11-06 16:11:10 +01:00
Max Kostikov
2875ee2423 Update feedutils.php 2019-11-06 16:08:36 +01:00
Max Kostikov
36f707b25e Sanitize title on Atom/RSS feed import 2019-11-06 16:07:04 +01:00
M. Dent
2a05bd9ed6 Merge branch 'cherry-pick-7cc8c2d1' into 'dev'
port fixes from zap to check for arrays

See merge request hubzilla/core!1767
2019-11-06 04:13:57 +01:00
M. Dent
b7db9944ec Merge branch 'cherry-pick-3604220c' into 'dev'
add date and request target headers to make pixelfed happy

See merge request hubzilla/core!1768
2019-11-06 04:11:12 +01:00
M. Dent
86f7d08483 Merge branch 'dev' into 'dev'
Prefer use Etag on photo modification validation

See merge request hubzilla/core!1769
2019-11-06 04:10:16 +01:00
zotlabs
1358a81c32 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-11-04 14:26:12 -08:00
Max Kostikov
09ad48c12b Prefer use Etag on photo modification validation 2019-11-04 21:44:42 +01:00
M. Dent
aa137fb2d2 Merge branch 'cherry-pick-4cfb9658' into 'dev'
fix duplicate attachment and regression with audio file upload

See merge request hubzilla/core!1766
2019-11-04 20:01:14 +01:00
M. Dent
09284d512d Merge branch 'cherry-pick-03317b98' into 'dev'
fix query with protocol prefix not always picking the right xchan

See merge request hubzilla/core!1765
2019-11-04 19:58:01 +01:00
Mario
02fd7e51ff add date and request target headers to make pixelfed happy
(cherry picked from commit 3604220c2a5aedddf25143cc5fd87ed576d34702)
2019-11-04 13:04:28 +01:00
Mario
b359b89aa1 port fixes from zap to check for arrays
(cherry picked from commit 7cc8c2d127b09b7e53c7916c6ea104fa566971db)
2019-11-04 13:03:00 +01:00
Mario
873b20677e fix duplicate attachment and regression with audio file upload
(cherry picked from commit 4cfb965881df2be181aab6020c9df78c0a86fd9f)
2019-11-04 10:34:24 +01:00
Mario
a049664219 fix query with protocol prefix not always picking the right xchan
(cherry picked from commit 03317b9864c0d7c99e144404c647b9923d8d29ea)
2019-11-04 09:39:56 +01:00
Max Kostikov
64c6e25896 Merge branch 'cherry-pick-4a1c2208' into 'dev'
fix issue #1402

See merge request hubzilla/core!1764
2019-11-03 14:03:00 +01:00
Mario
9f9122ab8e fix issue #1402
(cherry picked from commit 4a1c2208866360b5fe54eea71ff8e62bd6d63045)
2019-11-03 11:15:12 +01:00
Mario
d0661cd4a3 Merge branch 'commentsclosed-hook' into 'dev'
Add hook to comments_are_now_closed()

See merge request hubzilla/core!1763
2019-11-03 10:12:12 +01:00
M. Dent
707b19dc35 Add hook to comments_are_now_closed() 2019-11-03 10:12:11 +01:00
Max Kostikov
6fd15d66a7 Merge branch 'dev' into 'dev'
Change llink type in default SQL schema

See merge request hubzilla/core!1761
2019-11-02 10:42:02 +01:00
Max Kostikov
8c9a814e18 Merge branch 'homeinstall_fix_addons' into 'dev'
homeinstall fix addons

See merge request hubzilla/core!1762
2019-11-02 10:37:59 +01:00
Max Kostikov
74ef5f38e9 Fix start time to sync queries on photo cache purge 2019-11-02 10:36:04 +01:00
root
624a3ee1a7 homeinstall fix addons 2019-11-01 23:01:42 +01:00
Max Kostikov
fc658a25d7 Update schema_mysql.sql 2019-11-01 19:37:46 +01:00
Max Kostikov
308619a726 Drop llink index 2019-11-01 17:47:16 +01:00
Max Kostikov
e87d8d9856 Change llink column type and drop index 2019-11-01 17:46:28 +01:00
Max Kostikov
7594264725 Merge branch 'dev' into 'dev'
Better photo cache expiry processing

See merge request hubzilla/core!1760
2019-11-01 10:49:19 +01:00
Max Kostikov
69533ce8f5 Add missed interval in SQL query 2019-11-01 10:46:49 +01:00
Max Kostikov
9fac43a3a3 Better photo cache expiry processing 2019-11-01 10:34:02 +01:00
Max Kostikov
b00db39739 Merge branch 'dev' into 'dev'
Better cached photos processing

See merge request hubzilla/core!1759
2019-10-26 12:30:41 +02:00
Max Kostikov
6f2a584279 Update Photo.php 2019-10-26 12:24:23 +02:00
Max Kostikov
de717268f7 Better cached photos processing 2019-10-26 12:22:09 +02:00
Mario
e27b19c756 fix hardcoded code/pre css in mod admin
(cherry picked from commit cddf6c4ff51580f3dec5d32eef06a40a473a9202)
2019-10-22 13:29:52 +02:00
Mario
045cb461f1 fix encoding issue
(cherry picked from commit 067010fc0a5a6c10825b869b822c9cfbb3d4516b)
2019-10-22 10:39:54 +02:00
Max Kostikov
088c0eedc6 Merge branch 'patch-1' into 'dev'
add japanese translation

See merge request hubzilla/core!1752
2019-10-19 23:28:58 +02:00
harukin
e5137b03fc Update view/ja/hstrings.php 2019-10-19 18:41:58 +02:00
harukin
76d34a4d74 Update view/ja/hmessages.po, view/ja/hstrings.php files 2019-10-17 17:57:23 +02:00
Max Kostikov
ae4f0e5728 Merge branch 'dev' into 'dev'
Fix channel address in follow link

See merge request hubzilla/core!1757
2019-10-15 22:39:18 +02:00
Max Kostikov
5df59027ad Fix channel address in follow link 2019-10-15 22:37:03 +02:00
Max Kostikov
c888e33f04 Merge branch 'dev' into 'dev'
Better Opengraph image type detection

See merge request hubzilla/core!1756
2019-10-15 14:11:21 +02:00
Max Kostikov
1a56ecaa39 Update opengraph.php 2019-10-15 14:04:24 +02:00
Max Kostikov
d778c3cf19 Better Opengraph image type detection 2019-10-15 14:03:41 +02:00
Max Kostikov
8bf57c6226 Merge branch 'dev' into 'dev'
Dev

See merge request hubzilla/core!1755
2019-10-15 14:00:21 +02:00
Max Kostikov
3c762b8809 Fix cache-control syntax for photos 2019-10-15 13:49:46 +02:00
Max Kostikov
3561fd7c43 Merge branch 'dev' into 'dev'
Sync dev

See merge request kostikov/core!3
2019-10-15 13:48:07 +02:00
Max Kostikov
66bfc0ec64 Merge branch 'patch-20191014' into 'dev'
Updates to zcard/profile images and other public images to account for infrastructure caches (CDN)

See merge request hubzilla/core!1754
2019-10-14 22:28:48 +02:00
M. Dent
7d0e576e3b Updates to zcard/profile images and other public images to account for infrastructure caches (CDN) 2019-10-14 22:28:48 +02:00
Max Kostikov
aa330bc8c7 Merge branch 'dev' into 'dev'
Better plural function detection

See merge request hubzilla/core!1753
2019-10-14 11:16:12 +02:00
Max Kostikov
b4de492e0d Merge branch 'dev' into 'dev'
Dev

See merge request kostikov/core!2
2019-10-14 11:11:48 +02:00
Max Kostikov
5bf3114e6f Better plural function detection 2019-10-14 11:09:53 +02:00
harukin
d2b1a2e5a3 Upload .php file 2019-10-14 03:39:43 +02:00
harukin
4b01f6359b Upload .po file 2019-10-14 03:39:05 +02:00
harukin
bcfa62f45a japanese translation directory 2019-10-14 03:34:24 +02:00
Mario
e7e8a2ca5f Merge branch 'dev' into 'dev'
Better Opengraph markup

See merge request hubzilla/core!1751
2019-10-13 14:27:54 +02:00
Max Kostikov
5edeb0250b Revert "Remove visible channels list from pubstream tags cloud creation procedure"
This reverts commit 5c4c6e68f6
2019-10-13 14:27:54 +02:00
Max Kostikov
0c2657df78 Add Opengraph image type detection 2019-10-12 23:42:35 +02:00
Max Kostikov
e4c57e8031 Update opengraph.php 2019-10-12 21:22:42 +02:00
Max Kostikov
6a25548097 Update Channel.php 2019-10-12 19:26:17 +02:00
Max Kostikov
db7cbdfc44 Add Opengraph markup for articles 2019-10-12 19:23:14 +02:00
Max Kostikov
2f26badb84 Move Opengraph functions to common libraries 2019-10-12 19:05:20 +02:00
Max Kostikov
f7e665c42f Add Opengraph function 2019-10-12 19:03:21 +02:00
Max Kostikov
3bc44ee451 Minor Opengraph improvements 2019-10-11 19:29:40 +02:00
Max Kostikov
125de855ef Add Opengraph og:type object 2019-10-11 09:55:06 +02:00
Max Kostikov
3881ebcce0 Better Opengraph markup for channel 2019-10-11 00:46:02 +02:00
M. Dent
bef5324fea Merge branch 'cherry-pick-cac0672a' into 'dev'
issue #1401

See merge request hubzilla/core!1750
2019-10-08 14:26:17 +02:00
Mario Vavti
c2655370e0 issue #1401
(cherry picked from commit cac0672a49cd710b3eced1d66f1bfb18747ddbf8)
2019-10-08 11:28:36 +02:00
Max Kostikov
d017e34795 Merge branch 'dev' into 'dev'
Dev sync

See merge request kostikov/core!1
2019-10-06 19:26:23 +02:00
Max Kostikov
aa44da35ba Revert "Remove visible channels list from pubstream tags cloud creation procedure"
This reverts commit 5c4c6e68f6
2019-10-06 19:24:28 +02:00
Max Kostikov
5c4c6e68f6 Remove visible channels list from pubstream tags cloud creation procedure 2019-10-06 12:02:45 +02:00
Max Kostikov
a435363b94 Merge branch 'cherry-pick-d8b8d8ce' into 'dev'
fix zap->hubzlla event title compatibility

See merge request hubzilla/core!1749
2019-10-06 11:18:35 +02:00
Mario Vavti
d6634eb14e fix zap->hubzlla event title compatibility
(cherry picked from commit d8b8d8ceb5cc9d701f91dac26834af15f3257cce)
2019-10-05 22:04:23 +02:00
Mario
afee2cf71a Merge branch 'dev' into 'dev'
Allow addons to process forum posts published through mentions

See merge request hubzilla/core!1745
2019-10-05 10:31:47 +02:00
Max Kostikov
79b0a6ba9c Allow addons to process forum posts published through mentions 2019-10-05 10:31:47 +02:00
Mario
0c2438b36a Merge branch 'cherry-pick-79bcc157' into 'dev'
fix bbcode event reshare timezone issue

See merge request hubzilla/core!1747
2019-10-05 10:31:26 +02:00
Mario
d6da46f94b Merge branch 'dev' into 'dev'
another timezone fix

See merge request hubzilla/core!1748
2019-10-05 10:31:11 +02:00
Zot
562e39c9c5 another timezone fix 2019-10-05 10:31:11 +02:00
zotlabs
2d08e0955a Merge branch 'dev' of https://framagit.org/zot/core into dev 2019-10-04 14:31:21 -07:00
zotlabs
baffa969d3 another timezone fix 2019-10-04 14:28:31 -07:00
Mario Vavti
1fbc8739b9 fix bbcode event reshare timezone issue
(cherry picked from commit 79bcc157bf8f0c67a8ee41ae9c53a9dec969f8d1)
2019-10-04 09:25:39 +02:00
zotlabs
b9dec84489 fix event timezones for zot6 2019-10-03 22:16:11 -07:00
Max Kostikov
6feb864c38 Allow processing of forum posts through mentions in addons 2019-10-03 18:28:29 +02:00
Max Kostikov
b6db1898b1 Get extended channel info using channelx_by_hash() 2019-10-03 18:27:25 +02:00
Max Kostikov
de902d179e Allow processing of forum posts through mentions in addons 2019-10-03 18:25:57 +02:00
Max Kostikov
58b77e3427 Merge branch 'cherry-pick-2c7ed093' into 'dev'
fix missing summary in mod article_edit

See merge request hubzilla/core!1744
2019-10-02 11:43:41 +02:00
Mario Vavti
cdcac86256 fix missing summary in mod article_edit
(cherry picked from commit 2c7ed093699ea0c0f68068fdd8a035454b9a76a3)
2019-10-02 11:05:24 +02:00
Mario
79b05e48e8 Merge branch 'dev' into 'dev'
Add 'Connect' button for not connected at this location channels

See merge request hubzilla/core!1743
2019-10-01 11:15:29 +02:00
Max Kostikov
541146e8ce Add 'Connect' button for not connected at this location channels 2019-10-01 11:15:29 +02:00
Max Kostikov
97b161c536 Merge branch 'dev' into 'dev'
Fix empty string quotation; remove trailing spaces

See merge request hubzilla/core!1742
2019-09-30 16:54:35 +02:00
Max Kostikov
ba3a6ecb52 Fix empty string quotation; remove trailing spaces 2019-09-30 16:50:24 +02:00
Mario
cf27b7440d Merge branch 'dev' into 'dev'
Sync private items with clones; avoid sync if no local connection with thread owner

See merge request hubzilla/core!1739
2019-09-30 16:19:39 +02:00
Max Kostikov
407b9c9cd7 Sync private items with clones; avoid sync if no local connection with thread owner 2019-09-30 16:19:39 +02:00
Mario
d0055310ba Merge branch 'dev' into 'dev'
issue with bearcap tests

See merge request hubzilla/core!1738
2019-09-28 10:36:38 +02:00
zotlabs
02f5fa32af Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-09-26 18:36:06 -07:00
zotlabs
b6590e95b5 issue with bearcap tests 2019-09-26 18:34:08 -07:00
M. Dent
ec65211d54 Merge branch 'admindoc' into 'dev'
Improve admin documentation

See merge request hubzilla/core!1737
2019-09-24 23:36:32 +02:00
Ale Abdo
8dfa08f146 Improve admin documentation 2019-09-24 15:37:47 +02:00
M. Dent
daef2d0546 Merge branch 'dev' into 'dev'
Update plink type for MySQL schema

See merge request hubzilla/core!1736
2019-09-23 19:21:27 +02:00
M. Dent
15eaa80301 Merge branch 'cherry-pick-9aa928ec' into 'dev'
composer update simplepie/simplepie

See merge request hubzilla/core!1735
2019-09-23 19:20:45 +02:00
M. Dent
1e924a8530 Merge branch 'cherry-pick-e4336578' into 'dev'
composer update vendor/league/html-to-markdown/.github/

See merge request hubzilla/core!1734
2019-09-23 19:18:53 +02:00
M. Dent
23995ccb07 Merge branch 'cherry-pick-38cb094e' into 'dev'
composer update ezyang/htmlpurifier

See merge request hubzilla/core!1733
2019-09-23 19:16:59 +02:00
M. Dent
a4f2603454 Merge branch 'cherry-pick-a34ce790' into 'dev'
composer update ezyang/htmlpurifier

See merge request hubzilla/core!1732
2019-09-23 19:16:38 +02:00
M. Dent
cc860b4a76 Merge branch 'cherry-pick-53b8ee78' into 'dev'
composer update blueimp/jquery-file-upload

See merge request hubzilla/core!1731
2019-09-23 19:08:47 +02:00
Max Kostikov
0be82602ce Update schema_mysql.sql 2019-09-23 14:23:47 +02:00
Max Kostikov
b42c42692e Update plink type for MySQL 2019-09-23 14:14:02 +02:00
Mario Vavti
7fcbff3ceb composer update simplepie/simplepie
(cherry picked from commit 9aa928ec8f378c6df2a0c8bbe892ff971c3bc672)
2019-09-23 12:22:35 +02:00
Mario Vavti
efec0af394 composer update vendor/league/html-to-markdown/.github/
(cherry picked from commit e4336578388b3e59ba8130123649ccdc9b8487d0)
2019-09-23 12:22:08 +02:00
Mario Vavti
aafecd9d1e composer update ezyang/htmlpurifier
(cherry picked from commit 38cb094ede8a389ef0b8bb331c1e6a3befd666a8)
2019-09-23 12:21:04 +02:00
Mario Vavti
e37c43ea06 composer update ezyang/htmlpurifier
(cherry picked from commit a34ce790129bdd729a5019895ea6cd4c59f08ba4)
2019-09-23 12:20:28 +02:00
Mario Vavti
3fac7b5bb7 composer update blueimp/jquery-file-upload
(cherry picked from commit 53b8ee7866eb1394980b08b90153a63563832391)
2019-09-23 12:19:33 +02:00
Mario
9b90114d03 Merge branch 'customitem-delivery' into 'dev'
Notify on custom items - rework hooks

See merge request hubzilla/core!1730
2019-09-23 10:11:27 +02:00
M. Dent
7c5cfe6697 Notify on custom items - rework hooks 2019-09-23 10:11:27 +02:00
Mario
d1fd69337f Merge branch 'encode-comment-policy' into 'dev'
Encode comment policy into AS(Z6) packets.

See merge request hubzilla/core!1729
2019-09-23 10:10:56 +02:00
DM42.Net Zap Dev
3fc218111a Add dependency 2019-09-21 23:03:42 -04:00
DM42.Net Zap Dev
c63fb0fc6b comment policy default for ordered items 2019-09-21 13:37:20 -04:00
DM42.Net Zap Dev
6fe4ac241d encode/decode comment_policy for Z6 2019-09-21 13:30:42 -04:00
Max Kostikov
c385b80807 Merge branch 'cherry-pick-394f263d' into 'dev'
fix issue #1331

See merge request hubzilla/core!1728
2019-09-19 12:41:47 +02:00
Mario Vavti
97f36fa46f fix issue #1331
(cherry picked from commit 394f263ddd648e25ff3967bfbe3b0e25dccf89a0)
2019-09-19 12:34:01 +02:00
Mario
856d4b39d1 Merge branch 'dev' into 'dev'
change event formatting slightly for Zot6 and ActivityStreams.

See merge request hubzilla/core!1727
2019-09-18 12:43:45 +02:00
Mario
01abd73a2a Merge branch 'fix_homeinstall_for_Debian_10' into 'dev'
Fix homeinstall for debian 10

See merge request hubzilla/core!1725
2019-09-18 12:42:56 +02:00
zotlabs
375c2a87c7 change event formatting slightly for Zot6 and ActivityStreams. 2019-09-16 23:27:41 -07:00
Max Kostikov
6ca507f8dd Merge branch 'dev' into 'dev'
Prevent image blurring

See merge request hubzilla/core!1726
2019-09-15 09:23:22 +02:00
Max Kostikov
86b4a53858 Prevent image blurring 2019-09-15 09:18:42 +02:00
OJ Random
8959ba9b82 hominstall - readme 2019-09-14 19:14:31 +02:00
OJ Random
a62a230d3d hominstall - fix url rewriting and minor changes. 2019-09-14 19:09:26 +02:00
Max Kostikov
cc45129e9f Merge branch 'dev' into 'dev'
Add selected text quote on comment reply

See merge request hubzilla/core!1724
2019-09-10 10:41:53 +02:00
Max Kostikov
bffc9d5aba Merge branch 'daemon-qwfix' into 'dev'
Return in the case of further processing

See merge request hubzilla/core!1711
2019-09-10 10:41:34 +02:00
Max Kostikov
f2b121cd58 Merge branch 'dev' into 'dev'
Zot -> Zot6 translation issue, liking a "new friend" activity

See merge request hubzilla/core!1723
2019-09-10 10:40:53 +02:00
Max Kostikov
fd30be7644 Add selected text quote on comment reply 2019-09-09 12:35:47 +02:00
zotlabs
d9052c7e3c Zot -> Zot6 translation issue, liking a "new friend" activity 2019-09-03 17:00:10 -07:00
Max Kostikov
dcfe10b691 Merge branch 'dev' into 'dev'
Add CalDAV / CardDAV autodiscovery

See merge request hubzilla/core!1719
2019-09-03 14:33:37 +02:00
Max Kostikov
914a096b42 Merge branch 'dev' into 'dev'
improved conversion of emoji reactions from zot to zot6

See merge request hubzilla/core!1720
2019-09-03 14:33:09 +02:00
Max Kostikov
5fa9dcbc7e Merge branch 'dev' into 'dev'
More nofollow tags to discourage backlink farmers

See merge request hubzilla/core!1722
2019-09-03 14:32:52 +02:00
Terrox
93ec01e0a1 More nofollow tags to discourage backlink farmers 2019-09-03 14:32:52 +02:00
zotlabs
bbc98db6b4 Clarify private mail deletion policy. Related to issue #1391. 2019-08-31 14:43:08 -07:00
zotlabs
1f8d29a221 improved conversion of emoji reactions from zot to zot6 2019-08-31 14:04:10 -07:00
Max Kostikov
d267dd2515 Update Well_known.php 2019-08-30 00:55:36 +02:00
Max Kostikov
51954c7f3d Add CalDAV / CardDAV autodiscovery 2019-08-30 00:51:46 +02:00
Max Kostikov
df842a8e8d Merge branch 'dev' into 'dev'
Better spoiler BBcode tag conversion to Markdown

See merge request hubzilla/core!1718
2019-08-24 00:00:58 +02:00
Max Kostikov
60919488f1 Better spoiler BBcode tag conversion to Markdown 2019-08-23 23:58:07 +02:00
Max Kostikov
4dbaaa63bb Merge branch 'dev' into 'dev'
issues with image import to zot6 - wrong mid. Also label source project of...

See merge request hubzilla/core!1717
2019-08-23 23:09:14 +02:00
zotlabs
8cc4003837 issues with image import to zot6 - wrong mid. Also label source project of zotfeed since it is not completely compatible across projects. 2019-08-22 19:39:11 -07:00
Max Kostikov
35790c584b Merge branch 'dev' into 'dev'
possible for DB to return hublocs with no sitekey

See merge request hubzilla/core!1713
2019-08-22 20:29:53 +02:00
Max Kostikov
09d7cf2cc1 Merge branch 'dev' into 'dev'
Fix attach permissions sync for clonned channel

See merge request hubzilla/core!1716
2019-08-22 20:25:57 +02:00
Max Kostikov
58d7c7f6ae Fix attach permissions sync for clonned channel 2019-08-22 20:20:54 +02:00
Max Kostikov
cab24836d8 Merge branch 'dev' into 'dev'
Fix spoiler displaying while convert BBcode to markdown

See merge request hubzilla/core!1715
2019-08-22 20:20:44 +02:00
Max Kostikov
cf9ef615c9 Fix spoiler displaying while convert BBcode to markdown 2019-08-22 20:17:22 +02:00
zotlabs
8c96032b2b Merge branch 'dev' of https://framagit.org/zot/core into dev 2019-08-21 18:51:25 -07:00
zotlabs
d256551907 possible for DB to return hublocs with no sitekey 2019-08-21 18:50:38 -07:00
DM42.Net Zap Dev
e800e2db2b Return in the case of further processing 2019-08-19 23:13:19 -04:00
Mario Vavti
cc9f41df5f bump version 2019-08-16 20:22:16 +02:00
Mario Vavti
bb3784d8dd update changelog
(cherry picked from commit e5539c0d01)
2019-08-16 20:21:19 +02:00
Mario Vavti
e5539c0d01 update changelog 2019-08-16 20:19:49 +02:00
zotlabs
c997360b4a show correct profile photo when previewing and editing profiles
(cherry picked from commit 808baf203d)
2019-08-16 19:33:38 +02:00
Mario
ea8621d6ec Merge branch 'dev' into 'dev'
zot6 compatibility: when posting from a non-primary clone the actor->id is...

See merge request hubzilla/core!1710
2019-08-16 19:32:08 +02:00
zotlabs
88fa18204f illegal offset warning (prevents encrypted signatures from being used for encrypted messages). Not fatal but can leak metadata.
(cherry picked from commit feda23587c)
2019-08-16 19:29:21 +02:00
zotlabs
ac05a2ede7 support "bearcaps" in Activity library 2019-08-15 21:30:47 -07:00
zotlabs
808baf203d show correct profile photo when previewing and editing profiles 2019-08-15 19:18:46 -07:00
zotlabs
beeafc6bc5 fix bitrot in util/zotsh 2019-08-15 16:28:06 -07:00
zotlabs
6f8c977e73 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-08-15 13:49:02 -07:00
zotlabs
9a2fbdde20 zot6 compatibility: when posting from a non-primary clone the actor->id is that of the primary, resulting in an author/owner identity mismatch. Solution is to always post with the actor->id set to the sender if it is a local channel. 2019-08-14 17:55:56 -07:00
Max Kostikov
b325b2c003 Merge branch 'dev' into 'dev'
illegal offset warning (prevents encrypted signatures from being used for...

See merge request hubzilla/core!1709
2019-08-14 16:35:55 +02:00
zotlabs
feda23587c illegal offset warning (prevents encrypted signatures from being used for encrypted messages). Not fatal but can leak metadata. 2019-08-13 16:53:04 -07:00
Mario Vavti
e8f3b7f853 Merge branch '4.4RC' 2019-08-13 09:46:01 +02:00
Mario Vavti
e28341ca4b bump version 2019-08-13 09:44:28 +02:00
Mario Vavti
6c11a020ee Merge branch 'dev' into 4.4RC 2019-08-13 09:42:21 +02:00
Mario Vavti
7200c2ac0c update changelog 2019-08-13 09:41:58 +02:00
Mario Vavti
732ca49b02 Merge branch 'dev' into 4.4RC 2019-08-13 09:34:32 +02:00
Mario Vavti
ee976ed460 update directory servers 2019-08-13 09:33:23 +02:00
Mario Vavti
06ac3e896a Merge branch 'dev' into 4.4RC 2019-08-13 09:27:03 +02:00
Mario
6ce0f6e806 Merge branch 'dev_homeinstall_debian10' into 'dev'
Changes: Debian 10, MariaDB, adminer

See merge request hubzilla/core!1707
2019-08-13 09:23:36 +02:00
Max Kostikov
e006586275 Merge branch 'rudocs' into 'dev'
Add more Russian context help

See merge request hubzilla/core!1708
2019-08-12 23:01:09 +02:00
Max Kostikov
e9d6b17a00 Merge branch 'dev' into 'rudocs'
# Conflicts:
#   doc/context/ru/network/help.html
2019-08-12 22:55:12 +02:00
OJ Random
bf2f199f37 Changes: Debian 10, MariaDB, adminer 2019-08-12 22:02:28 +02:00
Max Kostikov
718ca548be Delete .gitkeep 2019-08-12 21:57:24 +02:00
Max Kostikov
51c0dc070a Delete .gitkeep 2019-08-12 21:57:07 +02:00
Max Kostikov
d5e0d52bc4 Update help.html 2019-08-12 21:56:50 +02:00
Max Kostikov
f6b99db738 Update help.html 2019-08-12 21:52:21 +02:00
Max Kostikov
ef69294072 Update help.html 2019-08-12 21:52:10 +02:00
Max Kostikov
c56d395c90 Add Russian context help for Connections 2019-08-12 21:43:42 +02:00
Max Kostikov
778e9141d8 Add new directory 2019-08-12 21:27:50 +02:00
Max Kostikov
c70a4662b4 Update help.html 2019-08-12 21:26:43 +02:00
Max Kostikov
e441a31051 Update help.html 2019-08-12 12:04:46 +02:00
Max Kostikov
9f5ec5cc50 Update help.html 2019-08-12 12:02:00 +02:00
Max Kostikov
825ded2e08 Update help.html 2019-08-12 12:00:25 +02:00
Max Kostikov
a7c3776557 Merge branch 'rudocs' into 'dev'
Add Russian context help and update translation

See merge request hubzilla/core!1706
2019-08-12 11:56:13 +02:00
Max Kostikov
1e7cfc2644 Update help.html 2019-08-12 11:38:34 +02:00
Max Kostikov
c6fd32ffde Update help.html 2019-08-12 11:36:35 +02:00
Max Kostikov
5f551a8b47 Update hstrings.php 2019-08-12 11:33:03 +02:00
Max Kostikov
f73ff57148 Update hmessages.po 2019-08-12 11:32:39 +02:00
Max Kostikov
c538d7372e Add Russian context help for network page 2019-08-12 11:25:08 +02:00
Max Kostikov
4e7804ca75 Add new directory 2019-08-12 10:55:50 +02:00
Max Kostikov
8fe715983a Merge branch 'dev' into 'dev'
Updated Spanish translation

See merge request hubzilla/core!1705
2019-08-12 00:14:09 +02:00
Manuel Jiménez Friaza
4a3fb07d5f Updated Spanish translation 2019-08-11 11:15:07 +02:00
Mario Vavti
f5062c0507 Merge branch 'dev' into 4.4RC 2019-08-11 10:56:00 +02:00
Mario Vavti
f0d7a17b72 linkinfo: only allow to embed public items 2019-08-11 10:55:38 +02:00
Manuel Jiménez Friaza
b89d2d7580 Merge remote-tracking branch 'upstream/dev' into dev 2019-08-11 10:39:03 +02:00
Mario Vavti
7a7f57fa45 Merge branch 'dev' into 4.4RC 2019-08-11 10:23:14 +02:00
Max Kostikov
047dd31724 Merge branch 'dev' into 'dev'
Improve plink to share tag detection

See merge request hubzilla/core!1704
2019-08-10 11:23:51 +02:00
Max Kostikov
0ce1a200f7 Improve plink to share tag detection 2019-08-10 11:15:48 +02:00
Mario Vavti
0e0024218f Merge branch 'dev' into 4.4RC 2019-08-09 22:21:40 +02:00
Mario Vavti
4886d088e9 use stripos() to match the body against terms in format_hashtags() 2019-08-09 22:19:51 +02:00
Mario Vavti
6eec6e2d65 update changelog 2019-08-09 21:58:25 +02:00
Mario Vavti
6c12880f5b fix version 2019-08-09 20:37:06 +02:00
Mario Vavti
eb472111a8 Merge branch 'dev' into 4.4RC 2019-08-09 20:35:25 +02:00
Mario Vavti
8d8b7ed567 make fetch logging less chatty
(cherry picked from commit 130cfbf231)
2019-08-09 20:34:38 +02:00
Mario Vavti
681dc70205 Merge branch 'dev' into 4.4RC 2019-08-09 20:33:45 +02:00
Mario Vavti
130cfbf231 make fetch logging less chatty 2019-08-09 20:33:03 +02:00
Mario
940e4a6152 Merge branch 'dev' into 'dev'
Replace plink URL with 'share' tag if possible

See merge request hubzilla/core!1703
2019-08-09 20:26:54 +02:00
Max Kostikov
38f7d9ad37 Replace plink URL with 'share' tag if possible 2019-08-09 19:01:21 +02:00
Max Kostikov
e896d316f2 Merge branch 'dev' into 'dev'
More intelligent quotation shortening while link embedding

See merge request hubzilla/core!1702
2019-08-09 17:05:05 +02:00
Max Kostikov
af690b64d6 More intelligent quotation shortening while link embedding 2019-08-09 16:59:14 +02:00
Max Kostikov
699aad8626 Merge branch 'dev' into 'dev'
Catch and exclude trailing punctuation while URL embedding

See merge request hubzilla/core!1701
2019-08-08 18:53:14 +02:00
Max Kostikov
4382e53acb Remove condition 2019-08-08 18:37:05 +02:00
Max Kostikov
832adf92a6 Update zid.php 2019-08-08 18:30:08 +02:00
Max Kostikov
33e2582918 Update zid.php 2019-08-08 18:29:26 +02:00
Max Kostikov
1c2f413211 Formatting 2019-08-08 18:27:07 +02:00
Max Kostikov
2300581c93 Catch and exclude trailing punctuation while URL embedding 2019-08-08 18:19:07 +02:00
Max Kostikov
03c4fba730 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1700
2019-08-02 23:51:55 +02:00
Max Kostikov
75a8b209f5 Update hstrings.php 2019-08-02 23:42:09 +02:00
Max Kostikov
d554b41fea Update hmessages.po 2019-08-02 23:41:54 +02:00
Mario Vavti
b0db1f827e version 2019-08-01 22:37:52 +02:00
Mario Vavti
3070baf04e version 2019-08-01 22:36:51 +02:00
Mario Vavti
72629ca511 bump version 2019-08-01 22:11:27 +02:00
Mario Vavti
1c39fc71d9 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-08-01 22:07:07 +02:00
Mario Vavti
0bb59b66be update license 2019-08-01 22:00:11 +02:00
Mario Vavti
31b177f8ad update strings 2019-08-01 21:46:24 +02:00
Max Kostikov
8ee5ced08d Merge branch 'dev' into 'dev'
Minor optimizations on static file serve

See merge request hubzilla/core!1699
2019-08-01 21:01:12 +02:00
Max Kostikov
c96a1632f5 Minor optimizations on static file serve 2019-08-01 20:55:08 +02:00
Max Kostikov
b3b2649814 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1698
2019-07-31 19:57:44 +02:00
Max Kostikov
95805d2e7c Update hstrings.php 2019-07-31 19:50:07 +02:00
Max Kostikov
d4b92141fd Update hmessages.po 2019-07-31 19:49:51 +02:00
Max Kostikov
829e915c90 Merge branch 'dev' into 'dev'
Do not limit channel if service class property value set with 0

See merge request hubzilla/core!1697
2019-07-31 17:21:06 +02:00
Max Kostikov
aaffc7485d Update account.php 2019-07-31 17:18:11 +02:00
Max Kostikov
9ea1d6e8af Do not limit channel if service class property value set with 0 2019-07-31 17:09:24 +02:00
Mario
17661b4b5f Merge branch 'dev' into 'dev'
Do not control limits on service class settings with 0 values

See merge request hubzilla/core!1696
2019-07-30 23:08:42 +02:00
Mario
32874b89ca Merge branch 'dev' into 'dev'
fix urls on imported item taxonomy

See merge request hubzilla/core!1695
2019-07-30 23:07:33 +02:00
Max Kostikov
d4a038c437 Update account.php 2019-07-30 13:59:12 +02:00
Max Kostikov
59fed33797 Do not control limits on service class settings with 0 values 2019-07-30 11:54:14 +02:00
zotlabs
feea137dbf hz core issue #1386 - function name must be a string 2019-07-28 23:46:38 -07:00
zotlabs
70e4a2c4fa Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-07-28 20:00:14 -07:00
zotlabs
696359daba fix urls on imported item taxonomy 2019-07-28 19:57:17 -07:00
Max Kostikov
5695350e98 Revert "Merge branch 'dev' into 'dev'"
This reverts merge request !1694
2019-07-25 12:25:27 +02:00
Mario Vavti
4e3a0720c3 minor css adjustions 2019-07-23 23:32:32 +02:00
Mario Vavti
dc56d8560d pleroma uses slightly different URLs in body - also look for the string 2019-07-22 20:38:10 +02:00
Mario Vavti
81ecea29c8 reflect repeats in notifications, use force flag for import_xchan_photo() in cron 2019-07-22 19:11:52 +02:00
Mario Vavti
ad58697521 move image attachments to the top 2019-07-19 18:45:34 +02:00
Mario Vavti
6ca7527ec9 add hashtag to appschema and bump appschema rev 2019-07-18 14:19:32 +02:00
Mario Vavti
8ced3699c2 fallback to id if href is not available 2019-07-18 13:52:39 +02:00
Mario Vavti
c4de5b45df do not format hashtags with missing url 2019-07-18 13:19:10 +02:00
Mario Vavti
71056e1db1 fix issue with encoding hashtags and silence parent fetch logging 2019-07-18 13:02:19 +02:00
Mario Vavti
f94faeeace streamline keyId and creator/actor 2019-07-17 23:36:41 +02:00
Mario Vavti
80f56a1315 minor css fix 2019-07-17 15:14:05 +02:00
Mario
485f5a07ed Merge branch 'dev' into 'dev'
Exclude trailing punctuations from URL

See merge request hubzilla/core!1694
2019-07-16 18:11:47 +02:00
Max Kostikov
821af482f0 Exclude trailing punctuations from URL 2019-07-16 18:11:47 +02:00
Mario Vavti
b2d1fadf66 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-07-15 15:06:08 +02:00
Mario Vavti
3b73e5223e stringify_array_elms() could return weird results if the initial array key was not zero. this could trigger obscure bugs e.g. adding an empty string value to the recipients array in the notifier which could then select some broken hubloc/xchan entries. 2019-07-15 15:05:54 +02:00
Max Kostikov
6a964e7caf Merge branch 'dev' into 'dev'
Fix ETag quotes

See merge request hubzilla/core!1693
2019-07-15 11:00:55 +02:00
Max Kostikov
a6f06c2d94 Fix ETag quotes 2019-07-15 10:57:04 +02:00
Mario
a85f0a93c6 Merge branch 'serve-static-files' into 'dev'
Serve static files directly if not caught by web server

See merge request hubzilla/core!1691
2019-07-15 09:55:11 +02:00
Mario
250387c7e5 Merge branch 'queueworker-updates' into 'dev'
Hookify Zotlabs\Daemon\Master::Summon

See merge request hubzilla/core!1692
2019-07-15 09:51:42 +02:00
DM42.Net (Matt Dent)
dde7144f5a Hookify Zotlabs\Daemon\Master::Summon 2019-07-15 00:25:19 -04:00
DM42.Net (Matt Dent)
68733a2bc0 Serve static files directly if not caught by web server 2019-07-14 23:56:11 -04:00
Mario Vavti
b2d3a11de8 update certs 2019-07-13 21:30:51 +02:00
Mario Vavti
a024e4c10a Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-07-13 20:00:05 +02:00
Mario Vavti
db6e4d1c32 admin should be allowed to delete any item 2019-07-13 19:59:52 +02:00
Max Kostikov
8393c382c3 Merge branch 'dev' into 'dev'
Missprint in Russian translation fixed

See merge request hubzilla/core!1690
2019-07-13 09:57:41 +02:00
Max Kostikov
5c0e3688fe Missprint fixed 2019-07-13 09:48:53 +02:00
Max Kostikov
1e6c07246e Missprint fixed 2019-07-13 09:48:20 +02:00
Mario
e5370971d6 Merge branch 'dev' into 'dev'
emoji reactions from hubzilla becoming top level posts on zap because of missing object

See merge request hubzilla/core!1689
2019-07-12 13:00:14 +02:00
Mario Vavti
090d921006 webfinger: better handling of URLs that contain a @ 2019-07-12 12:43:12 +02:00
zotlabs
39c0a7525b emoji reactions from hubzilla becoming top level posts on zap because of missing object 2019-07-11 20:47:38 -07:00
Mario Vavti
407b02bde8 calendar: revert back to UTC strings for dates due to better legibility. Strip timezone info from UTC string and always treat values as UTC. 2019-07-11 11:12:27 +02:00
Mario Vavti
da7912b879 calendar: display date values as ISO string 2019-07-09 23:17:48 +02:00
Mario Vavti
02c08aed12 hide timezone select on allday events 2019-07-08 21:12:54 +02:00
Mario Vavti
87668f7fa8 fix typo 2019-07-03 22:13:14 +02:00
Mario
001734a725 Merge branch 'dev' into 'dev'
begin directory migration to zot6, see the code comments

See merge request hubzilla/core!1687
2019-07-02 22:02:15 +02:00
zotlabs
276ab3eae3 I'm pretty sure the LD construct 'diaspora:guid' isn't actually legal without a definition of 'diaspora' in the current or parent LD context. 2019-07-01 23:28:31 -07:00
zotlabs
1b976f30f3 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-07-01 23:28:17 -07:00
Max Kostikov
019afe2a1a Merge branch 'dev' into 'dev'
Fix missprint in German translation

See merge request hubzilla/core!1688
2019-07-01 23:44:51 +02:00
Max Kostikov
37ebcd3b4f Update hstrings.php 2019-07-01 23:40:14 +02:00
zotlabs
5ad6eeccdf add opengraph meta info to channel page 2019-06-29 16:34:06 -07:00
zotlabs
65cd33cb15 zot_finger() and Zotlabs\Zot\Finger::run() have different output. Adjusted accordingly. 2019-06-28 16:59:15 -07:00
zotlabs
4aa59226d7 I wonder how long zot_finger() has been missing and how this may have affected the directory servers. 2019-06-28 16:49:23 -07:00
zotlabs
d53c98860d minor fix 2019-06-28 16:29:56 -07:00
zotlabs
d022e1acce Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-06-28 16:25:00 -07:00
zotlabs
98100520eb begin directory migration to zot6, see the code comments 2019-06-28 16:21:54 -07:00
Mario Vavti
42526fc2dc decode encoded mid 2019-06-28 13:09:44 +02:00
Mario Vavti
9c76afa2a3 missing class import 2019-06-28 10:35:32 +02:00
Mario Vavti
943db4496b regenerate autoload cache 2019-06-28 09:58:22 +02:00
zotlabs
4a77b6673b support zot and zot6 in social graph operations (suggestions, common friends)
(cherry picked from commit 9def9a5cb7)
2019-06-28 09:43:06 +02:00
zotlabs
62b31b1e4a photo objects: incorrect media type on links
(cherry picked from commit 60c003733e)
2019-06-28 09:42:19 +02:00
zotlabs
ddde4e1965 extend definition of direct message to anything with allow_cid but *not* allow_gid.
(cherry picked from commit 96a99935ef)
2019-06-28 09:38:28 +02:00
zotlabs
96a99935ef extend definition of direct message to anything with allow_cid but *not* allow_gid. 2019-06-27 18:37:36 -07:00
zotlabs
60c003733e photo objects: incorrect media type on links 2019-06-27 17:36:29 -07:00
zotlabs
9def9a5cb7 support zot and zot6 in social graph operations (suggestions, common friends) 2019-06-27 17:05:25 -07:00
Mario Vavti
145295302d fix typo 2019-06-27 13:45:51 +02:00
Mario Vavti
302d2dbd51 do not check send_stream permission for comments 2019-06-27 13:11:59 +02:00
Mario
49ba3ffee6 Merge branch 'httpsig' into 'dev'
http signature consolidation

See merge request hubzilla/core!1685
2019-06-27 13:05:25 +02:00
zotlabs
d83ce0863a Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-06-26 21:54:50 -07:00
zotlabs
cf844cb27c http signature consolidation 2019-06-26 21:45:21 -07:00
Mario Vavti
5ccef18d4e port some functions from osada 2019-06-26 14:00:44 +02:00
Mario
40bbdfdf6a Merge branch 'dev' into 'dev'
provide auto redirect from zot6 /item permalinks

See merge request hubzilla/core!1684
2019-06-26 09:21:22 +02:00
Mario
ad8ad0ccd7 Merge branch 'fix-item_export-api-path' into 'dev'
Make export_page API endpoint match ZAP

See merge request hubzilla/core!1683
2019-06-26 09:21:09 +02:00
Mario
1cf012650b Merge branch 'export_items-export_all' into 'dev'
Export items export all

See merge request hubzilla/core!1680
2019-06-26 09:20:54 +02:00
zotlabs
4f280b5497 allow api login by address or url (url will use zot6 hubloc records, address can use either zot or zot6 hubloc records) 2019-06-25 18:47:16 -07:00
zotlabs
5ee7009271 provide auto redirect from zot6 /item permalinks 2019-06-25 18:37:27 -07:00
DM42.Net (Matt Dent)
07f850ed15 Make export_page API endpoint match ZAP 2019-06-23 20:23:03 -04:00
Max Kostikov
1b6fbe3a2e Merge branch 'dev' into 'dev'
Fix thumbnails processing logic on files sync

See merge request hubzilla/core!1682
2019-06-21 23:26:12 +02:00
Max Kostikov
b1b415ec5b Fix thumbnails processing logic on files sync 2019-06-21 23:15:16 +02:00
Max Kostikov
8730bbac2f Revert "Respect photo thumbnails storage in import"
This reverts commit e8918ca149
2019-06-21 22:42:38 +02:00
Max Kostikov
e8918ca149 Respect photo thumbnails storage in import 2019-06-21 22:27:27 +02:00
DM42.Net (Matt Dent)
82478eef09 export all items except photos 2019-06-21 14:23:16 -04:00
zotlabs
892e9cd835 minor zot6 compatibility issues uncovered through daily use
(cherry picked from commit becaa3b920)
2019-06-21 13:03:58 +02:00
Mario Vavti
3dd6499ac4 fix mid not dbesc'd. the comment was no longer true. this fixes an issue with mid's that contain single quotes 2019-06-21 10:37:09 +02:00
Mario Vavti
109c66aea3 apply calendar encoding fixes to mod cal
(cherry picked from commit 24b0f8e27e)
2019-06-20 18:45:12 +02:00
Mario Vavti
24b0f8e27e apply calendar encoding fixes to mod cal 2019-06-20 18:44:23 +02:00
Mario Vavti
1a76e83fa4 fix encoding also for description and location
(cherry picked from commit f37387de80)
2019-06-20 18:40:57 +02:00
Mario Vavti
2fa788b01b various calendar UI improvements: make day- and weeknumbers clickable for navigation, hide start and end time fields in month view (only allday events can be generated there), remove the action arg from changeView().
;


(cherry picked from commit 4f705fc3f8)
2019-06-20 18:40:39 +02:00
zotlabs
028cbdcffa tweak to event title encoding to ensure it works with German, Russian, as well as angle chars
(cherry picked from commit 952e466d91)
2019-06-20 18:40:19 +02:00
zotlabs
8aefbd911b events: don't use htmlentities on local (hz) event titles as they are not being used in textareas and umlauts for instance are getting mangled on the calendar display
(cherry picked from commit c1cc76119c)
2019-06-20 18:39:58 +02:00
Mario Vavti
f37387de80 fix encoding also for description and location 2019-06-20 18:34:44 +02:00
Mario Vavti
4f705fc3f8 various calendar UI improvements: make day- and weeknumbers clickable for navigation, hide start and end time fields in month view (only allday events can be generated there), remove the action arg from changeView().
;
2019-06-20 18:27:46 +02:00
Mario
5b727065cf Merge branch 'dev' into 'dev'
changes to support direct messages in zot6 (set item.item_private = 2 when...

See merge request hubzilla/core!1679
2019-06-20 17:32:10 +02:00
zotlabs
952e466d91 tweak to event title encoding to ensure it works with German, Russian, as well as angle chars 2019-06-19 22:13:03 -07:00
zotlabs
c1cc76119c events: don't use htmlentities on local (hz) event titles as they are not being used in textareas and umlauts for instance are getting mangled on the calendar display 2019-06-19 21:41:46 -07:00
zotlabs
9d156141b1 changes to support direct messages in zot6 (set item.item_private = 2 when private mentions are used and federate with zot:directMessage attribute which aligns with litepub:directMessage) 2019-06-19 17:32:38 -07:00
Max Kostikov
8c92b0cd3a Merge branch 'dev' into 'dev'
Remove cached photo location directory on delete if empty

See merge request hubzilla/core!1678
2019-06-19 23:26:54 +02:00
Max Kostikov
dd515da889 Remove cached photo location directory on delete if empty 2019-06-19 23:13:53 +02:00
Max Kostikov
2862b69d56 Merge branch 'dev' into 'dev'
Use html_entity_decode() for cached photo URL

See merge request hubzilla/core!1677
2019-06-19 13:26:36 +02:00
Max Kostikov
db8e46184b Use html_entity_decode() for cached photo URL 2019-06-19 13:20:32 +02:00
Max Kostikov
99a7cd3cfb Merge branch 'dev' into 'dev'
Include Zot6 hubs in the Grid scope

See merge request hubzilla/core!1676
2019-06-19 10:29:19 +02:00
Max Kostikov
75746d714a Update zid.php 2019-06-19 09:39:56 +02:00
Max Kostikov
983d6d3b42 Include Zot6 hubs in the Grid scope 2019-06-18 22:17:50 +02:00
Max Kostikov
060dd8b020 Merge branch 'dev' into 'dev'
Update German and Russian translations

See merge request hubzilla/core!1674
2019-06-18 20:40:32 +02:00
Max Kostikov
b5be0a2e3e Update hstrings.php 2019-06-18 20:28:23 +02:00
Max Kostikov
46a687b0a6 Update hmessages.po 2019-06-18 20:28:07 +02:00
Max Kostikov
4ff7aa4352 Update hstrings.php 2019-06-18 20:15:54 +02:00
Max Kostikov
750d1f820d Update hmessages.po 2019-06-18 20:15:40 +02:00
Mario
f046a34d34 Merge branch 'patch-2' into 'master'
Fix os_path replace for thumbnails

See merge request hubzilla/core!1673
2019-06-18 19:17:33 +02:00
Max Kostikov
0d165920bb Merge branch 'dev' into 'dev'
Fix os_path replace for thumbnails

See merge request hubzilla/core!1672
2019-06-18 18:24:19 +02:00
Max Kostikov
9e3a4402e0 Fix os_path replace for thumbnails 2019-06-18 18:19:17 +02:00
Max Kostikov
34d7aea1be Fix os_path replace for thumbnails 2019-06-18 18:17:28 +02:00
Max Kostikov
e2abc0b727 Merge branch 'dev' into 'dev'
Dev

See merge request kostikov/core!1
2019-06-18 11:47:26 +02:00
Max Kostikov
a677a68ab7 Avoid to process original images using storeThumbnail 2019-06-18 11:31:14 +02:00
Mario Vavti
df228237de fix typo
(cherry picked from commit 619b39f955)
2019-06-18 10:37:56 +02:00
Mario
fc2a038ee1 Merge branch 'dev' into 'dev'
minor zot6 compatibility issues uncovered through daily use

See merge request hubzilla/core!1671
2019-06-18 10:35:50 +02:00
Mario Vavti
619b39f955 fix typo 2019-06-18 10:33:30 +02:00
zotlabs
becaa3b920 minor zot6 compatibility issues uncovered through daily use 2019-06-17 18:30:05 -07:00
Mario Vavti
c0b9ab930d update composer libs 2019-06-17 11:50:17 +02:00
Mario Vavti
f106b1db15 changelog and version 2019-06-17 10:45:43 +02:00
Mario Vavti
958217dd55 changelog and version 2019-06-17 10:42:56 +02:00
Mario Vavti
2f80fdae97 Merge branch 'dev' 2019-06-17 10:28:47 +02:00
Mario Vavti
9507f191b0 disable events module. it is now disfunctional 2019-06-17 10:16:49 +02:00
Mario Vavti
92f5d8c8be remove old fullcalendar library 2019-06-17 10:11:36 +02:00
Mario Vavti
8535eb7bf5 update feature set 2019-06-17 10:10:44 +02:00
Mario Vavti
c9604eaabf revisit mod cal 2019-06-17 10:07:00 +02:00
Mario
3bc214e544 Merge branch 'dev' into 'dev'
Add signatures processing for private messages

See merge request hubzilla/core!1670
2019-06-15 23:07:39 +02:00
Max Kostikov
43cec4398d base64 encode message signature 2019-06-15 16:03:35 +02:00
Max Kostikov
335394aaa1 Add base64 decode if signature encoded 2019-06-15 15:58:55 +02:00
Max Kostikov
c9615cc19c Formatting 2019-06-14 21:08:53 +02:00
Max Kostikov
5315d8fe3f Add signature when private message displaying 2019-06-14 20:59:07 +02:00
Max Kostikov
75dedb3345 Add signature when send private message 2019-06-14 20:57:28 +02:00
Max Kostikov
134dfb8804 Formatting 2019-06-14 20:56:00 +02:00
Max Kostikov
86f4a8d33a Add signatures processing for private messages 2019-06-14 20:54:42 +02:00
Max Kostikov
abeb924554 Add signatures processing for private messages 2019-06-14 20:53:43 +02:00
Max Kostikov
4da3933f24 Add signatures processing for private messages 2019-06-14 20:52:21 +02:00
Mario Vavti
c5703306ef fix mod cal regression
(cherry picked from commit a26774b99e)
2019-06-14 09:53:26 +02:00
Mario Vavti
a26774b99e fix mod cal regression 2019-06-14 09:52:54 +02:00
Mario
9258593776 Merge branch 'dev' into 'dev'
zot6 protocol edge case

See merge request hubzilla/core!1669
2019-06-14 09:13:57 +02:00
Mario Vavti
48604041e8 fix typo 2019-06-14 09:12:47 +02:00
zotlabs
57ed9ec8e2 zot6 protocol edge case 2019-06-13 18:28:33 -07:00
Mario Vavti
801ab611ed more work on linked item/resource deletion for photos and events, deprecate the force flag in drop_item() and comment out goaway() in drop_item(). 2019-06-13 13:34:04 +02:00
Mario Vavti
bc34167c84 port delete fixes from zap 2019-06-12 12:46:29 +02:00
Mario Vavti
decd0dc035 more work on event item deletion 2019-06-12 11:27:39 +02:00
Mario Vavti
9ac9c693ad initial support for deleting event items if an event is removed 2019-06-12 10:07:18 +02:00
Mario
9b2cd69c0f Merge branch 'dev' into 'dev'
attach sync issues

See merge request hubzilla/core!1668
2019-06-12 10:00:17 +02:00
zotlabs
b3f1a19db6 zot6 deletion issue 2019-06-11 20:22:57 -07:00
zotlabs
f3b6708a92 attach sync issues 2019-06-11 18:00:42 -07:00
Mario
8848885d9a Merge branch 'patch-1' into 'master'
Add resize on image scale to 4 and 7

See merge request hubzilla/core!1667
2019-06-11 17:16:41 +02:00
Max Kostikov
c1cab6789e Add resize on image scale to 4 and 7 2019-06-11 12:55:28 +02:00
Max Kostikov
907777eeb0 Add resize on image scale to 4 and 7 2019-06-11 12:53:46 +02:00
Mario Vavti
7889612edc remove sizeRangeSuffixes. they can cause issues with profile photos.
(cherry picked from commit e81e264988)
2019-06-10 22:40:36 +02:00
Mario Vavti
e81e264988 remove sizeRangeSuffixes. they can cause issues with profile photos. 2019-06-10 22:39:53 +02:00
Mario
eacc29ded0 add the thumbrepair script
(cherry picked from commit 15874ac45c)
2019-06-10 22:36:10 +02:00
Mario
ea04c93bfd resolve merge conflict
(cherry picked from commit 761fc74a67)
2019-06-10 22:35:30 +02:00
Mario
8692977585 fix storageconv issue with postgres
(cherry picked from commit 0e2239e50b)
2019-06-10 22:35:14 +02:00
Mario
6a40f3ed60 Revert "PgSQL compatibility on conversion"
This reverts commit dd1f631d9d
2019-06-10 22:34:51 +02:00
Max Kostikov
dd1f631d9d PgSQL compatibility on conversion
(cherry picked from commit 94254e61c1)
2019-06-10 22:32:54 +02:00
Mario
15874ac45c add the thumbrepair script 2019-06-10 22:30:38 +02:00
Mario
761fc74a67 resolve merge conflict 2019-06-10 21:52:29 +02:00
Mario
0e2239e50b fix storageconv issue with postgres 2019-06-10 21:49:34 +02:00
Max Kostikov
e9a17517d3 Merge branch 'dev' into 'dev'
PgSQL compatibility on conversion

See merge request hubzilla/core!1665
2019-06-10 20:03:55 +02:00
Max Kostikov
94254e61c1 PgSQL compatibility on conversion 2019-06-10 19:51:55 +02:00
Mario Vavti
9f403a4d6b fix css issue
(cherry picked from commit 55792d5528)
2019-06-07 09:58:51 +02:00
Mario Vavti
55792d5528 fix css issue 2019-06-07 09:51:26 +02:00
Mario Vavti
a3f726baa8 fix embedphotos image size
(cherry picked from commit ebc2b23c3a)
2019-06-07 08:45:58 +02:00
Mario Vavti
ebc2b23c3a fix embedphotos image size 2019-06-07 08:45:08 +02:00
Mario Vavti
e4ca3609d9 Merge branch '4.2RC' 2019-06-04 10:19:04 +02:00
Mario Vavti
bc092d8d78 version 4.2 2019-06-04 10:16:06 +02:00
Mario Vavti
dd5933b048 Merge branch 'dev' into 4.2RC 2019-06-04 10:13:59 +02:00
Mario Vavti
5d6128b25c update changelog 2019-06-04 10:13:25 +02:00
Mario Vavti
24cb04c346 do not change default timezone in parse_ical_file()
(cherry picked from commit f1b54cf0a4)
2019-06-03 22:43:20 +02:00
Mario Vavti
f1b54cf0a4 do not change default timezone in parse_ical_file() 2019-06-03 22:37:03 +02:00
Mario Vavti
e64a7b87a8 fix timezone issue when importing adjusted events
(cherry picked from commit 2b452ea3e8)
2019-06-03 21:04:51 +02:00
Mario Vavti
2b452ea3e8 fix timezone issue when importing adjusted events 2019-06-03 21:03:43 +02:00
Mario
66c6c6c7d1 regard timezones in calendar import/export
(cherry picked from commit 5b4aa1afc2)
2019-06-03 13:27:16 +02:00
Mario
5b4aa1afc2 regard timezones in calendar import/export 2019-06-03 13:25:48 +02:00
Mario Vavti
89205276ab update changelog
(cherry picked from commit 6d2ab6a7d6)
2019-06-03 11:49:04 +02:00
Mario Vavti
6d2ab6a7d6 update changelog 2019-06-03 11:48:30 +02:00
Mario Vavti
e6da910ee2 Merge branch 'dev' into 4.2RC 2019-06-03 11:44:31 +02:00
Max Kostikov
2100ac3cfc Merge branch 'dev' into 'dev'
fix category widget when using articles

See merge request hubzilla/core!1664
2019-05-31 23:28:09 +02:00
zotlabs
c7476a1d96 fix category widget when using articles 2019-05-31 14:19:04 -07:00
Max Kostikov
d8c3033941 Merge branch 'dev' into 'dev'
live-update not triggering on mod_search

See merge request hubzilla/core!1662
2019-05-30 19:50:58 +02:00
Max Kostikov
7e26ee5a73 Merge branch 'dev' into 'dev'
Add single photo URL rewrite for clonned channel

See merge request hubzilla/core!1663
2019-05-30 13:45:20 +02:00
Max Kostikov
a8e25ccfe6 Add single photo URL rewrite for clonned channel 2019-05-30 13:41:32 +02:00
zotlabs
b6267ec7c2 live-update not triggering on mod_search 2019-05-29 17:04:27 -07:00
Mario Vavti
b6bd2884d5 Merge branch 'dev' into 4.2RC 2019-05-29 09:08:40 +02:00
Mario
767a235611 Merge branch 'dev' into 'dev'
support 'expires' over Zot6

See merge request hubzilla/core!1661
2019-05-29 09:06:52 +02:00
zotlabs
620fc06b6c anomolies in calls to datetime_convert in include/import 2019-05-28 23:14:22 -07:00
zotlabs
0fa4c89a1b convert AS "instrument" objects to the more appropriate "generator" - this probably should happen in pubcrawl addon also 2019-05-28 20:23:03 -07:00
zotlabs
1bf046c142 Revert "another forum -> group wording change" (wrong tree)
This reverts commit 7c2aafd4ee.
2019-05-28 16:35:41 -07:00
zotlabs
52f8429218 support 'expires' over Zot6 2019-05-28 16:28:03 -07:00
zotlabs
932b414063 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-05-28 16:16:29 -07:00
Mario Vavti
097b2390db update changelog
(cherry picked from commit ca8d252ad7)
2019-05-28 12:31:48 +02:00
Mario Vavti
ca8d252ad7 update changelog 2019-05-28 12:07:14 +02:00
Mario Vavti
23a0dbe3cc 4.2RC2 2019-05-27 08:19:23 +02:00
Mario Vavti
545ece82b3 Merge branch '4.2RC' of https://framagit.org/hubzilla/core into 4.2RC 2019-05-27 08:09:36 +02:00
Mario Vavti
eaea947b74 Merge branch 'dev' into 4.2RC 2019-05-27 08:07:26 +02:00
Mario Vavti
f1b61d5882 mod cal band-aid fixes 2019-05-26 20:22:40 +02:00
Mario Vavti
e466d72058 adjust birthday handling according to community decision and slightly change display of allday event items 2019-05-26 18:05:11 +02:00
Mario Vavti
385be35ed5 fix #1374
(cherry picked from commit 528b9b6a60)
2019-05-24 12:27:14 +02:00
Mario Vavti
528b9b6a60 fix #1374 2019-05-24 10:27:45 +02:00
Mario Vavti
dd374eaebf get channel from photo uid
(cherry picked from commit 9ea483d1dc)
2019-05-24 09:59:17 +02:00
Mario Vavti
9ea483d1dc get channel from photo uid 2019-05-24 09:57:46 +02:00
Mario Vavti
b1813df61a add new directory fallback server 2019-05-23 08:46:16 +02:00
Mario Vavti
8715f74d29 Merge branch 'dev' into 4.2RC 2019-05-23 08:44:44 +02:00
Mario Vavti
152224944b add new directory fallback server 2019-05-23 08:43:48 +02:00
Mario Vavti
f86d12c8f4 Merge branch 'dev' into 4.2RC 2019-05-23 08:37:52 +02:00
Mario
94d4bc4bac Merge branch 'dev' into 'dev'
translate make-friend activities to zot6

See merge request hubzilla/core!1654
2019-05-22 12:59:41 +02:00
Mario Vavti
c95488549d Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-05-22 12:41:01 +02:00
Mario Vavti
39613aa2d9 improve timezone detection for caldav and remove smart birthday feature. Force adjust birthdays until we agree on how to deal with this. 2019-05-22 12:40:37 +02:00
zotlabs
7c2aafd4ee another forum -> group wording change 2019-05-21 18:23:45 -07:00
Mario Vavti
e834c7fe3e remove unused code 2019-05-21 12:31:50 +02:00
Mario Vavti
f96958adf8 fix all day events for caldav calendars 2019-05-21 12:29:00 +02:00
zotlabs
776074b24f translate make-friend activities to zot6 2019-05-20 19:03:10 -07:00
Mario Vavti
c9d64d75f3 move smart birthday feature to calendar settings and override the adjust flag at display time instead of import 2019-05-20 13:51:53 +02:00
Mario Vavti
9651689bb8 fix event notifications viewall url 2019-05-20 13:14:54 +02:00
Mario
75be0475ba Merge branch 'es-es' into 'dev'
Update es-es

See merge request hubzilla/core!1651
2019-05-20 13:08:37 +02:00
Mario
e130b58b20 Merge branch 'es-es' into '4.2RC'
Update es-es

See merge request hubzilla/core!1652
2019-05-20 13:06:55 +02:00
Mario Vavti
e44f0c497f be more precise with table selection 2019-05-20 12:34:05 +02:00
Mario Vavti
2d0f96d28b Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-05-20 12:27:00 +02:00
Mario Vavti
34d1f79777 calendar merge: initial commit for timezone support 2019-05-20 12:26:33 +02:00
Manuel Jiménez Friaza
2185ccd4ea Merge branch 'cherry-pick-350e636e' into 'es-es'
Updated Spanish translation

See merge request mjfriaza/core!7
2019-05-19 14:03:17 +02:00
Manuel Jiménez Friaza
125634759d Updated Spanish translation
(cherry picked from commit 350e636e3d)
2019-05-19 13:57:04 +02:00
Manuel Jiménez Friaza
350e636e3d Updated Spanish translation 2019-05-19 13:52:17 +02:00
Manuel Jiménez Friaza
429140df97 Merge remote-tracking branch 'upstream/dev' into dev 2019-05-19 13:25:00 +02:00
Xanthor
a921deafd1 Fix a really disturbing comment
(cherry picked from commit 823c0434eb)

(cherry picked from commit af2b263bc7)
2019-05-17 12:28:41 +02:00
Mario Vavti
071fba2f71 wiki: urlencode the entire share link
(cherry picked from commit aa120e0478)
2019-05-17 12:28:13 +02:00
Mario Vavti
9de729e3e7 wiki: urlencode the entire share link
(cherry picked from commit aa120e0478)
2019-05-17 12:27:54 +02:00
Mario Vavti
7cf5bd30f2 use escape_tags() wiki headers
(cherry picked from commit e7f1f496c5)
2019-05-17 12:27:18 +02:00
Mario Vavti
e6cee2965a use escape_tags() wiki headers
(cherry picked from commit e7f1f496c5)
2019-05-17 12:26:03 +02:00
Xanthor
af2b263bc7 Fix a really disturbing comment
(cherry picked from commit 823c0434eb)
2019-05-17 12:25:22 +02:00
Mario Vavti
aa120e0478 wiki: urlencode the entire share link 2019-05-17 12:24:25 +02:00
Mario
b07c55a0d9 Merge branch 'patch-1' into 'master'
Fix a really disturbing comment

See merge request hubzilla/core!1650
2019-05-17 12:01:21 +02:00
Mario Vavti
e7f1f496c5 use escape_tags() wiki headers 2019-05-17 11:57:41 +02:00
Xanthor
823c0434eb Fix a really disturbing comment 2019-05-17 05:23:12 +02:00
Mario Vavti
22162635e7 calendar merge: only export events that will not break the importer. this will probably dismiss some old experimental entries
(cherry picked from commit 8be0031602)
2019-05-15 18:25:59 +02:00
Mario Vavti
8be0031602 calendar merge: only export events that will not break the importer. this will probably dismiss some old experimental entries 2019-05-15 18:21:52 +02:00
Mario Vavti
29c5e74d31 missing backslash
(cherry picked from commit 3c8867a1e8)
2019-05-15 11:40:36 +02:00
Mario Vavti
3c8867a1e8 missing backslash 2019-05-15 11:38:23 +02:00
Mario Vavti
c439fe0437 add autocomplete js to calendar and fix issue with extended likes mid
(cherry picked from commit 15a000bb45)
2019-05-14 09:14:04 +02:00
Max Kostikov
b21db670b4 Fix comments scroll button CSS
(cherry picked from commit d0322f5fbd)
2019-05-14 09:13:40 +02:00
Mario Vavti
1f84aa9809 css fixes
(cherry picked from commit c1f01b7e35)
2019-05-14 09:13:19 +02:00
Mario Vavti
4ac249c26c deal with privacy mentions in event descriptions
(cherry picked from commit 71064f481b)
2019-05-14 09:13:02 +02:00
zotlabs
85a29fce94 bbcode map bypass wasn't catching all map forms.
(cherry picked from commit 436293713b)
2019-05-14 09:12:35 +02:00
Mario
71ecb470b6 Merge branch 'dev' into 'dev'
bbcode map bypass wasn't catching all map forms.

See merge request hubzilla/core!1647
2019-05-14 09:10:48 +02:00
Mario Vavti
15a000bb45 add autocomplete js to calendar and fix issue with extended likes mid 2019-05-14 09:09:48 +02:00
Max Kostikov
18e4a7ac6e Merge branch 'dev' into 'dev'
Fix comments scroll button CSS

See merge request hubzilla/core!1649
2019-05-13 23:19:19 +02:00
Max Kostikov
d0322f5fbd Fix comments scroll button CSS 2019-05-13 23:16:36 +02:00
Mario Vavti
c1f01b7e35 css fixes 2019-05-13 22:00:40 +02:00
Mario Vavti
71064f481b deal with privacy mentions in event descriptions 2019-05-13 15:45:05 +02:00
zotlabs
436293713b bbcode map bypass wasn't catching all map forms. 2019-05-13 05:14:43 -07:00
Mario Vavti
fc726bfb4b fix button size 2019-05-13 13:11:14 +02:00
Mario Vavti
b0c3780667 fix button size 2019-05-13 13:02:23 +02:00
Mario Vavti
3e431c65be bump version 2019-05-13 12:17:08 +02:00
Mario Vavti
5b0b90d1f5 bump version, update autoload cache and update strings 2019-05-13 12:13:18 +02:00
Mario Vavti
d16714e84b calendar merge: cleanup 2019-05-13 11:30:13 +02:00
Mario Vavti
1d5fff9f58 upgrade jgrowl 2019-05-13 10:53:10 +02:00
Mario Vavti
fbe8d6144a port db_indexes() from zap 2019-05-13 10:46:12 +02:00
Mario Vavti
d5f59a57bf don't do oembed processing on naked links and smarty lib cleanup. ported from zap. 2019-05-13 10:39:40 +02:00
Mario Vavti
7465c79884 optimise oembed pdf processing so we do not actually load the content, which could cause performance issues. ported from zap. 2019-05-13 10:28:06 +02:00
Mario Vavti
769195fcff Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-05-13 10:14:06 +02:00
Mario Vavti
dc786bd1cc form security token for mod register ported from zap 2019-05-13 10:13:51 +02:00
Max Kostikov
960f4ed649 Merge branch 'dev' into 'dev'
Add new Russian translations

See merge request hubzilla/core!1646
2019-05-12 17:15:01 +02:00
Max Kostikov
91ad3bf1b6 Update hstrings.php 2019-05-12 17:09:59 +02:00
Max Kostikov
91b495d526 Update hmessages.po 2019-05-12 17:09:15 +02:00
Mario Vavti
973d91d120 add btlogger to unxmlify() 2019-05-11 16:42:53 +02:00
Max Kostikov
bf5deace8e Merge branch 'dev' into 'dev'
Replace photo URL for gallery on clonned channel post sync

See merge request hubzilla/core!1645
2019-05-11 15:46:16 +02:00
Max Kostikov
0e4acf6299 Replace photo URL for gallery on clonned channel post sync 2019-05-11 15:40:04 +02:00
Mario
a5cd0061c5 Merge branch 'dev' into 'dev'
use 'cache' flag to bbcode() on content destined for Zot6. We've seen rendered...

See merge request hubzilla/core!1644
2019-05-11 15:39:31 +02:00
Mario Vavti
630e3903fa bump version 2019-05-10 15:44:15 +02:00
Mario Vavti
0b6a5fad70 update justified gallery lib 2019-05-10 14:55:37 +02:00
Mario Vavti
67ca1b82cc css fix for bootstrap 4.3.1 2019-05-10 14:36:11 +02:00
Mario Vavti
9866053f0c update bootstrap to version 4.3.1 2019-05-10 14:21:36 +02:00
Mario Vavti
89a2c1a09c fix issue with color selector 2019-05-10 13:56:03 +02:00
Mario Vavti
70220d8b9c typo 2019-05-10 12:21:50 +02:00
Mario Vavti
274f69526f calendar merge: implement channel calendar import in cdav/calendar 2019-05-10 12:18:37 +02:00
zotlabs
d7026fe36b use 'cache' flag to bbcode() on content destined for Zot6. We've seen rendered map HTML in a couple of places and these should never be rendered for outgoing content as they will only be purified on the other end. 2019-05-09 22:06:32 -07:00
Max Kostikov
b9b65d7dfb Merge branch 'dev' into 'dev'
remove the caldav and event app and make calendar the default app

See merge request hubzilla/core!1643
2019-05-09 19:40:47 +02:00
Max Kostikov
1545c78d05 Merge branch 'dev' into 'dev'
Add 'Create' button translation in CalDAV

See merge request hubzilla/core!1642
2019-05-09 14:41:12 +02:00
Mario Vavti
f0c292e77b remove the caldav and event app and make calendar the default app 2019-05-09 14:39:40 +02:00
Max Kostikov
62336127e3 Add 'Create' button translation 2019-05-09 14:36:02 +02:00
Max Kostikov
5beaf8ac98 Add 'Create' button translation 2019-05-09 14:34:58 +02:00
Mario Vavti
9efd484e27 calendar merge: cleanup and comment out some unused code 2019-05-09 13:43:20 +02:00
Max Kostikov
44d5cf980a Merge branch 'dev' into 'dev'
another DB update to fix uid_mid index in item table and add xchan_photo_m index to xchan table

See merge request hubzilla/core!1641
2019-05-08 23:30:48 +02:00
Mario Vavti
e53650d6c6 another DB update to fix uid_mid index in item table and add xchan_photo_m index to xchan table 2019-05-08 20:12:54 +02:00
Max Kostikov
5bf9a9828c Merge branch 'channel_update' into 'dev'
Channel update

See merge request hubzilla/core!1639
2019-05-08 19:55:21 +02:00
Mario
24f3bc9f0c Channel update 2019-05-08 19:55:21 +02:00
Mario Vavti
c200e55f95 remove option which should never have slipped into dev branch 2019-05-08 16:15:26 +02:00
Max Kostikov
ea19d59fca Merge branch 'dev' into 'dev'
Replace own image URL in clonned channel posts

See merge request hubzilla/core!1638
2019-05-08 10:43:06 +02:00
Max Kostikov
d34d14c1f4 Replace own image URL in clonned channel posts 2019-05-08 10:40:46 +02:00
Max Kostikov
7b17306dbd Merge branch 'dev' into 'dev'
Change thumbnails processing logic on image edit

See merge request hubzilla/core!1637
2019-05-08 08:32:57 +02:00
Max Kostikov
6731564c2d Update Photos.php 2019-05-08 08:30:25 +02:00
Max Kostikov
194ba0cf8d Update PhotoDriver.php 2019-05-08 08:28:35 +02:00
Max Kostikov
6fc2429540 Merge branch 'dev' into 'dev'
Respect thumbnail storage location on image editing

See merge request hubzilla/core!1636
2019-05-08 01:54:18 +02:00
Max Kostikov
bdcbe61273 Respect thumbnail storage location on image editing 2019-05-08 01:52:10 +02:00
Max Kostikov
de5d7bfbd3 Add photo usage detection if not exist on thumbnail save 2019-05-08 00:49:41 +02:00
Mario
242878c45c Merge branch 'dev' into 'dev'
possible xchan confusion include/follow

See merge request hubzilla/core!1635
2019-05-06 13:49:17 +02:00
zotlabs
c0911da887 review of last commit 2019-05-06 04:19:54 -07:00
zotlabs
6e0bf04276 possible xchan (protocol) confusion in include/follow 2019-05-06 04:15:34 -07:00
Max Kostikov
56c460d932 Merge branch 'dev' into 'dev'
Remove 'os_syspath' from direct 'photo' table update

See merge request hubzilla/core!1634
2019-05-06 10:46:11 +02:00
Max Kostikov
f0933b66a9 Remove 'os_syspath' from direct 'photo' table update 2019-05-06 10:39:47 +02:00
Max Kostikov
422d633f89 Add system.filesystem_storage_thumbnails description 2019-05-05 20:17:32 +02:00
Max Kostikov
0537be129c More precise scroll back to initial comment in thread 2019-05-05 19:00:00 +02:00
Max Kostikov
9b947c8370 Merge branch 'dev' into 'dev'
Threaded comments usability imrovements

See merge request hubzilla/core!1633
2019-05-05 18:15:58 +02:00
Max Kostikov
14eb4326e7 Scroll back to initial low level comment 2019-05-05 18:13:00 +02:00
Max Kostikov
89a3e8fcc7 Use own variable for "Go to previous comment" hint 2019-05-05 18:10:53 +02:00
Max Kostikov
6fd5133bed Force to add "go to previous comment" hint 2019-05-05 18:09:25 +02:00
Max Kostikov
e010877490 Scroll back if more than one level in thread 2019-05-05 18:07:44 +02:00
Max Kostikov
f56371c79b Merge branch 'dev' into 'dev'
Threaded comments navigation elements fixes

See merge request hubzilla/core!1632
2019-05-05 15:41:17 +02:00
Max Kostikov
c98f3c5d29 Threaded comments navigation elements fixes 2019-05-05 15:38:08 +02:00
Max Kostikov
5c8de9d82f Allign arrows position 2019-05-05 14:28:15 +02:00
Mario
b9c8b6ba23 Merge branch 'dev' into 'dev'
Add arrows to scroll between related comments

See merge request hubzilla/core!1629
2019-05-05 14:14:07 +02:00
Max Kostikov
6cd968b53b Add arrows to scroll between related comments 2019-05-05 14:14:07 +02:00
Max Kostikov
2aa76d257c Merge branch 'db_update' into 'dev'
port db update improvements from zap

See merge request hubzilla/core!1628
2019-05-04 22:37:21 +02:00
Max Kostikov
32c0be8bde Merge branch 'dev' into 'dev'
found another case where channel_r_photos could get referenced

See merge request hubzilla/core!1631
2019-05-04 12:05:38 +02:00
zotlabs
88d283a89d found another case where channel_r_photos could get referenced 2019-05-04 02:58:57 -07:00
Max Kostikov
66b370c421 Merge branch 'dev' into 'dev'
strip obsolete channel_(rw)_photos from channel sync packets

See merge request hubzilla/core!1630
2019-05-04 10:32:31 +02:00
zotlabs
20bf139b3f strip obsolete channel_(rw)_photos from channel sync packets 2019-05-03 15:27:26 -07:00
Mario Vavti
1da4602567 port db update improvements from zap 2019-05-03 15:13:13 +02:00
Max Kostikov
e7ef69e6e7 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1627
2019-05-03 14:59:58 +02:00
Max Kostikov
d55904d4db Update hstrings.php 2019-05-03 14:52:43 +02:00
Max Kostikov
740dc59255 Update hmessages.po 2019-05-03 14:52:08 +02:00
Mario
98b6362c07 Merge branch 'dev' into 'dev'
removing items from ex-connections turns out to be more complicated than originally envisioned

See merge request hubzilla/core!1626
2019-05-03 14:16:56 +02:00
Mario Vavti
cd829c096b update directory on cover photo changes 2019-05-03 14:11:14 +02:00
zotlabs
f127c55802 removing items from ex-connections turns out to be more complicated than originally envisioned 2019-05-03 04:09:04 -07:00
zotlabs
13247a0e00 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-05-03 04:04:02 -07:00
Max Kostikov
609752d331 Merge branch 'revert-3528610a' into 'dev'
Revert "Fix comment edit field expansion on reply on comment"

See merge request kostikov/core!1
2019-05-03 10:09:54 +02:00
Max Kostikov
413410d02d Revert "Fix comment edit field expansion on reply on comment"
This reverts commit 3528610a51
2019-05-03 10:09:54 +02:00
Max Kostikov
3528610a51 Fix comment edit field expansion on reply on comment 2019-05-03 10:03:40 +02:00
Mario Vavti
59ee045c24 parent -> id 2019-05-03 09:01:53 +02:00
zotlabs
b1dec12893 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-05-03 00:00:00 -07:00
zotlabs
319b0acdd8 fix item query 2019-05-02 23:58:51 -07:00
Mario
c605c46f83 Merge branch 'replyto_fixes' into 'dev'
provide xchan_url if there is no xchan_addr

See merge request hubzilla/core!1622
2019-05-03 08:41:01 +02:00
Mario
9ef692b48c Merge branch 'dev' into 'dev'
work on emoji reactions - sync with matching update to addons

See merge request hubzilla/core!1623
2019-05-03 08:39:01 +02:00
Mario
6da4dfe605 Merge branch 'unfriend_delete_posts_bug' into 'dev'
Unfriend delete posts bug

See merge request hubzilla/core!1624
2019-05-03 08:36:58 +02:00
zotlabs
7b4cb31a10 when removed items for unfriended connections, check if the parent has been retained, not just the item 2019-05-02 22:34:34 -07:00
zotlabs
03ce4d7e2b Merge branch 'dev' of ../hz into dev 2019-05-02 21:19:15 -07:00
zotlabs
f55f5fa92a emojireaction compat 2019-05-02 21:18:54 -07:00
zotlabs
76757ad1f2 Merge branch 'dev' of /home/macgirvin/hz into dev 2019-05-02 20:33:45 -07:00
zotlabs
347e88dc65 move apschema to core to use for emojiReaction mapping for zot6 2019-05-02 20:32:26 -07:00
Mario Vavti
746d032e58 more provide xchan_url if there is no xchan_addr 2019-05-02 13:05:52 +02:00
Mario Vavti
b6d598a001 provide xchan_url if there is no xchan_addr 2019-05-02 12:58:24 +02:00
Max Kostikov
b35961c53c Merge branch 'dev' into 'dev'
Add check if threads are enabled globally

See merge request hubzilla/core!1621
2019-05-02 11:42:39 +02:00
Max Kostikov
47fba5827b Merge branch 'dev' into 'dev'
# Conflicts:
#   Zotlabs/Lib/ThreadItem.php
2019-05-02 11:33:07 +02:00
Max Kostikov
47f75ad8bf Add check if threads are enabled globally 2019-05-02 11:28:29 +02:00
Max Kostikov
516167c0f8 Revert "Merge branch 'dev' into 'dev'"
This reverts merge request !1620
2019-05-02 10:58:00 +02:00
Mario
238b3a97a8 Merge branch 'dev' into 'dev'
Check if 'reply on comment' enabled for this profile

See merge request hubzilla/core!1620
2019-05-02 10:48:55 +02:00
Max Kostikov
d4ab8a5a5d Check if 'reply on comment' enabled for this profile 2019-05-02 10:40:33 +02:00
Mario Vavti
6672299f8a calendar merge: use b64 encoded mid for plink 2019-05-02 10:11:08 +02:00
Max Kostikov
ea5f515f18 Merge branch 'dev' into 'dev'
Add Zap threads support

See merge request hubzilla/core!1619
2019-05-02 08:33:51 +02:00
Max Kostikov
ea6293544d Add Zap threads support 2019-05-02 08:30:38 +02:00
Max Kostikov
cbe35281b9 Merge branch 'dev' into 'dev'
Add AS threaded comments support

See merge request hubzilla/core!1618
2019-05-01 21:45:12 +02:00
Max Kostikov
51a0fc45e2 Add threaded comments support 2019-05-01 21:40:43 +02:00
Max Kostikov
1e7e2bd34f Update Item.php 2019-05-01 19:10:46 +02:00
Max Kostikov
fa2f3d136f Merge branch 'xmlify' into 'dev'
address xmlify/unxmlify performance issue

See merge request hubzilla/core!1616
2019-05-01 16:41:19 +02:00
Max Kostikov
92b6026695 Merge branch 'dev' into 'dev'
Use thr_parent tp handle reply on comment feature

See merge request hubzilla/core!1617
2019-05-01 16:10:40 +02:00
Mario Vavti
c9a5f21344 calendar merge: remove deprecated share variable 2019-05-01 15:52:17 +02:00
Max Kostikov
0174bf3722 Fix missprint 2019-05-01 15:49:17 +02:00
Max Kostikov
0d003e7450 Preserve parent_mid with threaded comments 2019-05-01 15:45:12 +02:00
Mario Vavti
8847838c43 address xmlify/unxmlify performance issue 2019-05-01 15:40:06 +02:00
Mario Vavti
9594ce9a8a calendar merge: fix event_xchan mixup 2019-05-01 15:35:20 +02:00
Max Kostikov
4a91d09c86 Use thr_parent for comment replies 2019-05-01 15:33:59 +02:00
Max Kostikov
06837bd32b Revert code to use thr_parent for comment replies 2019-05-01 15:12:01 +02:00
Mario
b8d8887d5a Merge branch 'dev' into 'dev'
a couple of issues with the suggestions when viewing from the directory module

See merge request hubzilla/core!1615
2019-05-01 10:07:07 +02:00
Mario
256f8dd41b Merge branch 'dev' into 'dev'
Add 'reply on comment' feature

See merge request hubzilla/core!1614
2019-05-01 10:06:24 +02:00
zotlabs
e0fdafc7e5 Merge branch 'dev' of ../hz into dev 2019-04-30 23:39:56 -07:00
zotlabs
9a55df245f disable directory options when using suggestion mode and only return one page (60 items)
so that sorting works correctly
2019-04-30 23:38:48 -07:00
zotlabs
9800d95c50 fix suggestion ordering in directory module 2019-04-30 23:19:04 -07:00
Max Kostikov
c340416c94 Add 'reply on comment' code 2019-05-01 06:24:58 +02:00
Max Kostikov
9af8a1d30c Move JS to main module 2019-05-01 06:23:56 +02:00
Max Kostikov
4da96ee980 Remove 'doreply' JS function 2019-04-30 17:35:53 +02:00
Max Kostikov
21637e033c Add JS 'doreply' function 2019-04-30 17:34:56 +02:00
Max Kostikov
9ebf2dc97b Add "reply to" hint to submit button 2019-04-30 17:33:54 +02:00
Mario Vavti
a04689b784 do not allow editing events that do not belong to us 2019-04-30 12:08:19 +02:00
Max Kostikov
5066945adc Fix add multiple icons on 'Submit' button when reply on comment 2019-04-30 11:17:22 +02:00
Max Kostikov
e945c12856 Add displaying support for threaded comments 2019-04-30 11:00:13 +02:00
Mario Vavti
0b062d0b8a select event by event_hash instead of item_id 2019-04-30 10:47:48 +02:00
Mario Vavti
9cc1eff15c remove logging 2019-04-30 00:12:19 +02:00
Mario Vavti
327e5d06e1 calendar merge: implement single event editing UI 2019-04-30 00:09:57 +02:00
Max Kostikov
a2dd0aea92 Merge branch 'cherry-pick-80ca2023' into 'dev'
Add 'reply on comment' feature

See merge request kostikov/core!1
2019-04-29 23:45:58 +02:00
Max Kostikov
39da3459c7 Add 'reply on comment' feature
(cherry picked from commit 80ca2023aa67ef7c0c43414acaf135e5748044b2)
2019-04-29 23:43:11 +02:00
Max Kostikov
c0be4c36e1 Update main.js 2019-04-29 23:40:21 +02:00
Max Kostikov
31e04378cd Add 'reply to comment' processing 2019-04-29 23:30:51 +02:00
Max Kostikov
e80c99ad74 Add 'reply to comment' button 2019-04-29 23:29:16 +02:00
Max Kostikov
d9be443e53 Add initial threaded comments support 2019-04-29 23:26:20 +02:00
Max Kostikov
6db323b15e Add variables for threaded comments support 2019-04-29 23:24:48 +02:00
Max Kostikov
5abbfd3f19 Add initial threaded comment support 2019-04-29 23:21:17 +02:00
Mario
674215e9e6 Merge branch 'dev' into 'dev'
Add jot videos inline and with poster if possible

See merge request hubzilla/core!1613
2019-04-29 11:58:59 +02:00
Mario Vavti
dce6a5763d calendar merge: d&d support and some minor cleanup and fixes 2019-04-29 11:45:55 +02:00
zotlabs
d89d6e8a01 Merge branch 'dev' of ../hz into dev 2019-04-28 18:21:41 -07:00
zotlabs
6230dbed2d Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-28 18:21:28 -07:00
zotlabs
9641254443 event attachments still weren't being delivered to zot6 2019-04-28 18:20:40 -07:00
zotlabs
95871fe13c Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-28 17:47:26 -07:00
Max Kostikov
0cecfceb14 Merge branch 'sql_fixes' into 'dev'
possible sql performance improvement

See merge request hubzilla/core!1611
2019-04-28 20:59:53 +02:00
zotlabs
13970280d9 Merge branch 'dev' of ../hz into dev 2019-04-27 17:22:00 -07:00
zotlabs
55ce80aabe Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-27 17:21:42 -07:00
zotlabs
9536a490b3 Add jot videos inline and with poster if possible 2019-04-27 17:20:38 -07:00
Mario Vavti
405e07f0a2 improve channel date query 2019-04-27 23:01:05 +02:00
Max Kostikov
d3ce91bd89 Merge branch 'dev' into 'dev'
Use goaway() base function

See merge request hubzilla/core!1612
2019-04-27 21:47:57 +02:00
Max Kostikov
eb44201c5f Use goaway() base function 2019-04-27 21:38:54 +02:00
Mario Vavti
73248aadd5 possible sql performance improvement 2019-04-27 15:35:41 +02:00
Mario
f6a4084f81 bump version 2019-04-26 11:30:23 +02:00
Mario Vavti
d5f89c165a update changelog
(cherry picked from commit a518471a27)
2019-04-26 11:29:01 +02:00
Mario Vavti
a518471a27 update changelog 2019-04-26 11:28:06 +02:00
zotlabs
dce5080e53 permissions cleanup
(cherry picked from commit 2d886b65ce)
2019-04-26 10:52:35 +02:00
zotlabs
2221d4d612 add attachments to zot6 event objects, add zot6 to federated transports (webfinger)
(cherry picked from commit 0615709a7a)
2019-04-26 10:43:56 +02:00
Zot
5f73a46c05 import/export zot6 hublocs+xchans
(cherry picked from commit e2dfa1d72f)
2019-04-26 10:42:09 +02:00
Zot
b782c6bd16 update fix_system_urls() to handle zot6 hublocs (recommend cherry-pick to master)
(cherry picked from commit f8c583636c)
2019-04-26 10:41:52 +02:00
Zot
ab8d8aa552 hubloc confusion in magic auth
(cherry picked from commit 3c8f8b76aa)
2019-04-26 10:41:35 +02:00
Daniel Lowe
f955276694 Fix infinite loop using postgres as backend
unescapebin is handed a string in some cases, and it causes an infinite
loop when it does.  This ensures that the argument is a resource before
loading its contents.


(cherry picked from commit 9a6531e2a2)
2019-04-26 10:41:04 +02:00
zotlabs
77cc60faf2 required php version not available but allowed to continue
(cherry picked from commit 6feddcbced)
2019-04-26 10:40:02 +02:00
Mario
a6f50b8c85 Merge branch 'dev' into 'dev'
import/export zot6 hublocs+xchans

See merge request hubzilla/core!1610
2019-04-26 09:34:58 +02:00
Zot
e2dfa1d72f import/export zot6 hublocs+xchans 2019-04-26 09:34:58 +02:00
zotlabs
9a61c0a6fc Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-26 00:28:29 -07:00
zotlabs
e10b25a12c Merge branch 'dev' of ../hz into dev 2019-04-26 00:25:32 -07:00
zotlabs
0c1e803208 import/export zot6 hublocs+xchans 2019-04-26 00:24:58 -07:00
Mario
b57dcc74d1 Merge branch 'dev' into 'dev'
update fix_system_urls() to handle zot6 hublocs (recommend cherry-pick to master)

See merge request hubzilla/core!1609
2019-04-26 09:12:23 +02:00
Zot
f8c583636c update fix_system_urls() to handle zot6 hublocs (recommend cherry-pick to master) 2019-04-26 09:12:23 +02:00
zotlabs
e6521d1cf3 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-25 21:49:18 -07:00
zotlabs
96785e8df1 update fix_system_urls() to handle zot6 hublocs 2019-04-25 21:45:04 -07:00
Mario
d689778465 Merge branch 'dev' into 'dev'
hubloc confusion in magic auth

See merge request hubzilla/core!1608
2019-04-25 11:54:37 +02:00
Zot
3c8f8b76aa hubloc confusion in magic auth 2019-04-25 11:54:37 +02:00
Mario Vavti
c123fa5422 update blueimp/jquery-file-upload 2019-04-25 11:50:26 +02:00
Mario Vavti
0ade8be7f7 add missing files 2019-04-25 11:47:59 +02:00
Mario Vavti
a60c2f38c6 update sabre/vobject 2019-04-25 11:47:18 +02:00
Mario
f1c0797780 Revert "update composer libs"
This reverts commit e779335d06
2019-04-25 11:24:09 +02:00
Mario
701167bc12 Revert "fix test"
This reverts commit c5fca0a1e7
2019-04-25 11:22:45 +02:00
Mario
a39e63e324 Revert "dbunit does not work wirh phpunit v 8.1.3 - try 7.5.9"
This reverts commit 8401e9c2b4
2019-04-25 11:22:21 +02:00
Mario Vavti
8401e9c2b4 dbunit does not work wirh phpunit v 8.1.3 - try 7.5.9 2019-04-25 11:14:40 +02:00
Mario Vavti
c5fca0a1e7 fix test 2019-04-25 10:52:57 +02:00
Mario Vavti
e779335d06 update composer libs 2019-04-25 08:52:50 +02:00
zotlabs
26039adf5b compound name warning 2019-04-24 16:31:31 -07:00
zotlabs
c88286556a hubloc confusion during magic auth where hublocs with more than one network may exist 2019-04-24 16:21:59 -07:00
zotlabs
831b9d4433 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-24 16:21:13 -07:00
Mario
e937e8fff9 Merge branch 'dev' into 'dev'
Add modification date in Etag hash calculation and optimize cached photos processing

See merge request hubzilla/core!1607
2019-04-24 21:11:19 +02:00
Mario Vavti
f616b2d49a calendar merge: bring back event categories 2019-04-24 14:48:30 +02:00
Max Kostikov
fe84dae313 Optimize cached photos processing 2019-04-24 11:18:17 +02:00
Max Kostikov
9104933b18 Add modified date in Etag hash calculation 2019-04-24 11:13:17 +02:00
Max Kostikov
79654635d3 Merge branch 'update-docs' into 'dev'
Update docs

See merge request hubzilla/core!1606
2019-04-22 19:49:08 +02:00
Max Kostikov
f0edfca75c Merge branch 'fix-infinite-loop' into 'dev'
Fix infinite loop using postgres as backend

See merge request hubzilla/core!1605
2019-04-22 19:47:49 +02:00
Daniel Lowe
e845da2edc Tidy up various bits of documentation 2019-04-22 15:50:02 +00:00
Daniel Lowe
7a3050f2c0 Remove section on techlevels 2019-04-22 15:49:39 +00:00
Daniel Lowe
9a6531e2a2 Fix infinite loop using postgres as backend
unescapebin is handed a string in some cases, and it causes an infinite
loop when it does.  This ensures that the argument is a resource before
loading its contents.
2019-04-21 11:14:17 +00:00
Max Kostikov
a6a17a85f3 Merge branch 'calendar_merge' into 'dev'
calendar merge - initial checkin

See merge request hubzilla/core!1599
2019-04-20 20:14:58 +02:00
Mario Vavti
9275fd16c2 resolve merge conflict 2019-04-20 10:23:11 +02:00
Max Kostikov
904ae05810 Merge branch 'dev' into 'dev'
Add anti SEO link properties in directory listing

See merge request hubzilla/core!1603
2019-04-19 23:19:38 +02:00
Max Kostikov
54f95389a8 Add anti SEO link properties in directory listing 2019-04-19 23:17:24 +02:00
Max Kostikov
a8fc70a5b9 Merge branch 'dev' into 'dev'
Fix update button in cdav_calendar.tpl

See merge request hubzilla/core!1602
2019-04-19 21:26:48 +02:00
Max Kostikov
c374072822 Update cdav_calendar.tpl 2019-04-19 21:22:42 +02:00
Max Kostikov
0212de68a4 Merge branch 'dev' into 'dev'
Add translation to calendar event update button

See merge request hubzilla/core!1601
2019-04-19 21:14:29 +02:00
Max Kostikov
2ea9b6d409 Add translation to update button 2019-04-19 21:11:34 +02:00
Max Kostikov
823d71df28 Merge branch 'dev' into 'dev'
Fix translation to update button

See merge request hubzilla/core!1600
2019-04-19 21:06:09 +02:00
Max Kostikov
7560918b32 Add translation to update button 2019-04-19 21:04:00 +02:00
Mario Vavti
fd87faa7a6 Merge branch 'dev' into calendar_merge 2019-04-19 19:37:06 +02:00
Mario Vavti
cb2d706fa1 provide location and description information 2019-04-19 19:06:01 +02:00
Mario
6b638ac896 Merge branch 'dev' into 'dev'
Add remove profile photo button

See merge request hubzilla/core!1598
2019-04-19 17:23:10 +02:00
Mario Vavti
2bd5ae3617 provide link to source and some cleanup 2019-04-19 17:21:45 +02:00
Mario Vavti
39a5311315 Merge branch 'dev' into calendar_merge 2019-04-19 15:34:02 +02:00
Mario Vavti
9b6e46dc6b calendar merge initial commit 2019-04-19 15:32:56 +02:00
Max Kostikov
7311d1182d Add remove profile photo button 2019-04-19 15:30:05 +02:00
Max Kostikov
ea1d8b8104 Add remove profile photo button 2019-04-19 15:29:08 +02:00
Mario
fb03e3f00e Merge branch 'dev' into 'dev'
required php version not available but allowed to continue

See merge request hubzilla/core!1597
2019-04-19 15:19:43 +02:00
Mario
c9c35255e7 Merge branch 'dev' into 'dev'
Precise cache related headers processing; remove duplicated code and optimization

See merge request hubzilla/core!1596
2019-04-19 15:19:19 +02:00
Mario
99a578dbad Merge branch 'homeinstall_certbot' into 'dev'
Letsencrypt: replaced dehydrated by certbot. Backup: replaced rsnaphsot by...

See merge request hubzilla/core!1592
2019-04-19 15:18:42 +02:00
zotlabs
e56c0a6251 Merge branch 'dev' of ../hm into dev 2019-04-18 13:59:06 -07:00
zotlabs
66479e2aa7 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-18 13:58:43 -07:00
zotlabs
6feddcbced required php version not available but allowed to continue 2019-04-18 13:53:39 -07:00
Max Kostikov
db020ca1a3 Update Photo.php 2019-04-18 21:55:06 +02:00
Max Kostikov
6c93518ef7 Merge branch 'dev' into 'dev'
add attachments to zot6 event objects, add zot6 to federated transports (webfinger)

See merge request hubzilla/core!1593
2019-04-18 20:59:41 +02:00
Max Kostikov
eb02d01eed Update Photo.php 2019-04-18 10:13:03 +02:00
Max Kostikov
7a9093f634 Implement ETag: header support for cache control 2019-04-18 09:50:37 +02:00
Max Kostikov
1732b2dfe3 Add 'must-revalidate' to Cache-control header for profile photos 2019-04-17 23:15:46 +02:00
Max Kostikov
a62f891a60 Precise 'Modified:' header processing if no profile photo added; remove duplicated code 2019-04-17 18:30:50 +02:00
zotlabs
a22ecd42ed Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-16 18:34:41 -07:00
Max Kostikov
b7cb2a2951 Merge branch 'dev' into 'dev'
Fix file path with filesystem storage

See merge request hubzilla/core!1595
2019-04-16 22:26:53 +02:00
Max Kostikov
c490970324 Fix file path with filesystem storage 2019-04-16 22:24:48 +02:00
Max Kostikov
5a9c8a9343 Merge branch 'dev' into 'dev'
Use base image content instead of os_path; fix base images stats

See merge request hubzilla/core!1594
2019-04-16 17:37:07 +02:00
Max Kostikov
5ba7e5d7d7 Use base image content instead of os_path; fix base images stats 2019-04-16 17:31:27 +02:00
zotlabs
f7b281a65f Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-15 22:29:50 -07:00
zotlabs
df5a1c59e6 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-15 20:53:44 -07:00
zotlabs
0615709a7a add attachments to zot6 event objects, add zot6 to federated transports (webfinger) 2019-04-15 20:51:57 -07:00
OJ Random
d85a0130b7 Letsencrypt: replaced dehydrated by certbot. Backup: replaced rsnaphsot by rsync. Readme: changed install instructions. 2019-04-15 21:01:13 +02:00
Mario
71f17a233e Merge branch 'dev' into 'dev'
Extending GitLab CI/CD.

See merge request hubzilla/core!1589
2019-04-15 17:52:52 +02:00
Max Kostikov
25c35cbbe4 Merge branch 'dev' into 'dev'
Update INSTALL.txt

See merge request hubzilla/core!1591
2019-04-15 15:20:51 +02:00
Max Kostikov
257ba570ee Update INSTALL.txt 2019-04-15 15:18:35 +02:00
Max Kostikov
91e96b2314 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1590
2019-04-15 12:55:34 +02:00
Max Kostikov
c2ee7cbff5 Update Russian hstrings.php 2019-04-15 12:25:40 +02:00
Max Kostikov
27f813e043 Update Russian hmessages.po 2019-04-15 12:24:51 +02:00
Max Kostikov
00ed91f12e Fix space in plurals regexp 2019-04-15 12:23:55 +02:00
Max Kostikov
4cb5efc277 Add command line tool for thumbnails storage convertion 2019-04-14 20:16:16 +02:00
Klaus Weidenbach
65a453d21b Extending GitLab CI/CD.
Add PHP7.3 image and .gitlab-ci.yml restructuring.
Use YAML Anchors for job templates.
Add more DB/PHP version combinations.
2019-04-13 22:55:03 +02:00
Mario
9c8cb4dea3 Merge branch 'dev' into 'dev'
Thumbnails storage in filesystem or database implementation

See merge request hubzilla/core!1588
2019-04-13 21:19:06 +02:00
Max Kostikov
ed902fdb70 Update photo usage only for thumbnails 2019-04-13 14:12:58 +02:00
Max Kostikov
509067391b Update xchan profile edited date only once 2019-04-13 14:08:44 +02:00
Max Kostikov
04b261057d Set 'os_syspath' with local path 2019-04-12 22:34:32 +02:00
Max Kostikov
852343f254 Override received 'content' if we saving thumbnail in filesystem 2019-04-12 16:27:58 +02:00
Max Kostikov
26e35344d0 Add multiple profiles support on image operations in photo driver 2019-04-12 15:53:00 +02:00
Max Kostikov
d3a619659f Fix 'os_syspath' if we store thumbnails in filesystem 2019-04-12 15:38:10 +02:00
Max Kostikov
979f2415fb Save profile photo in filesystem or database; more precise modification time processing 2019-04-12 15:06:59 +02:00
Max Kostikov
28c1d219f6 Save cover photo thumbnails in filesystem or database 2019-04-12 15:03:59 +02:00
Max Kostikov
5792f4bf07 Add comment on required changes in upcoming releases 2019-04-12 15:00:56 +02:00
Max Kostikov
3a0fa5cb29 Store thumbnails in filesystem or database 2019-04-12 14:59:13 +02:00
Max Kostikov
074ee656f0 Fetch thumbnails and store it in filesystem or DB; update xchan profile edit time on fetch 2019-04-12 14:56:07 +02:00
Mario
064f93185c Merge branch 'dev' into 'dev'
Fix use UNIX socket file to connect DB

See merge request hubzilla/core!1587
2019-04-12 14:49:01 +02:00
Max Kostikov
4b5922f652 Fix wrong image resolution selection 2019-04-10 22:09:10 +02:00
Max Kostikov
85be906b68 Fix image scale on thumbnail save 2019-04-10 14:44:50 +02:00
Max Kostikov
775285cdf8 Update comment htconfig.sample.php 2019-04-10 14:14:14 +02:00
Max Kostikov
42f96dc7a6 Fix use UNIX socket file to connect DB 2019-04-10 14:13:16 +02:00
Mario
e96fa64625 Merge branch 'dev' into 'dev'
Dev

See merge request hubzilla/core!1586
2019-04-10 13:25:57 +02:00
Mario
8dc495c9bc Merge branch 'dev' into 'dev'
Initial preparation to move local thumbnails in filesystem storage

See merge request hubzilla/core!1585
2019-04-10 13:25:03 +02:00
Max Kostikov
5d70d889e9 Revert "Update htconfig.sample.php"
This reverts commit f2126ef18c8b66020305d07dcefeacc4e55a3c12
2019-04-10 13:25:03 +02:00
zotlabs
999ae6eb49 typo 2019-04-08 17:03:08 -07:00
zotlabs
ae1450bbcf missing endTime on Zot6 encoded events, optimise the url fetch of embedphotos 2019-04-08 16:45:07 -07:00
Mario Vavti
dcd8a05809 version bump 2019-04-08 11:12:02 +02:00
Mario Vavti
62e466f774 Merge branch 'dev' 2019-04-08 11:10:10 +02:00
Mario Vavti
70777a047d Merge branch 'master' of https://framagit.org/hubzilla/core 2019-04-08 11:09:55 +02:00
Mario Vavti
47fd95db9d more changelog 2019-04-08 11:03:33 +02:00
Mario Vavti
7602d9e54b changelog and version bump 2019-04-08 11:00:21 +02:00
zotlabs
1ed0079882 Merge branch 'dev' of https://gitlab.com/macgirvin/hubzilla into dev 2019-04-07 19:23:38 -07:00
Mario Vavti
b026be410c Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-04-07 22:48:33 +02:00
Mario Vavti
767a1711ff enable list views 2019-04-06 16:10:50 +02:00
zotlabs
a93bd8d944 security: perms_pending not evaluated correctly
(cherry picked from commit 5a46f1229d)
2019-04-06 10:30:32 +02:00
Mario
4e12f86e90 Merge branch 'dev' into 'dev'
security: perms_pending not evaluated correctly

See merge request hubzilla/core!1583
2019-04-06 10:27:30 +02:00
Mario Vavti
3007009fab upgrade cdav calendar to version 4 2019-04-06 10:22:03 +02:00
zotlabs
2d886b65ce permissions cleanup 2019-04-05 18:06:59 -07:00
zotlabs
8700b87030 Merge branch 'dev' of ../hz into dev 2019-04-05 16:48:04 -07:00
zotlabs
5a46f1229d security: perms_pending not evaluated correctly 2019-04-05 16:46:52 -07:00
Max Kostikov
9d5f8883a7 Merge branch 'dev' into 'dev'
Prevent return wrong profile photo modification date by plugin

See merge request hubzilla/core!1582
2019-04-05 14:24:22 +02:00
Max Kostikov
8e0b9b82e9 Update Photo.php 2019-04-05 14:21:05 +02:00
Max Kostikov
ea4b4ddce4 Update Photo.php 2019-04-05 14:17:39 +02:00
Max Kostikov
bd95c7b82a Update Photo.php 2019-04-05 14:15:40 +02:00
Max Kostikov
e20c5cf9cf Prevent return wrong profile photo modification date by plugin 2019-04-05 14:10:48 +02:00
Mario
6adb489cb3 Merge branch 'dev' into 'dev'
Sync cover photo removal with clones

See merge request hubzilla/core!1581
2019-04-04 16:46:40 +02:00
Max Kostikov
0c2db1cea5 Skip removal if no cover image found 2019-04-04 11:00:19 +02:00
Max Kostikov
e33604887b Sync cover photo removal with clones 2019-04-03 12:05:22 +02:00
Max Kostikov
410f37df1b Fix sync cover photo for clonned channels 2019-04-03 00:15:34 +02:00
Mario
c9f3883c8c Remove suggest channels from features 2019-04-02 15:12:32 +02:00
Mario
4346d7605d Revert "Revert "suggestion widget using feature_enabled still - upgrade to use apps.""
This reverts commit a0a2c27973
2019-04-02 14:59:35 +02:00
Mario
a0a2c27973 Revert "suggestion widget using feature_enabled still - upgrade to use apps."
This reverts commit b2bdc73164
2019-04-02 14:55:03 +02:00
Max Kostikov
3fb87ee76e Merge branch 'cover_photo_fixes' into 'dev'
missing string

See merge request hubzilla/core!1580
2019-04-01 17:26:27 +02:00
Max Kostikov
242aeea24c Add text to cover remove button 2019-04-01 13:15:16 +02:00
Mario Vavti
c305dc8d22 missing string 2019-04-01 12:55:36 +02:00
Mario
f61b898633 Merge branch 'dev' into 'dev'
Add remove cover photo function

See merge request hubzilla/core!1577
2019-04-01 12:42:28 +02:00
Mario
2bdcd436bb Merge branch 'dev' into 'dev'
check service class limits when syncing files

See merge request hubzilla/core!1578
2019-04-01 12:42:07 +02:00
zotlabs
a1bea7d7cc Merge branch 'dev' of ../hz into dev 2019-03-31 16:23:04 -07:00
zotlabs
b2bdc73164 suggestion widget using feature_enabled still - upgrade to use apps. 2019-03-31 16:22:02 -07:00
zotlabs
cbaf0a3864 check service class limits when syncing files 2019-03-30 15:11:13 -07:00
zotlabs
103563b375 we no longer use xchan_instance_url - this is an abook thing 2019-03-30 15:10:28 -07:00
Max Kostikov
595429fdde Add submit button styling 2019-03-30 23:08:41 +01:00
Max Kostikov
b384b27546 Revert "Add submit button styling"
This reverts commit 0b996245d5
2019-03-30 23:05:37 +01:00
Max Kostikov
0b996245d5 Add submit button styling 2019-03-30 23:01:07 +01:00
Max Kostikov
1ee91dd690 Add remove cover photo processing 2019-03-30 22:55:36 +01:00
Max Kostikov
f9e602c44c Add remove cover button 2019-03-30 22:54:20 +01:00
M. Dent
4fa827ddfd Merge branch 'connections_ordering' into 'dev'
add backend support for connections ordering

See merge request hubzilla/core!1576
2019-03-29 18:19:06 +01:00
Mario Vavti
1b3c73618c backslash 2019-03-29 15:51:31 +01:00
Mario Vavti
7b08f1cc8c missing use declaration 2019-03-29 15:50:10 +01:00
Max Kostikov
7d392e5adb Merge branch 'z6_discover_fixes' into 'dev'
fix various issues in z6_discover() and add zot6 hubloc creation on channel import

See merge request hubzilla/core!1575
2019-03-29 15:28:28 +01:00
Mario Vavti
f44cc2b60c fix typo 2019-03-28 15:56:28 +01:00
Mario Vavti
31680898e3 another fix for z6_discover() and create a zot6 hubloc if applicable 2019-03-28 15:51:24 +01:00
Mario Vavti
318fd7c9e3 add backend support for connections ordering 2019-03-27 20:42:56 +01:00
Mario Vavti
b10b8ca3f4 fix various issues in z6_discover() 2019-03-27 15:20:43 +01:00
Max Kostikov
b0c33308be Fix wrong bracket 2019-03-27 00:34:38 +01:00
Max Kostikov
1421c4e9d3 Merge branch 'dev' into 'dev'
Fix wrong permissions on attached images in personal messages

See merge request hubzilla/core!1574
2019-03-27 00:26:26 +01:00
Max Kostikov
f55dfc9025 Fix wrong permissions on attached images in personal messages 2019-03-27 00:17:14 +01:00
Max Kostikov
c218970890 Merge branch 'duplicate_fixes_1' into 'dev'
if we have an uuid deduplicate by uuid otherwise by mid

See merge request hubzilla/core!1573
2019-03-25 12:24:36 +01:00
Mario
bd27ce2520 Merge branch 'patch-20190324a' into 'dev'
Add ITEM_TYPE_CUSTOM support to Zotlabs/Module/Display.php

See merge request hubzilla/core!1572
2019-03-25 11:58:38 +01:00
Mario Vavti
44795b65f9 if we have an uuid deduplicate by uuid otherwise by mid 2019-03-25 11:33:01 +01:00
DM42.Net (Matt Dent)
af84c4e6bd Add ITEM_TYPE_CUSTOM support to Zotlabs/Module/Display.php 2019-03-24 22:56:18 -04:00
Mario Vavti
0a28207200 fix wrong field name 2019-03-24 21:45:23 +01:00
Mario Vavti
8ca2a5832c Revert "item_store(): deduplicate by mid OR uuid"
This reverts commit d8ce0d0df0.
2019-03-24 21:22:20 +01:00
Max Kostikov
333534dfe7 Merge branch 'items_fixes' into 'dev'
item_store(): deduplicate by mid OR uuid possible fix for #1349

See merge request hubzilla/core!1570
2019-03-24 16:45:21 +01:00
Mario Vavti
d8ce0d0df0 item_store(): deduplicate by mid OR uuid 2019-03-24 15:51:31 +01:00
Mario Vavti
28c3259449 Revert "item_store(): deduplicate by mid OR uuid"
This reverts commit 0d0ede7b14.
2019-03-24 15:49:03 +01:00
Mario Vavti
0d0ede7b14 item_store(): deduplicate by mid OR uuid 2019-03-24 15:47:57 +01:00
M. Dent
9ebf6bcc92 Merge branch 'core_fixes' into 'dev'
Core fixes

See merge request hubzilla/core!1569
2019-03-24 03:20:24 +01:00
Mario
9d186e9ba3 add punify() again 2019-03-23 22:53:29 +01:00
Mario
3c3a4526bf fix typo 2019-03-23 22:49:27 +01:00
Mario
3094c2ce17 fix subthread on sys channel items 2019-03-23 22:48:52 +01:00
Mario
393494a728 fix revert accidental moving of Features.php 2019-03-23 22:01:46 +01:00
Mario
d2725c3f49 aparently we do not use underscores anymore. this fixes spaming of dreports with recipient not found entries for our own xchan 2019-03-23 21:50:50 +01:00
Mario
4d4425a5bf fix variables for xporof_locale and xprof_postcode 2019-03-23 20:57:22 +01:00
Mario
c11fbe0868 revert accidental moving of Features.php 2019-03-23 20:33:43 +01:00
Mario
c676689df0 fix 48 hours timeframe check and remove unused var in mod changeaddr 2019-03-23 20:32:15 +01:00
Mario
0f5625d721 revert accidental moving of Enotify.php 2019-03-23 20:22:11 +01:00
Mario
6f5e6bd0f1 fix typo 2019-03-23 20:17:35 +01:00
Mario
a0af092ecb fix wrong variable in unused function 2019-03-23 20:01:20 +01:00
Mario
3a07a194ab Webfinger::zot_url() requires a string (webfinger address), empty var given in update_directory_entry() 2019-03-23 19:42:22 +01:00
Mario
682ffa7cf5 db_columns() requires a string, empty var given in process_channel_sync_delivery() 2019-03-23 19:21:28 +01:00
zotlabs
dc4a4ca9d3 nomadic is not a parameter in the hz version of encode_item_collection 2019-03-21 18:00:33 -07:00
Mario Vavti
33ac85f637 bump version 2019-03-21 11:16:35 +01:00
Mario Vavti
efd9421dc9 Merge branch 'dev' 2019-03-21 11:13:54 +01:00
Mario Vavti
9b696a872b bump version 2019-03-21 11:01:57 +01:00
Mario Vavti
aab515b16c optimize autoload cache and update changelog 2019-03-21 11:01:01 +01:00
Mario
f220628354 Merge branch 'dev' into 'dev'
hubzilla core issue #1356 , permissions not getting decrypted on follow

See merge request hubzilla/core!1563
2019-03-21 09:46:36 +01:00
Mario Vavti
322bc5dc87 another whitespace to trigger tests 2019-03-21 09:37:23 +01:00
zotlabs
75c3bda866 hubzilla core issue #1356 , permissions not getting decrypted on follow 2019-03-20 16:09:34 -07:00
Mario Vavti
b2b776169b just whitespace to trigger a new build test 2019-03-20 14:02:18 +01:00
M. Dent
8e8d7ae614 Merge branch 'video' into 'dev'
Video

See merge request hubzilla/core!1561
2019-03-20 03:17:01 +01:00
Mario
fa1af5a2cb Video 2019-03-20 03:17:01 +01:00
Max Kostikov
a27e4072b4 Merge branch 'update_1231' into 'dev'
mysql: remove some unused indices and add thr_parent index. pgsql: sync...

See merge request hubzilla/core!1560
2019-03-19 11:18:23 +01:00
Mario Vavti
fad26a49be mysql: remove some unused indices and add thr_parent index. pgsql: sync indices with mysql indices after testing on hub.disroot.org and add thr_parent 2019-03-19 10:52:10 +01:00
Mario
1742159345 Merge branch 'dev' into 'dev'
messagefilter enhancements and fix for advisory permissions edge case

See merge request hubzilla/core!1559
2019-03-19 09:17:39 +01:00
zotlabs
ed8d2cb482 Merge branch 'dev' of https://gitlab.com/macgirvin/hubzilla into dev 2019-03-18 20:42:58 -07:00
zotlabs
8e1f022810 share encoding issue between hz and zap 2019-03-18 20:41:59 -07:00
Mike Macgirvin
4c25072c18 Merge branch 'dev' of https://gitlab.com/macgirvin/hubzilla into dev 2019-03-19 13:13:21 +11:00
Mike Macgirvin
564ec32520 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-19 13:12:39 +11:00
zotlabs
a743feb040 Merge branch 'dev' of ../hz into dev 2019-03-18 19:10:38 -07:00
zotlabs
b028667de1 messagefilter enhancements, fix edge case in unsupported advisory privacy 2019-03-18 19:09:12 -07:00
M. Dent
41888f84bc Merge branch 'dev' into 'dev'
composer: add phpmd and phpcs to require-dev

See merge request hubzilla/core!1557
2019-03-19 00:56:29 +01:00
Mike Macgirvin
6a918dbde9 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-19 09:05:27 +11:00
Mario Vavti
578230e32c fix typos
(cherry picked from commit d486b03089)
2019-03-18 21:59:09 +01:00
Mario Vavti
d486b03089 fix typos 2019-03-18 21:58:18 +01:00
Mario Vavti
8559334339 some more xss prevention
(cherry picked from commit 968c6ed8be)
2019-03-18 21:37:02 +01:00
Mario Vavti
968c6ed8be some more xss prevention 2019-03-18 21:30:25 +01:00
Mario Vavti
8893d9edc4 use urlencode
(cherry picked from commit 2ec3e4a912)
2019-03-18 13:31:25 +01:00
Mario Vavti
43753ec113 ENT_COMPAT will only take care of double-quotes. Use double-quotes here to prevent XSS
(cherry picked from commit a086745ec0)
2019-03-18 13:31:03 +01:00
Mario Vavti
2ec3e4a912 use urlencode 2019-03-18 13:29:08 +01:00
Mario Vavti
a086745ec0 ENT_COMPAT will only take care of double-quotes. Use double-quotes here to prevent XSS 2019-03-18 13:19:24 +01:00
Mario
51156d0582 Merge branch 'dev' into 'dev'
misc fixes

See merge request hubzilla/core!1558
2019-03-18 09:35:53 +01:00
Zot
ea9925f489 clone systems apps to the extent possible, auto-configure imagick thumbnail binary during setup if possible 2019-03-18 09:35:53 +01:00
zotlabs
026b96b8f2 clone systems apps to the extent possible, auto-configure imagick thumbnail binary during setup if possible 2019-03-17 17:56:29 -07:00
zotlabs
136b2ae37f calling unserialize on array in util/service_class 2019-03-17 15:49:01 -07:00
Mike Macgirvin
97009a2748 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-18 08:55:54 +11:00
Mario
e123f7c743 add phpmd and phpcs to require-dev 2019-03-17 21:42:14 +01:00
Max Kostikov
e28bde6ccd Merge branch 'dreport_fixes' into 'dev'
fix dreport redeliver

See merge request hubzilla/core!1556
2019-03-17 12:16:20 +01:00
zotlabs
a976f418e3 use php_eol for all mail header generation 2019-03-16 15:28:21 -07:00
zotlabs
3c701e780c use the php_eol constant for encoded subjects 2019-03-16 15:23:17 -07:00
Mario Vavti
769dd174bd fix dreport redeliver 2019-03-15 23:10:17 +01:00
Mario
e92514ee63 Merge branch 'dev' into 'dev'
email_header_encode() producing output that is not spec compliant

See merge request hubzilla/core!1555
2019-03-15 19:12:51 +01:00
zotlabs
8ebc517b41 Merge branch 'dev' of ../hz into dev 2019-03-14 21:19:56 -07:00
zotlabs
91b03e52f1 email_header_encode() producing lines of illegal length because header field length was not considered in length calculation. 2019-03-14 21:18:17 -07:00
M. Dent
a22406c9f8 Merge branch 'cleanup' into 'dev'
Cleanup and fixes

See merge request hubzilla/core!1554
2019-03-15 02:51:51 +01:00
Mario
ebc3666c6f Cleanup and fixes 2019-03-15 02:51:51 +01:00
Mario Vavti
f1fee1239b Merge branch 'dev' 2019-03-14 09:40:26 +01:00
Mario
8769fa0156 Merge branch 'dev' into 'dev'
two compatibility issues zot/zot6

See merge request hubzilla/core!1553
2019-03-14 09:38:46 +01:00
Mike Macgirvin
f4d7338687 Merge branch 'dev' of https://gitlab.com/macgirvin/hubzilla into dev 2019-03-14 10:34:22 +11:00
zotlabs
6a8c3f82ef Merge branch 'dev' of ../hz into dev 2019-03-13 16:32:27 -07:00
zotlabs
05bcbfa28c signature issue for zot6 content imported from zotfeeds to hubzilla 2019-03-13 16:31:37 -07:00
Mike Macgirvin
6a55500c1b Merge branch 'dev' of https://gitlab.com/macgirvin/hubzilla into dev 2019-03-14 10:30:01 +11:00
zotlabs
a5a5ac60ba find unregistered z6 clones on hubzilla sites (does not happen automatically since z6 is not the default protocol on hubzilla). This will need to be pushed to master for the next point release. 2019-03-13 16:27:52 -07:00
M. Dent
6ed7f47b3f Merge branch 'core_fixes_2' into 'dev'
add zot6 to clonable networks

See merge request hubzilla/core!1552
2019-03-13 18:16:33 +01:00
Mario Vavti
a3e94855f9 add zot6 to clonable networks 2019-03-13 17:48:00 +01:00
Mario
503da97a79 Merge branch 'dev' into 'dev'
Dev

See merge request hubzilla/core!1551
2019-03-13 09:40:19 +01:00
Mike Macgirvin
088a93e023 limit 1 2019-03-13 13:21:04 +11:00
Mike Macgirvin
30f71ad632 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-13 10:42:25 +11:00
Mike Macgirvin
0026849821 Merge branch 'dev' of https://gitlab.com/macgirvin/hubzilla into dev 2019-03-13 10:40:23 +11:00
zotlabs
cf5a310286 rework authenticated item fetches (check ACL on the parent, not on the requested item) 2019-03-12 16:17:34 -07:00
zotlabs
72384ff2cb add owner permission checks to AS item fetch 2019-03-12 15:17:25 -07:00
Mario
c33ef01af8 Merge branch 'dev' into 'dev'
perform zot6 discovery in import_author_xchan

See merge request hubzilla/core!1550
2019-03-12 13:40:04 +01:00
zotlabs
11116bdcb7 typos 2019-03-12 03:40:43 -07:00
zotlabs
09a5cf4e68 Merge branch 'dev' of ../hz into dev 2019-03-11 22:24:13 -07:00
zotlabs
a9172129d2 check zot6 in import_author_xchan 2019-03-11 22:17:36 -07:00
Mike Macgirvin
3ec06705ca perform zot6 discovery in import_author_xchan 2019-03-12 16:12:29 +11:00
zotlabs
5fb0d38ad8 security updates for multiple xchans 2019-03-11 16:29:12 -07:00
Mario
9ed5cddb89 Merge branch 'dev' into 'dev'
init_groups_visitor: include xchans from all zot-like networks

See merge request hubzilla/core!1549
2019-03-11 09:38:27 +01:00
zotlabs
4e97fb0e58 testing init_groups_visitor changes - also add virtual groups for both zot identities 2019-03-10 22:32:37 -07:00
zotlabs
1688e373bc Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-10 15:52:07 -07:00
zotlabs
cada0b6df1 init_groups_visitor: include xchans from all zot-like networks 2019-03-10 15:50:45 -07:00
Mario
91358010a0 Merge branch 'dev' into 'dev'
non-critical: port zot_record_preferred()

See merge request hubzilla/core!1546
2019-03-10 11:40:33 +01:00
zotlabs
51024d3821 authenticated fetch fixes 2019-03-09 12:58:03 -08:00
zotlabs
220d6ed494 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-08 14:56:13 -08:00
zotlabs
b5ed3edc8f port zot_record_preferred 2019-03-08 14:51:30 -08:00
Mario Vavti
9772726065 merge text.php and hmessages.po 2019-03-08 12:32:20 +01:00
Mario Vavti
8ecdde6cb5 Merge branch '4.0RC' 2019-03-08 11:52:57 +01:00
Mario Vavti
73c96f35c1 update changelog
(cherry picked from commit 5b3824917d)
2019-03-08 11:48:52 +01:00
Mario Vavti
5b3824917d update changelog 2019-03-08 11:48:01 +01:00
Mario Vavti
ca4f10dc5e bump version 2019-03-08 11:46:36 +01:00
Mario
853fb33913 $sender is supposed to be string in libzot
(cherry picked from commit 507c71f64c)
2019-03-08 09:45:15 +01:00
zotlabs
e352cfc861 fetch private objects using delivery channel credentials
(cherry picked from commit 1f7622e4c4)
2019-03-08 09:35:04 +01:00
M. Dent
b8d79d9132 Merge branch 'core_fixes_1' into 'dev'
$sender is supposed to be string in libzot

See merge request hubzilla/core!1544
2019-03-08 05:45:02 +01:00
Mario
507c71f64c $sender is supposed to be string in libzot 2019-03-08 05:45:02 +01:00
zotlabs
ce0067d8eb It is in fact the 'Content Import' app string that needs to be translated. A previous commit errantly included the string 'Content Filter'. But don't remove 'Content Filter'. That is actually a thing in Zap and will eventually make its way to Hubzilla. 2019-03-07 20:01:41 -08:00
M. Dent
c0b238b19a Merge branch 'dev' into 'dev'
fetch private objects using delivery channel credentials

See merge request hubzilla/core!1545
2019-03-08 02:48:03 +01:00
zotlabs
d961cf21fb Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-07 16:05:15 -08:00
zotlabs
1f7622e4c4 fetch private objects using delivery channel credentials 2019-03-07 15:45:42 -08:00
Mario Vavti
b019ca0746 update changelog
(cherry picked from commit 04fe7e61de)
2019-03-07 09:32:39 +01:00
Mario Vavti
04fe7e61de update changelog 2019-03-07 09:32:12 +01:00
zotlabs
beb4e00afb guest access tokens: xchan record not created on URL login
(cherry picked from commit 0b2213dd41)
2019-03-07 09:30:38 +01:00
Mario
3e6607585f Merge branch 'dev' into 'dev'
guest access tokens: xchan record not created on URL login

See merge request hubzilla/core!1543
2019-03-07 09:29:21 +01:00
zotlabs
0b2213dd41 guest access tokens: xchan record not created on URL login 2019-03-06 19:01:28 -08:00
Mario Vavti
9450305568 changelog
(cherry picked from commit 08725c44c6)
2019-03-06 21:10:51 +01:00
Mario Vavti
08725c44c6 changelog 2019-03-06 21:08:56 +01:00
Mario Vavti
e18c64c9d9 bump version 2019-03-06 10:02:33 +01:00
Mario Vavti
7b018c60cb while in legacy zot $sender is expected to be an array, in zot6 $sender is expected to be a string (xchan_hash)
(cherry picked from commit 117a8cafca)
2019-03-06 09:58:11 +01:00
M. Dent
a81286c795 Add CURLOPT_CONNECTTIMEOUT
(cherry picked from commit 0c05e6593e)
2019-03-06 09:56:01 +01:00
Mario
75a66b716e Merge branch 'patch-20190305a' into 'dev'
Add CURLOPT_CONNECTTIMEOUT

See merge request hubzilla/core!1542
2019-03-06 09:52:26 +01:00
M. Dent
0c05e6593e Add CURLOPT_CONNECTTIMEOUT 2019-03-06 09:52:26 +01:00
zotlabs
571e9bf26a channel_type is not integer
(cherry picked from commit 26e7da0b96)
2019-03-06 09:49:40 +01:00
zotlabs
c4714e95b6 maintain compatibility with recent zot6 changes
(cherry picked from commit 98b1c7a38c)
2019-03-06 09:49:18 +01:00
Mario
c43ab50d66 Merge branch 'dev' into 'dev'
sync recent z6 protocol change

See merge request hubzilla/core!1541
2019-03-06 09:47:40 +01:00
zotlabs
26e7da0b96 channel_type is not integer 2019-03-05 17:06:42 -08:00
zotlabs
98b1c7a38c maintain compatibility with recent zot6 changes 2019-03-05 16:57:32 -08:00
zotlabs
d407e5556e api_router - allow parameters as final path argument
(cherry picked from commit 47001c3303)
2019-03-05 09:44:36 +01:00
zotlabs
6a3cfe54af remove clones from delivery recipients for top-level posts - they will get the post via clone sync
(cherry picked from commit 8e50fecccc)
2019-03-05 09:43:51 +01:00
zotlabs
a0bffe4a78 mod_oep: photos/album/xxxxx is no longer hex2bin/bin2hex but the album hash and is throwing php warnings when trying to decode
(cherry picked from commit 938fcdd1a6)
2019-03-05 09:43:29 +01:00
zotlabs
336c716a44 translate name of content filter (addon) app.
(cherry picked from commit 29cb62af3d)
2019-03-05 09:42:58 +01:00
Mario
ccdbec619c Merge branch 'dev' into 'dev'
assorted minor fixes from downstream

See merge request hubzilla/core!1540
2019-03-05 09:40:45 +01:00
zotlabs
47001c3303 api_router - allow parameters as final path argument 2019-03-04 20:11:43 -08:00
zotlabs
8e50fecccc remove clones from delivery recipients for top-level posts - they will get the post via clone sync 2019-03-04 20:09:47 -08:00
zotlabs
938fcdd1a6 mod_oep: photos/album/xxxxx is no longer hex2bin/bin2hex but the album hash and is throwing php warnings when trying to decode 2019-03-04 20:07:01 -08:00
zotlabs
9ede57b228 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-03-04 14:50:33 -08:00
mike
8810658858 Addressing new 'support@zotadel.net' support forum instead of old 'support@gravizot.de'
(cherry picked from commit e26de9c1d1)
2019-03-04 09:50:47 +01:00
Mario
e074d02714 Merge branch 'dev' into 'dev'
Addressing new 'support@zotadel.net' support forum instead of old 'support@gravizot.de'

See merge request hubzilla/core!1539
2019-03-04 09:50:12 +01:00
mike
e26de9c1d1 Addressing new 'support@zotadel.net' support forum instead of old 'support@gravizot.de' 2019-03-03 18:24:36 +03:00
M. Dent
7dc3835a54 Merge branch 'core_fixes' into 'dev'
while in legacy zot $sender is expected to be an array, in zot6 $sender is...

See merge request hubzilla/core!1538
2019-03-03 03:37:33 +01:00
Mario Vavti
117a8cafca while in legacy zot $sender is expected to be an array, in zot6 $sender is expected to be a string (xchan_hash) 2019-03-02 15:50:53 +01:00
mike
337dfd5ee4 Mention php-zip module dependency in administrator guide
(cherry picked from commit 747ce9b1f1)
2019-03-02 15:37:47 +01:00
DM42.Net (Matt Dent)
e37c9ed0a1 Use sender hash
(cherry picked from commit 5febc3e07d)
2019-03-02 15:37:22 +01:00
Mario Vavti
aa6a31eba5 iron out some kinks with scrollToItem() in combination with collapsed content and images
(cherry picked from commit 2244bf2ba2)
2019-03-02 15:32:36 +01:00
Mario
8a0a0aef5c Merge branch 'dev' into 'dev'
Mention php-zip module dependency in administrator guide

See merge request hubzilla/core!1537
2019-03-02 15:01:50 +01:00
Mario
4750e15c20 Merge branch 'patch-20190301a' into 'dev'
Use sender hash

See merge request hubzilla/core!1535
2019-03-02 15:00:20 +01:00
mike
747ce9b1f1 Mention php-zip module dependency in administrator guide 2019-03-02 12:21:59 +03:00
M. Dent
7fa874d9ef Merge branch 'js_fixes' into 'dev'
iron out some kinks with scrollToItem() in combination with collapsed content and  images

See merge request hubzilla/core!1534
2019-03-01 17:43:16 +01:00
DM42.Net (Matt Dent)
5febc3e07d Use sender hash 2019-03-01 10:50:10 -05:00
Mario Vavti
2244bf2ba2 iron out some kinks with scrollToItem() in combination with collapsed content and images 2019-03-01 14:16:19 +01:00
zotlabs
29cb62af3d translate name of content filter (addon) app. 2019-02-28 17:51:13 -08:00
Mario Vavti
6aa041b193 version 2019-02-26 09:30:54 +01:00
Mario Vavti
0fdc0a01d0 Merge branch 'dev' into 4.0RC 2019-02-26 09:29:00 +01:00
Mario Vavti
de7f2eef47 use $channel_id until the function is adapted to not need it 2019-02-26 09:28:16 +01:00
Mario
a449ffe49d Merge branch 'fix-sync_an_item' into 'dev'
Fix sync an item

See merge request hubzilla/core!1531
2019-02-26 09:26:00 +01:00
Mario Vavti
08cacc4943 Merge branch 'dev' into 4.0RC 2019-02-26 09:06:46 +01:00
Mario
04b9216758 Merge branch 'dev' into 'dev'
zot api changes to support combined content (items+files) import addon

See merge request hubzilla/core!1533
2019-02-25 14:06:37 +01:00
zotlabs
1ff97754af issues uncovered testing combined item/file import 2019-02-24 21:43:15 -08:00
zotlabs
20e43311db zot api changes to support combined content (items+files) import addon 2019-02-24 14:46:09 -08:00
M. Dent
89bcb1de42 Merge branch 'js_fixes' into 'dev'
fix regression from commit 04ec35d9cc where...

See merge request hubzilla/core!1532
2019-02-24 03:32:39 +01:00
DM42.Net (Matt Dent)
7a1a44f802 xchan_query and fetch_post_tags uses full query results not a single row 2019-02-23 21:03:05 -05:00
Mario Vavti
06aa32db22 fix regression from commit 04ec35d9cc where selecting multiple images from embed photos dialog broke and fix issue where items were not scrolled to there correct position if justifiedGalleryActive flag was true 2019-02-23 21:48:45 +01:00
DM42.Net (Matt Dent)
6f8593cf47 Fixes - sync item based on item's user 2019-02-23 10:24:05 -05:00
DM42.Net (Matt Dent)
3b2efb1000 Fix misspelled variable 2019-02-23 10:09:58 -05:00
Klaus Weidenbach
87482e3746 Update PHP Version check during Setup.
Hubzilla 4.0 requires PHP7. The oldest still supported PHP branch is 7.1.
So check during Setup for PHP >= 7.1.


(cherry picked from commit 3f13c85b64)
2019-02-22 12:52:25 +01:00
Mario
ef6a280019 Merge branch 'php' into 'dev'
Update PHP Version check during Setup.

See merge request hubzilla/core!1530
2019-02-22 12:51:48 +01:00
Max Kostikov
326ae05b06 Merge branch 'es-es' into 'dev'
Quickfix es-es/hstrings.php

See merge request hubzilla/core!1529
2019-02-22 11:32:33 +01:00
Klaus Weidenbach
3f13c85b64 Update PHP Version check during Setup.
Hubzilla 4.0 requires PHP7. The oldest still supported PHP branch is 7.1.
So check during Setup for PHP >= 7.1.
2019-02-21 21:31:36 +01:00
Manuel Jiménez Friaza
1ae7bd6477 Merge branch 'cherry-pick-f92d2e3f' into 'es-es'
Quickfix es-es/hstrings.php

See merge request mjfriaza/core!6
2019-02-21 18:55:39 +01:00
Manuel Jiménez Friaza
c91641aa83 Quickfix es-es/hstrings.php
(cherry picked from commit f92d2e3f7c)
2019-02-21 18:37:21 +01:00
Manuel Jiménez Friaza
f92d2e3f7c Quickfix es-es/hstrings.php 2019-02-21 18:32:45 +01:00
Manuel Jiménez Friaza
3e2489465f Merge branch 'cherry-pick-a9b75d05' into 'es-es'
Fix es-es/hstrings.php

See merge request mjfriaza/core!5
2019-02-21 12:59:29 +01:00
Manuel Jiménez Friaza
a5bf32a97d Fix es-es/hstrings.php
(cherry picked from commit a9b75d059b)
2019-02-21 12:46:48 +01:00
Manuel Jiménez Friaza
8bb2d29a8d Update Spanish translation
(cherry picked from commit e6f289deb6)

(cherry picked from commit a3a90ea09b)
2019-02-21 12:43:03 +01:00
Manuel Jiménez Friaza
a9b75d059b Fix es-es/hstrings.php 2019-02-21 12:40:27 +01:00
Mario
938e8110ca Merge branch 'es-es' into 'dev'
Update es-es

See merge request hubzilla/core!1526
2019-02-21 12:34:31 +01:00
Mario Vavti
93039081d5 fix summary and use item_normal_search() for viewsrc so we can also view the source for articles, cards, etc.
(cherry picked from commit a0ad110cff)
2019-02-21 12:10:31 +01:00
M. Dent
3d253309b7 Merge branch 'core_fixes' into 'dev'
fix summary and use item_normal_search() for viewsrc so we can also view the...

See merge request hubzilla/core!1525
2019-02-21 12:03:56 +01:00
Manuel Jiménez Friaza
301c1861f3 Merge branch 'cherry-pick-e6f289de' into 'es-es'
Update Spanish translation

See merge request mjfriaza/core!4
2019-02-21 11:54:41 +01:00
Manuel Jiménez Friaza
a3a90ea09b Update Spanish translation
(cherry picked from commit e6f289deb6)
2019-02-21 11:38:45 +01:00
Manuel Jiménez Friaza
e6f289deb6 Update Spanish translation 2019-02-21 11:30:17 +01:00
Manuel Jiménez Friaza
0e22618d93 Merge remote-tracking branch 'upstream/dev' into dev 2019-02-21 11:18:59 +01:00
Mario Vavti
a0ad110cff fix summary and use item_normal_search() for viewsrc so we can also view the source for articles, cards, etc. 2019-02-21 08:48:47 +01:00
Max Kostikov
89ee28f858 Update Russian hstrings.php
(cherry picked from commit 3a6ea57d2c)
2019-02-20 09:20:31 +01:00
Max Kostikov
5917786296 Update Russian hmessages.po
(cherry picked from commit e960bcfd1c)
2019-02-20 09:20:09 +01:00
Mario Vavti
7f1e0313a0 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-02-20 09:12:24 +01:00
Mario Vavti
c89be96209 bump dev version 2019-02-20 09:12:04 +01:00
Max Kostikov
fcd6c3065e Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1524
2019-02-20 09:06:12 +01:00
Mario Vavti
a700ef5e24 bump version 2019-02-20 09:04:48 +01:00
Max Kostikov
3a6ea57d2c Update Russian hstrings.php 2019-02-20 09:00:05 +01:00
Max Kostikov
e960bcfd1c Update Russian hmessages.po 2019-02-20 08:59:50 +01:00
Mario
65e8ed6871 Merge branch 'dev' into 'dev'
basic support for nomadic content, fix for permitted guests deleting their own files in cloud space of other channel,urlencode category widget links

See merge request hubzilla/core!1523
2019-02-20 08:52:13 +01:00
zotlabs
a77d7b8442 urlencode links in category widget 2019-02-19 20:51:06 -08:00
zotlabs
51e9f302b0 hubzilla has uuid - use that instead of wildcard 2019-02-19 13:36:53 -08:00
zotlabs
72fd1cc5a6 remove extraneous logging 2019-02-19 13:23:46 -08:00
zotlabs
1a77bdd1d0 fix ability for file storage creators (visitors) to be able to delete their own content 2019-02-19 13:14:19 -08:00
zotlabs
1ea9002fe8 Merge branch 'dev' of https://framagit.org/zot/core into dev 2019-02-19 11:56:26 -08:00
zotlabs
7d1c3920fd mod_id should return object not collection 2019-02-19 11:45:42 -08:00
Manuel Jiménez Friaza
c5bb074573 Merge remote-tracking branch 'upstream/dev' into dev 2019-02-19 12:15:59 +01:00
Mario Vavti
cead10b9af update composer autoload cache 2019-02-19 10:24:20 +01:00
Mario Vavti
382e94e282 update strings 2019-02-19 10:21:53 +01:00
Mario
7e8434404f Merge branch 'patch-20190218a' into 'dev'
Fix: post_activity_item returns success => true even on failure.

See merge request hubzilla/core!1521
2019-02-19 08:46:03 +01:00
M.Dent
cfcbaf33af Fix: post_activity_item returns success => true even on failure. 2019-02-18 22:40:19 -05:00
zotlabs
175f78fa84 support zot location independent urls 2019-02-18 18:16:50 -08:00
M. Dent
c8ab2bec5e Merge branch 'js_fixes' into 'dev'
prevent page jumping on like if comments are expanded (show all x comments)

See merge request hubzilla/core!1520
2019-02-19 01:24:35 +01:00
M. Dent
136d50a7c5 Merge branch 'mod_display_fixes' into 'dev'
if local_channel() and updating the page do not query for another item if the...

See merge request hubzilla/core!1519
2019-02-19 01:23:28 +01:00
M. Dent
0fa653d580 Merge branch 'core_fixes' into 'dev'
remove zottel.net from fallback servers. it switched to directory_mode_normal from secondary

See merge request hubzilla/core!1518
2019-02-19 01:21:37 +01:00
Mario Vavti
48f2c85791 prevent page jumping on like if comments are expanded (show all x comments) 2019-02-18 14:40:41 +01:00
Mario Vavti
13ca56d380 if local_channel() and updating the page do not query for another item if the first query returned no results. we will most probably find an item from another channel (e.g. after liking a comment) and end up with multiple items with the same mid from different channels after the page update 2019-02-18 14:27:01 +01:00
Mario
b5109d2a1a Merge branch 'photo_driver_refactor' into 'dev'
Photo driver refactor

See merge request hubzilla/core!1515
2019-02-18 10:02:46 +01:00
Mario Vavti
8ab532efb5 remove zottel.net from fallback servers. it switched to directory_mode_normal from secondary 2019-02-18 10:02:18 +01:00
Mario
f11c17063c Merge branch 'QA' into 'dev'
Improve gitlab-ci environment.

See merge request hubzilla/core!1516
2019-02-18 09:44:26 +01:00
Mario
72eb44aebc Merge branch 'dev' into 'dev'
MySQL 8 admin summary compatibility

See merge request hubzilla/core!1517
2019-02-18 09:41:38 +01:00
Max Kostikov
b070503e77 MySQL 8 admin summary compatibility 2019-02-17 22:47:08 +01:00
Klaus Weidenbach
f48e1ee0ac Improve gitlab-ci environment.
Use a custom Hubzilla image to speed up pipeline.
Single test jobs were around 4:30-5:00 minutes, now ~1:30 minute.
Improve Composer cache in Gitlab CI/CD.
Add more recent databases (MySQL8, MariaDB10.3) to the pipeline.
2019-02-17 18:19:09 +01:00
M. Dent
a5b7590d3a Merge branch 'exclude_addon_common' into 'dev'
exclude addon_common from addon list

See merge request hubzilla/core!1513
2019-02-15 22:03:33 +01:00
M. Dent
f0955f1620 Merge branch 'rm_addon_settings' into 'dev'
Remove deprecated addon settings

See merge request hubzilla/core!1514
2019-02-15 22:02:33 +01:00
Mario
4769254978 deprecate addon settings 2019-02-15 12:35:19 +01:00
Mario
ca917f7b9a exclude addon_common from addon list 2019-02-15 11:39:59 +01:00
Klaus Weidenbach
b9df4c99cf Remove duplicate code in PhotoDriver classes.
cropImage is just a special case of cropImageRect, no need to
duplicate all the code.
2019-02-14 22:06:42 +01:00
Klaus Weidenbach
e6dadb215e Refactor photo_driver to use namespaces.
Add simple UnitTest, but it is not yet very meaningful.
2019-02-14 22:06:42 +01:00
Klaus Weidenbach
d70bba2806 Clean up and documentation in photo_drive. 2019-02-14 22:06:42 +01:00
Mario Vavti
3217452b02 missing use app 2019-02-14 14:48:16 +01:00
M. Dent
ff0494b180 Merge branch 'affinity_fixes' into 'dev'
affinity tool fixes

See merge request hubzilla/core!1511
2019-02-14 14:06:25 +01:00
M. Dent
8be15c1b5b Merge branch 'disable_repeats' into 'dev'
disable repeats until issues are resolved

See merge request hubzilla/core!1512
2019-02-14 14:05:24 +01:00
Mario Vavti
0207b5ba8b disable repeats until issues are resolved 2019-02-14 11:32:43 +01:00
Mario Vavti
5ab917f606 affinity tool fixes 2019-02-14 11:06:52 +01:00
Mario
ea541ca21b Merge branch 'aff2' into 'dev'
affinity slider as app

See merge request hubzilla/core!1449
2019-02-14 09:56:53 +01:00
phani00
fc223f5924 affinity slider as app 2019-02-14 09:56:53 +01:00
Mario
7b8eb84cb8 Merge branch 'patch-20190212a' into 'dev'
Fix: only first lock red with privacy_warning

See merge request hubzilla/core!1510
2019-02-13 20:36:33 +01:00
M.Dent
c3e2b463e4 Only cascade privacy warning if thread parent has privacy concerns. 2019-02-13 08:26:03 -05:00
M.Dent
5b3ea012ab Fix: only first lock red with privacy_warning 2019-02-12 22:05:57 -05:00
Max Kostikov
07df43aa2a Merge branch 'dev' into 'dev'
Update Russian translayion

See merge request hubzilla/core!1509
2019-02-12 11:55:17 +01:00
Max Kostikov
6e3bc77369 Update hstrings.php 2019-02-12 11:48:50 +01:00
Max Kostikov
24ddefe3ad Update hmessages.po 2019-02-12 11:47:53 +01:00
Mario
7db645587b Merge branch 'fix-20190211a' into 'dev'
Get all listeners

See merge request hubzilla/core!1508
2019-02-12 08:45:48 +01:00
M.Dent
cbf6d53e84 Get all listeners 2019-02-11 20:24:17 -05:00
Mario Vavti
f52a532771 use ACTIVITY_SHARE to match the verb 2019-02-08 11:33:01 +01:00
Mario Vavti
efc4c53b44 missing use App 2019-02-08 10:15:28 +01:00
zotlabs
4837f9cdad Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2019-02-07 19:54:07 -08:00
zotlabs
317c53acf6 disable repeat unless mid is a resolvable uri since this will do radically different things on different network stacks (e.g. Diaspora) and it turns out there is no possible way to make Diaspora reshares compatible with ActivityPub or Zot6 repeat/announce/boost/whatever. 2019-02-07 14:38:05 -08:00
zotlabs
f02af5fe6e automatically redirect repeat to share for posts with unresolvable message-ids (diaspora, hz < 4.0, etc.). 2019-02-07 14:25:25 -08:00
zotlabs
92e6c21210 add missing zot6 conversation completion (required for message repeats) 2019-02-07 14:13:13 -08:00
zotlabs
beb26e84f3 fix mid generation for shares 2019-02-07 11:18:34 -08:00
Mario Vavti
2b7a605223 exec updateInit() instead of notificationsUpdate() in jotShare() 2019-02-07 09:55:22 +01:00
Mario Vavti
d70f0092f7 Merge remote-tracking branch 'mike/master' into dev 2019-02-07 09:34:22 +01:00
zotlabs
7f6e4a9744 fix verb for reshares 2019-02-06 19:59:05 -08:00
zotlabs
96a4fc7ca2 more work on share/repeat 2019-02-06 19:26:28 -08:00
zotlabs
29c1797493 work on repeat/share for Hubzilla 2019-02-06 17:26:09 -08:00
Mario Vavti
860dead985 Merge remote-tracking branch 'mike/master' into dev 2019-02-06 06:46:05 +01:00
zotlabs
518ceb53a8 allow conversation completion for new comments to expired posts, regardless of hyperdrive settings.
Note that hyperdrive conversations may still be fetched from zap/osada servers but will be ignored.
2019-02-05 14:51:01 -08:00
Max Kostikov
4bcddca1f0 Merge branch 'viewsrc_update' into 'dev'
add the actual mid for debuging reasons

See merge request hubzilla/core!1506
2019-02-04 10:38:26 +01:00
Mario Vavti
cf80f03084 Merge remote-tracking branch 'mike/master' into dev 2019-02-04 10:03:38 +01:00
zotlabs
47f31eed37 update tests for changes in handle_tags() 2019-02-03 17:10:33 -08:00
zotlabs
8ff9a9ff08 fix linkify_tags() so it works with xchans across multiple protocols, also some fixes to activity parsing from upstream. 2019-02-03 16:53:49 -08:00
Mario Vavti
8dcf27ba29 add the actual mid for debuging reasons 2019-02-03 21:12:09 +01:00
Mario Vavti
d97043725d update changelog 2019-02-03 15:12:38 +01:00
Mario
90fd323ac5 bump version 2019-02-03 15:03:56 +01:00
Mario Vavti
b6c384a0f7 cleanup logging and return if query returns empty result
(cherry picked from commit c657d766cf)
2019-02-03 15:02:06 +01:00
Mario Vavti
cda8a7be38 do not overwrite $sql_extra
(cherry picked from commit 4706ff6938)
2019-02-03 15:01:39 +01:00
Mario Vavti
c657d766cf cleanup logging and return if query returns empty result 2019-02-03 14:58:19 +01:00
Mario Vavti
4706ff6938 do not overwrite $sql_extra 2019-02-03 14:52:50 +01:00
M. Dent
c444af007f Merge branch 'core_fixes' into 'dev'
fix #1332

See merge request hubzilla/core!1505
2019-02-03 02:22:16 +01:00
Mario Vavti
6e80bb49fb fix #1332 2019-02-02 22:11:26 +01:00
Mario
bf3d0c1274 Merge branch 'patch-20190201a' into 'dev'
Add filter hooks and the ability to add buttons to the default status editor

See merge request hubzilla/core!1502
2019-02-02 20:50:40 +01:00
M. Dent
0ded1d326c Merge branch 'dev' into 'dev'
Prevent Hubzilla usage for SEO backlinks

See merge request hubzilla/core!1501
2019-02-01 18:01:01 +01:00
DM42.Net (Matt Dent)
708d288121 Add filter hooks and the ability to add buttons to the default status editor 2019-02-01 09:49:11 -05:00
Max Kostikov
6462c83f69 Prevent Hubzilla usage for SEO backlinks 2019-02-01 15:47:51 +01:00
Mario
f30bb452cc Merge branch 'patch-20190130a' into 'dev'
Set lock red and provide warning  if a forum is tagged in the post

See merge request hubzilla/core!1499
2019-02-01 09:29:59 +01:00
M. Dent
ad4dd2def5 Set lock red and provide warning if a forum is tagged in the post 2019-02-01 09:29:59 +01:00
Max Kostikov
76582a60b5 Merge branch 'core_fixes' into 'dev'
starring and filing is only supported for post item type

See merge request hubzilla/core!1498
2019-01-31 18:39:07 +01:00
Mario
004246163d starring and filing is only supported for post item type 2019-01-31 18:39:07 +01:00
Max Kostikov
a2cae45f00 Merge branch 'dev' into 'dev'
Fix typos in Russian translation

See merge request hubzilla/core!1500
2019-01-31 18:14:16 +01:00
Max Kostikov
c1159337da Update hstrings.php 2019-01-31 18:06:19 +01:00
Max Kostikov
71adbd7c39 Update hmessages.po 2019-01-31 18:06:09 +01:00
zotlabs
a56bc0e1e0 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2019-01-30 18:34:44 -08:00
zotlabs
519db2aace set document title when title changes on a page update 2019-01-30 18:33:10 -08:00
Mario Vavti
e64c5661da Merge remote-tracking branch 'mike/master' into dev 2019-01-30 09:48:07 +01:00
zotlabs
b15421826d cache embeds in the background on initial storage rather than on first access 2019-01-29 15:14:49 -08:00
Mario Vavti
3b31dbaa16 clean up whitespace and remove superfluous semicolon 2019-01-29 22:37:30 +01:00
Mario
318957cb81 Merge branch 'dev' into 'dev'
Custom sessionhandler support, as requested

See merge request hubzilla/core!1497
2019-01-29 22:22:59 +01:00
Mark Nowiasz
4b516fdb09 Custom sessionhandler support, as requested 2019-01-29 21:41:23 +01:00
Mario
913b620c66 Revert "Make session handler pluggable"
This reverts commit 8972ca8134
2019-01-29 21:16:38 +01:00
Mario
cd4d90c647 Revert "fix wrong function name and coding style"
This reverts commit 456207b4e7
2019-01-29 21:16:16 +01:00
Mario Vavti
456207b4e7 fix wrong function name and coding style 2019-01-29 10:13:49 +01:00
Mario
39604d2fdc Merge branch 'sessionhandlerhook' into 'dev'
Make session handler pluggable

See merge request hubzilla/core!1494
2019-01-29 10:06:37 +01:00
Mario
27e415e664 Merge branch 'boot' into 'dev'
Correct variable in boot.php

See merge request hubzilla/core!1495
2019-01-29 10:06:18 +01:00
Mario
c57a4cf926 Merge branch 'doku' into 'dev'
Extend documentation.

See merge request hubzilla/core!1496
2019-01-29 10:06:04 +01:00
Mario Vavti
0a868b5c27 Merge remote-tracking branch 'mike/master' into dev 2019-01-29 09:49:53 +01:00
zotlabs
753f137575 disable hyperdrive in hubzilla 2019-01-28 15:29:39 -08:00
Klaus Weidenbach
728788e3b9 Extend documentation. 2019-01-28 23:58:19 +01:00
Klaus Weidenbach
ec6e130eb3 Correct variable in boot.php 2019-01-28 23:10:36 +01:00
DM42.Net (Matt Dent)
8972ca8134 Make session handler pluggable 2019-01-28 14:20:46 -05:00
Mario Vavti
671b6d2eda Merge remote-tracking branch 'mike/master' into dev 2019-01-28 12:48:21 +01:00
zotlabs
043f7bf2ab Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2019-01-28 02:48:57 -08:00
zotlabs
625cdde9a4 block private reshares from zot6 due to different parents 2019-01-28 02:46:45 -08:00
M. Dent
e3d39fbf3f Merge branch 'core_fixes' into 'dev'
update nginx and lighttpd sample server configs to explicit dissalow access to util

See merge request hubzilla/core!1493
2019-01-28 05:41:26 +01:00
zotlabs
94cbc8bd31 share fixes 2019-01-27 12:38:51 -08:00
Mario Vavti
e262de9b2d update nginx and lighttpd sample server configs to explicit dissalow access to util 2019-01-27 18:05:46 +01:00
Mario
17d9e30be5 Merge branch 'patch-20190125a' into 'dev'
Remove extraneous sync logic

See merge request hubzilla/core!1490
2019-01-27 17:36:56 +01:00
M. Dent
37b7dc8e7c Remove extraneous sync logic 2019-01-27 17:36:56 +01:00
Mario Vavti
5c2f7a744a Merge remote-tracking branch 'mike/master' into dev 2019-01-27 17:30:10 +01:00
zotlabs
535f0f45c9 cleanup of cli admin tool 2019-01-26 12:55:12 -08:00
zotlabs
b9cef2f38f command line tool for managing site admins 2019-01-26 12:17:52 -08:00
M. Dent
793d78fba6 Merge branch 'core_fixes' into 'dev'
return false if http signatue is not valid

See merge request hubzilla/core!1489
2019-01-26 00:21:09 +01:00
Max Kostikov
5ad055efb4 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1491
2019-01-25 20:04:19 +01:00
Max Kostikov
3277595366 Update hstrings.php 2019-01-25 19:56:15 +01:00
Max Kostikov
b11be32063 Update hmessages.po 2019-01-25 19:55:23 +01:00
Mario Vavti
725652006d bump version 2019-01-25 12:14:17 +01:00
Mario Vavti
10587e3a84 return false if http signatue is not valid 2019-01-25 10:49:17 +01:00
Mario
073115e7ab Merge branch 'apidocpublishing' into 'dev'
Suggestion: Publish doxygen API documentation at gitlab pages.

See merge request hubzilla/core!1488
2019-01-25 10:32:12 +01:00
Mario
45dcd987c5 Merge branch 'doku' into 'dev'
Correct and extend Doxygen comments.

See merge request hubzilla/core!1485
2019-01-25 10:31:09 +01:00
Mario Vavti
960246fbb9 Merge remote-tracking branch 'mike/master' into dev 2019-01-25 09:51:36 +01:00
zotlabs
2fa274de1e support photo items between zot and zot6 2019-01-24 19:08:57 -08:00
Klaus Weidenbach
4cc98874a0 Publish doxygen API documentation at gitlab pages.
Create the API documentation with Doxygen and
publish it through gitlab-ci as a Gitlab page at:
https://hubzilla.frama.io/core
This should only happen when master gets updated.

Update Doxyfile configuration. Correct image usage.
Replace RedMatrix with Hubzilla icon.
2019-01-24 22:03:15 +01:00
Max Kostikov
fafd05afb2 Merge branch 'js_fixes' into 'dev'
possibly more  page jumping fixes

See merge request hubzilla/core!1486
2019-01-24 21:57:42 +01:00
Max Kostikov
7a3ad30bfa Merge branch 'zot6_fixes' into 'dev'
macke mod chanview aware of zot6

See merge request hubzilla/core!1487
2019-01-24 21:57:14 +01:00
Mario Vavti
32acf9cb72 macke mod chanview aware of zot6 2019-01-24 18:06:27 +01:00
Mario Vavti
ddbc35181c fix page jumping when liking a collapsed/expanded post
(cherry picked from commit 54806f6ee8)
2019-01-24 13:39:49 +01:00
Mario Vavti
0946ac2ff9 possibly more page jumping fixes 2019-01-24 12:53:38 +01:00
Max Kostikov
1d314834a4 Merge branch 'js_fixes' into 'dev'
fix page jumping when liking a collapsed/expanded post

See merge request hubzilla/core!1484
2019-01-24 10:40:33 +01:00
Klaus Weidenbach
13e0151cd2 Correct and extend Doxygen comments.
Correct some documentation errors for Doxygen and add
more comments.
Document some undefined variables with @FIXME.
2019-01-23 22:25:47 +01:00
Mario
51a7be29f5 Merge branch 'prepare_text' into 'dev'
Correct parameter in include/text.php prepare_text()

See merge request hubzilla/core!1483
2019-01-23 15:41:54 +01:00
Mario
ef46738384 Merge branch 'dev' into 'dev'
Skip tags detection in URL

See merge request hubzilla/core!1482
2019-01-23 15:39:13 +01:00
Mario Vavti
54806f6ee8 fix page jumping when liking a collapsed/expanded post 2019-01-23 15:36:34 +01:00
Klaus Weidenbach
ae538a2259 Correct parameter in include/text.php prepare_text()
Also extend documentation.
2019-01-22 23:25:30 +01:00
Max Kostikov
66f443fd00 Skip tags detection in URL 2019-01-22 16:23:44 +01:00
Mario
ca9c29e2b6 Merge branch 'embedphotos' into 'dev'
Try to fix some warnings in Zotlabs\Module\Embedphotos.

See merge request hubzilla/core!1481
2019-01-22 12:23:20 +01:00
Mario
273beb016b Merge branch 'patch-20190114a' into 'dev'
Add remaining hook insertions

See merge request hubzilla/core!1471
2019-01-22 12:13:16 +01:00
M. Dent
cd8a0f33b5 Add remaining hook insertions 2019-01-22 12:13:16 +01:00
Klaus Weidenbach
b1e05b4832 Try to fix some warnings in Zotlabs\Module\Embedphotos.
$phototypes was undefined, hope this is correct selection
to fix it.
Correct Doxygen and clean up some variables and refactoring.
2019-01-22 00:59:00 +01:00
Mario Vavti
4c0378eeae Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2019-01-21 12:04:57 +01:00
Mario Vavti
ea14398929 Merge remote-tracking branch 'mike/master' into dev 2019-01-21 12:04:01 +01:00
zotlabs
1b5dd8bbd7 comment permission fix 2019-01-20 15:09:35 -08:00
Manuel Jiménez Friaza
4e8fc6d198 Merge remote-tracking branch 'upstream/dev' into dev 2019-01-20 12:58:27 +01:00
M. Dent
39128c34cc Merge branch 'dev' into 'dev'
Some fixes in include/help.php.

See merge request hubzilla/core!1479
2019-01-19 05:21:53 +01:00
M. Dent
542d21c4e1 Merge branch 'bugfix-plugin' into 'dev'
Fix wrong variable name in include/plugin.php.

See merge request hubzilla/core!1480
2019-01-19 05:18:35 +01:00
Klaus Weidenbach
90a62405ca Fix wrong variable name in include/plugin.php. 2019-01-19 00:28:01 +01:00
Klaus Weidenbach
bba20c27fe Some fixes in include/help.php.
Remove unused variables and a wrong function name.
2019-01-18 22:37:05 +01:00
Mario Vavti
d355e57fa6 Merge remote-tracking branch 'mike/master' into dev 2019-01-18 10:09:16 +01:00
Mario
f2d7c4091a Merge branch 'QA' into 'dev'
Add PostgreSQL to gitlab-ci setup.

See merge request hubzilla/core!1478
2019-01-18 10:05:13 +01:00
M. Dent
bf879ce742 Merge branch 'dreport_fixes' into 'dev'
fix delivery report for zot6 connections

See merge request hubzilla/core!1476
2019-01-18 06:15:01 +01:00
M. Dent
e89a3b05ec Merge branch 'core_fixes' into 'dev'
possible fix for #1326

See merge request hubzilla/core!1477
2019-01-18 06:13:04 +01:00
zotlabs
52305ca91b more specific network checking in several places and remove some old debugging crud 2019-01-17 14:45:53 -08:00
Klaus Weidenbach
d6167636fa Add PostgreSQL to gitlab-ci setup.
Run our tests against a PostgreSQL again.
2019-01-17 22:13:12 +01:00
Mario Vavti
cc1e1a525f possible fix for #1326 2019-01-17 21:42:24 +01:00
zotlabs
96deae43fa this should fix the rest of the event stuff 2019-01-17 11:47:55 -08:00
Mario Vavti
5aa0267936 add space 2019-01-17 20:09:19 +01:00
zotlabs
b1b1e0eba4 channel connect issue 2019-01-17 10:47:04 -08:00
Mario Vavti
07f6465872 fix delivery report for zot6 connections 2019-01-17 11:39:52 +01:00
zotlabs
eda7c5369c event attendance testing continued (now works at a basic level from one direction, more testing needed) 2019-01-16 21:09:04 -08:00
zotlabs
e9f709301c more z6 event work 2019-01-16 17:32:16 -08:00
zotlabs
7e29bd10b6 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2019-01-16 16:52:21 -08:00
zotlabs
20eea2184b more work on z6 events 2019-01-16 16:50:44 -08:00
zotlabs
eaa375936f more z6 compatibility fixes 2019-01-16 15:28:30 -08:00
Mario Vavti
de8582ec07 Merge branch 'fix_dreport_issue' into dev 2019-01-16 21:52:16 +01:00
M. Dent
e6ccdc2378 Merge branch 'queue_fixes_1' into 'dev'
do not return if delivery report could not bedecrypted

See merge request hubzilla/core!1475
2019-01-16 15:58:13 +01:00
Mario Vavti
4450a01014 do not return if delivery report could not bedecrypted 2019-01-16 15:09:18 +01:00
Mario Vavti
a1ac507a94 change logic for consistency 2019-01-16 10:02:13 +01:00
Mario Vavti
ad6eb15eac fix legacy zot dreport not passing the is_storable check 2019-01-15 22:36:01 +01:00
Mario
2e94e4cd67 Merge branch 'core_fixes' into 'dev'
Core fixes

See merge request hubzilla/core!1470
2019-01-15 11:38:41 +01:00
Mario Vavti
c26e112bee whitespace 2019-01-14 15:06:21 +01:00
Mario Vavti
7daf18b077 fix a new instance of autocomplete created on each conversation update 2019-01-14 14:07:56 +01:00
Mario
a8a5d2fc4e Merge branch 'patch-20190113c' into 'dev'
Hooks to allow addons to add "extras" to privacy group settings edit page.

See merge request hubzilla/core!1469
2019-01-14 10:29:48 +01:00
Mario
90f6abfa7c Merge branch 'patch-20190113a' into 'dev'
Add collect_public_recipients hook

See merge request hubzilla/core!1467
2019-01-14 10:29:19 +01:00
Mario Vavti
65f2d7fd66 Merge branch 'dev' into core_fixes 2019-01-14 10:14:44 +01:00
Mario Vavti
f3554804bf only load new content onpopstate if the mid has actually changed 2019-01-14 10:14:37 +01:00
DM42.Net (Matt Dent)
f5e571ba40 Remove stray $ 2019-01-13 20:04:12 -05:00
DM42.Net (Matt Dent)
e43331b7a2 Add privacygroup_extras_post/drop hooks 2019-01-13 15:43:25 -05:00
Max Kostikov
e78fd09e07 Merge branch 'patch-20190113b' into 'dev'
FIX: aggregated query error in MYSQL

See merge request hubzilla/core!1468
2019-01-13 20:49:03 +01:00
DM42.Net (Matt Dent)
b4c1ca88f3 move order by and rewrite similar in update_queue_item() 2019-01-13 14:41:44 -05:00
DM42.Net (Matt Dent)
dba9c2fbb0 Add pgrp_extras hook & display 2019-01-13 14:34:04 -05:00
DM42.Net (Matt Dent)
ab074f52fe outq_created not outq_scheduled 2019-01-13 14:10:35 -05:00
DM42.Net (Matt Dent)
121fa834d5 FIX: aggregated query error in MYSQL 2019-01-13 14:06:36 -05:00
DM42.Net (Matt Dent)
598cbf2210 Add collect_public_recipients hook 2019-01-12 22:37:44 -05:00
Mario
9e42dfd094 Merge branch 'patch-20190111a' into 'dev'
FIX: memory exhaustion on zot message pickup with large message queue

See merge request hubzilla/core!1466
2019-01-12 09:22:37 +01:00
M. Dent
8aa117e4ae FIX: memory exhaustion on zot message pickup with large message queue 2019-01-12 09:22:37 +01:00
Mario
f6f4e40a64 Merge branch 'patch-20190110a' into 'dev'
FIX: memory exhaustion on exceptionally large message queues & multiple...

See merge request hubzilla/core!1465
2019-01-11 20:03:34 +01:00
DM42.Net (Matt Dent)
caf2c0a6c4 Use dba_driver.php::db_getfunc() 2019-01-11 07:35:12 -05:00
zotlabs
57dde3e980 failure to import mail
(cherry picked from commit 7b30fc4b82)
2019-01-11 12:20:50 +01:00
Mario Vavti
dc8da4717f Merge remote-tracking branch 'mike/master' into dev 2019-01-11 10:14:06 +01:00
zotlabs
7b30fc4b82 failure to import mail 2019-01-10 15:02:58 -08:00
DM42.Net (Matt Dent)
6791b05a40 Fix for PGSQL/MYSQL difference 2019-01-10 15:29:24 -05:00
ZotSocial Admin
b54ddccd7b FIX: memory exhaustion on exceptionally large message queues & multiple Queue.php invocations duplicate work 2019-01-10 13:15:00 -05:00
Max Kostikov
d32360cb3e Merge branch 'core_fixes' into 'dev'
we must sslify all possible content variables

See merge request hubzilla/core!1464
2019-01-10 14:12:16 +01:00
Mario Vavti
3eba0c2297 do not count removed channels
(cherry picked from commit 01f4ce96f1)
2019-01-10 13:36:31 +01:00
Mario Vavti
01f4ce96f1 do not count removed channels 2019-01-10 13:35:27 +01:00
Mario Vavti
90b6afe06b we must sslify all possible content variables 2019-01-10 00:29:05 +01:00
M. Dent
b22caef65f Merge branch 'composer_updates' into 'dev'
update composer libs

See merge request hubzilla/core!1455
2019-01-09 19:09:20 +01:00
M. Dent
db4281164c Merge branch 'core_gallery_05' into 'dev'
core changes for gallery 05

See merge request hubzilla/core!1463
2019-01-09 19:04:52 +01:00
Mario Vavti
217c2cacaf Merge branch 'dev' into core_gallery_05 2019-01-09 10:30:44 +01:00
Mario Vavti
df4b6f0376 Merge remote-tracking branch 'mike/master' into dev 2019-01-09 10:25:04 +01:00
Mario
6ec1bfebec Merge branch 'patch-20190106a' into 'dev'
Remove Experimental Worker Queue from CORE - add hook 'daemon_master_release'

See merge request hubzilla/core!1461
2019-01-09 10:16:53 +01:00
M. Dent
5d88326915 Remove Experimental Worker Queue from CORE - add hook 'daemon_master_release' 2019-01-09 10:16:53 +01:00
Mario
24354b9dcc Merge branch 'patch-20190107a' into 'dev'
Tweak to deal with changes that may happen within the same second.

See merge request hubzilla/core!1462
2019-01-09 10:16:05 +01:00
zotlabs
39de8e28da make Apps::get_base_apps() pluggable 2019-01-08 14:14:55 -08:00
Mario Vavti
06beb59628 slightly improve item.is_new rendering 2019-01-08 15:23:08 +01:00
DM42.Net (Matt Dent)
563a5088be Tweak to deal with changes that may happen within the same second. 2019-01-07 19:48:14 -05:00
M. Dent
c10c59db4b Merge branch 'browser_compatibility' into 'dev'
fix issue with IE

See merge request hubzilla/core!1460
2019-01-07 17:09:26 +01:00
M. Dent
463f084b3e Merge branch 'update_bbcode' into 'dev'
Update bbcode

See merge request hubzilla/core!1459
2019-01-07 17:09:00 +01:00
Mario
312e0dcbc8 Update bbcode 2019-01-07 17:09:00 +01:00
Mario Vavti
6f93001658 fix issue with IE 2019-01-07 09:47:08 +01:00
Max Kostikov
48821a6da5 Merge branch 'check_content_type-1' into 'dev'
fix content type check

See merge request hubzilla/core!1458
2019-01-03 19:41:00 +01:00
Mario Vavti
b93bc142d3 missing closing parenthesis 2019-01-03 19:18:49 +01:00
Mario Vavti
ab9b8b8b0a fix content type check 2019-01-03 19:13:56 +01:00
Max Kostikov
1c4a90626a Merge branch 'revert-3f61d24d' into 'dev'
Revert "Merge branch 'check_content_type' into 'dev'"

See merge request hubzilla/core!1456
2019-01-03 17:18:52 +01:00
Max Kostikov
3bf1866f4a Revert "Merge branch 'check_content_type' into 'dev'"
This reverts merge request !1453
2019-01-03 17:13:40 +01:00
Max Kostikov
1a652b555f Merge branch 'update_boot' into 'dev'
add zotsite.net to directory fallback servers

See merge request hubzilla/core!1454
2019-01-03 16:32:31 +01:00
Max Kostikov
3f61d24d0a Merge branch 'check_content_type' into 'dev'
check suppported type if we get content type from header

See merge request hubzilla/core!1453
2019-01-03 16:31:48 +01:00
Max Kostikov
16064d5614 Merge branch 'fix_pconfig' into 'dev'
fix preg_match(): Delimiter must not be alphanumeric or backslash warning

See merge request hubzilla/core!1452
2019-01-03 16:30:14 +01:00
Mario Vavti
d9f21db623 Merge remote-tracking branch 'mike/master' into dev 2019-01-03 14:05:08 +01:00
zotlabs
8ac541e634 better handling of notification updates while commenting 2019-01-02 23:33:33 -08:00
Mario Vavti
da2688403e Merge remote-tracking branch 'mike/master' into dev 2019-01-02 23:07:37 +01:00
Mario Vavti
dbd230da74 update composer libs 2019-01-02 22:41:03 +01:00
zotlabs
f660530ef5 allow notification updates when composing comments. This was disabled when it was possible to have liveUpdate run automatically while composing comments, but it seems that live update is no longer possible (however the setting still remains - this should probably be removed). 2019-01-02 12:49:04 -08:00
Mario
a19563e139 Revert "Use subselect"
This reverts commit a50433dd95
2019-01-02 19:56:11 +01:00
Mario
c4400cf72a Merge branch 'patch-20181230a' into 'dev'
Use subselect

See merge request hubzilla/core!1451
2019-01-02 19:47:39 +01:00
Mario Vavti
aae4943e64 add zotsite.net to directory fallback servers 2019-01-02 19:43:52 +01:00
Mario Vavti
b0339b848f fix preg_match(): Delimiter must not be alphanumeric or backslash warning 2019-01-02 17:53:28 +01:00
Mario Vavti
f3f106c21f check suppported type if we get content type from header 2019-01-02 17:49:21 +01:00
DM42.Net (Matt Dent)
a50433dd95 Use subselect 2018-12-30 15:05:45 -05:00
Max Kostikov
37d7d18bb7 Faster image processing with photo cache addon 2018-12-24 09:22:58 +01:00
Mario
414b7e28d3 bump version 2018-12-22 21:02:49 +01:00
Mario Vavti
fca464071f update changelog
(cherry picked from commit cdb85f1309)
2018-12-22 21:01:50 +01:00
Mario Vavti
cdb85f1309 update changelog 2018-12-22 21:00:01 +01:00
Mario Vavti
4f08f4b84c use count() instead of sizeof()
(cherry picked from commit 774dd6d5e3)
2018-12-22 20:20:58 +01:00
Mario Vavti
1b5175d018 check if we deal with an array before sizeof()
(cherry picked from commit 339c9cceec)
2018-12-22 20:20:13 +01:00
Mario
6d7fba6758 Merge branch 'fix_linkinfo_warning' into 'dev'
check if we deal with an array before sizeof()

See merge request hubzilla/core!1444
2018-12-22 20:18:41 +01:00
Mario Vavti
0bfda6d4c8 revert padding for text highlight. It is messing with indent punctuation and decreases legibility of the highlighted text.
(cherry picked from commit fac3579fb0)
2018-12-22 20:18:12 +01:00
Mario
880b22604b manualy Fix cURL with HTTP/2 due to merge conflicts 2018-12-22 20:17:20 +01:00
Mario
04a2dc075f manualy remove scale_external_images() due to merge conflicts 2018-12-22 20:08:44 +01:00
Max Kostikov
01448c152c Remove scale_external_images()
(cherry picked from commit 1541f67eab)
2018-12-22 20:04:09 +01:00
Max Kostikov
a09beb3833 Remove scale_external_images()
(cherry picked from commit a2959c6e9e)
2018-12-22 20:03:49 +01:00
phani00
feda1e6d84 remove color from style.css (default) but add a little padding; add color & border radius to dark.css.
(cherry picked from commit 2354bb5427)
2018-12-22 19:54:48 +01:00
phani00
4256bea418 change hl text color to the default text color in non-dark schema. looks good, except in dark, where i can change it in dark.css.
(cherry picked from commit b97143e9db)
2018-12-22 19:54:31 +01:00
phani00
4d47b098e5 remove some fancy formatting.
(cherry picked from commit aaab905e72)
2018-12-22 19:54:11 +01:00
Mario Vavti
163754a46c make mod channel deal with b64 encoded mid\s
;


(cherry picked from commit bc6d384ca9)
2018-12-22 19:53:37 +01:00
phani00
66b56416b6 new fix for dark theme
change implementation of hl-tags in include/bbcode.php
insert class='default-highlight' instead of background-color: 'yellow' into span
add span.default-highlight definition to view/theme/redbasic/css/style.css

this works for all schemas incl. dark.


(cherry picked from commit aace8a14ce)
2018-12-22 19:52:39 +01:00
phani00
c855346358 remove my dark theme fixes.
(cherry picked from commit 70a7661711)
2018-12-22 19:52:09 +01:00
Pascal Deklerck
0e32c86c3d Update OAuth2Storage.php - fix email retrieval in getUser
(cherry picked from commit 6a825cc504)
2018-12-22 19:51:16 +01:00
Mario Vavti
fac3579fb0 revert padding for text highlight. It is messing with indent punctuation and decreases legibility of the highlighted text. 2018-12-22 19:47:46 +01:00
M. Dent
19952264c8 Add reload to util/addons
(cherry picked from commit 0e5d76e735)
2018-12-22 19:43:16 +01:00
Mario Vavti
5ec1e97cae do not add timestamp to the photo src. caching is handled in mod photo now.
(cherry picked from commit e34853e19e)
2018-12-21 21:45:33 +01:00
zotlabs
5f5746a2f6 like permission issue
(cherry picked from commit 389b4beba4)
2018-12-21 21:44:33 +01:00
Mario
458b023204 Merge branch 'dev' into 'dev'
Fix for cURL with default HTTP/2

See merge request hubzilla/core!1447
2018-12-21 21:35:54 +01:00
Max Kostikov
4bad4ec632 Merge branch 'remove-legacy-photo-cache-prevention' into 'dev'
do not add timestamp to the photo src. caching is handled in mod photo now.

See merge request hubzilla/core!1448
2018-12-21 15:19:36 +01:00
Mario Vavti
e34853e19e do not add timestamp to the photo src. caching is handled in mod photo now. 2018-12-21 12:51:19 +01:00
Mario Vavti
6cbdb1b4c3 Merge remote-tracking branch 'mike/master' into dev 2018-12-21 12:19:52 +01:00
Max Kostikov
60f890ce0d Fix for cURL with default HTTP/2 2018-12-20 21:13:05 +01:00
Max Kostikov
c82c0a9812 Merge branch 'dev' into 'dev'
Dev

See merge request kostikov/core!2
2018-12-20 21:09:16 +01:00
Max Kostikov
123b1d4002 Merge branch 'revert-090fe394' into 'dev'
Revert "Fix cURL with HTTP/2"

See merge request hubzilla/core!1446
2018-12-20 21:04:12 +01:00
Max Kostikov
e4958d5bb9 Revert "Fix cURL with HTTP/2"
This reverts commit 090fe394e4
2018-12-20 20:58:48 +01:00
Max Kostikov
89e734dcca Merge branch 'dev' into 'dev'
Sync dev

See merge request kostikov/core!1
2018-12-20 20:51:26 +01:00
Max Kostikov
090fe394e4 Fix cURL with HTTP/2 2018-12-20 20:38:35 +01:00
zotlabs
389b4beba4 like permission issue 2018-12-20 11:06:52 -08:00
Mario Vavti
d0ee6d1ad2 missing observer check
(cherry picked from commit ec769bc9f9)
2018-12-20 19:45:59 +01:00
Mario Vavti
ec769bc9f9 missing observer check 2018-12-20 19:45:11 +01:00
Mario Vavti
6b259070f0 Merge remote-tracking branch 'mike/master' into dev 2018-12-20 12:59:04 +01:00
zotlabs
7a55dd512a reverse activity mapping improvements 2018-12-19 20:03:31 -08:00
Mario Vavti
774dd6d5e3 use count() instead of sizeof() 2018-12-19 11:08:28 +01:00
Mario
4cbaddf4c4 Merge branch 'dark-fix-dev' into 'dev'
fix for dark theme; includes one changes to bbcode.php and redbasic/css/style.css

See merge request hubzilla/core!1442
2018-12-19 10:14:29 +01:00
Mario
10f1da2736 Merge branch 'util-reload_addons' into 'dev'
Add reload to util/addons

See merge request hubzilla/core!1434
2018-12-19 10:12:59 +01:00
M. Dent
0e5d76e735 Add reload to util/addons 2018-12-19 10:12:59 +01:00
Mario Vavti
339c9cceec check if we deal with an array before sizeof() 2018-12-19 10:05:18 +01:00
phani00
2354bb5427 remove color from style.css (default) but add a little padding; add color & border radius to dark.css. 2018-12-18 17:54:39 +01:00
Max Kostikov
fe80f8179c Merge branch 'channel_b64_enc_mid' into 'dev'
make mod channel deal with b64 encoded mid's

See merge request hubzilla/core!1443
2018-12-18 15:10:58 +01:00
phani00
b97143e9db change hl text color to the default text color in non-dark schema. looks good, except in dark, where i can change it in dark.css. 2018-12-18 14:02:50 +01:00
phani00
aaab905e72 remove some fancy formatting. 2018-12-18 12:37:51 +01:00
Mario Vavti
bc6d384ca9 make mod channel deal with b64 encoded mid\s
;
2018-12-18 10:43:06 +01:00
Mario
6fc8c174f9 Merge branch 'dev' into 'dev'
Remove scale_external_images()

See merge request hubzilla/core!1441
2018-12-18 10:17:57 +01:00
Mario Vavti
63b205c601 Merge remote-tracking branch 'mike/master' into dev 2018-12-18 09:59:34 +01:00
zotlabs
15ce8bc79b Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-12-17 18:45:42 -08:00
zotlabs
8d70b91955 regression: mail from dev to core not delivering 2018-12-17 18:14:32 -08:00
zotlabs
a33ed05bec fix default values for affinity tool and other information which could be lost when approving a connection without the entire form provided by connedit. 2018-12-17 11:32:59 -08:00
phani00
aace8a14ce new fix for dark theme
change implementation of hl-tags in include/bbcode.php
insert class='default-highlight' instead of background-color: 'yellow' into span
add span.default-highlight definition to view/theme/redbasic/css/style.css

this works for all schemas incl. dark.
2018-12-17 15:28:15 +00:00
phani00
d80b8ff30f Merge branch 'dev' into dark-fix-dev 2018-12-17 15:18:24 +00:00
Max Kostikov
3a66255576 Remove scale_external_images() 2018-12-17 13:29:37 +01:00
Max Kostikov
1541f67eab Remove scale_external_images() 2018-12-17 13:28:58 +01:00
Max Kostikov
a2959c6e9e Remove scale_external_images() 2018-12-17 13:28:18 +01:00
zotlabs
06c71eec65 default curl to http/1.1
(cherry picked from commit 04a45a407e)
2018-12-17 12:17:44 +01:00
phani00
70a7661711 remove my dark theme fixes. 2018-12-17 10:08:45 +00:00
Mario
d190b1995b Merge branch 'dev' into 'dev'
Keep remote site headers to respect caching policy

See merge request hubzilla/core!1440
2018-12-17 10:55:53 +01:00
Mario
a6f8230063 Merge branch 'memory-warn2' into 'dev'
add warning if upload_filesize < 4MB.

See merge request hubzilla/core!1438
2018-12-17 10:55:29 +01:00
DM42.Net (Matt Dent)
aabc6c2825 Add return if no local_channel()
(cherry picked from commit 5bcc379530)
2018-12-17 10:46:43 +01:00
DM42.Net (Matt Dent)
8323458da9 ARTICLES MODULE: Default to local_channel() user when no argv(1) is passed.
(cherry picked from commit 3f06a857c2)
2018-12-17 10:46:24 +01:00
Mario Vavti
e4c60d70b0 Merge remote-tracking branch 'mike/master' into dev 2018-12-17 10:12:53 +01:00
Max Kostikov
4d8a815932 Keep remote site headers for caching 2018-12-17 09:34:30 +01:00
Max Kostikov
b0e5f5973a Merge branch 'dev' into 'dev'
Move SSLify code from Photo cache addon

See merge request hubzilla/core!1439
2018-12-17 09:19:08 +01:00
Max Kostikov
05cb4fd897 Move SSLify code from Photo cache addon 2018-12-17 09:13:03 +01:00
Max Kostikov
72dc6ea77c Revert Photos.php code 2018-12-17 01:16:08 +01:00
Max Kostikov
1b0a6fe9eb SSLify cached URL on redirect if needed 2018-12-17 00:58:46 +01:00
Max Kostikov
363ad01bce SSLify cached URL on redirect if needed 2018-12-17 00:30:36 +01:00
zotlabs
04a45a407e default curl to http/1.1 2018-12-16 14:38:58 -08:00
phani00
14735e0a48 Update Zotlabs/Module/Setup.php 2018-12-16 22:04:28 +01:00
phani00
1c07428f89 add warning if upload_filesize < 4MB. 2018-12-16 20:35:20 +00:00
Max Kostikov
e0d68664c4 Remove photo_cache_enable variable 2018-12-16 20:48:36 +01:00
Mario
6c72c3d4a5 Merge branch 'patch-20181214a' into 'dev'
ARTICLES MODULE: Default to local_channel() user when no argv(1) is passed.

See merge request hubzilla/core!1427
2018-12-16 20:08:52 +01:00
DM42.Net (Matt Dent)
5bcc379530 Add return if no local_channel() 2018-12-15 19:49:59 -05:00
M. Dent
c854ec0686 Merge branch 'dev' into 'dev'
Update OAuth2Storage.php - fix email retrieval in getUser

See merge request hubzilla/core!1436
2018-12-15 22:33:03 +01:00
Pascal Deklerck
6a825cc504 Update OAuth2Storage.php - fix email retrieval in getUser 2018-12-15 22:19:18 +01:00
Mario
3ed6763da9 Merge branch 'custom-item-types' into 'dev'
Add ITEM_TYPE_CUSTOM and hooks for processing custom item types

See merge request hubzilla/core!1431
2018-12-15 20:55:28 +01:00
Mario
dbeabb8ff0 Merge branch 'patch-20181214f' into 'dev'
Set min/maxversion for plugins to STD_VERSION unless otherwise specified

See merge request hubzilla/core!1430
2018-12-15 20:32:01 +01:00
Mario
cc66e1d966 Merge branch 'patch-20181214d' into 'dev'
Make Affinity Slider (optionally) 'sticky' across page loads.

See merge request hubzilla/core!1429
2018-12-15 20:31:06 +01:00
Mario Vavti
d7c7ff1c12 fix wiki preview issue with hyperlinks
(cherry picked from commit 919ea9f750)
2018-12-15 18:20:21 +01:00
Mario Vavti
919ea9f750 fix wiki preview issue with hyperlinks 2018-12-15 18:19:29 +01:00
DM42.Net (Matt Dent)
09b2cdd618 Add ITEM_TYPE_CUSTOM and hooks for processing custom item types 2018-12-14 20:20:26 -05:00
Max Kostikov
1e526e68ab Merge branch 'patch-20181214b' into 'dev'
Recreate MR#1419 for dev branch

See merge request hubzilla/core!1428
2018-12-14 22:58:22 +01:00
Mario Vavti
d77c7d51e3 update changelog
(cherry picked from commit 4ff3c57976)
2018-12-14 21:47:20 +01:00
Mario Vavti
4ff3c57976 update changelog 2018-12-14 21:46:48 +01:00
Mario Vavti
d51d0160d3 fix issue with linkdropper
(cherry picked from commit f81a3ba45d)
2018-12-14 21:32:23 +01:00
zotlabs
c2ad9d4996 regression: the ability to order apps messed up since adding pinned apps to the ordering
(cherry picked from commit 6464099364)
2018-12-14 21:31:02 +01:00
DM42.Net (Matt Dent)
3416190e4b Set min/maxversion for plugins to STD_VERSION unless otherwise specified 2018-12-14 14:22:28 -05:00
DM42.Net (Matt Dent)
de7cb6d6ad Fix syntax error 2018-12-14 13:59:41 -05:00
DM42.Net (Matt Dent)
eb297104de Make Affinity Slider (optionally) 'sticky' across page loads. (default is current behavior: reset slider with each page load) 2018-12-14 12:55:49 -05:00
DM42.Net (Matt Dent)
03a214c8b9 Recreate MR#1419 for dev branch 2018-12-14 10:05:41 -05:00
DM42.Net (Matt Dent)
3f06a857c2 ARTICLES MODULE: Default to local_channel() user when no argv(1) is passed. 2018-12-14 09:55:27 -05:00
Mario
79f828125d version bump 2018-12-14 11:47:02 +01:00
Mario Vavti
ad4b18cbbe return on readImageBlob() exception
(cherry picked from commit 993db01400)
2018-12-14 11:31:11 +01:00
Mario Vavti
1bd49671b7 add photo_view_filter hook and fix minor issue with unset auto_save_draft variable which resultet in a javascript error
(cherry picked from commit 7894fed741)
2018-12-14 11:30:57 +01:00
zotlabs
9896057549 home notifications won't expand if there are more than 300 unseen network notifications ahead of them.
(cherry picked from commit 30efeb5bec)
2018-12-14 11:30:25 +01:00
phani00
44832bbacb change redbasic dark schema to make categories and highlights readable
additions to /view/theme/redbasic/schema/dark.css to change the appearance of category
badges and highlighted text ([hl]...[/hl]).

hl text changed from master: it's not 'strong' anymore. commented out the pseudo-class
selector that works in master but not in dev anymore.


(cherry picked from commit 18caf0273f)
2018-12-14 11:30:05 +01:00
zotlabs
f20a923dd7 total_identities restriction off by one
(cherry picked from commit e60fb17524)
2018-12-14 11:29:33 +01:00
zotlabs
30403da326 reset page title if article has no title.
(cherry picked from commit 8ab1f31058)
2018-12-14 11:29:06 +01:00
Mario Vavti
f81a3ba45d fix issue with linkdropper 2018-12-14 11:23:08 +01:00
Mario Vavti
c771d2809f Merge remote-tracking branch 'mike/master' into dev 2018-12-14 10:28:55 +01:00
zotlabs
fc78206049 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-12-13 16:13:13 -08:00
Manuel Jiménez Friaza
618d673947 Merge remote-tracking branch 'upstream/dev' into dev 2018-12-13 12:34:04 +01:00
zotlabs
6464099364 regression: the ability to order apps messed up since adding pinned apps to the ordering 2018-12-12 19:11:30 -08:00
Max Kostikov
6bea3d6bfc Merge branch 'fix_photo_imagick' into 'dev'
return on readImageBlob() exception

See merge request hubzilla/core!1426
2018-12-11 13:31:34 +01:00
Mario Vavti
993db01400 return on readImageBlob() exception 2018-12-11 12:21:09 +01:00
M. Dent
4cb4f17500 Merge branch 'photo-hook' into 'dev'
add photo_view_filter hook and fix minor issue with unset auto_save_draft…

See merge request hubzilla/core!1425
2018-12-10 21:49:12 +01:00
Mario Vavti
15a689c6f5 Merge remote-tracking branch 'mike/master' into dev 2018-12-10 10:38:06 +01:00
Mario Vavti
7894fed741 add photo_view_filter hook and fix minor issue with unset auto_save_draft variable which resultet in a javascript error 2018-12-10 10:37:29 +01:00
M. Dent
61f7c1e7d7 Merge branch 'dark-theme-dev' into 'dev'
change redbasic dark schema to make categories and highlights readable

See merge request hubzilla/core!1424
2018-12-10 05:36:58 +01:00
zotlabs
30efeb5bec home notifications won't expand if there are more than 300 unseen network notifications ahead of them. 2018-12-09 20:24:04 -08:00
phani00
18caf0273f change redbasic dark schema to make categories and highlights readable
additions to /view/theme/redbasic/schema/dark.css to change the appearance of category
badges and highlighted text ([hl]...[/hl]).

hl text changed from master: it's not 'strong' anymore. commented out the pseudo-class
selector that works in master but not in dev anymore.
2018-12-10 03:03:28 +00:00
zotlabs
214b81e491 rmagic discovery for z6 networks 2018-12-09 16:37:15 -08:00
zotlabs
e60fb17524 total_identities restriction off by one 2018-12-09 11:20:57 -08:00
Mario Vavti
7f65d82a74 Merge remote-tracking branch 'mike/master' into dev 2018-12-06 12:50:23 +01:00
zotlabs
8ab1f31058 reset page title if article has no title. 2018-12-05 16:24:30 -08:00
Manuel Jiménez Friaza
4cd5529027 Merge remote-tracking branch 'upstream/dev' into dev 2018-12-05 12:32:33 +01:00
Max Kostikov
d12744011a Merge branch 'dev' into 'dev'
Add strings to Russian translation

See merge request hubzilla/core!1418
2018-12-04 11:50:04 +01:00
Max Kostikov
c0e4c92d47 Update hstrings.php 2018-12-04 11:41:59 +01:00
Max Kostikov
cc3e910194 Update hmessages.po 2018-12-04 11:41:42 +01:00
Mario Vavti
5d9f993352 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-12-04 11:39:14 +01:00
Mario
eaa52c19a8 Merge branch 'photocache' into 'dev'
Less dependence on cache logic

See merge request hubzilla/core!1417
2018-12-04 11:38:58 +01:00
zotlabs
42aeb19562 partial solution for obj|tgt multiple (zot and zot6) encodings; the zot6 version will be stored under $item['obj']['asld'] 2018-12-03 20:09:57 -08:00
zotlabs
ffc3dba682 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-12-03 19:19:31 -08:00
zotlabs
1acc5ceb5f more merging 2018-12-03 19:18:20 -08:00
zotlabs
7d694dca07 more work on z6 commenting 2018-12-03 18:50:45 -08:00
zotlabs
7a693500c4 fix generated plink 2018-12-03 14:21:33 -08:00
Max Kostikov
1c44912aff Update Photo.php 2018-12-03 21:33:32 +01:00
Mario Vavti
5e14da67e1 quickfix for es-es language
(cherry picked from commit 6b68a76bbe)
2018-12-03 21:24:29 +01:00
Mario Vavti
6b68a76bbe quickfix for es-es language 2018-12-03 21:22:02 +01:00
Max Kostikov
b586fcebab Update Photo.php 2018-12-03 21:21:23 +01:00
Max Kostikov
244c0d828a Update Photo.php 2018-12-03 13:29:27 +01:00
Max Kostikov
57ebd7e170 New logic for less dependence on cache logic 2018-12-03 13:10:55 +01:00
Mario Vavti
8f10b58cb1 version 3.8.6 2018-12-03 12:23:55 +01:00
Mario Vavti
f8bc408abc update strings 2018-12-03 12:07:56 +01:00
Mario Vavti
f581f6163a optimize autoload cache 2018-12-03 11:52:38 +01:00
Mario Vavti
5776471547 changelog
(cherry picked from commit 88486a1278)
2018-12-03 11:48:30 +01:00
Mario Vavti
88486a1278 changelog 2018-12-03 11:47:28 +01:00
Mario Vavti
9fcadc2d7c prevent incompatible export files (osada/zap) from being imported (manual patch from dev) 2018-12-03 11:08:39 +01:00
Mario Vavti
c50e3a702a more notifications fixes
(cherry picked from commit 9ef6c57ca5)
2018-12-03 10:49:08 +01:00
Mario Vavti
2173ef5fb6 catch exception if readImageBlob() receives bogus data
(cherry picked from commit 443d7684db)
2018-12-03 10:48:39 +01:00
Mario Vavti
9ef6c57ca5 more notifications fixes 2018-12-03 10:46:49 +01:00
Mario Vavti
443d7684db catch exception if readImageBlob() receives bogus data 2018-12-03 10:45:43 +01:00
Max Kostikov
1f6da1c653 Merge branch 'photocache' into 'dev'
Add flag to allow to save image without validation

See merge request hubzilla/core!1416
2018-12-03 00:57:52 +01:00
Max Kostikov
c165894ce9 Add Expires field support 2018-12-03 00:51:09 +01:00
Max Kostikov
19903ea3c1 Add flag to allow to save image without validation 2018-12-02 21:59:08 +01:00
M. Dent
0b38ab259c Merge branch 'photocache' into 'dev'
Add Photo Cache addon support

See merge request hubzilla/core!1412
2018-12-02 19:33:54 +01:00
Mario Vavti
237c6eed50 fallback to url if we have not got an addr
(cherry picked from commit a3ba7f0788)
2018-12-02 11:39:04 +01:00
Mario Vavti
a3ba7f0788 fallback to url if we have not got an addr 2018-12-02 11:38:13 +01:00
Mario Vavti
f13b1e8604 fix filtering by addr in handleNotificationsItems()
(cherry picked from commit f083c0cba1)
2018-12-02 10:59:33 +01:00
Mario Vavti
f083c0cba1 fix filtering by addr in handleNotificationsItems() 2018-12-02 10:58:54 +01:00
Mario Vavti
defa2d9df1 make pdf preview 100% width and 300px height to match it openstreetmaps preview
(cherry picked from commit df84352385)
2018-12-02 10:18:37 +01:00
Mario Vavti
05c422ef23 redbasic sticky aside fixes
(cherry picked from commit 8d4f6a7865)
2018-12-02 10:18:20 +01:00
zotlabs
51d274961b typo
(cherry picked from commit 6f22e47feb)
2018-12-02 10:18:05 +01:00
zotlabs
4b4cc04897 allow notification filtering by name or addr
(cherry picked from commit c6acb6191c)
2018-12-02 10:17:45 +01:00
zotlabs
4bf3d4d87a attached photo permissions regression
(cherry picked from commit 6cade7d935)
2018-12-02 10:17:29 +01:00
Manuel Jiménez Friaza
71cc980e96 Revision 1 doc/es-es/about/about.bb
(cherry picked from commit 5ac08ec3aa)

(cherry picked from commit 37d563c30e)
2018-12-02 10:16:50 +01:00
Mario
58c0b81908 use flex for the default template
(cherry picked from commit 3775be4ce9)
2018-12-02 10:16:24 +01:00
M. Dent
3b42bd43ab Do not store serialized pconfig value received via to Module/Pconfig.php
(cherry picked from commit 6b02c664fb)
2018-12-02 10:15:55 +01:00
Mario
a151532ffa update jquery-file-upload and psr-log via composer
(cherry picked from commit c7ae3fdc9a)
2018-12-02 10:14:58 +01:00
Mario
a0d1ce77dc update imagesloaded to version 4.1.4 via composer
(cherry picked from commit c667572d3e)
2018-12-02 10:14:37 +01:00
Manuel Jiménez Friaza
863cae1bab Update es-es
(cherry picked from commit ca98a566ee)
2018-12-02 10:13:43 +01:00
zotlabs
4010ea814a fix mastodon tag notifications (again)
(cherry picked from commit 8e71324514)
2018-12-02 10:13:12 +01:00
zotlabs
8e25c091f4 no mention notifications from mastodon (and pleroma)
(cherry picked from commit ea235c0c67)
2018-12-02 10:12:44 +01:00
Max Kostikov
2a57e00cb4 Remove local_channel() check on cache_body_hook call 2018-12-02 10:07:12 +01:00
M. Dent
52424b0f9c Merge branch 'pdf_embed_fixes' into 'dev'
make pdf preview 100% width and 300px height to match it openstreetmaps preview

See merge request hubzilla/core!1414
2018-12-02 05:09:45 +01:00
M. Dent
132547a9d9 Merge branch 'sticky_aside_fixes' into 'dev'
redbasic sticky aside fixes

See merge request hubzilla/core!1415
2018-12-02 05:07:59 +01:00
Mario Vavti
fdb0459288 Merge remote-tracking branch 'mike/master' into dev 2018-12-01 21:43:54 +01:00
Mario Vavti
df84352385 make pdf preview 100% width and 300px height to match it openstreetmaps preview 2018-12-01 21:37:33 +01:00
Mario Vavti
8d4f6a7865 redbasic sticky aside fixes 2018-12-01 21:30:18 +01:00
zotlabs
6f22e47feb typo 2018-11-30 22:39:10 -08:00
zotlabs
c6acb6191c allow notification filtering by name or addr 2018-11-30 19:03:14 -08:00
zotlabs
6cade7d935 attached photo permissions regression 2018-11-30 13:54:17 -08:00
Max Kostikov
c857ecab46 Create plink depending on message id format 2018-11-30 19:56:49 +01:00
Max Kostikov
53d9cbc69c Check local_channel() before cache call 2018-11-30 11:38:47 +01:00
Max Kostikov
0ee403eab3 Move cache code to addon 2018-11-30 10:50:00 +01:00
Max Kostikov
6f2d09eb20 Fix wrong parameter 2018-11-29 23:28:45 +01:00
Max Kostikov
d6442ec991 Update text.php 2018-11-29 23:07:39 +01:00
Max Kostikov
f3831fa77f Better cache settings logic 2018-11-29 21:27:06 +01:00
Max Kostikov
3265c2e543 Skip sslify for images if it already were cached with https enabled 2018-11-29 20:36:21 +01:00
Max Kostikov
1a9ea64523 Update text.php 2018-11-29 19:28:54 +01:00
Max Kostikov
9de650e175 Cache for viewer channel 2018-11-29 19:13:43 +01:00
Max Kostikov
d8b5f383f5 Disable links to cached photos for non logged viewers 2018-11-29 16:21:50 +01:00
Max Kostikov
6aa99a903f Code cleanup 2018-11-29 11:56:56 +01:00
Max Kostikov
d9faf6c4bb Update text.php 2018-11-29 11:48:12 +01:00
Max Kostikov
48cd5855fe Add photo cache support using sslify() 2018-11-29 11:06:14 +01:00
Max Kostikov
bd0fc8a2d7 Add photo cache hooks 2018-11-29 10:38:25 +01:00
Max Kostikov
476bd7400d Add photo cache cleanup 2018-11-29 10:37:39 +01:00
Max Kostikov
bd10d48338 Update database with expires field for photo 2018-11-29 10:36:56 +01:00
Max Kostikov
bb91064416 Add expires for photo 2018-11-29 10:35:56 +01:00
Max Kostikov
72d2fe2fd4 Add expires for photo 2018-11-29 10:35:11 +01:00
Max Kostikov
92a5b9ac41 Add PHOTO_CACHE photo type 2018-11-29 10:34:18 +01:00
M. Dent
cded6b1136 Merge branch 'es-es' into 'dev'
Revision 1 doc/es-es/about/about.bb

See merge request hubzilla/core!1410
2018-11-28 05:32:10 +01:00
M. Dent
19f0ce7e37 Merge branch 'default2flex-conversion' into 'dev'
use flex for the default template

See merge request hubzilla/core!1409
2018-11-28 04:03:39 +01:00
M. Dent
a88a515fa0 Merge branch 'composer-updates' into 'dev'
update jquery-file-upload and psr-log via composer

See merge request hubzilla/core!1408
2018-11-28 03:55:13 +01:00
M. Dent
a4b2eac0f0 Merge branch 'update-imagesloaded' into 'dev'
update imagesloaded to version 4.1.4 via composer

See merge request hubzilla/core!1407
2018-11-28 03:52:53 +01:00
M. Dent
0bd38290e6 Merge branch 'pg-fixes' into 'dev'
fix db upgrade 1228 for postgres

See merge request hubzilla/core!1403
2018-11-28 03:49:22 +01:00
zotlabs
19e4f3c2f0 prevent incompatible export files (osada/zap) from being imported. This is to keep your DB from getting trashed. We probably need a similar thing for item import since the object formats aren't compatible 2018-11-27 11:53:02 -08:00
Manuel Jiménez Friaza
8bede7b81f Merge branch 'cherry-pick-5ac08ec3' into 'es-es'
Revision 1 doc/es-es/about/about.bb

See merge request mjfriaza/core!3
2018-11-26 12:59:03 +01:00
Manuel Jiménez Friaza
37d563c30e Revision 1 doc/es-es/about/about.bb
(cherry picked from commit 5ac08ec3aa)
2018-11-26 12:53:24 +01:00
Mario
3775be4ce9 use flex for the default template 2018-11-26 12:44:10 +01:00
Manuel Jiménez Friaza
5ac08ec3aa Revision 1 doc/es-es/about/about.bb 2018-11-26 12:43:24 +01:00
Mario
e5883dd605 Merge branch 'patch-20181120a' into 'dev'
Do not store serialized pconfig value received via  to Module/Pconfig.php

See merge request hubzilla/core!1402
2018-11-25 10:22:09 +01:00
M. Dent
6b02c664fb Do not store serialized pconfig value received via to Module/Pconfig.php 2018-11-25 10:22:09 +01:00
Mario
c7ae3fdc9a update jquery-file-upload and psr-log via composer 2018-11-25 10:18:26 +01:00
Mario
c667572d3e update imagesloaded to version 4.1.4 via composer 2018-11-25 10:09:26 +01:00
Mario
9bbd6ff67d Merge branch 'es-es' into 'dev'
Update es-es

See merge request hubzilla/core!1406
2018-11-24 21:16:59 +01:00
Manuel Jiménez Friaza
ca98a566ee Update es-es 2018-11-24 13:23:20 +01:00
Manuel Jiménez Friaza
f865d6e5da Resolved merge conflicts 2018-11-24 13:01:01 +01:00
Mario
bc9f2922e0 Merge remote-tracking branch 'mike/master' into dev 2018-11-23 22:04:51 +01:00
zotlabs
c5a9b00eae Organization actor type was missing 2018-11-23 12:25:05 -08:00
Mario
f408ff982c Merge remote-tracking branch 'mike/master' into dev 2018-11-23 15:42:40 +01:00
zotlabs
9a8d1200ec use uuid in file storage 2018-11-22 18:39:38 -08:00
Mario
16c7aa2813 fix db upgrade 1228 for postgres 2018-11-22 12:52:08 +01:00
Mario
85f52d2aed Merge remote-tracking branch 'mike/master' into dev 2018-11-22 10:17:18 +01:00
zotlabs
8e71324514 fix mastodon tag notifications (again) 2018-11-21 20:25:59 -08:00
zotlabs
ea235c0c67 no mention notifications from mastodon (and pleroma) 2018-11-21 20:03:58 -08:00
Mario Vavti
e30be643c9 fix call to undefined function
(cherry picked from commit 0bba9482df)
2018-11-21 13:27:21 +01:00
Mario Vavti
0bba9482df fix call to undefined function 2018-11-21 13:21:29 +01:00
Mario
07fd2dbc99 Merge branch 'dev' into 'dev'
Update Russian translation

See merge request hubzilla/core!1400
2018-11-20 11:08:27 +01:00
Mario Vavti
f8a8559523 fix typo which prevented propagation of comments
(cherry picked from commit 0c94747ab1)
2018-11-20 10:09:46 +01:00
zotlabs
6481c9dca1 use this form instead 2018-11-19 15:20:28 -08:00
zotlabs
7aaa1973f4 push recent changes 2018-11-19 15:04:08 -08:00
Max Kostikov
4dea1b5a0d Replace hmessages.po 2018-11-19 13:52:31 +01:00
Max Kostikov
da44ab0529 Replace hstrings.php 2018-11-19 13:51:54 +01:00
Mario
73b836c73d Revert "Fix return on wrong sotred in Content-Length size for full size photos"
This reverts commit 6010b5c619
2018-11-19 13:11:18 +01:00
Mario
af0c2f59cc Revert "Add filesize for streaming content"
This reverts commit 238a616292
2018-11-19 13:11:04 +01:00
Mario Vavti
1044e8e91a version 3.8.5 2018-11-19 11:12:32 +01:00
Mario Vavti
dffc0a4ed8 changelog
(cherry picked from commit 5cb4cdaa5e)
2018-11-19 11:11:47 +01:00
Mario Vavti
ba4b1cb5af Merge branch 'master' of https://framagit.org/hubzilla/core 2018-11-19 11:10:36 +01:00
Mario Vavti
5cb4cdaa5e changelog 2018-11-19 11:10:22 +01:00
Mario Vavti
0525eb2d29 update sql schemas to include update column in pconfig table
(cherry picked from commit ae97649948)
2018-11-19 10:45:33 +01:00
Mario
7be1d9e45a Merge branch 'patch-20181118a' into 'dev'
Patch 20181118a - fix delayed publication of posts

See merge request hubzilla/core!1398

(cherry picked from commit f34af496ec)

3787c490 Fix: delayed items propagate before publication on cloned channels
2018-11-19 10:45:01 +01:00
Mario
f34af496ec Merge branch 'patch-20181118a' into 'dev'
Patch 20181118a - fix delayed publication of posts

See merge request hubzilla/core!1398
2018-11-19 10:44:41 +01:00
Mario Vavti
ae97649948 update sql schemas to include update column in pconfig table 2018-11-19 10:42:18 +01:00
DM42.Net (Matt Dent)
3787c490d4 Fix: delayed items propagate before publication on cloned channels 2018-11-18 07:00:06 -05:00
Max Kostikov
c3f1aae570 Merge branch 'mod-zot-fix' into 'dev'
fix typo which prevented propagation of comments

See merge request hubzilla/core!1399
2018-11-18 11:21:07 +01:00
Mario Vavti
0c94747ab1 fix typo which prevented propagation of comments 2018-11-18 11:02:01 +01:00
Mario Vavti
783cca1e13 recalculate photo filesize when rotating an image
(cherry picked from commit f15e32d063)
2018-11-17 09:51:28 +01:00
Mario Vavti
f15e32d063 recalculate photo filesize when rotating an image 2018-11-17 09:41:26 +01:00
Max Kostikov
238a616292 Add filesize for streaming content 2018-11-16 23:33:45 +01:00
Max Kostikov
6010b5c619 Fix return on wrong sotred in Content-Length size for full size photos 2018-11-16 23:14:10 +01:00
Mario Vavti
4812c5486d strlen($this->imageString()) does not return the correct size when dealing with os_storage images. use filesize() instead.
(cherry picked from commit afc75af62f)
2018-11-16 22:19:01 +01:00
Mario Vavti
afc75af62f strlen($this->imageString()) does not return the correct size when dealing with os_storage images. use filesize() instead. 2018-11-16 22:14:11 +01:00
Mario
23b30fdd10 Merge branch 'dev_homeinstall_raspihub' into 'dev'
localhost, URLs, version updates

See merge request hubzilla/core!1396
2018-11-16 11:30:53 +01:00
Mario
2778a7220f Merge branch 'master' into 'master'
delivery issue

See merge request hubzilla/core!1397
2018-11-16 10:29:45 +01:00
Mario Vavti
c69556f2ff Merge remote-tracking branch 'mike/master' into dev 2018-11-16 10:11:46 +01:00
zotlabs
b0689614bf datetime_convert wrong args 2018-11-15 21:14:14 -08:00
zotlabs
e42a401987 more work on the mid/uuid conversion 2018-11-15 20:50:47 -08:00
zotlabs
5162459e4a delivery report issue 2018-11-15 18:07:58 -08:00
zotlabs
39d914c9df add item.uuid to relevant places 2018-11-15 16:34:09 -08:00
zotlabs
8d2f4d9dfd mid -> uuid conversions for basic reactions 2018-11-15 16:02:29 -08:00
zotlabs
a7d2f9b530 remove checkjs and nojs 2018-11-15 15:35:06 -08:00
zotlabs
26f593afaa delivery issue 2018-11-15 13:52:25 -08:00
Mario Vavti
ca4e7f9b4f fix update 1228 2018-11-15 10:11:04 +01:00
zotlabs
b11858bcac separate by network 2018-11-14 20:34:00 -08:00
zotlabs
034f23b47e update httpsig unit test which is failing 2018-11-14 19:09:18 -08:00
zotlabs
9c25f300cf fixes to old z6 delivery 2018-11-14 18:56:38 -08:00
zotlabs
db4ff56f0b more logging 2018-11-14 18:41:36 -08:00
zotlabs
830c2472cb more logging 2018-11-14 18:39:23 -08:00
zotlabs
079e2af0c0 check keyid 2018-11-14 18:33:00 -08:00
zotlabs
5f166158c3 filter by network 2018-11-14 18:25:02 -08:00
zotlabs
4a06378d67 crypto fix 2018-11-14 18:19:35 -08:00
zotlabs
d0f0a74df8 encrypted header issue 2018-11-14 18:14:47 -08:00
zotlabs
65a8965e85 extra logging 2018-11-14 18:07:39 -08:00
zotlabs
ab2376f8d8 fix dreport link 2018-11-14 17:42:02 -08:00
zotlabs
48717dff00 change db update counter 2018-11-14 16:56:07 -08:00
zotlabs
b64dd7ab57 Merge branch 'master' into zvi 2018-11-14 16:42:03 -08:00
zotlabs
bf013ecf00 db updates for zot6 2018-11-14 16:40:30 -08:00
OJ Random
22b744fa23 Merge remote-tracking branch 'official/dev' into dev_homeinstall_raspihub 2018-11-14 17:32:24 +01:00
OJ Random
71cc2d7d5d localhost, URLs, version updates 2018-11-14 16:27:27 +01:00
Mario Vavti
62b367fa81 version 3.9.5 2018-11-14 11:22:41 +01:00
Mario Vavti
beac45b075 more changelog 2018-11-14 11:20:39 +01:00
Mario Vavti
dfc5159aa3 Merge branch 'dev' 2018-11-14 11:12:20 +01:00
Mario Vavti
886cdb440b changelog and version 2018-11-14 11:08:25 +01:00
Mario
6ed9443972 Merge branch 'patch-20181113b' into 'dev'
Patch 20181113b

See merge request hubzilla/core!1395
2018-11-14 09:30:54 +01:00
Mario
08e0f172de Merge branch 'dev' into 'dev'
Remove unneccessary fetch_image_from_url() function

See merge request hubzilla/core!1393
2018-11-14 09:30:28 +01:00
zotlabs
cfc43f6dea Merge branch 'master' into zvi 2018-11-13 20:37:52 -08:00
DM42.Net (Matt Dent)
f1d168f781 Fix double escaping after xss fix 2018-11-13 23:06:00 -05:00
DM42.Net (Matt Dent)
302d9796c4 Revert "Filter search box before display"
This reverts commit 35e66770be.
2018-11-13 22:59:36 -05:00
zotlabs
ee85784be1 stay ahead of the game 2018-11-13 19:55:43 -08:00
M. Dent
1260887fa7 Merge branch 'patch-20181113a' into 'dev'
Patch 20181113a

See merge request hubzilla/core!1394
2018-11-14 03:21:32 +01:00
DM42.Net (Matt Dent)
ce8073d25e Merge remote-tracking branch red/master into patch-20181113a. Add Mike's fix to search xss and Superblock fix. 2018-11-13 20:19:12 -05:00
zotlabs
31f4d9066b xss in search 2018-11-13 14:23:56 -08:00
DM42.Net (Matt Dent)
35e66770be Filter search box before display 2018-11-13 17:20:21 -05:00
Max Kostikov
cf2f7f2132 Update Photo.php 2018-11-13 12:52:35 +01:00
Max Kostikov
a145559662 Remove uneccessary include/photos.php 2018-11-13 11:45:18 +01:00
Max Kostikov
d029e3dc16 Text formatting in Photo.php 2018-11-13 11:39:42 +01:00
Max Kostikov
286326a98e Replace fetch_image_from_url() with z_fetch_url() 2018-11-13 11:38:49 +01:00
Max Kostikov
2f59d78737 Remove fetch_image_from_url() because of functions duplicate 2018-11-13 11:37:32 +01:00
Max Kostikov
adf4782076 Merge branch 'revert-6375f2d7' into 'dev'
Revert "Replace fetch_image_from_url() with z_fetch_url()"

See merge request hubzilla/core!1392
2018-11-13 11:36:02 +01:00
Max Kostikov
b38ffef2be Revert "Replace fetch_image_from_url() with z_fetch_url()"
This reverts commit 6375f2d73a
2018-11-13 11:25:46 +01:00
Max Kostikov
6375f2d73a Replace fetch_image_from_url() with z_fetch_url() 2018-11-13 11:25:14 +01:00
zotlabs
1a2df9c51c item uuid changes 2018-11-12 18:25:55 -08:00
zotlabs
770fdb2b7d dreport updates 2018-11-12 16:08:22 -08:00
M. Dent
a7d3a49171 Merge branch 'fix-activity-filter-widget' into 'dev'
use the correct javascript function for this case

See merge request hubzilla/core!1390
2018-11-12 21:50:08 +01:00
M. Dent
920e7db709 Merge branch 'css-fixes' into 'dev'
css fixes

See merge request hubzilla/core!1391
2018-11-12 21:49:07 +01:00
zotlabs
4a6b45cf04 enotify::format hook for superblock 2018-11-12 11:13:36 -08:00
Mario Vavti
7bd60adfbe fix css issues in bbcode conversion and focus-light schema 2018-11-12 09:35:12 +01:00
zotlabs
171ff54ea4 translate zot message packets to zot6 for delivery 2018-11-11 21:55:10 -08:00
zotlabs
da452decf6 more z6 debugging 2018-11-11 15:12:01 -08:00
Mario Vavti
c335719e8f use the correct javascript function for this case 2018-11-11 14:46:35 +01:00
Mario Vavti
d57cdf645e Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-11-11 14:01:25 +01:00
Mario
e47a96bf24 Merge branch 'dev' into 'dev'
Preserve photo modification date on edit

See merge request hubzilla/core!1389
2018-11-11 13:49:29 +01:00
Mario
daad607c7c Merge branch 'dev' into 'dev'
fix shared_header img expanding to 100% width when sharing a share

See merge request hubzilla/core!1387
2018-11-11 13:47:03 +01:00
Max Kostikov
29f1f9c872 Merge branch 'dev' into 'dev'
# Conflicts:
#   include/photo/photo_driver.php
2018-11-10 20:47:35 +01:00
Max Kostikov
a49cfa8142 Update photo_driver.php 2018-11-10 20:45:20 +01:00
Max Kostikov
b57d296adc Preserve photo modification date 2018-11-10 20:35:14 +01:00
Mario
01d8bd445e Merge branch 'dev' into 'dev'
Remove DNS check for database connection during installation...

See merge request hubzilla/core!1384
2018-11-10 15:02:27 +01:00
Mario Vavti
750d6f4be9 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-11-10 12:22:09 +01:00
Max Kostikov
c6e14a696e Fixed wrong value assign on compare with 0 2018-11-10 11:56:34 +01:00
Max Kostikov
d34423fce9 Fixed wrong value assign on compare with 0 2018-11-10 11:53:49 +01:00
Mario
4999547f87 Merge branch 'dev' into 'dev'
Preserve received image modification date on caching

See merge request hubzilla/core!1386
2018-11-10 11:47:20 +01:00
Mario Vavti
fc5dc9717a fix shared_header img expanding to 100% width when sharing a share 2018-11-10 11:31:06 +01:00
Max Kostikov
d20759c141 Do not return default images from vCard 2018-11-10 11:11:23 +01:00
Max Kostikov
f7b00c62a4 Remove unnecessary Zulu timezone mention 2018-11-10 10:05:28 +01:00
Max Kostikov
32873ce70d Preserve received image modification date on caching 2018-11-09 22:20:41 +01:00
Max Kostikov
dc59561a95 Fixed timezone conversion 2018-11-09 22:17:11 +01:00
Mario
4bf3fdd898 Merge branch 'patch-1' into 'dev'
Return image modification date on remote fetch for caching

See merge request hubzilla/core!1383
2018-11-09 16:51:36 +01:00
Andrew Manning
108a892a11 Remove DNS check for database connection during installation. Causes friction with Docker deployment. 2018-11-09 05:31:55 -05:00
Max Kostikov
2c4bd9a3fe Workaround for local resource path to photo from Diaspora 2018-11-09 10:03:58 +01:00
zotlabs
c80ac58eff add zot6 delivery method 2018-11-08 20:42:09 -08:00
zotlabs
d56e1f6285 begin native summary support 2018-11-08 19:49:57 -08:00
zotlabs
22b3ddab66 refresh packets 2018-11-08 19:24:02 -08:00
zotlabs
3fe2491b73 didn't need xchan_portable_id 2018-11-08 15:53:48 -08:00
zotlabs
4e6758e31d item db updates 2018-11-08 15:51:52 -08:00
Max Kostikov
098ec1abb4 remove image type double guess by checking HTTP headers 2018-11-08 22:43:17 +01:00
Max Kostikov
17cf824545 Return image modification date using HTTP 'Last-Modified' and '304 Not Modified' on remote fetch for caching 2018-11-08 18:00:18 +01:00
M. Dent
e35f5d3c93 Merge branch 'fix-photo' into 'dev'
Fix photo

See merge request hubzilla/core!1382
2018-11-08 13:09:05 +01:00
Mario
f4f98e5856 Merge branch 'patch-1' into 'fix-photo'
Correct "Content-Length:" calculation added

See merge request mario/core!1
2018-11-08 12:13:00 +01:00
Max Kostikov
dc0335d1d5 Correct "Content-Length:" calculation added 2018-11-08 11:53:27 +01:00
M. Dent
6013814cf4 Merge branch 'fix-photo' into 'dev'
$data only contains the link to the image if the image is in os storage. The…

See merge request hubzilla/core!1379
2018-11-08 11:25:36 +01:00
Mario Vavti
e0a0570cc4 $data only contains the link to the image if the image is in os storage. The size is calculatet wrong in this case and the download fails. rely on filesize from the db for content-length 2018-11-08 11:06:44 +01:00
Mario
61deb4fcfd Merge branch 'patch-1' into 'dev'
Disable image caching if personal or group permissions enabled

See merge request hubzilla/core!1377
2018-11-08 10:25:11 +01:00
Mario Vavti
7c4c60425b Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-11-08 10:16:17 +01:00
Mario Vavti
302f49baf2 provide a function to log to syslog 2018-11-08 10:12:33 +01:00
Max Kostikov
3f6cd5a663 Disable image caching if personal or group permissions enabled 2018-11-07 19:52:38 +01:00
M. Dent
1b232041c9 Merge branch 'patch-1' into 'dev'
Added `If-Modified-Since` header support for better image caching and fixed absent 404 for photos

See merge request hubzilla/core!1375
2018-11-07 18:22:55 +01:00
Max Kostikov
eaf117cce1 Added If-Modified-Since header support for better image caching and fixed absent 404 for photos 2018-11-07 18:22:55 +01:00
zotlabs
d2aa2c080f Merge branch 'master' into zvi 2018-11-07 01:43:43 -08:00
zotlabs
7148311953 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-11-07 01:43:26 -08:00
Mario Vavti
c23dfa0d23 Merge remote-tracking branch 'mike/master' into dev 2018-11-07 10:15:40 +01:00
Mario Vavti
b08de33b0b fix es-es hstrings.php 2018-11-07 10:02:24 +01:00
Mario
fc1d8c0138 Merge branch 'revert-40d9277e' into 'dev'
Revert "remove 'Expiries' HTTP header"

See merge request hubzilla/core!1372
2018-11-07 09:36:30 +01:00
Max Kostikov
a5a77d1e7c Revert "remove 'Expiries' HTTP header"
This reverts commit 40d9277ef3
2018-11-07 08:41:32 +01:00
zotlabs
f57fcefe6b signature issue 2018-11-06 21:45:43 -08:00
zotlabs
a5483a03c9 fix signatures 2018-11-06 21:44:57 -08:00
zotlabs
bb8b3b9291 this is brutal 2018-11-06 20:44:40 -08:00
M. Dent
6c6dca05e7 Merge branch 'patch-25' into 'dev'
'Last-Modified' and 'Content-Length' HTTP headers added for better image caching

See merge request hubzilla/core!1369
2018-11-06 19:25:38 +01:00
M. Dent
97b4a31b16 Merge branch 'patch-26' into 'dev'
New plural functions for JavaScript compatibility

See merge request hubzilla/core!1370
2018-11-06 18:26:58 +01:00
Max Kostikov
40d9277ef3 remove 'Expiries' HTTP header 2018-11-06 16:22:34 +01:00
Max Kostikov
009044b71e Update hmessages.po 2018-11-06 14:58:06 +01:00
Max Kostikov
4760a3f3e8 Update hmessages.po 2018-11-06 14:57:12 +01:00
Max Kostikov
3302012c02 New pt-br plural function for JavaScript compatibility 2018-11-06 14:55:58 +01:00
Max Kostikov
812c5a314f New nl plural function for JavaScript compatibility 2018-11-06 14:55:21 +01:00
Max Kostikov
c2da8c3fd4 New nb-no plural function for JavaScript compatibility 2018-11-06 14:54:49 +01:00
Max Kostikov
aa78640491 New it plural function for JavaScript compatibility 2018-11-06 14:54:06 +01:00
Max Kostikov
7c49688e1b New he plural function for JavaScript compatibility 2018-11-06 14:53:29 +01:00
Max Kostikov
dbe10c7965 New fi plural function for JavaScript compatibility 2018-11-06 14:52:58 +01:00
Max Kostikov
f1f5107282 New es plural function for JavaScript compatibility 2018-11-06 14:52:23 +01:00
Max Kostikov
cc06250bf8 New fr plural function for JavaScript compatibility 2018-11-06 14:50:37 +01:00
Max Kostikov
af1ea7f495 New plural function for JavaScript compatibility 2018-11-06 14:48:58 +01:00
Max Kostikov
3491c488d3 Update Photo.php 2018-11-06 13:51:01 +01:00
Max Kostikov
1828b6daab Update Photo.php 2018-11-06 13:41:41 +01:00
Max Kostikov
c26f45b7c2 Update Photo.php 2018-11-06 13:39:36 +01:00
Max Kostikov
e116b90116 'Last-Modified' and 'Content-Length' HTTP headers added for better image caching 2018-11-06 13:37:50 +01:00
zotlabs
e7f1d350c9 more zot6 work 2018-11-05 21:29:26 -08:00
zotlabs
3b9aedec5f populate new fields 2018-11-05 19:52:30 -08:00
zotlabs
fabcf841c9 z6 work 2018-11-05 19:34:10 -08:00
zotlabs
43a5f928ba these changes needed to ensure cloning/syncing works in the future to non-zot6 enabled servers after the (coming) zot6 schema updates. This should probably be on a fast track to master branch 2018-11-05 16:57:32 -08:00
M. Dent
873fa16517 Merge branch 'patch-23' into 'dev'
Use modern get_config() syntax

See merge request hubzilla/core!1368
2018-11-06 01:27:06 +01:00
Max Kostikov
f7ce374a28 Update Photo.php 2018-11-05 21:26:10 +01:00
Max Kostikov
2dd124d09e Use modern get_config() syntax 2018-11-05 21:25:08 +01:00
Mario
d6523c67a6 Merge branch 'patch-20181028a' into 'dev'
Add timestamp to pconfig

See merge request hubzilla/core!1355
2018-11-05 10:40:29 +01:00
Mario Vavti
a9fd3608ea version 3.8.3 2018-11-05 10:26:59 +01:00
Mario Vavti
b25cace3ea update changelog 2018-11-05 10:25:57 +01:00
Mario Vavti
4320f047db update changelog and bump version 2018-11-05 10:22:56 +01:00
Mario Vavti
b4b3e7b9a4 update linkinfo from dev 2018-11-05 09:59:25 +01:00
Mario Vavti
b6938da552 Merge remote-tracking branch 'mike/master' into dev 2018-11-05 09:56:52 +01:00
Mario Vavti
4830a1559d Merge branch 'dev' 2018-11-05 09:55:23 +01:00
Mario
92ea3ef720 Merge branch 'dev' into 'dev'
more fixes for forum notifications handling: do not count likes/dislikes if…

See merge request hubzilla/core!1367
2018-11-05 09:42:07 +01:00
zotlabs
73d2719330 debug zot6 discovery 2018-11-04 19:35:55 -08:00
zotlabs
af82aab3a6 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-11-04 13:58:02 -08:00
zotlabs
51b4b6216f z6 updates to owa, linkinfo improved image detection 2018-11-04 13:56:32 -08:00
Mario Vavti
de32b0bba5 more fixes for forum notifications handling: do not count likes/dislikes if likes notifications are disabled and also do not show like activities when clicking a forum notification and like notifications are disabled 2018-11-03 20:53:23 +01:00
Mario
de0fab78ed Merge branch 'dev' into 'dev'
Fixed typo at view/es-es/hstrings.php

See merge request hubzilla/core!1366
2018-11-03 20:11:14 +01:00
Manuel Jiménez Friaza
71425c3b23 Fixed typo at view/es-es/hstrings.php 2018-11-03 19:19:01 +01:00
Mario
75f7b1e261 Merge branch 'patch-3' into 'dev'
Update hmessages.po

See merge request hubzilla/core!1365
2018-11-03 13:22:34 +01:00
Mario
9af35d998f Merge branch 'patch-2' into 'dev'
Update hstrings.php

See merge request hubzilla/core!1364
2018-11-03 13:21:53 +01:00
Mario
34e3f3907a Merge branch 'patch-22' into 'dev'
More precise content encoding detection on conversion

See merge request hubzilla/core!1363
2018-11-03 13:21:22 +01:00
Max Kostikov
46b0510b99 Update Linkinfo.php 2018-11-03 10:41:31 +01:00
Max Kostikov
a7624ea48b Update Linkinfo.php 2018-11-03 00:10:05 +01:00
Max Kostikov
2f3b4a7aaf Update Linkinfo.php 2018-11-03 00:01:15 +01:00
Max Kostikov
a9bbe0b128 Update Linkinfo.php 2018-11-02 22:40:48 +01:00
Max Kostikov
0d9d0a4b70 more precise codepage detection 2018-11-02 22:37:53 +01:00
gia vec
8235d0bd50 Update hmessages.po 2018-11-02 19:41:07 +01:00
gia vec
c2e01bedc5 Update hstrings.php 2018-11-02 19:27:11 +01:00
Max Kostikov
32c4614a32 Workaround for incorrect ISO-8859-5 encoded content conversion 2018-11-02 10:52:52 +01:00
Mario
24ae6c91ea Merge branch 'patch-21' into 'dev'
Fix wrong image resize for some external images

See merge request hubzilla/core!1362
2018-11-02 10:20:18 +01:00
M.Dent
346a4f5933 strpos needs to test with ===0 not ==0 2018-11-01 20:23:22 -04:00
Max Kostikov
c6551336c8 Fix wrong image resize for some external images 2018-11-01 21:50:36 +01:00
Mario Vavti
3dab0d365d css fix for reshared-content images and whitespace 2018-10-31 13:20:09 +01:00
Mario Vavti
0252bac4ba Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-10-31 09:39:10 +01:00
Mario
b468069875 Merge branch 'patch-20' into 'dev'
Beautiful embedding for Hubzilla links

See merge request hubzilla/core!1360
2018-10-31 09:36:09 +01:00
Mike Macgirvin
7e1f431eca yet another blueimp vulnerability. Move to composer. 2018-10-31 15:56:08 +11:00
zotlabs
70c55da1df Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-10-30 18:11:49 -07:00
M. Dent
f9ab7647dd Merge branch 'composer-updates' into 'dev'
update html_to_markdown, smarty and sabredav libs via composer

See merge request hubzilla/core!1361
2018-10-31 01:32:44 +01:00
zotlabs
623aa7ea48 remove primary/clone counts from admin summary. The last checkins should fix this count "eventually" but the information has little direct value and may require location information for a local channel to change before it is actually corrected. 2018-10-30 17:30:59 -07:00
M. Dent
046d264688 Merge branch 'forum-ping' into 'dev'
fix forum ping results - the term query requires xchan_name instead of…

See merge request hubzilla/core!1358
2018-10-31 01:25:41 +01:00
M. Dent
944e168120 Merge branch 'wikilist-widget' into 'dev'
allow wiki_list widget to be used in any page

See merge request hubzilla/core!1359
2018-10-31 01:24:32 +01:00
zotlabs
9594105e57 typo 2018-10-30 17:21:39 -07:00
zotlabs
675343f575 issue syncing the channel_primary setting which shows up as a wrong count on the admin summary page 2018-10-30 17:18:15 -07:00
Mario Vavti
fc6ff45c49 fix another markdown test 2018-10-30 22:51:52 +01:00
Mario Vavti
b4bac88c39 fix markdown tests 2018-10-30 22:37:41 +01:00
Mario Vavti
c622ba84b9 really fix html2markdown() - when using environment, we must set the defaults 2018-10-30 22:16:37 +01:00
Max Kostikov
339f95c647 Update oembed.php 2018-10-30 16:49:48 +01:00
Max Kostikov
ec67e0ab22 Beautiful embedding for Hubzilla links 2018-10-30 15:38:19 +01:00
Mario Vavti
0b371c8103 fix html2markdown() and re-enable previously failing tests 2018-10-30 13:55:08 +01:00
Mario Vavti
2192ea6fdf update html_to_markdown, smarty and sabredav libs via composer 2018-10-30 12:12:07 +01:00
M.Dent
0060f88c45 Add tracking of deleted pconfig variables 2018-10-29 23:04:13 -04:00
Mario Vavti
1eac4db491 fix forum ping results - the term query requires xchan_name instead of xchan_hash. also improve the query itself - item_permission_sql() is redundant here since we always deal with local_channel() and use count(id) instead of sum(item_unseen) to get the unseen count 2018-10-29 23:01:13 +01:00
Mario Vavti
0d2c3be367 allow wiki_list widget to be used in any page 2018-10-29 22:55:24 +01:00
Mario Vavti
c8dd516d6c Merge branch 'dev' 2018-10-29 11:02:51 +01:00
Mario Vavti
0f19627407 changelog 2018-10-29 10:59:54 +01:00
Mario Vavti
3eb71fe7b5 merge Zotlabs/Access/PermissionLimits.php from dev 2018-10-29 10:21:10 +01:00
Mario Vavti
0035584d91 merge view/fr/hmessages.po from dev 2018-10-29 10:20:36 +01:00
Mario Vavti
8cbd2e3e9e merge view/ru/hstrings.php from dev 2018-10-29 10:19:55 +01:00
Mario Vavti
b0f5c7f36f merge view/ru/hmessages.po from dev 2018-10-29 10:19:31 +01:00
Mario Vavti
412eb0a90b merge view/it/hstrings.php from dev 2018-10-29 10:18:21 +01:00
Mario Vavti
f8e816629d merge view/it/hmessages.po from dev 2018-10-29 10:17:54 +01:00
Mario Vavti
3d0138569d merge view/es-es/hstrings.php from dev 2018-10-29 10:17:04 +01:00
Mario Vavti
7bb7d736a2 merge view/es-es/hmessages.po from dev 2018-10-29 10:16:29 +01:00
Mario Vavti
7910f39613 merge util/zotsh/zotsh.py from dev 2018-10-29 10:16:01 +01:00
Mario Vavti
bf6ef2a588 merge util/update_theme_repo from dev 2018-10-29 10:15:18 +01:00
Mario Vavti
a11d89daa3 merge util/update_autoloader from dev 2018-10-29 10:14:43 +01:00
Mario Vavti
b8a4a6b959 merge util/hmessages.po from dev 2018-10-29 10:10:03 +01:00
Mario Vavti
dd6045d9f8 merge install/schema_postgres.sql from dev 2018-10-29 10:08:37 +01:00
Mario Vavti
e1c3a19420 merge include/zot.php from dev 2018-10-29 10:08:12 +01:00
Mario Vavti
cc586685e6 merge include/nav.php from dev 2018-10-29 10:07:54 +01:00
Mario Vavti
31883f603c merge include/import.php from dev 2018-10-29 10:07:15 +01:00
Mario Vavti
f377c81c8a merge include/connections.php from dev 2018-10-29 10:06:44 +01:00
Mario Vavti
32384eaf07 merge Zotlabs/Widget/Wiki_pages.php from dev 2018-10-29 10:06:01 +01:00
Mario Vavti
7c2efa697c merge Zotlabs/Module/Photo.php from dev 2018-10-29 10:04:34 +01:00
Mario Vavti
e1df69dfcb Merge branch 'dev' 2018-10-29 07:43:40 +01:00
M.Dent
1241e778f9 Fix to set update time in pconfig on update 2018-10-28 17:30:22 -04:00
M.Dent
3ab0ef1902 Add timestamp and associated logic to pconfig 2018-10-28 17:23:31 -04:00
M.Dent
c7c35b8b5a DB Updates to prep for pconfig timestamps. 2018-10-28 17:20:29 -04:00
M. Dent
3d9b1fd343 Merge branch 'dev' into 'dev'
fix issues with forum handling in mod network and ping. also some code cleanup.

See merge request hubzilla/core!1354
2018-10-28 03:22:22 +01:00
Mario Vavti
96bed3a623 fix issues with forum handling in mod network and ping. also some code cleanup. 2018-10-27 22:34:18 +02:00
Mario Vavti
e72b0edce2 Merge remote-tracking branch 'mike/master' into dev 2018-10-27 13:50:30 +02:00
zotlabs
ae4aeb4b1e delivery chain linkage messed up if original post was edited 2018-10-26 13:00:26 -07:00
M. Dent
302abc2a60 Merge branch 'dev' into 'dev'
notifications: fix unseen forum count

See merge request hubzilla/core!1351
2018-10-26 17:10:10 +02:00
Mario Vavti
2b3cbc638b notifications: fix unseen forum count 2018-10-26 09:53:56 +02:00
Mario
3de055bf65 Merge branch 'dev' into 'dev'
New strings in Spanish translation

See merge request hubzilla/core!1349

(cherry picked from commit df449e7bfe)

802a7ff3 New strings in Spanish translation
2018-10-26 08:16:54 +02:00
Mario
df449e7bfe Merge branch 'dev' into 'dev'
New strings in Spanish translation

See merge request hubzilla/core!1349
2018-10-26 08:16:16 +02:00
Mario
6326a50d20 Merge branch 'patch-20181025a' into 'dev'
Add entropy to queue worker - and fix requeuing of expired tasks

See merge request hubzilla/core!1350
2018-10-26 08:15:11 +02:00
M.Dent
aef212ada9 Add entropy to queue worker - and fix requeuing of expired tasks 2018-10-25 10:12:03 -04:00
Manuel Jiménez Friaza
802a7ff3a8 New strings in Spanish translation 2018-10-25 11:37:06 +02:00
M. Dent
9cedc864c2 Merge branch 'dev' into 'dev'
Editor contact autocomplete performance & refine stream filter and forum notification behaviour (mostly for performance)

See merge request hubzilla/core!1348
2018-10-25 03:38:05 +02:00
Mario Vavti
ee804cd6b1 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-10-24 23:08:22 +02:00
Mario Vavti
25c7e64ded fix get on {1} 2018-10-24 23:06:32 +02:00
Mario Vavti
5c4fbbebe1 refine stream filter and forum notification behaviour (mostly for performance). personal posts will be displayed in unthreaded mode and clicking a forum notification will show only the unseen items of the forum in unthreaded mode. group the filters in the widget - threaded at the top, unthreaded beneath. 2018-10-24 20:58:25 +02:00
Mario Vavti
615402ea83 wrong var 2018-10-24 20:34:15 +02:00
Mario
a0a72a9f6d Merge branch 'patch-19' into 'dev'
Convert non UTF-8 content on link embeding

See merge request hubzilla/core!1347
2018-10-24 20:26:32 +02:00
Mario Vavti
8b9acf750b autocomplete performance: this slightly changes the editor contact autocomplete behaviour. queries using *like* with a prepended % to the query string do not make use of indices. this is no big issue when we query abook but can get really slow when xchan table is involved. this commit changes the xchan table only queries to use the *str%* format. this means that the result set for channels we are not connected with will change in a way that xchan_name and xchan_addr will bematched only from the beginning of the name or address. this commit also changes textcomplete to only start the query after the 3rd character. the result set between 2 and 3 characters is mostly very different and only from 3 chars on there is a high possibility the channel we look for is already in the result. 2018-10-24 20:22:27 +02:00
Max Kostikov
24d68a7f09 Update Linkinfo.php 2018-10-24 10:28:18 +02:00
Max Kostikov
781eeff021 Update Linkinfo.php 2018-10-23 20:36:30 +02:00
Max Kostikov
3e6c2c6024 Update Linkinfo.php 2018-10-23 19:57:21 +02:00
Max Kostikov
f180558041 Convert non UTF-8 content on link embeding 2018-10-23 19:32:36 +02:00
zotlabs
506ea71302 for whatever reason there were two of these
(cherry picked from commit 7ed197f46b)
2018-10-23 13:23:18 +02:00
Mario Vavti
01e11e9043 Merge remote-tracking branch 'mike/master' into dev 2018-10-23 13:18:04 +02:00
zotlabs
7ed197f46b for whatever reason there were two of these 2018-10-22 17:12:36 -07:00
Mario Vavti
5c36eef039 textcomplete: return up to 100 items and look for for matches in the entire string (not just the beginning) when suggesting emojis 2018-10-22 15:36:02 +02:00
Mario Vavti
26e20f9999 add summary to bbcode autocomplete list 2018-10-22 14:04:09 +02:00
Mario Vavti
71195895ba update blueimp_upload to version 9.23 2018-10-22 09:45:20 +02:00
Mario
c7ebb4b009 version 3.8.1 2018-10-21 09:25:37 +02:00
Mario Vavti
c0cef8dd12 changelog for 3.8.1
(cherry picked from commit ea850e58d2)
2018-10-21 09:23:37 +02:00
Mario Vavti
ea850e58d2 changelog for 3.8.1 2018-10-21 09:22:42 +02:00
Mario Vavti
dcdd97a985 fix ellipsis for too long nav banner
(cherry picked from commit a61ce45a32)
2018-10-21 09:10:45 +02:00
Mario Vavti
a61ce45a32 fix ellipsis for too long nav banner 2018-10-21 09:10:02 +02:00
mike
1326c4e71e fix wrong value being used for menu_id
(cherry picked from commit fdb7c115a7)
2018-10-21 09:02:17 +02:00
Mario
ad5f3877f1 Merge branch 'edit-menu-contents-fix' into 'dev'
fix wrong value being used for menu_id

See merge request hubzilla/core!1345
2018-10-21 09:00:48 +02:00
zotlabs
9cbbc80f7a disable blueimp demo server
(cherry picked from commit 7c49f22702)
2018-10-21 08:49:43 +02:00
Mario Vavti
8a02e967d3 Merge remote-tracking branch 'mike/master' into dev 2018-10-21 08:42:37 +02:00
zotlabs
7c49f22702 disable blueimp demo server 2018-10-20 15:27:35 -07:00
mike
fdb7c115a7 fix wrong value being used for menu_id 2018-10-20 16:55:54 -04:00
Mario Vavti
d96a731e93 bump version 2018-10-19 11:14:20 +02:00
Mario Vavti
2583270774 optimize autoload 2018-10-19 11:12:07 +02:00
Mario Vavti
5393d674f9 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-10-19 11:07:40 +02:00
Mario Vavti
4aed866d69 strings and bump apd versions to version 2 2018-10-19 11:07:06 +02:00
Mario
c044ff3444 Merge branch 'patch-18' into 'dev'
Russian translation for upgrade plugin added

See merge request hubzilla/core!1344
2018-10-19 10:56:46 +02:00
Max Kostikov
6e75842354 Update hstrings.php 2018-10-18 11:19:02 +02:00
Max Kostikov
ac2b6bcc33 Russian translation for upgrade plugin added 2018-10-18 11:18:14 +02:00
Mario
e9471124c0 Merge branch 'dev' into 'dev'
Fix template root redirection

See merge request hubzilla/core!1343
2018-10-18 09:12:30 +02:00
M.Dent
442d1cb48f Fix template root redirection 2018-10-17 22:21:31 -04:00
Mario Vavti
fa91e2a60c complete changelog 2018-10-17 12:25:46 +02:00
Mario
e38e85572e Merge branch 'fix-master-rate-limiter' into 'dev'
Fix master rate limiter

See merge request hubzilla/core!1341
2018-10-16 21:19:16 +02:00
M. Dent
f50d6208c8 Fix master rate limiter 2018-10-16 21:19:16 +02:00
M. Dent
34d189c02e Merge branch 'dev' into 'dev'
improve posting to mod pconfig via ajax

See merge request hubzilla/core!1340
2018-10-16 21:08:19 +02:00
Mario
ed08eb07c6 Merge branch 'patch-17' into 'dev'
Add Russian translations to Newmember widget

See merge request hubzilla/core!1339
2018-10-16 14:07:52 +02:00
Mario Vavti
ae875734e2 improve posting to mod pconfig via ajax 2018-10-16 13:46:03 +02:00
Max Kostikov
d2d6f8c970 Update hstrings.php 2018-10-15 21:28:54 +02:00
Max Kostikov
04edb741a6 Add Russian translations to Newmember widget 2018-10-15 21:28:01 +02:00
Mario Vavti
25a74f3664 add missing features section to newmember widget 2018-10-15 20:18:25 +02:00
Mario Vavti
3588c4ab99 allow to undelete deleted base apps 2018-10-15 15:43:55 +02:00
Mario Vavti
782ec06f2b some changelog work 2018-10-15 14:23:58 +02:00
Mario Vavti
df62037c4a fix wiki issue with wiki page links when using bbcode 2018-10-15 13:13:04 +02:00
Mario Vavti
05b8c53ff7 update readme for master and dev branch buildstatus 2018-10-15 10:37:14 +02:00
Mario
c39de966df Merge branch 'dev' into 'dev'
Bring back some basic automated testing for PHP7.1 and mysql via gitlab-ci.

See merge request hubzilla/core!1332
2018-10-15 09:59:52 +02:00
Mario
721461dd3e Merge branch 'patch-16' into 'dev'
JS plurals displaying code cleanup

See merge request hubzilla/core!1338
2018-10-15 09:59:17 +02:00
Mario
7042528d26 Merge branch 'patch-15' into 'dev'
Add JS function code for plurals translation in Russian

See merge request hubzilla/core!1337
2018-10-15 09:58:09 +02:00
Max Kostikov
ce52c27a8a Update main.js 2018-10-14 22:45:11 +02:00
Max Kostikov
f9c3b80780 Update main.js 2018-10-14 22:28:47 +02:00
Max Kostikov
ab0e2f5236 Update language.php 2018-10-14 22:28:14 +02:00
Max Kostikov
b7280a442e JS plurals displaying code cleanup 2018-10-14 22:26:56 +02:00
Max Kostikov
8af91b0209 Update hstrings.php 2018-10-14 22:24:36 +02:00
Max Kostikov
ee4a262953 Add JS function code for plurals translation 2018-10-14 15:21:00 +02:00
Mario Vavti
d584293cde min version bump 2018-10-13 20:28:24 +02:00
Mario
a2575059e2 Merge branch 'patch-14' into 'dev'
Add date/time plurals translation in JavaScript

See merge request hubzilla/core!1336
2018-10-13 20:16:56 +02:00
Max Kostikov
54bdf59dde Update js_strings.php 2018-10-13 19:56:07 +02:00
Max Kostikov
e96e3dc6e6 Update po2php.php 2018-10-13 19:54:13 +02:00
Max Kostikov
3ac4337aec Update main.js 2018-10-13 19:52:59 +02:00
Max Kostikov
f68674b35a Update js_strings.tpl 2018-10-13 19:51:33 +02:00
Max Kostikov
729d0d5368 Update language.php 2018-10-13 19:50:09 +02:00
Max Kostikov
5c0d31873a Add date/time plurals translation in JavaScript 2018-10-13 19:48:45 +02:00
git-marijus
0db047e572 fix phpunit error with html2markdown test and temporary disable failing markdown test in connection with **bold** and _italic_ (it is not clear why they fail and the code appears to work as expected) 2018-10-13 13:39:22 +02:00
git-marijus
22275f3077 fix dba_pdoTest 2018-10-13 13:26:59 +02:00
git-marijus
b77acb3e53 add gitlab-ci.yml and phpunit.xml 2018-10-13 13:19:17 +02:00
4603 changed files with 456231 additions and 711882 deletions

0
.gitignore vendored Executable file → Normal file
View File

View File

@@ -1,36 +1,147 @@
# Select image from https://hub.docker.com/_/php/
image: php:7.1
#image: php:7.3
# Use a prepared Hubzilla image to optimise pipeline duration
image: registry.gitlab.com/dawnbreak/hubzilla/core:php7.3
stages:
- test
- deploy
# Select what we should cache
cache:
paths:
- vendor/
- .cache/
# global variables for all jobs, if no job specific variables
variables:
# Configure mysql service (https://hub.docker.com/_/mysql/)
# Tell composer to use the project workspace .cache folder
COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer"
# Ignore a Composer warning
COMPOSER_ALLOW_SUPERUSER: 1
# Configure MySQL/MariaDB service (https://hub.docker.com/_/mysql/, https://hub.docker.com/_/mariadb/)
MYSQL_DATABASE: hello_world_test
MYSQL_ROOT_PASSWORD: mysql
# Configure PostgreSQL service (https://hub.docker.com/_/postgres/)
POSTGRES_DB: ci-db
POSTGRES_USER: ci-user
POSTGRES_PASSWORD: ci-pass
services:
- mysql:5.7
before_script:
- apt-get update -yqq
- apt-get install -yqq git mysql-server mysql-client libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev
# Install PHP extensions
- docker-php-ext-install mbstring mcrypt pdo_mysql pdo_pgsql curl json intl gd xml zip bz2 opcache
# pecl and composer do not work with PHP production restrictions (from Hubzilla Docker image)
- if [ -f /usr/local/etc/php/conf.d/z_prod.ini ]; then mv /usr/local/etc/php/conf.d/z_prod.ini /usr/local/etc/php/conf.d/z_prod.ini.off; fi
# Install & enable Xdebug for code coverage reports
- pecl install xdebug
- docker-php-ext-enable xdebug
# Install and run Composer
# Install composer
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
# Install dev libraries from composer
- php ./composer.phar install --no-progress
# php.ini settings
- echo 'xdebug.mode=coverage' >> /usr/local/etc/php/php.ini
# We test PHP7 with MySQL, but we allow it to fail
test:php:mysql:
# hidden job definition with template for MySQL/MariaDB
.job_template_mysql: &job_definition_mysql
stage: test
script:
- echo "USE $MYSQL_DATABASE; $(cat ./install/schema_mysql.sql)" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE"
- echo "SHOW DATABASES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE"
- echo "USE $MYSQL_DATABASE; SHOW TABLES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE"
- vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text
# hidden job definition with template for PostgreSQL
.job_template_postgres: &job_definition_postgres
stage: test
services:
- postgres:latest
script:
- export PGPASSWORD=$POSTGRES_PASSWORD
- psql --version
- psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT VERSION();"
# Import hubzilla's DB schema
- psql -h "postgres" -U "$POSTGRES_USER" -v ON_ERROR_STOP=1 --quiet "$POSTGRES_DB" < ./install/schema_postgres.sql
# Show databases and relations/tables of hubzilla's database
#- psql -h "postgres" -U "$POSTGRES_USER" -l
#- psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "\dt;"
# Run the actual tests
- vendor/bin/phpunit --configuration tests/phpunit-pgsql.xml --testdox
# hidden job definition with artifacts config template
.artifacts_template:
artifacts: &artifacts_template
expire_in: 1 week
# Gitlab should show the results, but has problems parsing PHPUnit's junit file.
reports:
junit: tests/results/junit.xml
# Archive test results (coverage, testdox, junit)
name: "$CI_COMMIT_REF_SLUG-$CI_JOB_NAME"
paths:
- tests/results/
# PHP7.3 with MySQL 5.7
php7.3_mysql5.7:
<<: *job_definition_mysql
services:
- mysql:5.7
# PHP7.3 with MySQL 8 (latest)
php7.3_mysql8:
<<: *job_definition_mysql
services:
- name: mysql:8
command: ["--default-authentication-plugin=mysql_native_password"]
# PHP7.3 with MariaDB 10.2
php7.3_mariadb10.2:
<<: *job_definition_mysql
services:
- name: mariadb:10.2
alias: mysql
# PHP7.3 with MariaDB 10.3 (latest)
php7.3_mariadb10.3:
<<: *job_definition_mysql
image: registry.gitlab.com/dawnbreak/hubzilla/core:php7.3
services:
- name: mariadb:10.3
alias: mysql
# PHP7.3 with PostgreSQL latest (11)
php7.3_postgres11:
<<: *job_definition_postgres
artifacts: *artifacts_template
# PHP7.3 with PostgreSQL latest (11)
php7.3_postgres11:
<<: *job_definition_postgres
image: registry.gitlab.com/dawnbreak/hubzilla/core:php7.3
artifacts: *artifacts_template
# Generate Doxygen API Documentation and deploy it as GitLab pages
pages:
stage: deploy
cache: {}
image: php:7-cli-alpine
before_script:
- apk update
- apk add doxygen ttf-freefont graphviz
script:
- doxygen util/Doxyfile
- mv doc/html/ public/
- echo "API documentation should be accessible at https://hubzilla.frama.io/core/ soon"
artifacts:
paths:
- public
only:
# Only generate it on main repo's master branch
- master@hubzilla/core

View File

@@ -1,22 +1,10 @@
# Hubzilla at Home next to your Router
Run hubzilla-setup.sh for an unattended installation of hubzilla.
The script is known to work without adjustments with
+ Hardware
- Mini-PC with Debian-9.2-amd64, or
- Rapberry 3 with Raspbian, Debian-9.3
+ DynDNS
- selfHOST.de
- freedns.afraid.org
# How to use
## Disclaimers
- This script does work with Debian 9 only.
- This script has to be used on a fresh debian install only (it does not take account for a possibly already installed and configured webserver or sql implementation).
# Step-by-Step Overwiew
- This script does work with Debian 10 only.
- This script has to be used on a fresh debian install only (it does not take account for a possibly already installed and configured webserver or sql implementation). You may use it to install several hub/instances on the same server, though.
## Preconditions
@@ -28,97 +16,99 @@ Hardware
Software
+ Fresh installation of Debian 9 (Stretch)
+ Router with open ports 80 and 443 for your Hub
+ Fresh installation of Debian 10 (Buster)
+ Router with open ports 80 and 443 for your web server
## The basic steps (quick overview)
You can of course run the script on a VPS or any distant server as long as the above sotfware requirements are satisfied.
## How to run the script
+ Register your own domain (for example at selfHOST) or a free subdomain (for example at freeDNS)
+ Log on to your fresh Debian
- apt-get install git
- mkdir -p /var/www
- cd /var/www
- git clone https://github.com/redmatrix/hubzilla.git html
- git clone https://framagit.org/hubzilla/core.git html (you can replace "html" with any folder name you like, which you'll have to do if you plan to have more than one hub/instance running on your server)
- cd html/.homeinstall
- cp hubzilla-config.txt.template hubzilla-config.txt
- nano hubzilla-config.txt
- cp zotserver-config.txt.template zotserver-config.txt
- nano zotserver-config.txt
- Read the comments carefully
- Enter your values: db pass, domain, values for dyn DNS
- Make sure your external drive (for backups) is mounted
- hubzilla-setup.sh as root
- ... wait, wait, wait until the script is finised
- reboot
+ Open your domain with a browser and step throught the initial configuration of hubzilla.
## Troubleshooting
If the check of the mail address fails when you try to register the very first user in the browser. Do...
cd /var/www/html
util/config system.do_not_check_dns 1
- Prepare your external disk for backups
- ./zotserver-setup.sh as root
- ... wait, wait, wait until the script is finished
+ Open your domain with a browser and step throught the initial configuration of your hub/instance.
## Optional - Set path to imagemagick
In Admin settings of hubzilla or via terminal
In Admin settings of your hub/instance or via terminal
cd /var/www/html
cd /var/www/html (or the custom path you chose)
util/config system.imagick_convert_path /usr/bin/convert
# Step-by-Step in Detail
## Optional - Switch verification of email on/off
## Preparations Hardware
Do this just before you register the first user.
### Mini-PC
In Admin settings of your hub/instance or via terminal
### Recommended: USB Drive for Backups
cd /var/www/html
The installation will create a daily backup written to an external drive.
Check the current setting
The USB drive must be compatible with the filesystems
util/config system verify_email
- ext4 (if you do not want to encrypt the USB)
- LUKS + ext4 (if you want to encrypt the USB)
Switch the verification on/off (1/0)
The backup includes
util/config system verify_email 0
- Hubzilla DB
- Hubzilla installation /var/www/html
- Certificates for letsencrypt
## What the script will do for you...
## Preparations Software
+ install everything required by your hub/instance, basically a web server (Apache or Nginx), PHP, a database (MySQL), certbot,...
+ create a database
+ run certbot to have everything for a secure connection (httpS)
+ create a script for daily maintenance
- backup to external disk (certificates, database, /var/www/)
- renew certfificate (letsencrypt)
- update of your hub/instance (git)
- update of Debian
- restart
+ create cron jobs for
- DynDNS (selfHOST.de or freedns.afraid.org) every 5 minutes
- Run.php for your hub/instance every 10 minutes
- daily maintenance script every day at 05:30
### Install Debian Linux on the Mini-PC
The script is known to work without adjustments with
Download the stable Debian at https://www.debian.org/
(Debian 8 is no longer supported.)
+ Hardware
- Mini-PC with Debian 10 (stretch), or
- Rapberry 3 with Raspbian, Debian 10
- Rapberry 4 with Raspbian, Debian 10
+ DynDNS
- selfHOST.de
- freedns.afraid.org
Create bootable USB drive with Debian on it.You could use
- unetbootin, https://en.wikipedia.org/wiki/UNetbootin
- or simply the linux command "dd"
Example for command dd...
su -
dd if=2017-11-29-raspbian-stretch.img of=/dev/mmcblk0
Do not forget to unmount the SD card before and check if unmounted like in this example...
su -
umount /dev/mmcblk0*
df -h
The script can install [Hubzilla](https://zotlabs.org/page/hubzilla/hubzilla-project), [Zap](https://zotlabs.com/zap/) and [Mistpark 2020, aka "Misty"](https://zotlabs.com/misty/). Make sure to use the correct GIT repositories.
Switch off your mini pc, plug in your USB drive and start the mini pc from the
stick. Install Debian. Follow the instructions of the installation.
# Step-by-Step - some Details
### Configure your Router
## Preparations
Open the ports 80 and 443 on your router for your Debian
## Configure your Router
Your webserver has to be visible in the internet.
Open the ports 80 and 443 on your router for your Debian. Make sure your web server is marked as "exposed host".
## Preparations Dynamic IP Address
Your Hubzilla must be reachable by a domain that you can type in your browser
Follow the instructions in .homeinstall/zotserver-config.txt.
In short...
Your Hubzilla server must be reachable by a domain that you can type in your browser
cooldomain.org
@@ -132,99 +122,13 @@ There are two ways to get a domain...
...for example buy at selfHOST.de
The cost are around 10,- € once and 1,50 € per month (2017).
The cost is 1,50 € per month (2019).
### Method 2: Register a free subdomain
...for example register at freedns.afraid.org
Follow the instructions in .homeinstall/hubzilla-config.txt.
## Install Hubzilla on your Debian
Login to your debian
(Provided your username is "you" and the name of the mini pc is "debian". You
could take the IP address instead of "debian")
ssh -X you@debian
Change to root user
su -l
Install git
apt-get install git
Make the directory for apache and change diretory to it
mkdir /var/www
cd /var/www/
Clone hubzilla from git ("git pull" will update it later)
git clone https://framagit.org/hubzilla/core html
Change to the install script
cd html/.homeinstall/
Copy the template file
cp hubzilla-config.txt.template hubzilla-config.txt
Modify the file "hubzilla-config.txt". Read the instructions there carefully and enter your values.
nano hubzilla-config.txt
Make sure your external drive (for backups) is plugged in and can be mounted as configured in "hubzilla-config.txt". Otherwise the daily backups will not work.
Run the script
./hubzilla-setup.sh
Wait... The script should not finish with an error message.
In a webbrowser open your domain.
Expected: A test page of hubzilla is shown. All checks there should be
successfull. Go on...
Expected: A page for the Hubzilla server configuration shows up.
Leave db server name "127.0.0.1" and port "0" untouched.
Enter
- DB user name = hubzilla
- DB pass word = This is the password you entered in "hubzilla-config.txt"
- DB name = hubzilla
Leave db type "MySQL" untouched.
Follow the instructions in the next pages.
Recommended: Set path to imagemagick
- in admin settings of hubzilla or
- via terminal
util/config system.imagick_convert_path /usr/bin/convert
After the daily script was executed at 05:30 (am)
- look at /var/www/html/hubzilla-daily.log
- check your backup on the external drive
- optionally view the daily log under yourdomain.org/admin/logs/
- set the logfile to var/www/html/hubzilla-daily.log
## Note for the Rasperry
The script was tested with an Raspberry 3 under Raspian (Debian 9.3, 2017-11-29-raspbian-stretch.img).
It is recommended to deinstall these programms to avoid endless updates. Use...
sudo apt-get purge wolfram-engine sonic-pi
sudo apt-get autoremove
## Note on Rasperry
It is recommended to run the Raspi without graphical frontend (X-Server). Use...
@@ -234,12 +138,6 @@ to boot the Rapsi to the client console.
DO NOT FORGET TO CHANGE THE DEFAULT PASSWORD FOR USER PI!
On a Raspian Stretch (Debian 9) the validation of the mail address fails for the very first user.
This used to happen on some *bsd distros but there was some work to fix that a year ago (2017).
So if your system isn't registered in DNS or DNS isn't active do
cd /var/www/html
util/config system.do_not_check_dns 1
## Reminder for Different Web Wervers
For those of you who feel adventurous enough to use a different web server (i.e. Lighttpd...), don't forget that this script will install Apache or Nginx and that you can only have one web server listening to ports 80 & 443. Also, don't forget to tweak your daily shell script in /var/www/ accordingly.

View File

@@ -1,158 +0,0 @@
###############################################
### MANDATORY - database password #############
#
# Please give your database password
# Example: db_pass=pass_word_with_no_blanks_in_it
# Example: db_pass="this password has blanks in it"
db_pass=
###############################################
### MANDATORY - let's encrypt #################
#
# Hubilla requires encrypted communication via secure HTTP (HTTPS).
# This script automates installation of an SSL certificate from
# Let's Encrypt (https://letsencrypt.org)
#
# Please give the domain name of your hub
#
# Example: my.cooldomain.org
# Example: cooldomain.org
#
# Email is optional
#
#
le_domain=
le_email=
###############################################
### OPTIONAL - selfHOST - dynamic IP address ##
#
# 1. Register a domain at selfhost.de
# - choose offer "DOMAIN dynamisch" 1,50€/mon at 08.01.2016
# 2. Get your configuration for dynamic IP update
# - Log in at selfhost.de
# - go to "DynDNS Accounte"
# - klick "Details" of your (freshly) registered domain
# - You will find the configuration there
# - Benutzername (user name) > use this for "selfhost_user="
# - Passwort (pass word) > use this for "selfhost_pass="
#
#
selfhost_user=
selfhost_pass=
###############################################
### OPTIONAL - FreeDNS - dynamic IP address ###
#
# Please give the alpha-numeric-key of freedns
#
# Get a free subdomain from freedns and use it for your dynamic ip address
# Documentation under http://www.techjawab.com/2013/06/setup-dynamic-dns-dyndns-for-free-on.html
#
# - Register for a Free domain at http://freedns.afraid.org/signup/
# - WATCH THIS: Make sure you choose a domain with as less subdomains as
# possible. Why? Let's encrpyt issues a limited count of certificates each
# day. Possible other users of this domain will try to issue a certificate
# at the same day.
# - Logon to FreeDNS (where you just registered)
# - Goto http://freedns.afraid.org/dynamic/
# - Right click on "Direct Link" and copy the URL and paste it somewhere.
# - You should notice a large and unique alpha-numeric key in the URL
#
# http://freedns.afraid.org/dynamic/update.php?alpha-numeric-key
#
# Provided your url from freedns is
#
# http://freedns.afraid.org/dynamic/update.php?U1Z6aGt2R0NzMFNPNWRjbWxxZGpsd093OjE1Mzg5NDE5
#
# Then you have to provide
#
# freedns_key=U1Z6aGt2R0NzMFNPNWRjbWxxZGpsd093OjE1Mzg5NDE5
#
#
freedns_key=
###############################################
### OPTIONAL - Backup to external device ######
#
# The script can use an external device for the daily backup.
# The file system of the device (USB stick for example) must be compatible with
#
# - encrypted LUKS + ext4, or
# - ext4
#
# You should test to mount the device befor you run the script
# (hubzilla-setup.sh).
# How to find your (pluged-in) devices?
#
# fdisk -l
#
# Provided your device was listed as is /dev/sdb1. You could check with:
#
# blkid | grep /dev/sdb1
#
# Try to decrypt
# (You might install cryptsetup befor using apt-get install.
#
# apt-get install cryptsetup
# cryptsetup luksOpen /dev/sdb1 cryptobackup
#
# Try to mount
# You might create the directory /media/hubzilla_backup it it does not exist
# using mkdir.
#
# mkdir /media/hubzilla_backup
# mount /dev/mapper/cryptobackup /media/hubzilla_backup
#
# Unmounting device goes like this
#
# umount /media/hubzilla_backup
# cryptsetup luksClose cryptobackup
#
# To check if still mounted
#
# lsof /media/hubzilla_backup
#
# If you leave the following parameters
#
# - "backup_device_name" and
# - "backup_device_pass"
#
# empty the script will create daily backups on the internal disk (which could
# save you as well).
#
# Example: backup_device_name=/dev/sdc1
#
# Leave "backup_device_pass=" empty if the external device is not encrypted.
#
backup_device_name=
backup_device_pass=
###############################################
### OPTIONAL - do not mess with things below ##
# (...if you are not certain)
#
# Usually you are done here
# Everything below is OPTIONAL
#
###############################################
#
# Database for hubzilla
hubzilla_db_name=hubzilla
hubzilla_db_user=hubzilla
hubzilla_db_pass=$db_pass
#
#
# Password for package mysql-server
# Example: mysqlpass=aberhallo
# Example: mysqlpass="aber hallo has blanks in it"
#
mysqlpass=$db_pass
# Password for package phpmyadmin
# Example: phpmyadminpass=aberhallo
# Example: phpmyadminpass="aber hallo has blanks in it"
phpmyadminpass=$db_pass

View File

@@ -1,830 +0,0 @@
#!/bin/bash
#
# How to use
# ----------
#
# This file automates the installation of hubzilla under Debian Linux
#
# 1) Copy the file "hubzilla-config.txt.template" to "hubzilla-config.txt"
# Follow the instuctions there
#
# 2) Switch to user "root" by typing "su -"
#
# 3) Run with "./hubzilla-setup.sh"
# If this fails check if you can execute the script.
# - To make it executable type "chmod +x hubzilla-setup.sh"
# - or run "bash hubzilla-setup.sh"
#
#
# What does this script do basically?
# -----------------------------------
#
# This file automates the installation of hubzilla under Debian Linux
# - install
# * apache webserer,
# * php,
# * mysql - the database for hubzilla,
# * phpmyadmin,
# * git to download and update hubzilla itself
# - download hubzilla core and addons
# - configure cron
# * "poller.php" for regular background prozesses of hubzilla
# * to_do "apt-get update" and "apt-get dist-upgrade" to keep linux
# up-to-date
# * to_do backup hubzillas database and files (rsnapshot)
# - configure dynamic ip with cron
# - to_do letsencrypt
# - to_do redirection to https
#
#
# Discussion
# ----------
#
# Security - password is the same for mysql-server, phpmyadmin and hubzilla db
# - The script runs into installation errors for phpmyadmin if it uses
# different passwords. For the sake of simplicity one singel password.
#
# Security - suhosin for PHP
# - The script does not install suhosin.
# - Is the security package suhosin usefull or not usefull?
#
# Hubzilla - email verification
# - The script switches off email verification off in all htconfig.tpl.
# Example: /var/www/html/view/en/htconfig.tpl
# - Is this a silly idea or not?
#
#
# Remove Hubzilla (for a fresh start using the script)
# ----------------------------------------------------
#
# You could use /var/www/hubzilla-remove.sh
# that is created by hubzilla-setup.sh.
#
# The script will remove (almost everything) what was installed by the script.
# After the removal you could run the script again to have a fresh install
# of all applications including hubzilla and its database.
#
# How to restore from backup
# --------------------------
#
# Daily backup
# - - - - - -
#
# The installation
# - writes a script /var/www/hubzilla-daily.sh
# - creates a daily cron that runs the hubzilla-daily.sh
#
# hubzilla-daily.sh makes a (daily) backup of all relevant files
# - /var/lib/mysql/ > hubzilla database
# - /var/www/html/ > hubzilla from github
# - /var/www/letsencrypt/ > certificates
#
# hubzilla-daily.sh writes the backup
# - either to an external disk compatible to LUKS+ext4 (see hubzilla-config.txt)
# - or to /var/cache/rsnapshot in case the external disk is not plugged in
#
# Restore backup
# - - - - - - -
#
# This was not tested yet.
# Bacically you can copy the files from the backup to the server.
#
# Credits
# -------
#
# The script is based on Thomas Willinghams script "debian-setup.sh"
# which he used to install the red#matrix.
#
# The script uses another script from https://github.com/lukas2511/letsencrypt.sh
#
# The documentation for bash is here
# https://www.gnu.org/software/bash/manual/bash.html
#
function check_sanity {
# Do some sanity checking.
print_info "Sanity check..."
if [ $(/usr/bin/id -u) != "0" ]
then
die 'Must be run by root user'
fi
if [ -f /etc/lsb-release ]
then
die "Distribution is not supported"
fi
if [ ! -f /etc/debian_version ]
then
die "Debian is supported only"
fi
if ! grep -q 'Linux 9' /etc/issue
then
die "Linux 9 (stretch) is supported only"x
fi
}
function check_config {
print_info "config check..."
# Check for required parameters
if [ -z "$db_pass" ]
then
die "db_pass not set in $configfile"
fi
if [ -z "$le_domain" ]
then
die "le_domain not set in $configfile"
fi
# backup is important and should be checked
if [ -n "$backup_device_name" ]
then
if [ ! -d "$backup_mount_point" ]
then
mkdir "$backup_mount_point"
fi
device_mounted=0
if fdisk -l | grep -i "$backup_device_name.*linux"
then
print_info "ok - filesystem of external device is linux"
if [ -n "$backup_device_pass" ]
then
echo "$backup_device_pass" | cryptsetup luksOpen $backup_device_name cryptobackup
if mount /dev/mapper/cryptobackup /media/hubzilla_backup
then
device_mounted=1
print_info "ok - could encrypt and mount external backup device"
umount /media/hubzilla_backup
else
print_warn "backup to external device will fail because encryption failed"
fi
cryptsetup luksClose cryptobackup
else
if mount $backup_device_name /media/hubzilla_backup
then
device_mounted=1
print_info "ok - could mount external backup device"
umount /media/hubzilla_backup
else
print_warn "backup to external device will fail because mount failed"
fi
fi
else
print_warn "backup to external device will fail because filesystem is either not linux or 'backup_device_name' is not correct in $configfile"
fi
if [ $device_mounted == 0 ]
then
die "backup device not ready"
fi
fi
}
function die {
echo "ERROR: $1" > /dev/null 1>&2
exit 1
}
function update_upgrade {
print_info "updated and upgrade..."
# Run through the apt-get update/upgrade first. This should be done before
# we try to install any package
apt-get -q -y update && apt-get -q -y dist-upgrade
print_info "updated and upgraded linux"
}
function check_install {
if [ -z "`which "$1" 2>/dev/null`" ]
then
# export DEBIAN_FRONTEND=noninteractive ... answers from the package
# configuration database
# - q ... without progress information
# - y ... answer interactive questions with "yes"
# DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install $2
DEBIAN_FRONTEND=noninteractive apt-get -q -y install $2
print_info "installed $2 installed for $1"
else
print_warn "$2 already installed"
fi
}
function nocheck_install {
# export DEBIAN_FRONTEND=noninteractive ... answers from the package configuration database
# - q ... without progress information
# - y ... answer interactive questions with "yes"
# DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install $2
# DEBIAN_FRONTEND=noninteractive apt-get --install-suggests -q -y install $1
DEBIAN_FRONTEND=noninteractive apt-get -q -y install $1
print_info "installed $1"
}
function print_info {
echo -n -e '\e[1;34m'
echo -n $1
echo -e '\e[0m'
}
function print_warn {
echo -n -e '\e[1;31m'
echo -n $1
echo -e '\e[0m'
}
function stop_hubzilla {
if [ -d /etc/apache2 ]
then
print_info "stopping apache webserver..."
service apache2 stop
fi
if [ -f /etc/init.d/mysql ]
then
print_info "stopping mysql db..."
/etc/init.d/mysql stop
fi
}
function install_apache {
print_info "installing apache..."
nocheck_install "apache2 apache2-utils"
}
function install_imagemagick {
print_info "installing imagemagick..."
nocheck_install "imagemagick"
}
function install_curl {
print_info "installing curl..."
nocheck_install "curl"
}
function install_sendmail {
print_info "installing sendmail..."
nocheck_install "sendmail sendmail-bin"
}
function install_php {
# openssl and mbstring are included in libapache2-mod-php
print_info "installing php..."
nocheck_install "libapache2-mod-php php php-pear php-curl php-mcrypt php-gd"
sed -i "s/^upload_max_filesize =.*/upload_max_filesize = 100M/g" /etc/php/7.0/apache2/php.ini
sed -i "s/^post_max_size =.*/post_max_size = 100M/g" /etc/php/7.0/apache2/php.ini
}
function install_mysql {
# http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html
#
# To determine the required package name, key and type you can perform
# a trial installation then search the configuration database.
#
# debconf-get-selections | grep mysql-server
#
# The command debconf-get-selections is provided by the package
# debconf-utils, which you may need to install.
#
# apt-get install debconf-utils
#
# If you want to supply an answer to a configuration question but do not
# want to be prompted for it then this can be arranged by preseeding the
# DebConf database with the required information.
#
# echo mysql-server mysql-server/root_password password xyzzy | debconf-set-selections
# echo mysql-server mysql-server/root_password_again password xyzzy | debconf-set-selections
#
print_info "installing mysql..."
if [ -z "$mysqlpass" ]
then
die "mysqlpass not set in $configfile"
fi
echo mysql-server mysql-server/root_password password $mysqlpass | debconf-set-selections
echo mysql-server mysql-server/root_password_again password $mysqlpass | debconf-set-selections
nocheck_install "php-mysql mysql-server mysql-client"
}
function install_phpmyadmin {
print_info "installing phpmyadmin..."
if [ -z "$phpmyadminpass" ]
then
die "phpmyadminpass not set in $configfile"
fi
echo phpmyadmin phpmyadmin/setup-password password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/mysql/app-pass password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/app-password-confirm password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/mysql/admin-pass password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/password-confirm password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2 | debconf-set-selections
nocheck_install "phpmyadmin"
# It seems to be not neccessary to check rewrite.load because it comes
# with the installation. To be sure you could check this manually by:
#
# nano /etc/apache2/mods-available/rewrite.load
#
# You should find the content:
#
# LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
a2enmod rewrite
if [ ! -f /etc/apache2/apache2.conf ]
then
die "could not find file /etc/apache2/apache2.conf"
fi
sed -i \
"s/AllowOverride None/AllowOverride all/" \
/etc/apache2/apache2.conf
if [ -z "`grep 'Include /etc/phpmyadmin/apache.conf' /etc/apache2/apache2.conf`" ]
then
echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
fi
service apache2 restart
/etc/init.d/mysql start
}
function create_hubzilla_db {
print_info "creating hubzilla database..."
if [ -z "$hubzilla_db_name" ]
then
die "hubzilla_db_name not set in $configfile"
fi
if [ -z "$hubzilla_db_user" ]
then
die "hubzilla_db_user not set in $configfile"
fi
if [ -z "$hubzilla_db_pass" ]
then
die "hubzilla_db_pass not set in $configfile"
fi
Q1="CREATE DATABASE IF NOT EXISTS $hubzilla_db_name;"
Q2="GRANT USAGE ON *.* TO $hubzilla_db_user@localhost IDENTIFIED BY '$hubzilla_db_pass';"
Q3="GRANT ALL PRIVILEGES ON $hubzilla_db_name.* to $hubzilla_db_user@localhost identified by '$hubzilla_db_pass';"
Q4="FLUSH PRIVILEGES;"
SQL="${Q1}${Q2}${Q3}${Q4}"
mysql -uroot -p$phpmyadminpass -e "$SQL"
}
function run_freedns {
print_info "run freedns (dynamic IP)..."
if [ -z "$freedns_key" ]
then
print_info "freedns was not started because 'freedns_key' is empty in $configfile"
else
if [ -n "$selfhost_user" ]
then
die "You can not use freeDNS AND selfHOST for dynamic IP updates ('freedns_key' AND 'selfhost_user' set in $configfile)"
fi
wget --no-check-certificate -O - https://freedns.afraid.org/dynamic/update.php?$freedns_key
fi
}
function install_run_selfhost {
print_info "install and start selfhost (dynamic IP)..."
if [ -z "$selfhost_user" ]
then
print_info "selfHOST was not started because 'selfhost_user' is empty in $configfile"
else
if [ -n "$freedns_key" ]
then
die "You can not use freeDNS AND selfHOST for dynamic IP updates ('freedns_key' AND 'selfhost_user' set in $configfile)"
fi
if [ -z "$selfhost_pass" ]
then
die "selfHOST was not started because 'selfhost_pass' is empty in $configfile"
fi
if [ ! -d $selfhostdir ]
then
mkdir $selfhostdir
fi
# the old way
# https://carol.selfhost.de/update?username=123456&password=supersafe
#
# the prefered way
wget --output-document=$selfhostdir/$selfhostscript http://jonaspasche.de/selfhost-updater
echo "router" > $selfhostdir/device
echo "$selfhost_user" > $selfhostdir/user
echo "$selfhost_pass" > $selfhostdir/pass
bash $selfhostdir/$selfhostscript update
fi
}
function ping_domain {
print_info "ping domain $domain..."
# Is the domain resolved? Try to ping 6 times à 10 seconds
COUNTER=0
for i in {1..6}
do
print_info "loop $i for ping -c 1 $domain ..."
if ping -c 4 -W 1 $le_domain
then
print_info "$le_domain resolved"
break
else
if [ $i -gt 5 ]
then
die "Failed to: ping -c 1 $domain not resolved"
fi
fi
sleep 10
done
sleep 5
}
function configure_cron_freedns {
print_info "configure cron for freedns..."
if [ -z "$freedns_key" ]
then
print_info "freedns is not configured because freedns_key is empty in $configfile"
else
# Use cron for dynamich ip update
# - at reboot
# - every 30 minutes
if [ -z "`grep 'freedns.afraid.org' /etc/crontab`" ]
then
echo "@reboot root https://freedns.afraid.org/dynamic/update.php?$freedns_key > /dev/null 2>&1" >> /etc/crontab
echo "*/30 * * * * root wget --no-check-certificate -O - https://freedns.afraid.org/dynamic/update.php?$freedns_key > /dev/null 2>&1" >> /etc/crontab
else
print_info "cron for freedns was configured already"
fi
fi
}
function configure_cron_selfhost {
print_info "configure cron for selfhost..."
if [ -z "$selfhost_user" ]
then
print_info "freedns is not configured because freedns_key is empty in $configfile"
else
# Use cron for dynamich ip update
# - at reboot
# - every 30 minutes
if [ -z "`grep 'selfhost-updater.sh' /etc/crontab`" ]
then
echo "@reboot root bash /etc/selfhost/selfhost-updater.sh update > /dev/null 2>&1" >> /etc/crontab
echo "*/5 * * * * root /bin/bash /etc/selfhost/selfhost-updater.sh update > /dev/null 2>&1" >> /etc/crontab
else
print_info "cron for selfhost was configured already"
fi
fi
}
function install_letsencrypt {
print_info "installing let's encrypt ..."
# check if user gave domain
if [ -z "$le_domain" ]
then
die "Failed to install let's encrypt: 'le_domain' is empty in $configfile"
fi
# configure apache
apache_le_conf=/etc/apache2/sites-available/le-default.conf
if [ -f $apache_le_conf ]
then
print_info "$apache_le_conf exist already"
else
cat > $apache_le_conf <<END
# letsencrypt default Apache configuration
Alias /.well-known/acme-challenge /var/www/letsencrypt
<Directory /var/www/letsencrypt>
Options FollowSymLinks
Allow from all
</Directory>
END
a2ensite le-default.conf
service apache2 restart
fi
# download the shell script
if [ -d $le_dir ]
then
print_info "letsenrypt exists already (nothing downloaded > no certificate created and registered)"
return 0
fi
git clone https://github.com/lukas2511/dehydrated $le_dir
cd $le_dir
# create config file for letsencrypt.sh
echo "WELLKNOWN=$le_dir" > $le_dir/config.sh
if [ -n "$le_email" ]
then
echo "CONTACT_EMAIL=$le_email" >> $le_dir/config.sh
fi
# create domain file for letsencrypt.sh
# WATCH THIS:
# - It did not work wit "sub.domain.org www.sub.domain.org".
# - So just use "sub.domain.org" only!
echo "$le_domain" > $le_dir/domains.txt
# test apache config for letsencrpyt
url_http=http://$le_domain/.well-known/acme-challenge/domains.txt
wget_output=$(wget -nv --spider --max-redirect 0 $url_http)
if [ $? -ne 0 ]
then
die "Failed to load $url_http"
fi
# accept terms of service of letsencrypt
./dehydrated --register --accept-terms
# run script dehydrated
#
./dehydrated --cron --config $le_dir/config.sh
}
function configure_apache_for_https {
print_info "configuring apache to use httpS ..."
# letsencrypt.sh
#
# "${BASEDIR}/certs/${domain}/privkey.pem"
# "${BASEDIR}/certs/${domain}/cert.pem"
# "${BASEDIR}/certs/${domain}/fullchain.pem"
#
SSLCertificateFile=${le_dir}/certs/${le_domain}/cert.pem
SSLCertificateKeyFile=${le_dir}/certs/${le_domain}/privkey.pem
SSLCertificateChainFile=${le_dir}/certs/${le_domain}/fullchain.pem
if [ ! -f $SSLCertificateFile ]
then
print_warn "Failed to configure apache for httpS: Missing certificate file $SSLCertificateFile"
return 0
fi
# make sure that the ssl mode is enabled
print_info "...configuring apache to use httpS - a2enmod ssl ..."
a2enmod ssl
# modify apach' ssl conf file
if grep -i "ServerName" $sslconf
then
print_info "seems that apache was already configered to use httpS with $sslconf"
else
sed -i "s/ServerAdmin.*$/ServerAdmin webmaster@localhost\\n ServerName ${le_domain}/" $sslconf
fi
sed -i s#/etc/ssl/certs/ssl-cert-snakeoil.pem#$SSLCertificateFile# $sslconf
sed -i s#/etc/ssl/private/ssl-cert-snakeoil.key#$SSLCertificateKeyFile# $sslconf
sed -i s#/etc/apache2/ssl.crt/server-ca.crt#$SSLCertificateChainFile# $sslconf
sed -i s/#SSLCertificateChainFile/SSLCertificateChainFile/ $sslconf
# apply changes
a2ensite default-ssl.conf
service apache2 restart
}
function check_https {
print_info "checking httpS > testing ..."
url_https=https://$le_domain
wget_output=$(wget -nv --spider --max-redirect 0 $url_https)
if [ $? -ne 0 ]
then
print_warn "check not ok"
else
print_info "check ok"
fi
}
function install_hubzilla {
print_info "installing hubzilla addons..."
cd /var/www/html/
util/add_addon_repo https://framagit.org/hubzilla/addons.git hzaddons
mkdir -p "store/[data]/smarty3"
chmod -R 777 store
touch .htconfig.php
chmod ou+w .htconfig.php
cd /var/www/
chown -R www-data:www-data html
chown root:www-data /var/www/html/
chown root:www-data /var/www/html/.htaccess
chmod 0644 /var/www/html/.htaccess
# try to switch off email registration
sed -i "s/verify_email.*1/verify_email'] = 0/" /var/www/html/view/*/ht*
if [ -n "`grep -r 'verify_email.*1' /var/www/html/view/`" ]
then
print_warn "Hubzillas registration prozess might have email verification switched on."
fi
print_info "installed hubzilla"
}
function rewrite_to_https {
print_info "configuring apache to redirect http to httpS ..."
htaccessfile=/var/www/html/.htaccess
if grep -i "https" $htaccessfile
then
print_info "...configuring apache to redirect http to httpS was already done in $htaccessfile"
else
sed -i "s#QSA]#QSA]\\n RewriteCond %{SERVER_PORT} !^443$\\n RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]#" $htaccessfile
fi
service apache2 restart
}
# This will allways overwrite both config files
# - internal disk
# - external disk (LUKS + ext4)
# of rsnapshot for hubzilla
function install_rsnapshot {
print_info "installing rsnapshot..."
nocheck_install "rsnapshot"
# internal disk
cp -f /etc/rsnapshot.conf $snapshotconfig
sed -i "s/^cmd_cp/#cmd_cp/" $snapshotconfig
sed -i "s/^backup/#backup/" $snapshotconfig
echo "backup /var/lib/mysql/ localhost/" >> $snapshotconfig
echo "backup /var/www/html/ localhost/" >> $snapshotconfig
echo "backup /var/www/letsencrypt/ localhost/" >> $snapshotconfig
# external disk
if [ -n "$backup_device_name" ]
then
cp -f /etc/rsnapshot.conf $snapshotconfig_external_device
sed -i "s#snapshot_root.*#snapshot_root $backup_mount_point#" $snapshotconfig_external_device
sed -i "/alpha/s/6/30/" $snapshotconfig_external_device
sed -i "s/^cmd_cp/#cmd_cp/" $snapshotconfig_external_device
sed -i "s/^backup/#backup/" $snapshotconfig_external_device
if [ -z "`grep 'letsencrypt' $snapshotconfig_external_device`" ]
then
echo "backup /var/lib/mysql/ localhost/" >> $snapshotconfig_external_device
echo "backup /var/www/html/ localhost/" >> $snapshotconfig_external_device
echo "backup /var/www/letsencrypt/ localhost/" >> $snapshotconfig_external_device
fi
else
print_info "No backup configuration (rsnapshot) for external device configured. Reason: backup_device_name and/or backup_device_pass not given in $configfile"
fi
}
function install_cryptosetup {
print_info "installing cryptsetup..."
nocheck_install "cryptsetup"
}
function configure_cron_daily {
print_info "configuring cron..."
# every 10 min for poller.php
if [ -z "`grep 'poller.php' /etc/crontab`" ]
then
echo "*/10 * * * * www-data cd /var/www/html; php Zotlabs/Daemon/Master.php Cron >> /dev/null 2>&1" >> /etc/crontab
fi
# Run external script daily at 05:30
# - stop apache and mysql-server
# - backup hubzilla
# - update hubzilla core and addon
# - update and upgrade linux
# - reboot
echo "#!/bin/sh" > /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "echo \" \"" >> /var/www/$hubzilladaily
echo "echo \"+++ \$(date) +++\"" >> /var/www/$hubzilladaily
echo "echo \" \"" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - renew certificate...\"" >> /var/www/$hubzilladaily
echo "bash $le_dir/dehydrated --cron --config $le_dir/config.sh" >> /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "# stop hubzilla" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - stoping apache and mysql...\"" >> /var/www/$hubzilladaily
echo "service apache2 stop" >> /var/www/$hubzilladaily
echo "/etc/init.d/mysql stop # to avoid inconsistancies" >> /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "# backup" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - try to mount external device for backup...\"" >> /var/www/$hubzilladaily
echo "backup_device_name=$backup_device_name" >> /var/www/$hubzilladaily
echo "backup_device_pass=$backup_device_pass" >> /var/www/$hubzilladaily
echo "backup_mount_point=$backup_mount_point" >> /var/www/$hubzilladaily
echo "device_mounted=0" >> /var/www/$hubzilladaily
echo "if [ -n \"$backup_device_name\" ]" >> /var/www/$hubzilladaily
echo "then" >> /var/www/$hubzilladaily
echo " if blkid | grep $backup_device_name" >> /var/www/$hubzilladaily
echo " then" >> /var/www/$hubzilladaily
if [ -n "$backup_device_pass" ]
then
echo " echo \"decrypting backup device...\"" >> /var/www/$hubzilladaily
echo " echo "\"$backup_device_pass\"" | cryptsetup luksOpen $backup_device_name cryptobackup" >> /var/www/$hubzilladaily
fi
echo " if [ ! -d $backup_mount_point ]" >> /var/www/$hubzilladaily
echo " then" >> /var/www/$hubzilladaily
echo " mkdir $backup_mount_point" >> /var/www/$hubzilladaily
echo " fi" >> /var/www/$hubzilladaily
echo " echo \"mounting backup device...\"" >> /var/www/$hubzilladaily
if [ -n "$backup_device_pass" ]
then
echo " if mount /dev/mapper/cryptobackup $backup_mount_point" >> /var/www/$hubzilladaily
else
echo " if mount $backup_device_name $backup_mount_point" >> /var/www/$hubzilladaily
fi
echo " then" >> /var/www/$hubzilladaily
echo " device_mounted=1" >> /var/www/$hubzilladaily
echo " echo \"device $backup_device_name is now mounted. Starting backup...\"" >> /var/www/$hubzilladaily
echo " rsnapshot -c $snapshotconfig_external_device alpha" >> /var/www/$hubzilladaily
echo " echo \"\$(date) - disk sizes...\"" >> /var/www/$hubzilladaily
echo " df -h" >> /var/www/$hubzilladaily
echo " echo \"\$(date) - db size...\"" >> /var/www/$hubzilladaily
echo " du -h $backup_mount_point | grep mysql/hubzilla" >> /var/www/$hubzilladaily
echo " echo \"unmounting backup device...\"" >> /var/www/$hubzilladaily
echo " umount $backup_mount_point" >> /var/www/$hubzilladaily
echo " else" >> /var/www/$hubzilladaily
echo " echo \"failed to mount device $backup_device_name\"" >> /var/www/$hubzilladaily
echo " fi" >> /var/www/$hubzilladaily
if [ -n "$backup_device_pass" ]
then
echo " echo \"closing decrypted backup device...\"" >> /var/www/$hubzilladaily
echo " cryptsetup luksClose cryptobackup" >> /var/www/$hubzilladaily
fi
echo " fi" >> /var/www/$hubzilladaily
echo "fi" >> /var/www/$hubzilladaily
echo "if [ \$device_mounted == 0 ]" >> /var/www/$hubzilladaily
echo "then" >> /var/www/$hubzilladaily
echo " echo \"device could not be mounted $backup_device_name. No backup written.\"" >> /var/www/$hubzilladaily
echo "fi" >> /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - db size...\"" >> /var/www/$hubzilladaily
echo "du -h /var/lib/mysql/ | grep mysql/hubzilla" >> /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "# update" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - updating dehydrated...\"" >> /var/www/$hubzilladaily
echo "git -C /var/www/letsencrypt/ pull" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - updating hubhilla core...\"" >> /var/www/$hubzilladaily
echo "(cd /var/www/html/ ; util/udall)" >> /var/www/$hubzilladaily
echo "chown -R www-data:www-data /var/www/html/ # make all accessable for the webserver" >> /var/www/$hubzilladaily
echo "chown root:www-data /var/www/html/.htaccess" >> /var/www/$hubzilladaily
echo "chmod 0644 /var/www/html/.htaccess # www-data can read but not write it" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - updating linux...\"" >> /var/www/$hubzilladaily
echo "apt-get -q -y update && apt-get -q -y dist-upgrade && apt-get -q -y autoremove # update linux and upgrade" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - Backup hubzilla and update linux finished. Rebooting...\"" >> /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "reboot" >> /var/www/$hubzilladaily
if [ -z "`grep 'hubzilla-daily.sh' /etc/crontab`" ]
then
echo "30 05 * * * root /bin/bash /var/www/$hubzilladaily >> /var/www/html/hubzilla-daily.log 2>&1" >> /etc/crontab
echo "0 0 1 * * root rm /var/www/html/hubzilla-daily.log" >> /etc/crontab
fi
# This is active after either "reboot" or "/etc/init.d/cron reload"
print_info "configured cron for updates/upgrades"
}
function write_uninstall_script {
print_info "writing uninstall script..."
cat > /var/www/hubzilla-remove.sh <<END
#!/bin/sh
#
# This script removes Hubzilla.
# You might do this for a fresh start using the script.
# The script will remove (almost everything) what was installed by the script,
# all applications including hubzilla and its database.
#
# Backup the certificates of letsencrypt (you never know)
cp -a /var/www/letsencrypt/ ~/backup_le_certificats
#
# Removal
apt-get remove apache2 apache2-utils libapache2-mod-php5 php5 php-pear php5-xcache php5-curl php5-mcrypt php5-gd php5-mysql mysql-server mysql-client phpmyadmin
apt-get purge apache2 apache2-utils libapache2-mod-php5 php5 php-pear php5-xcache php5-curl php5-mcrypt php5-gd php5-mysql mysql-server mysql-client phpmyadmin
apt-get autoremove
apt-get clean
rm /etc/rsnapshot_hubzilla.conf
rm /etc/rsnapshot_hubzilla_external_device.conf
rm -R /etc/apache2/
rm -R /var/lib/mysql/
rm -R /var/www
rm -R /etc/selfhost/
# uncomment the next line if you want to remove the backups
# rm -R /var/cache/rsnapshot
nano /etc/crontab # remove entries there manually
END
chmod -x /var/www/hubzilla-remove.sh
}
########################################################################
# START OF PROGRAM
########################################################################
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
check_sanity
# Read config file edited by user
configfile=hubzilla-config.txt
source $configfile
selfhostdir=/etc/selfhost
selfhostscript=selfhost-updater.sh
hubzilladaily=hubzilla-daily.sh
plugins_update=.homeinstall/plugins_update.sh
snapshotconfig=/etc/rsnapshot_hubzilla.conf
snapshotconfig_external_device=/etc/rsnapshot_hubzilla_external_device.conf
backup_mount_point=/media/hubzilla_backup
le_dir=/var/www/letsencrypt
sslconf=/etc/apache2/sites-available/default-ssl.conf
#set -x # activate debugging from here
check_config
stop_hubzilla
update_upgrade
install_curl
install_sendmail
install_apache
install_imagemagick
install_php
install_mysql
install_phpmyadmin
create_hubzilla_db
run_freedns
install_run_selfhost
ping_domain
configure_cron_freedns
configure_cron_selfhost
install_letsencrypt
configure_apache_for_https
check_https
install_hubzilla
rewrite_to_https
install_rsnapshot
configure_cron_daily
install_cryptosetup
write_uninstall_script
#set +x # stop debugging from here

View File

@@ -0,0 +1,144 @@
##
# Hubzilla/Zap/Mistpark/Osada Nginx block configuration template
# based on the example created by Olaf Conradi
#
# The files generated with this template will be added to
# /etc/nginx/sites-available & /etc/nginx/sites-enabled (symlink)
##
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
#
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
##
##
# This configuration assumes
# You filled the zotserver-config.txt file
# Your domain/subdomain is functionnal
# You want all traffic to be https
# You have PHP FastCGI Process Manager (php-fpm) running on localhost
##
server {
listen 80;
server_name SERVER_NAME;
# HTTP > HTTPS #
return 301 https://$server_name$request_uri;
}
##
# Configure Red with SSL
#
# All requests are routed to the front controller
# except for certain known file types like images, css, etc.
# Those are served statically whenever possible with a
# fall back to the front controller (needed for avatars, for example)
##
server {
listen 443 ssl;
server_name SERVER_NAME;
ssl on;
ssl_certificate /etc/letsencrypt/live/SERVER_NAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/SERVER_NAME/privkey.pem;
ssl_session_timeout 5m;
# DO WE NEED TO REVIEW THE FOLLOWING SETTINGS?
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
ssl_prefer_server_ciphers on;
fastcgi_param HTTPS on;
charset utf-8;
root INSTALL_PATH;
index index.php;
access_log /var/log/nginx/ZOTSERVER_LOG;
#Uncomment the following line to include a standard configuration file
#Note that the most specific rule wins and your standard configuration
#will therefore *add* to this file, but not override it.
#include standard.conf
# allow uploads up to 20MB in size
client_max_body_size 20m;
client_body_buffer_size 128k;
include mime.types;
# rewrite to front controller as default rule
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?req=$1;
}
}
# make sure webfinger and other well known services aren't blocked
# by denying dot files and rewrite request to the front controller
location ^~ /.well-known/ {
allow all;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?req=$1;
}
}
# statically serve these file types when possible
# otherwise fall back to front controller
# allow browser to cache them
# added .htm for advanced source code editor library
# location ~* \.(jpg|jpeg|gif|png|ico|css|js|htm|html|map|ttf|woff|woff2|svg)$ {
# expires 30d;
# try_files $uri /index.php?req=$uri&$args;
# }
# SHOULD WE UNCOMMENT THE ABOVE LINES ?
# block these file types
location ~* \.(tpl|md|tgz|log|out)$ {
deny all;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
# or a unix socket
location ~* \.php$ {
# IS THE FOLLOWING STILL RELEVANT AS OF AUGUST 2020?
# Zero-day exploit defense.
# http://forum.nginx.org/read.php?2,88845,page=3
# Won't work properly (404 error) if the file is not stored on this
# server, which is entirely possible with php-fpm/php-fcgi.
# Comment the 'try_files' line out if you set up php-fpm/php-fcgi on
# another machine. And then cross your fingers that you won't get hacked.
try_files $uri =404;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# With php-fpm:
fastcgi_pass unix:PHP_FPM_SOCK;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# deny access to all dot files
location ~ /\. {
deny all;
}
#deny access to store
location ~ /store {
deny all;
}
}

View File

@@ -0,0 +1,178 @@
###############################################
### MANDATORY - database password #############
#
# Please give your database password
# It is better to not use blanks inside the password.
# Example: db_pass=pass_word_with_no_blanks_in_it
db_pass=
###############################################
### MANDATORY - let's encrypt #################
#
# Zot requires encrypted communication via secure HTTP (HTTPS).
# This script automates installation of an SSL certificate from
# Let's Encrypt (https://letsencrypt.org)
#
# Please give the domain name of your hub/instance
#
# Example: my.cooldomain.org
# Example: cooldomain.org
#
# You might use "localhost" for a LOCAL TEST installation.
# This is usefull if you want to debug the server inside a VM.
#
# Example: localhost
#
# Email is optional if you use "localhost".
#
#
le_domain=
le_email=
###############################################
### OPTIONAL - Webserver choice ###############
#
# Please indicate if you want to choose Nginx
# or Apache as your web server
#
# Valid strings are nginx or apache (lower case),
# any other will stop the setup script.
#
webserver=apache
###############################################
### OPTIONAL - selfHOST - dynamic IP address ##
#
# 1. Register a domain at selfhost.de
# - choose offer "DOMAIN dynamisch" 1,50€/mon at 04/2019
# 2. Get your configuration for dynamic IP update
# - Log in at selfhost.de
# - go to "DynDNS Accounte"
# - klick "Details" of your (freshly) registered domain
# - You will find the configuration there
# - Benutzername (user name) > use this for "selfhost_user="
# - Passwort (pass word) > use this for "selfhost_pass="
#
#
selfhost_user=
selfhost_pass=
###############################################
### OPTIONAL - FreeDNS - dynamic IP address ###
#
# Please give the alpha-numeric-key of freedns
#
# Get a free subdomain from freedns and use it for your dynamic ip address
# Documentation under http://www.techjawab.com/2013/06/setup-dynamic-dns-dyndns-for-free-on.html
#
# - Register for a Free domain at http://freedns.afraid.org/signup/
# - WATCH THIS: Make sure you choose a domain with as less subdomains as
# possible. Why? Let's encrpyt issues a limited count of certificates each
# day. Possible other users of this domain will try to issue a certificate
# at the same day.
# - Logon to FreeDNS (where you just registered)
# - Goto http://freedns.afraid.org/dynamic/
# - Right click on "Direct Link" and copy the URL and paste it somewhere.
# - You should notice a large and unique alpha-numeric key in the URL
#
# http://freedns.afraid.org/dynamic/update.php?alpha-numeric-key
#
# Provided your url from freedns is
#
# http://freedns.afraid.org/dynamic/update.php?U1Z6aGt2R0NzMFNPNWRjbWxxZGpsd093OjE1Mzg5NDE5
#
# Then you have to provide
#
# freedns_key=U1Z6aGt2R0NzMFNPNWRjbWxxZGpsd093OjE1Mzg5NDE5
#
#
freedns_key=
###############################################
### OPTIONAL - Backup to external device ######
#
# The script can use an external device for the daily backup.
# The file system of the device (USB stick for example) must be compatible with
#
# - encrypted LUKS + ext4, or
# - ext4
#
# You should test to mount the device before you run the script
# (hubzilla-setup.sh).
# How to find your (pluged-in) devices?
#
# fdisk -l
#
# Provided your device was listed as is /dev/sdb1. You could check with:
#
# blkid | grep /dev/sdb1
#
# Try to decrypt
# (You might install cryptsetup befor using apt-get install.
#
# apt-get install cryptsetup
# cryptsetup luksOpen /dev/sdb1 cryptobackup
#
# Try to mount
# You might create the directory /media/hubzilla_backup it it does not exist
# using mkdir.
#
# mkdir /media/hubzilla_backup
# mount /dev/mapper/cryptobackup /media/hubzilla_backup
#
# Unmounting device goes like this
#
# umount /media/hubzilla_backup
# cryptsetup luksClose cryptobackup
#
# To check if still mounted
#
# lsof /media/hubzilla_backup
#
# If you leave the following parameters
#
# - "backup_device_name" and
# - "backup_device_pass"
#
# empty the script will create daily backups on the internal disk (which could
# save you as well).
#
# Example: backup_device_name=/dev/sdc1
#
# Leave "backup_device_pass=" empty if the external device is not encrypted.
#
backup_device_name=
backup_device_pass=
###############################################
### OPTIONAL - do not mess with things below ##
# (...if you are not certain)
#
# Usually you are done here
# Everything below is OPTIONAL
#
###############################################
#
# Database for your hub/instance
# If left empty, both your database and user will be named after your zot instance (hubzilla, zap or misty)
# Use custom name, at least fo the database, if you plan to run more than one hub/instance on the same server
#
zotserver_db_name=
zotserver_db_user=
zotserver_db_pass=$db_pass
#
#
# Password for package mysql-server
# Example: mysqlpass=aberhallo
# Example: mysqlpass="aber hallo has blanks in it"
#
mysqlpass=$db_pass
# Password for package phpmyadmin
# Example: phpmyadminpass=aberhallo
# Example: phpmyadminpass="aber hallo has blanks in it"
phpmyadminpass=$db_pass

View File

@@ -0,0 +1,793 @@
#!/bin/bash
#
# How to use
# ----------
#
# This file automates the installation of
# - hubzilla: https://zotlabs.org/page/hubzilla/hubzilla-project and
# - zap: https://zotlabs.com/zap/
# - misty : https://zotlabs.com/misty/
# - osada : https://codeberg.org/zot/osada
# - redmatrix : https://codeberg.org/zot/redmatrix
# under Debian Linux "Buster"
#
# 1) Copy the file "zotserver-config.txt.template" to "zotserver-config.txt"
# Follow the instuctions there
#
# 2) Switch to user "root" by typing "su -"
#
# 3) Run with "./zotserver-setup.sh"
# If this fails check if you can execute the script.
# - To make it executable type "chmod +x zotserver-setup.sh"
# - or run "bash zotserver-setup.sh"
#
#
# What does this script do basically?
# -----------------------------------
#
# This file automates the installation of a Zot hub/instance under Debian Linux
# - install
# * apache webserver,
# * php,
# * mariadb - the database for zotserver,
# * adminer,
# * git to download and update addons
# - configure cron
# * "Run.php" for regular background processes of your Zot hub/instance
# * "apt-get update" and "apt-get dist-upgrade" and "apt-get autoremove" to keep linux up-to-date
# * run command to keep the IP up-to-date > DynDNS provided by selfHOST.de or freedns.afraid.org
# * backup your server's database and files (rsync)
# - run letsencrypt to create, register and use a certifacte for https
#
#
# Discussion
# ----------
#
# Security - password is the same for mysql-server, phpmyadmin and your hub/instance db
# - The script runs into installation errors for phpmyadmin if it uses
# different passwords. For the sake of simplicity one single password.
#
# How to restore from backup
# --------------------------
#
# (Some explanations here would certainly be useful)
#
# Daily backup
# ------------
#
# The installation
# - writes a shell script in /var/www/
# - creates a daily cron that runs this script
#
# The script makes a (daily) backup of all relevant files
# - /var/lib/mysql/ > database
# - /var/www/ > hubzilla/zap/misty from git repository
# - /etc/letsencrypt/ > certificates
#
# The backup will be written on an external disk compatible to LUKS+ext4 (see zotserver-config.txt)
#
# How to restore from backup
# --------------------------
#
# (Some explanations here would certainly be useful)
#
#
# Credits
# -------
#
# The script is based on Thomas Willinghams script "debian-setup.sh"
# which he used to install the red#matrix.
#
# The documentation for bash is here
# https://www.gnu.org/software/bash/manual/bash.html
#
function check_sanity {
# Do some sanity checking.
print_info "Sanity check..."
if [ $(/usr/bin/id -u) != "0" ]
then
die 'Must be run by root user'
fi
if [ -f /etc/lsb-release ]
then
die "Distribution is not supported"
fi
if [ ! -f /etc/debian_version ]
then
die "Debian is supported only"
fi
if ! grep -q 'Linux 10' /etc/issue
then
die "Linux 10 (buster) is supported only"x
fi
}
function check_config {
print_info "config check..."
# Check for required parameters
if [ -z "$db_pass" ]
then
die "db_pass not set in $configfile"
fi
if [ -z "$le_domain" ]
then
die "le_domain not set in $configfile"
fi
# backup is important and should be checked
if [ -n "$backup_device_name" ]
then
if [ ! -d "$backup_mount_point" ]
then
mkdir "$backup_mount_point"
fi
device_mounted=0
if fdisk -l | grep -i "$backup_device_name.*linux"
then
print_info "ok - filesystem of external device is linux"
if [ -n "$backup_device_pass" ]
then
echo "$backup_device_pass" | cryptsetup luksOpen $backup_device_name cryptobackup
if mount /dev/mapper/cryptobackup /media/zotserver_backup
then
device_mounted=1
print_info "ok - could encrypt and mount external backup device"
umount /media/zotserver_backup
else
print_warn "backup to external device will fail because encryption failed"
fi
cryptsetup luksClose cryptobackup
else
if mount $backup_device_name /media/zotserver_backup
then
device_mounted=1
print_info "ok - could mount external backup device"
umount /media/zotserver_backup
else
print_warn "backup to external device will fail because mount failed"
fi
fi
else
print_warn "backup to external device will fail because filesystem is either not linux or 'backup_device_name' is not correct in $configfile"
fi
if [ $device_mounted == 0 ]
then
die "backup device not ready"
fi
fi
}
function die {
echo "ERROR: $1" > /dev/null 1>&2
exit 1
}
function update_upgrade {
print_info "updated and upgrade..."
# Run through the apt-get update/upgrade first. This should be done before
# we try to install any package
apt-get -q -y update && apt-get -q -y dist-upgrade
print_info "updated and upgraded linux"
}
function check_install {
if [ -z "`which "$1" 2>/dev/null`" ]
then
# export DEBIAN_FRONTEND=noninteractive ... answers from the package
# configuration database
# - q ... without progress information
# - y ... answer interactive questions with "yes"
# DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install $2
DEBIAN_FRONTEND=noninteractive apt-get -q -y install $2
print_info "installed $2 installed for $1"
else
print_warn "$2 already installed"
fi
}
function nocheck_install {
# export DEBIAN_FRONTEND=noninteractive ... answers from the package configuration database
# - q ... without progress information
# - y ... answer interactive questions with "yes"
# DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install $2
# DEBIAN_FRONTEND=noninteractive apt-get --install-suggests -q -y install $1
DEBIAN_FRONTEND=noninteractive apt-get -q -y install $1
print_info "installed $1"
}
function print_info {
echo -n -e '\e[1;34m'
echo -n $1
echo -e '\e[0m'
}
function print_warn {
echo -n -e '\e[1;31m'
echo -n $1
echo -e '\e[0m'
}
function stop_zotserver {
if [ $webserver = "nginx" ]
then
print_info "stopping nginx webserver..."
systemctl stop nginx
elif [ $webserver = "apache" ]
then
print_info "stopping apache webserver..."
systemctl stop apache2
fi
print_info "stopping mysql db..."
systemctl stop mariadb
}
function install_apache {
print_info "installing apache..."
nocheck_install "apache2 apache2-utils"
a2enmod rewrite
systemctl restart apache2
}
function install_nginx {
print_info "installing nginx..."
nocheck_install "nginx"
systemctl restart nginx
}
function add_vhost {
print_info "adding apache vhost"
echo "<VirtualHost *:80>" >> "/etc/apache2/sites-available/${le_domain}.conf"
echo "ServerName ${le_domain}" >> "/etc/apache2/sites-available/${le_domain}.conf"
echo "DocumentRoot $install_path" >> "/etc/apache2/sites-available/${le_domain}.conf"
echo "</VirtualHost>" >> "/etc/apache2/sites-available/${le_domain}.conf"
a2ensite $le_domain
}
function add_nginx_block {
print_info "adding nginx block"
sed "s|SERVER_NAME|${le_domain}|g;s|INSTALL_PATH|${install_path}|g;s|ZOTSERVER_LOG|${install_folder}-${zotserver}.log|;s|PHP_FPM_SOCK|$(ls /var/run/php/*sock)|;" nginx-zotserver.conf.template >> /etc/nginx/sites-enabled/${le_domain}.conf
ln -s /etc/nginx/sites-enabled/${le_domain}.conf /etc/nginx/sites-available/
}
function install_imagemagick {
print_info "installing imagemagick..."
nocheck_install "imagemagick"
}
function install_curl {
print_info "installing curl..."
nocheck_install "curl"
}
function install_wget {
print_info "installing wget..."
nocheck_install "wget"
}
function install_sendmail {
print_info "installing sendmail..."
nocheck_install "sendmail sendmail-bin"
}
function install_php {
# openssl and mbstring are included in libapache2-mod-php
print_info "installing php..."
if [ $webserver = "nginx" ]
then
nocheck_install "php php-pear php-curl php-gd php-mbstring php-xml php-zip php-fpm"
sed -i "s/^upload_max_filesize =.*/upload_max_filesize = 100M/g" /etc/php/7.3/fpm/php.ini
sed -i "s/^post_max_size =.*/post_max_size = 100M/g" /etc/php/7.3/fpm/php.ini
systemctl reload php7.3-fpm
elif [ $webserver = "apache" ]
then
nocheck_install "libapache2-mod-php php php-pear php-curl php-gd php-mbstring php-xml php-zip"
sed -i "s/^upload_max_filesize =.*/upload_max_filesize = 100M/g" /etc/php/7.3/apache2/php.ini
sed -i "s/^post_max_size =.*/post_max_size = 100M/g" /etc/php/7.3/apache2/php.ini
fi
}
function install_mysql {
print_info "installing mysql..."
if [ -z "$mysqlpass" ]
then
die "mysqlpass not set in $configfile"
fi
if type mysql ; then
echo "Yes, mysql is installed"
else
echo "mariadb-server"
nocheck_install "mariadb-server"
systemctl status mariadb
systemctl start mariadb
mysql --user=root <<_EOF_
UPDATE mysql.user SET Password=PASSWORD('${mysqlpass}') WHERE User='root';
DELETE FROM mysql.user WHERE User='';
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
FLUSH PRIVILEGES;
_EOF_
fi
}
function install_adminer {
print_info "installing adminer..."
nocheck_install "adminer"
if [ ! -f /etc/adminer/adminer.conf ]
then
echo "Alias /adminer /usr/share/adminer/adminer" > /etc/adminer/adminer.conf
ln -s /etc/adminer/adminer.conf /etc/apache2/conf-available/adminer.conf
else
print_info "file /etc/adminer/adminer.conf exists already"
fi
a2enmod rewrite
if [ ! -f /etc/apache2/apache2.conf ]
then
die "could not find file /etc/apache2/apache2.conf"
fi
sed -i \
"s/AllowOverride None/AllowOverride all/" \
/etc/apache2/apache2.conf
a2enconf adminer
systemctl restart mariadb
systemctl reload apache2
}
function create_zotserver_db {
print_info "creating zotserver database..."
if [ -z "$zotserver_db_name" ]
then
zotserver_db_name=$zotserver
fi
if [ -z "$zotserver_db_user" ]
then
zotserver_db_user=$zotserver
fi
if [ -z "$zotserver_db_pass" ]
then
die "zotserver_db_pass not set in $configfile"
fi
systemctl restart mariadb
# Make sure we don't write over an already existing database if we install more than one Zot hub/instance
if [ -z $(mysql -h localhost -u root -p$mysqlpass -e "SHOW DATABASES;" | grep $zotserver_db_name) ]
then
Q1="CREATE DATABASE IF NOT EXISTS $zotserver_db_name;"
Q2="GRANT USAGE ON *.* TO $zotserver_db_user@localhost IDENTIFIED BY '$zotserver_db_pass';"
Q3="GRANT ALL PRIVILEGES ON $zotserver_db_name.* to $zotserver_db_user@localhost identified by '$zotserver_db_pass';"
Q4="FLUSH PRIVILEGES;"
SQL="${Q1}${Q2}${Q3}${Q4}"
mysql -uroot -p$mysqlpass -e "$SQL"
else
die "Can't write over an already existing database!"
fi
}
function run_freedns {
print_info "run freedns (dynamic IP)..."
if [ -z "$freedns_key" ]
then
print_info "freedns was not started because 'freedns_key' is empty in $configfile"
else
if [ -n "$selfhost_user" ]
then
die "You can not use freeDNS AND selfHOST for dynamic IP updates ('freedns_key' AND 'selfhost_user' set in $configfile)"
fi
wget --no-check-certificate -O - http://freedns.afraid.org/dynamic/update.php?$freedns_key
fi
}
function install_run_selfhost {
print_info "install and start selfhost (dynamic IP)..."
if [ -z "$selfhost_user" ]
then
print_info "selfHOST was not started because 'selfhost_user' is empty in $configfile"
else
if [ -n "$freedns_key" ]
then
die "You can not use freeDNS AND selfHOST for dynamic IP updates ('freedns_key' AND 'selfhost_user' set in $configfile)"
fi
if [ -z "$selfhost_pass" ]
then
die "selfHOST was not started because 'selfhost_pass' is empty in $configfile"
fi
if [ ! -d $selfhostdir ]
then
mkdir $selfhostdir
fi
# the old way
# https://carol.selfhost.de/update?username=123456&password=supersafe
#
# the prefered way
wget --output-document=$selfhostdir/$selfhostscript http://jonaspasche.de/selfhost-updater
echo "router" > $selfhostdir/device
echo "$selfhost_user" > $selfhostdir/user
echo "$selfhost_pass" > $selfhostdir/pass
bash $selfhostdir/$selfhostscript update
fi
}
function ping_domain {
print_info "ping domain $domain..."
# Is the domain resolved? Try to ping 6 times à 10 seconds
COUNTER=0
for i in {1..6}
do
print_info "loop $i for ping -c 1 $domain ..."
if ping -c 4 -W 1 $le_domain
then
print_info "$le_domain resolved"
break
else
if [ $i -gt 5 ]
then
die "Failed to: ping -c 1 $domain not resolved"
fi
fi
sleep 10
done
sleep 5
}
function configure_cron_freedns {
print_info "configure cron for freedns..."
if [ -z "$freedns_key" ]
then
print_info "freedns is not configured because freedns_key is empty in $configfile"
else
# Use cron for dynamich ip update
# - at reboot
# - every 30 minutes
if [ -z "`grep 'freedns.afraid.org' /etc/crontab`" ]
then
echo "@reboot root http://freedns.afraid.org/dynamic/update.php?$freedns_key > /dev/null 2>&1" >> /etc/crontab
echo "*/30 * * * * root wget --no-check-certificate -O - http://freedns.afraid.org/dynamic/update.php?$freedns_key > /dev/null 2>&1" >> /etc/crontab
else
print_info "cron for freedns was configured already"
fi
fi
}
function configure_cron_selfhost {
print_info "configure cron for selfhost..."
if [ -z "$selfhost_user" ]
then
print_info "selfhost is not configured because selfhost_key is empty in $configfile"
else
# Use cron for dynamich ip update
# - at reboot
# - every 5 minutes
if [ -z "`grep 'selfhost-updater.sh' /etc/crontab`" ]
then
echo "@reboot root bash /etc/selfhost/selfhost-updater.sh update > /dev/null 2>&1" >> /etc/crontab
echo "*/5 * * * * root /bin/bash /etc/selfhost/selfhost-updater.sh update > /dev/null 2>&1" >> /etc/crontab
else
print_info "cron for selfhost was configured already"
fi
fi
}
function install_letsencrypt {
print_info "installing let's encrypt ..."
# check if user gave domain
if [ -z "$le_domain" ]
then
die "Failed to install let's encrypt: 'le_domain' is empty in $configfile"
fi
if [ -z "$le_email" ]
then
die "Failed to install let's encrypt: 'le_email' is empty in $configfile"
fi
if [ $webserver = "nginx" ]
then
nocheck_install "certbot"
print_info "run certbot..."
systemctl stop nginx
certbot certonly --standalone -d $le_domain -m $le_email --agree-tos --non-interactive
systemctl start nginx
elif [ $webserver = "apache" ]
then
nocheck_install "certbot python-certbot-apache"
print_info "run certbot ..."
certbot --apache -w $install_path -d $le_domain -m $le_email --agree-tos --non-interactive --redirect --hsts --uir
service apache2 restart
fi
}
function check_https {
print_info "checking httpS > testing ..."
url_https=https://$le_domain
wget_output=$(wget -nv --spider --max-redirect 0 $url_https)
if [ $? -ne 0 ]
then
print_warn "check not ok"
else
print_info "check ok"
fi
}
function zotserver_name {
if git remote -v | grep -i "origin.*hubzilla.*"
then
zotserver=hubzilla
elif git remote -v | grep -i "origin.*zap.*"
then
zotserver=zap
elif git remote -v | grep -i "origin.*misty.*"
then
zotserver=misty
elif git remote -v | grep -i "origin.*osada.*"
then
zotserver=osada
elif git remote -v | grep -i "origin.*redmatrix.*"
then
zotserver=redmatrix
else
die "neither redmatrix, osada, misty, zap nor hubzilla repository > did not install redmatrix/osada/misty/zap/hubzilla"
fi
}
function install_zotserver {
print_info "installing addons..."
cd $install_path/
if [ $zotserver = "hubzilla" ]
then
print_info "hubzilla"
util/add_addon_repo https://framagit.org/hubzilla/addons hzaddons
elif [ $zotserver = "zap" ]
then
print_info "zap"
util/add_addon_repo https://codeberg.org/zot/zap-addons.git zaddons
elif [ $zotserver = "misty" ]
then
print_info "misty"
util/add_addon_repo https://codeberg.org/zot/misty-addons.git maddons
elif [ $zotserver = "osada" ]
then
print_info "osada"
util/add_addon_repo https://codeberg.org/zot/osada-addons.git oaddons
elif [ $zotserver = "redmatrix" ]
then
print_info "redmatrix"
util/add_addon_repo https://codeberg.org/zot/redmatrix-addons.git raddons
else
die "neither redmatrix, osada, misty, zap nor hubzilla repository > did not install addons or redmatrix/osada/misty/zap/hubzilla"
fi
mkdir -p "cache/smarty3"
mkdir -p "store"
chmod -R 777 store
touch .htconfig.php
chmod ou+w .htconfig.php
cd /var/www/
chown -R www-data:www-data $install_path
chown root:www-data $install_path/
chown root:www-data $install_path/.htaccess
chmod 0644 $install_path/.htaccess
print_info "installed addons"
}
function install_rsync {
print_info "installing rsync..."
nocheck_install "rsync"
}
function install_cryptosetup {
print_info "installing cryptsetup..."
nocheck_install "cryptsetup"
}
function configure_zotserverdaily {
echo "#!/bin/sh" >> /var/www/$zotserverdaily
echo "#" >> /var/www/$zotserverdaily
echo "# update of $le_domain Zot hub/instance" >> /var/www/$zotserverdaily
echo "echo \"\$(date) - updating core and addons...\"" >> /var/www/$zotserverdaily
echo "echo \"reaching git repository for $le_domain $zotserver hub/instance...\"" >> /var/www/$zotserverdaily
echo "(cd $install_path ; util/udall)" >> /var/www/$zotserverdaily
echo "chown -R www-data:www-data $install_path # make all accessible for the webserver" >> /var/www/$zotserverdaily
if [ $webserver = "apache" ]
then
echo "chown root:www-data $install_path/.htaccess" >> /var/www/$zotserverdaily
echo "chmod 0644 $install_path/.htaccess # www-data can read but not write it" >> /var/www/$zotserverdaily
fi
chmod a+x /var/www/$zotserverdaily
}
function configure_cron_daily {
print_info "configuring cron..."
# every 10 min for poller.php
if [ -z "`grep '$install_path.*Run.php' /etc/crontab`" ]
then
echo "*/10 * * * * www-data cd $install_path; php Zotlabs/Daemon/Run.php Cron >> /dev/null 2>&1" >> /etc/crontab
fi
# Run external script daily at 05:30
# - stop apache/nginx and mysql-server
# - renew the certificate of letsencrypt
# - backup db, files ($install_path), certificates if letsencrypt
# - update zotserver core and addon
# - update and upgrade linux
# - reboot is done by "shutdown -h now" because "reboot" hangs sometimes depending on the system
echo "#!/bin/sh" > /var/www/$zotcron
echo "#" >> /var/www/$zotcron
echo "echo \" \"" >> /var/www/$zotcron
echo "echo \"+++ \$(date) +++\"" >> /var/www/$zotcron
echo "echo \" \"" >> /var/www/$zotcron
echo "echo \"\$(date) - stopping $webserver and mysql...\"" >> /var/www/$zotcron
if [ $webserver = "nginx" ]
then
echo "systemctl stop nginx" >> /var/www/$zotcron
elif [ $webserver = "apache" ]
then
echo "service apache2 stop" >> /var/www/$zotcron
fi
echo "/etc/init.d/mysql stop # to avoid inconsistencies" >> /var/www/$zotcron
echo "#" >> /var/www/$zotcron
echo "echo \"\$(date) - renew certificate...\"" >> /var/www/$zotcron
echo "certbot renew --noninteractive" >> /var/www/$zotcron
echo "#" >> /var/www/$zotcron
echo "# backup" >> /var/www/$zotcron
echo "echo \"\$(date) - try to mount external device for backup...\"" >> /var/www/$zotcron
echo "backup_device_name=$backup_device_name" >> /var/www/$zotcron
echo "backup_device_pass=$backup_device_pass" >> /var/www/$zotcron
echo "backup_mount_point=$backup_mount_point" >> /var/www/$zotcron
echo "device_mounted=0" >> /var/www/$zotcron
echo "if [ -n \"\$backup_device_name\" ]" >> /var/www/$zotcron
echo "then" >> /var/www/$zotcron
echo " if blkid | grep $backup_device_name" >> /var/www/$zotcron
echo " then" >> /var/www/$zotcron
if [ -n "$backup_device_pass" ]
then
echo " echo \"decrypting backup device...\"" >> /var/www/$zotcron
echo " echo "\"$backup_device_pass\"" | cryptsetup luksOpen $backup_device_name cryptobackup" >> /var/www/$zotcron
fi
echo " if [ ! -d $backup_mount_point ]" >> /var/www/$zotcron
echo " then" >> /var/www/$zotcron
echo " mkdir $backup_mount_point" >> /var/www/$zotcron
echo " fi" >> /var/www/$zotcron
echo " echo \"mounting backup device...\"" >> /var/www/$zotcron
if [ -n "$backup_device_pass" ]
then
echo " if mount /dev/mapper/cryptobackup $backup_mount_point" >> /var/www/$zotcron
else
echo " if mount $backup_device_name $backup_mount_point" >> /var/www/$zotcron
fi
echo " then" >> /var/www/$zotcron
echo " device_mounted=1" >> /var/www/$zotcron
echo " echo \"device $backup_device_name is now mounted. Starting backup...\"" >> /var/www/$zotcron
echo " rsync -a --delete /var/lib/mysql/ /media/zotserver_backup/mysql" >> /var/www/$zotcron
echo " rsync -a --delete /var/www/ /media/zotserver_backup/www" >> /var/www/$zotcron
echo " rsync -a --delete /etc/letsencrypt/ /media/zotserver_backup/letsencrypt" >> /var/www/$zotcron
echo " echo \"\$(date) - disk sizes...\"" >> /var/www/$zotcron
echo " df -h" >> /var/www/$zotcron
echo " echo \"\$(date) - db size...\"" >> /var/www/$zotcron
echo " du -h $backup_mount_point | grep mysql/zotserver" >> /var/www/$zotcron
echo " echo \"unmounting backup device...\"" >> /var/www/$zotcron
echo " umount $backup_mount_point" >> /var/www/$zotcron
echo " else" >> /var/www/$zotcron
echo " echo \"failed to mount device $backup_device_name\"" >> /var/www/$zotcron
echo " fi" >> /var/www/$zotcron
if [ -n "$backup_device_pass" ]
then
echo " echo \"closing decrypted backup device...\"" >> /var/www/$zotcron
echo " cryptsetup luksClose cryptobackup" >> /var/www/$zotcron
fi
echo " fi" >> /var/www/$zotcron
echo "fi" >> /var/www/$zotcron
echo "if [ \$device_mounted == 0 ]" >> /var/www/$zotcron
echo "then" >> /var/www/$zotcron
echo " echo \"device could not be mounted $backup_device_name. No backup written.\"" >> /var/www/$zotcron
echo "fi" >> /var/www/$zotcron
echo "#" >> /var/www/$zotcron
echo "echo \"\$(date) - db size...\"" >> /var/www/$zotcron
echo "du -h /var/lib/mysql/ | grep mysql/" >> /var/www/$zotcron
echo "#" >> /var/www/$zotcron
echo "cd /var/www" >> /var/www/$zotcron
echo "for f in *-daily.sh; do \"./\${f}\"; done" >> /var/www/$zotcron
echo "echo \"\$(date) - updating linux...\"" >> /var/www/$zotcron
echo "apt-get -q -y update && apt-get -q -y dist-upgrade && apt-get -q -y autoremove # update linux and upgrade" >> /var/www/$zotcron
echo "echo \"\$(date) - Backup and update finished. Rebooting...\"" >> /var/www/$zotcron
echo "#" >> /var/www/$zotcron
echo "shutdown -r now" >> /var/www/$zotcron
# If global cron job does not exist we add it to /etc/crontab
if grep -q $zotcron /etc/crontab
then
echo "cron job already in /etc/crontab"
else
echo "30 05 * * * root /bin/bash /var/www/$zotcron >> /var/www/zot-daily.log 2>&1" >> /etc/crontab
echo "0 0 1 * * root rm /var/www/zot-daily.log" >> /etc/crontab
fi
# This is active after either "reboot" or cron reload"
systemctl restart cron
print_info "configured cron for updates/upgrades"
}
########################################################################
# START OF PROGRAM
########################################################################
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
check_sanity
zotserver_name
print_info "We're installing a $zotserver instance"
install_path="$(dirname "$(pwd)")"
install_folder="$(basename $install_path)"
# Read config file edited by user
configfile=zotserver-config.txt
source $configfile
selfhostdir=/etc/selfhost
selfhostscript=selfhost-updater.sh
zotcron="zotcron.sh"
zotserverdaily="${install_folder}-${zotserver}-daily.sh"
backup_mount_point="/media/zotserver_backup"
#set -x # activate debugging from here
check_config
stop_zotserver
update_upgrade
install_curl
install_wget
install_sendmail
if [ $webserver = "nginx" ]
then
install_nginx
elif [ $webserver = "apache" ]
then
install_apache
else
die "Failed to install a Web server: 'webserver' not set to \"apache\" or \"nginx\" in $configfile"
fi
install_imagemagick
install_php
if [ $webserver = "nginx" ]
then
add_nginx_block
elif [ $webserver = "apache" ]
then
if [ "$install_path" != "/var/www/html" ]
then
add_vhost
fi
fi
install_mysql
if [ $webserver = "apache" ]
then
install_adminer
fi
create_zotserver_db
run_freedns
install_run_selfhost
ping_domain
configure_cron_freedns
configure_cron_selfhost
if [ "$le_domain" != "localhost" ]
then
install_letsencrypt
check_https
else
print_info "is localhost - skipped installation of letsencrypt and configuration of apache for https"
fi
install_zotserver
configure_zotserverdaily
configure_cron_daily
if [ "$le_domain" != "localhost" ]
then
install_cryptosetup
install_rsync
else
print_info "is localhost - skipped installation of cryptosetup"
fi
#set +x # stop debugging from here

0
.openshift/action_hooks/deploy Executable file → Normal file
View File

0
.openshift/cron/weekly/chronograph Executable file → Normal file
View File

913
CHANGELOG

File diff suppressed because it is too large Load Diff

11
LICENSE
View File

@@ -1,4 +1,5 @@
Copyright (c) 2010-2018 the Hubzilla Community
Copyright (c) 2019 Hubzilla Community
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -8,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

33
SBOM.md Normal file
View File

@@ -0,0 +1,33 @@
# Hubzilla Software Bill of Materials - WIP
|Name|Version|License|Source|
|----|-------|-------|------|
|blueimp/jquery-file-upload|10.31.0.0|MIT|https://github.com/vkhramtsov/jQuery-File-Upload.git|
|brick/math|0.9.2.0|MIT|https://github.com/brick/math.git|
|bshaffer/oauth2-server-php|1.11.1.0|MIT|https://github.com/bshaffer/oauth2-server-php.git|
|commerceguys/intl|1.0.7.0|MIT|https://github.com/commerceguys/intl.git|
|desandro/imagesloaded|4.1.4.0|MIT|https://github.com/desandro/imagesloaded.git|
|ezyang/htmlpurifier|4.13.0.0|LGPL-2.1-or-later|https://github.com/ezyang/htmlpurifier.git|
|league/html-to-markdown|4.10.0.0|MIT|https://github.com/thephpleague/html-to-markdown.git|
|lukasreschke/id3parser|0.0.3.0|GPL|https://github.com/LukasReschke/ID3Parser.git|
|michelf/php-markdown|1.9.0.0|BSD-3-Clause|https://github.com/michelf/php-markdown.git|
|pear/text_languagedetect|1.0.1.0|BSD-2-Clause|https://github.com/pear/Text_LanguageDetect.git|
|phpseclib/phpseclib|2.0.30.0|MIT|https://github.com/phpseclib/phpseclib.git|
|psr/log|1.1.3.0|MIT|https://github.com/php-fig/log.git|
|ramsey/collection|1.1.3.0|MIT|https://github.com/ramsey/collection.git|
|ramsey/uuid|4.1.1.0|MIT|https://github.com/ramsey/uuid.git|
|sabre/dav|4.1.5.0|BSD-3-Clause|https://github.com/sabre-io/dav.git|
|sabre/event|5.1.2.0|BSD-3-Clause|https://github.com/sabre-io/event.git|
|sabre/http|5.1.1.0|BSD-3-Clause|https://github.com/sabre-io/http.git|
|sabre/uri|2.2.1.0|BSD-3-Clause|https://github.com/sabre-io/uri.git|
|sabre/vobject|4.3.5.0|BSD-3-Clause|https://github.com/sabre-io/vobject.git|
|sabre/xml|2.2.3.0|BSD-3-Clause|https://github.com/sabre-io/xml.git|
|simplepie/simplepie|1.5.6.0|BSD-3-Clause|https://github.com/simplepie/simplepie.git|
|smarty/smarty|3.1.38.0|LGPL-3.0|https://github.com/smarty-php/smarty.git|
|symfony/polyfill-ctype|1.22.0.0|MIT|https://github.com/symfony/polyfill-ctype.git|
|twbs/bootstrap|4.6.0.0|MIT|https://github.com/twbs/bootstrap.git|
|fullcalendar/fullcalendar|4.4.2.0|MIT|https://github.com/fullcalendar/fullcalendar.git|
|miromannino/Justified-Gallery|3.8.1.0|MIT|https://github.com/miromannino/Justified-Gallery.git|
|fengyuanchen/cropperjs|1.5.7.0|MIT|https://github.com/fengyuanchen/cropperjs.git|
|ForkAwesome/Fork-Awesome|1.1.7.0|MIT,SIL OFL,CC BY 3.0|https://github.com/ForkAwesome/Fork-Awesome.git|
|jquery/jquery|3.5.1.0|MIT|https://github.com/jquery/jquery.git|

View File

@@ -54,7 +54,7 @@ class AccessList {
* * \e string \b channel_deny_gid => string of denied gids
*/
function __construct($channel) {
if($channel) {
if ($channel) {
$this->allow_cid = $channel['channel_allow_cid'];
$this->allow_gid = $channel['channel_allow_gid'];
$this->deny_cid = $channel['channel_deny_cid'];
@@ -99,7 +99,6 @@ class AccessList {
$this->allow_gid = $arr['allow_gid'];
$this->deny_cid = $arr['deny_cid'];
$this->deny_gid = $arr['deny_gid'];
$this->explicit = $explicit;
}

View File

@@ -2,6 +2,7 @@
namespace Zotlabs\Access;
use App;
use Zotlabs\Lib\PConfig;
/**
@@ -39,10 +40,10 @@ class PermissionLimits {
*/
static public function Std_Limits() {
$limits = [];
$perms = Permissions::Perms();
$perms = Permissions::Perms();
foreach($perms as $k => $v) {
if(strstr($k, 'view'))
foreach ($perms as $k => $v) {
if (strstr($k, 'view'))
$limits[$k] = PERMS_PUBLIC;
else
$limits[$k] = PERMS_SPECIFIC;
@@ -77,15 +78,15 @@ class PermissionLimits {
* * \b array with all permission limits, if $perm is not set
*/
static public function Get($channel_id, $perm = '') {
if($perm) {
if ($perm) {
return intval(PConfig::Get($channel_id, 'perm_limits', $perm));
}
PConfig::Load($channel_id);
if(array_key_exists($channel_id, \App::$config)
&& array_key_exists('perm_limits', \App::$config[$channel_id]))
return \App::$config[$channel_id]['perm_limits'];
if (array_key_exists($channel_id, App::$config)
&& array_key_exists('perm_limits', App::$config[$channel_id]))
return App::$config[$channel_id]['perm_limits'];
return false;
}
}
}

View File

@@ -100,6 +100,7 @@ class PermissionRoles {
'post_mail', 'post_like' , 'republish', 'chat'
];
$ret['limits'] = PermissionLimits::Std_Limits();
$ret['channel_type'] = 'group';
break;
@@ -113,6 +114,7 @@ class PermissionRoles {
'view_pages', 'view_wiki', 'post_wall', 'post_comments', 'tag_deliver',
'post_mail', 'post_like' , 'chat' ];
$ret['limits'] = PermissionLimits::Std_Limits();
$ret['channel_type'] = 'group';
break;
@@ -132,6 +134,7 @@ class PermissionRoles {
$ret['limits']['view_storage'] = PERMS_SPECIFIC;
$ret['limits']['view_pages'] = PERMS_SPECIFIC;
$ret['limits']['view_wiki'] = PERMS_SPECIFIC;
$ret['channel_type'] = 'group';
break;
@@ -187,6 +190,7 @@ class PermissionRoles {
'post_mail', 'post_like' , 'republish', 'chat', 'write_wiki'
];
$ret['limits'] = PermissionLimits::Std_Limits();
$ret['channel_type'] = 'group';
break;
@@ -214,13 +218,13 @@ class PermissionRoles {
// set permissionlimits for this permission here, for example:
// if($perm === 'mynewperm')
// \Zotlabs\Access\PermissionLimits::Set($uid,$perm,1);
// PermissionLimits::Set($uid,$perm,1);
if($perm === 'view_wiki')
\Zotlabs\Access\PermissionLimits::Set($uid, $perm, PERMS_PUBLIC);
PermissionLimits::Set($uid, $perm, PERMS_PUBLIC);
if($perm === 'write_wiki')
\Zotlabs\Access\PermissionLimits::Set($uid, $perm, PERMS_SPECIFIC);
PermissionLimits::Set($uid, $perm, PERMS_SPECIFIC);
// set autoperms here if applicable
@@ -258,11 +262,11 @@ class PermissionRoles {
case 'view_wiki':
set_abconfig($uid,$ab['abook_xchan'],'my_perms',$perm,
intval(get_abconfig($uid,$ab['abook_xchan'],'my_perms','view_pages')));
break;
case 'write_wiki':
set_abconfig($uid,$ab['abook_xchan'],'my_perms',$perm,
intval(get_abconfig($uid,$ab['abook_xchan'],'my_perms','write_pages')));
break;
default:
break;
}
@@ -313,4 +317,4 @@ class PermissionRoles {
return $roles;
}
}
}

View File

@@ -75,7 +75,7 @@ class Permissions {
$x = [
'permissions' => $perms,
'filter' => $filter
'filter' => $filter
];
/**
* @hooks permissions_list
@@ -84,7 +84,7 @@ class Permissions {
*/
call_hooks('permissions_list', $x);
return($x['permissions']);
return ($x['permissions']);
}
/**
@@ -96,10 +96,10 @@ class Permissions {
*/
static public function BlockedAnonPerms() {
$res = [];
$res = [];
$perms = PermissionLimits::Std_limits();
foreach($perms as $perm => $limit) {
if($limit != PERMS_PUBLIC) {
foreach ($perms as $perm => $limit) {
if ($limit != PERMS_PUBLIC) {
$res[] = $perm;
}
}
@@ -111,7 +111,7 @@ class Permissions {
*/
call_hooks('write_perms', $x);
return($x['permissions']);
return ($x['permissions']);
}
/**
@@ -120,20 +120,20 @@ class Permissions {
* Converts [ 0 => 'view_stream', ... ]
* to [ 'view_stream' => 1 ] for any permissions in $arr;
* Undeclared permissions which exist in Perms() are added and set to 0.
*
*
* @param array $arr
* @return array
*/
static public function FilledPerms($arr) {
if(is_null($arr)) {
if (is_null($arr)) {
btlogger('FilledPerms: null');
$arr = [];
}
$everything = self::Perms();
$ret = [];
foreach($everything as $k => $v) {
if(in_array($k, $arr))
$ret = [];
foreach ($everything as $k => $v) {
if (in_array($k, $arr))
$ret[$k] = 1;
else
$ret[$k] = 0;
@@ -155,9 +155,9 @@ class Permissions {
*/
static public function OPerms($arr) {
$ret = [];
if($arr) {
foreach($arr as $k => $v) {
$ret[] = [ 'name' => $k, 'value' => $v ];
if ($arr) {
foreach ($arr as $k => $v) {
$ret[] = ['name' => $k, 'value' => $v];
}
}
return $ret;
@@ -170,15 +170,16 @@ class Permissions {
* @return boolean|array
*/
static public function FilledAutoperms($channel_id) {
if(! intval(get_pconfig($channel_id,'system','autoperms')))
if (!intval(get_pconfig($channel_id, 'system', 'autoperms')))
return false;
$arr = [];
$r = q("select * from pconfig where uid = %d and cat = 'autoperms'",
intval($channel_id)
);
if($r) {
foreach($r as $rr) {
if ($r) {
foreach ($r as $rr) {
$arr[$rr['k']] = intval($rr['v']);
}
}
@@ -193,11 +194,11 @@ class Permissions {
* @return boolean true if all perms from $p1 exist also in $p2
*/
static public function PermsCompare($p1, $p2) {
foreach($p1 as $k => $v) {
if(! array_key_exists($k, $p2))
foreach ($p1 as $k => $v) {
if (!array_key_exists($k, $p2))
return false;
if($p1[$k] != $p2[$k])
if ($p1[$k] != $p2[$k])
return false;
}
@@ -214,18 +215,18 @@ class Permissions {
*/
static public function connect_perms($channel_id) {
$my_perms = [];
$permcat = null;
$my_perms = [];
$permcat = null;
$automatic = 0;
// If a default permcat exists, use that
$pc = ((feature_enabled($channel_id,'permcats')) ? get_pconfig($channel_id,'system','default_permcat') : 'default');
if(! in_array($pc, [ '','default' ])) {
$pcp = new Zlib\Permcat($channel_id);
$pc = ((feature_enabled($channel_id, 'permcats')) ? get_pconfig($channel_id, 'system', 'default_permcat') : 'default');
if (!in_array($pc, ['', 'default'])) {
$pcp = new Zlib\Permcat($channel_id);
$permcat = $pcp->fetch($pc);
if($permcat && $permcat['perms']) {
foreach($permcat['perms'] as $p) {
if ($permcat && $permcat['perms']) {
foreach ($permcat['perms'] as $p) {
$my_perms[$p['name']] = $p['value'];
}
}
@@ -235,15 +236,15 @@ class Permissions {
// and if there was no permcat or a default permcat, set the perms
// from the role
$role = get_pconfig($channel_id,'system','permissions_role');
if($role) {
$role = get_pconfig($channel_id, 'system', 'permissions_role');
if ($role) {
$xx = PermissionRoles::role_perms($role);
if($xx['perms_auto'])
if ($xx['perms_auto'])
$automatic = 1;
if((! $my_perms) && ($xx['perms_connect'])) {
if ((!$my_perms) && ($xx['perms_connect'])) {
$default_perms = $xx['perms_connect'];
$my_perms = Permissions::FilledPerms($default_perms);
$my_perms = Permissions::FilledPerms($default_perms);
}
}
@@ -251,11 +252,11 @@ class Permissions {
// it is likely a custom permissions role. First see if there are any
// automatic permissions.
if(! $my_perms) {
if (!$my_perms) {
$m = Permissions::FilledAutoperms($channel_id);
if($m) {
if ($m) {
$automatic = 1;
$my_perms = $m;
$my_perms = $m;
}
}
@@ -263,24 +264,35 @@ class Permissions {
// custom perms but they are not automatic. They will be stored in abconfig with
// the channel's channel_hash (the 'self' connection).
if(! $my_perms) {
if (!$my_perms) {
$r = q("select channel_hash from channel where channel_id = %d",
intval($channel_id)
);
if($r) {
if ($r) {
$x = q("select * from abconfig where chan = %d and xchan = '%s' and cat = 'my_perms'",
intval($channel_id),
dbesc($r[0]['channel_hash'])
);
if($x) {
foreach($x as $xv) {
if ($x) {
foreach ($x as $xv) {
$my_perms[$xv['k']] = intval($xv['v']);
}
}
}
}
return ( [ 'perms' => $my_perms, 'automatic' => $automatic ] );
return (['perms' => $my_perms, 'automatic' => $automatic]);
}
}
static public function serialise($p) {
$n = [];
if ($p) {
foreach ($p as $k => $v) {
if (intval($v)) {
$n[] = $k;
}
}
}
return implode(',', $n);
}
}

View File

@@ -2,13 +2,12 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
class Addon {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
call_hooks('daemon_addon',$argv);
call_hooks('daemon_addon', $argv);
}
}

View File

@@ -0,0 +1,26 @@
<?php /** @file */
namespace Zotlabs\Daemon;
class Cache_embeds {
static public function run($argc,$argv) {
if(! $argc == 2)
return;
$c = q("select body from item where id = %d ",
dbesc(intval($argv[1]))
);
if(! $c)
return;
$item = $c[0];
// bbcode conversion by default processes embeds that aren't already cached.
// Ignore the returned html output.
bbcode($item['body']);
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace Zotlabs\Daemon;
use Zotlabs\Lib\Cache;
class Cache_query {
static public function run($argc, $argv) {
if(! $argc == 3)
return;
$key = $argv[1];
$pid = get_config('procid', $key, false);
if ($pid && (function_exists('posix_kill') ? posix_kill($pid, 0) : true)) {
logger($key . ': procedure already run with pid ' . $pid, LOGGER_DEBUG);
return;
}
$pid = getmypid();
set_config('procid', $key, $pid);
array_shift($argv);
array_shift($argv);
$arr = json_decode(base64_decode($argv[0]), true);
$r = call_user_func_array('q', $arr);
if($r)
Cache::set($key, serialize($r));
del_config('procid', $key);
}
}

View File

@@ -2,39 +2,39 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
require_once('include/hubloc.php');
class Checksites {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
logger('checksites: start');
if(($argc > 1) && ($argv[1]))
if (($argc > 1) && ($argv[1]))
$site_id = $argv[1];
if($site_id)
if ($site_id)
$sql_options = " and site_url = '" . dbesc($argv[1]) . "' ";
$days = intval(get_config('system','sitecheckdays'));
if($days < 1)
$days = intval(get_config('system', 'sitecheckdays'));
if ($days < 1)
$days = 30;
$r = q("select * from site where site_dead = 0 and site_update < %s - INTERVAL %s and site_type = %d $sql_options ",
db_utcnow(), db_quoteinterval($days . ' DAY'),
db_utcnow(),
db_quoteinterval($days . ' DAY'),
intval(SITE_TYPE_ZOT)
);
if(! $r)
if (!$r)
return;
foreach($r as $rr) {
if(! strcasecmp($rr['site_url'],z_root()))
foreach ($r as $rr) {
if (!strcasecmp($rr['site_url'], z_root()))
continue;
$x = ping_site($rr['site_url']);
if($x['success']) {
if ($x['success']) {
logger('checksites: ' . $rr['site_url']);
q("update site set site_update = '%s' where site_url = '%s' ",
dbesc(datetime_convert()),

58
Zotlabs/Daemon/Convo.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
namespace Zotlabs\Daemon;
use Zotlabs\Lib\Activity;
use Zotlabs\Lib\ActivityStreams;
use Zotlabs\Lib\ASCollection;
class Convo {
static public function run($argc, $argv) {
logger('convo invoked: ' . print_r($argv, true));
if ($argc != 4) {
return;
}
$id = $argv[1];
$channel_id = intval($argv[2]);
$contact_hash = $argv[3];
$channel = channelx_by_n($channel_id);
if (!$channel) {
return;
}
$r = q("SELECT abook.*, xchan.* FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_channel = %d and abook_xchan = '%s' LIMIT 1",
intval($channel_id),
dbesc($contact_hash)
);
if (!$r) {
return;
}
$contact = array_shift($r);
$obj = new ASCollection($id, $channel);
$messages = $obj->get();
if ($messages) {
foreach ($messages as $message) {
if (is_string($message)) {
$message = Activity::fetch($message, $channel);
}
// set client flag because comments will probably just be objects and not full blown activities
// and that lets us use implied_create
$AS = new ActivityStreams($message);
if ($AS->is_valid() && is_array($AS->obj)) {
$item = Activity::decode_note($AS);
Activity::store($channel, $contact['abook_xchan'], $AS, $item);
}
}
}
}
}

View File

@@ -2,16 +2,18 @@
namespace Zotlabs\Daemon;
use Zotlabs\Lib\Libsync;
class Cron {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
$maxsysload = intval(get_config('system','maxloadavg'));
if($maxsysload < 1)
$maxsysload = intval(get_config('system', 'maxloadavg'));
if ($maxsysload < 1)
$maxsysload = 50;
if(function_exists('sys_getloadavg')) {
if (function_exists('sys_getloadavg')) {
$load = sys_getloadavg();
if(intval($load[0]) > $maxsysload) {
if (intval($load[0]) > $maxsysload) {
logger('system: load ' . $load . ' too high. Cron deferred to next scheduled run.');
return;
}
@@ -19,28 +21,33 @@ class Cron {
// Check for a lockfile. If it exists, but is over an hour old, it's stale. Ignore it.
$lockfile = 'store/[data]/cron';
if((file_exists($lockfile)) && (filemtime($lockfile) > (time() - 3600))
&& (! get_config('system','override_cron_lockfile'))) {
if ((file_exists($lockfile)) && (filemtime($lockfile) > (time() - 3600))
&& (!get_config('system', 'override_cron_lockfile'))) {
logger("cron: Already running");
return;
}
// Create a lockfile. Needs two vars, but $x doesn't need to contain anything.
$x = '';
file_put_contents($lockfile, $x);
logger('cron: start');
// run queue delivery process in the background
Master::Summon(array('Queue'));
Master::Summon(array('Poller'));
// maintenance for mod sharedwithme - check for updated items and remove them
/**
* Chatpresence: if somebody hasn't pinged recently, they've most likely left the page
* and shouldn't count as online anymore. We allow an expection for bots.
*/
q("delete from chatpresence where cp_last < %s - INTERVAL %s and cp_client != 'auto' ",
db_utcnow(),
db_quoteinterval('3 MINUTE')
);
require_once('include/sharedwithme.php');
apply_updates();
// expire any expired mail
q("delete from mail where expires > '%s' and expires < %s ",
@@ -48,19 +55,23 @@ class Cron {
db_utcnow()
);
$interval = get_config('system', 'delivery_interval', 3);
// expire any expired items
$r = q("select id,item_wall from item where expires > '2001-01-01 00:00:00' and expires < %s
and item_deleted = 0 ",
db_utcnow()
);
if($r) {
if ($r) {
require_once('include/items.php');
foreach($r as $rr) {
drop_item($rr['id'],false,(($rr['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL));
if($rr['item_wall']) {
foreach ($r as $rr) {
drop_item($rr['id'], false, (($rr['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL));
if ($rr['item_wall']) {
// The notifier isn't normally invoked unless item_drop is interactive.
Master::Summon( [ 'Notifier', 'drop', $rr['id'] ] );
Master::Summon(['Notifier', 'drop', $rr['id']]);
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
}
}
}
@@ -72,9 +83,9 @@ class Cron {
dbesc(NULL_DATE),
db_utcnow()
);
if($r) {
if ($r) {
require_once('include/security.php');
foreach($r as $rr) {
foreach ($r as $rr) {
atoken_delete($rr['atoken_id']);
}
}
@@ -84,14 +95,37 @@ class Cron {
// or dead entries.
$r = q("select channel_id from channel where channel_dirdate < %s - INTERVAL %s and channel_removed = 0",
db_utcnow(),
db_utcnow(),
db_quoteinterval('30 DAY')
);
if($r) {
foreach($r as $rr) {
Master::Summon(array('Directory',$rr['channel_id'],'force'));
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
if ($r) {
foreach ($r as $rr) {
Master::Summon(array('Directory', $rr['channel_id'], 'force'));
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
}
}
// Clean expired photos from cache
$r = q("SELECT DISTINCT xchan, content FROM photo WHERE photo_usage = %d AND expires < %s - INTERVAL %s",
intval(PHOTO_CACHE),
db_utcnow(),
db_quoteinterval(get_config('system', 'active_expire_days', '30') . ' DAY')
);
if ($r) {
q("DELETE FROM photo WHERE photo_usage = %d AND expires < %s - INTERVAL %s",
intval(PHOTO_CACHE),
db_utcnow(),
db_quoteinterval(get_config('system', 'active_expire_days', '30') . ' DAY')
);
foreach ($r as $rr) {
$file = dbunescbin($rr['content']);
if (is_file($file)) {
@unlink($file);
@rmdir(dirname($file));
logger('info: deleted cached photo file ' . $file, LOGGER_DEBUG);
}
}
}
@@ -101,55 +135,57 @@ class Cron {
$r = q("select id from item where item_delayed = 1 and created <= %s and created > '%s' ",
db_utcnow(),
dbesc(datetime_convert('UTC','UTC','now - 2 days'))
dbesc(datetime_convert('UTC', 'UTC', 'now - 2 days'))
);
if($r) {
foreach($r as $rr) {
if ($r) {
foreach ($r as $rr) {
$x = q("update item set item_delayed = 0 where id = %d",
intval($rr['id'])
);
if($x) {
if ($x) {
$z = q("select * from item where id = %d",
intval($message_id)
intval($rr['id'])
);
if($z) {
if ($z) {
xchan_query($z);
$sync_item = fetch_post_tags($z);
build_sync_packet($sync_item[0]['uid'],
[
'item' => [ encode_item($sync_item[0],true) ]
Libsync::build_sync_packet($sync_item[0]['uid'],
[
'item' => [encode_item($sync_item[0], true)]
]
);
}
Master::Summon(array('Notifier','wall-new',$rr['id']));
Master::Summon(array('Notifier', 'wall-new', $rr['id']));
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
}
}
}
// check if any connections transitioned to zot6 and upgrade the connections to zot6 at this hub if so.
require_once('include/connections.php');
z6trans_connections();
require_once('include/attach.php');
attach_upgrade();
$abandon_days = intval(get_config('system','account_abandon_days'));
if($abandon_days < 1)
$abandon_days = 0;
// once daily run birthday_updates and then expire in background
// FIXME: add birthday updates, both locally and for xprof for use
// by directory servers
$d1 = intval(get_config('system','last_expire_day'));
$d2 = intval(datetime_convert('UTC','UTC','now','d'));
$d1 = intval(get_config('system', 'last_expire_day'));
$d2 = intval(datetime_convert('UTC', 'UTC', 'now', 'd'));
// Allow somebody to staggger daily activities if they have more than one site on their server,
// or if it happens at an inconvenient (busy) hour.
$h1 = intval(get_config('system','cron_hour'));
$h2 = intval(datetime_convert('UTC','UTC','now','G'));
$h1 = intval(get_config('system', 'cron_hour'));
$h2 = intval(datetime_convert('UTC', 'UTC', 'now', 'G'));
if(($d2 != $d1) && ($h1 == $h2)) {
if (($d2 != $d1) && ($h1 == $h2)) {
Master::Summon(array('Cron_daily'));
}
@@ -158,14 +194,14 @@ class Cron {
$r = q("select xchan_photo_l, xchan_hash from xchan where xchan_photo_l != '' and xchan_photo_m = ''
and xchan_photo_date < %s - INTERVAL %s",
db_utcnow(),
db_utcnow(),
db_quoteinterval('1 DAY')
);
if($r) {
if ($r) {
require_once('include/photo/photo_driver.php');
foreach($r as $rr) {
$photos = import_xchan_photo($rr['xchan_photo_l'],$rr['xchan_hash']);
$x = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
foreach ($r as $rr) {
$photos = import_xchan_photo($rr['xchan_photo_l'], $rr['xchan_hash'], false, true);
q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
where xchan_hash = '%s'",
dbesc($photos[0]),
dbesc($photos[1]),
@@ -179,31 +215,28 @@ class Cron {
// pull in some public posts
$disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false;
if(! $disable_discover_tab)
/* $disable_discover_tab = get_config('system', 'disable_discover_tab') || get_config('system', 'disable_discover_tab') === false;
if (!$disable_discover_tab)
Master::Summon(array('Externals'));
*/
$generation = 0;
$restart = false;
$restart = false;
if(($argc > 1) && ($argv[1] == 'restart')) {
$restart = true;
if (($argc > 1) && ($argv[1] == 'restart')) {
$restart = true;
$generation = intval($argv[2]);
if(! $generation)
killme();
if (!$generation)
return;
}
reload_plugins();
$d = datetime_convert();
// TODO check to see if there are any cronhooks before wasting a process
if(! $restart)
if (!$restart)
Master::Summon(array('Cronhooks'));
set_config('system','lastcron',datetime_convert());
set_config('system', 'lastcron', datetime_convert());
//All done - clear the lockfile
@unlink($lockfile);

View File

@@ -2,9 +2,11 @@
namespace Zotlabs\Daemon;
use Zotlabs\Lib\Libzotdir;
class Cron_daily {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
logger('cron_daily: start');
@@ -13,15 +15,12 @@ class Cron_daily {
*
*/
require_once('include/dir_fns.php');
check_upstream_directory();
Libzotdir::check_upstream_directory();
// Fire off the Cron_weekly process if it's the correct day.
$d3 = intval(datetime_convert('UTC','UTC','now','N'));
if($d3 == 7) {
$d3 = intval(datetime_convert('UTC', 'UTC', 'now', 'N'));
if ($d3 == 7) {
Master::Summon(array('Cron_weekly'));
}
@@ -44,6 +43,17 @@ class Cron_daily {
db_utcnow(), db_quoteinterval('1 YEAR')
);
// expire anonymous sse notification entries once a day
q("delete from xconfig where xchan like '%s'",
dbesc('sse_id.%')
);
// Clean up emdedded content cache
q("DELETE FROM cache WHERE updated < %s - INTERVAL %s",
db_utcnow(),
db_quoteinterval(get_config('system', 'active_expire_days', '30') . ' DAY')
);
//update statistics in config
require_once('include/statistics_fns.php');
@@ -56,8 +66,8 @@ class Cron_daily {
// expire old delivery reports
$keep_reports = intval(get_config('system','expire_delivery_reports'));
if($keep_reports === 0)
$keep_reports = intval(get_config('system', 'expire_delivery_reports'));
if ($keep_reports === 0)
$keep_reports = 10;
q("delete from dreport where dreport_time < %s - INTERVAL %s",
@@ -69,26 +79,27 @@ class Cron_daily {
downgrade_accounts();
// If this is a directory server, request a sync with an upstream
// directory at least once a day, up to once every poll interval.
// directory at least once a day, up to once every poll interval.
// Pull remote changes and push local changes.
// potential issue: how do we keep from creating an endless update loop?
// potential issue: how do we keep from creating an endless update loop?
$dirmode = get_config('system','directory_mode');
$dirmode = get_config('system', 'directory_mode');
if($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
require_once('include/dir_fns.php');
sync_directories($dirmode);
if ($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
Libzotdir::sync_directories($dirmode);
}
Master::Summon(array('Expire'));
Master::Summon(array('Cli_suggest'));
remove_obsolete_hublocs();
call_hooks('cron_daily',datetime_convert());
z6_discover();
set_config('system','last_expire_day',intval(datetime_convert('UTC','UTC','now','d')));
$date = datetime_convert();
call_hooks('cron_daily', $date);
set_config('system', 'last_expire_day', intval(datetime_convert('UTC', 'UTC', 'now', 'd')));
/**
* End Cron Daily

View File

@@ -4,21 +4,22 @@ namespace Zotlabs\Daemon;
class Cron_weekly {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
/**
* Cron Weekly
*
*
* Actions in the following block are executed once per day only on Sunday (once per week).
*
*/
call_hooks('cron_weekly',datetime_convert());
$date = datetime_convert();
call_hooks('cron_weekly', $date);
z_check_cert();
prune_hub_reinstalls();
mark_orphan_hubsxchans();
// Find channels that were removed in the last three weeks, but
@@ -31,8 +32,8 @@ class Cron_weekly {
db_utcnow(), db_quoteinterval('21 DAY'),
db_utcnow(), db_quoteinterval('10 DAY')
);
if($r) {
foreach($r as $rv) {
if ($r) {
foreach ($r as $rv) {
channel_remove_final($rv['channel_id']);
}
}
@@ -43,14 +44,14 @@ class Cron_weekly {
db_utcnow(), db_quoteinterval('14 DAY')
);
$dirmode = intval(get_config('system','directory_mode'));
if($dirmode === DIRECTORY_MODE_SECONDARY || $dirmode === DIRECTORY_MODE_PRIMARY) {
logger('regdir: ' . print_r(z_fetch_url(get_directory_primary() . '/regdir?f=&url=' . urlencode(z_root()) . '&realm=' . urlencode(get_directory_realm())),true));
$dirmode = intval(get_config('system', 'directory_mode'));
if ($dirmode === DIRECTORY_MODE_SECONDARY || $dirmode === DIRECTORY_MODE_PRIMARY) {
logger('regdir: ' . print_r(z_fetch_url(get_directory_primary() . '/regdir?f=&url=' . urlencode(z_root()) . '&realm=' . urlencode(get_directory_realm())), true));
}
// Check for dead sites
Master::Summon(array('Checksites'));
// update searchable doc indexes
Master::Summon(array('Importdoc'));

View File

@@ -2,6 +2,8 @@
namespace Zotlabs\Daemon;
use App;
// generate a curl compatible cookie file with an authenticated session for the given channel_id.
// If this file is then used with curl and the destination url is sent through zid() or manually
// manipulated to add a zid, it should allow curl to provide zot magic-auth across domains.
@@ -10,15 +12,15 @@ namespace Zotlabs\Daemon;
class CurlAuth {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
if($argc != 2)
killme();
if ($argc != 2)
return;
\App::$session->start();
App::$session->start();
$_SESSION['authenticated'] = 1;
$_SESSION['uid'] = $argv[1];
$_SESSION['uid'] = $argv[1];
$x = session_id();
@@ -29,14 +31,14 @@ class CurlAuth {
$output = '';
if($e) {
if ($e) {
$lines = file($f);
if($lines) {
foreach($lines as $line) {
if(strlen($line) > 0 && $line[0] != '#' && substr_count($line, "\t") == 6) {
if ($lines) {
foreach ($lines as $line) {
if (strlen($line) > 0 && $line[0] != '#' && substr_count($line, "\t") == 6) {
$tokens = explode("\t", $line);
$tokens = array_map('trim', $tokens);
if($tokens[4] > time()) {
if ($tokens[4] > time()) {
$output .= $line . "\n";
}
}
@@ -46,10 +48,10 @@ class CurlAuth {
}
}
$t = time() + (24 * 3600);
file_put_contents($f, $output . 'HttpOnly_' . \App::get_hostname() . "\tFALSE\t/\tTRUE\t$t\tPHPSESSID\t" . $x, (($e) ? FILE_APPEND : 0));
file_put_contents($f, $output . 'HttpOnly_' . App::get_hostname() . "\tFALSE\t/\tTRUE\t$t\tPHPSESSID\t" . $x, (($e) ? FILE_APPEND : 0));
file_put_contents($c,$x);
file_put_contents($c, $x);
killme();
return;
}
}
}

View File

@@ -2,89 +2,32 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
require_once('include/queue_fn.php');
class Deliver {
static public function run($argc,$argv) {
if($argc < 2)
static public function run($argc, $argv) {
if ($argc < 2)
return;
logger('deliver: invoked: ' . print_r($argv,true), LOGGER_DATA);
logger('deliver: invoked: ' . print_r($argv, true), LOGGER_DATA);
for($x = 1; $x < $argc; $x ++) {
for ($x = 1; $x < $argc; $x++) {
if(! $argv[$x])
if (!$argv[$x])
continue;
$dresult = null;
$r = q("select * from outq where outq_hash = '%s' limit 1",
$r = q("select * from outq where outq_hash = '%s'",
dbesc($argv[$x])
);
if($r) {
$notify = json_decode($r[0]['outq_notify'],true);
// Messages without an outq_msg will need to go via the web, even if it's a
// local delivery. This includes conversation requests and refresh packets.
if(($r[0]['outq_posturl'] === z_root() . '/post') && ($r[0]['outq_msg'])) {
logger('deliver: local delivery', LOGGER_DEBUG);
// local delivery
// we should probably batch these and save a few delivery processes
if($r[0]['outq_msg']) {
$m = json_decode($r[0]['outq_msg'],true);
if(array_key_exists('message_list',$m)) {
foreach($m['message_list'] as $mm) {
$msg = array('body' => json_encode(array('success' => true, 'pickup' => array(array('notify' => $notify,'message' => $mm)))));
zot_import($msg,z_root());
}
}
else {
$msg = array('body' => json_encode(array('success' => true, 'pickup' => array(array('notify' => $notify,'message' => $m)))));
$dresult = zot_import($msg,z_root());
}
remove_queue_item($r[0]['outq_hash']);
if($dresult && is_array($dresult)) {
// delivery reports for local deliveries do not require encryption
foreach($dresult as $xx) {
if(is_array($xx) && array_key_exists('message_id',$xx)) {
if(delivery_report_is_storable($xx)) {
q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s','%s','%s','%s','%s' ) ",
dbesc($xx['message_id']),
dbesc($xx['location']),
dbesc($xx['recipient']),
dbesc($xx['status']),
dbesc(datetime_convert($xx['date'])),
dbesc($xx['sender'])
);
}
}
}
}
q("delete from dreport where dreport_queue = '%s'",
dbesc($argv[$x])
);
continue;
}
}
// otherwise it's a remote delivery - call queue_deliver() with the $immediate flag
queue_deliver($r[0],true);
if ($r) {
queue_deliver($r[0], true);
}
}
}
}

View File

@@ -2,21 +2,18 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
class Deliver_hooks {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
if($argc < 2)
if ($argc < 2)
return;
$r = q("select * from item where id = '%d'",
intval($argv[1])
);
if($r)
call_hooks('notifier_normal',$r[0]);
if ($r)
call_hooks('notifier_normal', $r[0]);
}
}

View File

@@ -2,47 +2,46 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
require_once('include/dir_fns.php');
require_once('include/queue_fn.php');
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\Libzotdir;
use Zotlabs\Lib\Queue;
class Directory {
static public function run($argc,$argv){
static public function run($argc, $argv) {
if($argc < 2)
if ($argc < 2)
return;
$force = false;
$force = false;
$pushall = true;
if($argc > 2) {
if($argv[2] === 'force')
if ($argc > 2) {
if ($argv[2] === 'force')
$force = true;
if($argv[2] === 'nopush')
if ($argv[2] === 'nopush')
$pushall = false;
}
}
logger('directory update', LOGGER_DEBUG);
$dirmode = get_config('system','directory_mode');
if($dirmode === false)
$dirmode = get_config('system', 'directory_mode');
if ($dirmode === false)
$dirmode = DIRECTORY_MODE_NORMAL;
$x = q("select * from channel where channel_id = %d limit 1",
intval($argv[1])
);
if(! $x)
if (!$x)
return;
$channel = $x[0];
if($dirmode != DIRECTORY_MODE_NORMAL) {
if ($dirmode != DIRECTORY_MODE_NORMAL) {
// this is an in-memory update and we don't need to send a network packet.
local_dir_update($argv[1],$force);
Libzotdir::local_dir_update($argv[1], $force);
q("update channel set channel_dirdate = '%s' where channel_id = %d",
dbesc(datetime_convert()),
@@ -50,25 +49,26 @@ class Directory {
);
// Now update all the connections
if($pushall)
Master::Summon(array('Notifier','refresh_all',$channel['channel_id']));
if ($pushall)
Master::Summon(array('Notifier', 'refresh_all', $channel['channel_id']));
return;
}
// otherwise send the changes upstream
$directory = find_upstream_directory($dirmode);
$url = $directory['url'] . '/post';
$directory = Libzotdir::find_upstream_directory($dirmode);
$url = $directory['url'] . '/zot';
// ensure the upstream directory is updated
$packet = zot_build_packet($channel,(($force) ? 'force_refresh' : 'refresh'));
$z = zot_zot($url,$packet);
$packet = Libzot::build_packet($channel, (($force) ? 'force_refresh' : 'refresh'));
$z = Libzot::zot($url, $packet, $channel);
// re-queue if unsuccessful
if(! $z['success']) {
if (!$z['success']) {
/** @FIXME we aren't updating channel_dirdate if we have to queue
* the directory packet. That means we'll try again on the next poll run.
@@ -76,7 +76,7 @@ class Directory {
$hash = random_string();
queue_insert(array(
Queue::insert(array(
'hash' => $hash,
'account_id' => $channel['channel_account_id'],
'channel_id' => $channel['channel_id'],
@@ -93,8 +93,8 @@ class Directory {
}
// Now update all the connections
if($pushall)
Master::Summon(array('Notifier','refresh_all',$channel['channel_id']));
if ($pushall)
Master::Summon(array('Notifier', 'refresh_all', $channel['channel_id']));
}
}

View File

@@ -5,14 +5,24 @@ namespace Zotlabs\Daemon;
class Expire {
static public function run($argc,$argv){
static public function run($argc, $argv) {
cli_startup();
$pid = get_config('procid', 'expire', false);
if ($pid && (function_exists('posix_kill') ? posix_kill($pid, 0) : true)) {
logger('procedure already run with pid ' . $pid, LOGGER_DEBUG);
return;
}
$pid = getmypid();
set_config('procid', 'expire', $pid);
// perform final cleanup on previously delete items
$r = q("select id from item where item_deleted = 1 and item_pending_remove = 0 and changed < %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('10 DAY')
db_utcnow(),
db_quoteinterval('10 DAY')
);
if ($r) {
foreach ($r as $rr) {
@@ -23,23 +33,22 @@ class Expire {
// physically remove anything that has been deleted for more than two months
/** @FIXME - this is a wretchedly inefficient query */
$r = q("delete from item where item_pending_remove = 1 and changed < %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('36 DAY')
q("delete from item where item_pending_remove = 1 and changed < %s - INTERVAL %s",
db_utcnow(),
db_quoteinterval('36 DAY')
);
/** @FIXME make this optional as it could have a performance impact on large sites */
if (intval(get_config('system', 'optimize_items')))
q("optimize table item");
logger('expire: start', LOGGER_DEBUG);
logger('expire: start with pid ' . $pid, LOGGER_DEBUG);
$site_expire = intval(get_config('system', 'default_expire_days'));
$commented_days = intval(get_config('system','active_expire_days'));
$site_expire = intval(get_config('system', 'default_expire_days'));
$commented_days = intval(get_config('system', 'active_expire_days'));
logger('site_expire: ' . $site_expire);
$r = q("SELECT channel_id, channel_system, channel_address, channel_expire_days from channel where true");
$r = dbq("SELECT channel_id, channel_system, channel_address, channel_expire_days from channel where true");
if ($r) {
foreach ($r as $rr) {
@@ -55,11 +64,12 @@ class Expire {
$channel_expire = $service_class_expire;
else
$channel_expire = $site_expire;
if (intval($channel_expire) && (intval($channel_expire) < intval($rr['channel_expire_days'])) ||
intval($rr['channel_expire_days'] == 0)) {
$expire_days = $channel_expire;
} else {
}
else {
$expire_days = $rr['channel_expire_days'];
}
@@ -84,11 +94,13 @@ class Expire {
}
logger('Expire: sys interval: ' . $expire_days, LOGGER_DEBUG);
if ($expire_days)
item_expire($x['channel_id'], $expire_days, $commented_days);
logger('Expire: sys: done', LOGGER_DEBUG);
}
del_config('procid', 'expire');
}
}

View File

@@ -2,97 +2,180 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
use Zotlabs\Lib\Activity;
use Zotlabs\Lib\ActivityStreams;
use Zotlabs\Lib\ASCollection;
require_once('include/channel.php');
class Externals {
static public function run($argc,$argv){
static public function run($argc, $argv) {
$total = 0;
logger('externals: start');
$importer = get_sys_channel();
$total = 0;
$attempts = 0;
logger('externals: startup', LOGGER_DEBUG);
// pull in some public posts
while ($total == 0 && $attempts < 3) {
$arr = ['url' => ''];
call_hooks('externals_url_select', $arr);
while($total == 0 && $attempts < 3) {
$arr = array('url' => '');
call_hooks('externals_url_select',$arr);
if($arr['url']) {
if ($arr['url']) {
$url = $arr['url'];
}
}
else {
$randfunc = db_getfunc('RAND');
// fixme this query does not deal with directory realms.
// fixme this query does not deal with directory realms.
$r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d and site_dead = 0 order by $randfunc limit 1",
$r = q("select site_url, site_pull from site where site_url != '%s'
and site_flags != %d and site_type = %d
and site_dead = 0 and site_project like '%s' and site_version > '5.3.1' order by $randfunc limit 1",
dbesc(z_root()),
intval(DIRECTORY_MODE_STANDALONE),
intval(SITE_TYPE_ZOT)
intval(SITE_TYPE_ZOT),
dbesc('hubzilla%')
);
if($r)
if ($r)
$url = $r[0]['site_url'];
}
$blacklisted = false;
if(! check_siteallowed($url)) {
if (!check_siteallowed($url)) {
logger('blacklisted site: ' . $url);
$blacklisted = true;
}
$attempts ++;
$attempts++;
// make sure we can eventually break out if somebody blacklists all known sites
if($blacklisted) {
if($attempts > 20)
if ($blacklisted) {
if ($attempts > 20)
break;
$attempts --;
$attempts--;
continue;
}
if($url) {
if($r[0]['site_pull'] > NULL_DATE)
$mindate = urlencode(datetime_convert('','',$r[0]['site_pull'] . ' - 1 day'));
else {
$days = get_config('externals','since_days');
if($days === false)
$days = 15;
$mindate = urlencode(datetime_convert('','','now - ' . intval($days) . ' days'));
}
if ($url) {
$feedurl = $url . '/zotfeed?f=&mindate=' . $mindate;
$max = intval(get_config('system', 'max_imported_posts', 30));
if (intval($max)) {
logger('externals: fetching outbox');
logger('externals: pulling public content from ' . $feedurl, LOGGER_DEBUG);
$feed_url = $url . '/zotfeed';
$obj = new ASCollection($feed_url, $importer, 0, $max);
$messages = $obj->get();
$x = z_fetch_url($feedurl);
if(($x) && ($x['success'])) {
q("update site set site_pull = '%s' where site_url = '%s'",
dbesc(datetime_convert()),
dbesc($url)
);
$j = json_decode($x['body'],true);
if($j['success'] && $j['messages']) {
$sys = get_sys_channel();
foreach($j['messages'] as $message) {
// on these posts, clear any route info.
$message['route'] = '';
$results = process_delivery(array('hash' => 'undefined'), get_item_elements($message),
array(array('hash' => $sys['xchan_hash'])), false, true);
$total ++;
if ($messages) {
foreach ($messages as $message) {
if (is_string($message)) {
$message = Activity::fetch($message, $importer);
}
$AS = new ActivityStreams($message);
if ($AS->is_valid() && is_array($AS->obj)) {
$item = Activity::decode_note($AS);
Activity::store($importer, $importer['xchan_hash'], $AS, $item, true);
$total++;
}
}
logger('externals: import_public_posts: ' . $total . ' messages imported', LOGGER_DEBUG);
}
logger('externals: import_public_posts: ' . $total . ' messages imported', LOGGER_DEBUG);
}
}
}
return;
/* $total = 0;
$attempts = 0;
logger('externals: startup', LOGGER_DEBUG);
// pull in some public posts
while ($total == 0 && $attempts < 3) {
$arr = ['url' => ''];
call_hooks('externals_url_select', $arr);
if ($arr['url']) {
$url = $arr['url'];
}
else {
$randfunc = db_getfunc('RAND');
// fixme this query does not deal with directory realms.
$r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d and site_dead = 0 order by $randfunc limit 1",
dbesc(z_root()),
intval(DIRECTORY_MODE_STANDALONE),
intval(SITE_TYPE_ZOT)
);
if ($r)
$url = $r[0]['site_url'];
}
$blacklisted = false;
if (!check_siteallowed($url)) {
logger('blacklisted site: ' . $url);
$blacklisted = true;
}
$attempts++;
// make sure we can eventually break out if somebody blacklists all known sites
if ($blacklisted) {
if ($attempts > 20)
break;
$attempts--;
continue;
}
if ($url) {
if ($r[0]['site_pull'] > NULL_DATE)
$mindate = urlencode(datetime_convert('', '', $r[0]['site_pull'] . ' - 1 day'));
else {
$days = get_config('externals', 'since_days');
if ($days === false)
$days = 15;
$mindate = urlencode(datetime_convert('', '', 'now - ' . intval($days) . ' days'));
}
$feedurl = $url . '/zotfeed?f=&mindate=' . $mindate;
logger('externals: pulling public content from ' . $feedurl, LOGGER_DEBUG);
$x = z_fetch_url($feedurl);
if (($x) && ($x['success'])) {
q("update site set site_pull = '%s' where site_url = '%s'",
dbesc(datetime_convert()),
dbesc($url)
);
$j = json_decode($x['body'], true);
if ($j['success'] && $j['messages']) {
$sys = get_sys_channel();
foreach ($j['messages'] as $message) {
// on these posts, clear any route info.
$message['route'] = '';
process_delivery(['hash' => 'undefined'], get_item_elements($message),
[['hash' => $sys['xchan_hash']]], false, true);
$total++;
}
logger('externals: import_public_posts: ' . $total . ' messages imported', LOGGER_DEBUG);
}
}
}
}*/
}
}

View File

@@ -2,32 +2,38 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\Webfinger;
use Zotlabs\Lib\Zotfinger;
// performs zot_finger on $argv[1], which is a hex_encoded webbie/reddress
class Gprobe {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
if($argc != 2)
if ($argc != 2)
return;
$url = hex2bin($argv[1]);
if(! strpos($url,'@'))
if (!strpos($url, '@'))
return;
$r = q("select * from hubloc where hubloc_addr = '%s' limit 1",
$r = q("select * from hubloc where hubloc_addr = '%s' and hubloc_network = 'zot6' limit 1",
dbesc($url)
);
if(! $r) {
$j = \Zotlabs\Zot\Finger::run($url,null);
if($j['success']) {
$y = import_xchan($j);
if (!$r) {
$href = Webfinger::zot_url(punify($url));
if ($href) {
$zf = Zotfinger::exec($href, null);
}
if (is_array($zf) && array_path_exists('signature/signer', $zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) {
Libzot::import_xchan($zf['data']);
}
}
return;
}
}

14
Zotlabs/Daemon/Importdoc.php Executable file → Normal file
View File

@@ -5,7 +5,7 @@ namespace Zotlabs\Daemon;
class Importdoc {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
require_once('include/help.php');
@@ -16,20 +16,20 @@ class Importdoc {
static public function update_docs_dir($s) {
$f = basename($s);
$d = dirname($s);
if($s === 'doc/html')
if ($s === 'doc/html')
return;
$files = glob("$d/$f");
if($files) {
foreach($files as $fi) {
if($fi === 'doc/html') {
if ($files) {
foreach ($files as $fi) {
if ($fi === 'doc/html') {
continue;
}
if(is_dir($fi)) {
if (is_dir($fi)) {
self::update_docs_dir("$fi/*");
}
else {
// don't update media content
if(strpos(z_mime_content_type($fi),'text') === 0) {
if (strpos(z_mime_content_type($fi), 'text') === 0) {
store_doc_file($fi);
}
}

View File

@@ -2,24 +2,25 @@
namespace Zotlabs\Daemon;
use Zotlabs\Lib\Libsync;
class Importfile {
static public function run($argc,$argv){
static public function run($argc, $argv) {
logger('Importfile: ' . print_r($argv,true));
logger('Importfile: ' . print_r($argv, true));
if($argc < 3)
if ($argc < 3)
return;
$channel = channelx_by_n($argv[1]);
if(! $channel)
if (!$channel)
return;
$srcfile = $argv[2];
$folder = (($argc > 3) ? $argv[3] : '');
$dstname = (($argc > 4) ? $argv[4] : '');
$hash = random_string();
$hash = random_string();
$arr = [
'src' => $srcfile,
@@ -33,15 +34,15 @@ class Importfile {
'replace' => true
];
if($folder)
if ($folder)
$arr['folder'] = $folder;
attach_store($channel,$channel['channel_hash'],'import',$arr);
attach_store($channel, $channel['channel_hash'], 'import', $arr);
$sync = attach_export_data($channel, $hash);
if ($sync)
Libsync::build_sync_packet($channel['channel_id'], ['file' => [$sync]]);
$sync = attach_export_data($channel,$hash);
if($sync)
build_sync_packet($channel['channel_id'],array('file' => array($sync)));
return;
}
}

View File

@@ -2,148 +2,57 @@
namespace Zotlabs\Daemon;
if(array_search( __file__ , get_included_files()) === 0) {
if (array_search(__file__, get_included_files()) === 0) {
require_once('include/cli_startup.php');
array_shift($argv);
$argc = count($argv);
if($argc)
Master::Release($argc,$argv);
killme();
if ($argc)
Master::Release($argc, $argv);
return;
}
class Master {
static public $queueworker = null;
static public function Summon($arr) {
proc_run('php','Zotlabs/Daemon/Master.php',$arr);
$hookinfo = [
'argv' => $arr
];
call_hooks('daemon_master_summon', $hookinfo);
$arr = $hookinfo['argv'];
$argc = count($arr);
if ((!is_array($arr) || ($argc < 1))) {
logger("Summon handled by hook.", LOGGER_DEBUG);
return;
}
$phpbin = get_config('system', 'phpbin', 'php');
proc_run($phpbin, 'Zotlabs/Daemon/Master.php', $arr);
}
static public function Release($argc,$argv) {
static public function Release($argc, $argv) {
cli_startup();
$maxworkers = get_config('system','max_queue_workers');
$hookinfo = [
'argv' => $argv
];
if (!$maxworkers || $maxworkers == 0) {
logger('Master: release: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
$cls::run($argc,$argv);
self::ClearQueue();
} else {
logger('Master: enqueue: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
$workinfo = ['argc'=>$argc,'argv'=>$argv];
q("insert into config (cat,k,v) values ('queuework','%s','%s')",
dbesc(uniqid('workitem:',true)),
dbesc(serialize($workinfo)));
self::Process();
call_hooks('daemon_master_release', $hookinfo);
$argv = $hookinfo['argv'];
$argc = count($argv);
if ((!is_array($argv) || ($argc < 1))) {
logger("Release handled by hook.", LOGGER_DEBUG);
return;
}
logger('Master: release: ' . json_encode($argv), LOGGER_ALL, LOG_DEBUG);
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
$cls::run($argc, $argv);
}
static public function GetWorkerID() {
$maxworkers = get_config('system','max_queue_workers');
$maxworkers = ($maxworkers) ? $maxworkers : 3;
$workermaxage = get_config('system','max_queue_worker_age');
$workermaxage = ($workermaxage) ? $workermaxage : 300;
$workers = q("select * from config where cat='queueworkers' and k like '%s'", 'workerstarted_%');
if (count($workers) > $maxworkers) {
foreach ($workers as $idx => $worker) {
$curtime = time();
$age = (intval($curtime) - intval($worker['v']));
if ( $age > $workermaxage) {
logger("Prune worker: ".$worker['k'], LOGGER_ALL, LOGGER_DEBUG);
$k = explode('_',$worker['k']);
q("delete from config where cat='queueworkers' and k='%s'",
'workerstarted_'.$k[1]);
q("update config set k='workitem' where cat='queuework' and k='%s'",
'workitem_'.$k[1]);
unset($workers[$idx]);
}
}
if (count($workers) > $maxworkers) {
return false;
}
}
return uniqid();
}
static public function Process() {
self::$queueworker = self::GetWorkerID();
if (!self::$queueworker) {
logger('Master: unable to obtain worker ID.');
killme();
}
set_config('queueworkers','workerstarted_'.self::$queueworker,time());
$workersleep = get_config('system','queue_worker_sleep');
$workersleep = ($workersleep) ? $workersleep : 5;
cli_startup();
$work = q("update config set k='%s' where cat='queuework' and k like '%s' limit 1",
'workitem_'.self::$queueworker,
dbesc('workitem:%'));
$jobs = 0;
while ($work) {
$workitem = q("select * from config where cat='queuework' and k='%s'",
'workitem_'.self::$queueworker);
if (isset($workitem[0])) {
$jobs++;
$workinfo = unserialize($workitem[0]['v']);
$argc = $workinfo['argc'];
$argv = $workinfo['argv'];
logger('Master: process: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
//Delete unclaimed duplicate workitems.
q("delete from config where cat='queuework' and k='workitem' and v='%s'",
serialize($argv));
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
$cls::run($argc,$argv);
//Right now we assume that if we get a return, everything is OK.
//At some point we may want to test whether the run returns true/false
// and requeue the work to be tried again. But we probably want
// to implement some sort of "retry interval" first.
q("delete from config where cat='queuework' and k='%s'",
'workitem_'.self::$queueworker);
} else {
break;
}
sleep ($workersleep);
$work = q("update config set k='%s' where cat='queuework' and k like '%s' limit 1",
'workitem_'.self::$queueworker,
dbesc('workitem:%'));
}
logger('Master: Worker Thread: queue items processed:' . $jobs);
q("delete from config where cat='queueworkers' and k='%s'",
'workerstarted_'.self::$queueworker);
}
static public function ClearQueue() {
$work = q("select * from config where cat='queuework' and k like '%s'",
dbesc('workitem%'));
foreach ($work as $workitem) {
$workinfo = unserialize($workitem['v']);
$argc = $workinfo['argc'];
$argv = $workinfo['argv'];
logger('Master: process: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
$cls::run($argc,$argv);
}
$work = q("delete from config where cat='queuework' and k like '%s'",
dbesc('workitem%'));
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -2,31 +2,34 @@
namespace Zotlabs\Daemon;
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\Libzotdir;
require_once('include/zot.php');
require_once('include/dir_fns.php');
class Onedirsync {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
logger('onedirsync: start ' . intval($argv[1]));
if(($argc > 1) && (intval($argv[1])))
if (($argc > 1) && (intval($argv[1])))
$update_id = intval($argv[1]);
if(! $update_id) {
if (!$update_id) {
logger('onedirsync: no update');
return;
}
$r = q("select * from updates where ud_id = %d limit 1",
intval($update_id)
);
if(! $r)
if (!$r)
return;
if(($r[0]['ud_flags'] & UPDATE_FLAGS_UPDATED) || (! $r[0]['ud_addr']))
if (($r[0]['ud_flags'] & UPDATE_FLAGS_UPDATED) || (!$r[0]['ud_addr']))
return;
// Have we probed this channel more recently than the other directory server
@@ -38,8 +41,8 @@ class Onedirsync {
dbesc($r[0]['ud_date']),
intval(UPDATE_FLAGS_UPDATED)
);
if($x) {
$y = q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 and ud_date != '%s'",
if ($x) {
q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 and ud_date != '%s'",
intval(UPDATE_FLAGS_UPDATED),
dbesc($r[0]['ud_addr']),
intval(UPDATE_FLAGS_UPDATED),
@@ -50,11 +53,14 @@ class Onedirsync {
// ignore doing an update if this ud_addr refers to a known dead hubloc
$h = q("select * from hubloc where hubloc_addr = '%s' limit 1",
$h = q("select * from hubloc where hubloc_addr = '%s'",
dbesc($r[0]['ud_addr'])
);
if(($h) && ($h[0]['hubloc_status'] & HUBLOC_OFFLINE)) {
$y = q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 ",
$h = Libzot::zot_record_preferred($h);
if (($h) && ($h['hubloc_status'] & HUBLOC_OFFLINE)) {
q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 ",
intval(UPDATE_FLAGS_UPDATED),
dbesc($r[0]['ud_addr']),
intval(UPDATE_FLAGS_UPDATED)
@@ -63,13 +69,13 @@ class Onedirsync {
return;
}
// we might have to pull this out some day, but for now update_directory_entry()
// we might have to pull this out some day, but for now update_directory_entry()
// runs zot_finger() and is kind of zot specific
if($h && $h[0]['hubloc_network'] !== 'zot')
if ($h && !in_array($h['hubloc_network'], ['zot6', 'zot']))
return;
update_directory_entry($r[0]);
Libzotdir::update_directory_entry($r[0]);
return;
}

View File

@@ -2,84 +2,94 @@
namespace Zotlabs\Daemon;
require_once('include/zot.php');
require_once('include/socgraph.php');
use Zotlabs\Lib\Activity;
use Zotlabs\Lib\ActivityStreams;
use Zotlabs\Lib\ASCollection;
use Zotlabs\Lib\Libzot;
require_once('include/socgraph.php');
class Onepoll {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
logger('onepoll: start');
if(($argc > 1) && (intval($argv[1])))
if (($argc > 1) && (intval($argv[1])))
$contact_id = intval($argv[1]);
if(! $contact_id) {
if (!$contact_id) {
logger('onepoll: no contact');
return;
}
$d = datetime_convert();
$sql_extra = '';
$allow_feeds = get_config('system', 'feed_contacts');
if(!$allow_feeds) {
$sql_extra = ' and abook_feed = 0 ';
}
$contacts = q("SELECT abook.*, xchan.*, account.*
FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan
where abook_id = %d
FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan
where abook_id = %d $sql_extra
and abook_pending = 0 and abook_archived = 0 and abook_blocked = 0 and abook_ignored = 0
AND (( account_flags = %d ) OR ( account_flags = %d )) limit 1",
intval($contact_id),
intval(ACCOUNT_OK),
intval(ACCOUNT_UNVERIFIED)
);
);
if(! $contacts) {
if (!$contacts) {
logger('onepoll: abook_id not found: ' . $contact_id);
return;
}
$contact = $contacts[0];
$t = $contact['abook_updated'];
$contact = array_shift($contacts);
$importer_uid = $contact['abook_channel'];
$r = q("SELECT * from channel left join xchan on channel_hash = xchan_hash where channel_id = %d limit 1",
intval($importer_uid)
);
if(! $r)
if (!$r)
return;
$importer = $r[0];
logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['xchan_name']}, CONTACT: {$contact['xchan_name']}");
$last_update = ((($contact['abook_updated'] === $contact['abook_created']) || ($contact['abook_updated'] <= NULL_DATE))
? datetime_convert('UTC','UTC','now - 7 days')
: datetime_convert('UTC','UTC',$contact['abook_updated'] . ' - 2 days')
$last_update = ((($contact['abook_updated'] === $contact['abook_created']) || ($contact['abook_updated'] <= NULL_DATE))
? datetime_convert('UTC', 'UTC', 'now - 7 days')
: datetime_convert('UTC', 'UTC', $contact['abook_updated'] . ' - 2 days')
);
if($contact['xchan_network'] === 'rss') {
if ($contact['xchan_network'] === 'rss') {
logger('onepoll: processing feed ' . $contact['xchan_name'], LOGGER_DEBUG);
handle_feed($importer['channel_id'],$contact_id,$contact['xchan_hash']);
q("update abook set abook_connected = '%s' where abook_id = %d",
dbesc(datetime_convert()),
intval($contact['abook_id'])
);
$alive = handle_feed($importer['channel_id'], $contact_id, $contact['xchan_hash']);
if ($alive) {
q("update abook set abook_connected = '%s' where abook_id = %d",
dbesc(datetime_convert()),
intval($contact['abook_id'])
);
}
return;
}
if($contact['xchan_network'] !== 'zot')
if (!in_array($contact['xchan_network'], ['zot', 'zot6']))
return;
// update permissions
$x = zot_refresh($contact,$importer);
if ($contact['xchan_network'] === 'zot6')
$x = Libzot::refresh($contact, $importer);
if ($contact['xchan_network'] === 'zot')
$x = zot_refresh($contact, $importer);
$responded = false;
$updated = datetime_convert();
$connected = datetime_convert();
if(! $x) {
if (!$x) {
// mark for death by not updating abook_connected, this is caught in include/poller.php
q("update abook set abook_updated = '%s' where abook_id = %d",
dbesc($updated),
@@ -95,83 +105,112 @@ class Onepoll {
$responded = true;
}
if(! $responded)
if (!$responded)
return;
if($contact['xchan_connurl']) {
$fetch_feed = true;
$x = null;
$fetch_feed = true;
$x = null;
// They haven't given us permission to see their stream
// They haven't given us permission to see their stream
$can_view_stream = intval(get_abconfig($importer_uid,$contact['abook_xchan'],'their_perms','view_stream'));
$can_view_stream = intval(get_abconfig($importer_uid, $contact['abook_xchan'], 'their_perms', 'view_stream'));
if(! $can_view_stream)
$fetch_feed = false;
if (!$can_view_stream)
$fetch_feed = false;
// we haven't given them permission to send us their stream
// we haven't given them permission to send us their stream
$can_send_stream = intval(get_abconfig($importer_uid,$contact['abook_xchan'],'my_perms','send_stream'));
if(! $can_send_stream)
$fetch_feed = false;
$can_send_stream = intval(get_abconfig($importer_uid, $contact['abook_xchan'], 'my_perms', 'send_stream'));
if($fetch_feed) {
if (!$can_send_stream)
$fetch_feed = false;
if(strpos($contact['xchan_connurl'],z_root()) === 0) {
// local channel - save a network fetch
$c = channelx_by_hash($contact['xchan_hash']);
if($c) {
$x = [
'success' => true,
'body' => json_encode( [
'success' => true,
'messages' => zot_feed($c['channel_id'], $importer['xchan_hash'], [ 'mindate' => $last_update ])
])
];
}
if ($fetch_feed && $contact['xchan_network'] !== 'zot') {
$max = intval(get_config('system', 'max_imported_posts', 30));
if (intval($max)) {
$cl = get_xconfig($contact['abook_xchan'], 'activitypub', 'collections');
if (is_array($cl) && $cl) {
$url = ((array_key_exists('outbox', $cl)) ? $cl['outbox'] : '');
}
else {
// remote fetch
$feedurl = str_replace('/poco/','/zotfeed/',$contact['xchan_connurl']);
$feedurl .= '?f=&mindate=' . urlencode($last_update) . '&zid=' . $importer['channel_address'] . '@' . \App::get_hostname();
$recurse = 0;
$x = z_fetch_url($feedurl, false, $recurse, [ 'session' => true ]);
$url = str_replace('/poco/', '/zotfeed/', $contact['xchan_connurl']);
}
logger('feed_update: ' . print_r($x,true), LOGGER_DATA);
}
if(($x) && ($x['success'])) {
$total = 0;
logger('onepoll: feed update ' . $contact['xchan_name'] . ' ' . $feedurl);
$j = json_decode($x['body'],true);
if($j['success'] && $j['messages']) {
foreach($j['messages'] as $message) {
$results = process_delivery(array('hash' => $contact['xchan_hash']), get_item_elements($message),
array(array('hash' => $importer['xchan_hash'])), false);
logger('onepoll: feed_update: process_delivery: ' . print_r($results,true), LOGGER_DATA);
$total ++;
if ($url) {
logger('fetching outbox');
$url = $url . '?date_begin=' . urlencode($last_update);
$obj = new ASCollection($url, $importer, 0, $max);
$messages = $obj->get();
if ($messages) {
foreach ($messages as $message) {
if (is_string($message)) {
$message = Activity::fetch($message, $importer);
}
$AS = new ActivityStreams($message);
if ($AS->is_valid() && is_array($AS->obj)) {
$item = Activity::decode_note($AS);
Activity::store($importer, $contact['abook_xchan'], $AS, $item);
}
}
}
logger("onepoll: $total messages processed");
}
}
}
/* if ($fetch_feed) {
if (strpos($contact['xchan_connurl'], z_root()) === 0) {
// local channel - save a network fetch
$c = channelx_by_hash($contact['xchan_hash']);
if ($c) {
$x = [
'success' => true,
'body' => json_encode([
'success' => true,
'messages' => zot_feed($c['channel_id'], $importer['xchan_hash'], ['mindate' => $last_update])
])
];
}
}
else {
// remote fetch
$feedurl = str_replace('/poco/', '/zotfeed/', $contact['xchan_connurl']);
$feedurl .= '?f=&mindate=' . urlencode($last_update) . '&zid=' . $importer['channel_address'] . '@' . App::get_hostname();
$recurse = 0;
$x = z_fetch_url($feedurl, false, $recurse, ['session' => true]);
}
logger('feed_update: ' . print_r($x, true), LOGGER_DATA);
}
if (($x) && ($x['success'])) {
$total = 0;
logger('onepoll: feed update ' . $contact['xchan_name'] . ' ' . $feedurl);
$j = json_decode($x['body'], true);
if ($j['success'] && $j['messages']) {
foreach ($j['messages'] as $message) {
$results = process_delivery(['hash' => $contact['xchan_hash']], get_item_elements($message),
[['hash' => $importer['xchan_hash']]], false);
logger('onepoll: feed_update: process_delivery: ' . print_r($results, true), LOGGER_DATA);
$total++;
}
logger("onepoll: $total messages processed");
}
}
*/
// update the poco details for this connection
if($contact['xchan_connurl']) {
$r = q("SELECT xlink_id from xlink
where xlink_xchan = '%s' and xlink_updated > %s - INTERVAL %s and xlink_static = 0 limit 1",
intval($contact['xchan_hash']),
db_utcnow(), db_quoteinterval('1 DAY')
);
if(! $r) {
poco_load($contact['xchan_hash'],$contact['xchan_connurl']);
}
$r = q("SELECT xlink_id from xlink where xlink_xchan = '%s' and xlink_updated > %s - INTERVAL %s and xlink_static = 0 limit 1",
intval($contact['xchan_hash']),
db_utcnow(), db_quoteinterval('1 DAY')
);
if (!$r) {
poco_load($contact['xchan_hash'], $contact['xchan_connurl']);
}
return;

View File

@@ -4,73 +4,67 @@ namespace Zotlabs\Daemon;
class Poller {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
$maxsysload = intval(get_config('system','maxloadavg'));
if($maxsysload < 1)
$maxsysload = intval(get_config('system', 'maxloadavg'));
if ($maxsysload < 1)
$maxsysload = 50;
if(function_exists('sys_getloadavg')) {
if (function_exists('sys_getloadavg')) {
$load = sys_getloadavg();
if(intval($load[0]) > $maxsysload) {
if (intval($load[0]) > $maxsysload) {
logger('system: load ' . $load . ' too high. Poller deferred to next scheduled run.');
return;
}
}
$interval = intval(get_config('system','poll_interval'));
if(! $interval)
$interval = ((get_config('system','delivery_interval') === false) ? 3 : intval(get_config('system','delivery_interval')));
$interval = intval(get_config('system', 'poll_interval'));
if (!$interval)
$interval = ((get_config('system', 'delivery_interval') === false) ? 3 : intval(get_config('system', 'delivery_interval')));
// Check for a lockfile. If it exists, but is over an hour old, it's stale. Ignore it.
$lockfile = 'store/[data]/poller';
if((file_exists($lockfile)) && (filemtime($lockfile) > (time() - 3600))
&& (! get_config('system','override_poll_lockfile'))) {
if ((file_exists($lockfile)) && (filemtime($lockfile) > (time() - 3600))
&& (!get_config('system', 'override_poll_lockfile'))) {
logger("poller: Already running");
return;
}
// Create a lockfile. Needs two vars, but $x doesn't need to contain anything.
$x = '';
file_put_contents($lockfile, $x);
logger('poller: start');
$manual_id = 0;
$generation = 0;
$force = false;
$force = false;
$restart = false;
if(($argc > 1) && ($argv[1] == 'force'))
if (($argc > 1) && ($argv[1] == 'force'))
$force = true;
if(($argc > 1) && ($argv[1] == 'restart')) {
$restart = true;
if (($argc > 1) && ($argv[1] == 'restart')) {
$generation = intval($argv[2]);
if(! $generation)
killme();
if (!$generation)
return;
}
if(($argc > 1) && intval($argv[1])) {
if (($argc > 1) && intval($argv[1])) {
$manual_id = intval($argv[1]);
$force = true;
}
$sql_extra = (($manual_id) ? " AND abook_id = " . intval($manual_id) . " " : "");
reload_plugins();
$d = datetime_convert();
// Only poll from those with suitable relationships
$abandon_sql = (($abandon_days)
? sprintf(" AND account_lastlog > %s - INTERVAL %s ", db_utcnow(), db_quoteinterval(intval($abandon_days).' DAY'))
: ''
$abandon_days = intval(get_config('system', 'account_abandon_days', 0));
$abandon_sql = (($abandon_days)
? sprintf(" AND account_lastlog > %s - INTERVAL %s ", db_utcnow(), db_quoteinterval(intval($abandon_days) . ' DAY'))
: ''
);
$randfunc = db_getfunc('RAND');
$contacts = q("SELECT abook.abook_updated, abook.abook_connected, abook.abook_feed,
abook.abook_channel, abook.abook_id, abook.abook_archived, abook.abook_pending,
abook.abook_ignored, abook.abook_blocked,
@@ -85,120 +79,120 @@ class Poller {
intval(ACCOUNT_UNVERIFIED) // FIXME
);
if($contacts) {
if ($contacts) {
foreach ($contacts as $contact) {
foreach($contacts as $contact) {
$update = false;
$update = false;
$t = $contact['abook_updated'];
$c = $contact['abook_connected'];
if(intval($contact['abook_feed'])) {
$min = service_class_fetch($contact['abook_channel'],'minimum_feedcheck_minutes');
if(! $min)
$min = intval(get_config('system','minimum_feedcheck_minutes'));
if(! $min)
if (intval($contact['abook_feed'])) {
$min = service_class_fetch($contact['abook_channel'], 'minimum_feedcheck_minutes');
if (!$min)
$min = intval(get_config('system', 'minimum_feedcheck_minutes'));
if (!$min)
$min = 60;
$x = datetime_convert('UTC','UTC',"now - $min minutes");
if($c < $x) {
Master::Summon(array('Onepoll',$contact['abook_id']));
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
$x = datetime_convert('UTC', 'UTC', "now - $min minutes");
if ($c < $x) {
Master::Summon(['Onepoll', $contact['abook_id']]);
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
}
continue;
}
if($contact['xchan_network'] !== 'zot')
if (!in_array($contact['xchan_network'], ['zot', 'zot6']))
continue;
if($c == $t) {
if(datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 1 day"))
if ($c == $t) {
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day"))
$update = true;
}
else {
// if we've never connected with them, start the mark for death countdown from now
if($c <= NULL_DATE) {
$r = q("update abook set abook_connected = '%s' where abook_id = %d",
if ($c <= NULL_DATE) {
q("update abook set abook_connected = '%s' where abook_id = %d",
dbesc(datetime_convert()),
intval($contact['abook_id'])
);
$c = datetime_convert();
$c = datetime_convert();
$update = true;
}
// He's dead, Jim
if(strcmp(datetime_convert('UTC','UTC', 'now'),datetime_convert('UTC','UTC', $c . " + 30 day")) > 0) {
$r = q("update abook set abook_archived = 1 where abook_id = %d",
if (strcmp(datetime_convert('UTC', 'UTC', 'now'), datetime_convert('UTC', 'UTC', $c . " + 30 day")) > 0) {
q("update abook set abook_archived = 1 where abook_id = %d",
intval($contact['abook_id'])
);
$update = false;
continue;
}
if(intval($contact['abook_archived'])) {
$update = false;
if (intval($contact['abook_archived'])) {
continue;
}
// might be dead, so maybe don't poll quite so often
// recently deceased, so keep up the regular schedule for 3 days
if((strcmp(datetime_convert('UTC','UTC', 'now'),datetime_convert('UTC','UTC', $c . " + 3 day")) > 0)
&& (strcmp(datetime_convert('UTC','UTC', 'now'),datetime_convert('UTC','UTC', $t . " + 1 day")) > 0))
if ((strcmp(datetime_convert('UTC', 'UTC', 'now'), datetime_convert('UTC', 'UTC', $c . " + 3 day")) > 0)
&& (strcmp(datetime_convert('UTC', 'UTC', 'now'), datetime_convert('UTC', 'UTC', $t . " + 1 day")) > 0))
$update = true;
// After that back off and put them on a morphine drip
if(strcmp(datetime_convert('UTC','UTC', 'now'),datetime_convert('UTC','UTC', $t . " + 2 day")) > 0) {
if (strcmp(datetime_convert('UTC', 'UTC', 'now'), datetime_convert('UTC', 'UTC', $t . " + 2 day")) > 0) {
$update = true;
}
}
if(intval($contact['abook_pending']) || intval($contact['abook_archived']) || intval($contact['abook_ignored']) || intval($contact['abook_blocked']))
if (intval($contact['abook_pending']) || intval($contact['abook_archived']) || intval($contact['abook_ignored']) || intval($contact['abook_blocked']))
continue;
if((! $update) && (! $force))
continue;
if ((!$update) && (!$force))
continue;
Master::Summon(array('Onepoll',$contact['abook_id']));
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
Master::Summon(['Onepoll', $contact['abook_id']]);
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
}
}
if($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
$dirmode = intval(get_config('system', 'directory_mode'));
if ($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
$r = q("SELECT u.ud_addr, u.ud_id, u.ud_last FROM updates AS u INNER JOIN (SELECT ud_addr, max(ud_id) AS ud_id FROM updates WHERE ( ud_flags & %d ) = 0 AND ud_addr != '' AND ( ud_last <= '%s' OR ud_last > %s - INTERVAL %s ) GROUP BY ud_addr) AS s ON s.ud_id = u.ud_id ",
intval(UPDATE_FLAGS_UPDATED),
dbesc(NULL_DATE),
db_utcnow(), db_quoteinterval('7 DAY')
);
if($r) {
foreach($r as $rr) {
if ($r) {
foreach ($r as $rr) {
// If they didn't respond when we attempted before, back off to once a day
// After 7 days we won't bother anymore
if($rr['ud_last'] > NULL_DATE)
if($rr['ud_last'] > datetime_convert('UTC','UTC', 'now - 1 day'))
if ($rr['ud_last'] > NULL_DATE)
if ($rr['ud_last'] > datetime_convert('UTC', 'UTC', 'now - 1 day'))
continue;
Master::Summon(array('Onedirsync',$rr['ud_id']));
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
Master::Summon(['Onedirsync', $rr['ud_id']]);
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
}
}
}
}
set_config('system','lastpoll',datetime_convert());
set_config('system', 'lastpoll', datetime_convert());
//All done - clear the lockfile
@unlink($lockfile);
return;

View File

@@ -7,13 +7,12 @@ require_once('include/zot.php');
class Queue {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
require_once('include/items.php');
require_once('include/bbcode.php');
if($argc > 1)
if ($argc > 1)
$queue_id = $argv[1];
else
$queue_id = EMPTY_STR;
@@ -26,10 +25,9 @@ class Queue {
$r = q("select outq_posturl from outq where outq_created < %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('3 DAY')
);
if($r) {
foreach($r as $rr) {
$site_url = '';
$h = parse_url($rr['outq_posturl']);
if ($r) {
foreach ($r as $rr) {
$h = parse_url($rr['outq_posturl']);
$desturl = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : '');
q("update site set site_dead = 1 where site_dead = 0 and site_url = '%s' and site_update < %s - INTERVAL %s",
dbesc($desturl),
@@ -38,11 +36,11 @@ class Queue {
}
}
$r = q("DELETE FROM outq WHERE outq_created < %s - INTERVAL %s",
q("DELETE FROM outq WHERE outq_created < %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('3 DAY')
);
if($queue_id) {
if ($queue_id) {
$r = q("SELECT * FROM outq WHERE outq_hash = '%s' LIMIT 1",
dbesc($queue_id)
);
@@ -55,21 +53,31 @@ class Queue {
// so that we don't start off a thousand deliveries for a couple of dead hubs.
// The zot driver will deliver everything destined for a single hub once contact is made (*if* contact is made).
// Other drivers will have to do something different here and may need their own query.
// Note: this requires some tweaking as new posts to long dead hubs once a day will keep them in the
// "every 15 minutes" category. We probably need to prioritise them when inserted into the queue
// or just prior to this query based on recent and long-term delivery history. If we have good reason to believe
// the site is permanently down, there's no reason to attempt delivery at all, or at most not more than once
// or twice a day.
$r = q("SELECT * FROM outq WHERE outq_delivered = 0 and outq_scheduled < %s ",
$sqlrandfunc = db_getfunc('rand');
$r = q("SELECT *,$sqlrandfunc as rn FROM outq WHERE outq_delivered = 0 and outq_scheduled < %s order by rn limit 1",
db_utcnow()
);
while ($r) {
foreach ($r as $rv) {
queue_deliver($rv);
}
$r = q("SELECT *,$sqlrandfunc as rn FROM outq WHERE outq_delivered = 0 and outq_scheduled < %s order by rn limit 1",
db_utcnow()
);
}
}
if(! $r)
if (!$r)
return;
foreach($r as $rv) {
foreach ($r as $rv) {
queue_deliver($rv);
}
}

View File

@@ -10,6 +10,11 @@ class Ratenotif {
static public function run($argc,$argv) {
// Deprecated
return;
require_once("datetime.php");
require_once('include/items.php');

View File

@@ -5,30 +5,30 @@ namespace Zotlabs\Daemon;
class Thumbnail {
static public function run($argc,$argv) {
static public function run($argc, $argv) {
if(! $argc == 2)
if (!$argc == 2)
return;
$c = q("select * from attach where hash = '%s' ",
dbesc($argv[1])
);
if(! $c)
if (!$c)
return;
$attach = $c[0];
$preview_style = intval(get_config('system','thumbnail_security',0));
$preview_width = intval(get_config('system','thumbnail_width',300));
$preview_height = intval(get_config('system','thumbnail_height',300));
$preview_style = intval(get_config('system', 'thumbnail_security', 0));
$preview_width = intval(get_config('system', 'thumbnail_width', 300));
$preview_height = intval(get_config('system', 'thumbnail_height', 300));
$p = [
'attach' => $attach,
'preview_style' => $preview_style,
'preview_width' => $preview_width,
'preview_height' => $preview_height,
'thumbnail' => null
'thumbnail' => null
];
/**
@@ -40,39 +40,39 @@ class Thumbnail {
* * \e string \b thumbnail
*/
call_hooks('thumbnail',$p);
if($p['thumbnail']) {
call_hooks('thumbnail', $p);
if ($p['thumbnail']) {
return;
}
$default_controller = null;
$files = glob('Zotlabs/Thumbs/*.php');
if($files) {
foreach($files as $f) {
$clsname = '\\Zotlabs\\Thumbs\\' . ucfirst(basename($f,'.php'));
if(class_exists($clsname)) {
if ($files) {
foreach ($files as $f) {
$clsname = '\\Zotlabs\\Thumbs\\' . ucfirst(basename($f, '.php'));
if (class_exists($clsname)) {
$x = new $clsname();
if(method_exists($x,'Match')) {
if (method_exists($x, 'Match')) {
$matched = $x->Match($attach['filetype']);
if($matched) {
$x->Thumb($attach,$preview_style,$preview_width,$preview_height);
if ($matched) {
$x->Thumb($attach, $preview_style, $preview_width, $preview_height);
}
}
if(method_exists($x,'MatchDefault')) {
$default_matched = $x->MatchDefault(substr($attach['filetype'],0,strpos($attach['filetype'],'/')));
if($default_matched) {
if (method_exists($x, 'MatchDefault')) {
$default_matched = $x->MatchDefault(substr($attach['filetype'], 0, strpos($attach['filetype'], '/')));
if ($default_matched) {
$default_controller = $x;
}
}
}
}
}
if(($default_controller)
&& ((! file_exists(dbunescbin($attach['content']) . '.thumb'))
if (($default_controller)
&& ((!file_exists(dbunescbin($attach['content']) . '.thumb'))
|| (filectime(dbunescbin($attach['content']) . 'thumb') < (time() - 60)))) {
$default_controller->Thumb($attach,$preview_style,$preview_width,$preview_height);
$default_controller->Thumb($attach, $preview_style, $preview_width, $preview_height);
}
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace Zotlabs\Identity\BasicId;
namespace Zotlabs\Identity;
class BasicId {

View File

@@ -64,7 +64,7 @@ class OAuth2Storage extends \OAuth2\Storage\Pdo {
return( [
'webfinger' => channel_reddress($x),
'portable_id' => $x['channel_hash'],
'email' => $a['account_email'],
'email' => $a[0]['account_email'],
'username' => $x['channel_address'],
'user_id' => $x['channel_id'],
'name' => $x['channel_name'],

View File

@@ -1,5 +1,5 @@
<?php
namespace Zotlabs\Identity\ProfilePhoto;
namespace Zotlabs\Identity;
class ProfilePhoto {

View File

@@ -0,0 +1,150 @@
<?php
namespace Zotlabs\Lib;
/**
* Class for dealing with fetching ActivityStreams collections (ordered or unordered, normal or paged).
* Construct with either an existing object or url and an optional channel to sign requests.
* $direction is 0 (default) to fetch from the beginning, and 1 to fetch from the end and reverse order the resultant array.
* An optional limit to the number of records returned may also be specified.
* Use $class->get() to return an array of collection members.
*/
class ASCollection {
private $channel = null;
private $nextpage = null;
private $limit = 0;
private $direction = 0; // 0 = forward, 1 = reverse
private $data = [];
private $history = [];
function __construct($obj, $channel = null, $direction = 0, $limit = 0) {
$this->channel = $channel;
$this->direction = $direction;
$this->limit = $limit;
if (is_array($obj)) {
$data = $obj;
}
if (is_string($obj)) {
$data = Activity::fetch($obj, $channel);
$this->history[] = $obj;
}
if (!is_array($data)) {
return;
}
if (!in_array($data['type'], ['Collection', 'OrderedCollection', 'OrderedCollectionPage'])) {
return false;
}
if ($this->direction) {
if (array_key_exists('last', $data) && $data['last']) {
$this->nextpage = $data['last'];
}
}
else {
if (array_key_exists('first', $data) && $data['first']) {
$this->nextpage = $data['first'];
}
}
if (isset($data['items']) && is_array($data['items'])) {
$this->data = (($this->direction) ? array_reverse($data['items']) : $data['items']);
}
elseif (isset($data['orderedItems']) && is_array($data['orderedItems'])) {
$this->data = (($this->direction) ? array_reverse($data['orderedItems']) : $data['orderedItems']);
}
if ($this->limit) {
if (count($this->data) > $limit) {
$this->data = array_slice($this->data, 0, $limit);
return;
}
}
do {
$x = $this->next();
} while ($x);
}
function get() {
return $this->data;
}
function next() {
if (!$this->nextpage) {
return false;
}
if (is_array($this->nextpage)) {
$data = $this->nextpage;
}
if (is_string($this->nextpage)) {
if (in_array($this->nextpage, $this->history)) {
// recursion detected
return false;
}
$data = Activity::fetch($this->nextpage, $this->channel);
$this->history[] = $this->nextpage;
}
if (!is_array($data)) {
return false;
}
if (!in_array($data['type'], ['CollectionPage', 'OrderedCollectionPage'])) {
return false;
}
$this->setnext($data);
if (isset($data['items']) && is_array($data['items'])) {
$this->data = array_merge($this->data, (($this->direction) ? array_reverse($data['items']) : $data['items']));
}
elseif (isset($data['orderedItems']) && is_array($data['orderedItems'])) {
$this->data = array_merge($this->data, (($this->direction) ? array_reverse($data['orderedItems']) : $data['orderedItems']));
}
if ($this->limit) {
if (count($this->data) > $this->limit) {
$this->data = array_slice($this->data, 0, $this->limit);
$this->nextpage = false;
return true;
}
}
return true;
}
function setnext($data) {
if ($this->direction) {
if (array_key_exists('prev', $data) && $data['prev']) {
$this->nextpage = $data['prev'];
}
elseif (array_key_exists('first', $data) && $data['first']) {
$this->nextpage = $data['first'];
}
else {
$this->nextpage = false;
}
}
else {
if (array_key_exists('next', $data) && $data['next']) {
$this->nextpage = $data['next'];
}
elseif (array_key_exists('last', $data) && $data['last']) {
$this->nextpage = $data['last'];
}
else {
$this->nextpage = false;
}
}
logger('nextpage: ' . $this->nextpage, LOGGER_DEBUG);
}
}

411
Zotlabs/Lib/AccessList.php Normal file
View File

@@ -0,0 +1,411 @@
<?php
namespace Zotlabs\Lib;
use Zotlabs\Lib\Libsync;
class AccessList {
static function add($uid,$name,$public = 0) {
$ret = false;
if ($uid && $name) {
$r = self::byname($uid,$name); // check for dups
if ($r !== false) {
// This could be a problem.
// Let's assume we've just created a list which we once deleted
// all the old members are gone, but the list remains so we don't break any security
// access lists. What we're doing here is reviving the dead list, but old content which
// was restricted to this list may now be seen by the new list members.
$z = q("SELECT * FROM pgrp WHERE id = %d LIMIT 1",
intval($r)
);
if(($z) && $z[0]['deleted']) {
q('UPDATE pgrp SET deleted = 0 WHERE id = %d', intval($z[0]['id']));
notice( t('A deleted list with this name was revived. Existing item permissions <strong>may</strong> apply to this list and any future members. If this is not what you intended, please create another list with a different name.') . EOL);
}
return true;
}
$hash = new_uuid();
$r = q("INSERT INTO pgrp ( hash, uid, visible, gname )
VALUES( '%s', %d, %d, '%s' ) ",
dbesc($hash),
intval($uid),
intval($public),
dbesc($name)
);
$ret = $r;
}
Libsync::build_sync_packet($uid,null,true);
return $ret;
}
static function remove($uid,$name) {
$ret = false;
if ($uid && $name) {
$r = q("SELECT id, hash FROM pgrp WHERE uid = %d AND gname = '%s' LIMIT 1",
intval($uid),
dbesc($name)
);
if ($r) {
$group_id = $r[0]['id'];
$group_hash = $r[0]['hash'];
}
else {
return false;
}
// remove group from default posting lists
$r = q("SELECT channel_default_group, channel_allow_gid, channel_deny_gid FROM channel WHERE channel_id = %d LIMIT 1",
intval($uid)
);
if ($r) {
$user_info = array_shift($r);
$change = false;
if ($user_info['channel_default_group'] == $group_hash) {
$user_info['channel_default_group'] = '';
$change = true;
}
if (strpos($user_info['channel_allow_gid'], '<' . $group_hash . '>') !== false) {
$user_info['channel_allow_gid'] = str_replace('<' . $group_hash . '>', '', $user_info['channel_allow_gid']);
$change = true;
}
if (strpos($user_info['channel_deny_gid'], '<' . $group_hash . '>') !== false) {
$user_info['channel_deny_gid'] = str_replace('<' . $group_hash . '>', '', $user_info['channel_deny_gid']);
$change = true;
}
if ($change) {
q("UPDATE channel SET channel_default_group = '%s', channel_allow_gid = '%s', channel_deny_gid = '%s'
WHERE channel_id = %d",
intval($user_info['channel_default_group']),
dbesc($user_info['channel_allow_gid']),
dbesc($user_info['channel_deny_gid']),
intval($uid)
);
}
}
// remove all members
$r = q("DELETE FROM pgrp_member WHERE uid = %d AND gid = %d ",
intval($uid),
intval($group_id)
);
// remove group
$r = q("UPDATE pgrp SET deleted = 1 WHERE uid = %d AND gname = '%s'",
intval($uid),
dbesc($name)
);
$ret = $r;
}
Libsync::build_sync_packet($uid,null,true);
return $ret;
}
// returns the integer id of an access group owned by $uid and named $name
// or false.
static function byname($uid,$name) {
if (! ($uid && $name)) {
return false;
}
$r = q("SELECT id FROM pgrp WHERE uid = %d AND gname = '%s' LIMIT 1",
intval($uid),
dbesc($name)
);
if ($r) {
return $r[0]['id'];
}
return false;
}
static function by_id($uid,$id) {
if (! ($uid && $id)) {
return false;
}
$r = q("SELECT * FROM pgrp WHERE uid = %d AND id = %d and deleted = 0",
intval($uid),
intval($id)
);
if ($r) {
return array_shift($r);
}
return false;
}
static function rec_byhash($uid,$hash) {
if (! ( $uid && $hash)) {
return false;
}
$r = q("SELECT * FROM pgrp WHERE uid = %d AND hash = '%s' LIMIT 1",
intval($uid),
dbesc($hash)
);
if ($r) {
return array_shift($r);
}
return false;
}
static function member_remove($uid,$name,$member) {
$gid = self::byname($uid,$name);
if (! $gid) {
return false;
}
if (! ($uid && $gid && $member)) {
return false;
}
$r = q("DELETE FROM pgrp_member WHERE uid = %d AND gid = %d AND xchan = '%s' ",
intval($uid),
intval($gid),
dbesc($member)
);
Libsync::build_sync_packet($uid,null,true);
return $r;
}
static function member_add($uid,$name,$member,$gid = 0) {
if (! $gid) {
$gid = self::byname($uid,$name);
}
if (! ($gid && $uid && $member)) {
return false;
}
$r = q("SELECT * FROM pgrp_member WHERE uid = %d AND gid = %d AND xchan = '%s' LIMIT 1",
intval($uid),
intval($gid),
dbesc($member)
);
if ($r) {
return true; // You might question this, but
// we indicate success because the group member was in fact created
// -- It was just created at another time
}
else {
$r = q("INSERT INTO pgrp_member (uid, gid, xchan)
VALUES( %d, %d, '%s' ) ",
intval($uid),
intval($gid),
dbesc($member)
);
}
Libsync::build_sync_packet($uid,null,true);
return $r;
}
static function members($uid, $gid) {
$ret = [];
if (intval($gid)) {
$r = q("SELECT * FROM pgrp_member
LEFT JOIN abook ON abook_xchan = pgrp_member.xchan left join xchan on xchan_hash = abook_xchan
WHERE gid = %d AND abook_channel = %d and pgrp_member.uid = %d and xchan_deleted = 0 and abook_self = 0 and abook_blocked = 0 and abook_pending = 0 ORDER BY xchan_name ASC ",
intval($gid),
intval($uid),
intval($uid)
);
if ($r) {
$ret = $r;
}
}
return $ret;
}
static function members_xchan($uid,$gid) {
$ret = [];
if (intval($gid)) {
$r = q("SELECT xchan FROM pgrp_member WHERE gid = %d AND uid = %d",
intval($gid),
intval($uid)
);
if ($r) {
foreach ($r as $rv) {
$ret[] = $rv['xchan'];
}
}
}
return $ret;
}
static function members_profile_xchan($uid,$gid) {
$ret = [];
if (intval($gid)) {
$r = q("SELECT abook_xchan as xchan from abook left join profile on abook_profile = profile_guid where profile.id = %d and profile.uid = %d",
intval($gid),
intval($uid)
);
if ($r) {
foreach($r as $rv) {
$ret[] = $rv['xchan'];
}
}
}
return $ret;
}
static function select($uid,$group = '') {
$grps = [];
$r = q("SELECT * FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval($uid)
);
$grps[] = [ 'name' => '', 'hash' => '0', 'selected' => '' ];
if ($r) {
foreach ($r as $rr) {
$grps[] = [ 'name' => $rr['gname'], 'id' => $rr['hash'], 'selected' => (($group == $rr['hash']) ? 'true' : '') ];
}
}
return replace_macros(get_markup_template('group_selection.tpl'), [
'$label' => t('Add new connections to this access list'),
'$groups' => $grps
]);
}
static function widget($every="connections",$each="lists",$edit = false, $group_id = 0, $cid = '',$mode = 1) {
$o = '';
$groups = [];
$r = q("SELECT * FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval($_SESSION['uid'])
);
$member_of = [];
if ($cid) {
$member_of = self::containing(local_channel(),$cid);
}
if ($r) {
foreach ($r as $rr) {
$selected = (($group_id == $rr['id']) ? ' group-selected' : '');
if ($edit) {
$groupedit = [ 'href' => "lists/".$rr['id'], 'title' => t('edit') ];
}
else {
$groupedit = null;
}
$groups[] = [
'id' => $rr['id'],
'enc_cid' => base64url_encode($cid),
'cid' => $cid,
'text' => $rr['gname'],
'selected' => $selected,
'href' => (($mode == 0) ? $each.'?f=&gid='.$rr['id'] : $each."/".$rr['id']) . ((x($_GET,'new')) ? '&new=' . $_GET['new'] : '') . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : ''),
'edit' => $groupedit,
'ismember' => in_array($rr['id'],$member_of),
];
}
}
return replace_macros(get_markup_template('group_side.tpl'), [
'$title' => t('Lists'),
'$edittext' => t('Edit list'),
'$createtext' => t('Create new list'),
'$ungrouped' => (($every === 'contacts') ? t('Channels not in any access list') : ''),
'$groups' => $groups,
'$add' => t('add'),
]);
}
static function expand($g) {
if (! (is_array($g) && count($g))) {
return [];
}
$ret = [];
$x = [];
// private profile linked virtual groups
foreach ($g as $gv) {
if (substr($gv,0,3) === 'vp.') {
$profile_hash = substr($gv,3);
if ($profile_hash) {
$r = q("select abook_xchan from abook where abook_profile = '%s'",
dbesc($profile_hash)
);
if ($r) {
foreach ($r as $rv) {
$ret[] = $rv['abook_xchan'];
}
}
}
}
else {
$x[] = $gv;
}
}
if ($x) {
stringify_array_elms($x,true);
$groups = implode(',', $x);
if ($groups) {
$r = q("SELECT xchan FROM pgrp_member WHERE gid IN ( select id from pgrp where hash in ( $groups ))");
if ($r) {
foreach ($r as $rv) {
$ret[] = $rv['xchan'];
}
}
}
}
return $ret;
}
static function member_of($c) {
$r = q("SELECT pgrp.gname, pgrp.id FROM pgrp LEFT JOIN pgrp_member ON pgrp_member.gid = pgrp.id
WHERE pgrp_member.xchan = '%s' AND pgrp.deleted = 0 ORDER BY pgrp.gname ASC ",
dbesc($c)
);
return $r;
}
static function containing($uid,$c) {
$r = q("SELECT gid FROM pgrp_member WHERE uid = %d AND pgrp_member.xchan = '%s' ",
intval($uid),
dbesc($c)
);
$ret = [];
if ($r) {
foreach ($r as $rv)
$ret[] = $rv['gid'];
}
return $ret;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -9,19 +9,21 @@ namespace Zotlabs\Lib;
*/
class ActivityStreams {
public $raw = null;
public $data;
public $valid = false;
public $id = '';
public $type = '';
public $actor = null;
public $obj = null;
public $tgt = null;
public $raw = null;
public $data = null;
public $valid = false;
public $deleted = false;
public $id = '';
public $parent_id = '';
public $type = '';
public $actor = null;
public $obj = null;
public $tgt = null;
public $origin = null;
public $owner = null;
public $owner = null;
public $signer = null;
public $ldsig = null;
public $sigok = false;
public $ldsig = null;
public $sigok = false;
public $recips = null;
public $raw_recips = null;
@@ -34,33 +36,89 @@ class ActivityStreams {
*/
function __construct($string) {
$this->raw = $string;
$this->data = json_decode($string, true);
$this->raw = $string;
if($this->data) {
$this->valid = true;
if (is_array($string)) {
$this->data = $string;
}
else {
$this->data = json_decode($string, true);
}
if($this->is_valid()) {
if ($this->data) {
// verify and unpack JSalmon signature if present
if (is_array($this->data) && array_key_exists('signed', $this->data)) {
$ret = JSalmon::verify($this->data);
$tmp = JSalmon::unpack($this->data['data']);
if ($ret && $ret['success']) {
if ($ret['signer']) {
$saved = json_encode($this->data, JSON_UNESCAPED_SLASHES);
$this->data = $tmp;
$this->data['signer'] = $ret['signer'];
$this->data['signed_data'] = $saved;
if ($ret['hubloc']) {
$this->data['hubloc'] = $ret['hubloc'];
}
}
}
}
$this->valid = true;
if (array_key_exists('type', $this->data) && array_key_exists('actor', $this->data) && array_key_exists('object', $this->data)) {
if ($this->data['type'] === 'Delete' && $this->data['actor'] === $this->data['object']) {
$this->deleted = $this->data['actor'];
$this->valid = false;
}
}
}
if ($this->is_valid()) {
$this->id = $this->get_property_obj('id');
$this->type = $this->get_primary_type();
$this->actor = $this->get_compound_property('actor');
$this->actor = $this->get_actor('actor', '', '');
$this->obj = $this->get_compound_property('object');
$this->tgt = $this->get_compound_property('target');
$this->origin = $this->get_compound_property('origin');
$this->recips = $this->collect_recips();
$this->ldsig = $this->get_compound_property('signature');
if($this->ldsig) {
$this->signer = $this->get_compound_property('creator',$this->ldsig);
if($this->signer && $this->signer['publicKey'] && $this->signer['publicKey']['publicKeyPem']) {
$this->sigok = \Zotlabs\Lib\LDSignatures::verify($this->data,$this->signer['publicKey']['publicKeyPem']);
if ($this->ldsig) {
$this->signer = $this->get_compound_property('creator', $this->ldsig);
if ($this->signer && is_array($this->signer) && array_key_exists('publicKey', $this->signer) && is_array($this->signer['publicKey']) && $this->signer['publicKey']['publicKeyPem']) {
$this->sigok = LDSignatures::verify($this->data, $this->signer['publicKey']['publicKeyPem']);
}
}
if(($this->type === 'Note') && (! $this->obj)) {
$this->obj = $this->data;
if (!$this->obj) {
$this->obj = $this->data;
$this->type = 'Create';
if (!$this->actor) {
$this->actor = $this->get_actor('attributedTo', $this->obj);
}
}
// fetch recursive or embedded activities
if ($this->obj && is_array($this->obj) && array_key_exists('object', $this->obj)) {
$this->obj['object'] = $this->get_compound_property($this->obj['object']);
}
if ($this->obj && is_array($this->obj) && $this->obj['actor'])
$this->obj['actor'] = $this->get_actor('actor', $this->obj);
if ($this->tgt && is_array($this->tgt) && $this->tgt['actor'])
$this->tgt['actor'] = $this->get_actor('actor', $this->tgt);
$this->parent_id = $this->get_property_obj('inReplyTo');
if ((!$this->parent_id) && is_array($this->obj)) {
$this->parent_id = $this->obj['inReplyTo'];
}
if ((!$this->parent_id) && is_array($this->obj)) {
$this->parent_id = $this->obj['id'];
}
}
}
@@ -87,15 +145,20 @@ class ActivityStreams {
*/
function collect_recips($base = '', $namespace = '') {
$x = [];
$fields = [ 'to', 'cc', 'bto', 'bcc', 'audience'];
foreach($fields as $f) {
$y = $this->get_compound_property($f, $base, $namespace);
if($y) {
$x = array_merge($x, $y);
if(! is_array($this->raw_recips))
$this->raw_recips = [];
$this->raw_recips[$f] = $x;
$fields = ['to', 'cc', 'bto', 'bcc', 'audience'];
foreach ($fields as $f) {
$y = $this->get_compound_property($f, $base, $namespace);
if ($y) {
if (!is_array($this->raw_recips)) {
$this->raw_recips = [];
}
if (!is_array($y)) {
$y = [$y];
}
$this->raw_recips[$f] = $y;
$x = array_merge($x, $y);
}
}
// not yet ready for prime time
@@ -103,21 +166,21 @@ class ActivityStreams {
return $x;
}
function expand($arr,$base = '',$namespace = '') {
function expand($arr, $base = '', $namespace = '') {
$ret = [];
// right now use a hardwired recursion depth of 5
for($z = 0; $z < 5; $z ++) {
if(is_array($arr) && $arr) {
foreach($arr as $a) {
if(is_array($a)) {
for ($z = 0; $z < 5; $z++) {
if (is_array($arr) && $arr) {
foreach ($arr as $a) {
if (is_array($a)) {
$ret[] = $a;
}
else {
$x = $this->get_compound_property($a,$base,$namespace);
if($x) {
$ret = array_merge($ret,$x);
$x = $this->get_compound_property($a, $base, $namespace);
if ($x) {
$ret = array_merge($ret, $x);
}
}
}
@@ -138,33 +201,33 @@ class ActivityStreams {
*/
function get_namespace($base, $namespace) {
if(! $namespace)
if (!$namespace)
return '';
$key = null;
foreach( [ $this->data, $base ] as $b ) {
if(! $b)
foreach ([$this->data, $base] as $b) {
if (!$b)
continue;
if(array_key_exists('@context', $b)) {
if(is_array($b['@context'])) {
foreach($b['@context'] as $ns) {
if(is_array($ns)) {
foreach($ns as $k => $v) {
if($namespace === $v)
if (array_key_exists('@context', $b)) {
if (is_array($b['@context'])) {
foreach ($b['@context'] as $ns) {
if (is_array($ns)) {
foreach ($ns as $k => $v) {
if ($namespace === $v)
$key = $k;
}
}
else {
if($namespace === $ns) {
if ($namespace === $ns) {
$key = '';
}
}
}
}
else {
if($namespace === $b['@context']) {
if ($namespace === $b['@context']) {
$key = '';
}
}
@@ -184,34 +247,45 @@ class ActivityStreams {
*/
function get_property_obj($property, $base = '', $namespace = '') {
$prefix = $this->get_namespace($base, $namespace);
if($prefix === null)
if ($prefix === null)
return null;
$base = (($base) ? $base : $this->data);
$base = (($base) ? $base : $this->data);
$propname = (($prefix) ? $prefix . ':' : '') . $property;
if (!is_array($base)) {
btlogger('not an array: ' . print_r($base, true));
return null;
}
return ((array_key_exists($propname, $base)) ? $base[$propname] : null);
}
/**
* @brief Fetches a property from an URL.
*
* @param string $url
* @return NULL|mixed
*/
function fetch_property($url) {
$redirects = 0;
if(! check_siteallowed($url)) {
logger('blacklisted: ' . $url);
return null;
return self::fetch($url);
}
static function fetch($url, $channel = null) {
return Activity::fetch($url, $channel);
}
static function is_an_actor($s) {
return (in_array($s, ['Application', 'Group', 'Organization', 'Person', 'Service']));
}
static function is_response_activity($s) {
if (!$s) {
return false;
}
$x = z_fetch_url($url, true, $redirects,
['headers' => [ 'Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ]]);
if($x['success'])
return json_decode($x['body'], true);
return null;
return (in_array($s, ['Like', 'Dislike', 'Flag', 'Block', 'Accept', 'Reject', 'TentativeAccept', 'TentativeReject', 'emojiReaction', 'EmojiReaction', 'EmojiReact']));
}
/**
@@ -222,10 +296,71 @@ class ActivityStreams {
* @param string $namespace (optional) default empty
* @return NULL|mixed
*/
function get_compound_property($property, $base = '', $namespace = '') {
function get_actor($property, $base = '', $namespace = '') {
$x = $this->get_property_obj($property, $base, $namespace);
if($this->is_url($x)) {
$x = $this->fetch_property($x);
if ($this->is_url($x)) {
// SECURITY: If we have already stored the actor profile, re-generate it
// from cached data - don't refetch it from the network
$r = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' limit 1",
dbesc($x)
);
if ($r) {
$y = Activity::encode_person($r[0]);
$y['cached'] = true;
return $y;
}
}
$actor = $this->get_compound_property($property, $base, $namespace, true);
if (is_array($actor) && self::is_an_actor($actor['type'])) {
if (array_key_exists('id', $actor) && (!array_key_exists('inbox', $actor))) {
$actor = $this->fetch_property($actor['id']);
}
return $actor;
}
return null;
}
/**
* @brief
*
* @param string $property
* @param array $base
* @param string $namespace (optional) default empty
* @param boolean $first (optional) default false, if true and result is a sequential array return only the first element
* @return NULL|mixed
*/
function get_compound_property($property, $base = '', $namespace = '', $first = false) {
$x = $this->get_property_obj($property, $base, $namespace);
if ($this->is_url($x)) {
$y = $this->fetch_property($x);
if (is_array($y)) {
$x = $y;
}
}
// verify and unpack JSalmon signature if present
if (is_array($x) && array_key_exists('signed', $x)) {
$ret = JSalmon::verify($x);
$tmp = JSalmon::unpack($x['data']);
if ($ret && $ret['success']) {
if ($ret['signer']) {
$saved = json_encode($x, JSON_UNESCAPED_SLASHES);
$x = $tmp;
$x['signer'] = $ret['signer'];
$x['signed_data'] = $saved;
if ($ret['hubloc']) {
$x['hubloc'] = $ret['hubloc'];
}
}
}
}
if ($first && is_array($x) && array_key_exists(0, $x)) {
return $x[0];
}
return $x;
@@ -238,7 +373,7 @@ class ActivityStreams {
* @return boolean
*/
function is_url($url) {
if(($url) && (! is_array($url)) && (strpos($url, 'http') === 0)) {
if (($url) && (!is_array($url)) && (strpos($url, 'http') === 0)) {
return true;
}
@@ -253,13 +388,13 @@ class ActivityStreams {
* @return NULL|mixed
*/
function get_primary_type($base = '', $namespace = '') {
if(! $base)
if (!$base)
$base = $this->data;
$x = $this->get_property_obj('type', $base, $namespace);
if(is_array($x)) {
foreach($x as $y) {
if(strpos($y, ':') === false) {
if (is_array($x)) {
foreach ($x as $y) {
if (strpos($y, ':') === false) {
return $y;
}
}
@@ -273,4 +408,33 @@ class ActivityStreams {
return $x;
}
}
static function is_as_request($channel = null) {
$hookdata = [];
if ($channel)
$hookdata['channel'] = $channel;
$hookdata['data'] = ['application/x-zot-activity+json'];
call_hooks('is_as_request', $hookdata);
$x = getBestSupportedMimeType($hookdata['data']);
return (($x) ? true : false);
}
static function get_accept_header_string($channel = null) {
$hookdata = [];
if ($channel)
$hookdata['channel'] = $channel;
$hookdata['data'] = 'application/x-zot-activity+json';
call_hooks('get_accept_header_string', $hookdata);
return $hookdata['data'];
}
}

View File

@@ -12,8 +12,16 @@ class Api_router {
}
static function find($path) {
if(array_key_exists($path,self::$routes))
if (array_key_exists($path,self::$routes)) {
return self::$routes[$path];
}
$with_params = dirname($path) . '/[id]';
if (array_key_exists($with_params,self::$routes)) {
return self::$routes[$with_params];
}
return null;
}

View File

@@ -1,32 +1,36 @@
<?php /** @file */
<?php
namespace Zotlabs\Lib;
/**
* Apps
*
*/
use Zotlabs\Lib\Libsync;
require_once('include/plugin.php');
require_once('include/channel.php');
/**
* @brief Apps class.
*
*/
class Apps {
static public $available_apps = null;
static public $installed_apps = null;
static public $base_apps = null;
/**
* @brief
*
* @param boolean $translate (optional) default true
* @return array
*/
static public function get_system_apps($translate = true) {
$ret = [];
$ret = array();
if(is_dir('apps'))
$files = glob('apps/*.apd');
else
$files = glob('app/*.apd');
if($files) {
foreach($files as $f) {
$x = self::parse_app_description($f,$translate);
@@ -50,14 +54,17 @@ class Apps {
}
}
call_hooks('get_system_apps',$ret);
/**
* @hooks get_system_apps
* Hook to manipulate the system apps array.
*/
call_hooks('get_system_apps', $ret);
return $ret;
}
static public function get_base_apps() {
return get_config('system','base_apps',[
$x = get_config('system','base_apps',[
'Connections',
'Network',
'Settings',
@@ -65,13 +72,20 @@ class Apps {
'Channel Home',
'View Profile',
'Photos',
'Events',
'Calendar',
'Directory',
'Search',
'Help',
'Mail',
'Profile Photo'
]);
/**
* @hooks get_base_apps
* Hook to manipulate the base apps array.
*/
call_hooks('get_base_apps', $x);
return $x;
}
static public function import_system_apps() {
@@ -79,7 +93,7 @@ class Apps {
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");
@@ -104,6 +118,7 @@ class Apps {
// $id will be boolean true or false to install an app, or an integer id to update an existing app
if($id === false)
continue;
if($id !== true) {
// if we already installed this app, but it changed, preserve any categories we created
$s = EMPTY_STR;
@@ -124,16 +139,17 @@ class Apps {
$app['guid'] = hash('whirlpool',$app['name']);
$app['system'] = 1;
self::app_install(local_channel(),$app);
}
}
}
}
/**
* Install the system app if no system apps have been installed, or if a new system app
* Install the system app if no system apps have been installed, or if a new system app
* is discovered, or if the version of a system app changes.
*
* @param array $app
* @return boolean|int
*/
static public function check_install_system_app($app) {
if((! is_array(self::$available_apps)) || (! count(self::$available_apps))) {
return true;
@@ -157,17 +173,16 @@ class Apps {
return $notfound;
}
/**
* Install the system app if no system apps have been installed, or if a new system app
* is discovered, or if the version of a system app changes.
* Install the personal app if no personal apps have been installed, or if a new personal app
* is discovered, or if the version of a personal app changes.
*
* @param array $app
* @return boolean|int
*/
static public function check_install_personal_app($app) {
$installed = false;
foreach(self::$installed_apps as $iapp) {
foreach(self::$installed_apps as $iapp) {
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
$installed = true;
if(($iapp['app_version'] != $app['version'])
@@ -187,19 +202,24 @@ class Apps {
return strcasecmp($a['name'],$b['name']);
}
static public function parse_app_description($f,$translate = true) {
$ret = array();
/**
* @brief Parse app description.
*
* @param string $f filename
* @param boolean $translate (optional) default true
* @return boolean|array
*/
static public function parse_app_description($f, $translate = true) {
$ret = [];
$matches = [];
$baseurl = z_root();
$channel = \App::get_channel();
$address = (($channel) ? $channel['channel_address'] : '');
//$channel = \App::get_channel();
//$address = (($channel) ? $channel['channel_address'] : '');
//future expansion
$observer = \App::get_observer();
$lines = @file($f);
if($lines) {
@@ -208,7 +228,7 @@ class Apps {
$ret[$matches[1]] = trim($matches[2]);
}
}
}
}
if(! $ret['photo'])
$ret['photo'] = $baseurl . '/' . get_default_profile_photo(80);
@@ -287,39 +307,44 @@ class Apps {
}
}
}
if($ret) {
if(isset($ret)) {
if($translate)
self::translate_system_apps($ret);
return $ret;
}
return false;
}
}
static public function translate_system_apps(&$arr) {
$apps = array(
'Apps' => t('Apps'),
'Affinity Tool' => t('Affinity Tool'),
'Articles' => t('Articles'),
'Cards' => t('Cards'),
'Admin' => t('Site Admin'),
'Report Bug' => t('Report Bug'),
'Bookmarks' => t('Bookmarks'),
'Chatrooms' => t('Chatrooms'),
'Content Filter' => t('Content Filter'),
'Content Import' => t('Content Import'),
'Connections' => t('Connections'),
'Remote Diagnostics' => t('Remote Diagnostics'),
'Suggest Channels' => t('Suggest Channels'),
'Login' => t('Login'),
'Channel Manager' => t('Channel Manager'),
'Channel Manager' => t('Channel Manager'),
'Network' => t('Stream'),
'Settings' => t('Settings'),
'Files' => t('Files'),
'Webpages' => t('Webpages'),
'Wiki' => t('Wiki'),
'Channel Home' => t('Channel Home'),
'Channel Home' => t('Channel Home'),
'View Profile' => t('View Profile'),
'Photos' => t('Photos'),
'Events' => t('Events'),
'Directory' => t('Directory'),
'Photos' => t('Photos'),
'Calendar' => t('Calendar'),
'Directory' => t('Directory'),
'Help' => t('Help'),
'Mail' => t('Mail'),
'Mood' => t('Mood'),
@@ -339,7 +364,6 @@ class Apps {
'Privacy Groups' => t('Privacy Groups'),
'Notifications' => t('Notifications'),
'Order Apps' => t('Order Apps'),
'CalDAV' => t('CalDAV'),
'CardDAV' => t('CardDAV'),
'Channel Sources' => t('Channel Sources'),
'Guest Access' => t('Guest Access'),
@@ -348,7 +372,6 @@ class Apps {
'OAuth2 Apps Manager' => t('OAuth2 Apps Manager'),
'PDL Editor' => t('PDL Editor'),
'Permission Categories' => t('Permission Categories'),
'Premium Channel' => t('Premium Channel'),
'Public Stream' => t('Public Stream'),
'My Chatrooms' => t('My Chatrooms'),
'Channel Export' => t('Channel Export')
@@ -364,30 +387,31 @@ class Apps {
if(array_key_exists($arr[$x]['name'],$apps)) {
$arr[$x]['name'] = $apps[$arr[$x]['name']];
} else {
// Try to guess by app name if not in list
$arr[$x]['name'] = t(trim($arr[$x]['name']));
// Try to guess by app name if not in list
$arr[$x]['name'] = t(trim($arr[$x]['name']));
}
}
}
}
// papp is a portable app
static public function app_render($papp,$mode = 'view') {
/**
* modes:
* view: normal mode for viewing an app via bbcode from a conversation or page
* provides install/update button if you're logged in locally
* install: like view but does not display app-bin options if they are present
* list: normal mode for viewing an app on the app page
* no buttons are shown
* edit: viewing the app page in editing mode provides a delete button
* nav: render apps for app-bin
*/
/**
* @brief
*
* @param array $papp
* papp is a portable app
* @param string $mode (optional) default 'view'
* Render modes:
* * \b view: normal mode for viewing an app via bbcode from a conversation or page
* provides install/update button if you're logged in locally
* * \b install: like view but does not display app-bin options if they are present
* * \b list: normal mode for viewing an app on the app page
* no buttons are shown
* * \b edit: viewing the app page in editing mode provides a delete button
* * \b nav: render apps for app-bin
*
* @return void|string Parsed HTML
*/
static public function app_render($papp, $mode = 'view') {
$installed = false;
if(! $papp)
@@ -412,7 +436,7 @@ class Apps {
$sys = get_sys_channel();
$view_channel = $sys['channel_id'];
}
self::app_macros($view_channel,$papp);
self::app_macros($view_channel,$papp);
}
if(strpos($papp['url'], ',')) {
@@ -425,7 +449,6 @@ class Apps {
$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)) {
@@ -501,13 +524,13 @@ class Apps {
}
elseif(remote_channel()) {
$observer = \App::get_observer();
if($observer && $observer['xchan_network'] === 'zot') {
if($observer && in_array($observer['xchan_network'], ['zot6', 'zot'])) {
// some folks might have xchan_url redirected offsite, use the connurl
$x = parse_url($observer['xchan_connurl']);
if($x) {
$hosturl = $x['scheme'] . '://' . $x['host'] . '/';
}
}
}
}
$install_action = (($installed) ? t('Update') : t('Install'));
@@ -541,7 +564,8 @@ class Apps {
'$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
'$pinned' => ((strpos($papp['categories'], 'nav_pinned_app') === false) ? false : true),
'$navapps' => (($mode == 'nav') ? true : false),
'$order' => (($mode == 'nav-order') ? true : false),
'$order' => (($mode === 'nav-order' || $mode === 'nav-order-pinned') ? true : false),
'$mode' => $mode,
'$add' => t('Add to app-tray'),
'$remove' => t('Remove from app-tray'),
'$add_nav' => t('Pin to navbar'),
@@ -581,7 +605,7 @@ class Apps {
intval(TERM_OBJ_APP),
intval($r[0]['id'])
);
build_sync_packet($uid,array('app' => $r[0]));
Libsync::build_sync_packet($uid,array('app' => $r[0]));
}
}
}
@@ -590,8 +614,14 @@ class Apps {
return false;
}
static public function can_delete($uid,$app) {
/**
* @brief
*
* @param mixed $uid If not set return false, otherwise no influence
* @param array $app
* @return boolean
*/
static public function can_delete($uid, $app) {
if(! $uid) {
return false;
}
@@ -599,7 +629,7 @@ class Apps {
$base_apps = self::get_base_apps();
if($base_apps) {
foreach($base_apps as $b) {
if($app['guid'] === hash('whirlpool',$b)) {
if($app['guid'] === hash('whirlpool', $b)) {
return false;
}
}
@@ -611,7 +641,6 @@ class Apps {
static public function app_destroy($uid,$app) {
if($uid && $app['guid']) {
$x = q("select * from app where app_id = '%s' and app_channel = %d limit 1",
dbesc($app['guid']),
intval($uid)
@@ -620,7 +649,7 @@ class Apps {
if(! intval($x[0]['app_deleted'])) {
$x[0]['app_deleted'] = 1;
if(self::can_delete($uid,$app)) {
$r = q("delete from app where app_id = '%s' and app_channel = %d",
q("delete from app where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
@@ -628,16 +657,21 @@ class Apps {
intval(TERM_OBJ_APP),
intval($x[0]['id'])
);
/**
* @hooks app_destroy
* Called after app entry got removed from database
* and provide app array from database.
*/
call_hooks('app_destroy', $x[0]);
}
else {
$r = q("update app set app_deleted = 1 where app_id = '%s' and app_channel = %d",
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));
Libsync::build_sync_packet($uid,array('app' => $x));
}
}
else {
@@ -645,22 +679,23 @@ class Apps {
}
}
}
}
static public function app_undestroy($uid,$app) {
// undelete a system app
/**
* @brief Undelete a system app.
*
* @param int $uid
* @param array $app
*/
static public function app_undestroy($uid, $app) {
if($uid && $app['guid']) {
$x = q("select * from app where app_id = '%s' and app_channel = %d limit 1",
dbesc($app['guid']),
intval($uid)
);
if($x) {
if($x[0]['app_system']) {
$r = q("update app set app_deleted = 0 where app_id = '%s' and app_channel = %d",
q("update app set app_deleted = 0 where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
@@ -669,7 +704,15 @@ class Apps {
}
}
static public function app_feature($uid,$app,$term) {
/**
* @brief
*
* @param int $uid
* @param array $app
* @param string $term
* @return void
*/
static public function app_feature($uid, $app, $term) {
$r = q("select id from app where app_id = '%s' and app_channel = %d limit 1",
dbesc($app['guid']),
intval($uid)
@@ -693,23 +736,37 @@ class Apps {
}
}
static public function app_installed($uid,$app,$bypass_filter=false) {
/**
* @brief
*
* @param int $uid
* @param array $app
* @param boolean $bypass_filter (optional) default false
* @return boolean
*/
static public function app_installed($uid, $app, $bypass_filter = false) {
$r = q("select id from app where app_id = '%s' and app_channel = %d limit 1",
dbesc((array_key_exists('guid',$app)) ? $app['guid'] : ''),
dbesc((array_key_exists('guid', $app)) ? $app['guid'] : ''),
intval($uid)
);
if (!$bypass_filter) {
if(!$bypass_filter) {
$filter_arr = [
'uid'=>$uid,
'app'=>$app,
'installed'=>$r
'uid' => $uid,
'app' => $app,
'installed' => $r
];
call_hooks('app_installed_filter',$filter_arr);
/**
* @hooks app_installed_filter
* * \e int \b uid
* * \e array \b app
* * \e mixed \b installed - return value
*/
call_hooks('app_installed_filter', $filter_arr);
$r = $filter_arr['installed'];
}
return(($r) ? true : false);
return(($r) ? true : false);
}
@@ -725,11 +782,17 @@ class Apps {
'app'=>$app,
'installed'=>$r
];
call_hooks('addon_app_installed_filter',$filter_arr);
/**
* @hooks addon_app_installed_filter
* * \e int \b uid
* * \e array \b app
* * \e mixed \b installed - return value
*/
call_hooks('addon_app_installed_filter', $filter_arr);
$r = $filter_arr['installed'];
}
return(($r) ? true : false);
return(($r) ? true : false);
}
static public function system_app_installed($uid,$app,$bypass_filter=false) {
@@ -744,28 +807,39 @@ class Apps {
'app'=>$app,
'installed'=>$r
];
call_hooks('system_app_installed_filter',$filter_arr);
/**
* @hooks system_app_installed_filter
* * \e int \b uid
* * \e array \b app
* * \e mixed \b installed - return value
*/
call_hooks('system_app_installed_filter', $filter_arr);
$r = $filter_arr['installed'];
}
return(($r) ? true : false);
return(($r) ? true : false);
}
/**
* @brief
*
* @param int $uid
* @param boolean $deleted
* @param array $cats
* @return boolean|array
*/
static public function app_list($uid, $deleted = false, $cats = []) {
if($deleted)
$sql_extra = "";
if($deleted)
$sql_extra = '';
else
$sql_extra = " and app_deleted = 0 ";
$sql_extra = ' and app_deleted = 0 ';
if($cats) {
$cat_sql_extra = " and ( ";
$cat_sql_extra = ' and ( ';
foreach($cats as $cat) {
if(strpos($cat_sql_extra, 'term'))
$cat_sql_extra .= "or ";
$cat_sql_extra .= 'or ';
$cat_sql_extra .= "term = '" . dbesc($cat) . "' ";
}
@@ -777,11 +851,13 @@ class Apps {
);
if(! $r)
return $r;
$sql_extra .= " and app.id in ( ";
$sql_extra .= ' and app.id in ( ';
$s = '';
foreach($r as $rr) {
if($s)
$s .= ',';
$s .= intval($rr['oid']);
}
$sql_extra .= $s . ') ';
@@ -792,12 +868,26 @@ class Apps {
);
if($r) {
$hookinfo = Array('uid'=>$uid,'deleted'=>$deleted,'cats'=>$cats,'apps'=>$r);
call_hooks('app_list',$hookinfo);
$hookinfo = [
'uid' => $uid,
'deleted' => $deleted,
'cats' => $cats,
'apps' => $r,
];
/**
* @hooks app_list
* * \e int \b uid
* * \e boolean \b deleted
* * \e array \b cats
* * \e array \b apps - return value
*/
call_hooks('app_list', $hookinfo);
$r = $hookinfo['apps'];
for($x = 0; $x < count($r); $x ++) {
for($x = 0; $x < count($r); $x++) {
if(! $r[$x]['app_system'])
$r[$x]['type'] = 'personal';
$r[$x]['term'] = q("select * from term where otype = %d and oid = %d",
intval(TERM_OBJ_APP),
intval($r[$x]['id'])
@@ -805,15 +895,17 @@ class Apps {
}
}
return($r);
return $r;
}
static public function app_order($uid,$apps) {
static public function app_order($uid,$apps,$menu) {
if(! $apps)
return $apps;
$x = (($uid) ? get_pconfig($uid,'system','app_order') : get_config('system','app_order'));
$conf = (($menu === 'nav_featured_app') ? 'app_order' : 'app_pin_order');
$x = (($uid) ? get_pconfig($uid,'system',$conf) : get_config('system',$conf));
if(($x) && (! is_array($x))) {
$y = explode(',',$x);
$y = array_map('trim',$y);
@@ -835,13 +927,14 @@ class Apps {
$ret[] = $ap;
}
}
return $ret;
return $ret;
}
static function find_app_in_array($name,$arr) {
if(! $arr)
return false;
foreach($arr as $x) {
if($x['name'] === $name) {
return $x;
@@ -850,25 +943,35 @@ class Apps {
return false;
}
static function moveup($uid,$guid) {
$syslist = array();
$list = self::app_list($uid, false, ['nav_featured_app', 'nav_pinned_app']);
/**
* @brief
*
* @param int $uid
* @param int $guid
* @param string $menu
* @return void
*/
static function moveup($uid, $guid, $menu) {
$syslist = [];
$conf = (($menu === 'nav_featured_app') ? 'app_order' : 'app_pin_order');
$list = self::app_list($uid, false, [ $menu ]);
if($list) {
foreach($list as $li) {
$syslist[] = self::app_encode($li);
$papp = self::app_encode($li);
$syslist[] = $papp;
}
}
self::translate_system_apps($syslist);
usort($syslist,'self::app_name_compare');
$syslist = self::app_order($uid,$syslist);
$syslist = self::app_order($uid,$syslist,$menu);
if(! $syslist)
return;
$newlist = [];
foreach($syslist as $k => $li) {
if($li['guid'] === $guid) {
$position = $k;
@@ -877,6 +980,7 @@ class Apps {
}
if(! $position)
return;
$dest_position = $position - 1;
$saved = $syslist[$dest_position];
$syslist[$dest_position] = $syslist[$position];
@@ -887,29 +991,41 @@ class Apps {
$narr[] = $x['name'];
}
set_pconfig($uid,'system','app_order',implode(',',$narr));
set_pconfig($uid,'system',$conf,implode(',',$narr));
}
static function movedown($uid,$guid) {
$syslist = array();
$list = self::app_list($uid, false, ['nav_featured_app', 'nav_pinned_app']);
/**
* @brief
*
* @param int $uid
* @param int $guid
* @param string $menu
* @return void
*/
static function movedown($uid, $guid, $menu) {
$syslist = [];
$conf = (($menu === 'nav_featured_app') ? 'app_order' : 'app_pin_order');
$list = self::app_list($uid, false, [ $menu ]);
if($list) {
foreach($list as $li) {
$syslist[] = self::app_encode($li);
$papp = self::app_encode($li);
if($menu !== 'nav_pinned_app' && strpos($papp['categories'],'nav_pinned_app') !== false)
continue;
$syslist[] = $papp;
}
}
self::translate_system_apps($syslist);
usort($syslist,'self::app_name_compare');
$syslist = self::app_order($uid,$syslist);
$syslist = self::app_order($uid,$syslist,$menu);
if(! $syslist)
return;
$newlist = [];
foreach($syslist as $k => $li) {
if($li['guid'] === $guid) {
$position = $k;
@@ -918,6 +1034,7 @@ class Apps {
}
if($position >= count($syslist) - 1)
return;
$dest_position = $position + 1;
$saved = $syslist[$dest_position];
$syslist[$dest_position] = $syslist[$position];
@@ -928,8 +1045,7 @@ class Apps {
$narr[] = $x['name'];
}
set_pconfig($uid,'system','app_order',implode(',',$narr));
set_pconfig($uid,'system',$conf,implode(',',$narr));
}
static public function app_decode($s) {
@@ -937,8 +1053,14 @@ class Apps {
return json_decode($x,true);
}
static public function app_macros($uid,&$arr) {
/**
* @brief
*
* @param int $uid
* @param[in,out] array $arr
* @return void
*/
static public function app_macros($uid, &$arr) {
if(! intval($uid))
return;
@@ -946,21 +1068,17 @@ class Apps {
$baseurl = z_root();
$channel = channelx_by_n($uid);
$address = (($channel) ? $channel['channel_address'] : '');
//future expansion
$observer = \App::get_observer();
//$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));
@@ -1144,16 +1262,20 @@ class Apps {
}
return $ret;
}
static public function app_encode($app,$embed = false) {
$ret = array();
/**
* @brief
*
* @param array $app
* @param boolean $embed (optional) default false
* @return array|string
*/
static public function app_encode($app, $embed = false) {
$ret = [];
$ret['type'] = 'personal';
if($app['app_id'])
$ret['guid'] = $app['app_id'];
@@ -1186,7 +1308,7 @@ class Apps {
if($app['app_price'])
$ret['price'] = $app['app_price'];
if($app['app_page'])
$ret['page'] = $app['app_page'];
@@ -1210,12 +1332,12 @@ class Apps {
foreach($app['term'] as $t) {
if($s)
$s .= ',';
$s .= $t['term'];
}
$ret['categories'] = $s;
}
if(! $embed)
return $ret;
@@ -1223,18 +1345,15 @@ class Apps {
if(array_key_exists('categories',$ret))
unset($ret['categories']);
$j = json_encode($ret);
return '[app]' . chunk_split(base64_encode($j),72,"\n") . '[/app]';
$j = json_encode($ret);
return '[app]' . chunk_split(base64_encode($j),72,"\n") . '[/app]';
}
static public function papp_encode($papp) {
return chunk_split(base64_encode(json_encode($papp)),72,"\n");
}
}

View File

@@ -7,12 +7,23 @@ namespace Zotlabs\Lib;
*/
class Cache {
public static function get($key) {
/**
* @brief Returns cached content
*
* @param string $key
* @param string $age in SQL format, default is '30 DAY'
* @return string
*/
public static function get($key, $age = '') {
$hash = hash('whirlpool',$key);
$r = q("SELECT v FROM cache WHERE k = '%s' limit 1",
dbesc($hash)
$r = q("SELECT v FROM cache WHERE k = '%s' AND updated > %s - INTERVAL %s LIMIT 1",
dbesc($hash),
db_utcnow(),
db_quoteinterval(($age ? $age : get_config('system','object_cache_days', '30') . ' DAY'))
);
if ($r)
@@ -40,12 +51,4 @@ class Cache {
dbesc(datetime_convert()));
}
}
public static function clear() {
q("DELETE FROM cache WHERE updated < '%s'",
dbesc(datetime_convert('UTC','UTC',"now - 30 days")));
}
}

View File

@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Lib;
use Zotlabs\Lib\Libsync;
/**
* @brief A class with chatroom related static methods.
*/
@@ -91,7 +93,7 @@ class Chatroom {
return $ret;
}
build_sync_packet($channel['channel_id'],array('chatroom' => $r));
Libsync::build_sync_packet($channel['channel_id'],array('chatroom' => $r));
q("delete from chatroom where cr_id = %d",
intval($r[0]['cr_id'])

312
Zotlabs/Lib/Connect.php Normal file
View File

@@ -0,0 +1,312 @@
<?php /** @file */
namespace Zotlabs\Lib;
use App;
use Zotlabs\Access\Permissions;
use Zotlabs\Daemon\Master;
class Connect {
/**
* Takes a $channel and a $url/handle and adds a new connection
*
* Returns array
* $return['success'] boolean true if successful
* $return['abook'] Address book entry joined with xchan if successful
* $return['message'] error text if success is false.
*
* This function does NOT send sync packets to clones. The caller is responsible for doing this
*/
static function connect($channel, $url, $sub_channel = false) {
$uid = $channel['channel_id'];
if (strpos($url,'@') === false && strpos($url,'/') === false) {
$url = $url . '@' . App::get_hostname();
}
$result = [ 'success' => false, 'message' => '' ];
$my_perms = false;
$protocol = '';
if (substr($url,0,1) === '[') {
$x = strpos($url,']');
if ($x) {
$protocol = substr($url,1,$x-1);
$url = substr($url,$x+1);
}
}
if (! check_siteallowed($url)) {
$result['message'] = t('Channel is blocked on this site.');
return $result;
}
if (! $url) {
$result['message'] = t('Channel location missing.');
return $result;
}
// check service class limits
$r = q("select count(*) as total from abook where abook_channel = %d and abook_self = 0 ",
intval($uid)
);
if ($r) {
$total_channels = $r[0]['total'];
}
if (! service_class_allows($uid,'total_channels',$total_channels)) {
$result['message'] = upgrade_message();
return $result;
}
$xchan_hash = '';
$sql_options = (($protocol) ? " and xchan_network = '" . dbesc($protocol) . "' " : '');
$r = q("select * from xchan where ( xchan_hash = '%s' or xchan_url = '%s' or xchan_addr = '%s') $sql_options ",
dbesc($url),
dbesc($url),
dbesc($url)
);
if ($r) {
// reset results to the best record or the first if we don't have the best
// note: this is a single record and not an array of results
$r = Libzot::zot_record_preferred($r,'xchan_network');
}
$singleton = false;
$d = false;
if (! $r) {
// not in cache - try discovery
$wf = discover_by_webbie($url,$protocol);
if (! $wf) {
$feeds = get_config('system','feed_contacts');
if (($feeds) && (in_array($protocol, [ '', 'feed', 'rss' ]))) {
$d = discover_by_url($url);
}
else {
$result['message'] = t('Remote channel or protocol unavailable.');
return $result;
}
}
}
if ($wf || $d) {
// something was discovered - find the record which was just created.
$r = q("select * from xchan where ( xchan_hash = '%s' or xchan_url = '%s' or xchan_addr = '%s' ) $sql_options",
dbesc(($wf) ? $wf : $url),
dbesc($url),
dbesc($url)
);
// convert to a single record (once again preferring a zot solution in the case of multiples)
if ($r) {
$r = Libzot::zot_record_preferred($r,'xchan_network');
}
}
// if discovery was a success or the channel was already cached we should have an xchan record in $r
if ($r) {
$xchan = $r;
$xchan_hash = $r['xchan_hash'];
$their_perms = EMPTY_STR;
}
// failure case
if (! $xchan_hash) {
$result['message'] = t('Channel discovery failed.');
logger('follow: ' . $result['message']);
return $result;
}
if (! check_channelallowed($xchan_hash)) {
$result['message'] = t('Channel is blocked on this site.');
logger('follow: ' . $result['message']);
return $result;
}
$allowed = ((in_array($xchan['xchan_network'],['rss','zot','zot6'])) ? 1 : 0);
$hookdata = ['channel_id' => $uid, 'follow_address' => $url, 'xchan' => $xchan, 'allowed' => $allowed, 'singleton' => 0];
call_hooks('follow_allow',$hookdata);
if(! $hookdata['allowed']) {
$result['message'] = t('Protocol disabled.');
return $result;
}
$singleton = intval($hookdata['singleton']);
// Now start processing the new connection
$aid = $channel['channel_account_id'];
$default_group = $channel['channel_default_group'];
if (in_array($xchan_hash, [$channel['channel_hash'], $channel['channel_portable_id']])) {
$result['message'] = t('Cannot connect to yourself.');
return $result;
}
if ($xchan['xchan_network'] === 'rss') {
// check service class feed limits
$t = q("select count(*) as total from abook where abook_account = %d and abook_feed = 1 ",
intval($aid)
);
if ($t) {
$total_feeds = $t[0]['total'];
}
if (! service_class_allows($uid,'total_feeds',$total_feeds)) {
$result['message'] = upgrade_message();
return $result;
}
// Always set these "remote" permissions for feeds since we cannot interact with them
// to negotiate a suitable permission response
set_abconfig($uid,$xchan_hash,'their_perms','view_stream',1);
set_abconfig($uid,$xchan_hash,'their_perms','republish',1);
}
$p = Permissions::connect_perms($uid);
// parent channels have unencumbered write permission
if ($sub_channel) {
$p['perms']['post_wall'] = 1;
$p['perms']['post_comments'] = 1;
$p['perms']['write_storage'] = 1;
$p['perms']['post_like'] = 1;
$p['perms']['delegate'] = 0;
$p['perms']['moderated'] = 0;
}
$my_perms = $p['perms'];
$profile_assign = get_pconfig($uid,'system','profile_assign','');
// See if we are already connected by virtue of having an abook record
$r = q("select abook_id, abook_xchan, abook_pending, abook_instance from abook
where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($xchan_hash),
intval($uid)
);
if ($r) {
$abook_instance = $r[0]['abook_instance'];
// If they are on a non-nomadic network, add them to this location
if (($singleton) && strpos($abook_instance,z_root()) === false) {
if ($abook_instance) {
$abook_instance .= ',';
}
$abook_instance .= z_root();
$x = q("update abook set abook_instance = '%s', abook_not_here = 0 where abook_id = %d",
dbesc($abook_instance),
intval($r[0]['abook_id'])
);
}
// if they have a pending connection, we just followed them so approve the connection request
if (intval($r[0]['abook_pending'])) {
$x = q("update abook set abook_pending = 0 where abook_id = %d",
intval($r[0]['abook_id'])
);
}
}
else {
// create a new abook record
$closeness = get_pconfig($uid,'system','new_abook_closeness',80);
$r = abook_store_lowlevel(
[
'abook_account' => intval($aid),
'abook_channel' => intval($uid),
'abook_closeness' => intval($closeness),
'abook_xchan' => $xchan_hash,
'abook_profile' => $profile_assign,
'abook_feed' => intval(($xchan['xchan_network'] === 'rss') ? 1 : 0),
'abook_created' => datetime_convert(),
'abook_updated' => datetime_convert(),
'abook_instance' => (($singleton) ? z_root() : '')
]
);
}
if (! $r) {
logger('abook creation failed');
$result['message'] = t('error saving data');
return $result;
}
// Set suitable permissions to the connection
if($my_perms) {
foreach($my_perms as $k => $v) {
set_abconfig($uid,$xchan_hash,'my_perms',$k,$v);
}
}
// fetch the entire record
$r = q("select abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash
where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($xchan_hash),
intval($uid)
);
if ($r) {
$result['abook'] = array_shift($r);
Master::Summon([ 'Notifier', 'permission_create', $result['abook']['abook_id'] ]);
}
$arr = [ 'channel_id' => $uid, 'channel' => $channel, 'abook' => $result['abook'] ];
call_hooks('follow', $arr);
/** If there is a default group for this channel, add this connection to it */
if ($default_group) {
$g = AccessList::rec_byhash($uid,$default_group);
if ($g) {
AccessList::member_add($uid,'',$xchan_hash,$g['id']);
}
}
$result['success'] = true;
return $result;
}
}

206
Zotlabs/Lib/Crypto.php Normal file
View File

@@ -0,0 +1,206 @@
<?php
namespace Zotlabs\Lib;
use Exception;
class Crypto {
public static $openssl_algorithms = [
// zot6 nickname, opensslname, keylength, ivlength
['aes256ctr', 'aes-256-ctr', 32, 16],
['camellia256cfb', 'camellia-256-cfb', 32, 16],
['cast5cfb', 'cast5-cfb', 16, 8],
['aes256cbc', 'aes-256-cbc', 32, 16] // remove after legacy zot has been sunset
];
public static function methods() {
$ret = [];
foreach (self::$openssl_algorithms as $ossl) {
$ret[] = $ossl[0] . '.oaep';
}
call_hooks('crypto_methods', $ret);
return $ret;
}
public static function signing_methods() {
$ret = ['sha256'];
call_hooks('signing_methods', $ret);
return $ret;
}
public static function new_keypair($bits) {
$openssl_options = [
'digest_alg' => 'sha1',
'private_key_bits' => $bits,
'encrypt_key' => false
];
$conf = get_config('system', 'openssl_conf_file');
if ($conf) {
$openssl_options['config'] = $conf;
}
$result = openssl_pkey_new($openssl_options);
if (empty($result)) {
return false;
}
// Get private key
$response = ['prvkey' => '', 'pubkey' => ''];
openssl_pkey_export($result, $response['prvkey']);
// Get public key
$pkey = openssl_pkey_get_details($result);
$response['pubkey'] = $pkey["key"];
return $response;
}
public static function sign($data, $key, $alg = 'sha256') {
if (!$key) {
return false;
}
$sig = '';
openssl_sign($data, $sig, $key, $alg);
return $sig;
}
public static function verify($data, $sig, $key, $alg = 'sha256') {
if (!$key) {
return false;
}
try {
$verify = openssl_verify($data, $sig, $key, $alg);
} catch (Exception $e) {
$verify = (-1);
}
if ($verify === (-1)) {
while ($msg = openssl_error_string()) {
logger('openssl_verify: ' . $msg, LOGGER_NORMAL, LOG_ERR);
}
btlogger('openssl_verify: key: ' . $key, LOGGER_DEBUG, LOG_ERR);
}
return (($verify > 0) ? true : false);
}
public static function encapsulate($data, $pubkey, $alg) {
if (!($alg && $pubkey)) {
return $data;
}
$alg_base = $alg;
$padding = OPENSSL_PKCS1_PADDING;
$exts = explode('.', $alg);
if (count($exts) > 1) {
switch ($exts[1]) {
case 'oaep':
$padding = OPENSSL_PKCS1_OAEP_PADDING;
break;
default:
break;
}
$alg_base = $exts[0];
}
$method = null;
foreach (self::$openssl_algorithms as $ossl) {
if ($ossl[0] === $alg_base) {
$method = $ossl;
break;
}
}
if ($method) {
$result = ['encrypted' => true];
$key = openssl_random_pseudo_bytes(256);
$iv = openssl_random_pseudo_bytes(256);
$key1 = substr($key, 0, $method[2]);
$iv1 = substr($iv, 0, $method[3]);
$result['data'] = base64url_encode(openssl_encrypt($data, $method[1], $key1, OPENSSL_RAW_DATA, $iv1), true);
openssl_public_encrypt($key, $k, $pubkey, $padding);
openssl_public_encrypt($iv, $i, $pubkey, $padding);
$result['alg'] = $alg;
$result['key'] = base64url_encode($k, true);
$result['iv'] = base64url_encode($i, true);
return $result;
}
else {
$x = ['data' => $data, 'pubkey' => $pubkey, 'alg' => $alg, 'result' => $data];
call_hooks('crypto_encapsulate', $x);
return $x['result'];
}
}
public static function unencapsulate($data, $prvkey) {
if (!(is_array($data) && array_key_exists('encrypted', $data) && array_key_exists('alg', $data) && $data['alg'])) {
logger('not encrypted');
return $data;
}
$alg_base = $data['alg'];
$padding = OPENSSL_PKCS1_PADDING;
$exts = explode('.', $data['alg']);
if (count($exts) > 1) {
switch ($exts[1]) {
case 'oaep':
$padding = OPENSSL_PKCS1_OAEP_PADDING;
break;
default:
break;
}
$alg_base = $exts[0];
}
$method = null;
foreach (self::$openssl_algorithms as $ossl) {
if ($ossl[0] === $alg_base) {
$method = $ossl;
break;
}
}
if ($method) {
openssl_private_decrypt(base64url_decode($data['key']), $k, $prvkey, $padding);
openssl_private_decrypt(base64url_decode($data['iv']), $i, $prvkey, $padding);
return openssl_decrypt(base64url_decode($data['data']), $method[1], substr($k, 0, $method[2]), OPENSSL_RAW_DATA, substr($i, 0, $method[3]));
}
else {
$x = ['data' => $data, 'prvkey' => $prvkey, 'alg' => $data['alg'], 'result' => $data];
call_hooks('crypto_unencapsulate', $x);
return $x['result'];
}
}
}

View File

@@ -58,10 +58,15 @@ class DB_Upgrade {
$c = new $cls();
$retval = $c->run();
if($retval != UPDATE_SUCCESS) {
$source = t('Source code of failed update: ') . "\n\n" . @file_get_contents('Zotlabs/Update/' . $s . '.php');
// Prevent sending hundreds of thousands of emails by creating
// a lockfile.
@@ -86,7 +91,9 @@ class DB_Upgrade {
'$sitename' => \App::$config['system']['sitename'],
'$siteurl' => z_root(),
'$update' => $x,
'$error' => sprintf( t('Update %s failed. See error logs.'), $x)
'$error' => sprintf( t('Update %s failed. See error logs.'), $x),
'$baseurl' => z_root(),
'$source' => $source
]
)
]

View File

@@ -14,6 +14,7 @@ class DReport {
$this->location = $location;
$this->sender = $sender;
$this->recipient = $recipient;
$this->name = EMPTY_STR;
$this->message_id = $message_id;
$this->status = $status;
$this->date = datetime_convert();
@@ -24,8 +25,8 @@ class DReport {
$this->date = datetime_convert();
}
function addto_recipient($name) {
$this->recipient = $this->recipient . ' ' . $name;
function set_name($name) {
$this->name = $name;
}
function addto_update($status) {
@@ -37,6 +38,7 @@ class DReport {
$this->location = $arr['location'];
$this->sender = $arr['sender'];
$this->recipient = $arr['recipient'];
$this->name = $arr['name'];
$this->message_id = $arr['message_id'];
$this->status = $arr['status'];
$this->date = $arr['date'];
@@ -47,9 +49,99 @@ class DReport {
'location' => $this->location,
'sender' => $this->sender,
'recipient' => $this->recipient,
'name' => $this->name,
'message_id' => $this->message_id,
'status' => $this->status,
'date' => $this->date
);
}
/**
* @brief decide whether to store a returned delivery report
*
* @param array $dr
* @return boolean
*/
static function is_storable($dr) {
if(get_config('system', 'disable_dreport'))
return false;
/**
* @hooks dreport_is_storable
* Called before storing a dreport record to determine whether to store it.
* * \e array
*/
call_hooks('dreport_is_storable', $dr);
// let plugins accept or reject - if neither, continue on
if(array_key_exists('accept',$dr) && intval($dr['accept']))
return true;
if(array_key_exists('reject',$dr) && intval($dr['reject']))
return false;
if(! ($dr['sender']))
return false;
// Is the sender one of our channels?
$c = q("select channel_id from channel where channel_hash = '%s' or channel_portable_id = '%s' limit 1",
dbesc($dr['sender']),
dbesc($dr['sender'])
);
if(! $c)
return false;
// legacy zot recipients add a space and their name to the xchan. remove it if true.
$legacy_recipient = strpos($dr['recipient'], ' ');
if($legacy_recipient !== false) {
$legacy_recipient_parts = explode(' ', $dr['recipient'], 2);
$rxchan = $legacy_recipient_parts[0];
}
else {
$rxchan = $dr['recipient'];
}
// is the recipient one of our connections, or do we want to store every report?
$pcf = get_pconfig($c[0]['channel_id'],'system','dreport_store_all');
if($pcf)
return true;
// We always add ourself as a recipient to private and relayed posts
// So if a remote site says they can't find us, that's no big surprise
// and just creates a lot of extra report noise
if(($dr['location'] !== z_root()) && ($dr['sender'] === $rxchan) && ($dr['status'] === 'recipient not found'))
return false;
// If you have a private post with a recipient list, every single site is going to report
// back a failed delivery for anybody on that list that isn't local to them. We're only
// concerned about this if we have a local hubloc record which says we expected them to
// have a channel on that site.
$r = q("select hubloc_id from hubloc where hubloc_hash = '%s' and hubloc_url = '%s'",
dbesc($rxchan),
dbesc($dr['location'])
);
if((! $r) && ($dr['status'] === 'recipient_not_found'))
return false;
$r = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($rxchan),
intval($c[0]['channel_id'])
);
if($r)
return true;
return false;
}
}

View File

@@ -43,7 +43,7 @@ class Enotify {
dbesc($params['to_xchan'])
);
}
if ($x & $y) {
if ($x && $y) {
$sender = $x[0];
$recip = $y[0];
} else {
@@ -64,7 +64,7 @@ class Enotify {
$sitename = get_config('system','sitename');
$site_admin = sprintf( t('%s Administrator'), $sitename);
$opt_out1 = sprintf( t('This email was sent by %1$s at %2$s.'), t('$Projectname'), \App::get_hostname());
$opt_out2 = sprintf( t('To stop receiving these messages, please adjust your Notification Settings at %s'), z_root() . '/settings');
$opt_out2 = sprintf( t('To stop receiving these messages, please adjust your Notification Settings at %s'), z_root() . '/settings');
$hopt_out2 = sprintf( t('To stop receiving these messages, please adjust your %s.'), '<a href="' . z_root() . '/settings' . '">' . t('Notification Settings') . '</a>');
$sender_name = $product;
$hostname = \App::get_hostname();
@@ -80,7 +80,7 @@ class Enotify {
$sender_email = get_config('system','from_email');
if(! $sender_email)
$sender_email = 'Administrator' . '@' . $hostname;
$sender_name = get_config('system','from_email_name');
if(! $sender_name)
$sender_name = \Zotlabs\Lib\System::get_site_name();
@@ -108,7 +108,7 @@ class Enotify {
logger('notification invoked for an old item which may have been refetched.',LOGGER_DEBUG,LOG_INFO);
return;
}
}
}
else {
$title = $body = '';
}
@@ -143,19 +143,26 @@ class Enotify {
$action = t('commented on');
if(array_key_exists('item',$params) && in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
if(array_key_exists('item',$params)) {
if(in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
logger('notification: not a visible activity. Ignoring.');
pop_lang();
return;
}
if(activity_match($params['verb'], ACTIVITY_LIKE))
$action = t('liked');
if(activity_match($params['verb'], ACTIVITY_DISLIKE))
$action = t('disliked');
if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
logger('notification: not a visible activity. Ignoring.');
pop_lang();
return;
}
if(activity_match($params['verb'], ACTIVITY_LIKE))
$action = t('liked');
if(activity_match($params['verb'], ACTIVITY_DISLIKE))
$action = t('disliked');
if($params['item']['obj_type'] === 'Answer')
$action = t('voted on');
}
@@ -174,7 +181,7 @@ class Enotify {
pop_lang();
return;
}
// if it's a post figure out who's post it is.
@@ -212,7 +219,7 @@ class Enotify {
$itemlink,
$p[0]['author']['xchan_name'],
$item_post_type);
// "your post"
if($p[0]['owner']['xchan_name'] == $p[0]['author']['xchan_name'] && intval($p[0]['item_wall']))
$dest_str = sprintf(t('%1$s %2$s [zrl=%3$s]your %4$s[/zrl]'),
@@ -223,15 +230,15 @@ class Enotify {
// Some mail softwares relies on subject field for threading.
// So, we cannot have different subjects for notifications of the same thread.
// Before this we have the name of the replier on the subject rendering
// Before this we have the name of the replier on the subject rendering
// differents subjects for messages on the same thread.
if($moderated)
$subject = sprintf( t('[$Projectname:Notify] Moderated Comment to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']);
else
$subject = sprintf( t('[$Projectname:Notify] Comment to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']);
$preamble = sprintf( t('%1$s commented on an item/conversation you have been following.'), $sender['xchan_name']);
$epreamble = $dest_str;
$preamble = sprintf( t('%1$s commented on an item/conversation you have been following.'), $sender['xchan_name']);
$epreamble = $dest_str;
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf( $sitelink, $siteurl );
@@ -240,7 +247,7 @@ class Enotify {
$tsitelink .= "\n\n" . sprintf( t('Please visit %s to approve or reject this comment.'), z_root() . '/moderate' );
$hsitelink .= "<br><br>" . sprintf( t('Please visit %s to approve or reject this comment.'), '<a href="' . z_root() . '/moderate">' . z_root() . '/moderate</a>' );
}
}
if ($params['type'] == NOTIFY_LIKE) {
@@ -271,7 +278,7 @@ class Enotify {
pop_lang();
return;
}
// if it's a post figure out who's post it is.
@@ -307,12 +314,12 @@ class Enotify {
// Some mail softwares relies on subject field for threading.
// So, we cannot have different subjects for notifications of the same thread.
// Before this we have the name of the replier on the subject rendering
// Before this we have the name of the replier on the subject rendering
// differents subjects for messages on the same thread.
$subject = sprintf( t('[$Projectname:Notify] Like received to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']);
$preamble = sprintf( t('%1$s liked an item/conversation you created.'), $sender['xchan_name']);
$epreamble = $dest_str;
$preamble = sprintf( t('%1$s liked an item/conversation you created.'), $sender['xchan_name']);
$epreamble = $dest_str;
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf( $sitelink, $siteurl );
@@ -328,7 +335,7 @@ class Enotify {
$epreamble = sprintf( t('%1$s posted to [zrl=%2$s]your wall[/zrl]') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$params['link']);
$params['link']);
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf( $sitelink, $siteurl );
@@ -348,12 +355,12 @@ class Enotify {
pop_lang();
return;
}
$subject = sprintf( t('[$Projectname:Notify] %s tagged you') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s tagged you at %2$s') , $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s [zrl=%2$s]tagged you[/zrl].') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$params['link']);
$params['link']);
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf( $sitelink, $siteurl );
@@ -366,7 +373,7 @@ class Enotify {
$preamble = sprintf( t('%1$s poked you at %2$s') , $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s [zrl=%2$s]poked you[/zrl].') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$params['link']);
$params['link']);
$subject = str_replace('poked', t($params['activity']), $subject);
$preamble = str_replace('poked', t($params['activity']), $preamble);
@@ -383,7 +390,7 @@ class Enotify {
$preamble = sprintf( t('%1$s tagged your post at %2$s'),$sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s tagged [zrl=%2$s]your post[/zrl]') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$itemlink);
$itemlink);
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf( $sitelink, $siteurl );
@@ -393,10 +400,10 @@ class Enotify {
if ($params['type'] == NOTIFY_INTRO) {
$subject = sprintf( t('[$Projectname:Notify] Introduction received'));
$preamble = sprintf( t('You\'ve received an new connection request from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$preamble = sprintf( t('You\'ve received an new connection request from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [zrl=%1$s]a new connection request[/zrl] from %2$s.'),
$siteurl . '/connections/ifpending',
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]');
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]');
$body = sprintf( t('You may visit their profile at %s'),$sender['xchan_url']);
$sitelink = t('Please visit %s to approve or reject the connection request.');
@@ -407,11 +414,11 @@ class Enotify {
if ($params['type'] == NOTIFY_SUGGEST) {
$subject = sprintf( t('[$Projectname:Notify] Friend suggestion received'));
$preamble = sprintf( t('You\'ve received a friend suggestion from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$preamble = sprintf( t('You\'ve received a friend suggestion from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [zrl=%1$s]a friend suggestion[/zrl] for %2$s from %3$s.'),
$itemlink,
'[zrl=' . $params['item']['url'] . ']' . $params['item']['name'] . '[/zrl]',
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]');
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]');
$body = t('Name:') . ' ' . $params['item']['name'] . "\n";
$body .= t('Photo:') . ' ' . $params['item']['photo'] . "\n";
@@ -455,7 +462,7 @@ class Enotify {
$sitelink = $h['sitelink'];
$tsitelink = $h['tsitelink'];
$hsitelink = $h['hsitelink'];
$itemlink = $h['itemlink'];
$itemlink = $h['itemlink'];
require_once('include/html2bbcode.php');
@@ -503,7 +510,7 @@ class Enotify {
// Mark some notifications as seen right away
// Note! The notification have to be created, because they are used to send emails
// So easiest solution to hide them from Notices is to mark them as seen right away.
// Another option would be to not add them to the DB, and change how emails are handled
// Another option would be to not add them to the DB, and change how emails are handled
// (probably would be better that way)
if (!$always_show_in_notices) {
@@ -548,7 +555,12 @@ class Enotify {
// wretched hack, but we don't want to duplicate all the preamble variations and we also don't want to screw up a translation
if ((\App::$language === 'en' || (! \App::$language)) && strpos($msg,', '))
$msg = substr($msg,strpos($msg,', ')+1);
$msg = substr($msg,strpos($msg,', ')+1);
$datarray['id'] = $notify_id;
$datarray['msg'] = $msg;
call_hooks('enotify_store_end', $datarray);
$r = q("update notify set msg = '%s' where id = %d and uid = %d",
dbesc($msg),
@@ -575,12 +587,12 @@ class Enotify {
$htmlversion = bbcode(stripslashes(str_replace(array("\\r","\\n"), array("","<br />\n"),$body)));
// use $_SESSION['zid_override'] to force zid() to use
// use $_SESSION['zid_override'] to force zid() to use
// the recipient address instead of the current observer
$_SESSION['zid_override'] = channel_reddress($recip);
$_SESSION['zrl_override'] = z_root() . '/channel/' . $recip['channel_address'];
$textversion = zidify_links($textversion);
$htmlversion = zidify_links($htmlversion);
@@ -742,7 +754,7 @@ class Enotify {
return $params['result'];
}
$fromName = email_header_encode(html_entity_decode($params['fromName'],ENT_QUOTES,'UTF-8'),'UTF-8');
$fromName = email_header_encode(html_entity_decode($params['fromName'],ENT_QUOTES,'UTF-8'),'UTF-8');
$messageSubject = email_header_encode(html_entity_decode($params['messageSubject'],ENT_QUOTES,'UTF-8'),'UTF-8');
// generate a mime boundary
@@ -754,9 +766,9 @@ class Enotify {
// generate a multipart/alternative message header
$messageHeader =
$params['additionalMailHeader'] .
"From: $fromName <{$params['fromEmail']}>\n" .
"Reply-To: $fromName <{$params['replyTo']}>\n" .
"MIME-Version: 1.0\n" .
"From: $fromName <{$params['fromEmail']}>" . PHP_EOL .
"Reply-To: $fromName <{$params['replyTo']}>" . PHP_EOL .
"MIME-Version: 1.0" . PHP_EOL .
"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
// assemble the final multipart message body with the text and html types included
@@ -764,15 +776,15 @@ class Enotify {
$htmlBody = chunk_split(base64_encode($params['htmlVersion']));
$multipartMessageBody =
"--" . $mimeBoundary . "\n" . // plain text section
"Content-Type: text/plain; charset=UTF-8\n" .
"Content-Transfer-Encoding: base64\n\n" .
$textBody . "\n" .
"--" . $mimeBoundary . "\n" . // text/html section
"Content-Type: text/html; charset=UTF-8\n" .
"Content-Transfer-Encoding: base64\n\n" .
$htmlBody . "\n" .
"--" . $mimeBoundary . "--\n"; // message ending
"--" . $mimeBoundary . PHP_EOL . // plain text section
"Content-Type: text/plain; charset=UTF-8" . PHP_EOL .
"Content-Transfer-Encoding: base64" . PHP_EOL . PHP_EOL .
$textBody . PHP_EOL .
"--" . $mimeBoundary . PHP_EOL . // text/html section
"Content-Type: text/html; charset=UTF-8" . PHP_EOL .
"Content-Transfer-Encoding: base64" . PHP_EOL . PHP_EOL .
$htmlBody . PHP_EOL .
"--" . $mimeBoundary . "--" . PHP_EOL; // message ending
// send the message
$res = mail(
@@ -791,7 +803,7 @@ class Enotify {
require_once('include/conversation.php');
// Call localize_item to get a one line status for activities.
// Call localize_item to get a one line status for activities.
// This should set $item['localized'] to indicate we have a brief summary.
// and perhaps $item['shortlocalized'] for an even briefer summary
@@ -805,8 +817,17 @@ class Enotify {
}
else {
$itemem_text = (($item['item_thread_top'])
? t('created a new post')
: sprintf( t('commented on %s\'s post'), $item['owner']['xchan_name']));
? (($item['obj_type'] === 'Question') ? t('created a new poll') : t('created a new post'))
: (($item['obj_type'] === 'Answer') ? sprintf( t('voted on %s\'s poll'), '[bdi]' . $item['owner']['xchan_name'] . '[/bdi]') : sprintf( t('commented on %s\'s post'), '[bdi]' . $item['owner']['xchan_name'] . '[/bdi]'))
);
if($item['verb'] === ACTIVITY_SHARE) {
$itemem_text = sprintf( t('repeated %s\'s post'), '[bdi]' . $item['author']['xchan_name'] . '[/bdi]');
}
if(in_array($item['obj_type'], ['Document', 'Video', 'Audio', 'Image'])) {
$itemem_text = t('shared a file with you');
}
}
$edit = false;
@@ -825,19 +846,147 @@ class Enotify {
// convert this logic into a json array just like the system notifications
return array(
$who = (($item['verb'] === ACTIVITY_SHARE) ? 'owner' : 'author');
$x = array(
'notify_link' => $item['llink'],
'name' => $item['author']['xchan_name'],
'url' => $item['author']['xchan_url'],
'photo' => $item['author']['xchan_photo_s'],
'when' => relative_date(($edit)? $item['edited'] : $item['created']),
'name' => $item[$who]['xchan_name'],
'addr' => (($item[$who]['xchan_addr']) ? $item[$who]['xchan_addr'] : $item[$who]['xchan_url']),
'url' => $item[$who]['xchan_url'],
'photo' => $item[$who]['xchan_photo_s'],
'when' => (($edit) ? datetime_convert('UTC', date_default_timezone_get(), $item['edited']) : datetime_convert('UTC', date_default_timezone_get(), $item['created'])),
'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
'notify_id' => 'undefined',
'b64mid' => (($item['mid']) ? 'b64.' . base64url_encode($item['mid']) : ''),
//'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
'thread_top' => (($item['item_thread_top']) ? true : false),
'message' => strip_tags(bbcode($itemem_text))
'message' => bbcode(escape_tags($itemem_text)),
'body' => htmlentities(html2plain(bbcode($item['body']), 75, true), ENT_QUOTES, 'UTF-8', false),
// these are for the superblock addon
'hash' => $item[$who]['xchan_hash'],
'uid' => $item['uid'],
'display' => true
);
call_hooks('enotify_format',$x);
if(! $x['display']) {
return [];
}
return $x;
}
static public function format_notify($tt) {
$message = trim(strip_tags(bbcode($tt['msg'])));
if(strpos($message, $tt['xname']) === 0)
$message = substr($message, strlen($tt['xname']) + 1);
$mid = basename($tt['link']);
$b64mid = ((strpos($mid, 'b64.') === 0) ? $mid : 'b64.' . base64url_encode($mid));
$x = [
'notify_link' => z_root() . '/notify/view/' . $tt['id'],
'name' => $tt['xname'],
'url' => $tt['url'],
'photo' => $tt['photo'],
'when' => datetime_convert('UTC', date_default_timezone_get(), $tt['created']),
'hclass' => (($tt['seen']) ? 'notify-seen' : 'notify-unseen'),
'b64mid' => (($tt['otype'] == 'item') ? $b64mid : ''),
'notify_id' => (($tt['otype'] == 'item') ? $tt['id'] : ''),
'message' => $message
];
return $x;
}
static public function format_intros($rr) {
$x = [
'notify_link' => z_root() . '/connections/ifpending',
'name' => $rr['xchan_name'],
'addr' => $rr['xchan_addr'],
'url' => $rr['xchan_url'],
'photo' => $rr['xchan_photo_s'],
'when' => datetime_convert('UTC', date_default_timezone_get(), $rr['abook_created']),
'hclass' => ('notify-unseen'),
'message' => t('added your channel')
];
return $x;
}
static public function format_files($rr) {
$x = [
'notify_link' => z_root() . '/sharedwithme',
'name' => $rr['author']['xchan_name'],
'addr' => $rr['author']['xchan_addr'],
'url' => $rr['author']['xchan_url'],
'photo' => $rr['author']['xchan_photo_s'],
'when' => datetime_convert('UTC', date_default_timezone_get(), $rr['created']),
'hclass' => ('notify-unseen'),
'message' => t('shared a file with you')
];
return $x;
}
static public function format_mail($rr) {
$x = [
'notify_link' => z_root() . '/mail/' . $rr['id'],
'name' => $rr['xchan_name'],
'addr' => $rr['xchan_addr'],
'url' => $rr['xchan_url'],
'photo' => $rr['xchan_photo_s'],
'when' => datetime_convert('UTC', date_default_timezone_get(), $rr['created']),
'hclass' => (intval($rr['mail_seen']) ? 'notify-seen' : 'notify-unseen'),
'message' => t('sent you a private message'),
];
return $x;
}
static public function format_all_events($rr) {
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
$strt = datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['dtstart']);
$today = ((substr($strt, 0, 10) === datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d')) ? true : false);
$when = day_translate(datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['dtstart'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
$x = [
'notify_link' => z_root() . '/cdav/calendar/' . $rr['event_hash'],
'name' => $rr['xchan_name'],
'addr' => $rr['xchan_addr'],
'url' => $rr['xchan_url'],
'photo' => $rr['xchan_photo_s'],
'when' => $when,
'hclass' => (($today) ? 'notify-unseen bg-warning' : 'notify-unseen'),
'message' => t('created an event')
];
return $x;
}
static public function format_register($rr) {
$x = [
'notify_link' => z_root() . '/admin/accounts',
'name' => $rr['account_email'],
//'addr' => $rr['account_email'],
'photo' => z_root() . '/' . get_default_profile_photo(48),
'when' => datetime_convert('UTC', date_default_timezone_get(),$rr['account_created']),
'hclass' => ('notify-unseen'),
'message' => t('requires approval')
];
return $x;
}
}

55
Zotlabs/Lib/Hashpath.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
namespace Zotlabs\Lib;
/*
* Zotlabs\Lib\Hashpath
*
* Creates hashed directory structures for fast access and resistance to overloading any single directory with files.
*
* Takes a $hash which could be any string
* a $prefix which is where to place the hash directory in the filesystem, default is current directory
* use an empty string for $prefix to place hash directories directly off the root directory
* an optional $depth and $slice (default is 2) to indicate the hash level
* $depth = 1, 256 directories, suitable for < 384K records/files
* $depth = 2, 65536 directories, suitable for < 98M records/files
* $depth = 3, 16777216 directories, suitable for < 2.5B records/files
* ...
* The total number of records anticipated divided by the number of hash directories should generally be kept to
* less than 1500 entries for optimum performance though this varies by operating system and filesystem type.
* ext4 uses 32 bit inode numbers (~4B record limit) so use caution or alternative filesystem types with $depth above 3.
* an optional $mkdir (boolean) to recursively create the directory (ignoring errors) before returning
*
* examples: for a $hash of 'abcdefg' and prefix of 'path' the following paths are returned for $depth = 1 and $depth = 3
* path/7d/7d1a54127b222502f5b79b5fb0803061152a44f92b37e23c6527baf665d4da9a
* path/7d/1a/54/7d1a54127b222502f5b79b5fb0803061152a44f92b37e23c6527baf665d4da9a
*
* see also: boot.php:os_mkdir() - here we provide the equivalent of mkdir -p with permissions of 770.
*
*/
class Hashpath {
static function path($hash, $prefix = '.', $depth = 1, $slice = 2, $mkdir = true, $alg = false) {
if ($alg)
$hash = hash($alg, $hash);
$start = 0;
if ($depth < 1)
$depth = 1;
$sluglen = $depth * $slice;
do {
$slug = substr($hash, $start, $slice);
$prefix .= '/' . $slug;
$start += $slice;
$sluglen -= $slice;
}
while ($sluglen);
if ($mkdir)
os_mkdir($prefix, STORAGE_DEFAULT_PERMISSIONS, true);
return $prefix . '/' . $hash;
}
}

View File

@@ -2,15 +2,13 @@
namespace Zotlabs\Lib;
use Zotlabs\Web\HTTPSig;
class JSalmon {
static function sign($data,$key_id,$key) {
static function sign($data,$key_id,$key,$data_type = 'application/x-zot+json') {
$arr = $data;
$data = json_encode($data,JSON_UNESCAPED_SLASHES);
$data = base64url_encode($data, false); // do not strip padding
$data_type = 'application/x-zot+json';
$data = base64url_encode(json_encode($data,true),true); // strip padding
$encoding = 'base64url';
$algorithm = 'RSA-SHA256';
@@ -18,9 +16,9 @@ class JSalmon {
// precomputed base64url encoding of data_type, encoding, algorithm concatenated with periods
$precomputed = '.' . base64url_encode($data_type,false) . '.YmFzZTY0dXJs.UlNBLVNIQTI1Ng==';
$precomputed = '.' . base64url_encode($data_type,true) . '.YmFzZTY0dXJs.UlNBLVNIQTI1Ng';
$signature = base64url_encode(rsa_sign($data . $precomputed, $key), false);
$signature = base64url_encode(Crypto::sign($data . $precomputed, $key), true);
return ([
'signed' => true,
@@ -30,9 +28,45 @@ class JSalmon {
'alg' => $algorithm,
'sigs' => [
'value' => $signature,
'key_id' => base64url_encode($key_id)
'key_id' => base64url_encode($key_id, true)
]
]);
}
}
static function verify($x) {
logger('verify');
$ret = [ 'results' => [] ];
if(! is_array($x)) {
return false;
}
if(! ( array_key_exists('signed',$x) && $x['signed'])) {
return false;
}
$signed_data = preg_replace('/\s+/','',$x['data']) . '.'
. base64url_encode($x['data_type'],true) . '.'
. base64url_encode($x['encoding'],true) . '.'
. base64url_encode($x['alg'],true);
$key = HTTPSig::get_key(EMPTY_STR,'zot6',base64url_decode($x['sigs']['key_id']));
logger('key: ' . print_r($key,true));
if($key['portable_id'] && $key['public_key']) {
if(Crypto::verify($signed_data,base64url_decode($x['sigs']['value']),$key['public_key'])) {
logger('verified');
$ret = [ 'success' => true, 'signer' => $key['portable_id'], 'hubloc' => $key['hubloc'] ];
}
}
return $ret;
}
static function unpack($data) {
return json_decode(base64url_decode($data),true);
}
}

99
Zotlabs/Lib/Keyutils.php Normal file
View File

@@ -0,0 +1,99 @@
<?php
namespace Zotlabs\Lib;
use phpseclib\Crypt\RSA;
use phpseclib\Math\BigInteger;
/**
* Keyutils
* Convert RSA keys between various formats
*/
class Keyutils {
/**
* @param string $m modulo
* @param string $e exponent
* @return string
*/
public static function meToPem($m, $e) {
$rsa = new RSA();
$rsa->loadKey([
'e' => new BigInteger($e, 256),
'n' => new BigInteger($m, 256)
]);
return $rsa->getPublicKey();
}
/**
* @param string key
* @return string
*/
public static function rsaToPem($key) {
$rsa = new RSA();
$rsa->setPublicKey($key);
return $rsa->getPublicKey(RSA::PUBLIC_FORMAT_PKCS8);
}
/**
* @param string key
* @return string
*/
public static function pemToRsa($key) {
$rsa = new RSA();
$rsa->setPublicKey($key);
return $rsa->getPublicKey(RSA::PUBLIC_FORMAT_PKCS1);
}
/**
* @param string $key key
* @param string $m reference modulo
* @param string $e reference exponent
*/
public static function pemToMe($key, &$m, &$e) {
$rsa = new RSA();
$rsa->loadKey($key);
$rsa->setPublicKey();
$m = $rsa->modulus->toBytes();
$e = $rsa->exponent->toBytes();
}
/**
* @param string $pubkey
* @return string
*/
public static function salmonKey($pubkey) {
self::pemToMe($pubkey, $m, $e);
return 'RSA' . '.' . base64url_encode($m, true) . '.' . base64url_encode($e, true);
}
/**
* @param string $key
* @return string
*/
public static function convertSalmonKey($key) {
if (strstr($key, ','))
$rawkey = substr($key, strpos($key, ',') + 1);
else
$rawkey = substr($key, 5);
$key_info = explode('.', $rawkey);
$m = base64url_decode($key_info[1]);
$e = base64url_decode($key_info[2]);
return self::meToPem($m, $e);
}
}

View File

@@ -12,7 +12,7 @@ class LDSignatures {
$ohash = self::hash(self::signable_options($data['signature']));
$dhash = self::hash(self::signable_data($data));
$x = rsa_verify($ohash . $dhash,base64_decode($data['signature']['signatureValue']), $pubkey);
$x = Crypto::verify($ohash . $dhash,base64_decode($data['signature']['signatureValue']), $pubkey);
logger('LD-verify: ' . intval($x));
return $x;
@@ -29,17 +29,17 @@ class LDSignatures {
$options = [
'type' => 'RsaSignature2017',
'nonce' => random_string(64),
'creator' => z_root() . '/channel/' . $channel['channel_address'] . '/public_key_pem',
'created' => datetime_convert('UTC','UTC', 'now', 'Y-m-d\Th:i:s\Z')
'creator' => z_root() . '/channel/' . $channel['channel_address'],
'created' => datetime_convert('UTC','UTC', 'now', 'Y-m-d\TH:i:s\Z')
];
$ohash = self::hash(self::signable_options($options));
$dhash = self::hash(self::signable_data($data));
$options['signatureValue'] = base64_encode(rsa_sign($ohash . $dhash,$channel['channel_prvkey']));
$options['signatureValue'] = base64_encode(Crypto::sign($ohash . $dhash,$channel['channel_prvkey']));
$signed = array_merge([
'@context' => [
ACTIVITYSTREAMS_JSONLD_REV,
'@context' => [
ACTIVITYSTREAMS_JSONLD_REV,
'https://w3id.org/security/v1' ],
],$options);
@@ -88,12 +88,13 @@ class LDSignatures {
return '';
jsonld_set_document_loader('jsonld_document_loader');
try {
$d = jsonld_normalize($data,[ 'algorithm' => 'URDNA2015', 'format' => 'application/nquads' ]);
}
catch (\Exception $e) {
logger('normalise error:' . print_r($e,true));
// Don't log the exception - this can exhaust memory
// logger('normalise error:' . print_r($e,true));
logger('normalise error: ' . print_r($data,true));
}
@@ -116,7 +117,7 @@ class LDSignatures {
$precomputed = '.' . base64url_encode($data_type,false) . '.YmFzZTY0dXJs.UlNBLVNIQTI1Ng==';
$signature = base64url_encode(rsa_sign($data . $precomputed,$channel['channel_prvkey']));
$signature = base64url_encode(Crypto::sign($data . $precomputed,$channel['channel_prvkey']));
return ([
'id' => $arr['id'],
@@ -124,7 +125,7 @@ class LDSignatures {
'meDataType' => $data_type,
'meEncoding' => $encoding,
'meAlgorithm' => $algorithm,
'meCreator' => z_root() . '/channel/' . $channel['channel_address'] . '/public_key_pem',
'meCreator' => z_root() . '/channel/' . $channel['channel_address'],
'meSignatureValue' => $signature
]);
@@ -132,4 +133,4 @@ class LDSignatures {
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,8 @@
namespace Zotlabs\Lib;
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\Zotfinger;
use Zotlabs\Lib\Webfinger;
require_once('include/permissions.php');
@@ -17,7 +19,6 @@ class Libzotdir {
*/
static function find_upstream_directory($dirmode) {
global $DIRECTORY_FALLBACK_SERVERS;
$preferred = get_config('system','directory_server');
@@ -29,7 +30,7 @@ class Libzotdir {
);
if(($r) && ($r[0]['site_flags'] & DIRECTORY_MODE_STANDALONE)) {
$preferred = '';
}
}
}
@@ -40,19 +41,21 @@ class Libzotdir {
* from our list of directory servers. However, if we're a directory
* server ourself, point at the local instance
* We will then set this value so this should only ever happen once.
* Ideally there will be an admin setting to change to a different
* Ideally there will be an admin setting to change to a different
* directory server if you don't like our choice or if circumstances change.
*/
$directory_fallback_servers = get_directory_fallback_servers();
$dirmode = intval(get_config('system','directory_mode'));
if ($dirmode == DIRECTORY_MODE_NORMAL) {
$toss = mt_rand(0,count($DIRECTORY_FALLBACK_SERVERS));
$preferred = $DIRECTORY_FALLBACK_SERVERS[$toss];
$toss = mt_rand(0,count($directory_fallback_servers));
$preferred = $directory_fallback_servers[$toss];
if(! $preferred) {
$preferred = DIRECTORY_FALLBACK_MASTER;
}
set_config('system','directory_server',$preferred);
}
}
else {
set_config('system','directory_server',z_root());
}
@@ -106,7 +109,7 @@ class Libzotdir {
$ret = get_config('directory', $setting);
// 'safemode' is the default if there is no observer or no established preference.
// 'safemode' is the default if there is no observer or no established preference.
if($setting === 'safemode' && $ret === false)
$ret = 1;
@@ -173,8 +176,8 @@ class Libzotdir {
*
* Checks the directory mode of this hub to see if it is some form of directory server. If it is,
* get the directory realm of this hub. Fetch a list of all other directory servers in this realm and request
* a directory sync packet. This will contain both directory updates and new ratings. Store these all in the DB.
* In the case of updates, we will query each of them asynchronously from a poller task. Ratings are stored
* a directory sync packet. This will contain both directory updates and new ratings. Store these all in the DB.
* In the case of updates, we will query each of them asynchronously from a poller task. Ratings are stored
* directly if the rater's signature matches.
*
* @param int $dirmode;
@@ -186,16 +189,17 @@ class Libzotdir {
return;
$realm = get_directory_realm();
if ($realm == DIRECTORY_REALM) {
$r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_type = %d and ( site_realm = '%s' or site_realm = '') ",
$r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_type = %d and ( site_realm = '%s' or site_realm = '') and site_dead = 0",
intval(DIRECTORY_MODE_PRIMARY|DIRECTORY_MODE_SECONDARY),
dbesc(z_root()),
intval(SITE_TYPE_ZOT),
dbesc($realm)
);
}
}
else {
$r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_realm like '%s' and site_type = %d ",
$r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_realm like '%s' and site_type = %d and site_dead = 0",
intval(DIRECTORY_MODE_PRIMARY|DIRECTORY_MODE_SECONDARY),
dbesc(z_root()),
dbesc(protect_sprintf('%' . $realm . '%')),
@@ -203,6 +207,8 @@ class Libzotdir {
);
}
// If there are no directory servers, setup the fallback master
/** @FIXME What to do if we're in a different realm? */
@@ -212,14 +218,14 @@ class Libzotdir {
[
'site_url' => DIRECTORY_FALLBACK_MASTER,
'site_flags' => DIRECTORY_MODE_PRIMARY,
'site_update' => NULL_DATE,
'site_update' => NULL_DATE,
'site_directory' => DIRECTORY_FALLBACK_MASTER . '/dirsearch',
'site_realm' => DIRECTORY_REALM,
'site_valid' => 1,
]
);
$r = q("select * from site where site_flags in (%d, %d) and site_url != '%s' and site_type = %d ",
$r = q("select * from site where site_flags in (%d, %d) and site_url != '%s' and site_type = %d and site_dead = 0",
intval(DIRECTORY_MODE_PRIMARY),
intval(DIRECTORY_MODE_SECONDARY),
dbesc(z_root()),
@@ -243,7 +249,6 @@ class Libzotdir {
$syncdate = (($rr['site_sync'] <= NULL_DATE) ? datetime_convert('UTC','UTC','now - 2 days') : $rr['site_sync']);
$x = z_fetch_url($rr['site_directory'] . '?f=&sync=' . urlencode($syncdate) . (($token) ? '&t=' . $token : ''));
if (! $x['success'])
continue;
@@ -271,7 +276,7 @@ class Libzotdir {
$ud_flags |= UPDATE_FLAGS_DELETED;
if (is_array($t['flags']) && in_array('forced',$t['flags']))
$ud_flags |= UPDATE_FLAGS_FORCED;
$z = q("insert into updates ( ud_hash, ud_guid, ud_date, ud_flags, ud_addr )
values ( '%s', '%s', '%s', %d, '%s' ) ",
dbesc($t['hash']),
@@ -306,12 +311,13 @@ class Libzotdir {
if ($ud['ud_addr'] && (! ($ud['ud_flags'] & UPDATE_FLAGS_DELETED))) {
$success = false;
$zf = [];
$href = \Zotlabs\Lib\Webfinger::zot_url(punify($url));
$href = Webfinger::zot_url(punify($ud['ud_addr']));
if($href) {
$zf = \Zotlabs\Lib\Zotfinger::exec($href);
$zf = Zotfinger::exec($href);
}
if(is_array($zf) && array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) {
if(array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) {
$xc = Libzot::import_xchan($zf['data'], 0, $ud);
}
else {
@@ -336,10 +342,10 @@ class Libzotdir {
static function local_dir_update($uid, $force) {
logger('local_dir_update: uid: ' . $uid, LOGGER_DEBUG);
$p = q("select channel.channel_hash, channel_address, channel_timezone, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1",
$p = q("select channel.channel_hash, channel_address, channel_timezone, channel_portable_id, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1",
intval($uid)
);
@@ -348,10 +354,11 @@ class Libzotdir {
if ($p) {
$hash = $p[0]['channel_hash'];
$legacy_hash = $p[0]['channel_portable_id'];
$profile['description'] = $p[0]['pdesc'];
$profile['birthday'] = $p[0]['dob'];
if ($age = age($p[0]['dob'],$p[0]['channel_timezone'],''))
if ($age = age($p[0]['dob'],$p[0]['channel_timezone'],''))
$profile['age'] = $age;
$profile['gender'] = $p[0]['gender'];
@@ -381,14 +388,15 @@ class Libzotdir {
logger('hidden: ' . $hidden);
$r = q("select xchan_hidden from xchan where xchan_hash = '%s' limit 1",
$r = q("select xchan_hidden from xchan where xchan_hash = '%s'",
dbesc($p[0]['channel_hash'])
);
if(intval($r[0]['xchan_hidden']) != $hidden) {
$r = q("update xchan set xchan_hidden = %d where xchan_hash = '%s'",
$r = q("update xchan set xchan_hidden = %d where xchan_hash in ('%s', '%s')",
intval($hidden),
dbesc($p[0]['channel_hash'])
dbesc($hash),
dbesc($legacy_hash)
);
}
@@ -402,14 +410,16 @@ class Libzotdir {
}
else {
// they may have made it private
$r = q("delete from xprof where xprof_hash = '%s'",
dbesc($hash)
q("delete from xprof where xprof_hash in ('%s', '%s')",
dbesc($hash),
dbesc($legacy_hash)
);
$r = q("delete from xtag where xtag_hash = '%s'",
dbesc($hash)
q("delete from xtag where xtag_hash in ('%s', '%s')",
dbesc($hash),
dbesc($legacy_hash)
);
}
}
$ud_hash = random_string() . '@' . \App::get_hostname();
@@ -440,7 +450,7 @@ class Libzotdir {
$arr['xprof_hash'] = $hash;
$arr['xprof_dob'] = (($profile['birthday'] === '0000-00-00') ? $profile['birthday'] : datetime_convert('','',$profile['birthday'],'Y-m-d')); // !!!! check this for 0000 year
$arr['xprof_age'] = (($profile['age']) ? intval($profile['age']) : 0);
$arr['xprof_desc'] = (($profile['description']) ? htmlspecialchars($profile['description'], ENT_COMPAT,'UTF-8',false) : '');
$arr['xprof_desc'] = (($profile['description']) ? htmlspecialchars($profile['description'], ENT_COMPAT,'UTF-8',false) : '');
$arr['xprof_gender'] = (($profile['gender']) ? htmlspecialchars($profile['gender'], ENT_COMPAT,'UTF-8',false) : '');
$arr['xprof_marital'] = (($profile['marital']) ? htmlspecialchars($profile['marital'], ENT_COMPAT,'UTF-8',false) : '');
$arr['xprof_sexual'] = (($profile['sexual']) ? htmlspecialchars($profile['sexual'], ENT_COMPAT,'UTF-8',false) : '');
@@ -635,7 +645,7 @@ class Libzotdir {
dbesc(datetime_convert()),
intval($flags),
dbesc($addr)
);
);
}
else {
q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and not (ud_flags & %d)>0 ",
@@ -651,4 +661,4 @@ class Libzotdir {
}
}

View File

@@ -19,7 +19,7 @@ class MessageFilter {
$lang = null;
if((strpos($incl,'lang=') !== false) || (strpos($excl,'lang=') !== false)) {
if((strpos($incl,'lang=') !== false) || (strpos($excl,'lang=') !== false) || (strpos($incl,'lang!=') !== false) || (strpos($excl,'lang!=') !== false)) {
$lang = detect_language($text);
}
@@ -39,10 +39,17 @@ class MessageFilter {
if((($t['ttype'] == TERM_HASHTAG) || ($t['ttype'] == TERM_COMMUNITYTAG)) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
return false;
}
elseif(substr($word,0,1) === '$' && $tags) {
foreach($tags as $t)
if(($t['ttype'] == TERM_CATEGORY) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
return false;
}
elseif((strpos($word,'/') === 0) && preg_match($word,$text))
return false;
elseif((strpos($word,'lang=') === 0) && ($lang) && (strcasecmp($lang,trim(substr($word,5))) == 0))
return false;
elseif((strpos($word,'lang!=') === 0) && ($lang) && (strcasecmp($lang,trim(substr($word,6))) != 0))
return false;
elseif(stristr($text,$word) !== false)
return false;
}
@@ -60,10 +67,17 @@ class MessageFilter {
if((($t['ttype'] == TERM_HASHTAG) || ($t['ttype'] == TERM_COMMUNITYTAG)) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
return true;
}
elseif(substr($word,0,1) === '$' && $tags) {
foreach($tags as $t)
if(($t['ttype'] == TERM_CATEGORY) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
return true;
}
elseif((strpos($word,'/') === 0) && preg_match($word,$text))
return true;
elseif((strpos($word,'lang=') === 0) && ($lang) && (strcasecmp($lang,trim(substr($word,5))) == 0))
return true;
elseif((strpos($word,'lang!=') === 0) && ($lang) && (strcasecmp($lang,trim(substr($word,6))) != 0))
return true;
elseif(stristr($text,$word) !== false)
return true;
}

View File

@@ -2,12 +2,14 @@
namespace Zotlabs\Lib;
use Zotlabs\Lib\Libsync;
define ( 'NWIKI_ITEM_RESOURCE_TYPE', 'nwiki' );
class NativeWiki {
static public function listwikis($channel, $observer_hash) {
public static function listwikis($channel, $observer_hash) {
$sql_extra = item_permissions_sql($channel['channel_id'], $observer_hash);
$wikis = q("SELECT * FROM item
@@ -38,28 +40,19 @@ class NativeWiki {
}
function create_wiki($channel, $observer_hash, $wiki, $acl) {
public static function create_wiki($channel, $observer_hash, $wiki, $acl) {
// Generate unique resource_id using the same method as item_message_id()
do {
$dups = false;
$resource_id = random_string();
$r = q("SELECT mid FROM item WHERE resource_id = '%s' AND resource_type = '%s' AND uid = %d LIMIT 1",
dbesc($resource_id),
dbesc(NWIKI_ITEM_RESOURCE_TYPE),
intval($channel['channel_id'])
);
if($r)
$dups = true;
} while($dups == true);
$resource_id = new_uuid();
$uuid = new_uuid();
$ac = $acl->get();
$mid = item_message_id();
$mid = z_root() . '/item/' . $uuid;
$arr = array(); // Initialize the array of parameters for the post
$item_hidden = ((intval($wiki['postVisible']) === 0) ? 1 : 0);
$wiki_url = z_root() . '/wiki/' . $channel['channel_address'] . '/' . $wiki['urlName'];
$arr['aid'] = $channel['channel_account_id'];
$arr['uuid'] = $uuid;
$arr['uid'] = $channel['channel_id'];
$arr['mid'] = $mid;
$arr['parent_mid'] = $mid;
@@ -80,7 +73,7 @@ class NativeWiki {
$arr['item_thread_top'] = 1;
$arr['item_private'] = intval($acl->is_private());
$arr['verb'] = ACTIVITY_CREATE;
$arr['obj_type'] = ACTIVITY_OBJ_WIKI;
$arr['obj_type'] = 'Document';
$arr['body'] = '[table][tr][td][h1]New Wiki[/h1][/td][/tr][tr][td][zrl=' . $wiki_url . ']' . $wiki['htmlName'] . '[/zrl][/td][/tr][/table]';
$arr['public_policy'] = map_scope(\Zotlabs\Access\PermissionLimits::Get($channel['channel_id'],'view_wiki'),true);
@@ -108,7 +101,7 @@ class NativeWiki {
}
}
function update_wiki($channel_id, $observer_hash, $arr, $acl) {
public static function update_wiki($channel_id, $observer_hash, $arr, $acl) {
$w = self::get_wiki($channel_id, $observer_hash, $arr['resource_id']);
$item = $w['wiki'];
@@ -163,7 +156,7 @@ class NativeWiki {
}
}
static public function sync_a_wiki_item($uid,$id,$resource_id) {
public static function sync_a_wiki_item($uid,$id,$resource_id) {
$r = q("SELECT * from item WHERE uid = %d AND ( id = %d OR ( resource_type = '%s' and resource_id = '%s' )) ",
@@ -187,12 +180,12 @@ class NativeWiki {
foreach($sync_item as $w) {
$pkt[] = encode_item($w,true);
}
build_sync_packet($uid,array('wiki' => $pkt));
Libsync::build_sync_packet($uid,array('wiki' => $pkt));
}
}
}
function delete_wiki($channel_id,$observer_hash,$resource_id) {
public static function delete_wiki($channel_id,$observer_hash,$resource_id) {
$w = self::get_wiki($channel_id,$observer_hash,$resource_id);
$item = $w['wiki'];
@@ -200,7 +193,7 @@ class NativeWiki {
return array('item' => null, 'success' => false);
}
else {
$drop = drop_item($item['id'], false, DROPITEM_NORMAL, true);
$drop = drop_item($item['id'], false, DROPITEM_NORMAL);
}
info( t('Wiki files deleted successfully'));
@@ -209,7 +202,7 @@ class NativeWiki {
}
static public function get_wiki($channel_id, $observer_hash, $resource_id) {
public static function get_wiki($channel_id, $observer_hash, $resource_id) {
$sql_extra = item_permissions_sql($channel_id,$observer_hash);
@@ -243,7 +236,7 @@ class NativeWiki {
}
static public function exists_by_name($uid, $urlName) {
public static function exists_by_name($uid, $urlName) {
$sql_extra = item_permissions_sql($uid);
@@ -265,7 +258,7 @@ class NativeWiki {
}
static public function get_permissions($resource_id, $owner_id, $observer_hash) {
public static function get_permissions($resource_id, $owner_id, $observer_hash) {
// TODO: For now, only the owner can edit
$sql_extra = item_permissions_sql($owner_id, $observer_hash);

View File

@@ -163,7 +163,7 @@ class NativeWikiPage {
return [ 'success' => true, 'page' => $page ];
}
return [ 'success' => false, 'item_id' => $c['item_id'], 'message' => t('Page not found') ];
return [ 'success' => false, 'message' => t('Page not found') ];
}
@@ -339,7 +339,6 @@ class NativeWikiPage {
}
static public function save_page($arr) {
$pageUrlName = ((array_key_exists('pageUrlName',$arr)) ? $arr['pageUrlName'] : '');
$content = ((array_key_exists('content',$arr)) ? $arr['content'] : '');
$resource_id = ((array_key_exists('resource_id',$arr)) ? $arr['resource_id'] : '');
@@ -385,7 +384,7 @@ class NativeWikiPage {
$ret = item_store($item, false, false);
if($ret['item_id'])
return array('message' => '', 'item_id' => $ret['item_id'], 'filename' => $filename, 'success' => true);
return array('message' => '', 'item_id' => $ret['item_id'], 'filename' => $pageUrlName, 'success' => true);
else
return array('message' => t('Page update failed.'), 'success' => false);
}
@@ -432,12 +431,12 @@ class NativeWikiPage {
$channel_id = ((array_key_exists('channel_id',$arr)) ? $arr['channel_id'] : 0);
if (! $commitHash) {
return array('content' => $content, 'message' => 'No commit was provided', 'success' => false);
return array('message' => 'No commit was provided', 'success' => false);
}
$w = Zlib\NativeWiki::get_wiki($channel_id, $observer_hash, $resource_id);
if (!$w['wiki']) {
return array('content' => $content, 'message' => 'Error reading wiki', 'success' => false);
return array('message' => 'Error reading wiki', 'success' => false);
}
$x = $arr;
@@ -451,7 +450,7 @@ class NativeWikiPage {
$content = $loaded['body'];
return [ 'content' => $content, 'success' => true ];
}
return [ 'content' => $content, 'success' => false ];
return [ 'success' => false ];
}
}
@@ -530,8 +529,11 @@ class NativeWikiPage {
foreach ($match[1] as $m) {
// TODO: Why do we need to double urlencode for this to work?
//$pageURLs[] = urlencode(urlencode(escape_tags($m)));
$pageURLs[] = Zlib\NativeWiki::name_encode(escape_tags($m));
$pages[] = $m;
$titleUri = explode('|',$m);
$page = $titleUri[0] ?? '';
$title = $titleUri[1] ?? $page;
$pageURLs[] = Zlib\NativeWiki::name_encode(escape_tags($page));
$pages[] = $title;
}
$idx = 0;
while(strpos($s,'[[') !== false) {

View File

@@ -57,6 +57,7 @@ class PConfig {
\App::$config[$uid][$c]['config_loaded'] = true;
}
\App::$config[$uid][$c][$k] = $rr['v'];
\App::$config[$uid][$c]['pcfgud:'.$k] = $rr['updated'];
}
}
}
@@ -111,9 +112,11 @@ class PConfig {
* The configuration key to set
* @param string $value
* The value to store
* @param string $updated (optional)
* The datetime to store
* @return mixed Stored $value or false
*/
static public function Set($uid, $family, $key, $value) {
static public function Set($uid, $family, $key, $value, $updated = NULL) {
// this catches subtle errors where this function has been called
// with local_channel() when not logged in (which returns false)
@@ -129,6 +132,27 @@ class PConfig {
// manage array value
$dbvalue = ((is_array($value)) ? serialize($value) : $value);
$dbvalue = ((is_bool($dbvalue)) ? intval($dbvalue) : $dbvalue);
$new = false;
$now = datetime_convert();
if (! $updated) {
//Sometimes things happen fast... very fast.
//To make sure legitimate updates aren't rejected
//because not enough time has passed. We say our updates
//happened just a short time in the past rather than right now.
$updated = datetime_convert('UTC','UTC','-2 seconds');
}
$hash = hash('sha256',$family.':'.$key);
if (self::Get($uid, 'hz_delpconfig', $hash) !== false) {
if (self::Get($uid, 'hz_delpconfig', $hash) > $now) {
logger('Refusing to update pconfig with outdated info (Item deleted more recently).', LOGGER_NORMAL, LOG_ERR);
return self::Get($uid,$family,$key);
} else {
self::Delete($uid,'hz_delpconfig',$hash);
}
}
if(self::Get($uid, $family, $key) === false) {
if(! array_key_exists($uid, \App::$config))
@@ -136,23 +160,53 @@ class PConfig {
if(! array_key_exists($family, \App::$config[$uid]))
\App::$config[$uid][$family] = array();
$ret = q("INSERT INTO pconfig ( uid, cat, k, v ) VALUES ( %d, '%s', '%s', '%s' ) ",
$ret = q("INSERT INTO pconfig ( uid, cat, k, v, updated ) VALUES ( %d, '%s', '%s', '%s', '%s' ) ",
intval($uid),
dbesc($family),
dbesc($key),
dbesc($dbvalue)
dbesc($dbvalue),
dbesc($updated)
);
// There is a possible race condition if another process happens
// to insert something after this thread has Loaded and now. We should
// at least make a note of it if it happens.
if (!$ret) {
logger("Error: Insert to pconfig failed.",LOGGER_NORMAL, LOG_ERR);
}
\App::$config[$uid][$family]['pcfgud:'.$key] = $updated;
}
else {
$new = (\App::$config[$uid][$family]['pcfgud:'.$key] < $now);
$ret = q("UPDATE pconfig SET v = '%s' WHERE uid = %d and cat = '%s' AND k = '%s'",
dbesc($dbvalue),
intval($uid),
dbesc($family),
dbesc($key)
);
if ($new) {
// @NOTE There is still a possible race condition under limited circumstances
// where a value will be updated by another thread with more current data than
// we have. At this point there is no easy way to test for it, so we update
// and hope for the best.
$ret = q("UPDATE pconfig SET v = '%s', updated = '%s' WHERE uid = %d and cat = '%s' AND k = '%s' ",
dbesc($dbvalue),
dbesc($updated),
intval($uid),
dbesc($family),
dbesc($key)
);
\App::$config[$uid][$family]['pcfgud:'.$key] = $updated;
} else {
logger('Refusing to update pconfig with outdated info.', LOGGER_NORMAL, LOG_ERR);
return self::Get($uid, $family, $key);
}
}
// keep a separate copy for all variables which were
// set in the life of this page. We need this to
// synchronise channel clones.
@@ -163,7 +217,11 @@ class PConfig {
\App::$config[$uid]['transient'][$family] = array();
\App::$config[$uid][$family][$key] = $value;
\App::$config[$uid]['transient'][$family][$key] = $value;
if ($new) {
\App::$config[$uid]['transient'][$family][$key] = $value;
\App::$config[$uid]['transient'][$family]['pcfgud:'.$key] = $updated;
}
if($ret)
return $value;
@@ -184,20 +242,33 @@ class PConfig {
* The category of the configuration value
* @param string $key
* The configuration key to delete
* @return mixed
* @param string $updated (optional)
* The datetime to store
* @return boolean
*/
static public function Delete($uid, $family, $key) {
static public function Delete($uid, $family, $key, $updated = NULL) {
if(is_null($uid) || $uid === false)
return false;
$updated = ($updated) ? $updated : datetime_convert('UTC','UTC','-2 seconds');
$now = datetime_convert();
$newer = (\App::$config[$uid][$family]['pcfgud:'.$key] < $now);
if (! $newer) {
logger('Refusing to delete pconfig with outdated delete request.', LOGGER_NORMAL, LOG_ERR);
return false;
}
$ret = false;
if(array_key_exists($uid,\App::$config)
&& is_array(\App::$config['uid'])
&& array_key_exists($family,\App::$config['uid'])
&& array_key_exists($key, \App::$config[$uid][$family]))
if (isset(\App::$config[$uid][$family][$key])) {
unset(\App::$config[$uid][$family][$key]);
}
if (isset(\App::$config[$uid][$family]['pcfgud:'.$key])) {
unset(\App::$config[$uid][$family]['pcfgud:'.$key]);
}
$ret = q("DELETE FROM pconfig WHERE uid = %d AND cat = '%s' AND k = '%s'",
intval($uid),
@@ -205,6 +276,13 @@ class PConfig {
dbesc($key)
);
// Synchronize delete with clones.
if ($family != 'hz_delpconfig') {
$hash = hash('sha256',$family.':'.$key);
set_pconfig($uid,'hz_delpconfig',$hash,$updated);
}
return $ret;
}

View File

@@ -2,9 +2,6 @@
namespace Zotlabs\Lib;
use Zotlabs\Lib\Libzot;
class Queue {
static function update($id, $add_priority = 0) {
@@ -39,7 +36,7 @@ class Queue {
// queue item is less than 12 hours old, we'll schedule for fifteen
// minutes.
$r = q("UPDATE outq SET outq_scheduled = '%s' WHERE outq_posturl = '%s'",
q("UPDATE outq SET outq_scheduled = '%s' WHERE outq_posturl = '%s'",
dbesc(datetime_convert('UTC','UTC','now + 5 days')),
dbesc($x[0]['outq_posturl'])
);
@@ -88,7 +85,7 @@ class Queue {
static function set_delivered($id,$channel = 0) {
logger('queue: set delivered ' . $id,LOGGER_DEBUG);
$sql_extra = (($channel_id) ? " and outq_channel = " . intval($channel_id) . " " : '');
$sql_extra = (($channel['channel_id']) ? " and outq_channel = " . intval($channel['channel_id']) . " " : '');
// Set the next scheduled run date so far in the future that it will be expired
// long before it ever makes it back into the delivery chain.
@@ -116,7 +113,7 @@ class Queue {
dbesc($arr['hash']),
intval($arr['account_id']),
intval($arr['channel_id']),
dbesc(($arr['driver']) ? $arr['driver'] : 'zot'),
dbesc(($arr['driver']) ? $arr['driver'] : 'zot6'),
dbesc($arr['posturl']),
intval(1),
intval(($arr['priority']) ? $arr['priority'] : 0),
@@ -230,11 +227,10 @@ class Queue {
logger('deliver: dest: ' . $outq['outq_posturl'], LOGGER_DEBUG);
if($outq['outq_posturl'] === z_root() . '/zot') {
// local delivery
$zot = new \Zotlabs\Zot6\Receiver(new \Zotlabs\Zot6\Zot6Handler(),$outq['outq_notify']);
$result = $zot->run(true);
$result = $zot->run();
logger('returned_json: ' . json_encode($result,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES), LOGGER_DATA);
logger('deliver: local zot delivery succeeded to ' . $outq['outq_posturl']);
Libzot::process_response($outq['outq_posturl'],[ 'success' => true, 'body' => json_encode($result) ], $outq);
@@ -250,7 +246,7 @@ class Queue {
$host_crypto = null;
if($channel && $base) {
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {

View File

@@ -2,7 +2,6 @@
namespace Zotlabs\Lib;
class Share {
private $item = null;
@@ -54,6 +53,7 @@ class Share {
if(! $this->item)
return $obj;
$obj['asld'] = Activity::fetch_item( [ 'id' => $this->item['mid'] ] );
$obj['type'] = $this->item['obj_type'];
$obj['id'] = $this->item['mid'];
$obj['content'] = $this->item['body'];
@@ -126,12 +126,12 @@ class Share {
"' profile='" . $this->item['author']['xchan_url'] .
"' avatar='" . $this->item['author']['xchan_photo_s'] .
"' link='" . $this->item['plink'] .
"' auth='" . (($this->item['author']['network'] === 'zot') ? 'true' : 'false') .
"' auth='" . ((in_array($this->item['author']['xchan_network'], ['zot6', 'zot'])) ? 'true' : 'false') .
"' posted='" . $this->item['created'] .
"' message_id='" . $this->item['mid'] .
"']";
if($this->item['title'])
$bb .= '[b]'.$this->item['title'].'[/b]'."\r\n";
$bb .= '[h3][b]'.$this->item['title'].'[/b][/h3]'."\r\n";
$bb .= (($is_photo) ? $photo_bb . "\r\n" . $this->item['body'] : $this->item['body']);
$bb .= "[/share]";
}

View File

@@ -0,0 +1,150 @@
<?php
namespace Zotlabs\Lib;
use DomDocument;
/**
* SVGSantiizer
*
* Whitelist-based PHP SVG sanitizer.
*
* @link https://github.com/alister-/SVG-Sanitizer}
* @author Alister Norris
* @copyright Copyright (c) 2013 Alister Norris
* @license http://opensource.org/licenses/mit-license.php The MIT License
* @package svgsanitizer
*/
class SvgSanitizer {
private $xmlDoc; // PHP XML DOMDocument
private $removedattrs = [];
private static $allowed_functions = [ 'matrix', 'url', 'translate', 'rgb' ];
// defines the whitelist of elements and attributes allowed.
private static $whitelist = [
'a' => [ 'class', 'clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'id', 'mask', 'opacity', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform', 'href', 'xlink:href', 'xlink:title' ],
'circle' => [ 'class', 'clip-path', 'clip-rule', 'cx', 'cy', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'id', 'mask', 'opacity', 'r', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform' ],
'clipPath' => [ 'class', 'clipPathUnits', 'id' ],
'defs' => [ ],
'style' => [ 'type' ],
'desc' => [ ],
'ellipse' => [ 'class', 'clip-path', 'clip-rule', 'cx', 'cy', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'id', 'mask', 'opacity', 'requiredFeatures', 'rx', 'ry', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform' ],
'feGaussianBlur' => [ 'class', 'color-interpolation-filters', 'id', 'requiredFeatures', 'stdDeviation' ],
'filter' => [ 'class', 'color-interpolation-filters', 'filterRes', 'filterUnits', 'height', 'id', 'primitiveUnits', 'requiredFeatures', 'width', 'x', 'xlink:href', 'y' ],
'foreignObject' => [ 'class', 'font-size', 'height', 'id', 'opacity', 'requiredFeatures', 'style', 'transform', 'width', 'x', 'y' ],
'g' => [ 'class', 'clip-path', 'clip-rule', 'id', 'display', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'mask', 'opacity', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform', 'font-family', 'font-size', 'font-style', 'font-weight', 'text-anchor' ],
'image' => [ 'class', 'clip-path', 'clip-rule', 'filter', 'height', 'id', 'mask', 'opacity', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'width', 'x', 'xlink:href', 'xlink:title', 'y' ],
'line' => [ 'class', 'clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'id', 'marker-end', 'marker-mid', 'marker-start', 'mask', 'opacity', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform', 'x1', 'x2', 'y1', 'y2' ],
'linearGradient' => [ 'class', 'id', 'gradientTransform', 'gradientUnits', 'requiredFeatures', 'spreadMethod', 'systemLanguage', 'x1', 'x2', 'xlink:href', 'y1', 'y2' ],
'marker' => [ 'id', 'class', 'markerHeight', 'markerUnits', 'markerWidth', 'orient', 'preserveAspectRatio', 'refX', 'refY', 'systemLanguage', 'viewBox' ],
'mask' => [ 'class', 'height', 'id', 'maskContentUnits', 'maskUnits', 'width', 'x', 'y' ],
'metadata' => [ 'class', 'id' ],
'path' => [ 'class', 'clip-path', 'clip-rule', 'd', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'id', 'marker-end', 'marker-mid', 'marker-start', 'mask', 'opacity', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform' ],
'pattern' => [ 'class', 'height', 'id', 'patternContentUnits', 'patternTransform', 'patternUnits', 'requiredFeatures', 'style', 'systemLanguage', 'viewBox', 'width', 'x', 'xlink:href', 'y' ],
'polygon' => [ 'class', 'clip-path', 'clip-rule', 'id', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'id', 'class', 'marker-end', 'marker-mid', 'marker-start', 'mask', 'opacity', 'points', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform' ],
'polyline' => [ 'class', 'clip-path', 'clip-rule', 'id', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'marker-end', 'marker-mid', 'marker-start', 'mask', 'opacity', 'points', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform' ],
'radialGradient' => [ 'class', 'cx', 'cy', 'fx', 'fy', 'gradientTransform', 'gradientUnits', 'id', 'r', 'requiredFeatures', 'spreadMethod', 'systemLanguage', 'xlink:href' ],
'rect' => [ 'class', 'clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'height', 'id', 'mask', 'opacity', 'requiredFeatures', 'rx', 'ry', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform', 'width', 'x', 'y' ],
'stop' => [ 'class', 'id', 'offset', 'requiredFeatures', 'stop-color', 'stop-opacity', 'style', 'systemLanguage' ],
'svg' => [ 'class', 'clip-path', 'clip-rule', 'filter', 'id', 'height', 'mask', 'preserveAspectRatio', 'requiredFeatures', 'style', 'systemLanguage', 'viewBox', 'width', 'x', 'xmlns', 'xmlns:se', 'xmlns:xlink', 'y' ],
'switch' => [ 'class', 'id', 'requiredFeatures', 'systemLanguage' ],
'symbol' => [ 'class', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'font-family', 'font-size', 'font-style', 'font-weight', 'id', 'opacity', 'preserveAspectRatio', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'transform', 'viewBox' ],
'text' => [ 'class', 'clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'font-family', 'font-size', 'font-style', 'font-weight', 'id', 'mask', 'opacity', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'text-anchor', 'transform', 'x', 'xml:space', 'y' ],
'textPath' => [ 'class', 'id', 'method', 'requiredFeatures', 'spacing', 'startOffset', 'style', 'systemLanguage', 'transform', 'xlink:href' ],
'title' => [ ],
'tspan' => [ 'class', 'clip-path', 'clip-rule', 'dx', 'dy', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'font-family', 'font-size', 'font-style', 'font-weight', 'id', 'mask', 'opacity', 'requiredFeatures', 'rotate', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'systemLanguage', 'text-anchor', 'textLength', 'transform', 'x', 'xml:space', 'y' ],
'use' => [ 'class', 'clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'height', 'id', 'mask', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'transform', 'width', 'x', 'xlink:href', 'y' ],
];
function __construct() {
$this->xmlDoc = new DOMDocument('1.0','UTF-8');
$this->xmlDoc->preserveWhiteSpace = false;
libxml_use_internal_errors(true);
}
// load XML SVG
function load($file) {
$this->xmlDoc->load($file);
}
function loadXML($str) {
if (! $this->xmlDoc->loadXML($str)) {
logger('loadxml: ' . print_r(libxml_get_errors(),true), LOGGER_DEBUG);
return false;
}
return true;
}
function sanitize()
{
// all elements in xml doc
$allElements = $this->xmlDoc->getElementsByTagName('*');
// loop through all elements
for($i = 0; $i < $allElements->length; $i++)
{
$this->removedattrs = [];
$currentNode = $allElements->item($i);
// logger('current_node: ' . print_r($currentNode,true));
// array of allowed attributes in specific element
$whitelist_attr_arr = self::$whitelist[$currentNode->tagName];
// does element exist in whitelist?
if(isset($whitelist_attr_arr)) {
$total = $currentNode->attributes->length;
for($x = 0; $x < $total; $x++) {
// get attributes name
$attrName = $currentNode->attributes->item($x)->nodeName;
// logger('checking: ' . print_r($currentNode->attributes->item($x),true));
$matches = false;
// check if attribute isn't in whitelist
if(! in_array($attrName, $whitelist_attr_arr)) {
$this->removedattrs[] = $attrName;
}
// check for disallowed functions
elseif (preg_match_all('/([a-zA-Z0-9]+)[\s]*\(/',
$currentNode->attributes->item($x)->textContent,$matches,PREG_SET_ORDER)) {
if ($attrName === 'text') {
continue;
}
foreach ($matches as $match) {
if(! in_array($match[1],self::$allowed_functions)) {
logger('queue_remove_function: ' . $match[1],LOGGER_DEBUG);
$this->removedattrs[] = $attrName;
}
}
}
}
if ($this->removedattrs) {
foreach ($this->removedattrs as $attr) {
$currentNode->removeAttribute($attr);
logger('removed: ' . $attr, LOGGER_DEBUG);
}
}
}
// else remove element
else {
logger('remove_node: ' . print_r($currentNode,true));
$currentNode->parentNode->removeChild($currentNode);
}
}
return true;
}
function saveSVG() {
$this->xmlDoc->formatOutput = true;
return($this->xmlDoc->saveXML());
}
}

View File

@@ -5,9 +5,14 @@ namespace Zotlabs\Lib;
class System {
static public function get_platform_name() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && array_key_exists('platform_name',\App::$config['system']))
return \App::$config['system']['platform_name'];
return PLATFORM_NAME;
static $platform_name = '';
if(empty($platform_name)) {
if(is_array(\App::$config) && is_array(\App::$config['system']) && array_key_exists('platform_name',\App::$config['system']))
$platform_name = \App::$config['system']['platform_name'];
else
$platform_name = PLATFORM_NAME;
}
return $platform_name;
}
static public function get_site_name() {

View File

@@ -35,9 +35,12 @@ class ThreadItem {
public function __construct($data) {
$this->data = $data;
$this->toplevel = ($this->get_id() == $this->get_data_value('parent'));
$this->threaded = get_config('system','thread_allow');
$observer = \App::get_observer();
// Prepare the children
if($data['children']) {
@@ -51,6 +54,7 @@ class ThreadItem {
continue;
}
$child = new ThreadItem($item);
$this->add_child($child);
}
@@ -73,8 +77,8 @@ class ThreadItem {
* _ false on failure
*/
public function get_template_data($conv_responses, $thread_level=1) {
public function get_template_data($conv_responses, $thread_level=1, $conv_flags = []) {
$result = array();
$item = $this->get_data();
@@ -91,13 +95,15 @@ class ThreadItem {
$total_children = $this->count_descendants();
$unseen_comments = (($item['real_uid']) ? 0 : $this->count_unseen_descendants());
$conv = $this->get_conversation();
$conv = $this->get_conversation();
$observer = $conv->get_observer();
$lock = ((($item['item_private'] == 1) || (($item['uid'] == local_channel()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
$lock = (((intval($item['item_private'])) || (($item['uid'] == local_channel()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
? t('Private Message')
: false);
$locktype = $item['item_private'];
$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
@@ -105,13 +111,26 @@ class ThreadItem {
$shareable = true;
$privacy_warning = false;
if(($item['item_private'] == 1) && ($item['owner']['xchan_network'] === 'activitypub')) {
if(intval($item['item_private']) && ($item['owner']['xchan_network'] === 'activitypub')) {
$recips = get_iconfig($item['parent'], 'activitypub', 'recips');
if(! in_array($observer['xchan_url'], $recips['to']))
if(! is_array($recips['to']) || ! in_array($observer['xchan_url'], $recips['to']))
$privacy_warning = true;
}
if ($lock) {
if (($item['mid'] == $item['parent_mid']) && count(get_terms_oftype($item['term'],TERM_FORUM))) {
$privacy_warning = true;
$conv_flags['parent_privacy_warning'] = true;
}
}
$privacy_warning = (isset($conv_flags['parent_privacy_warning'])) ? $conv_flags['parent_privacy_warning'] : $privacy_warning;
if ($lock && $privacy_warning) {
$lock = t('Privacy conflict. Discretion advised.');
}
$mode = $conv->get_mode();
switch($item['item_type']) {
@@ -132,9 +151,11 @@ class ThreadItem {
$edpost = false;
if($observer['xchan_hash'] == $this->get_data_value('author_xchan')
|| $observer['xchan_hash'] == $this->get_data_value('owner_xchan')
|| $this->get_data_value('uid') == local_channel())
if($observer && $observer['xchan_hash']
&& ($observer['xchan_hash'] == $this->get_data_value('author_xchan')
|| $observer['xchan_hash'] == $this->get_data_value('owner_xchan')
|| $observer['xchan_hash'] == $this->get_data_value('source_xchan')
|| $this->get_data_value('uid') == local_channel()))
$dropping = true;
@@ -149,15 +170,15 @@ class ThreadItem {
'dropping' => $dropping,
'delete' => t('Delete'),
);
}
}
elseif(is_site_admin()) {
$drop = [ 'dropping' => true, 'delete' => t('Admin Delete') ];
}
// FIXME
if($observer_is_pageowner) {
if($observer_is_pageowner) {
$multidrop = array(
'select' => t('Select'),
'select' => t('Select'),
);
}
@@ -186,6 +207,10 @@ class ThreadItem {
}
}
if($item['obj_type'] === 'Question') {
$response_verbs[] = 'answer';
}
$consensus = (intval($item['item_consensus']) ? true : false);
if($consensus) {
$response_verbs[] = 'agree';
@@ -199,7 +224,7 @@ class ThreadItem {
if(! feature_enabled($conv->get_profile_owner(),'dislike'))
unset($conv_responses['dislike']);
$responses = get_responses($conv_responses,$response_verbs,$this,$item);
$my_responses = [];
@@ -230,7 +255,7 @@ class ThreadItem {
}
$showlike = ((x($conv_responses['like'],$item['mid'])) ? format_like($conv_responses['like'][$item['mid']],$conv_responses['like'][$item['mid'] . '-l'],'like',$item['mid']) : '');
$showdislike = ((x($conv_responses['dislike'],$item['mid']) && feature_enabled($conv->get_profile_owner(),'dislike'))
$showdislike = ((x($conv_responses['dislike'],$item['mid']) && feature_enabled($conv->get_profile_owner(),'dislike'))
? format_like($conv_responses['dislike'][$item['mid']],$conv_responses['dislike'][$item['mid'] . '-l'],'dislike',$item['mid']) : '');
/*
@@ -240,7 +265,7 @@ class ThreadItem {
*/
$this->check_wall_to_wall();
if($this->is_toplevel()) {
// FIXME check this permission
if(($conv->get_profile_owner() == local_channel()) && (! array_key_exists('real_uid',$item))) {
@@ -251,7 +276,7 @@ class ThreadItem {
);
}
}
}
else {
$is_comment = true;
}
@@ -263,12 +288,16 @@ class ThreadItem {
$settings = '';
$tagger = [];
// FIXME - check this permission
if($conv->get_profile_owner() == local_channel()) {
/* disable until we agree on how to implemnt this in zot6/activitypub
$tagger = array(
'tagit' => t("Add Tag"),
'classtagger' => "",
);
*/
$settings = t('Conversation Tools');
}
@@ -288,10 +317,18 @@ class ThreadItem {
if($this->is_commentable() && $observer) {
$like = array( t("I like this \x28toggle\x29"), t("like"));
$dislike = array( t("I don't like this \x28toggle\x29"), t("dislike"));
$reply_to = array( t("Reply on this comment"), t("reply"), t("Reply to"));
}
if ($shareable)
$share = array( t('Share This'), t('share'));
if ($shareable) {
// This actually turns out not to be possible in some protocol stacks without opening up hundreds of new issues.
// Will allow it only for uri resolvable sources.
if(strpos($item['mid'],'http') === 0) {
$share = []; //Not yet ready for primetime
//$share = array( t('Repeat This'), t('repeat'));
}
$embed = array( t('Share This'), t('share'));
}
$dreport = '';
@@ -299,31 +336,28 @@ class ThreadItem {
if($keep_reports === 0)
$keep_reports = 10;
if((! get_config('system','disable_dreport')) && strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
if((! get_config('system','disable_dreport')) && strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0) {
$dreport = t('Delivery Report');
$dreport_link = gen_link_id($item['mid']);
}
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
$is_new = true;
localize_item($item);
$body = prepare_body($item,true);
// $viewthread (below) is only valid in list mode. If this is a channel page, build the thread viewing link
// since we can't depend on llink or plink pointing to the right local location.
$owner_address = substr($item['owner']['xchan_addr'],0,strpos($item['owner']['xchan_addr'],'@'));
$viewthread = $item['llink'];
if($conv->get_mode() === 'channel')
$viewthread = z_root() . '/channel/' . $owner_address . '?f=&mid=' . urlencode($item['mid']);
$viewthread = z_root() . '/channel/' . $owner_address . '?f=&mid=' . urlencode(gen_link_id($item['mid']));
$comment_count_txt = sprintf( tt('%d comment','%d comments',$total_children),$total_children );
$list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : '');
$list_unseen_txt = (($unseen_comments) ? sprintf( t('%d unseen'),$unseen_comments) : '');
$children = $this->get_children();
@@ -333,11 +367,28 @@ class ThreadItem {
call_hooks('dropdown_extras',$dropdown_extras_arr);
$dropdown_extras = $dropdown_extras_arr['dropdown_extras'];
$midb64 = 'b64.' . base64url_encode($item['mid']);
$mids = [ $midb64 ];
$response_mids = [];
foreach($response_verbs as $v) {
if(isset($conv_responses[$v]['mids'][$item['mid']])) {
$response_mids = array_merge($response_mids, $conv_responses[$v]['mids'][$item['mid']]);
}
}
$mids = array_merge($mids, $response_mids);
$json_mids = json_encode($mids);
// Pinned item processing
$allowed_type = (in_array($item['item_type'], get_config('system', 'pin_types', [ ITEM_TYPE_POST ])) ? true : false);
$pinned_items = ($allowed_type ? get_pconfig($item['uid'], 'pinned', $item['item_type'], []) : []);
$pinned = ((!empty($pinned_items) && in_array($midb64, $pinned_items)) ? true : false);
$tmp_item = array(
'template' => $this->get_template(),
'mode' => $mode,
'item_type' => intval($item['item_type']),
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
'item_type' => intval($item['item_type']),
//'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
'body' => $body['html'],
'tags' => $body['tags'],
'categories' => $body['categories'],
@@ -346,14 +397,17 @@ class ThreadItem {
'folders' => $body['folders'],
'text' => strip_tags($body['html']),
'id' => $this->get_id(),
'mid' => $item['mid'],
'mid' => $midb64,
'mids' => $json_mids,
'parent' => $item['parent'],
'author_id' => (($item['author']['xchan_addr']) ? $item['author']['xchan_addr'] : $item['author']['xchan_url']),
'isevent' => $isevent,
'attend' => $attend,
'consensus' => $consensus,
'conlabels' => $conlabels,
'canvote' => $canvote,
'linktitle' => sprintf( t('View %s\'s profile - %s'), $profile_name, $item['author']['xchan_addr']),
'olinktitle' => sprintf( t('View %s\'s profile - %s'), $this->get_owner_name(), $item['owner']['xchan_addr']),
'linktitle' => (($item['author']['xchan_addr']) ? $item['author']['xchan_addr'] : $item['author']['xchan_url']),
'olinktitle' => (($item['owner']['xchan_addr']) ? $item['owner']['xchan_addr'] : $item['owner']['xchan_url']),
'llink' => $item['llink'],
'viewthread' => $viewthread,
'to' => t('to'),
@@ -364,13 +418,14 @@ class ThreadItem {
'thread_action_menu' => thread_action_menu($item,$conv->get_mode()),
'thread_author_menu' => thread_author_menu($item,$conv->get_mode()),
'dreport' => $dreport,
'dreport_link' => $dreport_link,
'name' => $profile_name,
'thumb' => $profile_avatar,
'osparkle' => $osparkle,
'sparkle' => $sparkle,
'title' => $item['title'],
'title_tosource' => get_pconfig($conv->get_profile_owner(),'system','title_tosource'),
'ago' => relative_date($item['created']),
//'ago' => relative_date($item['created']),
'app' => $item['app'],
'str_app' => sprintf( t('from %s'), $item['app']),
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
@@ -378,6 +433,8 @@ class ThreadItem {
'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''),
'expiretime' => (($item['expires'] > NULL_DATE) ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
'lock' => $lock,
'locktype' => $locktype,
'delayed' => $item['item_delayed'],
'privacy_warning' => $privacy_warning,
'verified' => $verified,
'unverified' => $unverified,
@@ -398,23 +455,28 @@ class ThreadItem {
'has_tags' => $has_tags,
'reactions' => $this->reactions,
// Item toolbar buttons
'emojis' => (($this->is_toplevel() && $this->is_commentable() && $observer && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''),
'emojis' => (($this->is_toplevel() && $this->is_commentable() && $observer && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''),
'like' => $like,
'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''),
'reply_to' => (((! $this->is_toplevel()) && feature_enabled($conv->get_profile_owner(),'reply_to')) ? $reply_to : ''),
'top_hint' => t("Go to previous comment"),
'share' => $share,
'embed' => $embed,
'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 : ''),
'pinned' => ($pinned ? t('Pinned post') : ''),
'pinnable' => (($this->is_toplevel() && local_channel() && $item['owner_xchan'] == $observer['xchan_hash'] && $allowed_type && $item['item_private'] == 0 && $item['item_delayed'] == 0) ? '1' : ''),
'pinme' => ($pinned ? t('Unpin from the top') : t('Pin to the top')),
'bookmark' => (($conv->get_profile_owner() == local_channel() && local_channel() && $has_bookmarks) ? t('Save Bookmarks') : ''),
'addtocal' => (($has_event) ? t('Add to Calendar') : ''),
'drop' => $drop,
'multidrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $multidrop : ''),
'dropdown_extras' => $dropdown_extras,
'dropdown_extras' => $dropdown_extras,
// end toolbar buttons
'unseen_comments' => $unseen_comments,
'comment_count' => $total_children,
'comment_count_txt' => $comment_count_txt,
@@ -435,13 +497,13 @@ class ThreadItem {
'modal_dismiss' => t('Close'),
'showlike' => $showlike,
'showdislike' => $showdislike,
'comment' => $this->get_comment_box($indent),
'comment' => ($item['item_delayed'] ? '' : $this->get_comment_box($indent)),
'previewing' => ($conv->is_preview() ? true : false ),
'preview_lbl' => t('This is an unsaved preview'),
'wait' => t('Please wait'),
'submid' => str_replace(['+','='], ['',''], base64_encode($item['mid'])),
'thread_level' => $thread_level,
'settings' => $settings
'settings' => $settings,
'thr_parent' => (($item['parent_mid'] != $item['thr_parent']) ? 'b64.' . base64url_encode($item['thr_parent']) : '')
);
$arr = array('item' => $item, 'output' => $tmp_item);
@@ -458,13 +520,13 @@ class ThreadItem {
// needed for scroll to comment from notification but needs more work
// as we do not want to open all comments unless there is actually an #item_xx anchor
// and the url fragment is not sent to the server.
// if(in_array(\App::$module,['display','update_display']))
// and the url fragment is not sent to the server.
// if(in_array(\App::$module,['display','update_display']))
// $visible_comments = 99999;
if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) {
foreach($children as $child) {
$result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1);
$result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1,$conv_flags);
}
// Collapse
if(($nb_children > $visible_comments) || ($thread_level > 1)) {
@@ -479,7 +541,7 @@ class ThreadItem {
}
}
}
$result['private'] = $item['item_private'];
$result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : '');
@@ -494,7 +556,7 @@ class ThreadItem {
return $result;
}
public function get_id() {
return $this->get_data_value('id');
}
@@ -549,7 +611,7 @@ class ThreadItem {
if(activity_match($item->get_data_value('verb'),ACTIVITY_LIKE) || activity_match($item->get_data_value('verb'),ACTIVITY_DISLIKE)) {
return false;
}
$item->set_parent($this);
$this->children[] = $item;
return end($this->children);
@@ -623,7 +685,7 @@ class ThreadItem {
*/
public function set_conversation($conv) {
$previous_mode = ($this->conversation ? $this->conversation->get_mode() : '');
$this->conversation = $conv;
// Set it on our children too
@@ -732,7 +794,7 @@ class ThreadItem {
if(!$this->is_toplevel() && !get_config('system','thread_allow')) {
return '';
}
$comment_box = '';
$conv = $this->get_conversation();
@@ -748,8 +810,6 @@ class ThreadItem {
$arr = array('comment_buttons' => '','id' => $this->get_id());
call_hooks('comment_buttons',$arr);
$comment_buttons = $arr['comment_buttons'];
$feature_auto_save_draft = ((feature_enabled($conv->get_profile_owner(), 'auto_save_draft')) ? "true" : "false");
$comment_box = replace_macros($template,array(
'$return_path' => '',
@@ -785,8 +845,7 @@ class ThreadItem {
'$anoncomments' => ((($conv->get_mode() === 'channel' || $conv->get_mode() === 'display') && perm_is_allowed($conv->get_profile_owner(),'','post_comments')) ? true : false),
'$anonname' => [ 'anonname', t('Your full name (required)') ],
'$anonmail' => [ 'anonmail', t('Your email address (required)') ],
'$anonurl' => [ 'anonurl', t('Your website URL (optional)') ],
'$auto_save_draft' => $feature_auto_save_draft,
'$anonurl' => [ 'anonurl', t('Your website URL (optional)') ]
));
return $comment_box;
@@ -808,7 +867,7 @@ class ThreadItem {
if($conv->get_mode() === 'channel')
return;
if($this->is_toplevel() && ($this->get_data_value('author_xchan') != $this->get_data_value('owner_xchan'))) {
$this->owner_url = chanlink_hash($this->data['owner']['xchan_hash']);
$this->owner_photo = $this->data['owner']['xchan_photo_m'];
@@ -837,8 +896,4 @@ class ThreadItem {
return $this->visiting;
}
}

View File

@@ -0,0 +1,53 @@
<?php
namespace Zotlabs\Lib;
class ThreadListener {
static public function store($target_id,$portable_id,$ltype = 0) {
$x = self::fetch($target_id,$portable_id,$ltype = 0);
if(! $x) {
$r = q("insert into listeners ( target_id, portable_id, ltype ) values ( '%s', '%s' , %d ) ",
dbesc($target_id),
dbesc($portable_id),
intval($ltype)
);
}
}
static public function fetch($target_id,$portable_id,$ltype = 0) {
$x = q("select * from listeners where target_id = '%s' and portable_id = '%s' and ltype = %d limit 1",
dbesc($target_id),
dbesc($portable_id),
intval($ltype)
);
if($x) {
return $x[0];
}
return false;
}
static public function fetch_by_target($target_id,$ltype = 0) {
$x = q("select * from listeners where target_id = '%s' and ltype = %d",
dbesc($target_id),
intval($ltype)
);
return $x;
}
static public function delete_by_target($target_id, $ltype = 0) {
return q("delete from listeners where target_id = '%s' and ltype = %d",
dbesc($target_id),
intval($ltype)
);
}
static public function delete_by_pid($portable_id, $ltype = 0) {
return q("delete from listeners where portable_id = '%s' and ltype = %d",
dbesc($portable_id),
intval($ltype)
);
}
}

View File

@@ -23,7 +23,7 @@ class ThreadStream {
private $preview = false;
private $prepared_item = '';
public $reload = '';
private $cipher = 'aes256';
private $cipher = 'AES-128-CCM';
// $prepared_item is for use by alternate conversation structures such as photos
// wherein we've already prepared a top level item which doesn't look anything like

View File

@@ -5,7 +5,7 @@ namespace Zotlabs\Lib;
class Verify {
function create($type,$channel_id,$token,$meta) {
public static function create($type,$channel_id,$token,$meta) {
return q("insert into verify ( vtype, channel, token, meta, created ) values ( '%s', %d, '%s', '%s', '%s' )",
dbesc($type),
intval($channel_id),
@@ -15,7 +15,7 @@ class Verify {
);
}
function match($type,$channel_id,$token,$meta) {
public static function match($type,$channel_id,$token,$meta) {
$r = q("select id from verify where vtype = '%s' and channel = %d and token = '%s' and meta = '%s' limit 1",
dbesc($type),
intval($channel_id),
@@ -31,7 +31,7 @@ class Verify {
return false;
}
function get_meta($type,$channel_id,$token) {
public static function get_meta($type,$channel_id,$token) {
$r = q("select id, meta from verify where vtype = '%s' and channel = %d and token = '%s' limit 1",
dbesc($type),
intval($channel_id),
@@ -52,7 +52,7 @@ class Verify {
* @param string $type Verify type
* @param string $interval SQL compatible time interval
*/
function purge($type, $interval) {
public static function purge($type, $interval) {
q("delete from verify where vtype = '%s' and created < %s - INTERVAL %s",
dbesc($type),
db_utcnow(),

View File

@@ -106,4 +106,4 @@ class Webfinger {
}
}

90
Zotlabs/Lib/ZotURL.php Normal file
View File

@@ -0,0 +1,90 @@
<?php
namespace Zotlabs\Lib;
use Zotlabs\Web\HTTPSig;
class ZotURL {
static public function fetch($url,$channel) {
$ret = [ 'success' => false ];
if(strpos($url,'x-zot:') !== 0) {
return $ret;
}
if(! $url) {
return $ret;
}
$portable_url = substr($url,6);
$u = explode('/',$portable_url);
$portable_id = $u[0];
$hosts = self::lookup($portable_id);
if(! $hosts) {
return $ret;
}
foreach($hosts as $h) {
$newurl = $h . '/id/' . $portable_url;
$m = parse_url($newurl);
$data = json_encode([ 'zot_token' => random_string() ]);
if($channel && $m) {
$headers = [
'Accept' => 'application/x-zot+json',
'Content-Type' => 'application/x-zot+json',
'X-Zot-Token' => random_string(),
'Digest' => HTTPSig::generate_digest_header($data),
'Host' => $m['host'],
'(request-target)' => 'post ' . get_request_string($newurl)
];
$h = HTTPSig::create_sig($headers,$channel['channel_prvkey'],channel_url($channel),false);
}
else {
$h = [ 'Accept: application/x-zot+json' ];
}
$result = [];
$redirects = 0;
$x = z_post_url($newurl,$data,$redirects, [ 'headers' => $h ] );
if($x['success']) {
return $x;
}
}
return $ret;
}
static public function is_zoturl($url) {
if(strpos($url,'x-zot:') === 0) {
return true;
}
return false;
}
static public function lookup($portable_id) {
$r = q("select * from hubloc left join site on hubloc_url = site_url where hubloc_hash = '%s' and site_dead = 0 order by hubloc_primary desc",
dbesc($portable_id)
);
if(! $r) {
// extend to network lookup
return false;
}
return ids_to_array($r,'hubloc_url');
}
}

View File

@@ -6,39 +6,52 @@ use Zotlabs\Web\HTTPSig;
class Zotfinger {
static function exec($resource,$channel = null) {
static function exec($resource,$channel = null, $verify = true) {
if(! $resource) {
return false;
}
if($channel) {
$headers = [
'Accept' => 'application/x-zot+json',
'X-Zot-Token' => random_string(),
$m = parse_url($resource);
$data = json_encode([ 'zot_token' => random_string() ]);
if($channel && $m) {
$headers = [
'Accept' => 'application/x-zot+json',
'Content-Type' => 'application/x-zot+json',
'X-Zot-Token' => random_string(),
'Digest' => HTTPSig::generate_digest_header($data),
'Host' => $m['host'],
'(request-target)' => 'post ' . get_request_string($resource)
];
$h = HTTPSig::create_sig($headers,$channel['channel_prvkey'],channel_url($channel),false);
}
else {
$h = [ 'Accept: application/x-zot+json' ];
$h = [ 'Accept: application/x-zot+json' ];
}
$result = [];
$redirects = 0;
$x = z_fetch_url($resource,false,$redirects, [ 'headers' => $h ] );
$x = z_post_url($resource,$data,$redirects, [ 'headers' => $h ] );
logger('fetch: ' . print_r($x,true));
if($x['success']) {
$result['signature'] = HTTPSig::verify($x);
if ($verify) {
$result['signature'] = HTTPSig::verify($x, EMPTY_STR, 'zot6');
}
$result['data'] = json_decode($x['body'],true);
if($result['data'] && is_array($result['data']) && array_key_exists('encrypted',$result['data']) && $result['data']['encrypted']) {
$result['data'] = json_decode(crypto_unencapsulate($result['data'],get_config('system','prvkey')),true);
$result['data'] = json_decode(Crypto::unencapsulate($result['data'],get_config('system','prvkey')),true);
}
logger('decrypted: ' . print_r($result,true));
return $result;
}
@@ -47,4 +60,4 @@ class Zotfinger {
}
}

View File

@@ -2,6 +2,8 @@
namespace Zotlabs\Module;
use Zotlabs\Lib\Libzotdir;
require_once 'include/acl_selectors.php';
require_once 'include/group.php';
@@ -42,24 +44,24 @@ class Acl extends \Zotlabs\Web\Controller {
// $type =
// 'm' => autocomplete private mail recipient (checks post_mail permission)
// 'm' => autocomplete private mail recipient (checks post_mail permission and displays only zot, diaspora, friendica-over-diaspora xchan_network xchan's)
// 'a' => autocomplete connections (mod_connections, mod_poke, mod_sources, mod_photos)
// 'x' => nav search bar autocomplete (match any xchan)
// $_REQUEST['query'] contains autocomplete search text.
// List of channels whose connections to also suggest,
// List of channels whose connections to also suggest,
// e.g. currently viewed channel or channels mentioned in a post
$extra_channels = (x($_REQUEST,'extra_channels') ? $_REQUEST['extra_channels'] : array());
// The different autocomplete libraries use different names for the search text
// parameter. Internally we'll use $search to represent the search text no matter
// what request variable it was attached to.
// what request variable it was attached to.
if(array_key_exists('query',$_REQUEST)) {
$search = $_REQUEST['query'];
}
if( (! local_channel()) && (! in_array($type, [ 'x', 'c', 'f' ])))
killme();
@@ -68,7 +70,7 @@ class Acl extends \Zotlabs\Web\Controller {
if(in_array($type, [ 'm', 'a', 'c', 'f' ])) {
// These queries require permission checking. We'll create a simple array of xchan_hash for those with
// the requisite permissions which we can check against.
// the requisite permissions which we can check against.
$x = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = '%s' and v = '1'",
intval(local_channel()),
@@ -83,35 +85,36 @@ class Acl extends \Zotlabs\Web\Controller {
if($search) {
$sql_extra = " AND pgrp.gname LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
$sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc(punify($search)) . ((strpos($search,'@') === false) ? "%@%'" : "%'")) . ") ";
// This horrible mess is needed because position also returns 0 if nothing is found.
$sql_extra2_xchan = "AND ( xchan_name LIKE " . protect_sprintf( "'" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'" . dbesc(punify($search)) . ((strpos($search,'@') === false) ? "%@%'" : "%'")) . ") ";
// This horrible mess is needed because position also returns 0 if nothing is found.
// Would be MUCH easier if it instead returned a very large value
// Otherwise we could just
// Otherwise we could just
// order by LEAST(POSITION($search IN xchan_name),POSITION($search IN xchan_addr)).
$order_extra2 = "CASE WHEN xchan_name LIKE "
. protect_sprintf( "'%" . dbesc($search) . "%'" )
. " then POSITION('" . protect_sprintf(dbesc($search))
$order_extra2 = "CASE WHEN xchan_name LIKE "
. protect_sprintf( "'%" . dbesc($search) . "%'" )
. " then POSITION('" . protect_sprintf(dbesc($search))
. "' IN xchan_name) else position('" . protect_sprintf(dbesc(punify($search))) . "' IN xchan_addr) end, ";
$sql_extra3 = "AND ( xchan_addr like " . protect_sprintf( "'%" . dbesc(punify($search)) . "%'" ) . " OR xchan_name like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ) ";
}
else {
$sql_extra = $sql_extra2 = $sql_extra3 = "";
}
$groups = array();
$contacts = array();
if($type == '' || $type == 'g') {
// virtual groups based on private profile viewing ability
$r = q("select id, profile_guid, profile_name from profile where is_default = 0 and uid = %d",
intval(local_channel())
);
);
if($r) {
foreach($r as $rv) {
$groups[] = array(
@@ -129,19 +132,19 @@ class Acl extends \Zotlabs\Web\Controller {
// Normal privacy groups
$r = q("SELECT pgrp.id, pgrp.hash, pgrp.gname
FROM pgrp, pgrp_member
WHERE pgrp.deleted = 0 AND pgrp.uid = %d
FROM pgrp, pgrp_member
WHERE pgrp.deleted = 0 AND pgrp.uid = %d
AND pgrp_member.gid = pgrp.id
$sql_extra
GROUP BY pgrp.id
ORDER BY pgrp.gname
ORDER BY pgrp.gname
LIMIT %d OFFSET %d",
intval(local_channel()),
intval($count),
intval($start)
);
if($r) {
if($r) {
foreach($r as $g){
// logger('acl: group: ' . $g['gname'] . ' members: ' . group_get_members_xchan($g['id']));
$groups[] = array(
@@ -156,22 +159,22 @@ class Acl extends \Zotlabs\Web\Controller {
}
}
}
if($type == '' || $type == 'c' || $type === 'f') {
$extra_channels_sql = '';
$extra_channels_sql = '';
// Only include channels who allow the observer to view their connections
if($extra_channels) {
foreach($extra_channels as $channel) {
if(perm_is_allowed(intval($channel), get_observer_hash(),'view_contacts')) {
if($extra_channel_sql)
if($extra_channels_sql)
$extra_channels_sql .= ',';
$extra_channels_sql .= intval($channel);
}
}
}
// Getting info from the abook is better for local users because it contains info about permissions
if(local_channel()) {
if($extra_channels_sql != '')
@@ -198,7 +201,7 @@ class Acl extends \Zotlabs\Web\Controller {
$r2 = array();
foreach($r1 as $rr) {
$x = atoken_xchan($rr);
$r2[] = [
$r2[] = [
'id' => 'a' . $rr['atoken_id'] ,
'hash' => $x['xchan_hash'],
'name' => $x['xchan_name'],
@@ -210,12 +213,12 @@ class Acl extends \Zotlabs\Web\Controller {
'abook_self' => 0
];
}
}
}
// add connections
$r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms, xchan_pubforum, abook_flags, abook_self
FROM abook left join xchan on abook_xchan = xchan_hash
$r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_network as net, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms, xchan_pubforum, abook_flags, abook_self
FROM abook left join xchan on abook_xchan = xchan_hash
WHERE (abook_channel = %d $extra_channels_sql) AND abook_blocked = 0 and abook_pending = 0 and xchan_deleted = 0 $sql_extra2 order by $order_extra2 xchan_name asc" ,
intval(local_channel())
);
@@ -224,28 +227,28 @@ class Acl extends \Zotlabs\Web\Controller {
}
else { // Visitors
$r = q("SELECT xchan_hash as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self
$r = q("SELECT xchan_hash as id, xchan_hash as hash, xchan_name as name, xchan_network as net, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self
FROM xchan left join xlink on xlink_link = xchan_hash
WHERE xlink_xchan = '%s' AND xchan_deleted = 0 $sql_extra2 order by $order_extra2 xchan_name asc" ,
WHERE xlink_xchan = '%s' AND xchan_deleted = 0 $sql_extra2_xchan order by $order_extra2 xchan_name asc" ,
dbesc(get_observer_hash())
);
// Find contacts of extra channels
// This is probably more complicated than it needs to be
if($extra_channels_sql) {
// Build a list of hashes that we got previously so we don't get them again
$known_hashes = array("'".get_observer_hash()."'");
if($r)
foreach($r as $rr)
foreach($r as $rr)
$known_hashes[] = "'".$rr['hash']."'";
$known_hashes_sql = 'AND xchan_hash not in ('.join(',',$known_hashes).')';
$r2 = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms, abook_flags, abook_self
FROM abook left join xchan on abook_xchan = xchan_hash
$r2 = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_network as net, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms, abook_flags, abook_self
FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_channel IN ($extra_channels_sql) $known_hashes_sql AND abook_blocked = 0 and abook_pending = 0 and abook_hidden = 0 and xchan_deleted = 0 $sql_extra2 order by $order_extra2 xchan_name asc");
if($r2)
$r = array_merge($r,$r2);
// Sort accoring to match position, then alphabetically. This could be avoided if the above two SQL queries could be combined into one, and the sorting could be done on the SQl server (like in the case of a local user)
$matchpos = function($x) use($search) {
$namepos = strpos($x['name'],$search);
@@ -268,23 +271,24 @@ class Acl extends \Zotlabs\Web\Controller {
}
}
if((count($r) < 100) && $type == 'c') {
$r2 = q("SELECT substr(xchan_hash,1,18) as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self
FROM xchan
WHERE xchan_deleted = 0 and not xchan_network in ('rss','anon','unknown') $sql_extra2 order by $order_extra2 xchan_name asc"
$r2 = q("SELECT substr(xchan_hash,1,18) as id, xchan_hash as hash, xchan_name as name, xchan_network as net, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self
FROM xchan
WHERE xchan_deleted = 0 and not xchan_network in ('rss','anon','unknown') $sql_extra2_xchan order by $order_extra2 xchan_name asc"
);
if($r2) {
$r = array_merge($r,$r2);
$r = unique_multidim_array($r,'hash');
}
}
}
}
elseif($type == 'm') {
$r = array();
$z = q("SELECT xchan_hash as hash, xchan_name as name, xchan_addr as nick, xchan_photo_s as micro, xchan_url as url
$z = q("SELECT xchan_hash as hash, xchan_name as name, xchan_network as net, xchan_addr as nick, xchan_photo_s as micro, xchan_url as url
FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_channel = %d
WHERE abook_channel = %d
and xchan_deleted = 0
and xchan_network IN ('zot', 'diaspora', 'friendica-over-diaspora')
$sql_extra3
ORDER BY xchan_name ASC ",
intval(local_channel())
@@ -296,18 +300,18 @@ class Acl extends \Zotlabs\Web\Controller {
}
}
}
}
elseif($type == 'a') {
$r = q("SELECT abook_id as id, xchan_name as name, xchan_hash as hash, xchan_addr as nick, xchan_photo_s as micro, xchan_network as network, xchan_url as url, xchan_addr as attag , abook_their_perms FROM abook left join xchan on abook_xchan = xchan_hash
$r = q("SELECT abook_id as id, xchan_name as name, xchan_network as net, xchan_hash as hash, xchan_addr as nick, xchan_photo_s as micro, xchan_url as url, xchan_addr as attag , abook_their_perms FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_channel = %d
and xchan_deleted = 0
$sql_extra3
ORDER BY xchan_name ASC ",
intval(local_channel())
);
}
elseif($type == 'x') {
$r = $this->navbar_complete($a);
@@ -321,7 +325,7 @@ class Acl extends \Zotlabs\Web\Controller {
);
}
}
$o = array(
'start' => $start,
'count' => $count,
@@ -332,27 +336,34 @@ class Acl extends \Zotlabs\Web\Controller {
}
else
$r = array();
if($r) {
$i = count($contacts);
$x = [];
foreach($r as $g) {
if(in_array($g['network'],['rss','anon','unknown']) && ($type != 'a'))
if(in_array($g['net'],['rss','anon','unknown']) && ($type != 'a'))
continue;
$g['hash'] = urlencode($g['hash']);
if(! $g['nick']) {
$g['nick'] = $g['url'];
}
$clink = ($g['nick']) ? $g['nick'] : $g['url'];
$lkey = md5($clink);
if (! array_key_exists($lkey, $x))
$x[$lkey] = $i;
if(in_array($g['hash'],$permitted) && $type === 'f' && (! $noforums)) {
$contacts[] = array(
$contacts[$i] = array(
"type" => "c",
"photo" => "images/twopeople.png",
"name" => $g['name'],
"id" => urlencode($g['id']),
"xid" => $g['hash'],
"link" => (($g['nick']) ? $g['nick'] : $g['url']),
"link" => $clink,
"nick" => substr($g['nick'],0,strpos($g['nick'],'@')),
"self" => (intval($g['abook_self']) ? 'abook-self' : ''),
"taggable" => 'taggable',
@@ -360,24 +371,28 @@ class Acl extends \Zotlabs\Web\Controller {
);
}
if($type !== 'f') {
$contacts[] = array(
"type" => "c",
"photo" => $g['micro'],
"name" => $g['name'],
"id" => urlencode($g['id']),
"xid" => $g['hash'],
"link" => (($g['nick']) ? $g['nick'] : $g['url']),
"nick" => ((strpos($g['nick'],'@')) ? substr($g['nick'],0,strpos($g['nick'],'@')) : $g['nick']),
"self" => (intval($g['abook_self']) ? 'abook-self' : ''),
"taggable" => '',
"label" => '',
);
if (! array_key_exists($x[$lkey], $contacts) || ($contacts[$x[$lkey]]['net'] !== 'zot6' && ($g['net'] == 'zot6' || $g['net'] == 'zot'))) {
$contacts[$x[$lkey]] = array(
"type" => "c",
"photo" => $g['micro'],
"name" => $g['name'],
"id" => urlencode($g['id']),
"xid" => $g['hash'],
"link" => $clink,
"nick" => ((strpos($g['nick'],'@')) ? substr($g['nick'],0,strpos($g['nick'],'@')) : $g['nick']),
"self" => (intval($g['abook_self']) ? 'abook-self' : ''),
"taggable" => '',
"label" => '',
"net" => $g['net']
);
}
}
}
$i++;
}
}
$items = array_merge($groups, $contacts);
$o = array(
'start' => $start,
'count' => $count,
@@ -391,50 +406,50 @@ class Acl extends \Zotlabs\Web\Controller {
function navbar_complete(&$a) {
// logger('navbar_complete');
if(observer_prohibited()) {
return;
}
$dirmode = intval(get_config('system','directory_mode'));
$search = ((x($_REQUEST,'search')) ? htmlentities($_REQUEST['search'],ENT_COMPAT,'UTF-8',false) : '');
if(! $search || mb_strlen($search) < 2)
return array();
$star = false;
$address = false;
if(substr($search,0,1) === '@')
$search = substr($search,1);
if(substr($search,0,1) === '*') {
$star = true;
$search = substr($search,1);
}
if(strpos($search,'@') !== false) {
$address = true;
}
if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) {
$url = z_root() . '/dirsearch';
}
if(! $url) {
require_once("include/dir_fns.php");
$directory = find_upstream_directory($dirmode);
$directory = Libzotdir::find_upstream_directory($dirmode);
$url = $directory['url'] . '/dirsearch';
}
$token = get_config('system','realm_token');
$count = (x($_REQUEST,'count') ? $_REQUEST['count'] : 100);
if($url) {
$query = $url . '?f=' . (($token) ? '&t=' . urlencode($token) : '');
$query .= '&name=' . urlencode($search) . "&limit=$count" . (($address) ? '&address=' . urlencode(punify($search)) : '');
$x = z_fetch_url($query);
if($x['success']) {
$t = 0;

279
Zotlabs/Module/Activity.php Normal file
View File

@@ -0,0 +1,279 @@
<?php
namespace Zotlabs\Module;
use Zotlabs\Lib\IConfig;
use Zotlabs\Lib\Enotify;
use Zotlabs\Web\Controller;
use Zotlabs\Daemon\Master;
use Zotlabs\Lib\Activity as ZlibActivity;
use Zotlabs\Lib\ActivityStreams;
use Zotlabs\Lib\LDSignatures;
use Zotlabs\Web\HTTPSig;
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\ThreadListener;
use App;
class Activity extends Controller {
function init() {
if (Libzot::is_zot_request()) {
$item_id = argv(1);
if (! $item_id)
http_status_exit(404, 'Not found');
$portable_id = EMPTY_STR;
$item_normal = " and item.item_hidden = 0 and item.item_type = 0 and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_blocked = 0 ";
$i = null;
// do we have the item (at all)?
$r = q("select * from item where mid = '%s' $item_normal limit 1",
dbesc(z_root() . '/activity/' . $item_id)
);
if (! $r) {
http_status_exit(404,'Not found');
}
// process an authenticated fetch
$sigdata = HTTPSig::verify(EMPTY_STR);
if($sigdata['portable_id'] && $sigdata['header_valid']) {
$portable_id = $sigdata['portable_id'];
observer_auth($portable_id);
// first see if we have a copy of this item's parent owned by the current signer
// include xchans for all zot-like networks - these will have the same guid and public key
$x = q("select * from xchan where xchan_hash = '%s'",
dbesc($sigdata['portable_id'])
);
if ($x) {
$xchans = q("select xchan_hash from xchan where xchan_hash = '%s' OR ( xchan_guid = '%s' AND xchan_pubkey = '%s' ) ",
dbesc($sigdata['portable_id']),
dbesc($x[0]['xchan_guid']),
dbesc($x[0]['xchan_pubkey'])
);
if ($xchans) {
$hashes = ids_to_querystr($xchans,'xchan_hash',true);
$i = q("select id as item_id from item where mid = '%s' $item_normal and owner_xchan in ( " . protect_sprintf($hashes) . " ) limit 1",
dbesc($r[0]['parent_mid'])
);
}
}
}
// if we don't have a parent id belonging to the signer see if we can obtain one as a visitor that we have permission to access
// with a bias towards those items owned by channels on this site (item_wall = 1)
$sql_extra = item_permissions_sql(0);
if (! $i) {
$i = q("select id as item_id from item where mid = '%s' $item_normal $sql_extra order by item_wall desc limit 1",
dbesc($r[0]['parent_mid'])
);
}
if(! $i) {
http_status_exit(403,'Forbidden');
}
$parents_str = ids_to_querystr($i,'item_id');
$items = q("SELECT item.*, item.id AS item_id FROM item WHERE item.parent IN ( %s ) $item_normal ",
dbesc($parents_str)
);
if(! $items) {
http_status_exit(404, 'Not found');
}
xchan_query($items,true);
$items = fetch_post_tags($items,true);
$observer = App::get_observer();
$parent = $items[0];
$recips = (($parent['owner']['xchan_network'] === 'activitypub') ? get_iconfig($parent['id'],'activitypub','recips', []) : []);
$to = (($recips && array_key_exists('to',$recips) && is_array($recips['to'])) ? $recips['to'] : null);
$nitems = [];
foreach($items as $i) {
$mids = [];
if(intval($i['item_private'])) {
if(! $observer) {
continue;
}
// ignore private reshare, possibly from hubzilla
if($i['verb'] === 'Announce') {
if(! in_array($i['thr_parent'],$mids)) {
$mids[] = $i['thr_parent'];
}
continue;
}
// also ignore any children of the private reshares
if(in_array($i['thr_parent'],$mids)) {
continue;
}
if((! $to) || (! in_array($observer['xchan_url'],$to))) {
continue;
}
}
$nitems[] = $i;
}
if(! $nitems)
http_status_exit(404, 'Not found');
$chan = channelx_by_n($nitems[0]['uid']);
if(! $chan)
http_status_exit(404, 'Not found');
if(! perm_is_allowed($chan['channel_id'],get_observer_hash(),'view_stream'))
http_status_exit(403, 'Forbidden');
$i = ZlibActivity::encode_item_collection($nitems,'conversation/' . $item_id,'OrderedCollection');
if($portable_id && (! intval($items[0]['item_private']))) {
ThreadListener::store(z_root() . '/activity/' . $item_id, $portable_id);
}
if(! $i)
http_status_exit(404, 'Not found');
$x = array_merge(['@context' => [
ACTIVITYSTREAMS_JSONLD_REV,
'https://w3id.org/security/v1',
z_root() . ZOT_APSCHEMA_REV
]], $i);
$headers = [];
$headers['Content-Type'] = 'application/x-zot+json' ;
$x['signature'] = LDSignatures::sign($x,$chan);
$ret = json_encode($x, JSON_UNESCAPED_SLASHES);
$headers['Digest'] = HTTPSig::generate_digest_header($ret);
$headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI'];
$h = HTTPSig::create_sig($headers,$chan['channel_prvkey'],channel_url($chan));
HTTPSig::set_headers($h);
echo $ret;
killme();
}
if(ActivityStreams::is_as_request()) {
$item_id = argv(1);
if (! $item_id) {
return;
}
$ob_authorise = false;
$item_uid = 0;
$bear = ZlibActivity::token_from_request();
if ($bear) {
logger('bear: ' . $bear, LOGGER_DEBUG);
$t = q("select item.uid, iconfig.v from iconfig left join item on iid = item.id where cat = 'ocap' and item.uuid = '%s'",
dbesc($item_id)
);
if ($t) {
foreach ($t as $token) {
if ($token['v'] === $bear) {
$ob_authorize = true;
$item_uid = $token['uid'];
break;
}
}
}
}
$item_normal = " and item.item_hidden = 0 and item.item_type = 0 and item.item_unpublished = 0
and item.item_delayed = 0 and item.item_blocked = 0 ";
$sigdata = HTTPSig::verify(EMPTY_STR);
if ($sigdata['portable_id'] && $sigdata['header_valid']) {
$portable_id = $sigdata['portable_id'];
if (! check_channelallowed($portable_id)) {
http_status_exit(403, 'Permission denied');
}
if (! check_siteallowed($sigdata['signer'])) {
http_status_exit(403, 'Permission denied');
}
observer_auth($portable_id);
}
// if passed an owner_id of 0 to item_permissions_sql(), we force "guest access" or observer checking
// Give ocap tokens priority
if ($ob_authorize) {
$sql_extra = " and item.uid = " . intval($token['uid']) . " ";
}
else {
$sql_extra = item_permissions_sql(0);
}
$r = q("select * from item where uuid = '%s' $item_normal $sql_extra limit 1",
dbesc($item_id)
);
if (! $r) {
$r = q("select * from item where uuid = '%s' $item_normal limit 1",
dbesc($item_id)
);
if($r) {
http_status_exit(403, 'Forbidden');
}
http_status_exit(404, 'Not found');
}
xchan_query($r,true);
$items = fetch_post_tags($r,false);
if ($portable_id && (! intval($items[0]['item_private']))) {
$c = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s'",
intval($items[0]['uid']),
dbesc($portable_id)
);
if (! $c) {
ThreadListener::store(z_root() . '/activity/' . $item_id, $portable_id);
}
}
$channel = channelx_by_n($items[0]['uid']);
$x = array_merge( ['@context' => [
ACTIVITYSTREAMS_JSONLD_REV,
'https://w3id.org/security/v1',
z_root() . ZOT_APSCHEMA_REV
]], ZlibActivity::encode_activity($items[0],true));
$headers = [];
$headers['Content-Type'] = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ;
$x['signature'] = LDSignatures::sign($x,$channel);
$ret = json_encode($x, JSON_UNESCAPED_SLASHES);
$headers['Date'] = datetime_convert('UTC','UTC', 'now', 'D, d M Y H:i:s \\G\\M\\T');
$headers['Digest'] = HTTPSig::generate_digest_header($ret);
$headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI'];
$h = HTTPSig::create_sig($headers,$channel['channel_prvkey'],channel_url($channel));
HTTPSig::set_headers($h);
echo $ret;
killme();
}
goaway(z_root() . '/item/' . argv(1));
}
}

View File

@@ -86,7 +86,7 @@ class Admin extends \Zotlabs\Web\Controller {
// list total user accounts, expirations etc.
$accounts = array();
$r = q("SELECT COUNT(*) AS total, COUNT(CASE WHEN account_expires > %s THEN 1 ELSE NULL END) AS expiring, COUNT(CASE WHEN account_expires < %s AND account_expires > '%s' THEN 1 ELSE NULL END) AS expired, COUNT(CASE WHEN (account_flags & %d)>0 THEN 1 ELSE NULL END) AS blocked FROM account",
$r = q("SELECT COUNT(CASE WHEN account_id > 0 THEN 1 ELSE NULL END) AS total, COUNT(CASE WHEN account_expires > %s THEN 1 ELSE NULL END) AS expiring, COUNT(CASE WHEN account_expires < %s AND account_expires > '%s' THEN 1 ELSE NULL END) AS expired, COUNT(CASE WHEN (account_flags & %d)>0 THEN 1 ELSE NULL END) AS blocked FROM account",
db_utcnow(),
db_utcnow(),
dbesc(NULL_DATE),
@@ -109,11 +109,9 @@ class Admin extends \Zotlabs\Web\Controller {
// available channels, primary and clones
$channels = array();
$r = q("SELECT COUNT(*) AS total, COUNT(CASE WHEN channel_primary = 1 THEN 1 ELSE NULL END) AS main, COUNT(CASE WHEN channel_primary = 0 THEN 1 ELSE NULL END) AS clones FROM channel WHERE channel_removed = 0 and channel_system = 0");
$r = q("SELECT COUNT(*) AS total FROM channel WHERE channel_removed = 0 and channel_system = 0");
if ($r) {
$channels['total'] = array('label' => t('Channels'), 'val' => $r[0]['total']);
$channels['main'] = array('label' => t('Primary'), 'val' => $r[0]['main']);
$channels['clones'] = array('label' => t('Clones'), 'val' => $r[0]['clones']);
}
// We can do better, but this is a quick queue status

View File

@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Admin;
use App;
use \Zotlabs\Storage\GitRepo;
use \Michelf\MarkdownExtra;
@@ -17,7 +18,7 @@ class Addons {
@include_once("addon/" . argv(2) . "/" . argv(2) . ".php");
if(function_exists(argv(2).'_plugin_admin_post')) {
$func = argv(2) . '_plugin_admin_post';
$func($a);
$func();
}
goaway(z_root() . '/admin/addons/' . argv(2) );
@@ -253,14 +254,14 @@ class Addons {
* Single plugin
*/
if (\App::$argc == 3){
$plugin = \App::$argv[2];
if (App::$argc == 3){
$plugin = App::$argv[2];
if (!is_file("addon/$plugin/$plugin.php")){
notice( t("Item not found.") );
return '';
}
$enabled = in_array($plugin,\App::$plugins);
$enabled = in_array($plugin,App::$plugins);
$info = get_plugin_info($plugin);
$x = check_plugin_versions($info);
@@ -268,11 +269,11 @@ class Addons {
if($enabled && ! $x) {
$enabled = false;
$idz = array_search($plugin, \App::$plugins);
$idz = array_search($plugin, App::$plugins);
if ($idz !== false) {
unset(\App::$plugins[$idz]);
unset(App::$plugins[$idz]);
uninstall_plugin($plugin);
set_config("system","addon", implode(", ",\App::$plugins));
set_config("system","addon", implode(", ",App::$plugins));
}
}
$info['disabled'] = 1-intval($x);
@@ -281,19 +282,19 @@ class Addons {
check_form_security_token_redirectOnErr('/admin/addons', 'admin_addons', 't');
$pinstalled = false;
// Toggle plugin status
$idx = array_search($plugin, \App::$plugins);
$idx = array_search($plugin, App::$plugins);
if ($idx !== false){
unset(\App::$plugins[$idx]);
unset(App::$plugins[$idx]);
uninstall_plugin($plugin);
$pinstalled = false;
info( sprintf( t("Plugin %s disabled."), $plugin ) );
} else {
\App::$plugins[] = $plugin;
App::$plugins[] = $plugin;
install_plugin($plugin);
$pinstalled = true;
info( sprintf( t("Plugin %s enabled."), $plugin ) );
}
set_config("system","addon", implode(", ",\App::$plugins));
set_config("system","addon", implode(", ",App::$plugins));
if($pinstalled) {
@require_once("addon/$plugin/$plugin.php");
@@ -305,7 +306,7 @@ class Addons {
// display plugin details
if (in_array($plugin, \App::$plugins)){
if (in_array($plugin, App::$plugins)){
$status = 'on';
$action = t('Disable');
} else {
@@ -331,7 +332,7 @@ class Addons {
@require_once("addon/$plugin/$plugin.php");
if(function_exists($plugin.'_plugin_admin')) {
$func = $plugin.'_plugin_admin';
$func($a, $admin_form);
$func($admin_form);
}
}
@@ -375,20 +376,23 @@ class Addons {
if($files) {
foreach($files as $file) {
if (is_dir($file)){
if($file == 'addon/addon_common/')
continue;
list($tmp, $id) = array_map('trim', explode('/', $file));
$info = get_plugin_info($id);
$enabled = in_array($id,\App::$plugins);
$enabled = in_array($id,App::$plugins);
$x = check_plugin_versions($info);
// disable plugins which are installed but incompatible versions
if($enabled && ! $x) {
$enabled = false;
$idz = array_search($id, \App::$plugins);
$idz = array_search($id, App::$plugins);
if ($idz !== false) {
unset(\App::$plugins[$idz]);
unset(App::$plugins[$idz]);
uninstall_plugin($id);
set_config("system","addon", implode(", ",\App::$plugins));
set_config("system","addon", implode(", ",App::$plugins));
}
}
$info['disabled'] = 1-intval($x);
@@ -476,4 +480,4 @@ class Addons {
return(strcmp(strtolower($a[2]['name']),strtolower($b[2]['name'])));
}
}
}

View File

@@ -19,7 +19,47 @@ class Dbsync {
info( t('Update has been marked successful') . EOL);
goaway(z_root() . '/admin/dbsync');
}
if(argc() > 3 && intval(argv(3)) && argv(2) === 'verify') {
$s = '_' . intval(argv(3));
$cls = '\\Zotlabs\Update\\' . $s ;
if(class_exists($cls)) {
$c = new $cls();
if(method_exists($c,'verify')) {
$retval = $c->verify();
if($retval === UPDATE_FAILED) {
$o .= sprintf( t('Verification of update %s failed. Check system logs.'), $s);
}
elseif($retval === UPDATE_SUCCESS) {
$o .= sprintf( t('Update %s was successfully applied.'), $s);
set_config('database',$s, 'success');
}
else
$o .= sprintf( t('Verifying update %s did not return a status. Unknown if it succeeded.'), $s);
}
else {
$o .= sprintf( t('Update %s does not contain a verification function.'), $s );
}
}
else
$o .= sprintf( t('Update function %s could not be found.'), $s);
return $o;
// remove the old style config if it exists
del_config('database', 'update_r' . intval(argv(3)));
set_config('database', '_' . intval(argv(3)), 'success');
if(intval(get_config('system','db_version')) < intval(argv(3)))
set_config('system','db_version',intval(argv(3)));
info( t('Update has been marked successful') . EOL);
goaway(z_root() . '/admin/dbsync');
}
if(argc() > 2 && intval(argv(2))) {
$x = intval(argv(2));
$s = '_' . $x;
@@ -28,14 +68,14 @@ class Dbsync {
$c = new $cls();
$retval = $c->run();
if($retval === UPDATE_FAILED) {
$o .= sprintf( t('Executing %s failed. Check system logs.'), $s);
$o .= sprintf( t('Executing update procedure %s failed. Check system logs.'), $s);
}
elseif($retval === UPDATE_SUCCESS) {
$o .= sprintf( t('Update %s was successfully applied.'), $s);
set_config('database',$s, 'success');
}
else
$o .= sprintf( t('Update %s did not return a status. Unknown if it succeeded.'), $s);
$o .= sprintf( t('Update %s did not return a status. It cannot be determined if it was successful.'), $s);
}
else
$o .= sprintf( t('Update function %s could not be found.'), $s);
@@ -59,6 +99,7 @@ class Dbsync {
'$banner' => t('Failed Updates'),
'$desc' => '',
'$mark' => t('Mark success (if update was manually applied)'),
'$verify' => t('Attempt to verify this update if a verification procedure exists'),
'$apply' => t('Attempt to execute this update step automatically'),
'$failed' => $failed
));

View File

@@ -43,6 +43,12 @@ class Security {
$be = $this->trim_array_elems(explode("\n",$_POST['embed_deny']));
set_config('system','embed_deny',$be);
$thumbnail_security = ((x($_POST,'thumbnail_security')) ? intval($_POST['thumbnail_security']) : 0);
set_config('system', 'thumbnail_security' , $thumbnail_security);
$inline_pdf = ((x($_POST,'inline_pdf')) ? intval($_POST['inline_pdf']) : 0);
set_config('system', 'inline_pdf' , $inline_pdf);
$ts = ((x($_POST,'transport_security')) ? True : False);
set_config('system','transport_security_header',$ts);
@@ -86,7 +92,7 @@ class Security {
$embedhelp2 = t("The recommended setting is to only allow unfiltered HTML from the following sites:");
$embedhelp3 = t("https://youtube.com/<br />https://www.youtube.com/<br />https://youtu.be/<br />https://vimeo.com/<br />https://soundcloud.com/<br />");
$embedhelp4 = t("All other embedded content will be filtered, <strong>unless</strong> embedded content from that site is explicitly blocked.");
$t = get_markup_template('admin_security.tpl');
return replace_macros($t, array(
'$title' => t('Administration'),
@@ -106,7 +112,9 @@ class Security {
'$embed_sslonly' => array('embed_sslonly',t('Only allow embeds from secure (SSL) websites and links.'), intval(get_config('system','embed_sslonly')),''),
'$embed_allow' => array('embed_allow', t('Allow unfiltered embedded HTML content only from these domains'), $whiteembeds_str, t('One site per line. By default embedded content is filtered.')),
'$embed_deny' => array('embed_deny', t('Block embedded HTML from these domains'), $blackembeds_str, ''),
'$thumbnail_security' => [ 'thumbnail_security', t("Allow SVG thumbnails in file browser"), get_config('system','thumbnail_security',0), t("WARNING: SVG images may contain malicious code.") ],
'$inline_pdf' => [ 'inline_pdf', t("Allow embedded (inline) PDF files"), get_config('system','inline_pdf',0), '' ],
// '$embed_coop' => array('embed_coop', t('Cooperative embed security'), $embed_coop, t('Enable to share embed security with other compatible sites/hubs')),
'$submit' => t('Submit')
@@ -128,4 +136,4 @@ class Security {
}
}
}

View File

@@ -62,6 +62,9 @@ class Site {
$from_email = ((array_key_exists('from_email',$_POST) && trim($_POST['from_email'])) ? trim($_POST['from_email']) : 'Administrator@' . \App::get_hostname());
$from_email_name = ((array_key_exists('from_email_name',$_POST) && trim($_POST['from_email_name'])) ? trim($_POST['from_email_name']) : \Zotlabs\Lib\System::get_site_name());
$sse_enabled = ((x($_POST,'sse_enabled')) ? true : false);
$verifyssl = ((x($_POST,'verifyssl')) ? True : False);
$proxyuser = ((x($_POST,'proxyuser')) ? notags(trim($_POST['proxyuser'])) : '');
$proxy = ((x($_POST,'proxy')) ? notags(trim($_POST['proxy'])) : '');
@@ -73,7 +76,6 @@ class Site {
$feed_contacts = ((x($_POST,'feed_contacts')) ? intval($_POST['feed_contacts']) : 0);
$verify_email = ((x($_POST,'verify_email')) ? 1 : 0);
$imagick_path = ((x($_POST,'imagick_path')) ? trim($_POST['imagick_path']) : '');
$thumbnail_security = ((x($_POST,'thumbnail_security')) ? intval($_POST['thumbnail_security']) : 0);
$force_queue = ((intval($_POST['force_queue']) > 0) ? intval($_POST['force_queue']) : 3000);
$pub_incl = escape_tags(trim($_POST['pub_incl']));
$pub_excl = escape_tags(trim($_POST['pub_excl']));
@@ -100,7 +102,6 @@ class Site {
set_config('system', 'from_email', $from_email);
set_config('system', 'from_email_name' , $from_email_name);
set_config('system', 'imagick_convert_path' , $imagick_path);
set_config('system', 'thumbnail_security' , $thumbnail_security);
set_config('system', 'default_permissions_role', $permissions_role);
set_config('system', 'pubstream_incl',$pub_incl);
set_config('system', 'pubstream_excl',$pub_excl);
@@ -119,7 +120,7 @@ class Site {
del_config('system', 'admininfo');
} else {
require_once('include/text.php');
linkify_tags($a, $admininfo, local_channel());
linkify_tags($admininfo, local_channel());
set_config('system', 'admininfo', $admininfo);
}
set_config('system','siteinfo',$siteinfo);
@@ -153,6 +154,9 @@ class Site {
set_config('system','no_community_page', $no_community_page);
set_config('system','no_utf', $no_utf);
set_config('system','sse_enabled', $sse_enabled);
set_config('system','verifyssl', $verifyssl);
set_config('system','proxyuser', $proxyuser);
set_config('system','proxy', $proxy);
@@ -333,6 +337,8 @@ class Site {
'$directory_server' => (($dir_choices) ? array('directory_server', t("Directory Server URL"), get_config('system','directory_server'), t("Default directory server"), $dir_choices) : null),
'$sse_enabled' => array('sse_enabled', t('Enable SSE Notifications'), get_config('system', 'sse_enabled', 0), t('If disabled, traditional polling will be used. Warning: this setting might not be suited for shared hosting')),
'$proxyuser' => array('proxyuser', t("Proxy user"), get_config('system','proxyuser'), ""),
'$proxy' => array('proxy', t("Proxy URL"), get_config('system','proxy'), ""),
'$timeout' => array('timeout', t("Network timeout"), (x(get_config('system','curl_timeout'))?get_config('system','curl_timeout'):60), t("Value is in seconds. Set to 0 for unlimited (not recommended).")),
@@ -341,7 +347,6 @@ class Site {
'$force_queue' => array('force_queue', t("Queue Threshold"), get_config('system','force_queue_threshold',3000), t("Always defer immediate delivery if queue contains more than this number of entries.")),
'$poll_interval' => array('poll_interval', t("Poll interval"), (x(get_config('system','poll_interval'))?get_config('system','poll_interval'):2), t("Delay background polling processes by this many seconds to reduce system load. If 0, use delivery interval.")),
'$imagick_path' => array('imagick_path', t("Path to ImageMagick convert program"), get_config('system','imagick_convert_path'), t("If set, use this program to generate photo thumbnails for huge images ( > 4000 pixels in either dimension), otherwise memory exhaustion may occur. Example: /usr/bin/convert")),
'$thumbnail_security' => array('thumbnail_security', t("Allow SVG thumbnails in file browser"), get_config('system','thumbnail_security',0), t("WARNING: SVG images may contain malicious code.")),
'$maxloadavg' => array('maxloadavg', t("Maximum Load Average"), ((intval(get_config('system','maxloadavg')) > 0)?get_config('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")),
'$default_expire_days' => array('default_expire_days', t('Expiration period in days for imported (grid/network) content'), intval(get_config('system','default_expire_days')), t('0 for no expiration of imported content')),
'$active_expire_days' => array('active_expire_days', t('Do not expire any posts which have comments less than this many days ago'), intval(get_config('system','active_expire_days',7)), ''),

View File

@@ -0,0 +1,94 @@
<?php
namespace Zotlabs\Module;
use App;
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libsync;
class Affinity extends \Zotlabs\Web\Controller {
function post() {
if(! local_channel())
return;
if(! Apps::system_app_installed(local_channel(),'Affinity Tool'))
return;
check_form_security_token_redirectOnErr('affinity', 'affinity');
$cmax = intval($_POST['affinity_cmax']);
if($cmax < 0 || $cmax > 99)
$cmax = 99;
$cmin = intval($_POST['affinity_cmin']);
if($cmin < 0 || $cmin > 99)
$cmin = 0;
$lock = intval($_POST['affinity_lock']);
set_pconfig(local_channel(),'affinity','cmin',$cmin);
set_pconfig(local_channel(),'affinity','cmax',$cmax);
set_pconfig(local_channel(),'affinity','lock',$lock);
info( t('Affinity Tool settings updated.') . EOL);
Libsync::build_sync_packet();
}
function get() {
if(! local_channel())
return;
$desc = t('This app presents a slider control in your connection editor and also on your network page. The slider represents your degree of friendship (affinity) with each connection. It allows you to zoom in or out and display conversations from only your closest friends or everybody in your stream.');
if(! Apps::system_app_installed(local_channel(),'Affinity Tool')) {
//Do not display any associated widgets at this point
App::$pdl = '';
$o = '<b>' . t('Affinity Tool App') . ' (' . t('Not Installed') . '):</b><br>';
$o .= $desc;
return $o;
}
$text = t('The numbers below represent the minimum and maximum slider default positions for your network/stream page as a percentage.');
$content = '<div class="section-content-info-wrapper">' . $text . '</div>';
$cmax = intval(get_pconfig(local_channel(),'affinity','cmax'));
$cmax = (($cmax) ? $cmax : 99);
$content .= replace_macros(get_markup_template('field_input.tpl'), array(
'$field' => array('affinity_cmax', t('Default maximum affinity level'), $cmax, t('0-99 default 99'))
));
$cmin = intval(get_pconfig(local_channel(),'affinity','cmin'));
$cmin = (($cmin) ? $cmin : 0);
$content .= replace_macros(get_markup_template('field_input.tpl'), array(
'$field' => array('affinity_cmin', t('Default minimum affinity level'), $cmin, t('0-99 - default 0'))
));
$lock = intval(get_pconfig(local_channel(),'affinity','lock',1));
$content .= replace_macros(get_markup_template('field_checkbox.tpl'), array(
'$field' => array('affinity_lock', t('Persistent affinity levels'), $lock, t('If disabled the max and min levels will be reset to default after page reload'), ['No','Yes'])
));
$tpl = get_markup_template("settings_addon.tpl");
$o = replace_macros($tpl, array(
'$action_url' => 'affinity',
'$form_security_token' => get_form_security_token("affinity"),
'$title' => t('Affinity Tool Settings'),
'$content' => $content,
'$baseurl' => z_root(),
'$submit' => t('Submit'),
));
return $o;
}
}

View File

@@ -90,12 +90,12 @@ class Appman extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
if(argc() > 2) {
if(argc() > 3) {
if(argv(2) === 'moveup') {
Zlib\Apps::moveup(local_channel(),argv(1));
Zlib\Apps::moveup(local_channel(),argv(1),argv(3));
}
if(argv(2) === 'movedown') {
Zlib\Apps::movedown(local_channel(),argv(1));
Zlib\Apps::movedown(local_channel(),argv(1),argv(3));
}
goaway(z_root() . '/apporder');
}

View File

@@ -17,25 +17,28 @@ class Apporder extends \Zotlabs\Web\Controller {
nav_set_selected('Order Apps');
$syslist = array();
$list = Zlib\Apps::app_list(local_channel(), false, ['nav_featured_app', 'nav_pinned_app']);
if($list) {
foreach($list as $li) {
$syslist[] = Zlib\Apps::app_encode($li);
foreach( [ 'nav_featured_app', 'nav_pinned_app' ] as $l ) {
$syslist = [];
$list = Zlib\Apps::app_list(local_channel(), false, [ $l ]);
if($list) {
foreach($list as $li) {
$syslist[] = Zlib\Apps::app_encode($li);
}
}
}
Zlib\Apps::translate_system_apps($syslist);
Zlib\Apps::translate_system_apps($syslist);
usort($syslist,'Zotlabs\\Lib\\Apps::app_name_compare');
usort($syslist,'Zotlabs\\Lib\\Apps::app_name_compare');
$syslist = Zlib\Apps::app_order(local_channel(),$syslist);
$syslist = Zlib\Apps::app_order(local_channel(),$syslist, $l);
foreach($syslist as $app) {
if(strpos($app['categories'],'nav_pinned_app') !== false) {
$navbar_apps[] = Zlib\Apps::app_render($app,'nav-order');
}
else {
$nav_apps[] = Zlib\Apps::app_render($app,'nav-order');
foreach($syslist as $app) {
if($l === 'nav_pinned_app') {
$navbar_apps[] = Zlib\Apps::app_render($app,'nav-order-pinned');
}
else {
$nav_apps[] = Zlib\Apps::app_render($app,'nav-order');
}
}
}

View File

@@ -0,0 +1,66 @@
<?php
namespace Zotlabs\Module;
class Apschema extends \Zotlabs\Web\Controller {
function init() {
$base = z_root();
$arr = [
'@context' => [
'zot' => z_root() . '/apschema#',
'id' => '@id',
'type' => '@type',
'commentPolicy' => 'as:commentPolicy',
'meData' => 'zot:meData',
'meDataType' => 'zot:meDataType',
'meEncoding' => 'zot:meEncoding',
'meAlgorithm' => 'zot:meAlgorithm',
'meCreator' => 'zot:meCreator',
'meSignatureValue' => 'zot:meSignatureValue',
'locationAddress' => 'zot:locationAddress',
'locationPrimary' => 'zot:locationPrimary',
'locationDeleted' => 'zot:locationDeleted',
'nomadicLocation' => 'zot:nomadicLocation',
'nomadicHubs' => 'zot:nomadicHubs',
'emojiReaction' => 'zot:emojiReaction',
'expires' => 'zot:expires',
'directMessage' => 'zot:directMessage',
'schema' => 'http://schema.org#',
'PropertyValue' => 'schema:PropertyValue',
'value' => 'schema:value',
'magicEnv' => [
'@id' => 'zot:magicEnv',
'@type' => '@id'
],
'nomadicLocations' => [
'@id' => 'zot:nomadicLocations',
'@type' => '@id'
],
'ostatus' => 'http://ostatus.org#',
'conversation' => 'ostatus:conversation',
'diaspora' => 'https://diasporafoundation.org/ns/',
'guid' => 'diaspora:guid',
'Hashtag' => 'as:Hashtag'
]
];
header('Content-Type: application/ld+json');
echo json_encode($arr,JSON_UNESCAPED_SLASHES);
killme();
}
}

View File

@@ -63,9 +63,9 @@ class Article_edit extends \Zotlabs\Web\Controller {
if ($catsenabled){
$itm = fetch_post_tags($itm);
$cats = get_terms_oftype($itm[0]['term'], TERM_CATEGORY);
foreach ($cats as $cat) {
if (strlen($category))
$category .= ', ';
@@ -85,10 +85,9 @@ class Article_edit extends \Zotlabs\Web\Controller {
$mimetype = $itm[0]['mimetype'];
$summary = (($itm[0]['summary']) ? '[summary]' . $itm[0]['summary'] . '[/summary]' . "\r\n" : '');
$content = $itm[0]['body'];
$rp = 'articles/' . $channel['channel_address'];
$x = array(
@@ -110,10 +109,11 @@ class Article_edit extends \Zotlabs\Web\Controller {
'ptyp' => $itm[0]['type'],
'mimeselect' => false,
'mimetype' => $itm[0]['mimetype'],
'body' => undo_post_tagging($content),
'body' => $summary . undo_post_tagging($content),
'post_id' => $post_id,
'visitor' => true,
'title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
'summary' => htmlspecialchars($itm[0]['summary'],ENT_COMPAT,'UTF-8'),
'placeholdertitle' => t('Title (optional)'),
'pagetitle' => $card_title,
'profile_uid' => (intval($channel['channel_id'])),

View File

@@ -9,23 +9,32 @@ use Zotlabs\Lib\PermissionDescription;
require_once('include/channel.php');
require_once('include/conversation.php');
require_once('include/acl_selectors.php');
require_once('include/opengraph.php');
class Articles extends Controller {
function init() {
if(argc() > 1)
$which = argv(1);
else
return;
if(! $which) {
if(local_channel()) {
$channel = App::get_channel();
if($channel && $channel['channel_address'])
$which = $channel['channel_address'];
} else {
return;
}
}
profile_load($which);
}
function get($update = 0, $load = false) {
if(observer_prohibited(true)) {
return login();
}
@@ -47,7 +56,7 @@ class Articles extends Controller {
nav_set_selected('Articles');
head_add_link([
head_add_link([
'rel' => 'alternate',
'type' => 'application/json+oembed',
'href' => z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . App::$query_string),
@@ -56,7 +65,7 @@ class Articles extends Controller {
$category = (($_REQUEST['cat']) ? escape_tags(trim($_REQUEST['cat'])) : '');
if($category) {
$sql_extra2 .= protect_sprintf(term_item_parent_query(App::$profile['profile_uid'],'item', $category, TERM_CATEGORY));
}
@@ -65,24 +74,24 @@ class Articles extends Controller {
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
$which = argv(1);
$selected_card = ((argc() > 2) ? argv(2) : '');
$_SESSION['return_url'] = App::$query_string;
$uid = local_channel();
$owner = App::$profile_uid;
$observer = App::get_observer();
$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
if(! perm_is_allowed($owner,$ob_hash,'view_pages')) {
notice( t('Permission denied.') . EOL);
return;
}
$is_owner = ($uid && $uid == $owner);
$channel = channelx_by_n($owner);
if($channel) {
@@ -96,7 +105,7 @@ class Articles extends Controller {
else {
$channel_acl = [ 'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ];
}
if(perm_is_allowed($owner,$ob_hash,'write_pages')) {
@@ -105,16 +114,15 @@ class Articles extends Controller {
'webpage' => ITEM_TYPE_ARTICLE,
'is_owner' => true,
'content_label' => t('Add Article'),
'button' => t('Create'),
'button' => t('Save'),
'nickname' => $channel['channel_address'],
'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid']
'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid']
|| $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'acl' => (($is_owner) ? populate_acl($channel_acl, false,
'acl' => (($is_owner) ? populate_acl($channel_acl, false,
PermissionDescription::fromGlobalPermission('view_pages')) : ''),
'permissions' => $channel_acl,
'showacl' => (($is_owner) ? true : false),
'visitor' => true,
'body' => '[summary][/summary]',
'hide_location' => false,
'hide_voting' => false,
'profile_uid' => intval($owner),
@@ -138,12 +146,12 @@ class Articles extends Controller {
else {
$editor = '';
}
$itemspage = get_pconfig(local_channel(),'system','itemspage');
App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 10));
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start']));
$sql_extra = item_permissions_sql($owner);
$sql_item = '';
@@ -167,8 +175,8 @@ class Articles extends Controller {
$sql_extra2 .= " and item.item_thread_top != 0 ";
}
$r = q("select * from item
where item.uid = %d and item_type = %d
$r = q("select * from item
where item.uid = %d and item_type = %d
$sql_extra $sql_extra2 $sql_item order by item.created desc $pager_sql",
intval($owner),
intval(ITEM_TYPE_ARTICLE)
@@ -184,7 +192,7 @@ class Articles extends Controller {
$parents_str = ids_to_querystr($r,'id');
$items = q("SELECT item.*, item.id AS item_id
$r = q("SELECT item.*, item.id AS item_id
FROM item
WHERE item.uid = %d $item_normal
AND item.parent IN ( %s )
@@ -192,17 +200,20 @@ class Articles extends Controller {
intval(App::$profile['profile_uid']),
dbesc($parents_str)
);
if($items) {
xchan_query($items);
$items = fetch_post_tags($items, true);
if($r) {
xchan_query($r);
$items = fetch_post_tags($r, true);
$items = conv_sort($items,'updated');
}
else
$items = [];
}
// Add Opengraph markup
opengraph_add_meta((! empty($items) ? $r[0] : []), $channel);
$mode = 'articles';
if(get_pconfig(local_channel(),'system','articles_list_mode') && (! $selected_card))
$page_mode = 'pager_list';
else

View File

@@ -1,61 +1,188 @@
<?php
namespace Zotlabs\Module;
use ZipArchive;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\Verify;
require_once('include/security.php');
require_once('include/attach.php');
class Attach extends Controller {
class Attach extends \Zotlabs\Web\Controller {
function post() {
function init() {
if(argc() < 2) {
notice( t('Item not available.') . EOL);
$attach_ids = ((x($_REQUEST, 'attach_ids')) ? $_REQUEST['attach_ids'] : []);
$attach_path = ((x($_REQUEST, 'attach_path')) ? $_REQUEST['attach_path'] : '');
$channel_id = ((x($_REQUEST, 'channel_id')) ? intval($_REQUEST['channel_id']) : 0);
$channel = channelx_by_n($channel_id);
if (!$channel) {
notice(t('Channel not found.') . EOL);
return;
}
$r = attach_by_hash(argv(1),get_observer_hash(),((argc() > 2) ? intval(argv(2)) : 0));
if(! $r['success']) {
notice( $r['message'] . EOL);
$strip_str = '/cloud/' . $channel['channel_address'] . '/';
$count = strlen($strip_str);
$attach_path = substr($attach_path, $count);
if ($attach_ids) {
$zip_dir = 'store/[data]/' . $channel['channel_address'] . '/tmp';
if (!is_dir($zip_dir))
mkdir($zip_dir, STORAGE_DEFAULT_PERMISSIONS, true);
$token = random_string(32);
$zip_file = 'download_' . $token . '.zip';
$zip_path = $zip_dir . '/' . $zip_file;
$zip = new ZipArchive();
if ($zip->open($zip_path, ZipArchive::CREATE) === true) {
$zip_filename = self::zip_archive_handler($zip, $attach_ids, $attach_path);
$zip->close();
$meta = [
'zip_filename' => $zip_filename,
'zip_path' => $zip_path
];
Verify::create('zip_token', 0, $token, json_encode($meta));
json_return_and_die([
'success' => true,
'token' => $token
]);
}
}
}
function get() {
if (argc() < 2) {
notice(t('Item not available.') . EOL);
return;
}
$token = ((x($_REQUEST, 'token')) ? $_REQUEST['token'] : '');
if (argv(1) === 'download') {
$meta = Verify::get_meta('zip_token', 0, $token);
if (!$meta)
killme();
$meta = json_decode($meta, true);
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . $meta['zip_filename'] . '"');
header('Content-Length: ' . filesize($meta['zip_path']));
$istream = fopen($meta['zip_path'], 'rb');
$ostream = fopen('php://output', 'wb');
if ($istream && $ostream) {
pipe_streams($istream, $ostream);
fclose($istream);
fclose($ostream);
}
unlink($meta['zip_path']);
killme();
}
$r = attach_by_hash(argv(1), get_observer_hash(), ((argc() > 2) ? intval(argv(2)) : 0));
if (!$r['success']) {
notice($r['message'] . EOL);
return;
}
$c = q("select channel_address from channel where channel_id = %d limit 1",
intval($r['data']['uid'])
);
if(! $c)
if (!$c)
return;
$unsafe_types = array('text/html','text/css','application/javascript');
if(in_array($r['data']['filetype'],$unsafe_types) && (! channel_codeallowed($r['data']['uid']))) {
header('Content-type: text/plain');
$unsafe_types = array('text/html', 'text/css', 'application/javascript');
if (in_array($r['data']['filetype'], $unsafe_types) && (!channel_codeallowed($r['data']['uid']))) {
header('Content-Type: text/plain');
}
else {
header('Content-type: ' . $r['data']['filetype']);
header('Content-Type: ' . $r['data']['filetype']);
}
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
if(intval($r['data']['os_storage'])) {
$fname = dbunescbin($r['data']['content']);
if(strpos($fname,'store') !== false)
$istream = fopen($fname,'rb');
header('Content-Disposition: attachment; filename="' . $r['data']['filename'] . '"');
if (intval($r['data']['os_storage'])) {
$fname = $r['data']['content'];
if (strpos($fname, 'store') !== false)
$istream = fopen($fname, 'rb');
else
$istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb');
$ostream = fopen('php://output','wb');
if($istream && $ostream) {
pipe_streams($istream,$ostream);
$istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname, 'rb');
$ostream = fopen('php://output', 'wb');
if ($istream && $ostream) {
pipe_streams($istream, $ostream);
fclose($istream);
fclose($ostream);
}
}
else
echo dbunescbin($r['data']['content']);
echo $r['data']['content'];
killme();
}
public function zip_archive_handler($zip, $attach_ids, $attach_path, $pass = 1) {
$observer_hash = get_observer_hash();
$single = ((count($attach_ids) == 1) ? true : false);
$download_name = 'download.zip';
foreach ($attach_ids as $attach_id) {
$r = attach_by_id($attach_id, $observer_hash);
if (!$r['success']) {
continue;
}
if ($r['data']['is_dir'] && $single && $pass === 1)
$download_name = $r['data']['filename'] . '.zip';
$zip_path = $r['data']['display_path'];
if ($attach_path) {
$strip_str = $attach_path . '/';
$count = strlen($strip_str);
$zip_path = substr($r['data']['display_path'], $count);
}
if ($r['data']['is_dir']) {
$zip->addEmptyDir($zip_path);
$d = q("SELECT id FROM attach WHERE folder = '%s'",
dbesc($r['data']['hash'])
);
$attach_ids = ids_to_array($d);
self::zip_archive_handler($zip, $attach_ids, $attach_path, $pass++);
}
else {
$file_path = $r['data']['content'];
$zip->addFile($file_path, $zip_path);
// compressing can be ressource intensive - just store the data
$zip->setCompressionName($zip_path, ZipArchive::CM_STORE);
}
}
return $download_name;
}
}

View File

@@ -0,0 +1,203 @@
<?php
namespace Zotlabs\Module;
/**
* @file Zotlabs/Module/Attach_edit.php
*
*/
use App;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\Libsync;
use Zotlabs\Access\AccessList;
class Attach_edit extends Controller {
function post() {
if (!local_channel() && !remote_channel()) {
return;
}
$attach_ids = ((x($_POST, 'attach_ids')) ? $_POST['attach_ids'] : []);
$attach_id = ((x($_POST, 'attach_id')) ? intval($_POST['attach_id']) : 0);
$channel_id = ((x($_POST, 'channel_id')) ? intval($_POST['channel_id']) : 0);
$dnd = ((x($_POST, 'dnd')) ? intval($_POST['dnd']) : 0);
$permissions = ((x($_POST, 'permissions')) ? intval($_POST['permissions']) : 0);
$return_path = ((x($_POST, 'return_path')) ? notags($_POST['return_path']) : 'cloud');
$delete = ((x($_POST, 'delete')) ? intval($_POST['delete']) : 0);
$newfolder = ((x($_POST, 'newfolder_' . $attach_id)) ? notags($_POST['newfolder_' . $attach_id]) : '');
if(! $newfolder)
$newfolder = ((x($_POST, 'newfolder')) ? notags($_POST['newfolder']) : '');
$newfilename = ((x($_POST, 'newfilename_' . $attach_id)) ? notags($_POST['newfilename_' . $attach_id]) : '');
$recurse = ((x($_POST, 'recurse_' . $attach_id)) ? intval($_POST['recurse_' . $attach_id]) : 0);
if(! $recurse)
$recurse = ((x($_POST, 'recurse')) ? intval($_POST['recurse']) : 0);
$notify = ((x($_POST, 'notify_edit_' . $attach_id)) ? intval($_POST['notify_edit_' . $attach_id]) : 0);
$copy = ((x($_POST, 'copy_' . $attach_id)) ? intval($_POST['copy_' . $attach_id]) : 0);
if(! $copy)
$copy = ((x($_POST, 'copy')) ? intval($_POST['copy']) : 0);
$categories = ((x($_POST, 'categories_' . $attach_id)) ? notags($_POST['categories_' . $attach_id]) : '');
if(! $categories)
$categories = ((x($_POST, 'categories')) ? notags($_POST['categories']) : '');
if($attach_id)
$attach_ids[] = $attach_id;
$single = ((count($attach_ids) === 1) ? true : false);
$channel = channelx_by_n($channel_id);
if (! $channel) {
notice(t('Channel not found.') . EOL);
return;
}
$nick = $channel['channel_address'];
$observer = App::get_observer();
$observer_hash = (($observer) ? $observer['xchan_hash'] : '');
$is_owner = ((local_channel() == $channel_id) ? true : false);
$ids_str = implode(',', $attach_ids);
$r = q("SELECT id, uid, hash, creator, folder, filename, is_photo, is_dir FROM attach WHERE id IN ( %s ) AND uid = %d",
dbesc($ids_str),
intval($channel_id)
);
if (! $r) {
notice(t('File not found.') . EOL);
return;
}
foreach ($r as $rr) {
$actions_done = '';
$attach_id = $rr['id'];
$resource = $rr['hash'];
$creator = $rr['creator'];
$folder = $rr['folder'];
$filename = $rr['filename'];
$is_photo = intval($rr['is_photo']);
$is_dir = intval($rr['is_dir']);
$admin_delete = false;
$is_creator = (($creator == $observer_hash) ? true : false);
$move = ((! $copy && ($folder !== $newfolder || (($single) ? $filename !== $newfilename : false))) ? true : false);
$perms = get_all_perms($channel_id, $observer_hash);
if (! ($perms['view_storage'] || is_site_admin())) {
notice( t('Permission denied.') . EOL);
continue;
}
if (! $perms['write_storage']) {
if (is_site_admin()) {
$admin_delete = true;
}
else {
notice( t('Permission denied.') . EOL);
continue;
}
}
if (!$is_owner && !$admin_delete) {
if(! $is_creator) {
notice( t('Permission denied.') . EOL);
continue;
}
}
if ($delete) {
attach_delete($channel_id, $resource, $is_photo);
$actions_done .= 'delete,';
}
if ($copy) {
if($is_dir && $resource == $newfolder) {
notice( t('Can not copy folder into itself.') . EOL);
continue;
}
$x = attach_copy($channel_id, $resource, $newfolder, (($single) ? $newfilename : ''));
if ($x['success'])
$resource = $x['resource_id'];
$actions_done .= 'copy,';
}
if ($move) {
if($is_dir && $resource == $newfolder) {
notice( sprintf(t('Can not move folder "%s" into itself.'), $filename) . EOL);
continue;
}
$x = attach_move($channel_id, $resource, $newfolder, (($single) ? $newfilename : ''));
$actions_done .= 'move,';
}
if(! $delete && ! $dnd) {
if ($single || (! $single && $categories)) {
q("DELETE FROM term WHERE uid = %d AND oid = %d AND otype = %d",
intval($channel_id),
intval($attach_id),
intval(TERM_OBJ_FILE)
);
$cat = explode(',', $categories);
if ($cat) {
foreach($cat as $term) {
$term = trim(escape_tags($term));
if ($term) {
$term_link = z_root() . '/cloud/' . $nick . '/?cat=' . $term;
store_item_tag($channel_id, $attach_id, TERM_OBJ_FILE, TERM_CATEGORY, $term, $term_link);
}
}
$actions_done .= 'cat_add,';
}
}
else {
q("DELETE FROM term WHERE uid = %d AND oid = %d AND otype = %d",
intval($channel_id),
intval($attach_id),
intval(TERM_OBJ_FILE)
);
$actions_done .= 'cat_remove,';
}
if ($is_owner && ($single || (! $single && $permissions))) {
$acl = new AccessList($channel);
$acl->set_from_array($_REQUEST);
$x = $acl->get();
attach_change_permissions($channel_id, $resource, $x['allow_cid'], $x['allow_gid'], $x['deny_cid'], $x['deny_gid'], $recurse, true);
$actions_done .= 'permissions,';
if ($notify) {
attach_store_item($channel, $observer, $resource);
$actions_done .= 'notify,';
}
}
}
if (! $admin_delete && $actions_done) {
$sync = attach_export_data($channel, $resource, (($delete) ? true : false));
if ($sync) {
Libsync::build_sync_packet($channel_id, ['file' => [$sync]]);
}
}
logger('attach_edit: ' . $actions_done);
}
if($dnd || $delete) {
json_return_and_die([ 'success' => true ]);
}
goaway($return_path);
}
}

View File

@@ -1,6 +1,10 @@
<?php
namespace Zotlabs\Module;
use App;
use Zotlabs\Web\Controller;
require_once('include/conversation.php');
require_once('include/bbcode.php');
require_once('include/datetime.php');
@@ -9,15 +13,13 @@ require_once('include/items.php');
require_once('include/html2plain.php');
class Cal extends \Zotlabs\Web\Controller {
class Cal extends Controller {
function init() {
if(observer_prohibited()) {
return;
}
$o = '';
if(argc() > 1) {
$nick = argv(1);
@@ -25,19 +27,19 @@ class Cal extends \Zotlabs\Web\Controller {
$channelx = channelx_by_nick($nick);
if(! $channelx)
if(! $channelx) {
notice( t('Channel not found.') . EOL);
return;
}
\App::$data['channel'] = $channelx;
App::$data['channel'] = $channelx;
$observer = \App::get_observer();
\App::$data['observer'] = $observer;
$observer = App::get_observer();
App::$data['observer'] = $observer;
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
head_set_icon(App::$data['channel']['xchan_photo_s']);
head_set_icon(\App::$data['channel']['xchan_photo_s']);
\App::$page['htmlhead'] .= "<script> var profile_uid = " . ((\App::$data['channel']) ? \App::$data['channel']['channel_id'] : 0) . "; </script>" ;
App::$page['htmlhead'] .= "<script> var profile_uid = " . ((App::$data['channel']) ? App::$data['channel']['channel_id'] : 0) . "; </script>" ;
}
@@ -52,18 +54,8 @@ class Cal extends \Zotlabs\Web\Controller {
return;
}
$channel = null;
if(argc() > 1) {
$channel = channelx_by_nick(argv(1));
}
if(! $channel) {
notice( t('Channel not found.') . EOL);
return;
}
$channel = App::$data['channel'];
// since we don't currently have an event permission - use the stream permission
if(! perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_stream')) {
@@ -72,287 +64,152 @@ class Cal extends \Zotlabs\Web\Controller {
}
nav_set_selected('Calendar');
head_add_css('/library/fullcalendar/packages/core/main.min.css');
head_add_css('/library/fullcalendar/packages/daygrid/main.min.css');
head_add_css('cdav_calendar.css');
head_add_js('/library/fullcalendar/packages/core/main.min.js');
head_add_js('/library/fullcalendar/packages/daygrid/main.min.js');
$sql_extra = permissions_sql($channel['channel_id'], get_observer_hash(), 'event');
if(! perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts') || App::$profile['hide_friends'])
$sql_extra .= " and etype != 'birthday' ";
$sql_extra = permissions_sql($channel['channel_id'],get_observer_hash(),'event');
$first_day = feature_enabled($channel['channel_id'], 'events_cal_first_day');
$first_day = feature_enabled($channel['channel_id'], 'cal_first_day');
$first_day = (($first_day) ? $first_day : 0);
$htpl = get_markup_template('event_head.tpl');
\App::$page['htmlhead'] .= replace_macros($htpl,array(
'$baseurl' => z_root(),
'$module_url' => '/cal/' . $channel['channel_address'],
'$modparams' => 2,
'$lang' => \App::$language,
'$first_day' => $first_day
));
$o = '';
$mode = 'view';
$y = 0;
$m = 0;
$ignored = ((x($_REQUEST,'ignored')) ? " and dismissed = " . intval($_REQUEST['ignored']) . " " : '');
// logger('args: ' . print_r(\App::$argv,true));
if(argc() > 3 && intval(argv(2)) && intval(argv(3))) {
$mode = 'view';
$y = intval(argv(2));
$m = intval(argv(3));
}
if(argc() <= 3) {
$mode = 'view';
$event_id = argv(2);
$start = '';
$finish = '';
if (argv(2) === 'json') {
if (x($_GET,'start')) $start = $_GET['start'];
if (x($_GET,'end')) $finish = $_GET['end'];
}
if($mode == 'view') {
/* edit/create form */
if($event_id) {
$r = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
dbesc($event_id),
intval($channel['channel_id'])
);
if(count($r))
$orig_event = $r[0];
}
// Passed parameters overrides anything found in the DB
if(!x($orig_event))
$orig_event = array();
$tz = date_default_timezone_get();
if(x($orig_event))
$tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
$syear = datetime_convert('UTC', $tz, $sdt, 'Y');
$smonth = datetime_convert('UTC', $tz, $sdt, 'm');
$sday = datetime_convert('UTC', $tz, $sdt, 'd');
$shour = datetime_convert('UTC', $tz, $sdt, 'H');
$sminute = datetime_convert('UTC', $tz, $sdt, 'i');
$stext = datetime_convert('UTC',$tz,$sdt);
$stext = substr($stext,0,14) . "00:00";
$fyear = datetime_convert('UTC', $tz, $fdt, 'Y');
$fmonth = datetime_convert('UTC', $tz, $fdt, 'm');
$fday = datetime_convert('UTC', $tz, $fdt, 'd');
$fhour = datetime_convert('UTC', $tz, $fdt, 'H');
$fminute = datetime_convert('UTC', $tz, $fdt, 'i');
$ftext = datetime_convert('UTC',$tz,$fdt);
$ftext = substr($ftext,0,14) . "00:00";
$type = ((x($orig_event)) ? $orig_event['etype'] : 'event');
$f = get_config('system','event_input_format');
if(! $f)
$f = 'ymd';
$catsenabled = feature_enabled($channel['channel_id'],'categories');
$show_bd = perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts');
if(! $show_bd) {
$sql_extra .= " and event.etype != 'birthday' ";
}
$category = '';
$thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y');
$thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m');
if(! $y)
$y = intval($thisyear);
if(! $m)
$m = intval($thismonth);
// Put some limits on dates. The PHP date functions don't seem to do so well before 1900.
// An upper limit was chosen to keep search engines from exploring links millions of years in the future.
if($y < 1901)
$y = 1900;
if($y > 2099)
$y = 2100;
$nextyear = $y;
$nextmonth = $m + 1;
if($nextmonth > 12) {
$nextmonth = 1;
$nextyear ++;
}
$prevyear = $y;
if($m > 1)
$prevmonth = $m - 1;
else {
$prevmonth = 12;
$prevyear --;
}
$dim = get_dim($y,$m);
$start = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0);
$finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59);
if (argv(2) === 'json'){
if (x($_GET,'start')) $start = $_GET['start'];
if (x($_GET,'end')) $finish = $_GET['end'];
}
$start = datetime_convert('UTC','UTC',$start);
$finish = datetime_convert('UTC','UTC',$finish);
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
$start = datetime_convert('UTC','UTC',$start);
$finish = datetime_convert('UTC','UTC',$finish);
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
if(! perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'view_contacts'))
$sql_extra .= " and etype != 'birthday' ";
if (x($_GET, 'id')) {
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
from event left join item on item.resource_id = event.event_hash
where item.resource_type = 'event' and event.uid = %d and event.id = %d $sql_extra limit 1",
intval($channel['channel_id']),
intval($_GET['id'])
);
}
else {
// fixed an issue with "nofinish" events not showing up in the calendar.
// There's still an issue if the finish date crosses the end of month.
// Noting this for now - it will need to be fixed here and in Friendica.
// Ultimately the finish date shouldn't be involved in the query.
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
from event left join item on event.event_hash = item.resource_id
where item.resource_type = 'event' and event.uid = %d and event.uid = item.uid
AND (( event.adjust = 0 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' )
OR ( event.adjust = 1 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' ))
$sql_extra",
intval($channel['channel_id']),
dbesc($start),
dbesc($finish),
dbesc($adjust_start),
dbesc($adjust_finish)
);
}
if($r) {
xchan_query($r);
$r = fetch_post_tags($r,true);
$r = sort_by_date($r);
}
if (x($_GET,'id')){
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
from event left join item on resource_id = event_hash where resource_type = 'event' and event.uid = %d and event.id = %d $sql_extra limit 1",
intval($channel['channel_id']),
intval($_GET['id'])
);
}
else {
// fixed an issue with "nofinish" events not showing up in the calendar.
// There's still an issue if the finish date crosses the end of month.
// Noting this for now - it will need to be fixed here and in Friendica.
// Ultimately the finish date shouldn't be involved in the query.
$events = [];
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
from event left join item on event_hash = resource_id
where resource_type = 'event' and event.uid = %d and event.uid = item.uid $ignored
AND (( adjust = 0 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )
OR ( adjust = 1 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )) $sql_extra ",
intval($channel['channel_id']),
dbesc($start),
dbesc($finish),
dbesc($adjust_start),
dbesc($adjust_finish)
);
}
$links = array();
if($r) {
xchan_query($r);
$r = fetch_post_tags($r,true);
$r = sort_by_date($r);
}
if($r) {
foreach($r as $rr) {
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
if(! x($links,$j))
$links[$j] = z_root() . '/' . \App::$cmd . '#link-' . $j;
if($r) {
foreach($r as $rr) {
$tz = get_iconfig($rr, 'event', 'timezone');
if(! $tz)
$tz = 'UTC';
$start = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c'));
if ($rr['nofinish']){
$end = null;
} else {
$end = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtend'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtend'], 'c'));
}
}
$events=array();
$last_date = '';
$fmt = t('l, F j');
if($r) {
foreach($r as $rr) {
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
$d = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], $fmt) : datetime_convert('UTC','UTC',$rr['dtstart'],$fmt));
$d = day_translate($d);
$start = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'c') : datetime_convert('UTC','UTC',$rr['dtstart'],'c'));
if ($rr['nofinish']){
$end = null;
} else {
$end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtend'], 'c') : datetime_convert('UTC','UTC',$rr['dtend'],'c'));
}
$is_first = ($d !== $last_date);
$last_date = $d;
$edit = false;
$drop = false;
$title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
if(! $title) {
list($title, $_trash) = explode("<br",bbcode($rr['desc']),2);
$title = strip_tags(html_entity_decode($title,ENT_QUOTES,'UTF-8'));
}
$html = '';
if (x($_GET,'id')) {
$rr['timezone'] = $tz;
$html = format_event_html($rr);
$rr['desc'] = zidify_links(smilies(bbcode($rr['desc'])));
$rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8',false);
$rr['location'] = zidify_links(smilies(bbcode($rr['location'])));
$events[] = array(
'id'=>$rr['id'],
'hash' => $rr['event_hash'],
'start'=> $start,
'end' => $end,
'drop' => $drop,
'allDay' => false,
'title' => $title,
'j' => $j,
'd' => $d,
'edit' => $edit,
'is_first'=>$is_first,
'item'=>$rr,
'html'=>$html,
'plink' => array($rr['plink'],t('Link to Source'),'',''),
);
}
$events[] = array(
'calendar_id' => 'channel_calendar',
'rw' => true,
'id'=>$rr['id'],
'uri' => $rr['event_hash'],
'timezone' => $tz,
'start'=> $start,
'end' => $end,
'drop' => false,
'allDay' => (($rr['adjust']) ? 0 : 1),
'title' => html_entity_decode($rr['summary'], ENT_COMPAT, 'UTF-8'),
'editable' => false,
'item' => $rr,
'plink' => [$rr['plink'], t('Link to source')],
'description' => html_entity_decode($rr['description'], ENT_COMPAT, 'UTF-8'),
'location' => html_entity_decode($rr['location'], ENT_COMPAT, 'UTF-8'),
'allow_cid' => expand_acl($rr['allow_cid']),
'allow_gid' => expand_acl($rr['allow_gid']),
'deny_cid' => expand_acl($rr['deny_cid']),
'deny_gid' => expand_acl($rr['deny_gid']),
'html' => $html
);
}
if (argv(2) === 'json'){
echo json_encode($events); killme();
}
// links: array('href', 'text', 'extra css classes', 'title')
if (x($_GET,'id')){
$tpl = get_markup_template("event_cal.tpl");
}
else {
$tpl = get_markup_template("events_cal-js.tpl");
}
$nick = $channel['channel_address'];
$o = replace_macros($tpl, array(
'$baseurl' => z_root(),
'$new_event' => array(z_root().'/cal',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
'$previus' => array(z_root()."/cal/$nick/$prevyear/$prevmonth",t('Previous'),'',''),
'$next' => array(z_root()."/cal/$nick/$nextyear/$nextmonth",t('Next'),'',''),
'$export' => array(z_root()."/cal/$nick/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events,
'$upload' => t('Import'),
'$submit' => t('Submit'),
'$prev' => t('Previous'),
'$next' => t('Next'),
'$today' => t('Today'),
'$form' => $form,
'$expandform' => ((x($_GET,'expandform')) ? true : false)
));
if (x($_GET,'id')){ echo $o; killme(); }
return $o;
}
if (argv(2) === 'json') {
echo json_encode($events);
killme();
}
if (x($_GET,'id')) {
$o = replace_macros(get_markup_template("cal_event.tpl"), [
'$events' => $events
]);
echo $o;
killme();
}
$nick = $channel['channel_address'];
$sources = '{
id: \'channel_calendar\',
url: \'/cal/' . $nick . '/json/\',
color: \'#3a87ad\'
}';
$o = replace_macros(get_markup_template("cal_calendar.tpl"), [
'$sources' => $sources,
'$lang' => App::$language,
'$timezone' => date_default_timezone_get(),
'$first_day' => $first_day,
'$prev' => t('Previous'),
'$next' => t('Next'),
'$today' => t('Today'),
'$title' => '',
'$dtstart' => '',
'$dtend' => '',
'$nick' => $nick
]);
return $o;
}

View File

@@ -63,9 +63,9 @@ class Card_edit extends \Zotlabs\Web\Controller {
if ($catsenabled){
$itm = fetch_post_tags($itm);
$cats = get_terms_oftype($itm[0]['term'], TERM_CATEGORY);
foreach ($cats as $cat) {
if (strlen($category))
$category .= ', ';
@@ -114,6 +114,7 @@ class Card_edit extends \Zotlabs\Web\Controller {
'post_id' => $post_id,
'visitor' => true,
'title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
'summary' => htmlspecialchars($itm[0]['summary'],ENT_COMPAT,'UTF-8'),
'placeholdertitle' => t('Title (optional)'),
'pagetitle' => $card_title,
'profile_uid' => (intval($channel['channel_id'])),

View File

@@ -10,9 +10,13 @@ require_once('include/channel.php');
require_once('include/conversation.php');
require_once('include/acl_selectors.php');
/**
* @brief Provides the Cards module.
*
*/
class Cards extends Controller {
function init() {
public function init() {
if(argc() > 1)
$which = argv(1);
@@ -20,14 +24,15 @@ class Cards extends Controller {
return;
profile_load($which);
}
/**
* {@inheritDoc}
* @see \Zotlabs\Web\Controller::get()
* @see \\Zotlabs\\Web\\Controller::get()
*
* @return string Parsed HTML from template 'cards.tpl'
*/
function get($update = 0, $load = false) {
public function get($update = 0, $load = false) {
if(observer_prohibited(true)) {
return login();
@@ -99,18 +104,17 @@ class Cards extends Controller {
}
if(perm_is_allowed($owner, $ob_hash, 'write_pages')) {
$x = [
'webpage' => ITEM_TYPE_CARD,
'is_owner' => true,
'content_label' => t('Add Card'),
'button' => t('Create'),
'button' => t('Save'),
'nickname' => $channel['channel_address'],
'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid']
|| $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'acl' => (($is_owner) ? populate_acl($channel_acl, false,
'acl' => (($is_owner) ? populate_acl($channel_acl, false,
PermissionDescription::fromGlobalPermission('view_pages')) : ''),
'permissions' => $channel_acl,
'showacl' => (($is_owner) ? true : false),
@@ -141,7 +145,7 @@ class Cards extends Controller {
$itemspage = get_pconfig(local_channel(),'system','itemspage');
App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 10));
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start']));

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,7 @@ class Changeaddr extends \Zotlabs\Web\Controller {
if($account['account_password_changed'] > NULL_DATE) {
$d1 = datetime_convert('UTC','UTC','now - 48 hours');
if($account['account_password_changed'] > d1) {
if($account['account_password_changed'] > $d1) {
notice( t('Channel name changes are not allowed within 48 hours of changing the account password.') . EOL);
return;
}
@@ -49,7 +49,7 @@ class Changeaddr extends \Zotlabs\Web\Controller {
if(check_webbie(array($new_address)) !== $new_address) {
notice( t('Nickname has unsupported characters or is already being used on this site.') . EOL);
return $ret;
return;
}
channel_change_address($channel,$new_address);

Some files were not shown because too many files have changed in this diff Show More