1039 Commits
3.2 ... 3.6.1

Author SHA1 Message Date
Mario Vavti
d00761628f fix sql empty query error in db update 1216
(cherry picked from commit e4a1286aae)
2018-07-29 08:06:29 +02:00
Mario Vavti
6c10af29ee verrsion bump 2018-07-29 07:09:46 +02:00
Mario Vavti
ae62d6fb86 wrong class name
(cherry picked from commit 5dbd11c6ed)
2018-07-29 07:05:29 +02:00
zotlabs
d2e0ecd6a3 fix unsanitised xchan_name
(cherry picked from commit 9701516228)
2018-07-29 07:05:07 +02:00
zotlabs
13386ddbd7 SECURITY: sanitise vcard fields
(cherry picked from commit 2367d94a42)
2018-07-29 07:04:38 +02:00
zotlabs
17291e04df app update and ownership issues
(cherry picked from commit e28dab17d6)
2018-07-28 21:18:28 +02:00
Mario Vavti
7062a7ce66 fix sql error
(cherry picked from commit ec3a066e4e)
2018-07-26 09:34:48 +02:00
Mario Vavti
52ad5b7df5 version 3.6 2018-07-25 10:28:52 +02:00
Mario Vavti
1b1d11dcf1 Merge branch '3.6RC' 2018-07-25 10:19:19 +02:00
Mario Vavti
35200e5f1b Merge branch '3.6RC' of https://framagit.org/hubzilla/core into 3.6RC 2018-07-25 10:15:23 +02:00
Mario
091ef33f18 Merge branch 'patch-2' into 'dev'
Escape internal quotes in translation on export

See merge request hubzilla/core!1237

(cherry picked from commit 84e57d040b)

64efd07f Escape internal quotes in translation on export
87857fe5 Update hmessages.po
3342fc22 Update hstrings.php
2018-07-23 19:55:25 +02:00
Mario Vavti
aa01c2f4db update changelog
(cherry picked from commit 6be66d6df9)
2018-07-21 22:08:12 +02:00
kostikov
740015339d Add var to respect current hstrings.php format
(cherry picked from commit 062633d312)
2018-07-21 11:39:20 +02:00
kostikov
b7778ca1f9 Update php2po.php
(cherry picked from commit f9b18aa62f)
2018-07-21 11:38:35 +02:00
kostikov
ddd77ee6ee Update update_fail_eml.tpl
(cherry picked from commit 8fc7f2aca1)
2018-07-21 11:37:27 +02:00
kostikov
b625b5f645 Update register_verify_eml.tpl
(cherry picked from commit b6c2c8117e)
2018-07-21 11:36:58 +02:00
kostikov
c9e272a78d Update register_open_eml.tpl
(cherry picked from commit 86a42aad16)
2018-07-21 11:35:30 +02:00
kostikov
9bfb63fd98 Update passchanged_eml.tpl
(cherry picked from commit 8e2e09bb16)
2018-07-21 11:35:07 +02:00
kostikov
21ecf54b73 Update lostpass_eml.tpl
(cherry picked from commit 3713aa210f)
2018-07-21 11:34:42 +02:00
kostikov
429e3ce30a Add new file
(cherry picked from commit a65c23546b)
2018-07-21 11:34:14 +02:00
kostikov
26e20d35c2 Update hstrings.php
(cherry picked from commit 790a9155d4)
2018-07-21 11:32:57 +02:00
kostikov
f40406514c Update hmessages.po
(cherry picked from commit f141b845fd)
2018-07-21 11:32:33 +02:00
Mario Vavti
ed79bef51b prevent double file uploads when dropping files into jot
(cherry picked from commit f6de91bf0f)
2018-07-20 16:45:50 +02:00
Mario Vavti
0cde7f9897 fix jot drag and drop
(cherry picked from commit c72f6e6ea8)
2018-07-20 10:43:38 +02:00
zotlabs
85e21ce617 checkjs fix ($page not bin-hex in all cases)
(cherry picked from commit a94c9d2709)
2018-07-20 09:16:35 +02:00
zotlabs
157a9e895c fix the filtered query string so it can potentially be re-used as is.
(cherry picked from commit 6adbb93f0a)
2018-07-20 09:16:09 +02:00
Mario Vavti
7e2635adfe RC1 2018-07-19 12:27:43 +02:00
Mario
b655d04b34 version 3.4.2 2018-07-19 11:57:35 +02:00
Mario
7f84933cab compatibility fix for future versions 2018-07-19 11:52:12 +02:00
zotlabs
36220fdde8 typo
(cherry picked from commit ec852b0c8d)
2018-07-19 09:21:35 +02:00
zotlabs
67848c03ed query filter was a bit greedy
(cherry picked from commit a05c8ff66b)
2018-07-19 09:21:14 +02:00
Mario
685d05f98b Merge branch 'cherry-pick-5ce50d0a' into '3.6RC'
mangled urls on redirects

See merge request hubzilla/core!1228
2018-07-19 09:20:45 +02:00
zotlabs
931afe98b1 mangled urls on redirects
(cherry picked from commit 5ce50d0a2e)
2018-07-19 09:19:33 +02:00
Mario Vavti
4a6f775334 set the correct album name when moving photos
(cherry picked from commit eb322e8312)
2018-07-18 13:20:20 +02:00
Mario Vavti
5fa3e10701 set the correct album name when moving photos
(cherry picked from commit eb322e8312)
2018-07-18 13:19:35 +02:00
Mario Vavti
896d29d0c0 update composer autoload cache 2018-07-18 11:52:42 +02:00
Mario Vavti
4c633a9fb8 update strings 2018-07-18 11:49:32 +02:00
Mario Vavti
5fd1674d50 version 3.6RC 2018-07-18 11:39:22 +02:00
kostikov
67cbeaa3d4 Update hmessages.po
(cherry picked from commit cbab7d2150)
2018-07-18 08:28:18 +02:00
kostikov
23f3d554b8 Fix wrong plural function logic
(cherry picked from commit 4284088611)
2018-07-18 08:27:53 +02:00
Mario
95355ddec0 Merge branch 'patch-1' into 'master'
Fix wrong plural function logic

See merge request hubzilla/core!1226
2018-07-18 08:27:21 +02:00
kostikov
cbab7d2150 Update hmessages.po 2018-07-18 00:28:04 +02:00
kostikov
4284088611 Fix wrong plural function logic 2018-07-17 21:27:08 +02:00
Mario Vavti
bb70223509 when calling timeago() from mod_mail.js it is called before the translations are applied - move the call to main.js and be more specific with the selector to not trigger calls for other modules (eg network) which is handled elsewhere to not be to much of an performance hog (to many dates at a time) 2018-07-13 11:00:37 +02:00
Mario Vavti
98fb2ec639 let timeago render the date 2018-07-13 10:16:07 +02:00
Mario Vavti
a8cef79b1a let timeago render the date 2018-07-13 10:13:11 +02:00
Mario Vavti
5076e38c1c update jquery.timeago lib 2018-07-13 10:12:11 +02:00
Mario
e000d98cc5 Merge branch 'hookableCSP-mr' into 'dev'
Hookable csp mr

See merge request hubzilla/core!1225
2018-07-13 09:34:48 +02:00
M. Dent
38cc88c861 Hookable csp mr 2018-07-13 09:34:48 +02:00
Mario Vavti
48e74035f2 Merge remote-tracking branch 'mike/master' into dev 2018-07-12 09:16:52 +02:00
zotlabs
38bccecc04 fix to cart behaviour 2018-07-11 18:00:47 -07:00
Andrew Manning
3ebe35f7f7 Merge branch 'patch-1' into 'dev'
Update hstrings.php - spelling - Privatsphäre

See merge request hubzilla/core!1223
2018-07-10 01:36:14 +02:00
Heiko Förster
b81f1111d1 Update hstrings.php - spelling - Privatsphäre 2018-07-08 16:48:37 +02:00
Mario Vavti
ac8db6479e fix css regression 2018-07-07 08:14:11 +02:00
Mario Vavti
d903772831 this is messing with names containing a comma and is superfluous now 2018-07-06 08:44:25 +02:00
zotlabs
cc71e507cb don't provide manage apps button when viewing all available 2018-07-05 22:03:41 -07:00
zotlabs
fe44ebee93 change to import system apps at most once a day per person 2018-07-05 21:55:03 -07:00
zotlabs
c80e009cf3 app store fixes 2018-07-05 21:46:34 -07:00
zotlabs
f6e8ce5516 appstore changes 2018-07-04 23:20:35 -07:00
zotlabs
f808a2b5a1 issue syncing pageflags 2018-07-04 19:53:51 -07:00
zotlabs
51a2e64a89 issue syncing pageflags 2018-07-04 19:51:16 -07:00
zotlabs
bf24a106ce Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-07-04 19:07:52 -07:00
zotlabs
1387b88ba4 remove manage group link from activity_filter, already in personal menu 2018-07-04 19:04:12 -07:00
Mario Vavti
d9ece80fda order nouveau by created instead of received since ordering by received returns unexpected results once old expired items get re-imported 2018-07-04 10:55:38 +02:00
Mario Vavti
b88a9c2627 Revert "add the missing link to manage privacy groups"
This reverts commit c28e27357a.
2018-07-04 10:53:07 +02:00
zotlabs
18dbc490fe remove broken include path hack 2018-07-03 18:26:34 -07:00
zotlabs
d753492382 bad merge 2018-07-01 22:48:05 -07:00
zotlabs
8c26db63dd some changes to support plume 2018-07-01 19:12:45 -07:00
zotlabs
5d7d30f789 propagate expired posts to other networks 2018-06-30 23:57:25 -07:00
zotlabs
63a3f5149a be very precise about what a url looks like 2018-06-30 15:47:06 -07:00
zotlabs
c28e27357a add the missing link to manage privacy groups 2018-06-28 23:17:50 -07:00
zotlabs
fa6e5e4d75 plugins -> addons 2018-06-28 16:43:22 -07:00
zotlabs
cae0a26ac0 String change to reflect the current forum tagging method 2018-06-28 13:38:15 -07:00
zotlabs
156010050c imagick converter: -thumbnail doesn't preserve exif, -resize does 2018-06-26 17:19:32 -07:00
zotlabs
524551a05c do not include system channels in directory results 2018-06-25 23:20:02 -07:00
zotlabs
b89387d608 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-06-25 20:58:23 -07:00
Mario Vavti
cef1c09db6 Merge remote-tracking branch 'mike/master' into dev 2018-06-25 23:49:11 +02:00
zotlabs
712759ea4b disable log noise until it is needed 2018-06-25 13:42:21 -07:00
zotlabs
66fc12c928 crc32 is potentially reversible 2018-06-25 13:33:23 -07:00
zotlabs
f66fb8e2a8 SECURITY: logging: hash the session_id in case somebody posts log snippets from active sessions; also provide a hashed process_id if using a daemon process (with no session) for easier tracking of related log events 2018-06-25 13:20:12 -07:00
Mario Vavti
bb786b1f61 version 2018-06-25 14:30:52 +02:00
Mario Vavti
62610b5ec0 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-06-25 14:29:32 +02:00
Mario Vavti
2594178158 updates justified gallery lib to version 3.7 and minor fixes for full template 2018-06-25 14:29:07 +02:00
zotlabs
4866ed5283 remove the white-space pre-wrap property on code blocks. This should probably be done with the word-break property instead 2018-06-24 21:56:58 -07:00
zotlabs
86e93664d0 remote_self wasn't working correctly 2018-06-24 16:56:23 -07:00
Mike Macgirvin
07f0043428 Merge branch 'dev' into 'dev'
2 times the same ;)

See merge request hubzilla/core!1222
2018-06-20 07:50:06 +02:00
Mike Macgirvin
e4f15c078a Merge branch 'patch-1' into 'dev'
NL strings: fix simple error

See merge request hubzilla/core!1221
2018-06-20 07:49:43 +02:00
gia vec
35f29b5d8a Update roadmap.bb 2018-06-19 23:04:50 +02:00
zotlabs
3716f4e809 hiding a channel from the directory also hides them from the cloud rootdir 2018-06-18 22:57:38 -07:00
zotlabs
6cf040d3ee whitespace 2018-06-18 21:11:39 -07:00
zotlabs
48a25b1b85 channel sources: add 'resend' option to discard original author - similar to the Friendica remote_self setting 2018-06-18 20:44:59 -07:00
zotlabs
d448742ae5 translate dos line endings 2018-06-18 20:18:29 -07:00
zotlabs
f801f52274 provide flag to collect_recipients to exclude privacy groups (for federation plugin use) 2018-06-18 17:07:20 -07:00
jeroenpraat
eabbad176d fix simple error 2018-06-18 23:20:35 +02:00
jeroenpraat
e6d7f22ba9 fix simple error 2018-06-18 23:17:29 +02:00
zotlabs
36d73b3da9 consolidate the various project roadmap files and remove stuff that's either finished or abandoned 2018-06-17 21:41:20 -07:00
zotlabs
dcd8fb289e remove admin docs on upgrading from redmatrix; operation is no longer supported 2018-06-17 21:13:46 -07:00
zotlabs
0dc266153d This effectively reverts 438ce44a which symlinked doc/es to a non-existent file (doc/doc/es-es) 2018-06-17 21:01:22 -07:00
zotlabs
7850ecbd95 remove several unused/unreferenced templates 2018-06-17 20:53:05 -07:00
zotlabs
1cb60c7f5e Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-06-17 17:47:04 -07:00
zotlabs
e4ed0f8acd owa: htmlentity encoding encountered in authentication workflow (possibly introduced during Apache mod_rewrite with QSA flag) 2018-06-17 17:30:09 -07:00
Mario
28043726e6 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-06-17 17:00:17 +02:00
Mario
9c5df51141 some work on mod group 2018-06-17 16:58:12 +02:00
zotlabs
eedfb7de32 slightly more memory efficient way to drop posts of removed connections 2018-06-15 16:28:36 -07:00
zotlabs
3fc955abfd hubzilla core issue #1227 - affinity slider unable to reach 0,99 when slider saved default changes 2018-06-15 15:34:27 -07:00
zotlabs
615fa1119f apply changes to slider defaults across all modules that use buildQuery for updates 2018-06-15 15:32:12 -07:00
zotlabs
7e736c5359 apply changes to slider defaults across all modules that use buildQuery for updates 2018-06-15 15:21:19 -07:00
zotlabs
2f3c3db020 hubzilla core issue #1227 - affinity slider unable to reach 0,99 when slider saved default changes 2018-06-15 02:02:03 -07:00
zotlabs
967d4da30a wiki: word-wrap code on any character 2018-06-14 22:46:20 -07:00
zotlabs
7a144b90fb re-implement/refactor getQuotaInfo() on DAV storage 2018-06-14 20:40:25 -07:00
zotlabs
4a028b6015 Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge 2018-06-13 21:36:29 -07:00
zotlabs
8da0f9d356 optionally report total available space when uploading 2018-06-13 21:06:56 -07:00
Mike Macgirvin
fc396f16ff Merge branch 'dev' into 'dev'
change repo links

See merge request hubzilla/core!1220
2018-06-14 05:46:28 +02:00
zotlabs
b5e4a5f51c SECURITY: provide option to disable the cloud 'root' directory and make the cloud module require a target channel nickname. This is a low impact change as there is currently no disclosure of private information. The presence of a file browser for all the channels on the site could be (and is reported to be) a concern to some people and there is no reason why it shouldn't be optional. 2018-06-13 20:27:10 -07:00
gia vec
77ba647778 Update README.md
(cherry picked from commit 7d73543b84507b74c8058da7dd062d7949c34d61)
2018-06-14 04:33:34 +02:00
gia vec
10491294d8 Update hubzilla-setup.sh
(cherry picked from commit 95f2eb68ca38976b7ca9d3f5c2d89c923d5ef4b5)
2018-06-14 04:26:21 +02:00
zotlabs
65cbc7c2bb uid is integer 2018-06-13 16:37:16 -07:00
zotlabs
1a75e3c24a Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-06-13 16:29:56 -07:00
zotlabs
b0b67fbcc4 Merge branch 'master' of ../hz into dev 2018-06-13 16:28:08 -07:00
zotlabs
254a6be277 null db fields in mod_invite 2018-06-13 16:25:50 -07:00
Mike Macgirvin
fdf920b374 Merge branch 'master' into 'master'
Master

See merge request hubzilla/core!1218
2018-06-13 03:11:05 +02:00
Mike Macgirvin
dffd82cb24 Merge branch 'remove-github-from-README' into 'master'
remove github from link to INSTALL.txt

See merge request hubzilla/core!1215
2018-06-13 03:09:39 +02:00
Mike Macgirvin
633693c94b Merge branch 'fix-addons-links' into 'dev'
fix links to addons repository

See merge request hubzilla/core!1216
2018-06-13 03:07:05 +02:00
gia vec
9840d1ce73 Update hstrings.php 2018-06-12 20:47:19 +02:00
gia vec
6a45bd4372 Update hmessages.po 2018-06-12 20:42:16 +02:00
Herbert Thielen
b361fb4f89 fix links to addons repository 2018-06-11 15:54:22 +02:00
Herbert Thielen
530bc996ca remove github from link to INSTALL.txt 2018-06-11 15:26:30 +02:00
zotlabs
2f2bd03b15 fixes for immediate expire, channel_active not initialised in DB 2018-06-10 22:19:51 -07:00
zotlabs
a8f179145b Merge branch 'master' of ../hz into dev 2018-06-10 22:16:39 -07:00
zotlabs
912ccb31a1 hubzilla core issue #1218 2018-06-10 19:26:35 -07:00
zotlabs
6959c9e423 fixes for immediate expire, channel_active not initialised in DB 2018-06-10 15:27:55 -07:00
Mario Vavti
53363d6808 fix issue #1221
(cherry picked from commit d0f7b1d9b7)
2018-06-10 17:06:12 +02:00
Mario Vavti
1b9a350469 Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-06-10 17:05:05 +02:00
Mario Vavti
d0f7b1d9b7 fix issue #1221 2018-06-10 17:04:34 +02:00
Mario
86c0abe67e Merge branch 'dev' into 'dev'
Update symbolic link doc/es

See merge request hubzilla/core!1214

(cherry picked from commit 46cc64f2d8)

438ce44a Update symbolic link doc/es
2018-06-10 16:54:37 +02:00
Mario
46cc64f2d8 Merge branch 'dev' into 'dev'
Update symbolic link doc/es

See merge request hubzilla/core!1214
2018-06-10 16:54:22 +02:00
Mario Vavti
9e29c13678 fix issue #1219 2018-06-09 16:38:15 +02:00
Manuel Jiménez Friaza
438ce44af9 Update symbolic link doc/es 2018-06-09 13:41:13 +02:00
Mario Vavti
e37ccb7a63 move cid filter js to the widget 2018-06-09 13:08:14 +02:00
Mario Vavti
afaa8012c8 bump version 2018-06-09 11:04:56 +02:00
Mario Vavti
c4778e5e24 restrict cid filter to unthreaded order (makes much more sense that way imho and the query is a lot faster) and slighty change order of the filters 2018-06-09 10:58:01 +02:00
Mario Vavti
d5ee8d80ab Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2018-06-08 23:19:56 +02:00
Mario Vavti
1fbc131469 if unthreaded and cid and not pf, query author only 2018-06-08 23:19:30 +02:00
Mario Vavti
468af29e3e new feature filter network by name 2018-06-08 23:03:05 +02:00
Mario
b05e7943c2 Merge branch 'dev' into 'dev'
Update github.com git repo URLs with framagit.org URLs

See merge request hubzilla/core!1212
2018-06-08 21:04:21 +02:00
Mario
dbf0c1893c Merge branch 'dev' into 'dev'
Update doc/es-es

See merge request hubzilla/core!1213
2018-06-08 21:02:07 +02:00
Manuel Jiménez Friaza
950006a4de Update doc/es-es 2018-06-08 12:49:21 +02:00
Mario Vavti
2f7dfb0286 update changelog
(cherry picked from commit 7c98aea524)
2018-06-08 12:17:33 +02:00
Mario Vavti
7c98aea524 update changelog 2018-06-08 12:16:47 +02:00
Mario
688c5bdd20 bump version 2018-06-08 12:05:06 +02:00
Andrew Manning
4feff1cf89 Update github.com git repo URLs with framagit.org URLs 2018-06-08 05:37:23 -04:00
Andrew Manning
df2d181602 Merge branch 'dev' of framagit.org:hubzilla/core into dev 2018-06-08 05:22:01 -04:00
Mario Vavti
752a9d904c DB update to fix wrong hubloc_url for activitypub hublocs
(cherry picked from commit eb04dbc5ce)
2018-06-08 09:41:35 +02:00
Mario Vavti
a5b9fbaf00 github to framagit transition
(cherry picked from commit 7bf1c5f27b)
2018-06-08 09:05:27 +02:00
Mario Vavti
7bf1c5f27b github to framagit transition 2018-06-08 09:04:19 +02:00
zotlabs
d841303c04 we probably don't need to delivery local items more than once
(cherry picked from commit 139c39c2ce)
2018-06-08 08:38:53 +02:00
zotlabs
5e5b9895df when removing a connection, use the same rules as expire: don't remove items that are starred, filed, or that you replied to.
(cherry picked from commit 5d83469621)
2018-06-08 08:37:36 +02:00
zotlabs
ac8f798e56 don't show forums in forum widget if archived flag is set
(cherry picked from commit 7c05500392)
2018-06-08 08:37:13 +02:00
Manuel Jiménez Friaza
5c8ec5cce4 Initial translations in doc/es-es
(cherry picked from commit ea8ff7037a)
2018-06-08 08:36:19 +02:00
Mario Vavti
19e509d997 escape query string
(cherry picked from commit b3928f3d2a)
2018-06-08 08:33:38 +02:00
Mario Vavti
38b230a128 typo
(cherry picked from commit b47fdd748f)
2018-06-08 08:31:02 +02:00
Mario Vavti
b47fdd748f typo 2018-06-08 08:30:22 +02:00
gia vec
c69c7db4f7 Update developers.bb
(cherry picked from commit 009ecb0ff4)
2018-06-08 08:27:11 +02:00
gia vec
de20d8f73a Update Developers.md
(cherry picked from commit 68ffddafb1)
2018-06-08 08:26:46 +02:00
Mario
5deecfea28 Merge branch 'master' into 'master'
Master

See merge request hubzilla/core!1211
2018-06-08 08:26:15 +02:00
Mario Vavti
dfa48ba17c fixes for search_item.tpl 2018-06-07 23:24:36 +02:00
Mario Vavti
b3928f3d2a escape query string 2018-06-07 22:45:07 +02:00
gia vec
009ecb0ff4 Update developers.bb 2018-06-07 22:13:18 +02:00
gia vec
68ffddafb1 Update Developers.md 2018-06-07 22:10:32 +02:00
Mario Vavti
d3bc50e18d do not query for parents if $conv and $nouveau are set 2018-06-07 21:58:09 +02:00
zotlabs
d3f741a8b6 update a number of links in the code
(cherry picked from commit 2c7597066c)
2018-06-07 14:19:31 +02:00
Mario Vavti
ad4e8fd7f5 Merge remote-tracking branch 'mike/master' into dev 2018-06-07 14:00:18 +02:00
zotlabs
2c7597066c update a number of links in the code 2018-06-06 17:12:20 -07:00
zotlabs
c06c2650e5 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-06-06 16:49:07 -07:00
Mario Vavti
9d664df993 remove gravizot.de from directory fallback servers due to owners request 2018-06-06 22:14:10 +02:00
Mario Vavti
89ecc07eb0 update install instructions 2018-06-06 22:13:27 +02:00
Mario Vavti
9ffb10c0e6 update install instructions 2018-06-06 22:11:55 +02:00
Mario Vavti
dd4b8529c2 Merge remote-tracking branch 'mike/master' into dev 2018-06-06 20:13:03 +02:00
Mario Vavti
5d1d6299cd add the pf argument to the forum notification links 2018-06-06 18:02:25 +02:00
Mario Vavti
4e1c32e610 remove gravizot.de from directory fallback servers due to owners request 2018-06-06 17:59:13 +02:00
zotlabs
d6f98ab88e some work to make menus editable by visitors with webpage write permissions; this needed to revise the link structure so that the page specified an owner channel in the url. Otherwise we could only operate on menus owned by local_channel(). Have done some basic regression testing but have not yet fully tested guest editing functionality. 2018-06-05 21:12:42 -07:00
Mario Vavti
7188e719ef rely on the pf argument to determine if we deal with a forum or not. xchan_pubforum is not set for all public forums in the forum filters for some reason. 2018-06-05 11:56:30 +02:00
Mario Vavti
2328dfc851 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-06-05 10:36:54 +02:00
Mario Vavti
30c00df4f3 Merge remote-tracking branch 'mike/master' into dev 2018-06-05 10:36:37 +02:00
zotlabs
e1b85a361c photos not syncing properly if destination is a postgres site 2018-06-04 16:36:13 -07:00
git-marijus
915328d92a Merge pull request #1210 from mjfriaza/dev
Initial Spanish translations in doc/es-es
2018-06-04 16:00:29 +02:00
Mario Vavti
6019a34da2 be specific about the term type and do not sort the results 2018-06-04 15:54:18 +02:00
zotlabs
5a9e6c8a69 sort out some mismatched hovertips on the activity filter 2018-06-03 23:38:03 -07:00
zotlabs
57231a8807 wrong level 2018-06-03 23:16:40 -07:00
zotlabs
dd9f7ef6e9 fix submenunavigation on activity filters 2018-06-03 23:14:01 -07:00
Mario Vavti
8b76b5a0a6 improve network cid query 2018-06-03 23:03:30 +02:00
Mario Vavti
3d3e7bafd5 distinct is needed or it can heavily impact pagination in certain situations (5 per page instead of 20). Add ordering to the select clause to mitigate errors in postgres and add item_thread_top = 1 for slightly better performance. 2018-06-03 17:31:50 +02:00
Mario Vavti
a42ff1e6d4 missing $perm_sql 2018-06-03 13:27:06 +02:00
Manuel Jiménez Friaza
ea8ff7037a Initial translations in doc/es-es 2018-06-03 12:29:27 +02:00
Mario Vavti
2438af1cb5 the pf argument is required here for some functionality in /network 2018-06-03 00:16:46 +02:00
Mario Vavti
a32626e489 add the archived flag 2018-06-02 22:42:20 +02:00
Mario Vavti
3a9f149c80 Merge remote-tracking branch 'mike/master' into dev 2018-06-02 22:39:36 +02:00
Mario Vavti
a0e4f7ddb1 respect the privacy group feature setting in nav 2018-06-02 22:26:08 +02:00
Mario Vavti
8189408190 finalize filters and forum notifications 2018-06-02 22:11:11 +02:00
Mario Vavti
db0a3a7534 some more work on forum notifications 2018-06-02 15:39:38 +02:00
zotlabs
5f612521da Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-06-02 00:01:19 -07:00
Mario Vavti
53efd4e470 unread forum notifications - wip/unfinished 2018-06-01 23:22:52 +02:00
Mario Vavti
22a9e4c9a9 add manage privacy groups entry to the panel channel menu dropdown for now 2018-06-01 21:52:54 +02:00
Mario Vavti
56f0244360 fixes for css fix 2018-06-01 20:59:28 +02:00
Mario Vavti
60a7e68b1b css fix 2018-06-01 13:39:29 +02:00
Mario Vavti
ec6d4f8ac3 add hover effect to dropdown caret 2018-06-01 13:30:02 +02:00
zotlabs
a6ab3dd36a Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-06-01 03:43:11 -07:00
Mario Vavti
6bf0f4225c move file and groups filter to submenu 2018-06-01 12:11:07 +02:00
zotlabs
4df5d44ef9 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-31 22:25:01 -07:00
zotlabs
dd962027cc proper pronoun 2018-05-31 21:14:12 -07:00
zotlabs
7c05500392 don't show forums in forum widget if archived flag is set 2018-05-31 16:17:24 -07:00
zotlabs
5d83469621 when removing a connection, use the same rules as expire: don't remove items that are starred, filed, or that you replied to. 2018-05-31 16:11:51 -07:00
Mario Vavti
d03c27d18c implement reset button for filters 2018-05-31 14:02:34 +02:00
Mario Vavti
7e8c7f86f0 change some strings 2018-05-31 13:13:46 +02:00
Mario Vavti
b438ffead4 Merge remote-tracking branch 'mike/master' into dev 2018-05-31 13:06:33 +02:00
Mario Vavti
cbaaa1c57f merge groups and filed posts into activity filters 2018-05-31 13:05:32 +02:00
zotlabs
f0690aadcc typo in unused function 2018-05-30 23:40:01 -07:00
zotlabs
fc31ecdab0 autocomplete private mail addresses based on substring in either the name or webbie (prevously required an '@' to trigger a webbie search) 2018-05-30 17:30:17 -07:00
Mario Vavti
6bfc5aa96c strpos does not work with arrays :( 2018-05-30 23:15:43 +02:00
Mario Vavti
5505f5fa02 restrict the network/channel navbar search to content and hashtags 2018-05-30 22:55:28 +02:00
Mario Vavti
6349a7417f make navbar search use the module search function in /network and /channel 2018-05-30 22:40:22 +02:00
Mario Vavti
e1a55ba471 remove redundant css from default.css 2018-05-30 20:18:13 +02:00
Mario Vavti
881406f82b remove redundant reference for order 2018-05-30 14:54:39 +02:00
Mario Vavti
293e405f5b just query for data we actually need 2018-05-30 14:09:24 +02:00
Mario Vavti
8d6441704b add widget files and templates 2018-05-30 14:06:18 +02:00
Mario Vavti
9fcb3bf2e8 first cut on restructuring the previously called network tabs 2018-05-30 14:02:58 +02:00
zotlabs
7d088c8d56 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-29 17:51:36 -07:00
zotlabs
ed3d3b6f27 provide possibility of using different orderings (post, commented) on channel page 2018-05-29 17:35:44 -07:00
Mario Vavti
dcd5f00077 Merge remote-tracking branch 'mike/master' into dev 2018-05-29 09:04:45 +02:00
Manuel Jiménez Friaza
4aa9549828 Some stuff of the Spanish Hubzilla 2018-05-29 08:52:49 +02:00
git-marijus
bca3113fba Merge pull request #1202 from aninf-wo/dev
include photos.php
2018-05-29 08:41:31 +02:00
git-marijus
a8a2c806f2 Merge pull request #1198 from mjfriaza/dev
Some stuff of the Spanish Hubzilla
2018-05-29 08:41:00 +02:00
git-marijus
e00c5c6bf1 Merge pull request #1197 from galettesaucisse/patch-52
Update hstrings.php
2018-05-29 08:40:27 +02:00
git-marijus
7e8c895ccd Merge pull request #1196 from galettesaucisse/patch-51
Update hmessages.po
2018-05-29 08:40:13 +02:00
zotlabs
139c39c2ce we probably don't need to delivery local items more than once 2018-05-28 22:23:40 -07:00
Mario Vavti
6bae91dd7e Merge remote-tracking branch 'mike/master' into dev 2018-05-28 14:59:10 +02:00
zotlabs
c115e8ee60 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-27 21:10:52 -07:00
zotlabs
ddebbcc0a0 hubzilla issue #1200 2018-05-27 17:46:25 -07:00
Herbert Thielen
4f3be92a0d include photos.php
required for photo_calculate_scale()
2018-05-27 17:57:35 +02:00
Mario Vavti
9655b27f81 fix js error with catalan language (unescaped strings) 2018-05-27 12:21:20 +02:00
Mario Vavti
5a475453ab fix js error with catalan language (unescaped strings) 2018-05-27 12:20:07 +02:00
Mario Vavti
eb04dbc5ce DB update to fix wrong hubloc_url for activitypub hublocs 2018-05-26 21:15:22 +02:00
Manuel Jiménez Friaza
2bf76928cc Some stuff of the Spanish Hubzilla 2018-05-26 18:09:22 +02:00
Galette Saucisse
89d97c556a Update hstrings.php 2018-05-26 09:18:41 +02:00
Galette Saucisse
4ff2b8ed1b Update hmessages.po 2018-05-26 09:17:04 +02:00
Andrew Manning
ed17e8a649 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-05-25 20:07:31 -04:00
Mario Vavti
33700e9cf4 differentiate between direct messages and followers-only messages 2018-05-25 15:29:59 +02:00
git-marijus
13b3594ff3 Merge pull request #1191 from jeroenpraat/master
Finaly update of Dutch language strings
2018-05-25 12:37:11 +02:00
Mario Vavti
eebeb450c3 Merge remote-tracking branch 'mike/master' into dev 2018-05-25 12:34:59 +02:00
Mario Vavti
0fe449ba33 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-05-25 12:34:35 +02:00
zotlabs
cd4454100b alternate fix for z_check_dns 2018-05-24 16:32:21 -07:00
Jeroen
fb060c27ef Finaly update of Dutch language strings
Already in dev, but it's up to Mario or Mike to decide if the master may be updated too
2018-05-24 18:25:28 +02:00
Jeroen
fcd9e115c2 Finaly an update of Dutch language strings 2018-05-24 18:22:09 +02:00
git-marijus
cf00a9dbfc Merge pull request #1190 from fadelkon/dev
Update catalan translation for sources changes up to Apr 23rd 2018
2018-05-24 11:55:47 +02:00
git-marijus
bace238e9f Merge pull request #1183 from galettesaucisse/patch-50
Create TermsOfService.md
2018-05-24 11:54:09 +02:00
git-marijus
7586bc9dcf Merge pull request #1182 from galettesaucisse/patch-49
Create gdpr1.md
2018-05-24 11:53:50 +02:00
antil0pa
7a294c3843 Update remote_friends_common.tpl
Found an improperly closed <div> tag. It breaks the way widget are displayed on the page.
2018-05-24 11:50:35 +02:00
git-marijus
2599d78d0c Merge pull request #1185 from antil0pa/patch-1
Update remote_friends_common.tpl
2018-05-24 11:49:35 +02:00
Andrew Manning
fc6b337bbb Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-05-24 05:35:50 -04:00
fadelkon
ea17b46e94 Update catalan translation (both po and php) for sources changes up to Apr 23rd 2018, 07:35. 2018-05-24 03:59:01 +02:00
Mario Vavti
9cf8931136 paint the locks on private activitypub items red. their privacy model is "slightly" different from ours 2018-05-23 22:11:13 +02:00
zotlabs
afb29176a4 deal with db failure gracefully 2018-05-23 02:33:46 -07:00
antil0pa
1da0042ee5 Update remote_friends_common.tpl
Found an improperly closed <div> tag. It breaks the way widget are displayed on the page.
2018-05-22 16:24:04 +02:00
zotlabs
76d8e59e9b Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-21 21:15:24 -07:00
zotlabs
1061027071 new_channel - make text strings translatable and use the name as a base for the nick if you try to create without entering a nick 2018-05-21 20:17:17 -07:00
zotlabs
a403611ac9 update response types 2018-05-21 19:34:03 -07:00
zotlabs
2b3f931c85 oauth2 discovery per draft-ietf-oauth-discovery-10 2018-05-21 19:25:03 -07:00
zotlabs
9bf26cee6d add hook 'get_system_apps' 2018-05-21 16:19:17 -07:00
zotlabs
d9066ef26b not null violation oauth1 2018-05-21 13:37:55 -07:00
Mario Vavti
4610fa2774 address globbing issue in #1170 2018-05-21 20:01:45 +02:00
Mario Vavti
fff720c00d address globbing issue in #1170 2018-05-21 20:01:03 +02:00
Galette Saucisse
7e26200510 Update gdpr1.md 2018-05-21 10:25:03 +02:00
Galette Saucisse
1dbf89362f Update gdpr1.md 2018-05-21 10:22:19 +02:00
Galette Saucisse
cc1453a8de Update gdpr1.md 2018-05-21 10:16:39 +02:00
Galette Saucisse
a8def37dcf Create TermsOfService.md 2018-05-21 10:08:00 +02:00
Galette Saucisse
355a9ac7ee Create gdpr1.md 2018-05-21 10:05:17 +02:00
Mario Vavti
a8274bbfb3 missing permission description 2018-05-21 09:25:57 +02:00
Mario Vavti
7dadbbbac7 bring jot reset to some more places 2018-05-21 09:13:14 +02:00
zotlabs
49f7d63290 first cut at a general purpose gdpr document. What we would like to do is use a conditional expression so that a site document will be loaded if it exists, and fallback to a project boiler plate document if it does not. This is an exercise for the community. 2018-05-20 23:40:10 -07:00
zotlabs
0044906fab Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-20 20:19:11 -07:00
zotlabs
ac8706e919 pleroma does not return a valid JRD when given an accept header of application/jrd+json - it only returns a JRD when passed an accept header of application/json (ahead of anything else because XRD is served at the same endpoint) 2018-05-20 20:15:19 -07:00
Mario
5b48eb3657 update oauth related tables to use bigint/int(10) for user_id column. this is to be more consistent with the rest of the tables and fixes issue #1180 2018-05-20 22:55:13 +02:00
Mario Vavti
43f04e4bc0 improve abconfig queries 2018-05-20 22:55:01 +02:00
Mario Vavti
649260ce44 more local_channel() is not string 2018-05-20 22:54:49 +02:00
Mario Vavti
f091a3c9fc local_channel() is not string 2018-05-20 22:54:36 +02:00
Mario Vavti
18338495af do not update #acl-list-content on every click in jot. we just need this updated when in cutom mode (which is rarely the case). jot interaction was getting sluggish due to this when having lots of contacts. 2018-05-20 22:54:02 +02:00
Mario Vavti
a3f9cf7e97 update to fork-awesome 1.1 and fix an old font-awesome reference 2018-05-20 22:53:19 +02:00
Mario Vavti
ef0f195fe8 fix issue where images were not visible in acl selector after using search 2018-05-20 22:52:33 +02:00
Mario
469809183d update oauth related tables to use bigint/int(10) for user_id column. this is to be more consistent with the rest of the tables and fixes issue #1180 2018-05-20 22:42:47 +02:00
zotlabs
8611e7f8a6 remove unused mindate parameter in the network/stream API method 2018-05-20 13:29:48 -07:00
Mario Vavti
55e1026c98 improve abconfig queries 2018-05-20 20:48:52 +02:00
Mario Vavti
9e1af2492f more local_channel() is not string 2018-05-20 14:15:46 +02:00
Mario Vavti
4eb40528a9 local_channel() is not string 2018-05-20 14:07:30 +02:00
Mario Vavti
6ba77ce0e2 css fix 2018-05-20 13:47:05 +02:00
Mario Vavti
a256195767 remove preview on jot reset 2018-05-20 12:30:08 +02:00
git-marijus
23b53cd1ce Merge pull request #1178 from fadelkon/master
Update catalan translations
2018-05-20 11:44:59 +02:00
git-marijus
26d69796d0 Merge pull request #1176 from galettesaucisse/patch-48
Update hstrings.php
2018-05-20 11:43:22 +02:00
git-marijus
71307d3a2e Merge pull request #1175 from galettesaucisse/patch-47
Update hmessages.po
2018-05-20 11:43:06 +02:00
git-marijus
acb114d0d1 Merge pull request #1174 from anaqreon/dev
Rename Permission Groups to Permission Categories and clarify feature…
2018-05-20 11:42:13 +02:00
git-marijus
1781df006f Merge pull request #1171 from mjfriaza/dev
Added one space & Grammatical consistency error on Spanish translation
2018-05-20 11:41:44 +02:00
Mario Vavti
63f84ece6e backport waitmans changes #1170 from master 2018-05-20 11:39:59 +02:00
git-marijus
d0d14579d1 Merge pull request #1170 from waitman/master
shebang portable
2018-05-20 11:23:15 +02:00
Mario Vavti
b11db26edf do not update #acl-list-content on every click in jot. we just need this updated when in cutom mode (which is rarely the case). jot interaction was getting sluggish due to this when having lots of contacts. 2018-05-20 11:12:39 +02:00
Mario Vavti
6d7e364a0d remove some cruft from initEditor(); 2018-05-20 11:02:18 +02:00
Mario Vavti
7e99931733 implement jot reset button 2018-05-20 09:23:44 +02:00
fadelkon
8733d9f2a6 Update catalan translation (both po and php) for sources changes up to Apr 23rd 2018, 07:35. 2018-05-20 05:59:43 +02:00
fadelkon
29da06c298 Update view/ca/hstrings.php to match the version of view/ca/hmessages.po 2018-05-20 05:46:31 +02:00
Mario Vavti
7a1afc315d update to fork-awesome 1.1 and fix an old font-awesome reference 2018-05-19 22:01:10 +02:00
Mario Vavti
244e813bfa fix issue where images were not visible in acl selector after using search 2018-05-19 21:21:02 +02:00
Mario Vavti
0bc2a4f603 fix issues with attachment labels 2018-05-19 11:04:34 +02:00
Mario Vavti
6abbadf6c8 Merge remote-tracking branch 'mike/master' into dev 2018-05-19 10:20:14 +02:00
zotlabs
8b4af7cf0b hubzilla issue #1086, pending count on admin summary page 2018-05-19 00:54:47 -07:00
Mario Vavti
1ca6ef0f60 Merge remote-tracking branch 'mike/master' into dev 2018-05-19 08:45:41 +02:00
zotlabs
dae89ce91c wrong default param for pubstream_incl (this checkin also picked up a few minor and hopefully non-significant changes) 2018-05-18 16:57:45 -07:00
Mario Vavti
056f3d352c remove debug code 2018-05-18 21:32:18 +02:00
Mario Vavti
620e8f2f0b version 2018-05-18 21:30:58 +02:00
Mario Vavti
7f7e049397 an attempt to fix the new_channel validation situation 2018-05-18 21:30:07 +02:00
Andrew Manning
40d99c1716 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-05-18 13:07:24 -04:00
Galette Saucisse
2dd66df8eb Update hstrings.php 2018-05-18 16:05:30 +02:00
Galette Saucisse
eabf804dc9 Update hstrings.php 2018-05-17 16:09:42 +02:00
Galette Saucisse
b955c2d2c5 Update hmessages.po 2018-05-17 16:08:20 +02:00
Mario Vavti
5a6141faa2 display address in contact_format() instead of nick 2018-05-17 12:58:59 +02:00
zotlabs
da460ff32f anybody authenticated not correctly handled in can_comment_on_post() 2018-05-16 10:57:13 +02:00
Mario Vavti
12c571a187 missing include 2018-05-16 10:47:18 +02:00
Andrew Manning
179eeb10a6 Rename Permission Groups to Permission Categories and clarify feature settings text. 2018-05-15 19:57:40 -04:00
zotlabs
aac5fd96cc provide function to fetch photo contents from url 2018-05-15 16:51:04 -07:00
zotlabs
16930c1c54 anybody authenticated not correctly handled in can_comment_on_post() 2018-05-15 16:08:51 -07:00
Manuel Jiménez Friaza
76a2a5c432 Added spaces at PHP replacements & Grammatical consistency error on Spanish translation 2018-05-15 11:58:37 +02:00
Mario Vavti
de63e40a70 we must now provide the full path to the profile image for the cavatar plugin to work 2018-05-15 10:20:20 +02:00
zotlabs
803e85caeb make get_default_profile_photo() pluggable 2018-05-14 23:10:20 -07:00
zotlabs
062dea8e13 code whitespace and formatting 2018-05-14 22:10:21 -07:00
zotlabs
959667c009 If somebody used hooks to create a new permission role, there was no mechanism to insert the new role into the dropdown list of roles at selection time. 2018-05-14 20:23:00 -07:00
zotlabs
46152cc56b ensure all password checking goes through the authenticate plugin hook (for instance in mod_removeme) 2018-05-14 20:17:00 -07:00
zotlabs
c8fc3ad7cd refactor the 'where does the register link point?' logic 2018-05-14 19:19:25 -07:00
zotlabs
301e405769 fine tuning the refactored tag/mention code 2018-05-14 18:27:12 -07:00
zotlabs
229d82c4c7 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-14 17:23:19 -07:00
zotlabs
d9759ba63c more refactor tags/mentions 2018-05-14 17:20:25 -07:00
Mario Vavti
2d1dbc8f40 Revert "We're no longer setting a backup ACL for private mention typos."
This reverts commit 356c7003f2.
2018-05-14 09:10:36 +02:00
Mario Vavti
1b160c0a2d Merge remote-tracking branch 'mike/master' into dev 2018-05-14 09:04:40 +02:00
zotlabs
356c7003f2 We're no longer setting a backup ACL for private mention typos. 2018-05-13 15:50:42 -07:00
Mario Vavti
83f8a03964 bump version 2018-05-13 23:10:13 +02:00
Mario Vavti
7ed32a764c consolidate recent autocomplete changes 2018-05-13 23:09:30 +02:00
Mario Vavti
4f69bcfc38 streamline appearence of guest tokens individual perms with those in connedit 2018-05-13 14:29:09 +02:00
Manuel Jiménez Friaza
9a82b8414b Added one space & Grammatical consistency error on Spanish translation 2018-05-13 13:10:39 +02:00
Manuel Jiménez Friaza
0b05203cf4 Added one space & Grammatical consistency error on Spanish translation 2018-05-13 13:07:36 +02:00
Mario Vavti
4135a10211 Merge remote-tracking branch 'mike/master' into dev 2018-05-13 08:07:13 +02:00
zotlabs
7991db14be hubzilla issue #1045 - display pubsites link in info area if invite only 2018-05-12 16:41:09 -07:00
root
1509c9682b replace disable globbing switch 2018-05-12 10:23:45 -07:00
root
e7287152a2 replace disable globbing switch 2018-05-12 10:22:01 -07:00
root
082bd58805 replace disable globbing switch 2018-05-12 10:18:13 -07:00
root
e288f46967 shebang portable 2018-05-12 09:58:19 -07:00
Mario Vavti
efb0ac5996 fix php warning 2018-05-12 13:28:04 +02:00
Mario Vavti
984de8f46f fix postgres issue if register mode is set to yes - with approval 2018-05-12 12:46:38 +02:00
Mario Vavti
2c819c8619 fix postgres issue if register mode is set to yes - with approval 2018-05-12 12:46:09 +02:00
git-marijus
10ce6cc154 Merge pull request #1164 from einervonvielen/install_imagemagick
Install imagemagick. Instructions to avoid DNS check if it fails.
2018-05-11 13:03:28 +02:00
git-marijus
7c1d1f8bd3 Merge pull request #1168 from dawnbreak/dev
Fix composer.json
2018-05-11 13:02:37 +02:00
zotlabs
bcaa0dacdf use '[feed]' in the doc 2018-05-10 21:26:21 -07:00
zotlabs
5dae0ef4f9 add cancel button to editor, fix issue with autosave of categories 2018-05-10 20:54:48 -07:00
zotlabs
62bc5e8051 use Zlib/MessageFilter for sourced messages also 2018-05-10 19:31:51 -07:00
zotlabs
ef6e067a45 add top level posts containing the cid's url to the cid search in mod_network. We could alternatively search for mention tags here for a bit more precision but the sql could get pretty hairy with all the joins going on. 2018-05-10 18:42:58 -07:00
zotlabs
721496f922 hubzilla issue #1169 2018-05-10 17:11:03 -07:00
zotlabs
be225164eb allow either 2018-05-10 13:48:18 -07:00
zotlabs
1650ac2edd tag search not finding articles 2018-05-09 23:44:24 -07:00
zotlabs
bb1aa04689 change the embed from albums hovertip as well to emphasise 'existing' 2018-05-09 21:28:48 -07:00
zotlabs
67bb167cf8 Change hovertip on paperclip button to read 'Attach/Upload file' because a lot of people gravitate to 'insert photo from album' instead, looking for a way to upload into the post. 2018-05-09 21:22:25 -07:00
zotlabs
b4be1da91e thread_author_menu - add some more checks as to whether to show certain links. This should complete work on hubzilla issue #1052 2018-05-09 21:08:12 -07:00
zotlabs
d41556a1ea minor regression on date queries from channel page 2018-05-09 18:20:28 -07:00
zotlabs
50796079fa loose ends discovered while fixing hubzilla #1166 2018-05-09 17:09:38 -07:00
zotlabs
9acf007687 hubzilla issue #1166 2018-05-09 17:03:10 -07:00
Klaus Weidenbach
dafe0afa65 ⬆️ Update libraries.
Updating smarty/smarty (v3.1.31 => v3.1.32)
Updating sabre/vobject (4.1.5 => 4.1.6)
2018-05-09 21:07:25 +02:00
Klaus Weidenbach
30d0f9888c Fix composer.json for recent composer.
The old composer.json is not valid anymore. Make it work with current
composer binaries again.
2018-05-09 21:07:25 +02:00
zotlabs
2bd7d30a5b show/hide dot files only in mod_cloud. For DAV let the OS decide 2018-05-09 01:54:18 -07:00
zotlabs
cab22f228a hide dotfiles by default in /cloud - the web interface (they are still accessible but hidden). Change this behaviour with pconfig system.show_dot_files 2018-05-08 23:01:24 -07:00
zotlabs
0545baaf56 initial backend support for channel page item search 2018-05-08 20:12:49 -07:00
zotlabs
fbd26e8d9d changes made during testing imagick scaling for cover photo thumbnail 2018-05-08 16:50:16 -07:00
zotlabs
6ad4ed87a3 yet another postgres/"group by" issue 2018-05-08 11:48:26 +02:00
zotlabs
3c8de7b59d use imagemagick first stage thumbnail for cover photos, if configured 2018-05-07 23:57:17 -07:00
zotlabs
611e22d676 turn down logging from DAV basicauth until needed 2018-05-07 22:07:44 -07:00
zotlabs
0c43a9bb5d yet another postgres/"group by" issue 2018-05-07 19:33:58 -07:00
zotlabs
eb85d381fd Add supported protocols to siteinfo (not siteinfo.json) 2018-05-07 18:46:42 -07:00
zotlabs
aab16123b5 Simplify first channel creation even further by using a site-configurable default permissions role and removing one more conceptual roadblock for first time registrants. This default role only applies to the first channel an account creates and can be changed from the settings page once they've started to explore. This functionality was always present but optional and not well exposed. Now it is part of the standard workflow and exposed in the admin settings. 2018-05-07 17:31:53 -07:00
zotlabs
1f8b4b14a4 remove the old autocomplete cache mechanism 2018-05-06 20:35:57 -07:00
zotlabs
4640253614 autocomplete after 2 chars instead of 3; this was changed some months back to work around implementation quirks in the custom cache driver that is now disabled. 2018-05-06 20:30:49 -07:00
zotlabs
e646684493 pdf embeds 2018-05-06 19:57:37 -07:00
zotlabs
257dcaaf8b minor tweak to last pull: ensure that feeds have a name besides whitespace characters 2018-05-06 18:25:17 -07:00
zotlabs
a30934c563 ensure that feed xchans have a name 2018-05-06 18:23:39 -07:00
zotlabs
5e6f6e2c3e minor change to test something 2018-05-06 18:10:43 -07:00
zotlabs
620082c16b If one has system.network_page_default set to a different sort order use that order on the 'All Channels' selection of the Collections (privacy group) widget. 2018-05-06 16:55:07 -07:00
zotlabs
83c18f4d4a Back in the day there were good reasons for showing a permission denied photo instead of a null img. It distinguished a 403 from a 404 in an unmistakable way. What we've discovered is that nothing that is gained from this knowledge and it mostly just annoys and confuses people who can't really do anything about it except to express their annoyance/confusion. So just do a 403/404 instead. 2018-05-06 16:12:06 -07:00
zotlabs
b2218574ee allow uninstall of plugins which no longer exists via cmdline tool 2018-05-05 16:19:23 -07:00
Einer von Vielen
1b959a4731 Corrected description for getting a domain. 2018-05-05 21:08:15 +02:00
Einer von Vielen
8ee4a54c10 Corrected description for getting a domain. 2018-05-05 21:01:26 +02:00
Einer von Vielen
acb0604a71 Instructions for imagemagick and failed DNS check. Some minor corrections. 2018-05-05 20:50:06 +02:00
Einer von Vielen
26a7c88ddf Install imagemagick 2018-05-05 20:46:41 +02:00
zotlabs
70a0a83363 more updates and clarifications re: tag/mention documentation 2018-05-05 02:56:57 -07:00
zotlabs
894f5bc79a Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-05 02:24:37 -07:00
zotlabs
b47b917eb0 check_item_source: always log uid 2018-05-05 01:52:35 -07:00
zotlabs
c41c04cf11 log all possible return conditions from check_item_source(), use consistent xchan 2018-05-05 01:43:14 -07:00
Mario Vavti
0895756658 Merge remote-tracking branch 'mike/master' into dev 2018-05-05 10:03:57 +02:00
zotlabs
c6e65ec6da support '@' paths 2018-05-05 00:39:53 -07:00
Mario Vavti
192b69b11a update nginx conf to address issue #1155 2018-05-05 08:38:20 +02:00
Mario Vavti
733a5ccb08 use cursor-pointer class instead of fakelink to avoid the link color for the dropdown caret 2018-05-05 07:32:35 +02:00
Mario Vavti
b0ca73c1ba Merge remote-tracking branch 'mike/master' into dev 2018-05-05 07:22:31 +02:00
zotlabs
367937e479 removed the fakelink attribute as it changed the colour of the down arrow. We probably do want to change the hover cursor but not the colour. 2018-05-04 15:20:07 -07:00
zotlabs
6e91d85bcb If somebody precisely clicks the down-arrow on the author photo it should probably also trigger the dropdown 2018-05-04 15:17:15 -07:00
Mario Vavti
f995ef0124 set XML_OPTION_SKIP_WHITE to 1 again 2018-05-04 22:46:43 +02:00
zotlabs
4a26f0d2d4 turn skip white back on - (xml actually doesn't parse if you disable this) 2018-05-04 13:44:34 -07:00
Mario Vavti
90cf238019 fix too big buttons in wiki list 2018-05-04 22:13:45 +02:00
Mario Vavti
97cb108937 missing permission description 2018-05-04 22:03:51 +02:00
Mario Vavti
34f6d9f714 missing basetag 2018-05-04 13:54:12 +02:00
Mario Vavti
76e644e18a bump version 2018-05-04 12:00:59 +02:00
Mario Vavti
a0cefe7fdb Merge remote-tracking branch 'mike/master' into dev 2018-05-04 11:59:46 +02:00
Mario Vavti
be4c9a9598 Merge branch '3.4RC' 2018-05-04 09:46:27 +02:00
Mario Vavti
be852ba857 release version 3.4 2018-05-04 09:45:14 +02:00
Mario Vavti
3370e8516f switch DIRECTORY_FALLBACK_MASTER to https://zotadel.net 2018-05-04 09:43:01 +02:00
Mario Vavti
998dd58206 switch DIRECTORY_FALLBACK_MASTER to https://zotadel.net 2018-05-04 09:37:22 +02:00
Mario Vavti
108cc7b270 update changelog 2018-05-04 09:35:22 +02:00
Mario Vavti
ace8252569 update changelog 2018-05-04 09:34:44 +02:00
zotlabs
56113b0bde check for directories 2018-05-03 23:20:09 -07:00
zotlabs
b52e9731e3 tagging changes: + (old style forum mentions), and underscore space replacement are no longer supported. 2018-05-03 20:14:58 -07:00
zotlabs
61a8a16139 add changes from ae35ac0cec to contact_autocomplete so channel source completion will work correctly 2018-05-03 17:37:16 -07:00
zotlabs
eff72aeb47 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-03 17:18:36 -07:00
Mario Vavti
94316da63e RC5 2018-05-03 13:38:54 +02:00
Mario Vavti
ae35ac0cec quick fix for issue #1150 - needs improvement and review of other textcomplete implementations. 2018-05-03 13:14:12 +02:00
Mario Vavti
2f9a044559 Revert "hubzilla issue #1151 - activitypub mention gets bookmarked"
This reverts commit 285781b887.
2018-05-03 12:34:51 +02:00
zotlabs
1f429a0033 hubzilla issue #1151 - activitypub mention gets bookmarked 2018-05-03 12:34:35 +02:00
zotlabs
a3ed0b94cd make the cloud logging a bit less verbose until we actually need it. 2018-05-03 12:33:48 +02:00
Mario Vavti
204838bd10 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-05-03 12:29:57 +02:00
Mario Vavti
dd806bd031 update composer autoload cache 2018-05-03 12:27:39 +02:00
git-marijus
8442693d7a Merge pull request #1152 from dawnbreak/dev
Update composer autoload cache.
2018-05-03 12:17:09 +02:00
Mario Vavti
cd526139fb Merge remote-tracking branch 'mike/master' into dev 2018-05-03 09:44:53 +02:00
zotlabs
75c8f656c9 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-05-02 23:18:09 -07:00
zotlabs
459ec78a5e provide easy access to the autoperms setting for forum and repository channels. This may be needed in the future to protect an existing forum from assault by spammers with changing identities. The forum can quickly be turned into membership by approval and either left that way permanently or hopefully reversed at a later date. Previously this would require switching to expert mode or setting a pconfig manually. 2018-05-02 22:59:21 -07:00
zotlabs
6bf5eea646 make the cloud logging a bit less verbose until we actually need it. 2018-05-02 22:05:55 -07:00
zotlabs
e9f49d9d9c admin delete of files 2018-05-02 20:08:59 -07:00
zotlabs
9713436f49 backend work to allow admin to delete photos. Still requires frontend work to give admin access to either the photos and/or the delete link. 2018-05-02 18:23:42 -07:00
zotlabs
406ea67bbc Provide admin delete ability if the viewer is admin but has no existing delete authority. For 3.5+ as a new string is involved. 2018-05-02 17:39:12 -07:00
Klaus Weidenbach
a24d254404 Update composer autoload cache.
Should add to Prepare RC Release documentation:
composer dump-autoload --no-dev
2018-05-02 23:24:48 +02:00
zotlabs
285781b887 hubzilla issue #1151 - activitypub mention gets bookmarked 2018-05-02 13:49:22 -07:00
Mario Vavti
40db68886d RC4 2018-05-02 10:11:05 +02:00
Galette Saucisse
d5088549f8 Create /doc/context/fr/wiki/help.html 2018-05-02 09:49:02 +02:00
Galette Saucisse
03851ee7cc Create /doc/context/fr/webpages/help.html 2018-05-02 09:48:40 +02:00
Galette Saucisse
2d460117fc Create /doc/context/fr/settings/tokens 2018-05-02 09:48:30 +02:00
Galette Saucisse
73cabbf822 Create /doc/context/fr/settings/channel/help.html 2018-05-02 09:48:19 +02:00
Galette Saucisse
411b7964ab Create /doc/context/fr/settings/account/help.html 2018-05-02 09:48:09 +02:00
Galette Saucisse
bc45c5368e Create /doc/context/fr/profile/help.html 2018-05-02 09:47:50 +02:00
Galette Saucisse
7a65b6cfe4 Create /doc/context/photos/help.html 2018-05-02 09:47:39 +02:00
Galette Saucisse
ee464c6589 Create /doc/context/fr/mail/help.html 2018-05-02 09:47:30 +02:00
git-marijus
d83f12e883 Merge pull request #1146 from galettesaucisse/patch-46
Create /doc/context/fr/wiki/help.html
2018-05-02 09:46:24 +02:00
git-marijus
76770c69bf Merge pull request #1145 from galettesaucisse/patch-45
Create /doc/context/fr/webpages/help.html
2018-05-02 09:45:31 +02:00
git-marijus
e9225b15d2 Merge pull request #1144 from galettesaucisse/patch-44
Create /doc/context/fr/settings/tokens
2018-05-02 09:44:49 +02:00
git-marijus
3056b96bb0 Merge pull request #1143 from galettesaucisse/patch-43
Create /doc/context/fr/settings/channel/help.html
2018-05-02 09:44:36 +02:00
git-marijus
856945d838 Merge pull request #1142 from galettesaucisse/patch-42
Create /doc/context/fr/settings/account/help.html
2018-05-02 09:44:10 +02:00
git-marijus
be1c05a03f Merge pull request #1141 from galettesaucisse/patch-40
Create /doc/context/fr/profile/help.html
2018-05-02 09:43:37 +02:00
git-marijus
34717cc83c Merge pull request #1140 from galettesaucisse/patch-39
Create /doc/context/photos/help.html
2018-05-02 09:42:49 +02:00
git-marijus
e73cde1612 Merge pull request #1139 from galettesaucisse/patch-38
Create /doc/context/fr/mail/help.html
2018-05-02 09:42:14 +02:00
zotlabs
a9b71f5b4a The channel import page seems to have missed the big theme cleanup of the last couple of years. 2018-05-02 09:30:45 +02:00
zotlabs
c99fb4b7f1 provide warnings about profile photo and cover photo permissions 2018-05-02 09:30:33 +02:00
zotlabs
b28279241b hubzilla issue #1149, don't duplicate addressbook entries on repeated channel imports 2018-05-02 09:30:23 +02:00
Mario Vavti
5c5ae2969e Revert "Revert "hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array.""
This reverts commit b223e364c6.
2018-05-02 09:30:05 +02:00
zotlabs
3af691043d parent folder permissions weren't being checked back to the cloud root directory in all cases 2018-05-02 09:29:52 +02:00
Mario Vavti
9615d02b35 Merge remote-tracking branch 'mike/master' into dev 2018-05-02 09:22:23 +02:00
zotlabs
7a55ead97d new feature (post 3.4): allow a different username to be used when importing. 2018-05-01 20:29:07 -07:00
zotlabs
cd200ee706 The channel import page seems to have missed the big theme cleanup of the last couple of years. 2018-05-01 19:38:32 -07:00
zotlabs
db930b794d provide warnings about profile photo and cover photo permissions 2018-05-01 16:54:54 -07:00
zotlabs
08bcd29eee hubzilla issue #1149, don't duplicate addressbook entries on repeated channel imports 2018-05-01 16:15:59 -07:00
Mario Vavti
3f75dd1083 Revert "Revert "hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array.""
This reverts commit b223e364c6.
2018-05-01 10:34:23 +02:00
Mario Vavti
eb2d6fca3a Merge remote-tracking branch 'mike/master' into dev 2018-05-01 10:19:03 +02:00
zotlabs
32423a7706 parent folder permissions weren't being checked back to the cloud root directory in all cases 2018-04-30 22:30:59 -07:00
Galette Saucisse
57cb4ccb74 Create /doc/context/fr/wiki/help.html 2018-04-30 14:36:19 +02:00
Mario Vavti
12c9e64463 activitypub xchans do not have an xchan_addr. use xchan_url for the follow button if we do not find an xchan_addr 2018-04-30 14:34:25 +02:00
Mario Vavti
d872a0ca86 activitypub xchans do not have an xchan_addr. use xchan_url for the follow button if we do not find an xchan_addr 2018-04-30 14:33:35 +02:00
Galette Saucisse
9c5ddf079a Create /doc/context/fr/webpages/help.html 2018-04-30 14:27:05 +02:00
Galette Saucisse
f094ac19d1 Create /doc/context/fr/settings/tokens 2018-04-30 14:16:02 +02:00
Galette Saucisse
7f244a8039 Create /doc/context/fr/settings/channel/help.html 2018-04-30 14:04:38 +02:00
Galette Saucisse
14953fa5c9 Create /doc/context/fr/settings/account/help.html 2018-04-30 14:02:26 +02:00
Galette Saucisse
75f73fffe1 Create /doc/context/fr/profile/help.html 2018-04-30 12:35:46 +02:00
Galette Saucisse
897dd7f380 Create /doc/context/photos/help.html 2018-04-30 12:30:55 +02:00
Galette Saucisse
95f1366f0c Create /doc/context/fr/mail/help.html 2018-04-30 12:22:42 +02:00
Mario
feb5d3af89 fix another pgsql update error 2018-04-30 11:52:04 +02:00
Mario
875597cde1 fix another pgsql update error 2018-04-30 11:51:14 +02:00
Mario
f15c12376a Merge branch 'master' of https://github.com/redmatrix/hubzilla 2018-04-30 11:34:10 +02:00
Mario Vavti
b223e364c6 Revert "hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array."
This reverts commit f620274c6a.
2018-04-30 10:28:32 +02:00
Mario Vavti
e1738e8021 Revert "hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array."
This reverts commit f620274c6a.
2018-04-30 10:27:11 +02:00
Galette Saucisse
a33dfff188 Create /doc/context/fr/events/help.html 2018-04-30 09:59:22 +02:00
git-marijus
0c27fdd944 Merge pull request #1138 from galettesaucisse/patch-37
Create /doc/context/fr/events/help.html
2018-04-30 09:58:35 +02:00
Galette Saucisse
f897cd6bc8 Create /doc/context/fr/connedit/help.html 2018-04-30 09:58:10 +02:00
git-marijus
1bc9672ec8 Merge pull request #1137 from galettesaucisse/patch-36
Create /doc/context/fr/connedit/help.html
2018-04-30 09:57:41 +02:00
Galette Saucisse
dfce7c6ca4 Create /doc/context/fr/connections/ifpending/help.html 2018-04-30 09:56:34 +02:00
git-marijus
6e61e2a45b Merge pull request #1136 from galettesaucisse/patch-35
Create /doc/context/fr/connections/ifpending/help.html
2018-04-30 09:56:12 +02:00
Galette Saucisse
eabed9d0e5 Create /doc/context/fr/connections/help.html 2018-04-30 09:55:45 +02:00
git-marijus
2af61605f2 Merge pull request #1135 from galettesaucisse/patch-34
Create /doc/context/fr/connections/help.html
2018-04-30 09:55:33 +02:00
Galette Saucisse
0992822ce5 Create /doc/context/fr/cloud/help.html 2018-04-30 09:54:57 +02:00
git-marijus
f08777c9ac Merge pull request #1134 from galettesaucisse/patch-33
Create /doc/context/fr/cloud/help.html
2018-04-30 09:54:40 +02:00
HappyPony
472ed909cd Russian translation for cards 2018-04-30 09:54:01 +02:00
git-marijus
3ed19f5b00 Merge pull request #1133 from HappyPony/patch-1
Russian translation for cards
2018-04-30 09:53:49 +02:00
Galette Saucisse
a60b91b21e Create /doc/context/fr/chat/help.html 2018-04-30 09:53:17 +02:00
git-marijus
40dd8aa3d4 Merge pull request #1127 from galettesaucisse/patch-26
Create /doc/context/fr/chat/help.html
2018-04-30 09:53:04 +02:00
Galette Saucisse
02459ebde0 Create /doc/context/fr/cards/help.html 2018-04-30 09:52:47 +02:00
git-marijus
774dc871cc Merge pull request #1126 from galettesaucisse/patch-25
Create /doc/context/fr/cards/help.html
2018-04-30 09:52:32 +02:00
Galette Saucisse
7bb69e20f5 Create /doc/context/fr/apps/edit/help.html 2018-04-30 09:51:43 +02:00
git-marijus
6e0be570dd Merge pull request #1125 from galettesaucisse/patch-24
Create /doc/context/fr/apps/edit/help.html
2018-04-30 09:51:24 +02:00
Galette Saucisse
5dd291fc60 Create /doc/context/fr/appman/help.html 2018-04-30 09:50:49 +02:00
Galette Saucisse
630ccf3810 Create /doc/context/fr/appman/help.html 2018-04-30 09:50:47 +02:00
git-marijus
8d16092171 Merge pull request #1124 from galettesaucisse/patch-23
Create /doc/context/fr/appman/help.html
2018-04-30 09:49:18 +02:00
Galette Saucisse
05c137c1ab Create /doc/context/fr/apps/help.html 2018-04-30 09:48:31 +02:00
git-marijus
83e0442b66 Merge pull request #1123 from galettesaucisse/patch-22
Create /doc/context/fr/apps/help.html
2018-04-30 09:48:13 +02:00
Galette Saucisse
98cfad5f2d Create /doc/context/fr/events/help.html 2018-04-30 09:19:30 +02:00
Mario Vavti
a48e795f8a missing class 2018-04-30 09:14:57 +02:00
zotlabs
f620274c6a hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array. 2018-04-30 09:14:46 +02:00
zotlabs
ae5b3a83f1 Update issues on postgres 2018-04-30 09:14:32 +02:00
zotlabs
5e23640563 remove unused function 2018-04-30 09:14:22 +02:00
Mario Vavti
7d3dfc3ed8 missing class 2018-04-30 09:13:26 +02:00
Galette Saucisse
5b0991fabc Create /doc/context/fr/connedit/help.html 2018-04-30 09:11:27 +02:00
Mario Vavti
0fa638399f Merge remote-tracking branch 'mike/master' into dev 2018-04-30 09:08:09 +02:00
Galette Saucisse
d59c6aa887 Create /doc/context/fr/connections/ifpending/help.html 2018-04-30 09:00:25 +02:00
Galette Saucisse
b6ec8bf687 Create /doc/context/fr/connections/help.html 2018-04-30 08:56:53 +02:00
Galette Saucisse
f28d6ad59e Create /doc/context/fr/cloud/help.html 2018-04-30 08:46:55 +02:00
zotlabs
e841e48258 hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array. 2018-04-29 23:05:38 -07:00
HappyPony
c0141a7d5e Russian translation for cards 2018-04-30 06:12:35 +02:00
zotlabs
aa15867c95 Update issues on postgres 2018-04-29 17:50:35 -07:00
Galette Saucisse
8d87b529f5 Create /doc/context/fr/appman/help.html 2018-04-29 20:37:28 +02:00
Galette Saucisse
900663b85f Create /doc/context/fr/chat/help.html 2018-04-29 15:37:19 +02:00
Galette Saucisse
1e79107d0e Create /doc/context/fr/cards/help.html 2018-04-29 15:21:30 +02:00
Galette Saucisse
52803a30b6 Create /doc/context/fr/apps/edit/help.html 2018-04-29 15:09:14 +02:00
Galette Saucisse
eb30658c68 Create /doc/context/fr/appman/help.html 2018-04-29 15:05:41 +02:00
Galette Saucisse
f77aaf1def Create /doc/context/fr/apps/help.html 2018-04-29 14:57:16 +02:00
zotlabs
8c7bf6d2f3 remove unused function 2018-04-28 14:13:56 -07:00
zotlabs
94df121e0a sql error 2018-04-27 14:27:10 +02:00
Mario Vavti
873670594b Merge remote-tracking branch 'mike/master' into dev 2018-04-27 14:24:54 +02:00
zotlabs
09ef1b1bb6 sql error 2018-04-27 02:34:52 -07:00
Mario Vavti
31e9efdae0 RC3 2018-04-27 10:14:04 +02:00
phellmes
bb2103ac45 Update DE translation strings
German strings for development branch and release candidate 3.4
2018-04-27 10:07:25 +02:00
git-marijus
e98c74bce7 Merge pull request #1120 from phellmes/dev
Update DE translation strings
2018-04-27 10:07:06 +02:00
Galette Saucisse
feb03dc194 Update FR toc.html 2018-04-27 10:06:46 +02:00
git-marijus
bb8f73b58a Merge pull request #1117 from galettesaucisse/patch-19
Update FR toc.html
2018-04-27 10:06:11 +02:00
Galette Saucisse
02da3adb5a Delete FR project.bb from wrong folder
apologies
2018-04-27 10:05:54 +02:00
git-marijus
28d1913d84 Merge pull request #1116 from galettesaucisse/patch-18
Delete FR project.bb from wrong folder
2018-04-27 10:04:20 +02:00
Galette Saucisse
051ab698ed Update project.bb 2018-04-27 10:04:00 +02:00
Galette Saucisse
9014524477 Update project.bb and place in correct folder
FR toc.html needs editing
2018-04-27 10:03:55 +02:00
git-marijus
316f68c12d Merge pull request #1115 from galettesaucisse/patch-17
Update project.bb and place in correct folder
2018-04-27 10:01:26 +02:00
mjfriaza
9387be1aa7 New strings: Spanish translation 2018-04-27 10:00:50 +02:00
git-marijus
c3ca257f18 Merge pull request #1113 from mjfriaza/dev
New strings: Spanish translation
2018-04-27 09:59:35 +02:00
zotlabs
d0ba2cf6d4 where possible strip zid parameter from links that get pasted into posts so that they will get a correct zid when rendered 2018-04-27 09:58:17 +02:00
zotlabs
e33d8c288b more testing of attach_move() uncovered some issues 2018-04-27 09:58:07 +02:00
zotlabs
34fbcfdfaa set the 'force' flag on attach_mkdir when initiated from a DAV operation. This will report success if it already exists rather than throwing an exception. 2018-04-27 09:57:57 +02:00
Mario Vavti
2e9738e204 Merge remote-tracking branch 'mike/master' into dev 2018-04-27 09:54:36 +02:00
zotlabs
9a7e8f4d68 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-26 20:31:16 -07:00
zotlabs
7b445a5b39 where possible strip zid parameter from links that get pasted into posts so that they will get a correct zid when rendered 2018-04-26 20:27:14 -07:00
zotlabs
ce13fef6aa more testing of attach_move() uncovered some issues 2018-04-26 19:21:08 -07:00
zotlabs
38e99c8354 set the 'force' flag on attach_mkdir when initiated from a DAV operation. This will report success if it already exists rather than throwing an exception. 2018-04-26 17:25:58 -07:00
Mario Vavti
a85b1efa4f minor fixes for dark schema 2018-04-26 22:46:01 +02:00
Mario Vavti
00a95f4b91 minor fixes for dark schema 2018-04-26 22:44:40 +02:00
phellmes
433951ab55 Update DE translation strings
German strings for development branch and release candidate 3.4
2018-04-26 20:58:15 +02:00
Mario Vavti
baa46e105c if there is more than one textarea we need to work through all of them 2018-04-26 20:08:03 +02:00
Mario Vavti
4e389b474a version 2018-04-26 15:41:54 +02:00
Mario Vavti
63c76eae0c a better way to deal with js errors in autocomplete plugins if the object is not available 2018-04-26 15:40:59 +02:00
Mario Vavti
9431785466 omit js error if saved searsches are turned off 2018-04-26 14:53:24 +02:00
Mario Vavti
953391cca9 Merge remote-tracking branch 'mike/master' into dev 2018-04-26 14:22:04 +02:00
Mario Vavti
8e0fc9e762 fix the on select handlers 2018-04-26 13:58:37 +02:00
Mario Vavti
fe4defe752 upgrade to textcomplete (jquery.textcomplete is discontinued), enable built-in cache and unify to start lookup after 3 characters 2018-04-26 12:38:25 +02:00
zotlabs
f32ba06564 work through a few more autocomplete minor nits 2018-04-26 02:42:48 -07:00
zotlabs
a5a6488757 don't load jot autosave content into other document types or edits of other items, but do save these edits in case you need to recover them 2018-04-26 09:58:56 +02:00
zotlabs
b8aabde6c3 malformed embeds from gfycat hubzilla issue #1108 2018-04-26 09:42:54 +02:00
zotlabs
44d4f0a484 generating random numbers too large for 32-bit systems 2018-04-26 09:41:26 +02:00
Mario Vavti
09666ae8e9 Merge remote-tracking branch 'mike/master' into dev 2018-04-26 09:05:47 +02:00
zotlabs
4a60f45220 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-25 23:11:23 -07:00
zotlabs
7b9946079f function doc update 2018-04-25 23:10:08 -07:00
zotlabs
fe724acc3b mod_network: privacy group query returning results when group is empty. Notification that the group is empty was also displayed twice. 2018-04-25 22:53:20 -07:00
zotlabs
4409b2b40a don't load jot autosave content into other document types or edits of other items, but do save these edits in case you need to recover them 2018-04-25 21:32:34 -07:00
zotlabs
33f446fcd0 malformed embeds from gfycat hubzilla issue #1108 2018-04-25 20:47:30 -07:00
Mike Macgirvin
953d02e4b7 Update CHANGELOG
more than oauth2
2018-04-26 13:21:14 +10:00
Mike Macgirvin
a124c120f4 Update CHANGELOG
more than oauth2
2018-04-26 13:20:24 +10:00
zotlabs
5f8b093d79 fine tuning 2018-04-25 18:51:30 -07:00
zotlabs
f923d21df3 some tagging work 2018-04-25 18:41:19 -07:00
zotlabs
5a9e9284c2 generating random numbers too large for 32-bit systems 2018-04-25 14:10:11 -07:00
Galette Saucisse
c7c04aba3d Update project.bb 2018-04-25 18:42:46 +02:00
Galette Saucisse
33503349ec Update FR toc.html 2018-04-25 18:12:51 +02:00
Galette Saucisse
ef3994da30 Delete FR project.bb from wrong folder
apologies
2018-04-25 18:11:10 +02:00
Galette Saucisse
2e758f11e7 Update project.bb and place in correct folder
FR toc.html needs editing
2018-04-25 18:08:55 +02:00
Mario Vavti
7283e2e279 bump version 2018-04-25 14:18:17 +02:00
Mario Vavti
352dd364d2 drop box-shadow from generic-content-wrapper (it's probably too 90') and use transparent colors for borders to work better with alternate background colors 2018-04-25 14:17:53 +02:00
Mario Vavti
d5c3363909 bump version 2018-04-25 14:16:47 +02:00
Mario Vavti
2ede8e3675 drop box-shadow from generic-content-wrapper (it's probably too 90') and use transparent colors for borders to work better with alternate background colors 2018-04-25 14:11:41 +02:00
Mario Vavti
fe318d4eb8 changelog 2018-04-25 12:48:53 +02:00
Mario Vavti
c0bf3c8af1 changelog 2018-04-25 12:48:08 +02:00
mjfriaza
175a3c4008 New strings: Spanish translation 2018-04-25 12:46:50 +02:00
Mario Vavti
e9f3095f41 Merge remote-tracking branch 'mike/master' into dev 2018-04-25 11:54:13 +02:00
Mario Vavti
ebf540ffbc rename boxy schema to focus-boxy and bs-default to focus-light 2018-04-25 11:36:22 +02:00
Mario Vavti
4f1031f92b mark simple_* schemas unmaintained and deprecated 2018-04-25 11:36:10 +02:00
Mario Vavti
ddb9db188b rename boxy schema to focus-boxy and bs-default to focus-light 2018-04-25 11:31:10 +02:00
zotlabs
63e8f1f36b undo_post_tagging - don't waste a connection query if we're undoing a hashtag and not a mention. 2018-04-25 02:26:37 -07:00
Mario Vavti
a3f77409a4 mark simple_* schemas unmaintained and deprecated 2018-04-25 11:14:45 +02:00
Mario Vavti
705ff97892 more css fixes for bs-default schema 2018-04-25 11:02:52 +02:00
Mario Vavti
1bb2d0b954 more css fixes for bs-default schema 2018-04-25 11:02:14 +02:00
Mario Vavti
0773b9bf92 css fixes for bs-default schema 2018-04-25 10:58:38 +02:00
Mario Vavti
da775d182a css fixes for bs-default schema 2018-04-25 10:58:08 +02:00
Galette Saucisse
0f836c9d5e Create /doc/fr/project.bb 2018-04-25 10:34:16 +02:00
git-marijus
e77914fe3f Merge pull request #1112 from galettesaucisse/patch-16
Create /doc/fr/project.bb
2018-04-25 10:33:05 +02:00
Mario Vavti
ed785fbb1b Merge remote-tracking branch 'mike/master' into dev 2018-04-25 09:57:28 +02:00
Mario Vavti
25f34d8ad3 show caret-down on item-photo hover to indicate a dropdown menu 2018-04-25 09:56:53 +02:00
Mario Vavti
0a51ea1bfa show caret-down on item-photo hover to indicate a dropdown menu 2018-04-25 09:56:21 +02:00
Galette Saucisse
9ffad65b65 Create /doc/fr/project.bb 2018-04-25 09:40:40 +02:00
zotlabs
8face5a66c make tag autocomplete less scary looking in the editor. If this works out we can simplify and get rid of a huge amount of spaghetti tag logic. 2018-04-24 15:32:24 -07:00
Mario Vavti
edd91a7ed1 changelog 2018-04-24 22:30:52 +02:00
Mario Vavti
c5b32032a7 changelog 2018-04-24 22:30:17 +02:00
Mario Vavti
4bb93c4327 fix regression with forum widget unseen count 2018-04-24 17:11:29 +02:00
Mario Vavti
e11e99b2d1 fix regression with forum widget unseen count 2018-04-24 17:09:51 +02:00
Mario Vavti
2dce7c212f fix php warnings 2018-04-24 15:42:20 +02:00
Mario Vavti
2ea87b65ca fix php warnings 2018-04-24 15:41:35 +02:00
zotlabs
a6c42e8756 added variable to store the raw json string as received, since this is signed and we may need to forward the signed data. 2018-04-23 21:55:16 -07:00
zotlabs
b688dc3995 minor tweak to utf8 usernames after some testing of the underlying encode/decode funations. This probably isn't critical and I do not have a failure case but just trying to cover all bases. 2018-04-23 19:10:35 -07:00
zotlabs
59ac3d04eb Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-23 18:15:18 -07:00
zotlabs
97308ad2fb provide a short term compatibility mapping between social_party and social_federation 2018-04-23 16:05:55 -07:00
Mario Vavti
2dff10564c possible fix for issue #1101 2018-04-23 21:13:09 +02:00
Mario Vavti
d401e5e7c4 possible fix for issue #1101 2018-04-23 21:12:31 +02:00
Mario Vavti
67ce5f4c9c version 3.4RC1 2018-04-23 12:05:06 +02:00
Mario Vavti
5bd1ea0b95 Merge branch 'dev' into 3.4RC 2018-04-23 11:52:32 +02:00
Mario Vavti
9ac67b44e4 strings update 2018-04-23 11:37:39 +02:00
Mario Vavti
bc4a1ee500 reverse f325c29b48 - this needs discussion. there is a link to source in the item menu. we might consider linking the timestamp to the source item (like some of the federated networks do) but then remove it from the item dropdown (having things double proved to confuse people). imo the link in the dropdown menu should be sufficient though. 2018-04-23 11:24:13 +02:00
git-marijus
78816f2f74 Merge pull request #1094 from mrjive/dev
Adding link to post source
2018-04-23 11:11:16 +02:00
Mario Vavti
fedb5fbcf5 update zot.php to fix php warning invalid argument supplied for foreach()
- this is taken from pr #1085 which was against wrong branch
2018-04-23 10:47:35 +02:00
Mario Vavti
bb61e672b0 Proposed fix for issue #1091 - mod-help.css
- this is taken from pr #1098 which was against wrong branch
2018-04-23 10:39:46 +02:00
git-marijus
de6f07ec89 Merge pull request #1097 from galettesaucisse/patch-13
Proposed fix for issue #1091 - mod-help.js
2018-04-23 10:28:50 +02:00
git-marijus
d0dc8c1e4c Merge pull request #1093 from mjfriaza/dev
Updated Spanish translation
2018-04-23 10:28:09 +02:00
git-marijus
5ec2e28802 Merge pull request #1090 from galettesaucisse/patch-12
Create /doc/fr/toc.html
2018-04-23 10:27:50 +02:00
git-marijus
391020fd1b Merge pull request #1089 from galettesaucisse/patch-11
delete /doc/fr/about.bb
2018-04-23 10:27:31 +02:00
git-marijus
e46874149d Merge pull request #1088 from galettesaucisse/patch-10
create new file /doc/fr/about/about.bb
2018-04-23 10:27:04 +02:00
git-marijus
7f49f6a45c Merge pull request #1084 from galettesaucisse/patch-9
Update French hmessages.po from Transifex
2018-04-23 10:26:42 +02:00
git-marijus
901b0ac146 Merge pull request #1083 from galettesaucisse/patch-8
Update French hstrings.php from Transifex
2018-04-23 10:26:12 +02:00
Mario Vavti
28bc4089d0 fix permission role test 2018-04-23 10:03:39 +02:00
Mario Vavti
2bca612a92 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-04-23 09:49:47 +02:00
zotlabs
66d72d9870 as_fetch depends on the pubcrawl plugin, but is referenced in core. Ensure that it doesn't chuck a wobbly if the function isn't found. This is undergoing significant revision for zot6 so this action is considered a short-term workaround until that work work stabilises. 2018-04-22 22:10:15 -07:00
zotlabs
11624cd83e owa: attempt channel discovery if not found 2018-04-22 19:24:15 -07:00
zotlabs
55b7182136 use consistent naming for 'Channel role and privacy' 2018-04-22 18:48:48 -07:00
zotlabs
55dc6fbc1c imagemagick preserves exif when scaling. GD does not. We do not want to preserve exif on thumbnails which we have rotated, as a browser reading the exif information could rotate them yet again. This checkin adds an abstract function to the generic photo driver which makes the behaviour consistent by stripping EXIF from imagick processed images. However, we will attempt to preserve any ICC colour profiles. See http://php.net/manual/en/imagick.stripimage.php 2018-04-22 18:12:16 -07:00
Jeroen
c446ffb814 back to only nickname 2018-04-22 20:16:04 +02:00
Jeroen
689ced2ac0 back to only nickname 2018-04-22 20:15:14 +02:00
mrjive
51c533536f Merge pull request #10 from redmatrix/dev
Dev
2018-04-22 10:54:41 +02:00
Mike Macgirvin
2431631b46 Update PermissionLimits.php
anon comment permissions fix
2018-04-22 07:00:01 +10:00
Mike Macgirvin
e189f5f887 Update PermissionLimits.php
Difficult for me to do this locally at the moment so updating in git
2018-04-22 06:58:33 +10:00
Mike Macgirvin
5a736d338b Merge pull request #1099 from zotlabs/dev
This is important
2018-04-21 19:09:27 +10:00
zotlabs
95059f2bfd fix permissionlimitstest after recent changes 2018-04-21 00:37:04 -07:00
zotlabs
1bb67f63e3 anonymous comments shouldn't be allowed in StdLimits 2018-04-20 18:58:21 -07:00
zotlabs
b12d254427 fix any misconfigured channel permission limits 2018-04-20 18:58:21 -07:00
zotlabs
af909f66a7 fix any misconfigured channel permission limits 2018-04-20 15:03:16 -07:00
zotlabs
e05f41630b anonymous comments shouldn't be allowed in StdLimits 2018-04-20 14:38:15 -07:00
Galette Saucisse
ba8f8c3403 Proposed fix for issue #1091 2018-04-20 19:17:52 +02:00
mrjive
84e2bdcf76 updated Italian translation 2018-04-20 06:25:40 -07:00
Manuel Jiménez Friaza
a211c16b73 Updated Spanish translation 2018-04-20 11:36:13 +02:00
mrjive
f325c29b48 adding link to post source 2018-04-20 02:29:57 -07:00
zotlabs
d5c451c4a8 This fix needs to go deeper in the code. PermissionLimits::Get is called in a lot of places. If we have no stored setting for a particular permission, return 0 - which is basically no permission except to self. 2018-04-19 23:44:22 -07:00
zotlabs
8d0cbeab38 better fix to permisisons.php - just cast to int. That's exactly what we want. 2018-04-19 23:37:47 -07:00
zotlabs
636fb95e24 permissions php error applying bit compare operation on a (presumed) boolean 2018-04-19 23:35:24 -07:00
zotlabs
2f1ad15645 fix navbar contact autocomplete 'undefined' hovertip 2018-04-19 22:19:52 -07:00
zotlabs
b1ed79f239 fix link to renamed permission roles doc subsection 2018-04-19 19:32:48 -07:00
zotlabs
aea61bf034 rename social - party to social - federation. Cleanup some of the documentation surrounding channels. This checkin contains translatable string changes. 2018-04-19 19:05:13 -07:00
zotlabs
2254262cf0 code booboo may have degraded the performance of the Trending tag query more than necessary 2018-04-19 17:43:50 -07:00
Galette Saucisse
872e4a0513 Create /doc/fr/toc.html
please add translated file toc.html
2018-04-19 18:22:47 +02:00
Galette Saucisse
0e1ea54c32 Update about.bb 2018-04-19 15:30:48 +02:00
Galette Saucisse
ff69413729 delete /doc/fr/about.bb
file is in wrong place, and supersceded by /doc/fr/about/about.bb
2018-04-19 15:11:49 +02:00
Galette Saucisse
a8c2b75b9b create new folder and file about.bb
the current about.bb is under /doc/fr/ and should be under /doc/fr/about/
this file is a complete French translation of the original English file
2018-04-19 15:07:28 +02:00
mrjive
c8ff773b96 Merge pull request #9 from redmatrix/dev
Dev
2018-04-19 09:51:58 +02:00
zotlabs
fa78dc79f3 follow activitypub by webfinger; requires addon update to all federation protocols 2018-04-19 08:44:41 +02:00
zotlabs
1ef31d27c7 relax restrictions to the design tools menu to allow those with write_pages permission; this doesn't fix the underlying modules though as there are some potential security issues at the moment. 2018-04-19 08:44:17 +02:00
zotlabs
f634d15768 do not queue anything which lacks a destination url 2018-04-19 08:42:50 +02:00
zotlabs
9bc9aa123f just provide the trending tags in public stream by default and simplify the query to improve load times; I intend to do additional work on this feature later 2018-04-19 08:42:37 +02:00
Mario Vavti
92b08f1f07 Merge remote-tracking branch 'mike/master' into dev 2018-04-19 08:28:42 +02:00
zotlabs
a81011333f follow activitypub by webfinger; requires addon update to all federation protocols 2018-04-18 19:41:09 -07:00
zotlabs
a2e0706d55 relax restrictions to the design tools menu to allow those with write_pages permission; this doesn't fix the underlying modules though as there are some potential security issues at the moment. 2018-04-18 17:26:05 -07:00
zotlabs
85ccfb4bbc do not queue anything which lacks a destination url 2018-04-18 17:07:29 -07:00
zotlabs
2ec28a5993 just provide the trending tags in public stream by default and simplify the query to improve load times; I intend to do additional work on this feature later 2018-04-18 15:56:57 -07:00
Galette Saucisse
8ff8a3eab9 Update French hmessages.po from Transifex 2018-04-18 17:41:09 +02:00
Galette Saucisse
f5573deb60 Update French hstrings.php from Transifex 2018-04-18 17:39:20 +02:00
Mario Vavti
16dcbc1e67 bump version 2018-04-18 08:52:10 +02:00
Mario Vavti
19782655e6 version bump and strings 2018-04-18 08:39:43 +02:00
zotlabs
c53f788cc8 add alt_pager to mod_moderate, remove legacy $a parameter from all occurrences of alt_pager 2018-04-17 23:36:35 -07:00
Mario Vavti
440ccf19d1 Merge remote-tracking branch 'mike/master' into dev 2018-04-18 08:19:56 +02:00
zotlabs
fc7d9c235c minor code optimisation 2018-04-17 22:23:28 -07:00
zotlabs
0f5ae5cac8 also add the noisy 'rss' tag 2018-04-17 21:55:00 -07:00
zotlabs
6903dbcc0d re-use directory safemode setting for public stream tag filtering since a handful of well-known tags skews the results wildly. Added 'bot' to the list just because it's noisy. A site can customise or nullify this feature if they desire. 2018-04-17 21:48:43 -07:00
zotlabs
a806c68713 fine tuning the public stream tag results 2018-04-17 20:27:36 -07:00
zotlabs
393cd46a82 public stream tag enhancements 2018-04-17 20:08:14 -07:00
zotlabs
0576046d02 when changing cover photo, show existing 2018-04-17 16:29:32 -07:00
Mario Vavti
c0794a83b4 Merge remote-tracking branch 'mike/master' into dev 2018-04-17 19:00:15 +02:00
Mario Vavti
dcd636f7be fix closing parenthesis in wrong spot 2018-04-17 18:56:33 +02:00
Mario Vavti
83e7d89f7e update to bootstrap-4.1 and improve visibility of some text when using custom panel colours 2018-04-17 16:17:44 +02:00
zotlabs
02763811b3 missing update file in the previous update commit 2018-04-16 23:34:47 -07:00
zotlabs
8b9952e770 set the correct webfinger Accept: request header now that Mastodon fixed the bug that we changed it to work around 2018-04-16 23:32:40 -07:00
zotlabs
43e55eb9a6 Active channels information is a bit imprecise. Provide a higher accuracy method. This will require a transition period 2018-04-16 21:40:43 -07:00
zotlabs
120e578a67 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-16 20:28:22 -07:00
zotlabs
411b8e48a3 don't save a permcat with empty name 2018-04-16 18:09:14 -07:00
zotlabs
d38b5ed2f5 update the placeholder 2018-04-16 17:40:33 -07:00
zotlabs
04abfdd5a6 update the search js 2018-04-16 17:37:38 -07:00
zotlabs
1662f76f03 hubzilla issue #1078 ; provide content-type header for system emails (was already correct for notification emails) 2018-04-16 16:12:57 -07:00
mrjive
283e5d3a5c Merge pull request #8 from redmatrix/dev
Dev
2018-04-16 17:27:14 +02:00
Mario Vavti
bef5be827d remove some more distinct in queries and observe any regressions. this is related to issue #1079 and commit d47ea20aa8 2018-04-16 11:42:13 +02:00
Mario Vavti
a8b78dc1f5 Merge remote-tracking branch 'mike/master' into dev 2018-04-16 09:24:22 +02:00
zotlabs
19888b95cc draft-cavage issues 2018-04-15 21:04:09 -07:00
zotlabs
3e6a55a295 issue with wiki sync 2018-04-15 17:29:40 -07:00
Mario Vavti
bbe58dd550 css fixes 2018-04-15 10:20:32 +02:00
Mario Vavti
a422063c7d fix regression where in the starred tab only top level posts were visible 2018-04-15 10:15:49 +02:00
zotlabs
518db97962 never mind. dbg(1) now gives you the basic debug result and dbg(2) gives you the verbose debug option with all the results. 2018-04-14 16:56:30 -07:00
zotlabs
fdf5799857 allow dbg(2) to only return the canonical SQL used in the query and the number of results, but not log every single result. Maybe we should use 1 for this and 2 for the full results, but I didn't really want to change the way people do things today. If anybody has a strong opinion about doing this, go ahead and change it and send a note to the developer forum. 2018-04-14 16:47:51 -07:00
mrjive
99dc161483 Merge pull request #7 from redmatrix/dev
Dev
2018-04-14 15:59:30 +02:00
zotlabs
f16dc7afc8 upgrade incutio xmlrpc library to use hubzilla curl wrapper 2018-04-13 17:58:11 -07:00
Galette Saucisse
32cd0cc984 Create /doc/context/fr/settings/features/help.html
French translation for context help
2018-04-13 22:17:48 +02:00
Galette Saucisse
169d75d2d1 Update hstrings.php 2018-04-13 22:17:37 +02:00
Galette Saucisse
6d234daa88 Update hmessages.po 2018-04-13 22:17:27 +02:00
Galette Saucisse
f8f64e853d Create /doc/context/fr/admin/queue/help.html
French translation for context help
2018-04-13 22:17:11 +02:00
Galette Saucisse
823b873e50 Update help.html 2018-04-13 22:16:53 +02:00
Galette Saucisse
5c97280359 translation correction 2018-04-13 22:16:41 +02:00
Galette Saucisse
7e62c3fa29 Create /doc/context/fr/admin/logs/help.html
French translation of context help
2018-04-13 22:16:10 +02:00
Galette Saucisse
c18b6cbd68 Create /doc/context/fr/channel
French translation for context help
2018-04-13 22:15:58 +02:00
git-marijus
29b3950e32 Merge pull request #1067 from galettesaucisse/patch-7
Create /doc/context/fr/settings/features/help.html
2018-04-13 22:14:15 +02:00
git-marijus
17bc11bbd4 Merge pull request #1066 from galettesaucisse/patch-6
Update French hstrings.php
2018-04-13 22:13:33 +02:00
git-marijus
3e937266b2 Merge pull request #1063 from galettesaucisse/patch-5
Update French hmessages.po
2018-04-13 22:13:13 +02:00
git-marijus
a02f22aab7 Merge pull request #1060 from galettesaucisse/patch-4
Create /doc/context/fr/admin/queue/help.html
2018-04-13 22:12:51 +02:00
git-marijus
b31616e5bf Merge pull request #1059 from galettesaucisse/patch-3
Create /doc/context/fr/admin/logs/help.html
2018-04-13 22:12:22 +02:00
git-marijus
b1057e8cd1 Merge pull request #1056 from galettesaucisse/patch-2
Create /doc/context/fr/channel
2018-04-13 22:12:03 +02:00
Mario Vavti
7543e27eae version and strings update 2018-04-13 22:11:08 +02:00
Mario Vavti
8a43bead74 fix illegal string offset warning 2018-04-13 13:20:20 +02:00
Mario Vavti
2867cd2043 fix wrong item key 2018-04-13 12:50:37 +02:00
Mario Vavti
88ca6fc12e Merge remote-tracking branch 'mike/master' into dev 2018-04-13 11:59:09 +02:00
Mario Vavti
e04d3c45a4 provide visible star status for starred posts 2018-04-13 11:58:12 +02:00
mrjive
db586e0c27 Merge pull request #6 from redmatrix/dev
Dev
2018-04-13 10:23:30 +02:00
Mario Vavti
4aaea422bc move the thread author menu to to the wall item photo. the menu list was getting too long. 2018-04-13 10:12:57 +02:00
zotlabs
7fd882a088 autosave comment enhancements 2018-04-12 22:24:25 -07:00
zotlabs
b0396cd646 work on autosave 2018-04-12 21:44:06 -07:00
zotlabs
d5117a62b8 update the tags and mentions section of the member_guide with recent changes 2018-04-12 20:49:20 -07:00
zotlabs
b13328140f accept system_language through either get or post 2018-04-12 18:21:34 -07:00
zotlabs
3be0b0925c remove recipient name from stored notifications but keep them in emails. 2018-04-12 17:55:45 -07:00
Mario Vavti
7c47b9d75c Merge remote-tracking branch 'mike/master' into dev 2018-04-12 14:46:36 +02:00
Mario Vavti
09a8b4b379 fix issue #1047 2018-04-12 10:58:31 +02:00
mrjive
ea36ebd0df Merge pull request #5 from redmatrix/dev
Dev
2018-04-12 10:12:46 +02:00
zotlabs
549f7a53b1 util/dcp (server to cloud file copy) better handling when destination directory is the channel root 2018-04-11 22:27:59 -07:00
zotlabs
739a612824 poll responses: start treating them as hidden activities now so that when this feature gets finished it will work flawlessly for versions greater than today. 2018-04-11 21:51:57 -07:00
zotlabs
953a2fd9b2 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-11 17:44:51 -07:00
zotlabs
2fa9645dfc channel delegation: push current identity and pop it on logout from the delegated channel. This fixes the known issue of being forced to log back in after leaving the delegated channel. 2018-04-11 17:40:04 -07:00
Mario Vavti
3bd6450333 also clean localStorage upon logout or channel switch 2018-04-11 12:37:25 +02:00
Mario Vavti
fee258edbe allow to toggle visibility of likes/dislikes in notifications 2018-04-11 11:49:33 +02:00
Mario Vavti
e294dfa760 wrong function 2018-04-11 08:17:30 +02:00
Galette Saucisse
669013f7e6 Create /doc/context/fr/settings/features/help.html
French translation for context help
2018-04-10 19:59:09 +02:00
Galette Saucisse
dde482082e Update hstrings.php 2018-04-10 19:10:11 +02:00
Galette Saucisse
868e9aa058 Update hmessages.po 2018-04-10 18:02:42 +02:00
Galette Saucisse
a815e2e30b Create /doc/context/fr/admin/queue/help.html
French translation for context help
2018-04-10 14:08:26 +02:00
Galette Saucisse
89b76530da Update help.html 2018-04-10 14:06:10 +02:00
Galette Saucisse
e909c2bbce translation correction 2018-04-10 14:05:31 +02:00
Galette Saucisse
ab1e1e9114 Create /doc/context/fr/admin/logs/help.html
French translation of context help
2018-04-10 13:36:38 +02:00
Galette Saucisse
13b0fdadb1 Create /doc/context/fr/channel
French translation for context help
2018-04-10 12:19:29 +02:00
Galette Saucisse
90580a860b Update French hstrings.php
added some missing strings
2018-04-10 12:11:15 +02:00
git-marijus
6d7fdb14f0 Merge pull request #1054 from galettesaucisse/patch-1
Update French hstrings.php
2018-04-10 12:10:45 +02:00
Mario Vavti
a2cb7b9ca4 do not get or set post category if the field is not available. remove logging. 2018-04-10 11:37:57 +02:00
Mario Vavti
91aeb25523 fix autosave content not cleaned after post submission 2018-04-10 11:17:20 +02:00
Galette Saucisse
bb86ee7cc4 Update French hstrings.php
added some missing strings
2018-04-10 09:54:26 +02:00
zotlabs
887a59066b last commented expiration setting in admin 2018-04-10 00:05:20 -07:00
zotlabs
e060135304 add commented_days parameter to item_expire(), default 7. Both expire_days and commented_days have to be exceeded to expire. 2018-04-09 23:39:47 -07:00
zotlabs
6bf2c64aa2 Create catcloud widget and provide a type option which can include 'cards' or 'articles' 2018-04-09 21:44:04 -07:00
Andrew Manning
1aba495a1c Replace pushState with replaceState to prevent browser history clutter in Help pages. 2018-04-09 20:50:41 -04:00
git-marijus
482e26ae26 Merge pull request #1053 from jschweinsberg/fix/pubstream-notifications
Public stream notifications
2018-04-09 22:41:40 +02:00
Julian Schweinsberg
c50105b8c1 Show "Unseen public activity" channel setting when site only public streams are activated 2018-04-09 19:26:35 +02:00
Julian Schweinsberg
530a378aa1 Modified notifications widget to add the public stream when the current user is allowed to see it only 2018-04-09 19:18:53 +02:00
Mario Vavti
04935f139d fix xchan_query() for anon comments 2018-04-09 14:28:41 +02:00
Mario Vavti
5228462363 bump version 2018-04-09 13:19:22 +02:00
git-marijus
9dc831f1ef Merge pull request #1051 from anaqreon/auto-save
Auto-save comment and post text
2018-04-09 13:18:09 +02:00
zotlabs
6844d7c752 don't provide a connect button for transient identities 2018-04-08 22:53:04 -07:00
zotlabs
cda3d23508 more intelligent handling of level 0 - and remove an extraneous logging function 2018-04-08 22:09:08 -07:00
zotlabs
e4ee165e29 more work merging techlevels and features 2018-04-08 22:02:48 -07:00
zotlabs
e0255c0dc4 first cut of feature/techlevel merge 2018-04-08 20:05:30 -07:00
zotlabs
6ce3ca1ce0 anon_identity_init: put anonymous commenters in network 'anon' so that they can be easily distinguished from federated network members and handled appropriately. 2018-04-08 19:28:57 -07:00
zotlabs
c3cd613f42 extend AC 2018-04-08 17:30:46 -07:00
zotlabs
f2078b25ad hubzilla issue #1050 pubstream notifications visible when pubstream is not 2018-04-08 16:51:29 -07:00
Andrew Manning
f9ec3c66ff Added feature setting for auto-save, defaulting to enabled. 2018-04-08 19:44:21 -04:00
Andrew Manning
4760dc9bcb removed Autosavetext.php file since it is not used with localStorage 2018-04-08 14:25:04 -04:00
Andrew Manning
808f362921 Merge branch 'dev' into auto-save 2018-04-08 14:23:34 -04:00
Andrew Manning
43cafcc761 Auto-save post and comment entry using localStorage in browser. 2018-04-08 14:18:10 -04:00
zotlabs
b00c22b69b we shouldn't need distinct here, since ids_to_querystr() will filter duplicates. It might have an effect on pager totals. Need to monitor for a few days. 2018-04-08 12:55:52 +02:00
git-marijus
73248fd227 Merge pull request #1048 from dentm42/plugin-error-trap
Trap plugin install/uninstall load/unload errors to avoid whitescreen
2018-04-08 11:48:05 +02:00
Mario Vavti
7205ffb5c0 Merge remote-tracking branch 'mike/master' into dev 2018-04-08 11:38:31 +02:00
M.Dent
ff77f14f2f Remove remove plugin from \App::[] on uninstall 2018-04-07 23:41:22 -04:00
M.Dent
a0cba6564f Uninstall plugin on Exception on load. 2018-04-07 23:12:39 -04:00
M.Dent
35b4f0a863 Add class for Exceptions 2018-04-07 23:01:18 -04:00
DM42.Net (Matt Dent)
0fba1a777e Add error handler and try/catch for all () calls 2018-04-07 22:17:19 -04:00
zotlabs
d47ea20aa8 we shouldn't need distinct here, since ids_to_querystr() will filter duplicates. It might have an effect on pager totals. Need to monitor for a few days. 2018-04-07 16:54:49 -07:00
Andrew Manning
be6dcb5d0a Merge branch 'dev' into auto-save 2018-04-07 17:48:48 -04:00
Mario Vavti
bddf8cfde4 Merge remote-tracking branch 'mike/master' into dev 2018-04-07 14:16:59 +02:00
Mario Vavti
9369150db7 rename button label in editpost from edit to submit 2018-04-07 14:15:07 +02:00
Mario Vavti
0fd7634339 rename relation to relationship - issue #1044 2018-04-07 13:50:41 +02:00
Mario Vavti
969a91c432 use Title instead of Caption - issue #1037 2018-04-07 13:36:34 +02:00
Mario Vavti
4d08fcf1a7 Use Add Files/Photos instead of Upload to open the upload dialog 2018-04-07 13:29:36 +02:00
zotlabs
8048b7addc channel import failing to provide channel_password value 2018-04-06 16:45:25 -07:00
zotlabs
4499ee178f put directory server in siteinfo - there are a lot of sites using broken directories 2018-04-06 01:24:38 -07:00
zotlabs
b17f741050 bring back the dnt policy document, not sure when it was lost 2018-04-05 22:15:15 -07:00
zotlabs
4a45c35c4e oauth2 client settings page 2018-04-05 21:01:36 -07:00
zotlabs
f4c94ab121 use profile_store_lowlevel() when importing profile structures to ensure all non-null fields are present 2018-04-05 17:31:20 -07:00
zotlabs
64bb1ca2bb Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-05 17:18:34 -07:00
zotlabs
b7386a0e88 fix permalinks to children of articles and cards 2018-04-05 16:58:37 -07:00
mrjive
a7ff2cc5ea Merge pull request #3 from redmatrix/dev
Dev
2018-04-05 10:52:39 +02:00
Mario Vavti
dcacdd23c8 Merge remote-tracking branch 'mike/master' into dev 2018-04-05 10:44:00 +02:00
Mario Vavti
8e46b07268 bump version 2018-04-05 10:31:51 +02:00
Mario Vavti
2f4c441074 change hearts for heart in reactions but cheet with the unicode 2018-04-05 10:11:02 +02:00
Mario Vavti
61f85bcb14 use transform to scale emojis. this prevents text jumping on hover 2018-04-05 10:10:26 +02:00
Mario Vavti
699ff644ad fix missing login/out buttons for medium screensize 2018-04-05 09:36:32 +02:00
zotlabs
0877e5b578 wrong function 2018-04-05 09:36:16 +02:00
zotlabs
46114bb24d display and link issues with quoted tags 2018-04-05 09:35:29 +02:00
zotlabs
6208ee3809 don't include the q and PHPSESSID request variables in a redirected rpost 2018-04-05 09:34:09 +02:00
zotlabs
17e341d245 php strpos() empty needle warning when a term entry has no url 2018-04-05 09:33:17 +02:00
zotlabs
f22c7afc59 preserve existing categories when updating an app from an embed source 2018-04-05 09:32:51 +02:00
zotlabs
d7aa24fd2d app sellpage not being stored 2018-04-05 09:32:35 +02:00
Mario Vavti
255c5ae94f new markdown lib seems to handle < and > correct. remove the workaraound. 2018-04-05 09:31:30 +02:00
zotlabs
ab2ff4a520 tagadelic was being overly protective of permissions. 2018-04-05 09:31:00 +02:00
zotlabs
1a53a4bc53 make list mode work in cards and articles 2018-04-05 09:30:01 +02:00
zotlabs
4423f4c930 make alt_pager work for articles/cards 2018-04-05 09:29:51 +02:00
zotlabs
9c512bb645 hubzilla issue #1013 - comments not displayed in single card/article view 2018-04-05 09:28:05 +02:00
git-marijus
bd0959b5a4 Merge pull request #1039 from phellmes/doco-feat-add
add basic structure for additional features documentation
2018-04-05 09:18:15 +02:00
zotlabs
fe401203bd bbcode() - ensure that $options is always an array, as the interface has changed slightly 2018-04-04 23:14:41 -07:00
zotlabs
c86032d4dc oauth2 dynamic client registration update 2018-04-04 20:58:54 -07:00
zotlabs
e864679942 private forum mentions 2018-04-04 18:53:06 -07:00
zotlabs
cadef5924f Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-04 18:15:33 -07:00
zotlabs
1a25b0bda7 allow the profile recrods to be cloned separately 2018-04-04 17:54:43 -07:00
zotlabs
f748139606 allow the link target attribute to be modified in bbcode() from much further up the call stack in prepare_page() which will usually refer to a local item. 2018-04-04 16:33:11 -07:00
Andrew Manning
a5aff7d0c9 Post body and title are auto-saved 2018-04-04 15:22:38 -04:00
phellmes
2afe28785c add basic structure for additional features documentation
Setting the raw frame with overview, short descriptions like in code
and already revealing skill levels.

Based on the current (recently modified) structure of the feature settings.

Detailed descriptions in work and coming with later commits as well as
a dedicated admin section for that topic. Better menu integration
may be possible with Andrew's new doco structure work in progress later.
2018-04-04 16:00:34 +02:00
Mario Vavti
aca719ac74 do not use punify() in get_baseurl() due to performance issues 2018-04-04 15:01:16 +02:00
zotlabs
8871f8d0f4 disable the oauth2testvehicle completely until it is safe 2018-04-03 21:58:11 -07:00
zotlabs
29b377d4c5 get rid of dangerous test code 2018-04-03 21:13:26 -07:00
zotlabs
4915a4efbb OAuth2 integration 2018-04-03 21:08:40 -07:00
zotlabs
245142cc07 Merge branch 'master' into oauth2 2018-04-03 19:57:35 -07:00
zotlabs
5ac0f371c7 community tags: allow signature of either author or owner so that it stands a chance of working across multiple delivery chains 2018-04-03 17:52:54 -07:00
zotlabs
cf6d51bee8 some more work on hubzilla issue #1019 2018-04-02 22:47:11 -07:00
zotlabs
d68ce0f345 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-04-02 20:45:18 -07:00
zotlabs
4e21c14ff6 community tagging refactor - we no longer send an edited post/comment to everybody. The post owner approves the tag and this is transmitted along with the tag activity. Recipients check the signature of the approval and add the tag to their local copy of the post. 2018-04-02 20:39:28 -07:00
zotlabs
753e1e4616 commtag refactor 2018-04-02 19:32:22 -07:00
zotlabs
9a1f051068 missing year on profile birthday input, some optimisations to stats 2018-04-02 13:32:10 -07:00
zotlabs
bcffb6cf55 obscurify chats 2018-04-01 16:53:10 -07:00
Mario Vavti
0e09dca952 fix missing login/out buttons for medium screensize 2018-04-01 20:19:56 +02:00
zotlabs
3bd3686acf Merge branch 'oauth2' of https://github.com/anaqreon/hubzilla into oauth2 2018-03-31 14:00:09 -07:00
zotlabs
4493304fa7 wrong function 2018-03-31 13:22:12 -07:00
Andrew Manning
6decffb00c Merge branch 'dev' into oauth2 2018-03-31 13:41:29 -04:00
zotlabs
54e941724f Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-03-31 01:45:26 -07:00
zotlabs
e155e7d9ce undo vcard on display module until we can make it accurate 2018-03-31 01:43:33 -07:00
Mario Vavti
6433ce70a1 Merge remote-tracking branch 'mike/master' into dev 2018-03-31 09:26:58 +02:00
zotlabs
1e086a4ac8 Hubzilla issue #1022 cleanup of post formatting 2018-03-30 17:13:21 -07:00
zotlabs
1c3e669761 Hubzilla issue #1022 - improve the usability 2018-03-30 16:47:47 -07:00
zotlabs
af125fbe4f Hubzilla issue #1022 - provide a way to share wiki pages. Currently this is only implemented in the 'edit' pane and could use some improvement/enhancement 2018-03-30 16:09:25 -07:00
zotlabs
43249bd4be hubzilla issue #1020 - PM using unicode domain for recipient. May require further testing 2018-03-30 15:18:33 -07:00
zotlabs
f54aa4f21e allow case independence of replacements as well as patterns 2018-03-30 01:59:32 -07:00
Mario Vavti
6822415ee2 Merge remote-tracking branch 'mike/master' into dev 2018-03-30 09:07:43 +02:00
zotlabs
6d0e1b0e07 display and link issues with quoted tags 2018-03-29 17:06:23 -07:00
zotlabs
238303d819 add directory keyword links to profile 2018-03-29 15:32:35 -07:00
zotlabs
998f39868f directory: link entry keywords to a directory keyword search 2018-03-29 14:27:26 -07:00
mrjive
20ac91703d Merge pull request #1 from redmatrix/dev
Dev
2018-03-29 17:47:50 +02:00
zotlabs
33bb89729c hubzilla issue #1019 - punycode urls on connedit page when displaying locations 2018-03-29 02:26:25 -07:00
Mario Vavti
e06e64823f bump version 2018-03-29 10:30:32 +02:00
zotlabs
cd485b0fdf hubzilla issue #1015 - login with unicode domain name 2018-03-28 19:25:11 -07:00
zotlabs
1cf0de568d use context method 2018-03-28 18:32:04 -07:00
zotlabs
662316e687 update folder timestamp on uploaded files (fixme - we need to recurse back to the storage root but that is for another day) 2018-03-27 21:13:14 -07:00
zotlabs
14383a4c4a uexport: set content-type to json and add sections info to the default filename if present 2018-03-27 18:43:59 -07:00
Andrew Manning
1dc795722a Merge branch 'dev' into oauth2 2018-03-27 21:11:34 -04:00
zotlabs
08274ffab7 put vcard widget with author of top-level post on display page 2018-03-27 18:01:20 -07:00
zotlabs
5ea11d1222 don't include the q and PHPSESSID request variables in a redirected rpost 2018-03-27 16:27:28 -07:00
zotlabs
35b6c2baad Hard fail imports of removed channels. This is silly. 2018-03-27 15:08:27 -07:00
zotlabs
a92f22a4a4 IDN: force baseurl to be punycode; for consistency and federation all internal urls are US-ASCII, unicode MAY be used for display. 2018-03-25 23:02:41 -07:00
zotlabs
2fc3f381ac php strpos() empty needle warning when a term entry has no url 2018-03-25 21:48:42 -07:00
zotlabs
2a2a21a736 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-03-25 21:17:34 -07:00
zotlabs
5a739ddc47 Merge branch 'newmemberwidget' 2018-03-25 21:16:10 -07:00
zotlabs
4ef2493e95 testing start_menu feature 2018-03-25 21:15:23 -07:00
Mario Vavti
c98776923a Merge remote-tracking branch 'mike/master' into dev 2018-03-25 11:21:24 +02:00
zotlabs
bb4f9eecbe preserve existing categories when updating an app from an embed source 2018-03-24 21:17:15 -07:00
zotlabs
d4e91d5d9b app sellpage not being stored 2018-03-24 15:13:19 -07:00
zotlabs
558e3f8042 code optimisations and de-duplication on updating parent commented timestamp 2018-03-24 02:22:24 -07:00
Mario Vavti
9f9b9dfd82 Merge remote-tracking branch 'mike/master' into dev 2018-03-24 09:12:48 +01:00
zotlabs
a8d81a68d6 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-03-23 21:44:55 -07:00
zotlabs
abe6ab4775 logic fallacy when updating parent timestamp of moderated comment 2018-03-23 21:24:24 -07:00
zotlabs
9a155cf5a5 turn newmember widget into a feature 2018-03-23 19:03:30 -07:00
Mario Vavti
ae9e64cedf prevent reload loop if somebody lands on /ochannel (without channel_address and without trailing slash) 2018-03-23 10:37:10 +01:00
zotlabs
e6d62f6e05 Add Ochannel module for testing OStatus bad behaviour 2018-03-23 10:36:56 +01:00
goofy-bz
09567da292 Update hmessages.po
typofix
2018-03-23 10:30:40 +01:00
fadelkon
a1ce5df74f Update translations for catalan (ca/ca_ES) from transifex 2018-03-23 10:29:57 +01:00
git-marijus
dede5fabeb Merge pull request #1004 from goofy-bz/patch-1
Update hmessages.po
2018-03-23 10:27:56 +01:00
git-marijus
4a4c18b8b3 Merge pull request #1008 from fadelkon/update_cat_translation
Update translations for catalan (ca/ca_ES) from transifex
2018-03-23 10:27:17 +01:00
git-marijus
06026c1c27 Merge pull request #1009 from dawnbreak/QA_testing
👷Extend Travis, add PostgreSQL10.
2018-03-23 10:26:26 +01:00
git-marijus
e2b9162a30 Merge pull request #1010 from dawnbreak/dev
⬆️ Update libraries.
2018-03-23 10:25:58 +01:00
Mario Vavti
eec4d9b5ad an attemot to fix the PermissionRolesTest 2018-03-23 10:16:06 +01:00
Mario Vavti
376091010f Merge remote-tracking branch 'mike/master' into dev 2018-03-23 10:03:54 +01:00
Mario Vavti
ac967db4e8 new markdown lib seems to handle < and > correct. remove the workaraound. 2018-03-23 09:40:24 +01:00
zotlabs
af8cbf000f tagadelic was being overly protective of permissions. 2018-03-22 21:23:12 -07:00
zotlabs
034032c7c2 slight change in mail privacy implementation. If you initiate a private mail conversation and they respond, accept the reply. You can't hide behind your permissions or lack thereof. Often this will be accidental. If you truly want to block them from replying and your permissions otherwise would not allow them to reply, delete the conversation. 2018-03-22 19:52:25 -07:00
zotlabs
05e11844e5 make list mode work in cards and articles 2018-03-22 17:17:00 -07:00
zotlabs
4ba91cf4e3 make alt_pager work for articles/cards 2018-03-22 16:34:27 -07:00
zotlabs
9a52b90f22 hubzilla issue #1013 - comments not displayed in single card/article view 2018-03-22 15:38:00 -07:00
Mario Vavti
8ea8700eef prevent reload loop if somebody lands on /ochannel (without channel_address and without trailing slash) 2018-03-22 13:55:23 +01:00
zotlabs
1f128e84fb Hubzilla issue #1006, fix anonymous comments bump thread before being approved. 2018-03-21 22:52:24 -07:00
zotlabs
1514b0f4e5 initial support for alternative sort orders on the cloud pages. Can be triggered manually but further development is required. 2018-03-21 21:19:18 -07:00
zotlabs
dc066d4c9b Add Ochannel module for testing OStatus bad behaviour 2018-03-21 15:44:56 -07:00
zotlabs
3d6b606792 add the social "party" permission role 2018-03-20 04:08:36 -07:00
Klaus Weidenbach
c80837a9e6 ⬆️ Update libraries.
michelf/php-markdown (1.7.0 => 1.8.0)
ezyang/htmlpurifier (v4.9.3 => v4.10.0)
commerceguys/intl (v0.7.4 => v0.7.5)
sabre/http (4.2.3 => v4.2.4)
sabre/vobject (4.1.3 => 4.1.5)
2018-03-18 02:15:29 +01:00
Klaus Weidenbach
a732b2bca1 👷Extend Travis, add PostgreSQL10.
Add PostgreSQL10 to TravisCI through Docker container.
Use PHP7.2 instead of PHP7.1 as default test environment.
Update to current stable MariaDB 10.2 from stable (GA) 10.1.
2018-03-17 23:27:56 +01:00
Mario Vavti
0009f7f051 do not include pending registrations in accounts and goaway to /admin/accounts after approval or denial of an pending registration 2018-03-17 21:52:56 +01:00
fadelkon
7b04c7e7df Update translations for catalan (ca/ca_ES) from transifex 2018-03-17 19:03:10 +01:00
Mario Vavti
b5cc26fe76 Merge remote-tracking branch 'mike/master' into dev 2018-03-17 09:02:48 +01:00
goofy-bz
b3cb78a598 Update hmessages.po
typofix
2018-03-17 08:24:16 +01:00
zotlabs
60b38a3a52 slight re-org and update of documentation, moving the tutorial to the top. 2018-03-16 15:34:09 -07:00
Mario Vavti
c0a896ff5e change hearts for heart in reactions but cheet with the unicode 2018-03-16 12:03:52 +01:00
Mario Vavti
63bbde2368 use transform to scale emojis. this prevents text jumping on hover 2018-03-16 11:03:22 +01:00
zotlabs
91b710b07d add auth flag to share attributes so we can make a costly determination to use zid at post submission time instead of making multiple calls to is_matrix_url() at render time 2018-03-15 17:51:24 -07:00
Mario Vavti
34fee2a790 match hosts instead of urls to decide if to zid or not to zid 2018-03-15 14:53:18 +01:00
Mario Vavti
6c709551ce do not always zid share links. add missing < 2018-03-15 14:31:50 +01:00
Mario Vavti
aa4f8b2901 add xchan_network = zot and xchan_deleted = 0 to the random_profile() query 2018-03-15 13:34:40 +01:00
Mario Vavti
3003f85a3e fix channel_address 2018-03-15 11:09:58 +01:00
Mario Vavti
33573edafa make the oneway-overlay slightly opaque 2018-03-15 11:09:22 +01:00
Mario Vavti
95c53c7e0b add zotadel.net to directory fallback servers 2018-03-15 10:13:30 +01:00
zotlabs
a94a28bb7e mastodon content-warning cont: only strip nsfw tag if a content warning spoiler is used. Else it's legitimately nsfw. 2018-03-14 20:47:11 -07:00
zotlabs
7b56fdebac more work with unicode usernames 2018-03-14 18:42:07 -07:00
zotlabs
0905018d3b use original exif_read_data() parameters which were lost in a regression; unset automatic nsfw category generated for Mastodon content warning posts, as people use CW as a spoiler mechanism 99% of the time and flagging inappropriate content 1% of the time. 2018-03-14 14:51:33 -07:00
Mario Vavti
9d230b1f4c indicate that there are events today in notifications by changing the badge class from secondary to danger. issue #1001 2018-03-14 21:39:33 +01:00
Mario Vavti
9f4064e03b update justified gallery lib from 3.6.3 to 3.6.5 2018-03-14 11:49:19 +01:00
Mario Vavti
461e86423a Merge remote-tracking branch 'mike/master' into dev 2018-03-14 11:37:24 +01:00
Mario Vavti
f70413a031 fix channel_address 2018-03-14 10:47:36 +01:00
Mario Vavti
26b7a3aca0 make the oneway-overlay slightly opaque 2018-03-14 10:33:23 +01:00
Mario Vavti
75721b7e82 reveal the profile name field only if multi prifiles feature is enabled 2018-03-14 10:24:08 +01:00
Mario Vavti
fa3e7a574f show site registration notifications setting only to site admin 2018-03-14 10:03:17 +01:00
Mario Vavti
d4fa33dddd whitespace 2018-03-14 09:19:06 +01:00
zotlabs
a0cbed80f3 make unicode usernames work in chanview module 2018-03-14 00:50:12 -07:00
zotlabs
128d1f7aa8 somewhere along the line the output of exif_read_data() changed and it no longer provides populated sections. Adjust for the new format and allow for the old because I cannot find documentation of this change anywhere. This affects photo rotation and the photo map feature. 2018-03-13 22:47:11 -07:00
Mario Vavti
09a841f3be add ability to disable newmember widget ahead of time 2018-03-13 15:20:32 +01:00
mrjive
074bf009d8 Partial italina translationhmessages.po hstrings.php 2018-03-13 12:02:06 +01:00
git-marijus
268b96effa Merge pull request #1000 from mrjive/dev
Connections page filtering for active connections
2018-03-13 12:01:23 +01:00
Manuel Jiménez Friaza
5a3c2b19c9 Spanish translation: adapted the new timeago's stuff 2018-03-13 11:59:36 +01:00
git-marijus
b120394b49 Merge pull request #999 from mjfriaza/dev
Spanish translation: adapted the new timeago's stuff
2018-03-13 11:58:40 +01:00
Manuel Jiménez Friaza
46c67e7f2f Spanish translation: adapted the new timeago's stuff 2018-03-13 11:20:08 +01:00
mrjive
790660e612 Merge pull request #18 from redmatrix/dev
Dev
2018-03-13 10:59:21 +01:00
mrjive
2bcfa0c126 small work on connections page 2018-03-13 02:57:08 -07:00
Mario Vavti
e02029ecc6 bump version 2018-03-13 09:46:11 +01:00
Manuel Jiménez Friaza
09e143dc1f Spanish translation: added el before artículo, which is the correct construction. 2018-03-13 09:38:03 +01:00
git-marijus
53c1d3775c Merge pull request #997 from mjfriaza/dev
Spanish translation: added "el" before "artículo", which is the correct construction
2018-03-13 09:37:16 +01:00
zotlabs
62ad32cf2e obscure permission issue with custom permissions when using the highly discouraged advisory privacy modes 2018-03-13 09:08:32 +01:00
Mario Vavti
150e238b02 Merge remote-tracking branch 'mike/master' into dev 2018-03-13 09:05:40 +01:00
zotlabs
ab1d47b36f unicode/emoji usernames. Warning: experimental feature, unstable, untested, disabled by default, use at your own risk, may not federate to other platforms and protocols. May not clone correctly. Bug reports which neglect to include detailed roubleshooting information and patches/pull requests will be ignored. 2018-03-12 20:54:55 -07:00
Andrew Manning
dcd658f12e Merge branch 'dev' into oauth2 2018-03-12 19:50:25 -04:00
zotlabs
34399b8b47 obscure permission issue with custom permissions when using the highly discouraged advisory privacy modes 2018-03-12 15:47:33 -07:00
Mario Vavti
092c1c8c4c add extra firstpage check 2018-03-12 09:54:15 +01:00
Mario Vavti
b265a55b81 Merge remote-tracking branch 'mike/master' into dev 2018-03-12 09:37:29 +01:00
zotlabs
717ae54868 Setup - .htconfig.php write access is now required for automated installation. [String change - leave in dev for the next release] 2018-03-11 16:42:46 -07:00
Mario Vavti
ade11568f9 update mysql schema 2018-03-11 13:53:53 +01:00
Mario Vavti
98541beee3 update mysql schema 2018-03-11 13:53:15 +01:00
Manuel Jiménez Friaza
ec12b78ddf Spanish translation: added el before artículo, which is the correct construction. 2018-03-11 13:07:11 +01:00
zotlabs
08d2adddf5 remove debugging 2018-03-10 13:21:22 -08:00
zotlabs
a417389934 trim expects error ... in admin/site 2018-03-10 13:20:20 -08:00
Andrew Manning
aa6f7481a0 Fixed access_token request bug and returned oauth2-server-php library to unmodified state. 2018-03-10 15:43:13 -05:00
Mario Vavti
ff2935e70c do not use trim on array 2018-03-10 21:22:21 +01:00
Mario Vavti
cd21519de3 do not use trim on array 2018-03-10 21:21:44 +01:00
Andrew Manning
a4de63ca92 Merge branch 'dev' into oauth2 2018-03-10 15:10:09 -05:00
Mario Vavti
78040330b6 update changelog 2018-03-09 11:06:05 +01:00
git-marijus
4fdad3b8af Merge pull request #994 from Reylak/dev
RedBasic theme dark schema update
2018-03-09 09:21:52 +01:00
Mario Vavti
9c02c66ed3 remove redundant comma 2018-03-09 09:17:57 +01:00
Mario Vavti
d82bf2b921 Merge remote-tracking branch 'mike/master' into dev 2018-03-09 09:04:14 +01:00
zotlabs
3ee35b83c2 notifications-btn-1 does not actually require the text-white class and this is known to cause issues on dark themes 2018-03-08 14:23:34 -08:00
Mathieu "Matbac" Bacou
500b141341 Uniformize title input with other input fields
Add rounded corners to mimic categories input field and main text area.
2018-03-08 21:12:33 +01:00
Mathieu "Matbac" Bacou
f9cca2422a Remove useless background spec for category field 2018-03-08 21:02:51 +01:00
Mathieu "Matbac" Bacou
76a8006003 Fix background of tags field 2018-03-08 20:56:23 +01:00
Mathieu "Thrar" Bacou
7ac70e1f23 Fix code background in wiki pages
Fix needed after commit c444e40c01
2018-03-08 20:14:44 +01:00
Mario
a0a1246efb use dbunescbin() for cover photos 2018-03-08 10:52:49 +01:00
Mario
2105cfd433 fix syntax error in postgres update 2018-03-08 10:27:43 +01:00
Mario Vavti
f3a753bda6 Merge remote-tracking branch 'mike/master' into dev 2018-03-08 08:55:25 +01:00
zotlabs
1700aedbed remove extraneous logging 2018-03-07 17:29:01 -08:00
zotlabs
48b1042347 hashtag autocomplete 2018-03-07 16:59:55 -08:00
zotlabs
a454aad124 federated polls: GNU-Social requires us to preserve the original order of the poll answers for use in making a vote, unlike diaspora (which selects by guid) and activitypub (which selects by non-localisable text). 2018-03-07 15:39:14 -08:00
Mario Vavti
17c102ebe1 we need the javascript in the template since strings are involved 2018-03-07 21:11:57 +01:00
Mario Vavti
d6812cf75e more bootstrap accordion fixes 2018-03-07 20:47:18 +01:00
Mario Vavti
04f7f99fc3 we do not support separate mobile themes anymore 2018-03-07 20:29:37 +01:00
zotlabs
f0f58dade8 federated polls: add poll_author which will be necessary for Diaspora federation 2018-03-06 15:31:45 -08:00
zotlabs
b282e45a02 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-03-06 15:23:05 -08:00
zotlabs
0a876e1518 don't add pending connections to the default privacy group until accepted 2018-03-06 11:39:49 -08:00
Mario Vavti
da9fe27db1 update changelog 2018-03-06 11:15:47 +01:00
git-marijus
c7351c0922 Merge pull request #991 from anaqreon/dev
Improve rendering of Readme files in plugin settings
2018-03-06 08:49:06 +01:00
Andrew Manning
99247d0c59 Improve rendering of Readme files in plugin settings 2018-03-05 20:42:06 -05:00
Andrew Manning
9b13db1c48 Merge branch 'dev' into oauth2 2018-03-05 20:06:47 -05:00
Mario Vavti
c462d2f15e add pdl file for mod moderate 2018-03-05 23:03:58 +01:00
Mario Vavti
bae2af09a0 fix javascript error if there are no notifications 2018-03-05 22:59:05 +01:00
Mario Vavti
a0e0b82067 update redbasic theme screenshot 2018-03-05 22:39:27 +01:00
mrjive
9fb65e10bd Partial italina translationhmessages.po hstrings.php 2018-03-05 05:37:15 -08:00
Mario Vavti
a0e390c6c8 Merge remote-tracking branch 'mike/master' into dev 2018-03-05 08:54:46 +01:00
git-marijus
fd7d3f9286 Merge pull request #989 from phellmes/dev
Update DE translation strings (for 3.2RC)
2018-03-05 08:53:03 +01:00
zotlabs
59a2057fa0 fix some issues with friend suggestions on standalone sites with no 'suggestme' volunteers. This wrongly pulled up a site directory suggesting everybody on the site. While a better outcome than finding nobody, this does not fit with our ethical design goals. If there are no friends of friends, we will only suggest those who volunteer to be on the default suggestion list. Also do not attempt to load poco data from dead sites. 2018-03-04 17:40:38 -08:00
zotlabs
be6619d9c0 bugfix: unable to reset profile fields to defaults in admin/profs by emptying the textarea 2018-03-04 15:29:10 -08:00
phellmes
bb7457f43c Update DE translation strings 2018-03-05 00:24:41 +01:00
zotlabs
14f701f7fc restrict mail messages to max_import_size 2018-03-04 14:30:09 -08:00
Andrew Manning
058f7277b5 Merge branch 'dev' into oauth2 2018-03-04 06:45:07 -05:00
zotlabs
471c3c4d06 add dummy f= arg to suggestion urls, use directory version of suggest for newmember link instead of the suggest module as the UI is prettier. 2018-03-03 15:54:13 -08:00
zotlabs
ca1022675c There was no pdl for mod_thing; add one because it's only a link away from profile creation and remains on that page until you go elsewhere and new members may need help to find their way out 2018-03-03 15:19:39 -08:00
zotlabs
c3920116f2 more work on federated polls 2018-03-03 13:52:55 -08:00
zotlabs
26e0fd624a Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-03-02 20:08:01 -08:00
zotlabs
4c69c56797 string change "Channel added" -> "Connection added" 2018-03-02 14:09:59 -08:00
zotlabs
df03805579 process follow from article menu in the background, do not reload page - hubzilla issue #987 2018-03-02 13:15:28 -08:00
zotlabs
b38ce967f3 sort settings/featured 2018-03-02 12:41:50 -08:00
zotlabs
dbe73cdcbe add icon to any addon settings blocks which don't already have one 2018-03-02 12:04:23 -08:00
git-marijus
2f0ebdeade Merge pull request #985 from mjfriaza/dev
Updated Spanish translation (hmessages.po/php and register_verify_member.tpl).
2018-03-02 20:46:34 +01:00
Mario Vavti
7c5f1e814b Merge remote-tracking branch 'mike/master' into dev 2018-03-02 20:25:17 +01:00
Manuel Jiménez Friaza
840cea680c New strings for Spanish translation. 2018-03-02 18:28:42 +01:00
Mario Vavti
5c46e66694 update DB update 1205 to mitigate
ERROR 1069 (42000): Too many keys specified; max 64 keys allowed
2018-03-02 11:38:21 +01:00
Mario Vavti
bca05dc89f bump version 2018-03-02 10:23:53 +01:00
Mario Vavti
6ee6285670 db update to drop index resource_type. we have uid_resource_type now. 2018-03-02 10:10:29 +01:00
zotlabs
dcfe9bc64f background work for caldav integration continued, modify mod_follow to allow it to be called from ajax without redirecting. 2018-03-02 01:03:14 -08:00
zotlabs
8fd619da71 zot revision => 6.0a, not yet needed or referenced 2018-03-01 16:42:32 -08:00
zotlabs
1620691cbe add federation property to webfinger 2018-03-01 16:38:14 -08:00
zotlabs
49bd859136 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2018-03-01 16:16:58 -08:00
zotlabs
93a11ade04 sigh - missed two strings 2018-03-01 16:11:30 -08:00
Manuel Jiménez Friaza
3da9107354 Updated Spanish translation (hmessages.po/php and register_verify_member.tpl). 2018-03-01 19:41:59 +01:00
Mario Vavti
d32f583fda Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev 2018-03-01 13:46:39 +01:00
Mario Vavti
bab00731a8 fix issues with accordions in settings and comment out jquery.textinputs.js 2018-03-01 13:46:25 +01:00
git-marijus
8cd539e125 Merge pull request #984 from dawnbreak/dev
Update composer autoload cache.
2018-03-01 12:08:31 +01:00
git-marijus
3b8a0d4773 Merge pull request #983 from dawnbreak/QA_testing
 Unit Test for HTTPSig.
2018-03-01 12:07:37 +01:00
Klaus Weidenbach
b60098ec68 Update composer autoload cache. 2018-03-01 11:29:15 +01:00
Mario Vavti
de02fddf89 update strings 2018-03-01 08:54:09 +01:00
Mario Vavti
2e058c9abc version 2018-03-01 08:42:02 +01:00
Andrew Manning
39fe80a196 Merge branch 'dev' into oauth2 2018-02-28 20:47:14 -05:00
Klaus Weidenbach
7c28a40c3e Unit Test for HTTPSig. 2018-02-28 16:04:13 +01:00
Andrew Manning
1035c453ea Merge branch 'dev' into oauth2 2018-02-26 19:48:15 -05:00
Andrew Manning
45e0fc6802 Successful OAuth2 sequence demonstrated with the test vehicle, including an authenticated API call using an access_token. 2018-02-26 18:16:43 -05:00
Andrew Manning
e3095ce6b2 Merge branch 'dev' into oauth2 2018-02-25 08:36:52 -05:00
Andrew Manning
70b8f3240f An authorization token is received, but I had to modify the Request class in vendor/bshaffer/oauth2-server-php/ to accept $_REQUEST instead of $_POST. 2018-02-25 08:36:40 -05:00
Andrew Manning
497ebca54f Merge branch 'dev' into oauth2 2018-02-24 06:48:56 -05:00
Andrew Manning
64ee42fc3d Add channel ID to user_id in clients table. Added TODO comments about dynamic client registration protocol. 2018-02-24 06:48:30 -05:00
Andrew Manning
70719c67d3 Merge branch 'dev' into oauth2 2018-02-22 15:10:20 -05:00
Andrew Manning
43fca182e3 The authorization step with client registration and authorization code retrieval working. Might not conform perfectly to OAuth2 spec, but it is a start. 2018-02-22 15:10:05 -05:00
mrjive
2d17e1c677 Merge pull request #15 from redmatrix/dev
Dev
2018-02-21 12:55:29 +01:00
Andrew Manning
8e5c1135c3 Merge branch 'dev' into oauth2 2018-02-20 21:11:59 -05:00
Andrew Manning
89a825cd03 OAuth2TestVehicle module can create and delete oauth2 database tables. 2018-02-20 21:11:38 -05:00
Andrew Manning
7d0c1bb737 Created test vehicle module oauth2test 2018-02-18 20:24:41 -05:00
mrjive
d7ecaa8b23 Merge pull request #14 from redmatrix/dev
Dev
2018-02-02 09:23:55 +01:00
mrjive
7ac4b47702 Merge pull request #13 from redmatrix/dev
Dev
2018-01-30 16:13:30 +01:00
mrjive
c2abbe2c23 small changes
changed icon from sort to filter and changed id to class in content-wrapper clearfix
2018-01-29 16:33:54 +01:00
mrjive
5f6f87a7cd Update connections.tpl 2018-01-29 16:32:32 +01:00
mrjive
4b7967b938 Merge pull request #12 from redmatrix/dev
Dev
2018-01-26 09:43:47 +01:00
mrjive
f560a3c98f Merge pull request #11 from redmatrix/dev
Dev
2018-01-24 18:30:59 +01:00
mrjive
131baa9f45 Merge pull request #10 from redmatrix/dev
Dev
2018-01-22 09:34:08 +01:00
mrjive
8e475810a7 Merge pull request #8 from redmatrix/dev
section-content-info-wrapper for register text
2018-01-18 10:40:15 +01:00
mrjive
e81949bb09 Merge pull request #7 from redmatrix/dev
Dev
2018-01-16 11:45:01 +01:00
1471 changed files with 133313 additions and 89077 deletions

View File

@@ -39,7 +39,7 @@ Software
- mkdir -p /var/www
- cd /var/www
- git clone https://github.com/redmatrix/hubzilla.git html
- cd /html/.homeinstall
- cd html/.homeinstall
- cp hubzilla-config.txt.template hubzilla-config.txt
- nano hubzilla-config.txt
- Read the comments carefully
@@ -50,6 +50,20 @@ Software
- 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
## Optional - Set path to imagemagick
In Admin settings of hubzilla or via terminal
cd /var/www/html
util/config system.imagick_convert_path /usr/bin/convert
# Step-by-Step in Detail
## Preparations Hardware
@@ -120,7 +134,7 @@ There are two ways to get a domain...
The cost are around 10,- € once and 1,50 € per month (2017).
The cost are around 10,- € once and 1,50 € per month (2017).
### Method 2: Register a free subdomain
...for example register at freedns.afraid.org
@@ -150,7 +164,7 @@ Make the directory for apache and change diretory to it
Clone hubzilla from git ("git pull" will update it later)
git clone https://github.com/redmatrix/hubzilla html
git clone https://framagit.org/hubzilla/core html
Change to the install script
@@ -189,9 +203,16 @@ 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
- 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
@@ -213,4 +234,12 @@ 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

View File

@@ -136,17 +136,17 @@ function check_config {
# backup is important and should be checked
if [ -n "$backup_device_name" ]
then
device_mounted=0
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 [ ! -d /media/hubzilla_backup ]
then
mkdir /media/hubzilla_backup
fi
if mount /dev/mapper/cryptobackup /media/hubzilla_backup
then
device_mounted=1
@@ -246,6 +246,11 @@ function install_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"
@@ -567,7 +572,7 @@ function check_https {
function install_hubzilla {
print_info "installing hubzilla addons..."
cd /var/www/html/
util/add_addon_repo https://github.com/redmatrix/hubzilla-addons.git hzaddons
util/add_addon_repo https://framagit.org/hubzilla/addons.git hzaddons
mkdir -p "store/[data]/smarty3"
chmod -R 777 store
touch .htconfig.php
@@ -801,6 +806,7 @@ update_upgrade
install_curl
install_sendmail
install_apache
install_imagemagick
install_php
install_mysql
install_phpmyadmin

View File

@@ -62,28 +62,34 @@ matrix:
fast_finish: true
# Additional check combinations
include:
# PHP7.1, mariadb 10.1
- php: '7.1'
env: DB=mariadb MARIADB_VERSION=10.1 CODECOV=1
# PHP7.2, mariadb 10.2
- php: '7.2'
env: DB=mariadb MARIADB_VERSION=10.2 CODECOV=1
# use mariadb instead of MySQL
addons:
mariadb: '10.1'
# PHP7.1, PostgreSQL 9.6
- php: '7.1'
mariadb: '10.2'
# PHP7.2, PostgreSQL 9.6
- php: '7.2'
env: DB=pgsql POSTGRESQL_VERSION=9.6 PHPUNITFILE=phpunit-pgsql.xml
# Use newer postgres than 9.2 default
addons:
postgresql: '9.6'
services:
- postgresql
# PHP7.1, old precise distribution with MySQL 5.5
- php: '7.1'
# PostgreSQL 10 with Docker container
- php: '7.2'
env: DB=pgsql POSTGRESQL_VERSION=10 PHPUNITFILE=phpunit-pgsql.xml
sudo: required
services:
- docker
# PHP7.2, old precise distribution with MySQL 5.5
- php: '7.2'
env: DB=mysql MYSQL_VERSION=5.5
dist: precise
services:
- mysql
# MySQL 5.7 with Docker container
- php: '7.1'
- php: '7.2'
env: DB=mysql MYSQL_VERSION=5.7
sudo: required
services:
@@ -109,6 +115,8 @@ before_install:
- travis_retry composer self-update
# Start MySQL 5.7 Docker container, needs some time to come up
- if [[ "$MYSQL_VERSION" == "5.7" ]]; then sudo service mysql stop; docker run -d -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql:5.7 && sleep 25 && docker ps; fi
# Start PostgreSQL 10 Docker container, needs some time to come up
- if [[ "$POSTGRESQL_VERSION" == "10" ]]; then sudo service postgresql stop; docker run -d -p 5432:5432 postgres:10-alpine && sleep 35 && docker ps; fi
# Install composer dev libs
install:

194
CHANGELOG
View File

@@ -1,3 +1,197 @@
Hubzilla 3.6 (????-??-??)
- Update jquery.timeago library
- Implement Hookable CSP
- ActivityStreams: accept header changes to support plume
- Streamline inconsistencies in addon naming
- SECURITY: hash the session_id in logs
- Update justified gallery library
- Hide channel in /cloud root if channel is hidden in directory
- Add resend option to channel sources tp discard original author.
- Provide flag to exclude privacy groups for federation plugin use in collect_recipients()
- Upgrading from redmatrix is no longer supported
- Deal with htmlentity encoding during authentication workflow
- Rework mod group
- Make droping posts of removed connections more memory efficient
- Refactor getOutainfo() for DAV storage
- Optionally report total available space when uploading
- SECURITY: provide option to disable the cloud 'root' directory and make the cloud module require a target channel nickname
- Add plink and llink to viewsource
- Add new 'filter by name' feature
- Remove network tabs
- New activity filter widget
- New activity order widget
- Make menus editable by visitors with webpage write permissions
- Move forum notifications to notifications
- Move manage privacy groups to the panel channel menu
- Don't remove items that are starred, filed, or that you replied to when removing a connection
- Don't deliver local items more than once
- Make navbar search use the module search function in /network and /channel
- Paint the locks on private activitypub items red. Their privacy model is "slightly" different from hubzillas
- Improve new channel creation workflow
- Add hook 'get_system_apps'
- Implement reset button for jot
- Adjust accept header to make pleroma happy
- Provide a general purpose GDPR document
- Provide function to fetch photo contents from url
- Make get_default_profile_photo() pluggable
- Refactor tags/mentions
- Refactor autocomplete mechanism
- Display pubsites link in info area if invite only
- Add cancel button to editor
- Implement MessageFilter for pubstream and sourced messages
- Add supported protocols to siteinfo
- Allow pdf embeds
- Allow uninstall of plugins which no longer exists via cmdline tool
- Improve the homeinstall script
- Provide easy access to the autoperms setting for forum and repository channels
- Implement admin delete of files, photos and posts
- Allow a different username to be used when importing a channel
- Provide warnings about profile photo and cover photo permissions
- Set the 'force' flag on attach_mkdir when initiated from a DAV operation
Bugfixes
- Fix double file uploads when dropping files into jot
- Fix jot collapsing when drag and drop to open jot
- Fix wrong album name when moving photos
- Fix wrong timestamp localization before first update in mod mail
- Fix post exiration not propagated to other networks (which support it)
- Fix sys channels visible in dirsearch
- Fix remote_self not working correctly
- Fix photos not syncing properly if destination is a postgres site
- Fix wrong hubloc_url for activitypub hublocs
- Fix z_check_dns() for BSD
- Fix not null violation in oauth1
- Fix DB issues with oauth2 on postgresql
- Fix 'anybody authenticated' not correctly handled in can_comment_on_post()
- Fix postgres issue if register mode is set to yes - with approval
- Fix tag search not finding articles
- Fix issue with mentions when markdown post addon is enabled
- Fix duplicate addressbook entries on repeated channel imports
Addons
- Cart: various display improvements
- Cart: make cart work with postgresql DB backend
- Cart: add new hzservice for service_classes
- Cart: add storewide currency settings
- Cart: provide channel app 'Shop' for cart addon
- Cart: implement order updating
- Cart: use CSP hook for paypals checkout.js
- Cart: provide a cancel mechanism for orders
- Cart: add paypal button
- Gallery: new addon to display photo albums with the photoswipe library
- Ldapauth: optionally auto create channel
- Pubcrawl: new setting to ignore ActivityPub recipients in privacy groups
- Diaspora: fix issue with displaying multiple photos
- Pubcrawl: provide plink
- Pubcrawl: hubloc_url should be baseurl, not actor url
- Pubcrawl: deliver restricted posts from hubzilla as direct messages (there is no other way to address only a subset of followers in mastodon)
- Pubcrawl: address comments to a restricted mastodon post to /followers
Hubzilla 3.4.2 (2018-07-19)
- Compatibility fix for future versions
Hubzilla 3.4.1 (2018-06-08)
- Say bye, bye to GitHub and move sourcecode repositories to #^https://framagit.org/hubzilla
- When removing a connection, don't remove items that are starred, filed or replied to
- Do not show archived forums in forum widget
- Fix potential XSS vulnerabilities
- Translation updates
- Fix postresql issue with oauth2
- Improve abconfig queries
- Fix postgresql issue if register mode was set to yes - with approval
Addons
- Diaspora: fix likes of non-contacts not allowed to like allthough diaspora_public_comments is set
- Pubcrawl: fix wrong hubloc url
- Pubcrawl: fix issues with attachments
- Pubcrawl: fetch required item metadata in asfetch_item()
- Cavatar: use cavatar for all default profile photos if enabled
- Pubcrawl: fix peertube video display
- Pubcrawl: fix incoming activitypub comments not getting propagated downstream
- Statistics: fix .well-known/nodeinfo
- Pubsubhubbub: fix postgresql related issues
- Pubcrawl: send the original LD-signature signed activity when distributing comments downstream if we have it
- Cavatar: improve the image creation process
Hubzilla 3.4 (2018-05-04)
- Provide warnings about profile photo and cover photo permissions
- Don't duplicate addressbook entries on repeated channel imports
- Where possible strip zid parameter from links that get pasted into posts so that they will get a correct zid when rendered
- Rename boxy schema to Focus-Boxy
- Rename BS-Default schema to Focus-Light
- Mark simple_* schemas unmaintained and deprecated - they will be removed in next release if nobody steps up to maintain them.
- Implement trending tags for mod pubstream
- Relax restrictions to the design tools menu to allow those with write_pages permission
- Add alt pager to mod moderate
- Show existing cover photo when changing it
- Update to bootstrap lib to version 4.1
- Provide a higher accuracy method for active channels information
- Provide visible star status for starred posts
- Move the thread author menu to the wall item photo
- Accept system_language through either get or post
- Remove recipient name from stored notifications but keep them in emails
- Fix issue of being forced to log back in after leaving a delegated channel
- Implement last commented expiration setting in mod admin
- Create catcloud widget and provide a type option which can include 'cards' or 'articles'
- Modified notifications widget to add the public stream when the current user is allowed to see it only
- Don't provide a connect button for transient identities
- Merge techlevels and features
- Implement auto-save posts and comments in browser using localStorage
- Display directory server in siteinfo.json
- Bring back the dnt policy document
- Implement OAuth2/OpenIDConnect server
- Add basic structure for additional features documentation
- Community tag refactor
- Obscurify chats
- Provide a way to share wiki pages
- Update folder timestamp on uploaded files
- Code optimisations and de-duplication on updating parent commented timestamp
- Turn newmember widget into a feature
- Make list mode work in cards and articles
- Make alt pager work for articles and cards
- Initial support for alternative sort orders on the cloud pages
- Add Ochannel module for testing OStatus bad behaviour
- Add the social - federation permission role
- Update justified gallery lib from 3.6.3 to 3.6.5
Bugfixes
- Fix regression with forum widget unseen count
- Fix issue with imagemagick exif info
- Aonymous comments in StdLimits shouldn't be allowed
- Fix wiki pages not syncing
- Show "Unseen public activity" channel setting when site only public streams are activated
- Fix channel import failing to provide channel_password value
- Fix permalinks to children of articles and cards
- Fix missing year on profile birthday input
- Fix missing login/out buttons for medium screensize
- Preserve existing categories when updating an app from an embed source
- Fix app sellpage not being stored
- Fix tagadelic being overly protective of permissions
- Fix comments not displayed in single card/article view
- Fix anonymous comments bump thread
- Fix pending registrations visible in admin accounts
Addons
Pubcrawl: fix issues with "private" messages
Pubcrawl: fix issues with postgresql
Fuzzloc: new addon to blur your browser location
Pubcrawl: implement follow by webfinger
Cart: new addon which provides online shop functionalities (experimental)
Pubcrawl: implement two-way summary functionality
Wordpress: upgrade incutio xmlrpc library to use hubzilla curl wrapper
Hzfiles: various fixes
Diaspora: support full_name attribute in profile messages
Frphotos: deprecate plugin (keep it for reference)
Webmention: require html5 parser
GNU-Social: provide alternative xchan_url
Diaspora: fix wrong callback function
Diaspora: fix conversion of forum mentions to markdown by providing a !{forum@host} link syntax
Diaspora: fix item title not transferred
Hubzilla 3.2 (2018-03-09)
- Improve rendering of Readme files in plugin settings
- Add pdl file for mod moderate

View File

@@ -5,7 +5,7 @@ Hubzilla - Community Server
<p align="center" markdown="1">
<em><a href="https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt">Installing Hubzilla</a></em>
<em><a href="https://framagit.org/hubzilla/core/blob/master/install/INSTALL.txt">Installing Hubzilla</a></em>
</p>
**What is Hubzilla?**

View File

@@ -41,10 +41,8 @@ class PermissionLimits {
$limits = [];
$perms = Permissions::Perms();
$anon_comments = get_config('system','anonymous_comments',true);
foreach($perms as $k => $v) {
if(strstr($k, 'view') || ($k === 'post_comments' && $anon_comments))
if(strstr($k, 'view'))
$limits[$k] = PERMS_PUBLIC;
else
$limits[$k] = PERMS_SPECIFIC;
@@ -74,13 +72,13 @@ class PermissionLimits {
* @param int $channel_id
* @param string $perm (optional)
* @return
* * \b boolean false if no perm_limits set for this channel
* * \b int if $perm is set, return one of PERMS_* constants for this permission
* * \b false if no perm_limits set for this channel
* * \b int if $perm is set, return one of PERMS_* constants for this permission, default 0
* * \b array with all permission limits, if $perm is not set
*/
static public function Get($channel_id, $perm = '') {
if($perm) {
return PConfig::Get($channel_id, 'perm_limits', $perm);
return intval(PConfig::Get($channel_id, 'perm_limits', $perm));
}
PConfig::Load($channel_id);
@@ -90,4 +88,4 @@ class PermissionLimits {
return false;
}
}
}

View File

@@ -41,6 +41,24 @@ class PermissionRoles {
break;
case 'social_federation':
$ret['perms_auto'] = false;
$ret['default_collection'] = false;
$ret['directory_publish'] = true;
$ret['online'] = true;
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
'view_pages', 'view_wiki', 'send_stream', 'post_wall', 'post_comments',
'post_mail', 'chat', 'post_like', 'republish'
];
$ret['limits'] = PermissionLimits::Std_Limits();
$ret['limits']['post_comments'] = PERMS_AUTHED;
$ret['limits']['post_mail'] = PERMS_AUTHED;
$ret['limits']['post_like'] = PERMS_AUTHED;
$ret['limits']['chat'] = PERMS_AUTHED;
break;
case 'social_restricted':
$ret['perms_auto'] = false;
$ret['default_collection'] = true;
@@ -263,6 +281,7 @@ class PermissionRoles {
static public function roles() {
$roles = [
t('Social Networking') => [
'social_federation' => t('Social - Federation'),
'social' => t('Social - Mostly Public'),
'social_restricted' => t('Social - Restricted'),
'social_private' => t('Social - Private')
@@ -289,6 +308,8 @@ class PermissionRoles {
]
];
call_hooks('list_permission_roles',$roles);
return $roles;
}

View File

@@ -67,7 +67,7 @@ class Permissions {
'post_comments' => t('Can comment on or like my posts'),
'post_mail' => t('Can send me private mail messages'),
'post_like' => t('Can like/dislike profiles and profile things'),
'tag_deliver' => t('Can forward to all my channel connections via @+ mentions in posts'),
'tag_deliver' => t('Can forward to all my channel connections via ! mentions in posts'),
'chat' => t('Can chat with me'),
'republish' => t('Can source my public posts in derived channels'),
'delegate' => t('Can administer my channel')

View File

@@ -50,14 +50,19 @@ class Cron {
// expire any expired items
$r = q("select id from item where expires > '2001-01-01 00:00:00' and expires < %s
$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) {
require_once('include/items.php');
foreach($r as $rr)
drop_item($rr['id'],false);
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.
Zotlabs\Daemon\Master::Summon( [ 'Notifier', 'drop', $rr['id'] ] );
}
}
}

View File

@@ -75,6 +75,8 @@ class Deliver {
q("delete from dreport where dreport_queue = '%s'",
dbesc($argv[$x])
);
continue;
}
}

View File

@@ -34,7 +34,8 @@ class Expire {
logger('expire: start', LOGGER_DEBUG);
$site_expire = get_config('system', 'default_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);
@@ -64,7 +65,7 @@ class Expire {
// if the site or service class expiration is non-zero and less than person expiration, use that
logger('Expire: ' . $rr['channel_address'] . ' interval: ' . $expire_days, LOGGER_DEBUG);
item_expire($rr['channel_id'], $expire_days);
item_expire($rr['channel_id'], $expire_days, $commented_days);
}
}
@@ -85,7 +86,7 @@ class Expire {
logger('Expire: sys interval: ' . $expire_days, LOGGER_DEBUG);
if ($expire_days)
item_expire($x['channel_id'], $expire_days);
item_expire($x['channel_id'], $expire_days, $commented_days);
logger('Expire: sys: done', LOGGER_DEBUG);
}

View File

@@ -71,14 +71,18 @@ class Poller {
$randfunc = db_getfunc('RAND');
$contacts = q("SELECT * FROM abook LEFT JOIN xchan on abook_xchan = xchan_hash
$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,
xchan.xchan_network,
account.account_lastlog, account.account_flags
FROM abook LEFT JOIN xchan on abook_xchan = xchan_hash
LEFT JOIN account on abook_account = account_id
where abook_self = 0
$sql_extra
AND (( account_flags = %d ) OR ( account_flags = %d )) $abandon_sql ORDER BY $randfunc",
intval(ACCOUNT_OK),
intval(ACCOUNT_UNVERIFIED) // FIXME
);
if($contacts) {

View File

@@ -9,6 +9,7 @@ namespace Zotlabs\Lib;
*/
class ActivityStreams {
public $raw = null;
public $data;
public $valid = false;
public $id = '';
@@ -33,7 +34,9 @@ class ActivityStreams {
*/
function __construct($string) {
$this->raw = $string;
$this->data = json_decode($string, true);
if($this->data) {
$this->valid = true;
}
@@ -204,7 +207,7 @@ class ActivityStreams {
}
$x = z_fetch_url($url, true, $redirects,
['headers' => [ 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams", application/activity+json' ]]);
['headers' => [ 'Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ]]);
if($x['success'])
return json_decode($x['body'], true);

View File

@@ -13,7 +13,12 @@ require_once('include/channel.php');
class Apps {
static public $installed_system_apps = null;
static public $available_apps = null;
static public $installed_apps = null;
static public $base_apps = null;
static public function get_system_apps($translate = true) {
@@ -45,6 +50,8 @@ class Apps {
}
}
call_hooks('get_system_apps',$ret);
return $ret;
}
@@ -53,22 +60,52 @@ class Apps {
static public function import_system_apps() {
if(! local_channel())
return;
self::$base_apps = get_config('system','base_apps',[
'Connections',
'Suggest Channels',
'Grid',
'Settings',
'Files',
'Channel Home',
'View Profile',
'Photos',
'Events',
'Directory',
'Search',
'Help',
'Mail',
'Profile Photo'
]);
$apps = self::get_system_apps(false);
self::$installed_system_apps = q("select * from app where app_system = 1 and app_channel = %d",
self::$available_apps = q("select * from app where app_channel = 0");
self::$installed_apps = q("select * from app where app_channel = %d",
intval(local_channel())
);
if($apps) {
foreach($apps as $app) {
$id = self::check_install_system_app($app);
// $id will be boolean true or false to install an app, or an integer id to update an existing app
if($id !== false) {
$app['uid'] = 0;
$app['guid'] = hash('whirlpool',$app['name']);
$app['system'] = 1;
self::app_install(0,$app);
}
$id = self::check_install_personal_app($app);
// $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 = '';
$r = q("select * from term where otype = %d and oid = %d",
$s = EMPTY_STR;
$r = q("select term from term where otype = %d and oid = %d",
intval(TERM_OBJ_APP),
intval($id)
);
@@ -85,6 +122,7 @@ class Apps {
$app['guid'] = hash('whirlpool',$app['name']);
$app['system'] = 1;
self::app_install(local_channel(),$app);
}
}
}
@@ -95,17 +133,22 @@ class Apps {
*/
static public function check_install_system_app($app) {
if((! is_array(self::$installed_system_apps)) || (! count(self::$installed_system_apps))) {
if((! is_array(self::$available_apps)) || (! count(self::$available_apps))) {
return true;
}
$notfound = true;
foreach(self::$installed_system_apps as $iapp) {
foreach(self::$available_apps as $iapp) {
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
$notfound = false;
if(($iapp['app_version'] != $app['version'])
if(($iapp['app_version'] !== $app['version'])
|| ($app['plugin'] && (! $iapp['app_plugin']))) {
return intval($iapp['app_id']);
}
if(($iapp['app_url'] !== $app['url'])
|| ($iapp['app_photo'] !== $app['photo'])) {
return intval($iapp['app_id']);
}
}
}
@@ -113,6 +156,31 @@ class Apps {
}
/**
* 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.
*/
static public function check_install_personal_app($app) {
$installed = false;
foreach(self::$installed_apps as $iapp) {
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
$installed = true;
if(($iapp['app_version'] != $app['version'])
|| ($app['plugin'] && (! $iapp['app_plugin']))) {
return intval($iapp['app_id']);
}
}
}
if(! $installed && in_array($app['name'],self::$base_apps)) {
return true;
}
return false;
}
static public function app_name_compare($a,$b) {
return strcasecmp($a['name'],$b['name']);
}
@@ -135,12 +203,11 @@ class Apps {
if($lines) {
foreach($lines as $x) {
if(preg_match('/^([a-zA-Z].*?):(.*?)$/ism',$x,$matches)) {
$ret[$matches[1]] = trim(str_replace(array('$baseurl','$nick'),array($baseurl,$address),$matches[2]));
$ret[$matches[1]] = trim($matches[2]);
}
}
}
if(! $ret['photo'])
$ret['photo'] = $baseurl . '/' . get_default_profile_photo(80);
@@ -233,7 +300,6 @@ class Apps {
'View Bookmarks' => t('View Bookmarks'),
'My Chatrooms' => t('My Chatrooms'),
'Connections' => t('Connections'),
'Firefox Share' => t('Firefox Share'),
'Remote Diagnostics' => t('Remote Diagnostics'),
'Suggest Channels' => t('Suggest Channels'),
'Login' => t('Login'),
@@ -288,6 +354,7 @@ class Apps {
* 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
@@ -300,7 +367,7 @@ class Apps {
return;
if(! $papp['photo'])
$papp['photo'] = z_root() . '/' . get_default_profile_photo(80);
$papp['photo'] = 'icon:gear';
self::translate_system_apps($papp);
@@ -309,9 +376,24 @@ class Apps {
$papp['papp'] = self::papp_encode($papp);
// This will catch somebody clicking on a system "available" app that hasn't had the path macros replaced
// and they are allowed to see the app
if(strstr($papp['url'],'$baseurl') || strstr($papp['url'],'$nick') || strstr($papp['photo'],'$baseurl') || strstr($pap['photo'],'$nick')) {
$view_channel = local_channel();
if(! $view_channel) {
$sys = get_sys_channel();
$view_channel = $sys['channel_id'];
}
self::app_macros($view_channel,$papp);
}
if(! strstr($papp['url'],'://'))
$papp['url'] = z_root() . ((strpos($papp['url'],'/') === 0) ? '' : '/') . $papp['url'];
foreach($papp as $k => $v) {
if(strpos($v,'http') === 0 && $k != 'papp') {
if(! (local_channel() && strpos($v,z_root()) === 0)) {
@@ -400,12 +482,15 @@ class Apps {
));
}
if($mode === 'install') {
$papp['embed'] = true;
}
return replace_macros(get_markup_template('app.tpl'),array(
'$app' => $papp,
'$icon' => $icon,
'$hosturl' => $hosturl,
'$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
'$install' => (($hosturl && $mode == 'view') ? $install_action : ''),
'$install' => (($hosturl && in_array($mode, ['view','install'])) ? $install_action : ''),
'$edit' => ((local_channel() && $installed && $mode == 'edit') ? t('Edit') : ''),
'$delete' => ((local_channel() && $installed && $mode == 'edit') ? t('Delete') : ''),
'$undelete' => ((local_channel() && $installed && $mode == 'edit') ? t('Undelete') : ''),
@@ -468,21 +553,13 @@ class Apps {
intval(TERM_OBJ_APP),
intval($x[0]['id'])
);
if($x[0]['app_system']) {
$r = q("update app set app_deleted = 1 where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
}
else {
$r = q("delete from app where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
$r = q("delete from app where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
// we don't sync system apps - they may be completely different on the other system
build_sync_packet($uid,array('app' => $x));
}
// we don't sync system apps - they may be completely different on the other system
build_sync_packet($uid,array('app' => $x));
}
else {
self::app_undestroy($uid,$app);
@@ -729,6 +806,29 @@ class Apps {
}
static public function app_macros($uid,&$arr) {
if(! intval($uid))
return;
$baseurl = z_root();
$channel = channelx_by_n($uid);
$address = (($channel) ? $channel['channel_address'] : '');
//future expansion
$observer = \App::get_observer();
$arr['url'] = str_replace(array('$baseurl','$nick'),array($baseurl,$address),$arr['url']);
$arr['photo'] = str_replace(array('$baseurl','$nick'),array($baseurl,$address),$arr['photo']);
}
static public function app_store($arr) {
//logger('app_store: ' . print_r($arr,true));
@@ -736,12 +836,20 @@ class Apps {
$darray = array();
$ret = array('success' => false);
$sys = get_sys_channel();
self::app_macros($arr['uid'],$arr);
$darray['app_url'] = ((x($arr,'url')) ? $arr['url'] : '');
$darray['app_channel'] = ((x($arr,'uid')) ? $arr['uid'] : 0);
if((! $darray['app_url']) || (! $darray['app_channel']))
if(! $darray['app_url'])
return $ret;
if((! $arr['uid']) && (! $arr['author'])) {
$arr['author'] = $sys['channel_hash'];
}
if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) {
$x = import_xchan_photo($arr['photo'],get_observer_hash(),true);
$arr['photo'] = $x[1];
@@ -785,6 +893,7 @@ class Apps {
dbesc($darray['app_plugin']),
intval($darray['app_deleted'])
);
if($r) {
$ret['success'] = true;
$ret['app_id'] = $darray['app_id'];
@@ -815,11 +924,14 @@ class Apps {
$darray = array();
$ret = array('success' => false);
self::app_macros($arr['uid'],$arr);
$darray['app_url'] = ((x($arr,'url')) ? $arr['url'] : '');
$darray['app_channel'] = ((x($arr,'uid')) ? $arr['uid'] : 0);
$darray['app_id'] = ((x($arr,'guid')) ? $arr['guid'] : 0);
if((! $darray['app_url']) || (! $darray['app_channel']) || (! $darray['app_id']))
if((! $darray['app_url']) || (! $darray['app_id']))
return $ret;
if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) {
@@ -871,6 +983,12 @@ class Apps {
dbesc($darray['app_id']),
intval($darray['app_channel'])
);
// if updating an embed app, don't mess with any existing categories.
if(array_key_exists('embed',$arr) && intval($arr['embed']) && (intval($darray['app_channel'])))
return $ret;
if($x) {
q("delete from term where otype = %d and oid = %d",
intval(TERM_OBJ_APP),
@@ -900,9 +1018,6 @@ class Apps {
$ret['type'] = 'personal';
if($app['app_id'])
$ret['guid'] = $app['app_id'];
if($app['app_id'])
$ret['guid'] = $app['app_id'];

View File

@@ -266,7 +266,7 @@ class Chatroom {
intval($room_id),
dbesc($xchan),
dbesc(datetime_convert()),
dbesc($arr['chat_text'])
dbesc(str_rot47(base64url_encode($arr['chat_text'])))
);
$ret['success'] = true;

View File

@@ -115,6 +115,9 @@ class Enotify {
$always_show_in_notices = get_pconfig($recip['channel_id'],'system','always_show_in_notices');
$vnotify = get_pconfig($recip['channel_id'],'system','vnotify');
$salutation = $recip['channel_name'];
// e.g. "your post", "David's photo", etc.
$possess_desc = t('%s <!item_type!>');
@@ -123,7 +126,7 @@ class Enotify {
logger('notification: mail');
$subject = sprintf( t('[$Projectname:Notify] New mail received at %s'),$sitename);
$preamble = sprintf( t('%1$s, %2$s sent you a new private message at %3$s.'),$recip['channel_name'], $sender['xchan_name'],$sitename);
$preamble = sprintf( t('%1$s sent you a new private message at %2$s.'), $sender['xchan_name'],$sitename);
$epreamble = sprintf( t('%1$s sent you %2$s.'),'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]', '[zrl=$itemlink]' . t('a private message') . '[/zrl]');
$sitelink = t('Please visit %s to view and/or reply to your private messages.');
$tsitelink = sprintf( $sitelink, $siteurl . '/mail/' . $params['item']['id'] );
@@ -142,7 +145,7 @@ class Enotify {
if(array_key_exists('item',$params) && in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
if(! $always_show_in_notices) {
if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
logger('notification: not a visible activity. Ignoring.');
pop_lang();
return;
@@ -195,8 +198,7 @@ class Enotify {
//$possess_desc = str_replace('<!item_type!>',$possess_desc);
// "a post"
$dest_str = sprintf(t('%1$s, %2$s %3$s [zrl=%4$s]a %5$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s %2$s [zrl=%3$s]a %4$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$action,
$itemlink,
@@ -204,8 +206,7 @@ class Enotify {
// "George Bull's post"
if($p)
$dest_str = sprintf(t('%1$s, %2$s %3$s [zrl=%4$s]%5$s\'s %6$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s %2$s [zrl=%3$s]%4$s\'s %5$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$action,
$itemlink,
@@ -214,8 +215,7 @@ class Enotify {
// "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 %3$s [zrl=%4$s]your %5$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s %2$s [zrl=%3$s]your %4$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$action,
$itemlink,
@@ -230,7 +230,7 @@ class Enotify {
$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, %2$s commented on an item/conversation you have been following.'), $recip['channel_name'], $sender['xchan_name']);
$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.');
@@ -249,7 +249,7 @@ class Enotify {
$itemlink = $params['link'];
if (array_key_exists('item',$params) && (! activity_match($params['item']['verb'],ACTIVITY_LIKE))) {
if(! $always_show_in_notices) {
if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
logger('notification: not a visible activity. Ignoring.');
pop_lang();
return;
@@ -296,8 +296,7 @@ class Enotify {
// "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 liked [zrl=%3$s]your %4$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s liked [zrl=%2$s]your %3$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$itemlink,
$item_post_type);
@@ -312,7 +311,7 @@ class Enotify {
// 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, %2$s liked an item/conversation you created.'), $recip['channel_name'], $sender['xchan_name']);
$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.');
@@ -325,10 +324,9 @@ class Enotify {
if($params['type'] == NOTIFY_WALL) {
$subject = sprintf( t('[$Projectname:Notify] %s posted to your profile wall') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s posted to your profile wall at %3$s') , $recip['channel_name'], $sender['xchan_name'], $sitename);
$preamble = sprintf( t('%1$s posted to your profile wall at %2$s') , $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s posted to [zrl=%3$s]your wall[/zrl]') ,
$recip['channel_name'],
$epreamble = sprintf( t('%1$s posted to [zrl=%2$s]your wall[/zrl]') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$params['link']);
@@ -352,9 +350,8 @@ class Enotify {
}
$subject = sprintf( t('[$Projectname:Notify] %s tagged you') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s tagged you at %3$s') , $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s [zrl=%3$s]tagged you[/zrl].') ,
$recip['channel_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']);
@@ -366,9 +363,8 @@ class Enotify {
if ($params['type'] == NOTIFY_POKE) {
$subject = sprintf( t('[$Projectname:Notify] %1$s poked you') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s poked you at %3$s') , $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s [zrl=%2$s]poked you[/zrl].') ,
$recip['channel_name'],
$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']);
@@ -384,9 +380,8 @@ class Enotify {
if ($params['type'] == NOTIFY_TAGSHARE) {
$subject = sprintf( t('[$Projectname:Notify] %s tagged your post') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s tagged your post at %3$s') , $recip['channel_name'],$sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s tagged [zrl=%3$s]your post[/zrl]') ,
$recip['channel_name'],
$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);
@@ -398,9 +393,8 @@ class Enotify {
if ($params['type'] == NOTIFY_INTRO) {
$subject = sprintf( t('[$Projectname:Notify] Introduction received'));
$preamble = sprintf( t('%1$s, you\'ve received an new connection request from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]a new connection request[/zrl] from %3$s.'),
$recip['channel_name'],
$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]');
$body = sprintf( t('You may visit their profile at %s'),$sender['xchan_url']);
@@ -413,9 +407,8 @@ class Enotify {
if ($params['type'] == NOTIFY_SUGGEST) {
$subject = sprintf( t('[$Projectname:Notify] Friend suggestion received'));
$preamble = sprintf( t('%1$s, you\'ve received a friend suggestion from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]a friend suggestion[/zrl] for %3$s from %4$s.'),
$recip['channel_name'],
$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]');
@@ -664,7 +657,7 @@ class Enotify {
'$banner' => $datarray['banner'],
'$notify_icon' => \Zotlabs\Lib\System::get_notify_icon(),
'$product' => $datarray['product'],
'$preamble' => $datarray['preamble'],
'$preamble' => $salutation . '<br><br>' . $datarray['preamble'],
'$sitename' => $datarray['sitename'],
'$siteurl' => $datarray['siteurl'],
'$source_name' => $datarray['source_name'],
@@ -686,7 +679,7 @@ class Enotify {
$email_text_body = replace_macros($tpl, array(
'$banner' => $datarray['banner'],
'$product' => $datarray['product'],
'$preamble' => $datarray['preamble'],
'$preamble' => $salutation . "\n\n" . $datarray['preamble'],
'$sitename' => $datarray['sitename'],
'$siteurl' => $datarray['siteurl'],
'$source_name' => $datarray['source_name'],
@@ -754,8 +747,8 @@ class Enotify {
// generate a mime boundary
$mimeBoundary = rand(0, 9) . "-"
.rand(10000000000, 9999999999) . "-"
.rand(10000000000, 9999999999) . "=:"
.rand(100000000, 999999999) . "-"
.rand(100000000, 999999999) . "=:"
.rand(10000, 99999);
// generate a multipart/alternative message header

View File

@@ -0,0 +1,79 @@
<?php
namespace Zotlabs\Lib;
class MessageFilter {
static public function evaluate($item,$incl,$excl) {
require_once('include/html2plain.php');
unobscure($item);
$text = prepare_text($item['body'],$item['mimetype']);
$text = html2plain(($item['title']) ? $item['title'] . ' ' . $text : $text);
$lang = null;
if((strpos($incl,'lang=') !== false) || (strpos($excl,'lang=') !== false)) {
$lang = detect_language($text);
}
$tags = ((is_array($item['term']) && count($item['term'])) ? $item['term'] : false);
// exclude always has priority
$exclude = (($excl) ? explode("\n",$excl) : null);
if($exclude) {
foreach($exclude as $word) {
$word = trim($word);
if(! $word)
continue;
if(substr($word,0,1) === '#' && $tags) {
foreach($tags as $t)
if((($t['ttype'] == TERM_HASHTAG) || ($t['ttype'] == TERM_COMMUNITYTAG)) && (($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(stristr($text,$word) !== false)
return false;
}
}
$include = (($incl) ? explode("\n",$incl) : null);
if($include) {
foreach($include as $word) {
$word = trim($word);
if(! $word)
continue;
if(substr($word,0,1) === '#' && $tags) {
foreach($tags as $t)
if((($t['ttype'] == TERM_HASHTAG) || ($t['ttype'] == TERM_COMMUNITYTAG)) && (($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(stristr($text,$word) !== false)
return true;
}
}
else {
return true;
}
return false;
}
}

View File

@@ -171,16 +171,23 @@ class NativeWiki {
dbesc(NWIKI_ITEM_RESOURCE_TYPE),
dbesc($resource_id)
);
if($r) {
$q = q("select * from item where resource_type = 'nwikipage' and resource_id = '%s'",
dbesc($r[0]['resource_type'])
dbesc($r[0]['resource_id'])
);
if($q) {
$r = array_merge($r,$q);
}
xchan_query($r);
$sync_item = fetch_post_tags($r);
build_sync_packet($uid,array('wiki' => array(encode_item($sync_item[0],true))));
if($sync_item) {
$pkt = [];
foreach($sync_item as $w) {
$pkt[] = encode_item($w,true);
}
build_sync_packet($uid,array('wiki' => $pkt));
}
}
}

View File

@@ -107,7 +107,7 @@ class Share {
}
public function bbcode() {
$bb = NULL_STR;
$bb = EMPTY_STR;
if(! $this->item)
return $bb;
@@ -123,11 +123,13 @@ class Share {
$bb = substr($this->item['body'], $pos);
} else {
$bb = "[share author='".urlencode($this->item['author']['xchan_name']).
"' profile='".$this->item['author']['xchan_url'] .
"' avatar='".$this->item['author']['xchan_photo_s'].
"' link='".$this->item['plink'].
"' posted='".$this->item['created'].
"' message_id='".$this->item['mid']."']";
"' 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') .
"' posted='" . $this->item['created'] .
"' message_id='" . $this->item['mid'] .
"']";
if($this->item['title'])
$bb .= '[b]'.$this->item['title'].'[/b]'."\r\n";
$bb .= (($is_photo) ? $photo_bb . "\r\n" . $this->item['body'] : $this->item['body']);
@@ -138,4 +140,4 @@ class Share {
}
}
}

View File

@@ -54,7 +54,7 @@ class System {
static public function get_project_srclink() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['project_srclink'])
return \App::$config['system']['project_srclink'];
return 'https://github.com/redmatrix/hubzilla';
return 'https://framagit.org/hubzilla/core.git';
}
static public function get_server_role() {

View File

@@ -102,6 +102,13 @@ class ThreadItem {
if($item['author']['xchan_network'] === 'rss')
$shareable = true;
$privacy_warning = false;
if(($item['item_private'] == 1) && ($item['owner']['xchan_network'] === 'activitypub')) {
$recips = get_iconfig($item['parent'], 'activitypub', 'recips');
if(! in_array($observer['xchan_url'], $recips['to']))
$privacy_warning = true;
}
$mode = $conv->get_mode();
@@ -141,6 +148,10 @@ class ThreadItem {
'delete' => t('Delete'),
);
}
elseif(is_site_admin()) {
$drop = [ 'dropping' => true, 'delete' => t('Admin Delete') ];
}
// FIXME
if($observer_is_pageowner) {
$multidrop = array(
@@ -232,16 +243,9 @@ class ThreadItem {
// FIXME check this permission
if(($conv->get_profile_owner() == local_channel()) && (! array_key_exists('real_uid',$item))) {
// FIXME we don't need all this stuff, some can be done in the template
$star = array(
'do' => t("Add Star"),
'undo' => t("Remove Star"),
'toggle' => t("Toggle Star Status"),
'classdo' => (intval($item['item_starred']) ? "hidden" : ""),
'classundo' => (intval($item['item_starred']) ? "" : "hidden"),
'isstarred' => (intval($item['item_starred']) ? "starred fa-star" : "unstarred fa-star-o"),
'starred' => t('starred'),
'isstarred' => ((intval($item['item_starred'])) ? true : false),
);
}
@@ -366,6 +370,7 @@ 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,
'privacy_warning' => $privacy_warning,
'verified' => $verified,
'unverified' => $unverified,
'forged' => $forged,
@@ -733,6 +738,8 @@ 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' => '',
@@ -754,7 +761,7 @@ class ThreadItem {
'$edquote' => t('Quote'),
'$edcode' => t('Code'),
'$edimg' => t('Image'),
'$edatt' => t('Attach File'),
'$edatt' => t('Attach/Upload file'),
'$edurl' => t('Insert Link'),
'$edvideo' => t('Video'),
'$preview' => t('Preview'), // ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''),
@@ -768,7 +775,8 @@ 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)') ]
'$anonurl' => [ 'anonurl', t('Your website URL (optional)') ],
'$auto_save_draft' => $feature_auto_save_draft,
));
return $comment_box;

View File

@@ -24,7 +24,7 @@ class Acl extends \Zotlabs\Web\Controller {
function init() {
logger('mod_acl: ' . print_r($_REQUEST,true));
// logger('mod_acl: ' . print_r($_GET,true),LOGGER_DATA);
$start = (x($_REQUEST,'start') ? $_REQUEST['start'] : 0);
$count = (x($_REQUEST,'count') ? $_REQUEST['count'] : 500);
@@ -82,7 +82,7 @@ class Acl extends \Zotlabs\Web\Controller {
if($search) {
$sql_extra = " AND groups.gname LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
$sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . ((strpos($search,'@') === false) ? "%@%'" : "%'")) . ") ";
$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.
// Would be MUCH easier if it instead returned a very large value
@@ -92,10 +92,9 @@ class Acl extends \Zotlabs\Web\Controller {
$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($search)) . "' IN xchan_addr) end, ";
. "' IN xchan_name) else position('" . protect_sprintf(dbesc(punify($search))) . "' IN xchan_addr) end, ";
$col = ((strpos($search,'@') !== false) ? 'xchan_addr' : 'xchan_name' );
$sql_extra3 = "AND $col like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
$sql_extra3 = "AND ( xchan_addr like " . protect_sprintf( "'%" . dbesc(punify($search)) . "%'" ) . " OR xchan_name like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ) ";
}
else {
@@ -268,15 +267,15 @@ class Acl extends \Zotlabs\Web\Controller {
});
}
}
if(intval(get_config('system','taganyone')) || intval(get_pconfig(local_channel(),'system','taganyone'))) {
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 $sql_extra2 order by $order_extra2 xchan_name asc"
);
if($r2)
$r = array_merge($r,$r2);
}
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"
);
if($r2) {
$r = array_merge($r,$r2);
$r = unique_multidim_array($r,'hash');
}
}
}
elseif($type == 'm') {
@@ -337,24 +336,23 @@ class Acl extends \Zotlabs\Web\Controller {
if($r) {
foreach($r as $g) {
if(($g['network'] === 'rss') && ($type != 'a'))
if(in_array($g['network'],['rss','anon','unknown']) && ($type != 'a'))
continue;
$g['hash'] = urlencode($g['hash']);
if(! $g['nick']) {
$t = explode(' ',strtolower($g['name']));
$g['nick'] = $t[0] . '@';
$g['nick'] = $g['url'];
}
if(in_array($g['hash'],$permitted) && in_array($type, [ 'c', 'f' ]) && (! $noforums)) {
if(in_array($g['hash'],$permitted) && $type === 'f' && (! $noforums)) {
$contacts[] = array(
"type" => "c",
"photo" => "images/twopeople.png",
"name" => $g['name'] . (($type === 'f') ? '' : '+'),
"id" => urlencode($g['id']) . (($type === 'f') ? '' : '+'),
"name" => $g['name'],
"id" => urlencode($g['id']),
"xid" => $g['hash'],
"link" => $g['nick'],
"link" => (($g['nick']) ? $g['nick'] : $g['url']),
"nick" => substr($g['nick'],0,strpos($g['nick'],'@')),
"self" => (intval($g['abook_self']) ? 'abook-self' : ''),
"taggable" => 'taggable',
@@ -368,8 +366,8 @@ class Acl extends \Zotlabs\Web\Controller {
"name" => $g['name'],
"id" => urlencode($g['id']),
"xid" => $g['hash'],
"link" => $g['nick'],
"nick" => (($g['nick']) ? substr($g['nick'],0,strpos($g['nick'],'@')) : $g['nick']),
"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" => '',
@@ -435,7 +433,7 @@ class Acl extends \Zotlabs\Web\Controller {
$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($search) : '');
$query .= '&name=' . urlencode($search) . "&limit=$count" . (($address) ? '&address=' . urlencode(punify($search)) : '');
$x = z_fetch_url($query);
if($x['success']) {

View File

@@ -100,8 +100,12 @@ class Admin extends \Zotlabs\Web\Controller {
}
// pending registrations
$r = q("SELECT COUNT(id) AS rtotal FROM register WHERE uid != '0'");
$pending = $r[0]['rtotal'];
$pdg = q("SELECT account.*, register.hash from account left join register on account_id = register.uid where (account_flags & %d ) > 0 ",
intval(ACCOUNT_PENDING)
);
$pending = (($pdg) ? count($pdg) : 0);
// available channels, primary and clones
$channels = array();
@@ -140,7 +144,7 @@ class Admin extends \Zotlabs\Web\Controller {
'$accounts' => array( t('Registered accounts'), $accounts),
'$pending' => array( t('Pending registrations'), $pending),
'$channels' => array( t('Registered channels'), $channels),
'$plugins' => array( t('Active plugins'), $plugins ),
'$plugins' => array( t('Active addons'), $plugins ),
'$version' => array( t('Version'), STD_VERSION),
'$vmaster' => array( t('Repository version (master)'), $vmaster),
'$vdev' => array( t('Repository version (dev)'), $vdev),

View File

@@ -133,12 +133,13 @@ class Accounts {
$base = z_root() . '/admin/accounts?f=';
$odir = (($dir === 'asc') ? '0' : '1');
$users = q("SELECT account_id , account_email, account_lastlog, account_created, account_expires, account_service_class, ( account_flags & %d ) > 0 as blocked,
(SELECT %s FROM channel as ch WHERE ch.channel_account_id = ac.account_id and ch.channel_removed = 0 ) as channels FROM account as ac
where true $serviceclass order by $key $dir limit %d offset %d ",
where true $serviceclass and account_flags != %d order by $key $dir limit %d offset %d ",
intval(ACCOUNT_BLOCKED),
db_concat('ch.channel_address', ' '),
intval(ACCOUNT_BLOCKED | ACCOUNT_PENDING),
intval(\App::$pager['itemspage']),
intval(\App::$pager['start'])
);
@@ -203,4 +204,4 @@ class Accounts {
}
}
}

View File

@@ -2,10 +2,10 @@
namespace Zotlabs\Module\Admin;
use \Zotlabs\Storage\GitRepo as GitRepo;
use \Zotlabs\Storage\GitRepo;
use \Michelf\MarkdownExtra;
class Plugins {
class Addons {
/**
* @brief
@@ -20,7 +20,7 @@ class Plugins {
$func($a);
}
goaway(z_root() . '/admin/plugins/' . argv(2) );
goaway(z_root() . '/admin/addons/' . argv(2) );
}
elseif(argc() > 2) {
switch(argv(2)) {
@@ -243,7 +243,7 @@ class Plugins {
}
/**
* @brief Plugins admin page.
* @brief Addons admin page.
*
* @return string with parsed HTML
*/
@@ -278,7 +278,7 @@ class Plugins {
$info['disabled'] = 1-intval($x);
if (x($_GET,"a") && $_GET['a']=="t"){
check_form_security_token_redirectOnErr('/admin/plugins', 'admin_plugins', 't');
check_form_security_token_redirectOnErr('/admin/addons', 'admin_addons', 't');
$pinstalled = false;
// Toggle plugin status
$idx = array_search($plugin, \App::$plugins);
@@ -298,9 +298,9 @@ class Plugins {
if($pinstalled) {
@require_once("addon/$plugin/$plugin.php");
if(function_exists($plugin.'_plugin_admin'))
goaway(z_root() . '/admin/plugins/' . $plugin);
goaway(z_root() . '/admin/addons/' . $plugin);
}
goaway(z_root() . '/admin/plugins' );
goaway(z_root() . '/admin/addons' );
}
// display plugin details
@@ -339,7 +339,7 @@ class Plugins {
$t = get_markup_template('admin_plugins_details.tpl');
return replace_macros($t, array(
'$title' => t('Administration'),
'$page' => t('Plugins'),
'$page' => t('Addons'),
'$toggle' => t('Toggle'),
'$settings' => t('Settings'),
'$baseurl' => z_root(),
@@ -358,11 +358,11 @@ class Plugins {
'$disabled' => t('Disabled - version incompatibility'),
'$admin_form' => $admin_form,
'$function' => 'plugins',
'$function' => 'addons',
'$screenshot' => '',
'$readme' => $readme,
'$form_security_token' => get_form_security_token('admin_plugins'),
'$form_security_token' => get_form_security_token('admin_addons'),
));
}
@@ -407,11 +407,11 @@ class Plugins {
$admin_plugins_add_repo_form= replace_macros(
get_markup_template('admin_plugins_addrepo.tpl'), array(
'$post' => 'admin/plugins/addrepo',
'$desc' => t('Enter the public git repository URL of the plugin repo.'),
'$repoURL' => array('repoURL', t('Plugin repo git URL'), '', ''),
'$post' => 'admin/addons/addrepo',
'$desc' => t('Enter the public git repository URL of the addon repo.'),
'$repoURL' => array('repoURL', t('Addon repo git URL'), '', ''),
'$repoName' => array('repoName', t('Custom repo name'), '', '', t('(optional)')),
'$submit' => t('Download Plugin Repo')
'$submit' => t('Download Addon Repo')
)
);
$newRepoModalID = random_string(3);
@@ -434,17 +434,17 @@ class Plugins {
$t = get_markup_template('admin_plugins.tpl');
return replace_macros($t, array(
'$title' => t('Administration'),
'$page' => t('Plugins'),
'$page' => t('Addons'),
'$submit' => t('Submit'),
'$baseurl' => z_root(),
'$function' => 'plugins',
'$function' => 'addons',
'$plugins' => $plugins,
'$disabled' => t('Disabled - version incompatibility'),
'$form_security_token' => get_form_security_token('admin_plugins'),
'$form_security_token' => get_form_security_token('admin_addons'),
'$allowManageRepos' => $allowManageRepos,
'$managerepos' => t('Manage Repos'),
'$installedtitle' => t('Installed Plugin Repositories'),
'$addnewrepotitle' => t('Install a New Plugin Repository'),
'$installedtitle' => t('Installed Addon Repositories'),
'$addnewrepotitle' => t('Install a New Addon Repository'),
'$expandform' => false,
'$form' => $admin_plugins_add_repo_form,
'$newRepoModal' => $newRepoModal,

View File

@@ -16,7 +16,13 @@ class Security {
$block_public = ((x($_POST,'block_public')) ? True : False);
set_config('system','block_public',$block_public);
$cloud_noroot = ((x($_POST,'cloud_noroot')) ? 1 : 0);
set_config('system','cloud_disable_siteroot',1 - $cloud_noroot);
$cloud_disksize = ((x($_POST,'cloud_disksize')) ? 1 : 0);
set_config('system','cloud_report_disksize',$cloud_disksize);
$ws = $this->trim_array_elems(explode("\n",$_POST['whitelisted_sites']));
set_config('system','whitelisted_sites',$ws);
@@ -87,6 +93,8 @@ class Security {
'$page' => t('Security'),
'$form_security_token' => get_form_security_token('admin_security'),
'$block_public' => array('block_public', t("Block public"), get_config('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently authenticated.")),
'$cloud_noroot' => [ 'cloud_noroot', t('Provide a cloud root directory'), 1 - intval(get_config('system','cloud_disable_siteroot')), t('The cloud root directory lists all channel names which provide public files') ],
'$cloud_disksize' => [ 'cloud_disksize', t('Show total disk space available to cloud uploads'), intval(get_config('system','cloud_report_disksize')), '' ],
'$transport_security' => array('transport_security', t('Set "Transport Security" HTTP header'),intval(get_config('system','transport_security_header')),''),
'$content_security' => array('content_security', t('Set "Content Security Policy" HTTP header'),intval(get_config('system','content_security_policy')),''),
'$allowed_email' => array('allowed_email', t("Allowed email domains"), get_config('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")),

View File

@@ -38,7 +38,12 @@ class Site {
$site_sellpage = ((x($_POST,'site_sellpage')) ? notags(trim($_POST['site_sellpage'])) : '');
$site_location = ((x($_POST,'site_location')) ? notags(trim($_POST['site_location'])) : '');
$frontpage = ((x($_POST,'frontpage')) ? notags(trim($_POST['frontpage'])) : '');
$firstpage = ((x(trim($_POST,'firstpage'))) ? notags(trim($_POST['firstpage'])) : 'profiles');
$firstpage = ((x($_POST,'firstpage')) ? notags(trim($_POST['firstpage'])) : 'profiles');
$first_page = ((x($_POST,'first_page')) ? notags(trim($_POST['first_page'])) : 'profiles');
// check value after trim
if(! $first_page) {
$first_page = 'profiles';
}
$mirror_frontpage = ((x($_POST,'mirror_frontpage')) ? intval(trim($_POST['mirror_frontpage'])) : 0);
$directory_server = ((x($_POST,'directory_server')) ? trim($_POST['directory_server']) : '');
$allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : '');
@@ -51,6 +56,7 @@ class Site {
$global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
$no_community_page = !((x($_POST,'no_community_page')) ? True : False);
$default_expire_days = ((array_key_exists('default_expire_days',$_POST)) ? intval($_POST['default_expire_days']) : 0);
$active_expire_days = ((array_key_exists('active_expire_days',$_POST)) ? intval($_POST['active_expire_days']) : 7);
$reply_address = ((array_key_exists('reply_address',$_POST) && trim($_POST['reply_address'])) ? trim($_POST['reply_address']) : 'noreply@' . \App::get_hostname());
$from_email = ((array_key_exists('from_email',$_POST) && trim($_POST['from_email'])) ? trim($_POST['from_email']) : 'Administrator@' . \App::get_hostname());
@@ -70,6 +76,10 @@ class Site {
$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']));
$permissions_role = escape_tags(trim($_POST['permissions_role']));
$techlevel = null;
if(array_key_exists('techlevel', $_POST))
@@ -82,7 +92,7 @@ class Site {
set_config('system', 'maxloadavg', $maxloadavg);
set_config('system', 'frontpage', $frontpage);
set_config('system', 'sellpage', $site_sellpage);
set_config('system', 'workflow_channel_next', $firstpage);
set_config('system', 'workflow_channel_next', $first_page);
set_config('system', 'site_location', $site_location);
set_config('system', 'mirror_frontpage', $mirror_frontpage);
set_config('system', 'sitename', $sitename);
@@ -90,11 +100,15 @@ class Site {
set_config('system', 'enable_context_help', $enable_context_help);
set_config('system', 'verify_email', $verify_email);
set_config('system', 'default_expire_days', $default_expire_days);
set_config('system', 'active_expire_days', $active_expire_days);
set_config('system', 'reply_address', $reply_address);
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);
set_config('system', 'techlevel_lock', $techlevel_lock);
@@ -279,6 +293,12 @@ class Site {
'5' => t('Wizard - I probably know more than you do')
];
$perm_roles = \Zotlabs\Access\PermissionRoles::roles();
$default_role = get_config('system','default_permissions_role','social');
$role = array('permissions_role' , t('Default permission role for new accounts'), $default_role, t('This role will be used for the first channel created after registration.'),$perm_roles);
$homelogin = get_config('system','login_on_homepage');
$enable_context_help = get_config('system','enable_context_help');
@@ -314,6 +334,7 @@ class Site {
'$minimum_age' => array('minimum_age', t("Minimum age"), (x(get_config('system','minimum_age'))?get_config('system','minimum_age'):13), t("Minimum age (in years) for who may register on this site.")),
'$access_policy' => array('access_policy', t("Which best describes the types of account offered by this hub?"), get_config('system','access_policy'), "This is displayed on the public server site list.", $access_choices),
'$register_text' => array('register_text', t("Register text"), htmlspecialchars(get_config('system','register_text'), ENT_QUOTES, 'UTF-8'), t("Will be displayed prominently on the registration page.")),
'$role' => $role,
'$frontpage' => array('frontpage', t("Site homepage to show visitors (default: login box)"), get_config('system','frontpage'), t("example: 'public' to show public stream, 'page/sys/home' to show a system webpage called 'home' or 'include:home.html' to include a file.")),
'$mirror_frontpage' => array('mirror_frontpage', t("Preserve site homepage URL"), get_config('system','mirror_frontpage'), t('Present the site homepage in a frame at the original location instead of redirecting')),
'$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), get_config('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')),
@@ -323,6 +344,10 @@ class Site {
'$disable_discover_tab' => array('disable_discover_tab', t('Import Public Streams'), $discover_tab, t('Import and allow access to public content pulled from other sites. Warning: this content is unmoderated.')),
'$site_firehose' => array('site_firehose', t('Site only Public Streams'), get_config('system','site_firehose'), t('Allow access to public content originating only from this site if Imported Public Streams are disabled.')),
'$open_pubstream' => array('open_pubstream', t('Allow anybody on the internet to access the Public streams'), get_config('system','open_pubstream',1), t('Disable to require authentication before viewing. Warning: this content is unmoderated.')),
'$incl' => array('pub_incl',t('Only import Public stream posts with this text'), get_config('system','pubstream_incl'),t('words one per line or #tags or /patterns/ or lang=xx, leave blank to import all posts')),
'$excl' => array('pub_excl',t('Do not import Public stream posts with this text'), get_config('system','pubstream_excl'),t('words one per line or #tags or /patterns/ or lang=xx, leave blank to import all posts')),
'$login_on_homepage' => array('login_on_homepage', t("Login on Homepage"),((intval($homelogin) || $homelogin === false) ? 1 : '') , t("Present a login box to visitors on the home page if no other content has been configured.")),
'$enable_context_help' => array('enable_context_help', t("Enable context help"),((intval($enable_context_help) === 1 || $enable_context_help === false) ? 1 : 0) , t("Display contextual help for the current page when the help button is pressed.")),
@@ -343,9 +368,10 @@ class Site {
'$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)), ''),
'$sellpage' => array('site_sellpage', t('Public servers: Optional landing (marketing) webpage for new registrants'), get_config('system','sellpage',''), sprintf( t('Create this page first. Default is %s/register'),z_root())),
'$firstpage' => array('firstpage', t('Page to display after creating a new channel'), get_config('system','workflow_channel_next','profiles'), t('Recommend: profiles, go, or settings')),
'$first_page' => array('first_page', t('Page to display after creating a new channel'), get_config('system','workflow_channel_next','profiles'), t('Default: profiles')),
'$location' => array('site_location', t('Optional: site location'), get_config('system','site_location',''), t('Region or country')),

View File

@@ -25,6 +25,7 @@ class Appman extends \Zotlabs\Web\Controller {
'photo' => escape_tags($_REQUEST['photo']),
'version' => escape_tags($_REQUEST['version']),
'price' => escape_tags($_REQUEST['price']),
'page' => escape_tags($_REQUEST['page']),
'requires' => escape_tags($_REQUEST['requires']),
'system' => intval($_REQUEST['system']),
'plugin' => escape_tags($_REQUEST['plugin']),

View File

@@ -15,6 +15,8 @@ class Apps extends \Zotlabs\Web\Controller {
else
$mode = 'list';
$available = ((argc() == 2 && argv(1) === 'available') ? true : false);
$_SESSION['return_url'] = \App::$query_string;
$apps = array();
@@ -23,7 +25,7 @@ class Apps extends \Zotlabs\Web\Controller {
Zlib\Apps::import_system_apps();
$syslist = array();
$cat = ((array_key_exists('cat',$_GET) && $_GET['cat']) ? [ escape_tags($_GET['cat']) ] : '');
$list = Zlib\Apps::app_list(local_channel(), (($mode == 'edit') ? true : false), $cat);
$list = Zlib\Apps::app_list((($available) ? 0 : local_channel()), (($mode == 'edit') ? true : false), $cat);
if($list) {
foreach($list as $x) {
$syslist[] = Zlib\Apps::app_encode($x);
@@ -39,7 +41,7 @@ class Apps extends \Zotlabs\Web\Controller {
// logger('apps: ' . print_r($syslist,true));
foreach($syslist as $app) {
$apps[] = Zlib\Apps::app_render($app,$mode);
$apps[] = Zlib\Apps::app_render($app,(($available) ? 'install' : $mode));
}
return replace_macros(get_markup_template('myapps.tpl'), array(
@@ -48,7 +50,7 @@ class Apps extends \Zotlabs\Web\Controller {
'$title' => t('Apps'),
'$apps' => $apps,
'$authed' => ((local_channel()) ? true : false),
'$manage' => t('Manage apps'),
'$manage' => (($available) ? '' : t('Manage apps')),
'$create' => (($mode == 'edit') ? t('Create new app') : '')
));

View File

@@ -128,6 +128,7 @@ class Article_edit extends \Zotlabs\Web\Controller {
'$title' => t('Edit Article'),
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
'$id' => $itm[0]['id'],
'$cancel' => t('Cancel'),
'$editor' => $editor
));

View File

@@ -127,21 +127,26 @@ class Articles extends \Zotlabs\Web\Controller {
$editor = '';
}
$itemspage = get_pconfig(local_channel(),'system','itemspage');
\App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
$sql_extra = item_permissions_sql($owner);
$sql_item = '';
if($selected_card) {
$r = q("select * from iconfig where iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and iconfig.v = '%s' limit 1",
dbesc($selected_card)
);
if($r) {
$sql_extra .= "and item.id = " . intval($r[0]['iid']) . " ";
$sql_item = "and item.id = " . intval($r[0]['iid']) . " ";
}
}
$r = q("select * from item
where item.uid = %d and item_type = %d
$sql_extra order by item.created desc",
$sql_extra $sql_item order by item.created desc $pager_sql",
intval($owner),
intval(ITEM_TYPE_ARTICLE)
);
@@ -152,6 +157,8 @@ class Articles extends \Zotlabs\Web\Controller {
if($r) {
$pager_total = count($r);
$parents_str = ids_to_querystr($r,'id');
$items = q("SELECT item.*, item.id AS item_id
@@ -173,13 +180,18 @@ class Articles extends \Zotlabs\Web\Controller {
$mode = 'articles';
$content = conversation($items,$mode,false,'traditional');
if(get_pconfig(local_channel(),'system','articles_list_mode') && (! $selected_card))
$page_mode = 'pager_list';
else
$page_mode = 'traditional';
$content = conversation($items,$mode,false,$page_mode);
$o = replace_macros(get_markup_template('cards.tpl'), [
'$title' => t('Articles'),
'$editor' => $editor,
'$content' => $content,
'$pager' => alt_pager($a,count($items))
'$pager' => alt_pager($pager_total)
]);
return $o;

View File

@@ -4,60 +4,89 @@ namespace Zotlabs\Module;
use Zotlabs\Identity\OAuth2Storage;
class Authorize extends \Zotlabs\Web\Controller {
function init() {
function get() {
if (!local_channel()) {
return login();
} else {
// TODO: Fully implement the dynamic client registration protocol:
// OpenID Connect Dynamic Client Registration 1.0 Client Metadata
// http://openid.net/specs/openid-connect-registration-1_0.html
$app = array(
'name' => (x($_REQUEST, 'client_name') ? urldecode($_REQUEST['client_name']) : t('Unknown App')),
'icon' => (x($_REQUEST, 'logo_uri') ? urldecode($_REQUEST['logo_uri']) : z_root() . '/images/icons/plugin.png'),
'url' => (x($_REQUEST, 'client_uri') ? urldecode($_REQUEST['client_uri']) : ''),
);
$o .= replace_macros(get_markup_template('oauth_authorize.tpl'), array(
'$title' => t('Authorize'),
'$authorize' => sprintf( t('Do you authorize the app %s to access your channel data?'), '<a style="float: none;" href="' . $app['url'] . '">' . $app['name'] . '</a> '),
'$app' => $app,
'$yes' => t('Allow'),
'$no' => t('Deny'),
'$client_id' => (x($_REQUEST, 'client_id') ? $_REQUEST['client_id'] : ''),
'$redirect_uri' => (x($_REQUEST, 'redirect_uri') ? $_REQUEST['redirect_uri'] : ''),
'$state' => (x($_REQUEST, 'state') ? $_REQUEST['state'] : ''),
));
return $o;
}
}
// workaround for HTTP-auth in CGI mode
if (x($_SERVER, 'REDIRECT_REMOTE_USER')) {
$userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"], 6)) ;
if(strlen($userpass)) {
list($name, $password) = explode(':', $userpass);
$_SERVER['PHP_AUTH_USER'] = $name;
$_SERVER['PHP_AUTH_PW'] = $password;
}
function post() {
if (! local_channel()) {
return;
}
if (x($_SERVER, 'HTTP_AUTHORIZATION')) {
$userpass = base64_decode(substr($_SERVER["HTTP_AUTHORIZATION"], 6)) ;
if(strlen($userpass)) {
list($name, $password) = explode(':', $userpass);
$_SERVER['PHP_AUTH_USER'] = $name;
$_SERVER['PHP_AUTH_PW'] = $password;
}
}
$storage = new OAuth2Storage(\DBA::$dba->db);
$s = new \Zotlabs\Identity\OAuth2Server($storage);
$s = new \Zotlabs\Identity\OAuth2Server(new OAuth2Storage(\DBA::$dba->db));
// TODO: The automatic client registration protocol below should adhere more
// closely to "OAuth 2.0 Dynamic Client Registration Protocol" defined
// at https://tools.ietf.org/html/rfc7591
// If no client_id was provided, generate a new one.
if (x($_POST, 'client_id')) {
$client_id = $_POST['client_id'];
} else {
$client_id = $_POST['client_id'] = random_string(16);
}
// If no redirect_uri was provided, generate a fake one.
if (x($_POST, 'redirect_uri')) {
$redirect_uri = $_POST['redirect_uri'];
} else {
$redirect_uri = $_POST['redirect_uri'] = 'https://fake.example.com/oauth';
}
$request = \OAuth2\Request::createFromGlobals();
$response = new \OAuth2\Response();
// If the client is not registered, add to the database
if (!$client = $storage->getClientDetails($client_id)) {
$client_secret = random_string(16);
// Client apps are registered per channel
$user_id = local_channel();
$storage->setClientDetails($client_id, $client_secret, $redirect_uri, 'authorization_code', null, $user_id);
}
if (!$client = $storage->getClientDetails($client_id)) {
// There was an error registering the client.
$response->send();
killme();
}
$response->setParameter('client_secret', $client['client_secret']);
// validate the authorize request
if (! $s->validateAuthorizeRequest($request, $response)) {
if (!$s->validateAuthorizeRequest($request, $response)) {
$response->send();
killme();
}
// display an authorization form
if (empty($_POST)) {
return '
<form method="post">
<label>Do You Authorize TestClient?</label><br />
<input type="submit" name="authorized" value="yes">
<input type="submit" name="authorized" value="no">
</form>';
}
// print the authorization code if the user has authorized your client
$is_authorized = ($_POST['authorized'] === 'yes');
$is_authorized = ($_POST['authorize'] === 'allow');
$s->handleAuthorizeRequest($request, $response, $is_authorized, local_channel());
if ($is_authorized) {
// this is only here so that you get to see your code in the cURL request. Otherwise,
// we'd redirect back to the client
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
echo("SUCCESS! Authorization Code: $code");
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=') + 5, 40);
logger('Authorization Code: ' . $code);
}
$response->send();

View File

@@ -128,6 +128,7 @@ class Card_edit extends \Zotlabs\Web\Controller {
'$title' => t('Edit Card'),
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
'$id' => $itm[0]['id'],
'$cancel' => t('Cancel'),
'$editor' => $editor
));

View File

@@ -131,20 +131,26 @@ class Cards extends \Zotlabs\Web\Controller {
}
$itemspage = get_pconfig(local_channel(),'system','itemspage');
\App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
$sql_extra = item_permissions_sql($owner);
$sql_item = '';
if($selected_card) {
$r = q("select * from iconfig where iconfig.cat = 'system' and iconfig.k = 'CARD' and iconfig.v = '%s' limit 1",
dbesc($selected_card)
);
if($r) {
$sql_extra .= "and item.id = " . intval($r[0]['iid']) . " ";
$sql_item = "and item.id = " . intval($r[0]['iid']) . " ";
}
}
$r = q("select * from item
where uid = %d and item_type = %d
$sql_extra order by item.created desc",
$sql_extra $sql_item order by item.created desc $pager_sql",
intval($owner),
intval(ITEM_TYPE_CARD)
);
@@ -156,6 +162,8 @@ class Cards extends \Zotlabs\Web\Controller {
$items_result = [];
if($r) {
$pager_total = count($r);
$parents_str = ids_to_querystr($r, 'id');
$items = q("SELECT item.*, item.id AS item_id
@@ -175,13 +183,18 @@ class Cards extends \Zotlabs\Web\Controller {
$mode = 'cards';
$content = conversation($items_result, $mode, false, 'traditional');
if(get_pconfig(local_channel(),'system','articles_list_mode') && (! $selected_card))
$page_mode = 'pager_list';
else
$page_mode = 'traditional';
$content = conversation($items_result, $mode, false, $page_mode);
$o = replace_macros(get_markup_template('cards.tpl'), [
'$title' => t('Cards'),
'$editor' => $editor,
'$content' => $content,
'$pager' => alt_pager($a, count($items_result))
'$pager' => alt_pager($pager_total)
]);
return $o;

View File

@@ -18,6 +18,9 @@ class Channel extends \Zotlabs\Web\Controller {
function init() {
if(in_array(substr($_GET['search'],0,1),[ '@', '!', '?']))
goaway('search' . '?f=&search=' . $_GET['search']);
$which = null;
if(argc() > 1)
$which = argv(1);
@@ -82,7 +85,9 @@ class Channel extends \Zotlabs\Web\Controller {
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$order = ((x($_GET,'order')) ? notags($_GET['order']) : 'post');
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$search = ((x($_GET,'search')) ? $_GET['search'] : EMPTY_STR);
$groups = array();
@@ -118,9 +123,12 @@ class Channel extends \Zotlabs\Web\Controller {
$static = channel_manual_conv_update(\App::$profile['profile_uid']);
//$o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']);
// $o .= common_friends_visitor_widget(\App::$profile['profile_uid']);
// search terms header
if($search) {
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => t('Search Results For:') . ' ' . htmlspecialchars($search, ENT_COMPAT,'UTF-8')
));
}
if($channel && $is_owner) {
$channel_acl = array(
@@ -152,7 +160,8 @@ class Channel extends \Zotlabs\Web\Controller {
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true,
'jotnets' => true
'jotnets' => true,
'reset' => t('Reset form')
);
$o .= status_editor($a,$x);
@@ -178,6 +187,19 @@ class Channel extends \Zotlabs\Web\Controller {
$simple_update = (($update) ? " AND item_unseen = 1 " : '');
if($search) {
$search = escape_tags($search);
if(strpos($search,'#') === 0) {
$sql_extra .= term_query('item',substr($search,1),TERM_HASHTAG,TERM_COMMUNITYTAG);
}
else {
$sql_extra .= sprintf(" AND item.body like '%s' ",
dbesc(protect_sprintf('%' . $search . '%'))
);
}
}
head_add_link([
'rel' => 'alternate',
'type' => 'application/json+oembed',
@@ -204,7 +226,7 @@ class Channel extends \Zotlabs\Web\Controller {
$_SESSION['loadtime'] = datetime_convert();
}
else {
$r = q("SELECT distinct parent AS item_id from item
$r = q("SELECT parent AS item_id from item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
WHERE uid = %d $item_normal_update
AND item_wall = 1 $simple_update
@@ -228,11 +250,22 @@ class Channel extends \Zotlabs\Web\Controller {
if($datequery) {
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery))));
$order = 'post';
}
if($datequery2) {
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2))));
}
if($datequery || $datequery2) {
$sql_extra2 .= " and item.item_thread_top != 0 ";
}
if($order === 'post')
$ordering = "created";
else
$ordering = "commented";
$itemspage = get_pconfig(local_channel(),'system','itemspage');
\App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
@@ -249,13 +282,13 @@ class Channel extends \Zotlabs\Web\Controller {
}
}
else {
$r = q("SELECT item.parent AS item_id FROM item
$r = q("SELECT DISTINCT item.parent AS item_id, $ordering FROM item
left join abook on ( item.author_xchan = abook.abook_xchan $abook_uids )
WHERE true and item.uid = %d AND item.item_thread_top = 1 $item_normal
WHERE true and item.uid = %d $item_normal
AND (abook.abook_blocked = 0 or abook.abook_flags is null)
AND item.item_wall = 1
$sql_extra $sql_extra2
ORDER BY created DESC, id $pager_sql ",
AND item.item_wall = 1 AND item.item_thread_top = 1
$sql_extra $sql_extra2
ORDER BY $ordering DESC $pager_sql ",
intval(\App::$profile['profile_uid'])
);
}
@@ -264,7 +297,6 @@ class Channel extends \Zotlabs\Web\Controller {
$r = array();
}
}
if($r) {
$parents_str = ids_to_querystr($r,'item_id');
@@ -280,7 +312,7 @@ class Channel extends \Zotlabs\Web\Controller {
xchan_query($items);
$items = fetch_post_tags($items, true);
$items = conv_sort($items,'created');
$items = conv_sort($items,$ordering);
if($load && $mid && (! count($items))) {
// This will happen if we don't have sufficient permissions
@@ -312,8 +344,8 @@ class Channel extends \Zotlabs\Web\Controller {
'$uid' => ((\App::$profile['profile_uid']) ? \App::$profile['profile_uid'] : '0'),
'$gid' => '0',
'$cid' => '0',
'$cmin' => '0',
'$cmax' => '0',
'$cmin' => '(-1)',
'$cmax' => '(-1)',
'$star' => '0',
'$liked' => '0',
'$conv' => '0',
@@ -323,9 +355,9 @@ class Channel extends \Zotlabs\Web\Controller {
'$fh' => '0',
'$static' => $static,
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$search' => '',
'$search' => $search,
'$xchan' => '',
'$order' => '',
'$order' => $order,
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
'$file' => '',
'$cats' => (($category) ? urlencode($category) : ''),
@@ -371,16 +403,17 @@ class Channel extends \Zotlabs\Web\Controller {
}
}
$mode = (($search) ? 'search' : 'channel');
if($checkjs->disabled()) {
$o .= conversation($items,'channel',$update,'traditional');
$o .= conversation($items,$mode,$update,'traditional');
}
else {
$o .= conversation($items,'channel',$update,$page_mode);
$o .= conversation($items,$mode,$update,$page_mode);
}
if((! $update) || ($checkjs->disabled())) {
$o .= alt_pager($a,count($items));
$o .= alt_pager(count($items));
if ($mid && $items[0]['title'])
\App::$page['title'] = $items[0]['title'] . " - " . \App::$page['title'];
}

View File

@@ -19,7 +19,7 @@ class Chanview extends \Zotlabs\Web\Controller {
}
if($_REQUEST['address']) {
$r = q("select * from xchan where xchan_addr = '%s' limit 1",
dbesc($_REQUEST['address'])
dbesc(punify($_REQUEST['address']))
);
}
elseif(local_channel() && intval($_REQUEST['cid'])) {

View File

@@ -60,7 +60,7 @@ class Chatsvc extends \Zotlabs\Web\Controller {
intval(\App::$data['chat']['room_id']),
dbesc(get_observer_hash()),
dbesc(datetime_convert()),
dbesc($arr['chat_text'])
dbesc(str_rot47(base64url_encode($arr['chat_text'])))
);
$ret['success'] = true;
@@ -119,10 +119,10 @@ class Chatsvc extends \Zotlabs\Web\Controller {
$rv['xchan_network'] = 'unknown';
$rv['xchan_url'] = z_root();
$rv['xchan_hidden'] = 1;
$rv['xchan_photo_mimetype'] = 'image/jpeg';
$rv['xchan_photo_l'] = get_default_profile_photo(300);
$rv['xchan_photo_m'] = get_default_profile_photo(80);
$rv['xchan_photo_s'] = get_default_profile_photo(48);
$rv['xchan_photo_mimetype'] = 'image/png';
$rv['xchan_photo_l'] = z_root() . '/' . get_default_profile_photo(300);
$rv['xchan_photo_m'] = z_root() . '/' . get_default_profile_photo(80);
$rv['xchan_photo_s'] = z_root() . '/' . get_default_profile_photo(48);
}
@@ -157,7 +157,7 @@ class Chatsvc extends \Zotlabs\Web\Controller {
'name' => $rr['xchan_name'],
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'c'),
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'r'),
'text' => zidify_links(smilies(bbcode($rr['chat_text']))),
'text' => zidify_links(smilies(bbcode(base64url_decode(str_rot47($rr['chat_text']))))),
'self' => ((get_observer_hash() == $rr['chat_xchan']) ? 'self' : '')
);
}

View File

@@ -35,11 +35,20 @@ class Cloud extends \Zotlabs\Web\Controller {
if (argc() > 1)
$which = argv(1);
if (argc() < 2 && intval(get_config('system','cloud_disable_siteroot'))) {
notice( t('Permission denied.') . EOL);
construct_page();
killme();
}
$profile = 0;
if ($which)
profile_load( $which, $profile);
$auth = new \Zotlabs\Storage\BasicAuth();
$ob_hash = get_observer_hash();
@@ -60,6 +69,12 @@ class Cloud extends \Zotlabs\Web\Controller {
// if we arrived at this path with any query parameters in the url, build a clean url without
// them and redirect.
if(! array_key_exists('cloud_sort',$_SESSION)) {
$_SESSION['cloud_sort'] = 'name';
}
$_SESSION['cloud_sort'] = (($_REQUEST['sort']) ? trim(notags($_REQUEST['sort'])) : $_SESSION['cloud_sort']);
$x = clean_query_string();
if($x !== \App::$query_string)
goaway(z_root() . '/' . $x);

View File

@@ -32,6 +32,7 @@ class Connections extends \Zotlabs\Web\Controller {
nav_set_selected('Connections');
$active = false;
$blocked = false;
$hidden = false;
$ignored = false;
@@ -44,11 +45,16 @@ class Connections extends \Zotlabs\Web\Controller {
if(! $_REQUEST['aj'])
$_SESSION['return_url'] = \App::$query_string;
$search_flags = '';
$search_flags = "";
$head = '';
if(argc() == 2) {
switch(argv(1)) {
case 'active':
$search_flags = " and abook_blocked = 0 and abook_ignored = 0 and abook_hidden = 0 and abook_archived = 0 AND abook_not_here = 0 ";
$head = t('Active');
$active = true;
break;
case 'blocked':
$search_flags = " and abook_blocked = 1 ";
$head = t('Blocked');
@@ -101,8 +107,9 @@ class Connections extends \Zotlabs\Web\Controller {
case 'all':
$head = t('All');
default:
$search_flags = '';
$all = true;
$search_flags = " and abook_blocked = 0 and abook_ignored = 0 and abook_hidden = 0 and abook_archived = 0 and abook_not_here = 0 ";
$active = true;
$head = t('Active');
break;
}
@@ -129,6 +136,13 @@ class Connections extends \Zotlabs\Web\Controller {
),
*/
'active' => array(
'label' => t('Active Connections'),
'url' => z_root() . '/connections/active',
'sel' => ($active) ? 'active' : '',
'title' => t('Show active connections'),
),
'pending' => array(
'label' => t('New Connections'),
'url' => z_root() . '/connections/pending',
@@ -136,12 +150,6 @@ class Connections extends \Zotlabs\Web\Controller {
'title' => t('Show pending (new) connections'),
),
'all' => array(
'label' => t('All Connections'),
'url' => z_root() . '/connections/all',
'sel' => ($all) ? 'active' : '',
'title' => t('Show all connections'),
),
/*
array(
@@ -187,6 +195,13 @@ class Connections extends \Zotlabs\Web\Controller {
// 'title' => t('Only show one-way connections'),
// ),
'all' => array(
'label' => t('All Connections'),
'url' => z_root() . '/connections',
'sel' => ($all) ? 'active' : '',
'title' => t('Show all connections'),
),
);
@@ -238,6 +253,7 @@ class Connections extends \Zotlabs\Web\Controller {
$status_str = '';
$status = array(
((intval($rr['abook_active'])) ? t('Active') : ''),
((intval($rr['abook_pending'])) ? t('Pending approval') : ''),
((intval($rr['abook_archived'])) ? t('Archived') : ''),
((intval($rr['abook_hidden'])) ? t('Hidden') : ''),
@@ -310,7 +326,7 @@ class Connections extends \Zotlabs\Web\Controller {
killme();
}
else {
$o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
$o .= "<script> var page_query = '" . escape_tags($_GET['q']) . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
$o .= replace_macros(get_markup_template('connections.tpl'),array(
'$header' => t('Connections') . (($head) ? ': ' . $head : ''),
'$tabs' => $tabs,

View File

@@ -828,7 +828,7 @@ class Connedit extends \Zotlabs\Web\Controller {
$locstr = locations_by_netid($contact['xchan_hash']);
if(! $locstr)
$locstr = $contact['xchan_url'];
$locstr = unpunify($contact['xchan_url']);
$clone_warn = '';
$clonable = (in_array($contact['xchan_network'],['zot','rss']) ? true : false);
@@ -852,8 +852,8 @@ class Connedit extends \Zotlabs\Web\Controller {
'$permcat' => [ 'permcat', t('Permission role'), '', '<span class="loading invisible">' . t('Loading') . '<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span></span>',$permcats ],
'$permcat_new' => t('Add permission role'),
'$permcat_enable' => feature_enabled(local_channel(),'permcats'),
'$addr' => $contact['xchan_addr'],
'$primeurl' => $contact['xchan_url'],
'$addr' => unpunify($contact['xchan_addr']),
'$primeurl' => unpunify($contact['xchan_url']),
'$section' => $section,
'$sections' => $sections,
'$vcard' => $vcard,

View File

@@ -9,6 +9,7 @@ namespace Zotlabs\Module;
require_once('include/photo/photo_driver.php');
require_once('include/channel.php');
require_once('include/photos.php');
@@ -84,10 +85,41 @@ class Cover_photo extends \Zotlabs\Web\Controller {
);
if($r) {
$base_image = $r[0];
$base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents(dbunescbin($base_image['content'])) : dbunescbin($base_image['content']));
$max_thumb = intval(get_config('system','max_thumbnail',1600));
$iscaled = false;
if(intval($r[0]['height']) > $max_thumb || intval($r[0]['width']) > $max_thumb) {
$imagick_path = get_config('system','imagick_convert_path');
if($imagick_path && @file_exists($imagick_path) && intval($r[0]['os_storage'])) {
$fname = dbunescbin($r[0]['content']);
$tmp_name = $fname . '-001';
$newsize = photo_calculate_scale(array_merge(getimagesize($fname),['max' => $max_thumb]));
$cmd = $imagick_path . ' ' . escapeshellarg(PROJECT_BASE . '/' . $fname) . ' -resize ' . $newsize . ' ' . escapeshellarg(PROJECT_BASE . '/' . $tmp_name);
// logger('imagick thumbnail command: ' . $cmd);
for($x = 0; $x < 4; $x ++) {
exec($cmd);
if(file_exists($tmp_name)) {
break;
}
}
if(file_exists($tmp_name)) {
$base_image = $r[0];
$gis = getimagesize($tmp_name);
logger('gis: ' . print_r($gis,true));
$base_image['width'] = $gis[0];
$base_image['height'] = $gis[1];
$base_image['content'] = @file_get_contents($tmp_name);
$iscaled = true;
@unlink($tmp_name);
}
}
}
if(! $iscaled) {
$base_image = $r[0];
$base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents(dbunescbin($base_image['content'])) : dbunescbin($base_image['content']));
}
$im = photo_factory($base_image['content'], $base_image['mimetype']);
if($im->is_valid()) {
@@ -119,10 +151,10 @@ class Cover_photo extends \Zotlabs\Web\Controller {
intval(local_channel())
);
$orig_srcx = ( $r[0]['width'] / $scaled_width ) * $srcX;
$orig_srcy = ( $r[0]['height'] / $scaled_height ) * $srcY;
$orig_srcw = ( $srcW / $scaled_width ) * $r[0]['width'];
$orig_srch = ( $srcH / $scaled_height ) * $r[0]['height'];
$orig_srcx = ( $base_image['width'] / $scaled_width ) * $srcX;
$orig_srcy = ( $base_image['height'] / $scaled_height ) * $srcY;
$orig_srcw = ( $srcW / $scaled_width ) * $base_image['width'];
$orig_srch = ( $srcH / $scaled_height ) * $base_image['height'];
$im->cropImageRect(1200,435,$orig_srcx, $orig_srcy, $orig_srcw, $orig_srch);
@@ -355,6 +387,8 @@ class Cover_photo extends \Zotlabs\Web\Controller {
$o .= replace_macros($tpl,array(
'$user' => \App::$channel['channel_address'],
'$info' => t('Your cover photo may be visible to anybody on the internet'),
'$existing' => get_cover_photo(local_channel(),'array',PHOTO_RES_COVER_850),
'$lbl_upfile' => t('Upload File:'),
'$lbl_profiles' => t('Select a profile:'),
'$title' => t('Change Cover Photo'),

View File

@@ -299,9 +299,9 @@ class Directory extends \Zotlabs\Web\Controller {
if(strlen($out))
$out .= ', ';
if($marr && in_arrayi($k,$marr))
$out .= '<strong>' . $k . '</strong>';
$out .= '<a href="' . z_root() . '/directory/f=&keywords=' . urlencode($k) .'"><strong>' . $k . '</strong></a>';
else
$out .= $k;
$out .= '<a href="' . z_root() . '/directory/f=&keywords=' . urlencode($k) .'">' . $k . '</a>';
}
}
@@ -395,7 +395,7 @@ class Directory extends \Zotlabs\Web\Controller {
$dirtitle = (($globaldir) ? t('Global Directory') : t('Local Directory'));
$o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; divmore_height = " . intval($maxheight) . "; </script>";
$o .= "<script> var page_query = '" . escape_tags($_GET['q']) . "'; var extra_args = '" . extra_query_args() . "' ; divmore_height = " . intval($maxheight) . "; </script>";
$o .= replace_macros($tpl, array(
'$search' => $search,
'$desc' => t('Find'),
@@ -404,7 +404,7 @@ class Directory extends \Zotlabs\Web\Controller {
'$entries' => $entries,
'$dirlbl' => $suggest ? t('Channel Suggestions') : $dirtitle,
'$submit' => t('Find'),
'$next' => alt_pager($a,$j['records'], t('next page'), t('previous page')),
'$next' => alt_pager($j['records'], t('next page'), t('previous page')),
'$sort' => t('Sort options'),
'$normal' => t('Alphabetic'),
'$reverse' => t('Reverse Alphabetic'),

View File

@@ -257,7 +257,7 @@ class Dirsearch extends \Zotlabs\Web\Controller {
else {
$r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash
where ( $logic $sql_extra ) $hub_query and xchan_network = 'zot' and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0
where ( $logic $sql_extra ) $hub_query and xchan_network = 'zot' and xchan_system = 0 and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0
$safesql $order $qlimit "
);

View File

@@ -67,8 +67,7 @@ class Display extends \Zotlabs\Web\Controller {
'default_location' => $channel['channel_location'],
'nickname' => $channel['channel_address'],
'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'acl' => populate_acl($channel_acl),
'acl' => populate_acl($channel_acl,true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post'),
'permissions' => $channel_acl,
'bang' => '',
'visitor' => true,
@@ -78,7 +77,8 @@ class Display extends \Zotlabs\Web\Controller {
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true,
'jotnets' => true
'jotnets' => true,
'reset' => t('Reset form')
);
$o = '<div id="jot-popup">';
@@ -102,7 +102,7 @@ class Display extends \Zotlabs\Web\Controller {
if($decoded)
$item_hash = $decoded;
$r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, item_blocked from item where mid like '%s' limit 1",
$r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, author_xchan, item_blocked from item where mid like '%s' limit 1",
dbesc($item_hash . '%')
);
@@ -110,6 +110,14 @@ class Display extends \Zotlabs\Web\Controller {
$target_item = $r[0];
}
$x = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($target_item['author_xchan'])
);
if($x) {
// not yet ready for prime time
// \App::$poi = $x[0];
}
//if the item is to be moderated redirect to /moderate
if($target_item['item_blocked'] == ITEM_MODERATED) {
goaway(z_root() . '/moderate/' . $target_item['id']);
@@ -124,7 +132,7 @@ class Display extends \Zotlabs\Web\Controller {
$y = q("select * from iconfig left join item on iconfig.iid = item.id
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'WEBPAGE' and item.id = %d limit 1",
intval($target_item['uid']),
intval($target_item['id'])
intval($target_item['parent'])
);
if($x && $y) {
goaway(z_root() . '/page/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
@@ -134,6 +142,41 @@ class Display extends \Zotlabs\Web\Controller {
return '';
}
}
if($target_item['item_type'] == ITEM_TYPE_ARTICLE) {
$x = q("select * from channel where channel_id = %d limit 1",
intval($target_item['uid'])
);
$y = q("select * from iconfig left join item on iconfig.iid = item.id
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and item.id = %d limit 1",
intval($target_item['uid']),
intval($target_item['parent'])
);
if($x && $y) {
goaway(z_root() . '/articles/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
}
else {
notice( t('Page not found.') . EOL);
return '';
}
}
if($target_item['item_type'] == ITEM_TYPE_CARD) {
$x = q("select * from channel where channel_id = %d limit 1",
intval($target_item['uid'])
);
$y = q("select * from iconfig left join item on iconfig.iid = item.id
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'CARD' and item.id = %d limit 1",
intval($target_item['uid']),
intval($target_item['parent'])
);
if($x && $y) {
goaway(z_root() . '/cards/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
}
else {
notice( t('Page not found.') . EOL);
return '';
}
}
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
@@ -170,8 +213,8 @@ class Display extends \Zotlabs\Web\Controller {
'$uid' => '0',
'$gid' => '0',
'$cid' => '0',
'$cmin' => '0',
'$cmax' => '99',
'$cmin' => '(-1)',
'$cmax' => '(-1)',
'$star' => '0',
'$liked' => '0',
'$conv' => '0',

View File

@@ -138,6 +138,7 @@ class Editblock extends \Zotlabs\Web\Controller {
'$title' => t('Edit Block'),
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
'$id' => $itm[0]['id'],
'$cancel' => t('Cancel'),
'$editor' => $editor
));

View File

@@ -137,6 +137,7 @@ class Editlayout extends \Zotlabs\Web\Controller {
'$title' => t('Edit Layout'),
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
'$id' => $itm[0]['id'],
'$cancel' => t('Cancel'),
'$editor' => $editor
));

View File

@@ -82,7 +82,7 @@ class Editpost extends \Zotlabs\Web\Controller {
'editor_autocomplete'=> true,
'bbco_autocomplete'=> 'bbcode',
'return_path' => $_SESSION['return_url'],
'button' => t('Edit'),
'button' => t('Submit'),
'hide_voting' => true,
'hide_future' => true,
'hide_location' => true,
@@ -106,6 +106,7 @@ class Editpost extends \Zotlabs\Web\Controller {
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
'$title' => t('Edit post'),
'$cancel' => t('Cancel'),
'$editor' => $editor
));

View File

@@ -166,6 +166,7 @@ class Editwebpage extends \Zotlabs\Web\Controller {
'$title' => t('Edit Webpage'),
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
'$editor' => $editor,
'$cancel' => t('Cancel'),
'$id' => $itm[0]['id']
));

View File

@@ -66,7 +66,7 @@ class Filestorage extends \Zotlabs\Web\Controller {
$perms = get_all_perms($owner, $ob_hash);
if(! $perms['view_storage']) {
if(! ($perms['view_storage'] || is_site_admin())){
notice( t('Permission denied.') . EOL);
return;
}
@@ -75,15 +75,29 @@ class Filestorage extends \Zotlabs\Web\Controller {
// need to return for anyone other than the owner, despite the perms check for now.
$is_owner = (((local_channel()) && ($owner == local_channel())) ? true : false);
if(! $is_owner) {
if(! ($is_owner || is_site_admin())){
info( t('Permission Denied.') . EOL );
return;
}
if(argc() > 3 && argv(3) === 'delete') {
if(argc() > 4 && argv(4) === 'json')
$json_return = true;
$admin_delete = false;
if(! $perms['write_storage']) {
notice( t('Permission denied.') . EOL);
return;
if(is_site_admin()) {
$admin_delete = true;
}
else {
notice( t('Permission denied.') . EOL);
if($json_return)
json_return_and_die([ 'success' => false ]);
return;
}
}
$file = intval(argv(2));
@@ -92,22 +106,31 @@ class Filestorage extends \Zotlabs\Web\Controller {
intval($owner)
);
if(! $r) {
if($json_return)
json_return_and_die([ 'success' => false ]);
notice( t('File not found.') . EOL);
goaway(z_root() . '/cloud/' . $which);
}
$f = $r[0];
$channel = \App::get_channel();
$channel = channelx_by_n($owner);
$url = get_cloud_url($channel['channel_id'], $channel['channel_address'], $f['hash']);
attach_delete($owner, $f['hash']);
$sync = attach_export_data($channel, $f['hash'], true);
if($sync) {
build_sync_packet($channel['channel_id'], array('file' => array($sync)));
if(! $admin_delete) {
$sync = attach_export_data($channel, $f['hash'], true);
if($sync) {
build_sync_packet($channel['channel_id'], array('file' => array($sync)));
}
}
if(json_return)
json_return_and_die([ 'success' => true ]);
goaway(dirname($url));
}

View File

@@ -14,21 +14,26 @@ class Follow extends \Zotlabs\Web\Controller {
}
$uid = local_channel();
$url = notags(trim($_REQUEST['url']));
$url = notags(trim(punify($_REQUEST['url'])));
$return_url = $_SESSION['return_url'];
$confirm = intval($_REQUEST['confirm']);
$interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
$channel = \App::get_channel();
$result = new_contact($uid,$url,$channel,true,$confirm);
$result = new_contact($uid,$url,$channel,$interactive,$confirm);
if($result['success'] == false) {
if($result['message'])
notice($result['message']);
goaway($return_url);
if($interactive) {
goaway($return_url);
}
else {
json_return_and_die($result);
}
}
info( t('Channel added.') . EOL);
info( t('Connection added.') . EOL);
$clone = array();
foreach($result['abook'] as $k => $v) {
@@ -53,7 +58,12 @@ class Follow extends \Zotlabs\Web\Controller {
if(($can_view_stream) || ($result['abook']['xchan_network'] === 'rss'))
\Zotlabs\Daemon\Master::Summon(array('Onepoll',$result['abook']['abook_id']));
goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
if($interactive) {
goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
}
else {
json_return_and_die([ 'success' => true ]);
}
}

View File

@@ -7,6 +7,17 @@ require_once('include/group.php');
class Group extends \Zotlabs\Web\Controller {
function init() {
if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
\App::$profile_uid = local_channel();
nav_set_selected('Privacy Groups');
}
function post() {
if(! local_channel()) {
@@ -22,12 +33,10 @@ class Group extends \Zotlabs\Web\Controller {
$r = group_add(local_channel(),$name,$public);
if($r) {
info( t('Privacy group created.') . EOL );
$r = group_byname(local_channel(),$name);
if($r)
goaway(z_root() . '/group/' . $r);
}
else
notice( t('Could not create privacy group.') . EOL );
else {
notice( t('Could not create privacy group.') . EOL );
}
goaway(z_root() . '/group');
}
@@ -74,30 +83,59 @@ class Group extends \Zotlabs\Web\Controller {
notice( t('Permission denied') . EOL);
return;
}
// Switch to text mode interface if we have more than 'n' contacts or group members
$switchtotext = get_pconfig(local_channel(),'system','groupedit_image_limit');
if($switchtotext === false)
$switchtotext = get_config('system','groupedit_image_limit');
if($switchtotext === false)
$switchtotext = 400;
$tpl = get_markup_template('group_edit.tpl');
$context = array('$submit' => t('Submit'));
if((argc() == 2) && (argv(1) === 'new')) {
return replace_macros($tpl, $context + array(
'$title' => t('Create a group of channels.'),
'$gname' => array('groupname',t('Privacy group name: '), '', ''),
'$gid' => 'new',
'$public' => array('public',t('Members are visible to other channels'), false, ''),
if((argc() == 1) || ((argc() == 2) && (argv(1) === 'new'))) {
$new = (((argc() == 2) && (argv(1) === 'new')) ? true : false);
$groups = q("SELECT id, gname FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval(local_channel())
);
$i = 0;
foreach($groups as $group) {
$entries[$i]['name'] = $group['gname'];
$entries[$i]['id'] = $group['id'];
$entries[$i]['count'] = count(group_get_members($group['id']));
$i++;
}
$tpl = get_markup_template('privacy_groups.tpl');
$o = replace_macros($tpl, [
'$title' => t('Privacy Groups'),
'$add_new_label' => t('Add Group'),
'$new' => $new,
// new group form
'$gname' => array('groupname',t('Privacy group name')),
'$public' => array('public',t('Members are visible to other channels'), false),
'$form_security_token' => get_form_security_token("group_edit"),
));
'$submit' => t('Submit'),
// groups list
'$title' => t('Privacy Groups'),
'$name_label' => t('Name'),
'$count_label' => t('Members'),
'$entries' => $entries
]);
return $o;
}
$context = array('$submit' => t('Submit'));
$tpl = get_markup_template('group_edit.tpl');
if((argc() == 3) && (argv(1) === 'drop')) {
check_form_security_token_redirectOnErr('/group', 'group_drop', 't');
@@ -172,22 +210,17 @@ class Group extends \Zotlabs\Web\Controller {
$preselected[] = $member['xchan_hash'];
}
}
$drop_tpl = get_markup_template('group_drop.tpl');
$drop_txt = replace_macros($drop_tpl, array(
'$id' => $group['id'],
'$delete' => t('Delete'),
'$form_security_token' => get_form_security_token("group_drop"),
));
$context = $context + array(
'$title' => t('Privacy group editor'),
'$title' => sprintf(t('Privacy Group: %s'), $group['gname']),
'$details_label' => t('Edit'),
'$gname' => array('groupname',t('Privacy group name: '),$group['gname'], ''),
'$gid' => $group['id'],
'$drop' => $drop_txt,
'$public' => array('public',t('Members are visible to other channels'), $group['visible'], ''),
'$form_security_token' => get_form_security_token('group_edit'),
'$form_security_token_edit' => get_form_security_token('group_edit'),
'$delete' => t('Delete Group'),
'$form_security_token_drop' => get_form_security_token("group_drop"),
);
}
@@ -196,14 +229,14 @@ class Group extends \Zotlabs\Web\Controller {
return;
$groupeditor = array(
'label_members' => t('Members'),
'label_members' => t('Group members'),
'members' => array(),
'label_contacts' => t('All Connected Channels'),
'label_contacts' => t('Not in this group'),
'contacts' => array(),
);
$sec_token = addslashes(get_form_security_token('group_member_change'));
$textmode = (($switchtotext && (count($members) > $switchtotext)) ? true : false);
$textmode = (($switchtotext && (count($members) > $switchtotext)) ? true : 'card');
foreach($members as $member) {
if($member['xchan_url']) {
$member['archived'] = (intval($member['abook_archived']) ? true : false);
@@ -219,7 +252,7 @@ class Group extends \Zotlabs\Web\Controller {
);
if(count($r)) {
$textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : false);
$textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : 'card');
foreach($r as $member) {
if(! in_array($member['xchan_hash'],$preselected)) {
$member['archived'] = (intval($member['abook_archived']) ? true : false);
@@ -230,7 +263,7 @@ class Group extends \Zotlabs\Web\Controller {
}
$context['$groupeditor'] = $groupeditor;
$context['$desc'] = t('Click on a channel to add or remove.');
$context['$desc'] = t('Click a channel to toggle membership');
if($change) {
$tpl = get_markup_template('groupeditor.tpl');

View File

@@ -0,0 +1,27 @@
<?php
namespace Zotlabs\Module;
class Hashtags extends \Zotlabs\Web\Controller {
function init() {
$result = [];
$t = escape_tags($_REQUEST['t']);
if(! $t)
json_return_and_die($result);
$r = q("select distinct(term) from term where term like '%s' and ttype = %d order by term",
dbesc($t . '%'),
intval(TERM_HASHTAG)
);
if($r) {
foreach($r as $rv) {
$result[] = [ 'text' => $rv['term'] ];
}
}
json_return_and_die($result);
}
}

View File

@@ -9,7 +9,7 @@ require_once('include/conversation.php');
class Home extends \Zotlabs\Web\Controller {
function init() {
$ret = array();
call_hooks('home_init',$ret);
@@ -89,11 +89,11 @@ class Home extends \Zotlabs\Web\Controller {
$sitename = get_config('system','sitename');
if($sitename)
$o .= '<h1 class="home-welcome">' . sprintf( t("Welcome to %s") ,$sitename) . '</h1>';
$o .= '<h1 class="home-welcome">' . sprintf( t('Welcome to %s') ,$sitename) . '</h1>';
$loginbox = get_config('system','login_on_homepage');
if(intval($loginbox) || $loginbox === false)
$o .= login((\App::$config['system']['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
$o .= login(true);
return $o;

View File

@@ -120,8 +120,7 @@ class Hq extends \Zotlabs\Web\Controller {
'default_location' => $channel['channel_location'],
'nickname' => $channel['channel_address'],
'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'acl' => populate_acl($channel_acl),
'acl' => populate_acl($channel_acl,true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post'),
'permissions' => $channel_acl,
'bang' => '',
'visitor' => true,
@@ -131,7 +130,8 @@ class Hq extends \Zotlabs\Web\Controller {
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true,
'jotnets' => true
'jotnets' => true,
'reset' => t('Reset form')
];
$o = replace_macros(get_markup_template("hq.tpl"),

View File

@@ -6,6 +6,7 @@ require_once('include/zot.php');
require_once('include/channel.php');
require_once('include/import.php');
require_once('include/perm_upgrade.php');
require_once('library/urlify/URLify.php');
/**
@@ -38,6 +39,7 @@ class Import extends \Zotlabs\Web\Controller {
$filename = basename($_FILES['filename']['name']);
$filesize = intval($_FILES['filename']['size']);
$filetype = $_FILES['filename']['type'];
$newname = trim(strtolower($_REQUEST['newname']));
// import channel from file
if($src) {
@@ -114,15 +116,16 @@ class Import extends \Zotlabs\Web\Controller {
return;
}
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
$v1 = substr($data['compatibility']['database'],-4);
$v2 = substr(DB_UPDATE_VERSION,-4);
if($v2 > $v1) {
$t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
notice($t);
}
}
// This is only an info message but it is alarming to folks who then report failure with this as the cause, when in fact we ignore this completely.
// if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
// $v1 = substr($data['compatibility']['database'],-4);
// $v2 = substr(DB_UPDATE_VERSION,-4);
// if($v2 > $v1) {
// $t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
// notice($t);
// }
//
// }
if($moving)
$seize = 1;
@@ -145,7 +148,20 @@ class Import extends \Zotlabs\Web\Controller {
}
}
$channel = import_channel($data['channel'], $account_id, $seize);
if($newname) {
$x = false;
if(get_config('system','unicode_usernames')) {
$x = punify(mb_strtolower($newname));
}
if((! $x) || strlen($x) > 64) {
$x = strtolower(\URLify::transliterate($newname));
}
$newname = $x;
}
$channel = import_channel($data['channel'], $account_id, $seize, $newname);
}
else {
$moving = false;
@@ -362,11 +378,27 @@ class Import extends \Zotlabs\Web\Controller {
continue;
}
abook_store_lowlevel($abook);
$r = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($abook['abook_xchan']),
intval($channel['channel_id'])
);
if($r) {
foreach($abook as $k => $v) {
$r = q("UPDATE abook SET " . TQUOT . "%s" . TQUOT . " = '%s' WHERE abook_xchan = '%s' AND abook_channel = %d",
dbesc($k),
dbesc($v),
dbesc($abook['abook_xchan']),
intval($channel['channel_id'])
);
}
}
else {
abook_store_lowlevel($abook);
$friends ++;
if(intval($abook['abook_feed']))
$feeds ++;
$friends ++;
if(intval($abook['abook_feed']))
$feeds ++;
}
translate_abook_perms_inbound($channel,$abook_copy);
@@ -515,16 +547,20 @@ class Import extends \Zotlabs\Web\Controller {
'$desc' => t('Use this form to import an existing channel from a different server/hub. You may retrieve the channel identity from the old server/hub via the network or provide an export file.'),
'$label_filename' => t('File to Upload'),
'$choice' => t('Or provide the old server/hub details'),
'$label_old_address' => t('Your old identity address (xyz@example.com)'),
'$label_old_email' => t('Your old login email address'),
'$label_old_pass' => t('Your old login password'),
'$old_address' => [ 'old_address', t('Your old identity address (xyz@example.com)'), '', ''],
'$email' => [ 'email', t('Your old login email address'), '', '' ],
'$password' => [ 'password', t('Your old login password'), '', '' ],
'$import_posts' => [ 'import_posts', t('Import a few months of posts if possible (limited by available memory'), false, '', [ t('No'), t('Yes') ]],
'$common' => t('For either option, please choose whether to make this hub your new primary address, or whether your old location should continue this role. You will be able to post from either location, but only one can be marked as the primary location for files, photos, and media.'),
'$label_import_primary' => t('Make this hub my primary location'),
'$label_import_moving' => t('Move this channel (disable all previous locations)'),
'$label_import_posts' => t('Import a few months of posts if possible (limited by available memory'),
'$make_primary' => [ 'make_primary', t('Make this hub my primary location'), false, '', [ t('No'), t('Yes') ] ],
'$moving' => [ 'moving', t('Move this channel (disable all previous locations)'), false, '', [ t('No'), t('Yes') ] ],
'$newname' => [ 'newname', t('Use this channel nickname instead of the one provided'), '', t('Leave blank to keep your existing channel nickname. You will be randomly assigned a similar nickname if either name is already allocated on this site.')],
'$pleasewait' => t('This process may take several minutes to complete. Please submit the form only once and leave this page open until finished.'),
'$email' => '',
'$pass' => '',
'$form_security_token' => get_form_security_token('channel_import'),
'$submit' => t('Submit')
));

View File

@@ -113,7 +113,7 @@ class Invite extends \Zotlabs\Web\Controller {
$invite_code = autoname(8) . rand(1000,9999);
$nmessage = str_replace('$invite_code',$invite_code,$message);
$r = q("INSERT INTO register (hash,created) VALUES ('%s', '%s') ",
$r = q("INSERT INTO register (hash,created,uid,password,lang) VALUES ('%s', '%s',0,'','') ",
dbesc($invite_code),
dbesc(datetime_convert())
);

View File

@@ -468,6 +468,7 @@ class Item extends \Zotlabs\Web\Controller {
$private = intval($acl->is_private() || $parent_item['item_private']);
$public_policy = $parent_item['public_policy'];
$owner_hash = $parent_item['owner_xchan'];
$webpage = $parent_item['item_type'];
}
if((! $allow_empty) && (! strlen($body))) {
@@ -527,22 +528,12 @@ class Item extends \Zotlabs\Web\Controller {
// and will require alternatives for alternative content-types (text/html, text/markdown, text/plain, etc.)
// we may need virtual or template classes to implement the possible alternatives
// If we're sending a private top-level message with a single @-taggable channel as a recipient, @-tag it, if our pconfig is set.
if((! $parent) && (get_pconfig($profile_uid,'system','tagifonlyrecip')) && (substr_count($str_contact_allow,'<') == 1) && ($str_group_allow == '') && ($str_contact_deny == '') && ($str_group_deny == '')) {
$x = q("select abook_id, abconfig.v from abook left join abconfig on abook_xchan = abconfig.xchan and abook_channel = abconfig.chan and cat= 'their_perms' and abconfig.k = 'tag_deliver' and abconfig.v = 1 and abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc(str_replace(array('<','>'),array('',''),$str_contact_allow)),
intval($profile_uid)
);
if($x)
$body .= "\n\n@group+" . $x[0]['abook_id'] . "\n";
}
$body = cleanup_bbcode($body);
// Look for tags and linkify them
$results = linkify_tags($a, $body, ($uid) ? $uid : $profile_uid);
logger('linkify: ' . print_r($results,true));
if($results) {
// Set permissions based on tag replacements
@@ -830,6 +821,12 @@ class Item extends \Zotlabs\Web\Controller {
$datarray['plink'] = $plink;
$datarray['route'] = $route;
// A specific ACL over-rides public_policy completely
if(! empty_acl($datarray))
$datarray['public_policy'] = '';
if($iconfig)
$datarray['iconfig'] = $iconfig;
@@ -1077,24 +1074,36 @@ class Item extends \Zotlabs\Web\Controller {
if((argc() == 3) && (argv(1) === 'drop') && intval(argv(2))) {
require_once('include/items.php');
$i = q("select id, uid, author_xchan, owner_xchan, source_xchan, item_type from item where id = %d limit 1",
$i = q("select id, uid, item_origin, author_xchan, owner_xchan, source_xchan, item_type from item where id = %d limit 1",
intval(argv(2))
);
if($i) {
$can_delete = false;
$local_delete = false;
if(local_channel() && local_channel() == $i[0]['uid'])
if(local_channel() && local_channel() == $i[0]['uid']) {
$local_delete = true;
$sys = get_sys_channel();
if(is_site_admin() && $sys['channel_id'] == $i[0]['uid'])
$can_delete = true;
}
$ob_hash = get_observer_hash();
if($ob_hash && ($ob_hash === $i[0]['author_xchan'] || $ob_hash === $i[0]['owner_xchan'] || $ob_hash === $i[0]['source_xchan']))
if($ob_hash && ($ob_hash === $i[0]['author_xchan'] || $ob_hash === $i[0]['owner_xchan'] || $ob_hash === $i[0]['source_xchan'])) {
$can_delete = true;
}
// The site admin can delete any post/item on the site.
// If the item originated on this site+channel the deletion will propagate downstream.
// Otherwise just the local copy is removed.
if(is_site_admin()) {
$local_delete = true;
if(intval($i[0]['item_origin']))
$can_delete = true;
}
if(! ($can_delete || $local_delete)) {
notice( t('Permission denied.') . EOL);
return;

View File

@@ -296,10 +296,11 @@ class Like extends \Zotlabs\Web\Controller {
notice( t('Permission denied') . EOL);
killme();
}
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($item['owner_xchan'])
);
if($r)
$thread_owner = $r[0];
else
@@ -418,6 +419,7 @@ class Like extends \Zotlabs\Web\Controller {
$arr['item_origin'] = 1;
$arr['item_notshown'] = 1;
$arr['item_type'] = $item['item_type'];
if(intval($item['item_wall']))
$arr['item_wall'] = 1;

View File

@@ -55,10 +55,10 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$h = explode("\n",$result['header']);
foreach ($h as $l) {
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
$hdrs[$k] = $v;
$hdrs[strtolower($k)] = $v;
}
if (array_key_exists('Content-Type', $hdrs))
$type = $hdrs['Content-Type'];
if (array_key_exists('content-type', $hdrs))
$type = $hdrs['content-type'];
if($type) {
$zrl = is_matrix_url($url);
if(stripos($type,'image/') !== false) {
@@ -82,6 +82,10 @@ class Linkinfo extends \Zotlabs\Web\Controller {
echo $br . '[audio]' . $url . '[/audio]' . $br;
killme();
}
if(strtolower($type) === 'application/pdf' || strtolower($type) === 'application/x-pdf') {
echo $br . '[embed]' . $url . '[/embed]' . $br;
killme();
}
}
}

View File

@@ -10,7 +10,7 @@ class Login extends \Zotlabs\Web\Controller {
if(remote_channel() && $_SESSION['atoken'])
goaway(z_root());
return login((\App::$config['system']['register_policy'] == REGISTER_CLOSED) ? false : true);
return login(true);
}
}

View File

@@ -5,7 +5,12 @@ namespace Zotlabs\Module;
class Logout extends \Zotlabs\Web\Controller {
function init() {
\App::$session->nuke();
if($_SESSION['delegate'] && $_SESSION['delegate_push']) {
$_SESSION = $_SESSION['delegate_push'];
}
else {
\App::$session->nuke();
}
goaway(z_root());
}

View File

@@ -14,12 +14,16 @@ class Magic extends \Zotlabs\Web\Controller {
logger('mod_magic: args: ' . print_r($_REQUEST,true),LOGGER_DATA);
$addr = ((x($_REQUEST,'addr')) ? $_REQUEST['addr'] : '');
$bdest = ((x($_REQUEST,'bdest')) ? $_REQUEST['bdest'] : '');
$dest = ((x($_REQUEST,'dest')) ? $_REQUEST['dest'] : '');
$test = ((x($_REQUEST,'test')) ? intval($_REQUEST['test']) : 0);
$rev = ((x($_REQUEST,'rev')) ? intval($_REQUEST['rev']) : 0);
$owa = ((x($_REQUEST,'owa')) ? intval($_REQUEST['owa']) : 0);
$delegate = ((x($_REQUEST,'delegate')) ? $_REQUEST['delegate'] : '');
if($bdest)
$dest = hex2bin($bdest);
$parsed = parse_url($dest);
if(! $parsed) {
if($test) {
@@ -112,6 +116,8 @@ class Magic extends \Zotlabs\Web\Controller {
if($r && intval($r[0]['channel_id'])) {
$allowed = perm_is_allowed($r[0]['channel_id'],get_observer_hash(),'delegate');
if($allowed) {
$tmp = $_SESSION;
$_SESSION['delegate_push'] = $tmp;
$_SESSION['delegate_channel'] = $r[0]['channel_id'];
$_SESSION['delegate'] = get_observer_hash();
$_SESSION['account_id'] = intval($r[0]['channel_account_id']);
@@ -137,6 +143,9 @@ class Magic extends \Zotlabs\Web\Controller {
if($owa) {
$dest = strip_zids($dest);
$dest = strip_query_param($dest,'f');
$headers = [];
$headers['Accept'] = 'application/x-zot+json' ;
$headers['X-Open-Web-Auth'] = random_string();

View File

@@ -67,14 +67,14 @@ class Mail extends \Zotlabs\Web\Controller {
if(! $recipient) {
$channel = \App::get_channel();
$j = \Zotlabs\Zot\Finger::run($rstr,$channel);
$j = \Zotlabs\Zot\Finger::run(punify($rstr),$channel);
if(! $j['success']) {
notice( t('Unable to lookup recipient.') . EOL);
return;
}
logger('message_post: lookup: ' . $url . ' ' . print_r($j,true));
logger('message_post: lookup: ' . $rstr . ' ' . print_r($j,true));
if(! $j['guid']) {
notice( t('Unable to communicate with requested channel.'));

View File

@@ -156,7 +156,7 @@ class Manage extends \Zotlabs\Web\Controller {
if($delegates) {
for($x = 0; $x < count($delegates); $x ++) {
$delegates[$x]['link'] = 'magic?f=&dest=' . urlencode($delegates[$x]['xchan_url'])
$delegates[$x]['link'] = 'magic?f=&bdest=' . bin2hex($delegates[$x]['xchan_url'])
. '&delegate=' . urlencode($delegates[$x]['xchan_addr']);
$delegates[$x]['channel_name'] = $delegates[$x]['xchan_name'];
$delegates[$x]['delegate'] = 1;

View File

@@ -7,18 +7,36 @@ require_once('include/channel.php');
class Menu extends \Zotlabs\Web\Controller {
function init() {
if (array_key_exists('sys', $_REQUEST) && $_REQUEST['sys'] && is_site_admin()) {
if(argc() > 1 && argv(1) === 'sys' && is_site_admin()) {
$sys = get_sys_channel();
if ($sys && intval($sys['channel_id'])) {
if($sys && intval($sys['channel_id'])) {
\App::$is_sys = true;
}
}
if(argc() > 1)
$which = argv(1);
else
return;
profile_load($which);
}
function post() {
function post() {
$uid = local_channel();
if(! \App::$profile) {
return;
}
$which = argv(1);
$uid = \App::$profile['channel_id'];
if(array_key_exists('sys', $_REQUEST) && $_REQUEST['sys'] && is_site_admin()) {
$sys = get_sys_channel();
@@ -43,7 +61,7 @@ class Menu extends \Zotlabs\Web\Controller {
if($r) {
menu_sync_packet($uid,get_observer_hash(),$menu_id);
//info( t('Menu updated.') . EOL);
goaway(z_root() . '/mitem/' . $menu_id . ((\App::$is_sys) ? '?f=&sys=1' : ''));
goaway(z_root() . '/mitem/' . $which . '/' . $menu_id . ((\App::$is_sys) ? '?f=&sys=1' : ''));
}
else
notice( t('Unable to update menu.'). EOL);
@@ -54,7 +72,7 @@ class Menu extends \Zotlabs\Web\Controller {
menu_sync_packet($uid,get_observer_hash(),$r);
//info( t('Menu created.') . EOL);
goaway(z_root() . '/mitem/' . $r . ((\App::$is_sys) ? '?f=&sys=1' : ''));
goaway(z_root() . '/mitem/' . $which . '/' . $r . ((\App::$is_sys) ? '?f=&sys=1' : ''));
}
else
notice( t('Unable to create menu.'). EOL);
@@ -67,27 +85,71 @@ class Menu extends \Zotlabs\Web\Controller {
function get() {
if(! \App::$profile) {
notice( t('Requested profile is not available.') . EOL );
\App::$error = 404;
return;
}
$which = argv(1);
$_SESSION['return_url'] = \App::$query_string;
$uid = local_channel();
if (\App::$is_sys && is_site_admin()) {
$owner = 0;
$channel = null;
$observer = \App::get_observer();
$channel = \App::get_channel();
if(\App::$is_sys && is_site_admin()) {
$sys = get_sys_channel();
$uid = intval($sys['channel_id']);
if($sys && intval($sys['channel_id'])) {
$uid = $owner = intval($sys['channel_id']);
$channel = $sys;
$observer = $sys;
}
}
if(! $uid) {
if(! $owner) {
// Figure out who the page owner is.
$r = channelx_by_nick($which);
if($r) {
$owner = intval($r['channel_id']);
}
}
$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
$perms = get_all_perms($owner,$ob_hash);
if(! $perms['write_pages']) {
notice( t('Permission denied.') . EOL);
return '';
return;
}
// Get the observer, check their permissions
$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
$perms = get_all_perms($owner,$ob_hash);
if(! $perms['write_pages']) {
notice( t('Permission denied.') . EOL);
return;
}
if(argc() == 2) {
if(argc() == 1) {
$channel = (($sys) ? $sys : \App::get_channel());
$channel = (($sys) ? $sys : channelx_by_n($owner));
// list menus
$x = menu_list($uid);
$x = menu_list($owner);
if($x) {
for($y = 0; $y < count($x); $y ++) {
$m = menu_fetch($x[$y]['menu_name'],$uid,get_observer_hash());
$m = menu_fetch($x[$y]['menu_name'],$owner,get_observer_hash());
if($m)
$x[$y]['element'] = '[element]' . base64url_encode(json_encode(menu_element($channel,$m))) . '[/element]';
$x[$y]['bookmark'] = (($x[$y]['menu_flags'] & MENU_BOOKMARK) ? true : false);
@@ -100,6 +162,7 @@ class Menu extends \Zotlabs\Web\Controller {
'$menu_bookmark' => array('menu_bookmark', t('Allow Bookmarks'), 0 , t('Menu may be used to store saved bookmarks'), array(t('No'), t('Yes'))),
'$submit' => t('Submit and proceed'),
'$sys' => \App::$is_sys,
'$nick' => $which,
'$display' => 'none'
));
@@ -119,6 +182,7 @@ class Menu extends \Zotlabs\Web\Controller {
'$hintdrop' => t('Delete this menu'),
'$hintcontent' => t('Edit menu contents'),
'$hintedit' => t('Edit this menu'),
'$nick' => $which,
'$sys' => \App::$is_sys
));
@@ -126,19 +190,19 @@ class Menu extends \Zotlabs\Web\Controller {
}
if(argc() > 1) {
if(intval(argv(1))) {
if(argc() > 2) {
if(intval(argv(2))) {
if(argc() == 3 && argv(2) == 'drop') {
menu_sync_packet($uid,get_observer_hash(),intval(argv(1)),true);
$r = menu_delete_id(intval(argv(1)),$uid);
if(argc() == 4 && argv(3) == 'drop') {
menu_sync_packet($owner,get_observer_hash(),intval(argv(1)),true);
$r = menu_delete_id(intval(argv(2)),$owner);
if(!$r)
notice( t('Menu could not be deleted.'). EOL);
goaway(z_root() . '/menu' . ((\App::$is_sys) ? '?f=&sys=1' : ''));
goaway(z_root() . '/menu/' . $which . ((\App::$is_sys) ? '?f=&sys=1' : ''));
}
$m = menu_fetch_id(intval(argv(1)),$uid);
$m = menu_fetch_id(intval(argv(2)),$owner);
if(! $m) {
notice( t('Menu not found.') . EOL);
@@ -148,14 +212,15 @@ class Menu extends \Zotlabs\Web\Controller {
$o = replace_macros(get_markup_template('menuedit.tpl'), array(
'$header' => t('Edit Menu'),
'$sys' => \App::$is_sys,
'$menu_id' => intval(argv(1)),
'$menu_edit_link' => 'mitem/' . intval(argv(1)) . ((\App::$is_sys) ? '?f=&sys=1' : ''),
'$menu_id' => intval(argv(2)),
'$menu_edit_link' => 'mitem/' . $which . '/' . intval(argv(1)) . ((\App::$is_sys) ? '?f=&sys=1' : ''),
'$hintedit' => t('Add or remove entries to this menu'),
'$editcontents' => t('Edit menu contents'),
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
'$menu_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''),
'$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), (($m['menu_flags'] & MENU_BOOKMARK) ? 1 : 0), t('Menu may be used to store saved bookmarks'), array(t('No'), t('Yes'))),
'$menu_system' => (($m['menu_flags'] & MENU_SYSTEM) ? 1 : 0),
'$nick' => $which,
'$submit' => t('Submit and proceed')
));

View File

@@ -93,7 +93,7 @@ class Message extends \Zotlabs\Web\Controller {
));
$o .= alt_pager($a,count($r));
$o .= alt_pager(count($r));
return $o;

View File

@@ -8,22 +8,25 @@ require_once('include/acl_selectors.php');
class Mitem extends \Zotlabs\Web\Controller {
function init() {
$uid = local_channel();
if(array_key_exists('sys',$_REQUEST) && $_REQUEST['sys'] && is_site_admin()) {
if(argc() > 1 && argv(1) === 'sys' && is_site_admin()) {
$sys = get_sys_channel();
$uid = intval($sys['channel_id']);
\App::$is_sys = true;
if($sys && intval($sys['channel_id'])) {
\App::$is_sys = true;
}
}
if(argc() > 1)
$which = argv(1);
else
return;
profile_load($which);
if(! $uid)
if(argc() < 3)
return;
if(argc() < 2)
return;
$m = menu_fetch_id(intval(argv(1)),$uid);
$m = menu_fetch_id(intval(argv(2)),\App::$profile['channel_id']);
if(! $m) {
notice( t('Menu not found.') . EOL);
return '';
@@ -32,19 +35,27 @@ class Mitem extends \Zotlabs\Web\Controller {
}
function post() {
function post() {
$uid = local_channel();
if(\App::$is_sys && is_site_admin()) {
$sys = get_sys_channel();
$uid = intval($sys['channel_id']);
}
if(! $uid) {
if(! \App::$profile) {
return;
}
$which = argv(1);
$uid = \App::$profile['channel_id'];
if(array_key_exists('sys', $_REQUEST) && $_REQUEST['sys'] && is_site_admin()) {
$sys = get_sys_channel();
$uid = intval($sys['channel_id']);
\App::$is_sys = true;
}
if(! $uid)
return;
if(! \App::$data['menu'])
return;
@@ -63,14 +74,14 @@ class Mitem extends \Zotlabs\Web\Controller {
$_REQUEST['mitem_flags'] |= MENU_ITEM_NEWWIN;
$mitem_id = ((argc() > 2) ? intval(argv(2)) : 0);
$mitem_id = ((argc() > 3) ? intval(argv(3)) : 0);
if($mitem_id) {
$_REQUEST['mitem_id'] = $mitem_id;
$r = menu_edit_item($_REQUEST['menu_id'],$uid,$_REQUEST);
if($r) {
menu_sync_packet($uid,get_observer_hash(),$_REQUEST['menu_id']);
//info( t('Menu element updated.') . EOL);
goaway(z_root() . '/mitem/' . $_REQUEST['menu_id'] . ((\App::$is_sys) ? '?f=&sys=1' : ''));
goaway(z_root() . '/mitem/' . $which . '/' . $_REQUEST['menu_id'] . ((\App::$is_sys) ? '?f=&sys=1' : ''));
}
else
notice( t('Unable to update menu element.') . EOL);
@@ -82,10 +93,10 @@ class Mitem extends \Zotlabs\Web\Controller {
menu_sync_packet($uid,get_observer_hash(),$_REQUEST['menu_id']);
//info( t('Menu element added.') . EOL);
if($_REQUEST['submit']) {
goaway(z_root() . '/menu' . ((\App::$is_sys) ? '?f=&sys=1' : ''));
goaway(z_root() . '/menu/' . $which . ((\App::$is_sys) ? '?f=&sys=1' : ''));
}
if($_REQUEST['submit-more']) {
goaway(z_root() . '/mitem/' . $_REQUEST['menu_id'] . '?f=&display=block' . ((\App::$is_sys) ? '&sys=1' : '') );
goaway(z_root() . '/mitem/' . $which . '/' . $_REQUEST['menu_id'] . '?f=&display=block' . ((\App::$is_sys) ? '&sys=1' : '') );
}
}
else
@@ -96,12 +107,15 @@ class Mitem extends \Zotlabs\Web\Controller {
}
function get() {
function get() {
$uid = local_channel();
$channel = \App::get_channel();
$owner = \App::$profile['channel_id'];
$channel = channelx_by_n($owner);
$observer = \App::get_observer();
$which = argv(1);
$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
if(\App::$is_sys && is_site_admin()) {
@@ -116,15 +130,15 @@ class Mitem extends \Zotlabs\Web\Controller {
return '';
}
if(argc() < 2 || (! \App::$data['menu'])) {
if(argc() < 3 || (! \App::$data['menu'])) {
notice( t('Not found.') . EOL);
return '';
}
$m = menu_fetch(\App::$data['menu']['menu_name'],$uid,$ob_hash);
$m = menu_fetch(\App::$data['menu']['menu_name'],$owner,$ob_hash);
\App::$data['menu_item'] = $m;
$menu_list = menu_list($uid);
$menu_list = menu_list($owner);
foreach($menu_list as $menus) {
if($menus['menu_name'] != $m['menu']['menu_name'])
@@ -135,10 +149,10 @@ class Mitem extends \Zotlabs\Web\Controller {
$lockstate = (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock');
if(argc() == 2) {
if(argc() == 3) {
$r = q("select * from menu_item where mitem_menu_id = %d and mitem_channel_id = %d order by mitem_order asc, mitem_desc asc",
intval(\App::$data['menu']['menu_id']),
intval($uid)
intval($owner)
);
if($_GET['display']) {
@@ -167,6 +181,7 @@ class Mitem extends \Zotlabs\Web\Controller {
'$display' => $display,
'$lockstate' => $lockstate,
'$menu_names' => $menu_names,
'$nick' => $which,
'$sys' => \App::$is_sys
));
@@ -187,40 +202,41 @@ class Mitem extends \Zotlabs\Web\Controller {
'$hintnew' => t('Add menu element'),
'$hintdrop' => t('Delete this menu item'),
'$hintedit' => t('Edit this menu item'),
'$nick' => $which,
));
return $o;
}
if(argc() > 2) {
if(intval(argv(2))) {
if(argc() > 3) {
if(intval(argv(3))) {
$m = q("select * from menu_item where mitem_id = %d and mitem_channel_id = %d limit 1",
intval(argv(2)),
intval($uid)
intval(argv(3)),
intval($owner)
);
if(! $m) {
notice( t('Menu item not found.') . EOL);
goaway(z_root() . '/menu'. ((\App::$is_sys) ? '?f=&sys=1' : ''));
goaway(z_root() . '/menu/'. $which . ((\App::$is_sys) ? '?f=&sys=1' : ''));
}
$mitem = $m[0];
$lockstate = (($mitem['allow_cid'] || $mitem['allow_gid'] || $mitem['deny_cid'] || $mitem['deny_gid']) ? 'lock' : 'unlock');
if(argc() == 4 && argv(3) == 'drop') {
menu_sync_packet($uid,get_observer_hash(),$mitem['mitem_menu_id']);
$r = menu_del_item($mitem['mitem_menu_id'], $uid, intval(argv(2)));
menu_sync_packet($uid,get_observer_hash(),$mitem['mitem_menu_id']);
if(argc() == 5 && argv(4) == 'drop') {
menu_sync_packet($owner,get_observer_hash(),$mitem['mitem_menu_id']);
$r = menu_del_item($mitem['mitem_menu_id'], $owner, intval(argv(3)));
menu_sync_packet($owner,get_observer_hash(),$mitem['mitem_menu_id']);
if($r)
info( t('Menu item deleted.') . EOL);
else
notice( t('Menu item could not be deleted.'). EOL);
goaway(z_root() . '/mitem/' . $mitem['mitem_menu_id'] . ((\App::$is_sys) ? '?f=&sys=1' : ''));
goaway(z_root() . '/mitem/' . $which . '/' . $mitem['mitem_menu_id'] . ((\App::$is_sys) ? '?f=&sys=1' : ''));
}
// edit menu item
@@ -234,7 +250,7 @@ class Mitem extends \Zotlabs\Web\Controller {
'$allow_gid' => acl2json($mitem['allow_gid']),
'$deny_cid' => acl2json($mitem['deny_cid']),
'$deny_gid' => acl2json($mitem['deny_gid']),
'$mitem_id' => intval(argv(2)),
'$mitem_id' => intval(argv(3)),
'$mitem_desc' => array('mitem_desc', t('Link text'), $mitem['mitem_desc'], '','*'),
'$mitem_link' => array('mitem_link', t('Link or Submenu Target'), $mitem['mitem_link'], 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'),
'$usezid' => array('usezid', t('Use magic-auth if available'), (($mitem['mitem_flags'] & MENU_ITEM_ZID) ? 1 : 0), '', array(t('No'), t('Yes'))),
@@ -242,7 +258,8 @@ class Mitem extends \Zotlabs\Web\Controller {
'$mitem_order' => array('mitem_order', t('Order in list'),$mitem['mitem_order'],t('Higher numbers will sink to bottom of listing')),
'$submit' => t('Submit'),
'$lockstate' => $lockstate,
'$menu_names' => $menu_names
'$menu_names' => $menu_names,
'$nick' => $which
));
return $o;

View File

@@ -14,9 +14,12 @@ class Moderate extends \Zotlabs\Web\Controller {
return;
}
\App::set_pager_itemspage(60);
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
//show all items
if(argc() == 1) {
$r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60",
$r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc $pager_sql",
intval(local_channel()),
intval(ITEM_MODERATED)
);
@@ -26,7 +29,7 @@ class Moderate extends \Zotlabs\Web\Controller {
if(argc() == 2) {
$post_id = intval(argv(1));
$r = q("select item.id as item_id, item.* from item where item.id = %d and item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60",
$r = q("select item.id as item_id, item.* from item where item.id = %d and item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc $pager_sql",
intval($post_id),
intval(local_channel()),
intval(ITEM_MODERATED)
@@ -47,17 +50,26 @@ class Moderate extends \Zotlabs\Web\Controller {
);
if($r) {
$item = $r[0];
if($action === 'approve') {
q("update item set item_blocked = 0 where uid = %d and id = %d",
intval(local_channel()),
intval($post_id)
);
$item['item_blocked'] = 0;
item_update_parent_commented($item);
notice( t('Comment approved') . EOL);
}
elseif($action === 'drop') {
drop_item($post_id,false);
notice( t('Comment deleted') . EOL);
}
// refetch the item after changes have been made
$r = q("select * from item where id = %d",
intval($post_id)
@@ -83,6 +95,7 @@ class Moderate extends \Zotlabs\Web\Controller {
}
$o = conversation($items,'moderate',false,'traditional');
$o .= alt_pager(count($items));
return $o;
}

View File

@@ -15,6 +15,9 @@ class Network extends \Zotlabs\Web\Controller {
notice( t('Permission denied.') . EOL);
return;
}
if(in_array(substr($_GET['search'],0,1),[ '@', '!', '?']))
goaway('search' . '?f=&search=' . $_GET['search']);
if(count($_GET) < 2) {
$network_options = get_pconfig(local_channel(),'system','network_page_default');
@@ -57,13 +60,26 @@ class Network extends \Zotlabs\Web\Controller {
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
$nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
$static = ((x($_GET,'static')) ? intval($_GET['static']) : 0);
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$verb = ((x($_REQUEST,'verb')) ? $_REQUEST['verb'] : '');
$order = get_pconfig(local_channel(), 'mod_network', 'order', 0);
switch($order) {
case 0:
$order = 'comment';
break;
case 1:
$order = 'post';
break;
case 2:
$nouveau = true;
break;
}
$search = (($_GET['search']) ? $_GET['search'] : '');
if($search) {
$_GET['netsearch'] = escape_tags($search);
@@ -84,7 +100,7 @@ class Network extends \Zotlabs\Web\Controller {
}
if($datequery)
$_GET['order'] = 'post';
$order = 'post';
// filter by collection (e.g. group)
@@ -107,16 +123,11 @@ class Network extends \Zotlabs\Web\Controller {
$def_acl = array('allow_gid' => '<' . $r[0]['hash'] . '>');
}
$default_cmin = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmin',0) : 0);
$default_cmax = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmax',99) : 99);
$default_cmin = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmin',0) : (-1));
$default_cmax = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmax',99) : (-1));
// if no tabs are selected, defaults to comments
$cid = ((x($_GET,'cid')) ? intval($_GET['cid']) : 0);
$star = ((x($_GET,'star')) ? intval($_GET['star']) : 0);
$order = ((x($_GET,'order')) ? notags($_GET['order']) : 'comment');
$liked = ((x($_GET,'liked')) ? intval($_GET['liked']) : 0);
$conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0);
$spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0);
@@ -125,17 +136,21 @@ class Network extends \Zotlabs\Web\Controller {
$file = ((x($_GET,'file')) ? $_GET['file'] : '');
$xchan = ((x($_GET,'xchan')) ? $_GET['xchan'] : '');
$net = ((x($_GET,'net')) ? $_GET['net'] : '');
$pf = ((x($_GET,'pf')) ? $_GET['pf'] : '');
$deftag = '';
if(x($_GET,'search') || x($_GET,'file'))
if(x($_GET,'search') || $file || (!$pf && $cid))
$nouveau = true;
if($cid) {
$r = q("SELECT abook_xchan FROM abook WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
$cid_r = q("SELECT abook.abook_xchan, xchan.xchan_addr, xchan.xchan_name, xchan.xchan_url, xchan.xchan_photo_s, xchan.xchan_pubforum from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and abook_blocked = 0 limit 1",
intval($cid),
intval(local_channel())
);
if(! $r) {
if(! $cid_r) {
if($update) {
killme();
}
@@ -143,14 +158,14 @@ class Network extends \Zotlabs\Web\Controller {
goaway(z_root() . '/network');
// NOTREACHED
}
if($_GET['pf'] === '1')
$deftag = '!' . t('forum') . '+' . intval($cid);
if($pf)
$deftag = '!{' . (($cid_r[0]['xchan_addr']) ? $cid_r[0]['xchan_addr'] : $cid_r[0]['xchan_url']) . '}';
else
$def_acl = [ 'allow_cid' => '<' . $r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ];
$def_acl = [ 'allow_cid' => '<' . $cid_r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ];
}
if(! $update) {
$tabs = network_tabs();
$tabs = ''; //network_tabs();
$o .= $tabs;
// search terms header
@@ -185,7 +200,8 @@ class Network extends \Zotlabs\Web\Controller {
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true,
'jotnets' => true
'jotnets' => true,
'reset' => t('Reset form')
);
if($deftag)
$x['pretext'] = $deftag;
@@ -210,27 +226,24 @@ class Network extends \Zotlabs\Web\Controller {
$sql_nets = '';
$distinct = '';
$item_thread_top = ' AND item_thread_top = 1 ';
$sql_extra = $sql_options;
$sql_extra = '';
if($group) {
$contact_str = '';
$contacts = group_get_members($group);
if($contacts) {
foreach($contacts as $c) {
if($contact_str)
$contact_str .= ',';
$contact_str .= "'" . $c['xchan'] . "'";
}
$contact_str = ids_to_querystr($contacts,'xchan',true);
}
else {
$contact_str = ' 0 ';
info( t('Privacy group is empty'));
$contact_str = " '0' ";
if(! $update) {
info( t('Privacy group is empty'));
}
}
$distinct = ' distinct ';
$item_thread_top = '';
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND (( author_xchan IN ( $contact_str ) OR owner_xchan in ( $contact_str )) or allow_gid like '" . protect_sprintf('%<' . dbesc($group_hash) . '>%') . "' ) and id = parent $item_normal ) ";
$x = group_rec_byhash(local_channel(), $group_hash);
@@ -246,35 +259,37 @@ class Network extends \Zotlabs\Web\Controller {
$o .= $status_editor;
}
elseif($cid) {
$r = q("SELECT abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and abook_blocked = 0 limit 1",
intval($cid),
intval(local_channel())
);
if($r) {
$distinct = ' distinct ';
$item_thread_top = '';
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' ) $item_normal ) ";
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => '<a href="' . zid($r[0]['xchan_url']) . '" ><img src="' . zid($r[0]['xchan_photo_s']) . '" alt="' . urlencode($r[0]['xchan_name']) . '" /></a> <a href="' . zid($r[0]['xchan_url']) . '" >' . $r[0]['xchan_name'] . '</a>'
));
$o = $tabs;
$o .= $title;
$o .= $status_editor;
}
else {
notice( t('Invalid connection.') . EOL);
goaway(z_root() . '/network');
elseif($cid_r) {
$item_thread_top = '';
if($load || $update) {
if(!$pf && $nouveau) {
$sql_extra = " AND author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ";
}
else {
$ttype = (($pf) ? TERM_FORUM : TERM_MENTION);
$p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal ");
$p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND ttype = $ttype AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'");
$p_str = ids_to_querystr(array_merge($p1,$p2),'parent');
$sql_extra = " AND item.parent IN ( $p_str ) ";
}
}
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => '<a href="' . zid($cid_r[0]['xchan_url']) . '" ><img src="' . zid($cid_r[0]['xchan_photo_s']) . '" alt="' . urlencode($cid_r[0]['xchan_name']) . '" /></a> <a href="' . zid($cid_r[0]['xchan_url']) . '" >' . $cid_r[0]['xchan_name'] . '</a>'
));
$o = $tabs;
$o .= $title;
$o .= $status_editor;
}
elseif($xchan) {
$r = q("select * from xchan where xchan_hash = '%s'",
dbesc($xchan)
);
if($r) {
$distinct = ' distinct ';
$item_thread_top = '';
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($xchan) . "' or owner_xchan = '" . dbesc($xchan) . "' ) $item_normal ) ";
$title = replace_macros(get_markup_template("section_title.tpl"),array(
@@ -320,8 +335,8 @@ class Network extends \Zotlabs\Web\Controller {
'$uid' => ((local_channel()) ? local_channel() : '0'),
'$gid' => (($gid) ? $gid : '0'),
'$cid' => (($cid) ? $cid : '0'),
'$cmin' => (($cmin) ? $cmin : '0'),
'$cmax' => (($cmax) ? $cmax : '0'),
'$cmin' => (($cmin) ? $cmin : '(-1)'),
'$cmax' => (($cmax) ? $cmax : '(-1)'),
'$star' => (($star) ? $star : '0'),
'$liked' => (($liked) ? $liked : '0'),
'$conv' => (($conv) ? $conv : '0'),
@@ -342,7 +357,8 @@ class Network extends \Zotlabs\Web\Controller {
'$mid' => '',
'$verb' => $verb,
'$net' => $net,
'$dbegin' => $datequery2
'$dbegin' => $datequery2,
'$pf' => (($pf) ? $pf : '0'),
));
}
@@ -381,11 +397,16 @@ class Network extends \Zotlabs\Web\Controller {
}
if($conv) {
$distinct = ' distinct ';
$item_thread_top = '';
$sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan like '%s' or item_mentionsme = 1 )) ",
dbesc(protect_sprintf($channel['channel_hash']))
);
if($nouveau) {
$sql_extra .= " AND author_xchan = '" . dbesc($channel['channel_hash']) . "' ";
}
else {
$sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan = '%s' or item_mentionsme = 1 )) ",
dbesc(protect_sprintf($channel['channel_hash']))
);
}
}
if($update && ! $load) {
@@ -400,8 +421,9 @@ class Network extends \Zotlabs\Web\Controller {
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
}
if(($cmin != 0) || ($cmax != 99)) {
// cmin and cmax are both -1 when the affinity tool is disabled
if(($cmin != (-1)) || ($cmax != (-1))) {
// Not everybody who shows up in the network stream will be in your address book.
// By default those that aren't are assumed to have closeness = 99; but this isn't
@@ -458,15 +480,15 @@ class Network extends \Zotlabs\Web\Controller {
if($nouveau && $load) {
// "New Item View" - show all items unthreaded in reverse created date order
$items = q("SELECT item.*, item.id AS item_id, received FROM item
$items = q("SELECT item.*, item.id AS item_id, created FROM item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
$net_query
WHERE true $uids $item_normal
and (abook.abook_blocked = 0 or abook.abook_flags is null)
$simple_update
$sql_extra $sql_nets
$sql_extra $sql_options $sql_nets
$net_query2
ORDER BY item.received DESC $pager_sql "
ORDER BY item.created DESC $pager_sql "
);
require_once('include/items.php');
@@ -480,20 +502,19 @@ class Network extends \Zotlabs\Web\Controller {
// Normal conversation view
if($order === 'post')
$ordering = "created";
$ordering = "created";
else
$ordering = "commented";
$ordering = "commented";
if($load) {
// Fetch a page full of parent items for this page
$r = q("SELECT $distinct item.parent AS item_id FROM item
$r = q("SELECT item.parent AS item_id FROM item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
$net_query
WHERE true $uids $item_thread_top $item_normal
AND item.mid = item.parent_mid
and (abook.abook_blocked = 0 or abook.abook_flags is null)
$sql_extra3 $sql_extra $sql_nets
$sql_extra3 $sql_extra $sql_options $sql_nets
$net_query2
ORDER BY $ordering DESC $pager_sql "
);
@@ -506,7 +527,7 @@ class Network extends \Zotlabs\Web\Controller {
$net_query
WHERE true $uids $item_normal_update $simple_update
and (abook.abook_blocked = 0 or abook.abook_flags is null)
$sql_extra3 $sql_extra $sql_nets $net_query2"
$sql_extra3 $sql_extra $sql_options $sql_nets $net_query2"
);
$_SESSION['loadtime'] = datetime_convert();
}
@@ -566,11 +587,14 @@ class Network extends \Zotlabs\Web\Controller {
}
$mode = (($nouveau) ? 'network-new' : 'network');
if($search)
$mode = 'search';
$o .= conversation($items,$mode,$update,$page_mode);
if(($items) && (! $update))
$o .= alt_pager($a,count($items));
$o .= alt_pager(count($items));
return $o;
}

View File

@@ -16,8 +16,15 @@ class New_channel extends \Zotlabs\Web\Controller {
require_once('library/urlify/URLify.php');
$result = array('error' => false, 'message' => '');
$n = trim($_REQUEST['name']);
$x = strtolower(\URLify::transliterate($n));
$x = false;
if(get_config('system','unicode_usernames')) {
$x = punify(mb_strtolower($n));
}
if((! $x) || strlen($x) > 64)
$x = strtolower(\URLify::transliterate($n));
$test = array();
@@ -34,7 +41,7 @@ class New_channel extends \Zotlabs\Web\Controller {
$test[] = legal_webbie($x);
// fullname plus random number
$test[] = legal_webbie($x) . mt_rand(1000,9999);
json_return_and_die(check_webbie($test));
}
@@ -42,11 +49,32 @@ class New_channel extends \Zotlabs\Web\Controller {
require_once('library/urlify/URLify.php');
$result = array('error' => false, 'message' => '');
$n = trim($_REQUEST['nick']);
$x = strtolower(\URLify::transliterate($n));
if(! $n) {
$n = trim($_REQUEST['name']);
}
$x = false;
if(get_config('system','unicode_usernames')) {
$x = punify(mb_strtolower($n));
}
if((! $x) || strlen($x) > 64)
$x = strtolower(\URLify::transliterate($n));
$test = array();
// first name
if(strpos($x,' '))
$test[] = legal_webbie(substr($x,0,strpos($x,' ')));
if($test[0]) {
// first name plus first initial of last
$test[] = ((strpos($x,' ')) ? $test[0] . legal_webbie(trim(substr($x,strpos($x,' '),2))) : '');
// first name plus random number
$test[] = $test[0] . mt_rand(1000,9999);
}
$n = legal_webbie($x);
if(strlen($n)) {
$test[] = $n;
@@ -110,7 +138,7 @@ class New_channel extends \Zotlabs\Web\Controller {
intval($aid)
);
if($r && (! intval($r[0]['total']))) {
$default_role = get_config('system','default_permissions_role');
$default_role = get_config('system','default_permissions_role','social');
}
$limit = account_service_class_fetch(get_account_id(),'total_identities');
@@ -122,24 +150,38 @@ class New_channel extends \Zotlabs\Web\Controller {
$channel_usage_message = '';
}
}
$name_help = '<span id="name_help_loading" style="display:none">' . t('Loading') . '</span><span id="name_help_text">';
$name_help .= (($default_role)
? t('Your real name is recommended.')
: t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"')
);
$name_help .= '</span>';
$nick_help = '<span id="nick_help_loading" style="display:none">' . t('Loading') . '</span><span id="nick_help_text">';
$nick_help .= t('This will be used to create a unique network address (like an email address).');
if(! get_config('system','unicode_usernames')) {
$nick_help .= ' ' . t('Allowed characters are a-z 0-9, - and _');
}
$nick_help .= '<span>';
$privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "" );
$perm_roles = \Zotlabs\Access\PermissionRoles::roles();
if((get_account_techlevel() < 4) && $privacy_role !== 'custom')
unset($perm_roles[t('Other')]);
$name = array('name', t('Name or caption'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"'), "*");
$name = array('name', t('Channel name'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), $name_help, "*");
$nickhub = '@' . \App::get_hostname();
$nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), sprintf( t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'), $nickhub), "*");
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/member/member_guide#Account_Permission_Roles" target="_blank">' . t('Read more about roles') . '</a>',$perm_roles);
$nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), $nick_help, "*");
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel permission role compatible with your usage needs and privacy requirements.') . '<br>' . '<a href="help/member/member_guide#Channel_Permission_Roles" target="_blank">' . t('Read more about channel permission roles') . '</a>',$perm_roles);
$o = replace_macros(get_markup_template('new_channel.tpl'), array(
'$title' => t('Create Channel'),
'$desc' => t('A channel is your identity on this network. It can represent a person, a blog, or a forum to name a few. Channels can make connections with other channels to share information with highly detailed permissions.'),
'$title' => t('Create a Channel'),
'$desc' => t('A channel is a unique network identity. It can represent a person (social network profile), a forum (group), a business or celebrity page, a newsfeed, and many other things.') ,
'$label_import' => t('or <a href="import">import an existing channel</a> from another location.'),
'$name' => $name,
'$role' => $role,
'$role' => $role,
'$default_role' => $default_role,
'$nickname' => $nickname,
'$validate' => t('Validate'),

View File

@@ -7,8 +7,8 @@ class Nojs extends \Zotlabs\Web\Controller {
function init() {
$n = ((argc() > 1) ? intval(argv(1)) : 1);
setcookie('jsdisabled', $n, 0, '/');
$p = $_GET['redir'];
$hasq = strpos($p,'?');
$p = hex2bin($_GET['redir']);
$hasq = strpbrk($p,'?&');
goaway(z_root() . (($p) ? '/' . $p : '') . (($hasq) ? '' : '?f=' ) . '&jsdisabled=' . $n);
}

View File

@@ -41,8 +41,6 @@ class Notifications extends \Zotlabs\Web\Controller {
$notifications_available = 1;
foreach ($r as $rr) {
$x = strip_tags(bbcode($rr['msg']));
if(strpos($x,','))
$x = substr($x,strpos($x,',')+1);
$notif_content .= replace_macros(get_markup_template('notify.tpl'),array(
'$item_link' => z_root().'/notify/view/'. $rr['id'],
'$item_image' => $rr['photo'],

View File

@@ -0,0 +1,151 @@
<?php
namespace Zotlabs\Module;
/**
* The OAuth2TestVehicle class is a way to test the registration of an OAuth2
* client app. It allows you to walk through the steps of registering a client,
* requesting an authorization code for that client, and then requesting an
* access token for use in authentication against the Hubzilla API endpoints.
*/
class OAuth2TestVehicle extends \Zotlabs\Web\Controller {
function init() {
killme();
// If there is a 'code' and 'state' parameter then this is a client app
// callback issued after the authorization code request
// TODO: Check state value and compare to original sent value
// "You should first compare this state value to ensure it matches the
// one you started with. You can typically store the state value in a
// cookie, and compare it when the user comes back. This ensures your
// redirection endpoint isn't able to be tricked into attempting to
// exchange arbitrary authorization codes."
$_SESSION['redirect_uri'] = z_root() . '/oauth2testvehicle';
$_SESSION['authorization_code'] = (x($_REQUEST, 'code') ? $_REQUEST['code'] : $_SESSION['authorization_code']);
$_SESSION['state'] = (x($_REQUEST, 'state') ? $_REQUEST['state'] : $_SESSION['state'] );
$_SESSION['client_id'] = (x($_REQUEST, 'client_id') ? $_REQUEST['client_id'] : $_SESSION['client_id'] );
$_SESSION['client_secret'] = (x($_REQUEST, 'client_secret') ? $_REQUEST['client_secret'] : $_SESSION['client_secret']);
$_SESSION['access_token'] = (x($_REQUEST, 'access_token') ? $_REQUEST['access_token'] : $_SESSION['access_token'] );
$_SESSION['api_response'] = (x($_SESSION, 'api_response') ? $_SESSION['api_response'] : '');
}
function get() {
$o .= replace_macros(get_markup_template('oauth2testvehicle.tpl'), array(
'$baseurl' => z_root(),
'$api_response' => $_SESSION['api_response'],
/*
endpoints => array(
array(
'path_to_endpoint',
array(
array('field_name_1', 'value'),
array('field_name_2', 'value'),
...
),
'submit_button_name',
'Description of API action'
)
)
*/
'$endpoints' => array(
array(
'authorize',
array(
array('response_type', 'code'),
array('client_id', (x($_REQUEST, 'client_id') ? $_REQUEST['client_id'] : 'oauth2_test_app')),
array('redirect_uri', $_SESSION['redirect_uri']),
array('state', 'xyz'),
// OpenID Connect Dynamic Client Registration 1.0 Client Metadata
// http://openid.net/specs/openid-connect-registration-1_0.html
array('client_name', 'OAuth2 Test App'),
array('logo_uri', urlencode(z_root() . '/images/icons/plugin.png')),
array('client_uri', urlencode('https://client.example.com/website')),
array('application_type', 'web'), // would be 'native' for mobile app
),
'oauth_authorize',
'Authorize a test client app',
'GET',
(($_REQUEST['code'] && $_REQUEST['state']) ? true : false),
),
array(
'oauth2testvehicle',
array(
array('action', 'request_token'),
array('grant_type', 'authorization_code'),
array('code', $_SESSION['authorization_code']),
array('redirect_uri', $_SESSION['redirect_uri']),
array('client_id', ($_SESSION['client_id'] ? $_SESSION['client_id'] : 'oauth2_test_app')),
array('client_secret', $_SESSION['client_secret']),
),
'oauth_token_request',
'Request a token',
'POST',
($_SESSION['success'] === 'request_token'),
),
array(
'oauth2testvehicle',
array(
array('action', 'api_files'),
array('access_token', $_SESSION['access_token']),
),
'oauth_api_files',
'API: Get channel files',
'POST',
($_SESSION['success'] === 'api_files'),
)
)
));
$_SESSION['success'] = '';
return $o;
}
function post() {
switch ($_POST['action']) {
case 'api_files':
$access_token = $_SESSION['access_token'];
$url = z_root() . '/api/z/1.0/files/';
$headers = [];
$headers[] = 'Authorization: Bearer ' . $access_token;
$post = z_fetch_url($url, false, 0, array(
'custom' => 'GET',
'headers' => $headers,
));
logger(json_encode($post, JSON_PRETTY_PRINT), LOGGER_DEBUG);
$response = json_decode($post['body'], true);
$_SESSION['api_response'] = json_encode($response, JSON_PRETTY_PRINT);
break;
case 'request_token':
$grant_type = (x($_POST, 'grant_type') ? $_POST['grant_type'] : '');
$redirect_uri = (x($_POST, 'redirect_uri') ? $_POST['redirect_uri'] : '');
$client_id = (x($_POST, 'client_id') ? $_POST['client_id'] : '');
$code = (x($_POST, 'code') ? $_POST['code'] : '');
$client_secret = (x($_POST, 'client_secret') ? $_POST['client_secret'] : '');
$url = z_root() . '/token/';
$params = http_build_query(array(
'grant_type' => $grant_type,
'redirect_uri' => urlencode($redirect_uri),
'client_id' => $client_id,
'code' => $code,
));
$post = z_post_url($url, $params, 0, array(
'http_auth' => $client_id . ':' . $client_secret,
));
logger(json_encode($post, JSON_PRETTY_PRINT), LOGGER_DEBUG);
$response = json_decode($post['body'], true);
logger(json_encode($response, JSON_PRETTY_PRINT), LOGGER_DEBUG);
if($response['access_token']) {
info('Access token received: ' . $response['access_token'] . EOL);
$_SESSION['success'] = 'request_token';
$_SESSION['access_token'] = $response['access_token'];
}
break;
default:
break;
}
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Zotlabs\Module;
class Oauthinfo extends \Zotlabs\Web\Controller {
function init() {
$ret = [
'issuer' => z_root(),
'authorization_endpoint' => z_root() . '/authorize',
'token_endpoint' => z_root() . '/token',
'response_types_supported' => [ 'code', 'token', 'id_token', 'code id_token', 'token id_token' ]
];
json_return_and_die($ret);
}
}

View File

@@ -0,0 +1,69 @@
<?php
namespace Zotlabs\Module;
require_once('include/contact_widgets.php');
require_once('include/items.php');
require_once("include/bbcode.php");
require_once('include/security.php');
require_once('include/conversation.php');
require_once('include/acl_selectors.php');
require_once('include/permissions.php');
/**
* @brief Channel Controller for broken OStatus implementations
*
*/
class Ochannel extends \Zotlabs\Web\Controller {
function init() {
$which = null;
if(argc() > 1)
$which = argv(1);
if(! $which) {
if(local_channel()) {
$channel = \App::get_channel();
if($channel && $channel['channel_address'])
$which = $channel['channel_address'];
}
}
if(! $which) {
notice( t('You must be logged in to see this page.') . EOL );
return;
}
$profile = 0;
$channel = \App::get_channel();
if((local_channel()) && (argc() > 2) && (argv(2) === 'view')) {
$which = $channel['channel_address'];
$profile = argv(1);
}
head_add_link( [
'rel' => 'alternate',
'type' => 'application/atom+xml',
'href' => z_root() . '/ofeed/' . $which
]);
// Run profile_load() here to make sure the theme is set before
// we start loading content
profile_load($which,$profile);
}
function get($update = 0, $load = false) {
if(argc() < 2)
return;
if($load)
$_SESSION['loadtime'] = datetime_convert();
return '<script>window.location.href = "' . z_root() . '/' . str_replace('ochannel/','channel/',\App::$query_string) . '";</script>';
}
}

View File

@@ -72,7 +72,7 @@ class Oep extends \Zotlabs\Web\Controller {
$url = $args['url'];
$maxwidth = intval($args['maxwidth']);
$maxheight = intval($args['maxheight']);
logger('processing display');
if(preg_match('#//(.*?)/display/(.*?)(&|\?|$)#',$url,$matches)) {
$res = $matches[2];
}
@@ -125,6 +125,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])
@@ -209,6 +210,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])
@@ -292,6 +294,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])
@@ -366,6 +369,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])

View File

@@ -34,6 +34,15 @@ class Owa extends \Zotlabs\Web\Controller {
where hubloc_addr = '%s' ",
dbesc(str_replace('acct:','',$keyId))
);
if(! $r) {
$found = discover_by_webbie(str_replace('acct:','',$keyId));
if($found) {
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
where hubloc_addr = '%s' ",
dbesc(str_replace('acct:','',$keyId))
);
}
}
if($r) {
foreach($r as $hubloc) {
$verified = \Zotlabs\Web\HTTPSig::verify('',$hubloc['xchan_pubkey']);

View File

@@ -4,6 +4,7 @@ namespace Zotlabs\Module;
require_once('include/security.php');
require_once('include/attach.php');
require_once('include/photo/photo_driver.php');
require_once('include/photos.php');
class Photo extends \Zotlabs\Web\Controller {
@@ -13,7 +14,8 @@ class Photo extends \Zotlabs\Web\Controller {
$prvcachecontrol = false;
$streaming = null;
$channel = null;
$person = 0;
switch(argc()) {
case 4:
$person = argv(3);
@@ -30,8 +32,8 @@ class Photo extends \Zotlabs\Web\Controller {
}
$observer_xchan = get_observer_hash();
$default = get_default_profile_photo();
$default = z_root() . '/' . get_default_profile_photo();
if(isset($type)) {
@@ -45,11 +47,11 @@ class Photo extends \Zotlabs\Web\Controller {
case 'm':
$resolution = 5;
$default = get_default_profile_photo(80);
$default = z_root() . '/' . get_default_profile_photo(80);
break;
case 's':
$resolution = 6;
$default = get_default_profile_photo(48);
$default = z_root() . '/' . get_default_profile_photo(48);
break;
case 'l':
default:
@@ -83,7 +85,7 @@ class Photo extends \Zotlabs\Web\Controller {
$data = file_get_contents($data);
}
if(! $data) {
$data = file_get_contents($default);
$data = fetch_image_from_url($default,$mimetype);
}
if(! $mimetype) {
$mimetype = 'image/png';
@@ -127,98 +129,81 @@ class Photo extends \Zotlabs\Web\Controller {
}
}
$r = q("SELECT uid FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1",
$r = q("SELECT uid, photo_usage FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1",
dbesc($photo),
intval($resolution)
);
if($r) {
$allowed = (-1);
if(intval($r[0]['photo_usage'])) {
$allowed = 1;
if(intval($r[0]['photo_usage']) === PHOTO_COVER)
if($resolution < PHOTO_RES_COVER_1200)
$allowed = (-1);
if(intval($r[0]['photo_usage']) === PHOTO_PROFILE)
if(! in_array($resolution,[4,5,6]))
$allowed = (-1);
}
if($allowed === (-1)) {
$allowed = attach_can_view($r[0]['uid'],$observer_xchan,$photo);
}
if(intval($r[0]['photo_usage'])) {
$allowed = 1;
if(intval($r[0]['photo_usage']) === PHOTO_COVER)
if($resolution < PHOTO_RES_COVER_1200)
$allowed = (-1);
if(intval($r[0]['photo_usage']) === PHOTO_PROFILE)
if(! in_array($resolution,[4,5,6]))
$allowed = (-1);
}
if($allowed === (-1))
$allowed = attach_can_view($r[0]['uid'],$observer_xchan,$photo);
$allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_storage') : true);
$sql_extra = permissions_sql($r[0]['uid']);
if(! $sql_extra)
$sql_extra = ' and true ';
// Only check permissions on normal photos. Those photos we don't check includes
// profile photos, xchan photos (which are also profile photos), 'thing' photos,
// and cover photos
$sql_extra = " and (( photo_usage = 0 $sql_extra ) or photo_usage != 0 )";
$channel = channelx_by_n($r[0]['uid']);
// Now we'll see if we can access the photo
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d $sql_extra LIMIT 1",
$e = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d $sql_extra LIMIT 1",
dbesc($photo),
intval($resolution)
);
// viewing cover photos is allowed unless a plugin chooses to block it.
$exists = (($e) ? true : false);
if($r && intval($r[0]['photo_usage']) === PHOTO_COVER && $resolution >= PHOTO_RES_COVER_1200)
$allowed = 1;
$d = [ 'imgscale' => $resolution, 'resource_id' => $photo, 'photo' => $r, 'allowed' => $allowed ];
call_hooks('get_photo',$d);
$resolution = $d['imgscale'];
$photo = $d['resource_id'];
$r = $d['photo'];
$allowed = $d['allowed'];
if($r && $allowed) {
$data = dbunescbin($r[0]['content']);
$mimetype = $r[0]['mimetype'];
if(intval($r[0]['os_storage'])) {
if($exists && $allowed) {
$data = dbunescbin($e[0]['content']);
$mimetype = $e[0]['mimetype'];
if(intval($e[0]['os_storage'])) {
$streaming = $data;
}
}
else {
// Does the picture exist? It may be a remote person with no credentials,
// but who should otherwise be able to view it. Show a default image to let
// them know permissions was denied. It may be possible to view the image
// through an authenticated profile visit.
// There won't be many completely unauthorised people seeing this because
// they won't have the photo link, so there's a reasonable chance that the person
// might be able to obtain permission to view it.
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1",
dbesc($photo),
intval($resolution)
);
if($r) {
logger('mod_photo: forbidden. ' . \App::$query_string);
$observer = \App::get_observer();
logger('mod_photo: observer = ' . (($observer) ? $observer['xchan_addr'] : '(not authenticated)'));
$data = file_get_contents('images/nosign.png');
$mimetype = 'image/png';
$prvcachecontrol = true;
if(! $allowed) {
http_status_exit(403,'forbidden');
}
if(! $exists) {
http_status_exit(404,'not found');
}
}
}
}
if(! isset($data)) {
if(isset($resolution)) {
switch($resolution) {
case 4:
$data = file_get_contents(get_default_profile_photo());
$mimetype = 'image/png';
$data = fetch_image_from_url(z_root() . '/' . get_default_profile_photo(),$mimetype);
break;
case 5:
$data = file_get_contents(get_default_profile_photo(80));
$mimetype = 'image/png';
$data = fetch_image_from_url(z_root() . '/' . get_default_profile_photo(80),$mimetype);
break;
case 6:
$data = file_get_contents(get_default_profile_photo(48));
$mimetype = 'image/png';
$data = fetch_image_from_url(z_root() . '/' . get_default_profile_photo(48),$mimetype);
break;
default:
killme();
@@ -295,7 +280,6 @@ class Photo extends \Zotlabs\Web\Controller {
}
killme();
// NOTREACHED
}
}

View File

@@ -102,14 +102,7 @@ class Photos extends \Zotlabs\Web\Controller {
if($_REQUEST['dropalbum'] == t('Delete Album')) {
// This is dangerous because we combined file storage and photos into one interface
// This function will remove all photos from any directory with the same name since
// we have not passed the path value.
// The correct solution would be to use a full pathname from your storage root for 'album'
// We also need to prevent/block removing the storage root folder.
$folder_hash = '';
$r = q("select * from attach where is_dir = 1 and uid = %d and hash = '%s'",
@@ -124,7 +117,8 @@ class Photos extends \Zotlabs\Web\Controller {
$res = array();
$admin_delete = false;
// get the list of photos we are about to delete
if(remote_channel() && (! local_channel())) {
@@ -133,6 +127,10 @@ class Photos extends \Zotlabs\Web\Controller {
elseif(local_channel()) {
$str = photos_album_get_db_idstr(local_channel(),$album);
}
elseif(is_site_admin()) {
$str = photos_album_get_db_idstr_admin($page_owner_uid,$album);
$admin_delete = true;
}
else {
$str = null;
}
@@ -145,7 +143,7 @@ class Photos extends \Zotlabs\Web\Controller {
);
if($r) {
foreach($r as $i) {
attach_delete($page_owner_uid, $i['resource_id'], 1 );
attach_delete($page_owner_uid, $i['resource_id'], true );
}
}
@@ -158,12 +156,14 @@ class Photos extends \Zotlabs\Web\Controller {
// @FIXME do the same for the linked attach
if($folder_hash) {
attach_delete($page_owner_uid,$folder_hash, 1);
attach_delete($page_owner_uid, $folder_hash, true );
if(! $admin_delete) {
$sync = attach_export_data(\App::$data['channel'],$folder_hash, true);
$sync = attach_export_data(\App::$data['channel'],$folder_hash, true);
if($sync)
build_sync_packet($page_owner_uid,array('file' => array($sync)));
if($sync)
build_sync_packet($page_owner_uid,array('file' => array($sync)));
}
}
}
@@ -181,17 +181,22 @@ class Photos extends \Zotlabs\Web\Controller {
$r = q("SELECT id, resource_id FROM photo WHERE ( xchan = '%s' or uid = %d ) AND resource_id = '%s' LIMIT 1",
dbesc($ob_hash),
intval(local_channel()),
dbesc(\App::$argv[2])
dbesc(argv(2))
);
if($r) {
attach_delete($page_owner_uid, $r[0]['resource_id'], 1 );
attach_delete($page_owner_uid, $r[0]['resource_id'], true );
$sync = attach_export_data(\App::$data['channel'],$r[0]['resource_id'], true);
if($sync)
build_sync_packet($page_owner_uid,array('file' => array($sync)));
}
elseif(is_site_admin()) {
// If the admin deletes a photo, don't sync
attach_delete($page_owner_uid, argv(2), true);
}
goaway(z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/album/' . $_SESSION['album_return']);
}
@@ -695,8 +700,8 @@ class Photos extends \Zotlabs\Web\Controller {
'$newalbum_label' => t('Enter an album name'),
'$newalbum_placeholder' => t('or select an existing album (doubleclick)'),
'$visible' => array('visible', t('Create a status post for this upload'), 0,'', array(t('No'), t('Yes')), 'onclick="showHideBodyTextarea();"'),
'$caption' => array('description', t('Caption (optional):')),
'$body' => array('body', t('Description (optional):'),'', 'Description will only appear in the status post'),
'$caption' => array('description', t('Title (optional)')),
'$body' => array('body', t('Description (optional)'),'', 'Description will only appear in the status post'),
'$albums' => $albums['albums'],
'$selname' => $selname,
'$permissions' => t('Permissions'),
@@ -833,7 +838,7 @@ class Photos extends \Zotlabs\Web\Controller {
killme();
}
else {
$o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
$o .= "<script> var page_query = '" . escape_tags($_GET['q']) . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
$tpl = get_markup_template('photo_album.tpl');
$o .= replace_macros($tpl, array(
'$photos' => $photos,
@@ -841,7 +846,7 @@ class Photos extends \Zotlabs\Web\Controller {
'$album_id' => $datum,
'$album_edit' => array(t('Edit Album'), $album_edit),
'$can_post' => $can_post,
'$upload' => array(t('Upload'), z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/upload/' . $datum),
'$upload' => array(t('Add Photos'), z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/upload/' . $datum),
'$order' => $order,
'$upload_form' => $upload_form,
'$usage' => $usage_message
@@ -1065,7 +1070,7 @@ class Photos extends \Zotlabs\Web\Controller {
'newalbum_placeholder' => t('or select an existing one (doubleclick)'),
'nickname' => \App::$data['channel']['channel_address'],
'resource_id' => $ph[0]['resource_id'],
'capt_label' => t('Caption'),
'capt_label' => t('Title (optional)'),
'caption' => $caption_e,
'tag_label' => t('Add a Tag'),
'permissions' => t('Permissions'),
@@ -1148,10 +1153,10 @@ class Photos extends \Zotlabs\Web\Controller {
builtin_activity_puller($item, $conv_responses);
}
$like_count = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid']] : '');
$like_list = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid'] . '-l'] : '');
if (count($like_list) > MAX_LIKERS) {
if(is_array($like_list) && (count($like_list) > MAX_LIKERS)) {
$like_list_part = array_slice($like_list, 0, MAX_LIKERS);
array_push($like_list_part, '<a href="#" data-toggle="modal" data-target="#likeModal-' . $this->get_id() . '"><b>' . t('View all') . '</b></a>');
} else {
@@ -1163,7 +1168,7 @@ class Photos extends \Zotlabs\Web\Controller {
$dislike_count = ((x($dlike,$link_item['mid'])) ? $dlike[$link_item['mid']] : '');
$dislike_list = ((x($dlike,$link_item['mid'])) ? $dlike[$link_item['mid'] . '-l'] : '');
$dislike_button_label = tt('Dislike','Dislikes',$dislike_count,'noun');
if (count($dislike_list) > MAX_LIKERS) {
if (is_array($dislike_list) && (count($dislike_list) > MAX_LIKERS)) {
$dislike_list_part = array_slice($dislike_list, 0, MAX_LIKERS);
array_push($dislike_list_part, '<a href="#" data-toggle="modal" data-target="#dislikeModal-' . $this->get_id() . '"><b>' . t('View all') . '</b></a>');
} else {
@@ -1372,13 +1377,13 @@ class Photos extends \Zotlabs\Web\Controller {
killme();
}
else {
$o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
$o .= "<script> var page_query = '" . escape_tags($_GET['q']) . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
$tpl = get_markup_template('photos_recent.tpl');
$o .= replace_macros($tpl, array(
'$title' => t('Recent Photos'),
'$album_id' => bin2hex(t('Recent Photos')),
'$can_post' => $can_post,
'$upload' => array(t('Upload'), z_root().'/photos/'.\App::$data['channel']['channel_address'].'/upload'),
'$upload' => array(t('Add Photos'), z_root().'/photos/'.\App::$data['channel']['channel_address'].'/upload'),
'$photos' => $photos,
'$upload_form' => $upload_form,
'$usage' => $usage_message

View File

@@ -35,10 +35,12 @@ class Ping extends \Zotlabs\Web\Controller {
$result['birthdays_today'] = 0;
$result['all_events'] = 0;
$result['all_events_today'] = 0;
$result['notice'] = array();
$result['info'] = array();
$result['notice'] = [];
$result['info'] = [];
$result['pubs'] = 0;
$result['files'] = 0;
$result['forums'] = 0;
$result['forums_sub'] = [];
if(! $_SESSION['static_loadtime'])
$_SESSION['static_loadtime'] = datetime_convert();
@@ -140,7 +142,13 @@ class Ping extends \Zotlabs\Web\Controller {
db_utcnow(), db_quoteinterval('3 MINUTE')
);
$discover_tab_on = ((get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false) ? false : true);
$sql_extra = '';
if(! ($vnotify & VNOTIFY_LIKE))
$sql_extra = " AND verb NOT IN ('" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') ";
$discover_tab_on = can_view_public_stream();
$notify_pubs = ((local_channel()) ? ($vnotify & VNOTIFY_PUBS) && $discover_tab_on : $discover_tab_on);
if($notify_pubs) {
@@ -151,7 +159,8 @@ class Ping extends \Zotlabs\Web\Controller {
AND item_unseen = 1
AND author_xchan != '%s'
AND created > '" . datetime_convert('UTC','UTC',$_SESSION['static_loadtime']) . "'
$item_normal",
$item_normal
$sql_extra",
intval($sys['channel_id']),
dbesc(get_observer_hash())
);
@@ -160,6 +169,8 @@ class Ping extends \Zotlabs\Web\Controller {
$result['pubs'] = intval($pubs[0]['total']);
}
if((argc() > 1) && (argv(1) === 'pubs') && ($notify_pubs)) {
$sys = get_sys_channel();
$result = array();
@@ -170,6 +181,7 @@ class Ping extends \Zotlabs\Web\Controller {
AND author_xchan != '%s'
AND created > '" . datetime_convert('UTC','UTC',$_SESSION['static_loadtime']) . "'
$item_normal
$sql_extra
ORDER BY created DESC
LIMIT 300",
intval($sys['channel_id']),
@@ -275,10 +287,10 @@ class Ping extends \Zotlabs\Web\Controller {
intval(local_channel())
);
$b64mid = ((strpos($r[0]['thr_parent'], 'b64.' === 0)) ? $r[0]['thr_parent'] : 'b64.' . base64url_encode($r[0]['thr_parent']));
$b64mid = ((strpos($r[0]['thr_parent'], 'b64.') === 0) ? $r[0]['thr_parent'] : 'b64.' . base64url_encode($r[0]['thr_parent']));
}
else {
$b64mid = ((strpos($mid, 'b64.' === 0)) ? $mid : 'b64.' . base64url_encode($mid));
$b64mid = ((strpos($mid, 'b64.') === 0) ? $mid : 'b64.' . base64url_encode($mid));
}
$notifs[] = array(
@@ -334,6 +346,7 @@ class Ping extends \Zotlabs\Web\Controller {
AND item_unseen = 1
AND author_xchan != '%s'
$item_normal
$sql_extra
ORDER BY created DESC
LIMIT 300",
intval(local_channel()),
@@ -390,7 +403,7 @@ class Ping extends \Zotlabs\Web\Controller {
'notify_link' => z_root() . '/admin/accounts',
'name' => $rr['account_email'],
'url' => '',
'photo' => get_default_profile_photo(48),
'photo' => z_root() . '/' . get_default_profile_photo(48),
'when' => relative_date($rr['account_created']),
'hclass' => ('notify-unseen'),
'message' => t('requires approval')
@@ -508,6 +521,7 @@ class Ping extends \Zotlabs\Web\Controller {
$r = q("SELECT id, item_wall FROM item
WHERE uid = %d and item_unseen = 1
$item_normal
$sql_extra
AND author_xchan != '%s'",
intval(local_channel()),
dbesc($ob_hash)
@@ -610,6 +624,58 @@ class Ping extends \Zotlabs\Web\Controller {
if(! ($vnotify & VNOTIFY_BIRTHDAY))
$result['birthdays'] = 0;
if($vnotify & VNOTIFY_FORUMS) {
$forums = get_forum_channels(local_channel());
if(! $forums) {
$result['forums'] = 0;
}
else {
$perms_sql = item_permissions_sql(local_channel()) . item_normal();
$fcount = count($forums);
$forums['total'] = 0;
for($x = 0; $x < $fcount; $x ++) {
$r = q("select sum(item_unseen) as unseen from item
where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ",
intval(local_channel()),
dbesc($forums[$x]['xchan_hash'])
);
if($r[0]['unseen']) {
$forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] : z_root() . '/network/?f=&pf=1&cid=' . $forums[$x]['abook_id']);
$forums[$x]['name'] = $forums[$x]['xchan_name'];
$forums[$x]['url'] = $forums[$x]['xchan_url'];
$forums[$x]['photo'] = $forums[$x]['xchan_photo_s'];
$forums[$x]['unseen'] = $r[0]['unseen'];
$forums[$x]['private_forum'] = (($forums[$x]['private_forum']) ? 'lock' : '');
$forums[$x]['message'] = (($forums[$x]['private_forum']) ? t('Private forum') : t('Public forum'));
$forums['total'] = $forums['total'] + $r[0]['unseen'];
unset($forums[$x]['abook_id']);
unset($forums[$x]['xchan_hash']);
unset($forums[$x]['xchan_name']);
unset($forums[$x]['xchan_url']);
unset($forums[$x]['xchan_photo_s']);
//if($forums[$x]['private_forum'])
// unset($forums[$x]['private_forum']);
}
else {
unset($forums[$x]);
}
}
$result['forums'] = $forums['total'];
unset($forums['total']);
$result['forums_sub'] = $forums;
}
}
$x = json_encode($result);
$t8 = dba_timer();

View File

@@ -451,6 +451,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
$o .= replace_macros($tpl,array(
'$user' => \App::$channel['channel_address'],
'$info' => ((count($profiles) > 1) ? t('Your default profile photo is visible to anybody on the internet. Profile photos for alternate profiles will inherit the permissions of the profile') : t('Your profile photo is visible to anybody on the internet and may be distributed to other websites.')),
'$importfile' => (($importing) ? \App::$data['importfile'] : ''),
'$lbl_upfile' => t('Upload File:'),
'$lbl_profiles' => t('Select a profile:'),

View File

@@ -655,7 +655,7 @@ class Profiles extends \Zotlabs\Web\Controller {
intval($id),
intval(local_channel())
);
if(! count($r)) {
if(! $r) {
notice( t('Profile not found.') . EOL);
return;
}
@@ -712,13 +712,10 @@ class Profiles extends \Zotlabs\Web\Controller {
$tpl = get_markup_template("profile_edit.tpl");
$o .= replace_macros($tpl,array(
'$multi_profiles' => ((feature_enabled(local_channel(),'multi_profiles')) ? true : false),
'$form_security_token' => get_form_security_token("profile_edit"),
'$profile_clone_link' => ((feature_enabled(local_channel(),'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t='
. get_form_security_token("profile_clone") : ''),
'$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t='
. get_form_security_token("profile_drop"),
'$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone"),
'$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"),
'$fields' => $fields,
'$vcard' => $vcard,
'$guid' => $r[0]['profile_guid'],
@@ -735,7 +732,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$addthing' => t('Add profile things'),
'$personal' => t('Personal'),
'$location' => t('Location'),
'$relation' => t('Relation'),
'$relation' => t('Relationship'),
'$miscellaneous'=> t('Miscellaneous'),
'$exportable' => feature_enabled(local_channel(),'profile_export'),
'$lbl_import' => t('Import profile from file'),
@@ -786,22 +783,22 @@ class Profiles extends \Zotlabs\Web\Controller {
'$channels' => array('channels', t('My other channels'), $r[0]['channels']),
'$extra_fields' => $extra_fields,
'$comms' => t('Communications'),
'$tel_label' => t('Phone'),
'$email_label' => t('Email'),
'$impp_label' => t('Instant messenger'),
'$url_label' => t('Website'),
'$adr_label' => t('Address'),
'$note_label' => t('Note'),
'$mobile' => t('Mobile'),
'$home' => t('Home'),
'$work' => t('Work'),
'$other' => t('Other'),
'$add_card' => t('Add Contact'),
'$add_field' => t('Add Field'),
'$create' => t('Create'),
'$update' => t('Update'),
'$delete' => t('Delete'),
'$cancel' => t('Cancel'),
'$tel_label' => t('Phone'),
'$email_label' => t('Email'),
'$impp_label' => t('Instant messenger'),
'$url_label' => t('Website'),
'$adr_label' => t('Address'),
'$note_label' => t('Note'),
'$mobile' => t('Mobile'),
'$home' => t('Home'),
'$work' => t('Work'),
'$other' => t('Other'),
'$add_card' => t('Add Contact'),
'$add_field' => t('Add Field'),
'$create' => t('Create'),
'$update' => t('Update'),
'$delete' => t('Delete'),
'$cancel' => t('Cancel'),
));
$arr = array('profile' => $r[0], 'entry' => $o);

View File

@@ -34,6 +34,8 @@ class Pubstream extends \Zotlabs\Web\Controller {
}
$mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
if(strpos($mid,'b64.') === 0)
$decoded = @base64url_decode(substr($mid,4));
@@ -64,8 +66,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
'default_location' => $channel['channel_location'],
'nickname' => $channel['channel_address'],
'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'acl' => populate_acl($channel_acl),
'acl' => populate_acl($channel_acl,true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post'),
'permissions' => $channel_acl,
'bang' => '',
'visitor' => true,
@@ -75,7 +76,8 @@ class Pubstream extends \Zotlabs\Web\Controller {
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true,
'jotnets' => true
'jotnets' => true,
'reset' => t('Reset form')
);
$o = '<div id="jot-popup">';
@@ -116,8 +118,8 @@ class Pubstream extends \Zotlabs\Web\Controller {
'$uid' => ((local_channel()) ? local_channel() : '0'),
'$gid' => '0',
'$cid' => '0',
'$cmin' => '0',
'$cmax' => '99',
'$cmin' => '(-1)',
'$cmax' => '(-1)',
'$star' => '0',
'$liked' => '0',
'$conv' => '0',
@@ -133,7 +135,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
'$order' => 'comment',
'$file' => '',
'$cats' => '',
'$tags' => '',
'$tags' => $hashtags,
'$dend' => '',
'$mid' => $mid,
'$verb' => '',
@@ -170,6 +172,10 @@ class Pubstream extends \Zotlabs\Web\Controller {
$page_mode = 'client';
if(x($hashtags)) {
$sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG, TERM_COMMUNITYTAG));
}
$net_query = (($net) ? " left join xchan on xchan_hash = author_xchan " : '');
$net_query2 = (($net) ? " and xchan_network = '" . protect_sprintf(dbesc($net)) . "' " : '');
@@ -224,7 +230,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
);
}
else {
$r = q("SELECT distinct parent AS item_id, $ordering FROM item
$r = q("SELECT parent AS item_id FROM item
left join abook on item.author_xchan = abook.abook_xchan
$net_query
WHERE true $uids $item_normal_update
@@ -273,7 +279,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
$o .= '<div id="content-complete"></div>';
if(($items) && (! $update))
$o .= alt_pager($a,count($items));
$o .= alt_pager(count($items));
return $o;

View File

@@ -49,6 +49,7 @@ class React extends \Zotlabs\Web\Controller {
$n['aid'] = $channel['channel_account_id'];
$n['uid'] = $channel['channel_id'];
$n['item_origin'] = true;
$n['item_type'] = $i[0]['item_type'];
$n['parent'] = $postid;
$n['parent_mid'] = $i[0]['mid'];
$n['mid'] = item_message_id();

View File

@@ -187,8 +187,8 @@ class Register extends \Zotlabs\Web\Controller {
$registration_is = '';
$other_sites = '';
if(get_config('system','register_policy') == REGISTER_CLOSED) {
if(get_config('system','directory_mode') == DIRECTORY_MODE_STANDALONE) {
if(intval(get_config('system','register_policy')) === REGISTER_CLOSED) {
if(intval(get_config('system','directory_mode')) === DIRECTORY_MODE_STANDALONE) {
notice( t('Registration on this hub is disabled.') . EOL);
return;
}
@@ -197,10 +197,19 @@ class Register extends \Zotlabs\Web\Controller {
return $mod->get();
}
if(get_config('system','register_policy') == REGISTER_APPROVE) {
if(intval(get_config('system','register_policy')) == REGISTER_APPROVE) {
$registration_is = t('Registration on this hub is by approval only.');
$other_sites = t('<a href="pubsites">Register at another affiliated hub.</a>');
}
$invitations = false;
if(intval(get_config('system','invitation_only'))) {
$invitations = true;
$registration_is = t('Registration on this hub is by invitation only.');
$other_sites = t('<a href="pubsites">Register at another affiliated hub.</a>');
}
$max_dailies = intval(get_config('system','max_daily_registrations'));
if($max_dailies) {
@@ -251,10 +260,10 @@ class Register extends \Zotlabs\Web\Controller {
$password = array('password', t('Choose a password'), '');
$password2 = array('password2', t('Please re-enter your password'), '');
$invite_code = array('invite_code', t('Please enter your invitation code'), ((x($_REQUEST,'invite_code')) ? strip_tags(trim($_REQUEST['invite_code'])) : ""));
$name = array('name', t('Name or caption'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"'));
$name = array('name', t('Your Name'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Real names are preferred.'));
$nickhub = '@' . str_replace(array('http://','https://','/'), '', get_config('system','baseurl'));
$nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), sprintf( t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'), $nickhub));
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/member/member_guide#Account_Permission_Roles" target="_blank">' . t('Read more about roles') . '</a>',$perm_roles);
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel permission role for your usage needs and privacy requirements.') . ' <a href="help/member/member_guide#Channel_Permission_Roles" target="_blank">' . t('Read more about channel permission roles') . '</a>',$perm_roles);
$tos = array('tos', $label_tos, '', '', array(t('no'),t('yes')));
@@ -270,8 +279,7 @@ class Register extends \Zotlabs\Web\Controller {
'$reg_is' => $registration_is,
'$registertext' => bbcode(get_config('system','register_text')),
'$other_sites' => $other_sites,
'$invitations' => get_config('system','invitation_only'),
'$invite_desc' => t('Membership on this site is by invitation only.'),
'$invitations' => $invitations,
'$invite_code' => $invite_code,
'$auto_create' => $auto_create,
'$name' => $name,

View File

@@ -13,8 +13,7 @@ class Regmod extends \Zotlabs\Web\Controller {
if(! local_channel()) {
info( t('Please login.') . EOL);
$o .= '<br /><br />' . login((\App::$config['system']['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
return $o;
return login();
}
if(! is_site_admin()) {
@@ -35,6 +34,8 @@ class Regmod extends \Zotlabs\Web\Controller {
if($cmd === 'allow') {
if (! account_allow($hash)) killme();
}
goaway('/admin/accounts');
}
}

View File

@@ -38,7 +38,7 @@ class Removeme extends \Zotlabs\Web\Controller {
}
$global_remove = intval($_POST['global']);
channel_remove(local_channel(),1 - $global_remove,true);
}
@@ -56,12 +56,12 @@ class Removeme extends \Zotlabs\Web\Controller {
$tpl = get_markup_template('removeme.tpl');
$o .= replace_macros($tpl, array(
'$basedir' => z_root(),
'$hash' => $hash,
'$title' => t('Remove This Channel'),
'$desc' => array(t('WARNING: '), t('This channel will be completely removed from the network. '), t('This action is permanent and can not be undone!')),
'$passwd' => t('Please enter your password for verification:'),
'$global' => array('global', t('Remove this channel and all its clones from the network'), false, t('By default only the instance of the channel located on this hub will be removed from the network'), array(t('No'),t('Yes'))),
'$submit' => t('Remove Channel')
'$hash' => $hash,
'$title' => t('Remove This Channel'),
'$desc' => [ t('WARNING: '), t('This channel will be completely removed from the network. '), t('This action is permanent and can not be undone!') ],
'$passwd' => t('Please enter your password for verification:'),
'$global' => [ 'global', t('Remove this channel and all its clones from the network'), false, t('By default only the instance of the channel located on this hub will be removed from the network'), [ t('No'),t('Yes') ] ],
'$submit' => t('Remove Channel')
));
return $o;

View File

@@ -17,8 +17,8 @@ class Rmagic extends \Zotlabs\Web\Controller {
if($r) {
if($r[0]['hubloc_url'] === z_root())
goaway(z_root() . '/login');
$dest = z_root() . '/' . str_replace(['rmagic','zid='],['','zid_='],\App::$query_string);
goaway($r[0]['hubloc_url'] . '/magic' . '?f=&owa=1&dest=' . $dest);
$dest = bin2hex(z_root() . '/' . str_replace(['rmagic','zid='],['','zid_='],\App::$query_string));
goaway($r[0]['hubloc_url'] . '/magic' . '?f=&owa=1&bdest=' . $dest);
}
}
}
@@ -59,11 +59,11 @@ class Rmagic extends \Zotlabs\Web\Controller {
if($url) {
if($_SESSION['return_url'])
$dest = urlencode(z_root() . '/' . str_replace('zid=','zid_=',$_SESSION['return_url']));
$dest = bin2hex(z_root() . '/' . str_replace('zid=','zid_=',$_SESSION['return_url']));
else
$dest = urlencode(z_root() . '/' . str_replace([ 'rmagic', 'zid=' ] ,[ '', 'zid_='],\App::$query_string));
$dest = bin2hex(z_root() . '/' . str_replace([ 'rmagic', 'zid=' ] ,[ '', 'zid_='],\App::$query_string));
goaway($url . '/magic' . '?f=&owa=1&dest=' . $dest);
goaway($url . '/magic' . '?f=&owa=1&bdest=' . $dest);
}
}
}

View File

@@ -45,7 +45,9 @@ class Rpost extends \Zotlabs\Web\Controller {
$url = get_rpost_path(\App::get_observer());
// make sure we're not looping to our own hub
if(($url) && (! stristr($url, \App::get_hostname()))) {
foreach($_REQUEST as $key => $arg) {
foreach($_GET as $key => $arg) {
if($key === 'q')
continue;
$url .= '&' . $key . '=' . $arg;
}
goaway($url);
@@ -111,43 +113,7 @@ class Rpost extends \Zotlabs\Web\Controller {
}
if($_REQUEST['post_id']) {
$r = q("SELECT * from item WHERE id = %d LIMIT 1",
intval($_REQUEST['post_id'])
);
if(($r) && (! intval($r[0]['item_private']))) {
$sql_extra = item_permissions_sql($r[0]['uid']);
$r = q("select * from item where id = %d $sql_extra",
intval($_REQUEST['post_id'])
);
if($r && $r[0]['mimetype'] === 'text/bbcode') {
xchan_query($r);
$is_photo = (($r[0]['obj_type'] === ACTIVITY_OBJ_PHOTO) ? true : false);
if($is_photo) {
$object = json_decode($r[0]['obj'],true);
$photo_bb = $object['body'];
}
if (strpos($r[0]['body'], "[/share]") !== false) {
$pos = strpos($r[0]['body'], "[share");
$i = substr($r[0]['body'], $pos);
} else {
$i = "[share author='".urlencode($r[0]['author']['xchan_name']).
"' profile='".$r[0]['author']['xchan_url'] .
"' avatar='".$r[0]['author']['xchan_photo_s'].
"' link='".$r[0]['plink'].
"' posted='".$r[0]['created'].
"' message_id='".$r[0]['mid']."']";
if($r[0]['title'])
$i .= '[b]'.$r[0]['title'].'[/b]'."\r\n";
$i .= (($is_photo) ? $photo_bb . "\r\n" . $r[0]['body'] : $r[0]['body']);
$i .= "[/share]";
}
}
}
$_REQUEST['body'] = $_REQUEST['body'] . $i;
$_REQUEST['body'] .= '[share=' . intval($_REQUEST['post_id']) . '][/share]';
}
$x = array(
@@ -176,6 +142,7 @@ class Rpost extends \Zotlabs\Web\Controller {
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
'$title' => t('Edit post'),
'$cancel' => '',
'$editor' => $editor
));

View File

@@ -66,6 +66,10 @@ class Search extends \Zotlabs\Web\Controller {
$search = substr($search,1);
goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
if(strpos($search,'!') === 0) {
$search = substr($search,1);
goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
if(strpos($search,'?') === 0) {
$search = substr($search,1);
goaway(z_root() . '/help' . '?f=1&navsearch=1&search=' . $search);
@@ -117,8 +121,8 @@ class Search extends \Zotlabs\Web\Controller {
'$uid' => ((\App::$profile['profile_uid']) ? \App::$profile['profile_uid'] : '0'),
'$gid' => '0',
'$cid' => '0',
'$cmin' => '0',
'$cmax' => '0',
'$cmin' => '(-1)',
'$cmax' => '(-1)',
'$star' => '0',
'$liked' => '0',
'$conv' => '0',
@@ -171,7 +175,7 @@ class Search extends \Zotlabs\Web\Controller {
OR ( item.uid = %d )) OR item.owner_xchan = '%s' )
$item_normal
$sql_extra
group by mid order by created desc $pager_sql ",
group by mid, created order by created desc $pager_sql ",
intval(local_channel()),
dbesc($sys['xchan_hash'])
);
@@ -184,7 +188,7 @@ class Search extends \Zotlabs\Web\Controller {
$pub_sql ) OR owner_xchan = '%s')
$item_normal
$sql_extra
group by mid order by created desc $pager_sql",
group by mid, created order by created desc $pager_sql",
dbesc($sys['xchan_hash'])
);
}

View File

@@ -21,6 +21,10 @@ class Channel {
$role = ((x($_POST,'permissions_role')) ? notags(trim($_POST['permissions_role'])) : '');
$oldrole = get_pconfig(local_channel(),'system','permissions_role');
// This mapping can be removed after 3.4 release
if($oldrole === 'social_party') {
$oldrole = 'social_federation';
}
if(($role != $oldrole) || ($role === 'custom')) {
@@ -142,6 +146,7 @@ class Channel {
$unkmail = (((x($_POST,'unkmail')) && (intval($_POST['unkmail']) == 1)) ? 1: 0);
$cntunkmail = ((x($_POST,'cntunkmail')) ? intval($_POST['cntunkmail']) : 0);
$suggestme = ((x($_POST,'suggestme')) ? intval($_POST['suggestme']) : 0);
$autoperms = ((x($_POST,'autoperms')) ? intval($_POST['autoperms']) : 0);
$post_newfriend = (($_POST['post_newfriend'] == 1) ? 1: 0);
$post_joingroup = (($_POST['post_joingroup'] == 1) ? 1: 0);
@@ -202,12 +207,16 @@ class Channel {
$vnotify += intval($_POST['vnotify9']);
if(x($_POST,'vnotify10'))
$vnotify += intval($_POST['vnotify10']);
if(x($_POST,'vnotify11'))
if(x($_POST,'vnotify11') && is_site_admin())
$vnotify += intval($_POST['vnotify11']);
if(x($_POST,'vnotify12'))
$vnotify += intval($_POST['vnotify12']);
if(x($_POST,'vnotify13'))
$vnotify += intval($_POST['vnotify13']);
if(x($_POST,'vnotify14'))
$vnotify += intval($_POST['vnotify14']);
if(x($_POST,'vnotify15'))
$vnotify += intval($_POST['vnotify15']);
$always_show_in_notices = x($_POST,'always_show_in_notices') ? 1 : 0;
@@ -246,6 +255,7 @@ class Channel {
set_pconfig(local_channel(),'system','default_permcat',$defpermcat);
set_pconfig(local_channel(),'system','email_notify_host',$mailhost);
set_pconfig(local_channel(),'system','profile_assign',$profile_assign);
set_pconfig(local_channel(),'system','autoperms',$autoperms);
$r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d",
dbesc($username),
@@ -412,12 +422,16 @@ class Channel {
));
$subdir = ((strlen(\App::get_path())) ? '<br />' . t('or') . ' ' . z_root() . '/channel/' . $nickname : '');
$webbie = $nickname . '@' . \App::get_hostname();
$intl_nickname = unpunify($nickname) . '@' . unpunify(\App::get_hostname());
$tpl_addr = get_markup_template("settings_nick_set.tpl");
$prof_addr = replace_macros($tpl_addr,array(
'$desc' => t('Your channel address is'),
'$nickname' => $nickname,
'$nickname' => (($intl_nickname === $webbie) ? $webbie : $intl_nickname . '&nbsp;(' . $webbie . ')'),
'$subdir' => $subdir,
'$davdesc' => t('Your files/photos are accessible via WebDAV at'),
'$davpath' => ((get_account_techlevel() > 3) ? z_root() . '/dav/' . $nickname : ''),
@@ -465,13 +479,25 @@ class Channel {
$permissions_role = get_pconfig(local_channel(),'system','permissions_role');
if(! $permissions_role)
$permissions_role = 'custom';
// compatibility mapping - can be removed after 3.4 release
if($permissions_role === 'social_party')
$permissions_role = 'social_federation';
if(in_array($permissions_role,['forum','repository']))
$autoperms = replace_macros(get_markup_template('field_checkbox.tpl'), [
'$field' => [ 'autoperms',t('Automatic membership approval'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), t('If enabled, connection requests will be approved without your interaction'), $yes_no ]]);
else
$autoperms = '<input type="hidden" name="autoperms" value="' . intval(get_pconfig(local_channel(),'system','autoperms')) . '" />';
$permissions_set = (($permissions_role != 'custom') ? true : false);
$perm_roles = \Zotlabs\Access\PermissionRoles::roles();
if((get_account_techlevel() < 4) && $permissions_role !== 'custom')
unset($perm_roles[t('Other')]);
$vnotify = get_pconfig(local_channel(),'system','vnotify');
$always_show_in_notices = get_pconfig(local_channel(),'system','always_show_in_notices');
if($vnotify === false)
@@ -480,7 +506,9 @@ class Channel {
$plugin = [ 'basic' => '', 'security' => '', 'notify' => '', 'misc' => '' ];
call_hooks('channel_settings',$plugin);
$disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false;
$disable_discover_tab = intval(get_config('system','disable_discover_tab',1)) == 1;
$site_firehose = intval(get_config('system','site_firehose',0)) == 1;
$o .= replace_macros($stpl,array(
'$ptitle' => t('Channel Settings'),
@@ -529,7 +557,7 @@ class Channel {
'$deny_gid' => acl2json($perm_defaults['deny_gid']),
'$suggestme' => $suggestme,
'$group_select' => $group_select,
'$role' => array('permissions_role' , t('Channel permissions category:'), $permissions_role, '', $perm_roles),
'$role' => array('permissions_role' , t('Channel role and privacy'), $permissions_role, '', $perm_roles),
'$defpermcat' => [ 'defpermcat', t('Default Permissions Group'), $default_permcat, '', $permcats ],
'$permcat_enable' => feature_enabled(local_channel(),'permcats'),
'$profile_in_dir' => $profile_in_dir,
@@ -538,7 +566,7 @@ class Channel {
'$unkmail' => $unkmail,
'$cntunkmail' => array('cntunkmail', t('Maximum private messages per day from unknown people:'), intval($channel['channel_max_anon_mail']) ,t("Useful to reduce spamming")),
'$autoperms' => $autoperms,
'$h_not' => t('Notification Settings'),
'$activity_options' => t('By default post a status message when:'),
'$post_newfriend' => array('post_newfriend', t('accepting a friend request'), $post_newfriend, '', $yes_no),
@@ -569,11 +597,13 @@ class Channel {
'$vnotify8' => array('vnotify8', t('System info messages'), ($vnotify & VNOTIFY_INFO), VNOTIFY_INFO, t('Recommended'), $yes_no),
'$vnotify9' => array('vnotify9', t('System critical alerts'), ($vnotify & VNOTIFY_ALERT), VNOTIFY_ALERT, t('Recommended'), $yes_no),
'$vnotify10' => array('vnotify10', t('New connections'), ($vnotify & VNOTIFY_INTRO), VNOTIFY_INTRO, t('Recommended'), $yes_no),
'$vnotify11' => array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no),
'$vnotify11' => ((is_site_admin()) ? array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no) : array()),
'$vnotify12' => array('vnotify12', t('Unseen shared files'), ($vnotify & VNOTIFY_FILES), VNOTIFY_FILES, '', $yes_no),
'$vnotify13' => (($disable_discover_tab) ? array() : array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no)),
'$vnotify13' => (($disable_discover_tab && !$site_firehose) ? array() : array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no)),
'$vnotify14' => array('vnotify14', t('Unseen likes and dislikes'), ($vnotify & VNOTIFY_LIKE), VNOTIFY_LIKE, '', $yes_no),
'$vnotify15' => array('vnotify15', t('Unseen forum posts'), ($vnotify & VNOTIFY_FORUMS), VNOTIFY_FORUMS, '', $yes_no),
'$mailhost' => [ 'mailhost', t('Email notification hub (hostname)'), get_pconfig(local_channel(),'system','email_notify_host',\App::get_hostname()), sprintf( t('If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s'),\App::get_hostname()) ],
'$always_show_in_notices' => array('always_show_in_notices', t('Also show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, '', $yes_no),
'$always_show_in_notices' => array('always_show_in_notices', t('Show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, '', $yes_no),
'$evdays' => array('evdays', t('Notify me of events this many days in advance'), $evdays, t('Must be greater than 0')),
'$basic_addon' => $plugin['basic'],

View File

@@ -57,7 +57,10 @@ class Featured {
}
call_hooks('feature_settings', $settings_addons);
$this->sortpanels($settings_addons);
$tpl = get_markup_template("settings_addons.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_featured"),
@@ -67,5 +70,15 @@ class Featured {
));
return $o;
}
}
function sortpanels(&$s) {
$a = explode('<div class="panel">',$s);
if($a) {
usort($a,'featured_sort');
$s = implode('<div class="panel">',$a);
}
}
}

View File

@@ -8,43 +8,75 @@ class Features {
function post() {
check_form_security_token_redirectOnErr('/settings/features', 'settings_features');
// Build list of features and check which are set
// We will not create any settings for features that are above our techlevel
$features = get_features(false);
$features = get_features();
$all_features = array();
foreach($features as $k => $v) {
foreach($v as $f)
$all_features[] = $f[0];
}
foreach($all_features as $k) {
if(x($_POST,"feature_$k"))
set_pconfig(local_channel(),'feature',$k, 1);
else
set_pconfig(local_channel(),'feature',$k, 0);
foreach($features as $fname => $fdata) {
foreach(array_slice($fdata,1) as $f) {
$k = $f[0];
if(array_key_exists("feature_$k",$_POST))
set_pconfig(local_channel(),'feature',$k, (string) $_POST["feature_$k"]);
else
set_pconfig(local_channel(),'feature', $k, '');
}
}
build_sync_packet();
return;
}
function get() {
$arr = array();
$features = get_features();
$arr = [];
$harr = [];
if(intval($_REQUEST['techlevel']))
$level = intval($_REQUEST['techlevel']);
else {
$level = get_account_techlevel();
}
if(! intval($level)) {
notice( t('Permission denied.') . EOL);
return;
}
$techlevels = \Zotlabs\Lib\Techlevels::levels();
// This page isn't accessible at techlevel 0
unset($techlevels[0]);
$def_techlevel = (($level > 0) ? $level : 1);
$techlock = get_config('system','techlevel_lock');
$all_features_raw = get_features(false);
foreach($all_features_raw as $fname => $fdata) {
foreach(array_slice($fdata,1) as $f) {
$harr[$f[0]] = ((intval(feature_enabled(local_channel(),$f[0]))) ? "1" : '');
}
}
$features = get_features(true,$level);
foreach($features as $fname => $fdata) {
$arr[$fname] = array();
$arr[$fname][0] = $fdata[0];
foreach(array_slice($fdata,1) as $f) {
$arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(feature_enabled(local_channel(),$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On')));
$arr[$fname][1][] = array('feature_' . $f[0],$f[1],((intval(feature_enabled(local_channel(),$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On')));
unset($harr[$f[0]]);
}
}
$tpl = get_markup_template("settings_features.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_features"),
'$title' => t('Additional Features'),
'$features' => $arr,
'$submit' => t('Submit'),
'$title' => t('Additional Features'),
'$techlevel' => [ 'techlevel', t('Your technical skill level'), $def_techlevel, t('Used to provide a member experience and additional features consistent with your comfort level'), $techlevels ],
'$techlock' => $techlock,
'$features' => $arr,
'$hiddens' => $harr,
'$baseurl' => z_root(),
'$submit' => t('Submit'),
));
return $o;

View File

@@ -23,11 +23,12 @@ class Oauth {
check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth');
$name = ((x($_POST,'name')) ? $_POST['name'] : '');
$key = ((x($_POST,'key')) ? $_POST['key'] : '');
$secret = ((x($_POST,'secret')) ? $_POST['secret'] : '');
$redirect = ((x($_POST,'redirect')) ? $_POST['redirect'] : '');
$icon = ((x($_POST,'icon')) ? $_POST['icon'] : '');
$name = ((x($_POST,'name')) ? escape_tags($_POST['name']) : '');
$key = ((x($_POST,'key')) ? escape_tags($_POST['key']) : '');
$secret = ((x($_POST,'secret')) ? escape_tags($_POST['secret']) : '');
$redirect = ((x($_POST,'redirect')) ? escape_tags($_POST['redirect']) : '');
$icon = ((x($_POST,'icon')) ? escape_tags($_POST['icon']) : '');
$oauth2 = ((x($_POST,'oauth2')) ? intval($_POST['oauth2']) : 0);
$ok = true;
if($name == '') {
$ok = false;

View File

@@ -0,0 +1,161 @@
<?php
namespace Zotlabs\Module\Settings;
class Oauth2 {
function post() {
if(x($_POST,'remove')){
check_form_security_token_redirectOnErr('/settings/oauth2', 'settings_oauth2');
$key = $_POST['remove'];
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
dbesc($key),
intval(local_channel())
);
goaway(z_root()."/settings/oauth2/");
return;
}
if((argc() > 2) && (argv(2) === 'edit' || argv(2) === 'add') && x($_POST,'submit')) {
check_form_security_token_redirectOnErr('/settings/oauth2', 'settings_oauth2');
$name = ((x($_POST,'name')) ? escape_tags(trim($_POST['name'])) : '');
$secret = ((x($_POST,'secret')) ? escape_tags(trim($_POST['secret'])) : '');
$redirect = ((x($_POST,'redirect')) ? escape_tags(trim($_POST['redirect'])) : '');
$grant = ((x($_POST,'grant')) ? escape_tags(trim($_POST['grant'])) : '');
$scope = ((x($_POST,'scope')) ? escape_tags(trim($_POST['scope'])) : '');
$ok = true;
if($name == '' || $secret == '') {
$ok = false;
notice( t('Name and Secret are required') . EOL);
}
if($ok) {
if ($_POST['submit']==t("Update")){
$r = q("UPDATE oauth_clients SET
client_id = '%s',
client_secret = '%s',
redirect_uri = '%s',
grant_types = '%s',
scope = '%s',
user_id = %d
WHERE client_id='%s'",
dbesc($name),
dbesc($secret),
dbesc($redirect),
dbesc($grant),
dbesc($scope),
intval(local_channel()),
dbesc($name));
} else {
$r = q("INSERT INTO oauth_clients (client_id, client_secret, redirect_uri, grant_types, scope, user_id)
VALUES ('%s','%s','%s','%s','%s',%d)",
dbesc($name),
dbesc($secret),
dbesc($redirect),
dbesc($grant),
dbesc($scope),
intval(local_channel())
);
$r = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ",
dbesc($name),
intval(local_channel()),
dbesc('all')
);
}
}
goaway(z_root()."/settings/oauth2/");
return;
}
}
function get() {
if((argc() > 2) && (argv(2) === 'add')) {
$tpl = get_markup_template("settings_oauth2_edit.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_oauth2"),
'$title' => t('Add OAuth2 application'),
'$submit' => t('Submit'),
'$cancel' => t('Cancel'),
'$name' => array('name', t('Name'), '', t('Name of application')),
'$secret' => array('secret', t('Consumer Secret'), random_string(16), t('Automatically generated - change if desired. Max length 20')),
'$redirect' => array('redirect', t('Redirect'), '', t('Redirect URI - leave blank unless your application specifically requires this')),
'$grant' => array('grant', t('Grant Types'), '', t('leave blank unless your application sepcifically requires this')),
'$scope' => array('scope', t('Authorization scope'), '', t('leave blank unless your application sepcifically requires this')),
));
return $o;
}
if((argc() > 3) && (argv(2) === 'edit')) {
$r = q("SELECT * FROM oauth_clients WHERE client_id='%s' AND user_id= %d",
dbesc(argv(3)),
intval(local_channel())
);
if (! $r){
notice(t('OAuth2 Application not found.'));
return;
}
$app = $r[0];
$tpl = get_markup_template("settings_oauth2_edit.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_oauth2"),
'$title' => t('Add application'),
'$submit' => t('Update'),
'$cancel' => t('Cancel'),
'$name' => array('name', t('Name'), $app['client_id'], t('Name of application')),
'$secret' => array('secret', t('Consumer Secret'), $app['client_secret'], t('Automatically generated - change if desired. Max length 20')),
'$redirect' => array('redirect', t('Redirect'), $app['redirect_uri'], t('Redirect URI - leave blank unless your application specifically requires this')),
'$grant' => array('grant', t('Grant Types'), $app['grant_types'], t('leave blank unless your application sepcifically requires this')),
'$scope' => array('scope', t('Authorization scope'), $app['scope'], t('leave blank unless your application sepcifically requires this')),
));
return $o;
}
if((argc() > 3) && (argv(2) === 'delete')) {
check_form_security_token_redirectOnErr('/settings/oauth2', 'settings_oauth2', 't');
$r = q("DELETE FROM oauth_clients WHERE client_id = '%s' AND user_id = %d",
dbesc(argv(3)),
intval(local_channel())
);
goaway(z_root()."/settings/oauth2/");
return;
}
$r = q("SELECT oauth_clients.*, oauth_access_tokens.access_token as oauth_token, (oauth_clients.user_id = %d) AS my
FROM oauth_clients
LEFT JOIN oauth_access_tokens ON oauth_clients.client_id=oauth_access_tokens.client_id
WHERE oauth_clients.user_id IN (%d,0)",
intval(local_channel()),
intval(local_channel())
);
$tpl = get_markup_template("settings_oauth2.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_oauth2"),
'$baseurl' => z_root(),
'$title' => t('Connected OAuth2 Apps'),
'$add' => t('Add application'),
'$edit' => t('Edit'),
'$delete' => t('Delete'),
'$consumerkey' => t('Client key starts with'),
'$noname' => t('No name'),
'$remove' => t('Remove authorization'),
'$apps' => $r,
));
return $o;
}
}

View File

@@ -19,6 +19,11 @@ class Permcats {
$all_perms = \Zotlabs\Access\Permissions::Perms();
$name = escape_tags(trim($_POST['name']));
if(! $name) {
notice( t('Permission Name is required.') . EOL);
return;
}
$pcarr = [];

View File

@@ -161,8 +161,8 @@ class Tokens {
'$me' => t('My Settings'),
'$perms' => $perms,
'$inherited' => t('inherited'),
'$notself' => 0,
'$self' => 1,
'$notself' => 1,
'$self' => 0,
'$permlbl' => t('Individual Permissions'),
'$permnote' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can <strong>not</strong> change those settings here.'),
'$submit' => t('Submit')
@@ -170,4 +170,4 @@ class Tokens {
return $o;
}
}
}

View File

@@ -563,16 +563,20 @@ class Setup extends \Zotlabs\Web\Controller {
$status = true;
$help = '';
if( (file_exists('.htconfig.php') && !is_writable('.htconfig.php')) ||
(!file_exists('.htconfig.php') && !is_writable('.')) ) {
$status = false;
$help = t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL;
$help .= t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
$help .= t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Red top folder.').EOL;
$help .= t('You can alternatively skip this procedure and perform a manual installation. Please see the file "install/INSTALL.txt" for instructions.').EOL;
$fname = '.htconfig.php';
if((file_exists($fname) && is_writable($fname)) ||
(! (file_exists($fname) && is_writable('.')))) {
$this->check_add($checks, t('.htconfig.php is writable'), $status, true, $help);
return;
}
$this->check_add($checks, t('.htconfig.php is writable'), $status, false, $help);
$status = false;
$help = t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL;
$help .= t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
$help .= t('Please see install/INSTALL.txt for additional information.');
$this->check_add($checks, t('.htconfig.php is writable'), $status, true, $help);
}
/**

View File

@@ -14,10 +14,15 @@ class Share extends \Zotlabs\Web\Controller {
if(! $post_id)
killme();
echo '[share=' . $post_id . '][/share]';
killme();
/**
* The remaining code is deprecated and handled in Zotlabs/Lib/Share.php at post
* submission time.
*/
if(! (local_channel() || remote_channel()))
killme();
@@ -60,12 +65,14 @@ class Share extends \Zotlabs\Web\Controller {
$pos = strpos($r[0]['body'], "[share");
$o = substr($r[0]['body'], $pos);
} else {
$o = "[share author='".urlencode($r[0]['author']['xchan_name']).
"' profile='".$r[0]['author']['xchan_url'] .
"' avatar='".$r[0]['author']['xchan_photo_s'].
"' link='".$r[0]['plink'].
"' posted='".$r[0]['created'].
"' message_id='".$r[0]['mid']."']";
$o = "[share author='" . urlencode($r[0]['author']['xchan_name']) .
"' profile='" . $r[0]['author']['xchan_url'] .
"' avatar='" . $r[0]['author']['xchan_photo_s'] .
"' link='" . $r[0]['plink'] .
"' auth='" . (($r[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' posted='" . $r[0]['created'] .
"' message_id='" . $r[0]['mid'] .
"']";
if($r[0]['title'])
$o .= '[b]'.$r[0]['title'].'[/b]'."\r\n";
$o .= (($is_photo) ? $photo_bb . "\r\n" . $r[0]['body'] : $r[0]['body']);

View File

@@ -12,6 +12,9 @@ class Siteinfo extends \Zotlabs\Web\Controller {
}
function get() {
$federated = [];
call_hooks('federated_transports',$federated);
$siteinfo = replace_macros(get_markup_template('siteinfo.tpl'),
[
@@ -27,6 +30,9 @@ class Siteinfo extends \Zotlabs\Web\Controller {
'$prj_name' => t('This site is powered by $Projectname'),
'$prj_transport' => t('Federated and decentralised networking and identity services provided by Zot'),
'$transport_link' => '<a href="https://zotlabs.com">https://zotlabs.com</a>',
'$additional_text' => t('Additional federated transport protocols:'),
'$additional_fed' => implode(',',$federated),
'$prj_version' => ((get_config('system','hidden_version_siteinfo')) ? '' : sprintf( t('Version %s'), \Zotlabs\Lib\System::get_project_version())),
'$prj_linktxt' => t('Project homepage'),
'$prj_srctxt' => t('Developer homepage'),

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