From faff105f861f7decc7cd7bfc44db558dc50f29af Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 16 Dec 2018 22:58:43 -0500 Subject: [PATCH 1/7] Fix feed display in browser when using emojis --- src/Module/Feed.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Module/Feed.php b/src/Module/Feed.php index 4c7059c03..e5ebe2a4d 100644 --- a/src/Module/Feed.php +++ b/src/Module/Feed.php @@ -44,6 +44,7 @@ class Feed extends BaseModule case 'posts': case 'comments': case 'activity': + // Correct type names, no change needed break; case 'replies': $type = 'comments'; @@ -53,8 +54,8 @@ class Feed extends BaseModule } $nickname = $a->argv[1]; - header("Content-type: application/atom+xml"); + header("Content-type: application/atom+xml; charset=utf-8"); echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true); - killme(); + exit(); } } From c485ca6f06363192ff4d9302d82f9813e355b55a Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Dec 2018 20:13:56 +0000 Subject: [PATCH 2/7] Fix ActivityPub with Nextcloud --- src/Module/Inbox.php | 1 + src/Util/HTTPSignature.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/Module/Inbox.php b/src/Module/Inbox.php index 25312bdf3..692e4043a 100644 --- a/src/Module/Inbox.php +++ b/src/Module/Inbox.php @@ -9,6 +9,7 @@ use Friendica\Protocol\ActivityPub; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Util\HTTPSignature; +use Friendica\Core\Logger; /** * ActivityPub Inbox diff --git a/src/Util/HTTPSignature.php b/src/Util/HTTPSignature.php index 956d6ff37..07ff5e805 100644 --- a/src/Util/HTTPSignature.php +++ b/src/Util/HTTPSignature.php @@ -204,6 +204,8 @@ class HTTPSignature if (preg_match('/algorithm="(.*?)"/ism', $header, $matches)) { $ret['algorithm'] = $matches[1]; + } else { + $ret['algorithm'] = 'rsa-sha256'; } if (preg_match('/headers="(.*?)"/ism', $header, $matches)) { From 58067cdfbf72c137e072afd52aaa94d9ee306d05 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Tue, 11 Dec 2018 19:07:20 +0100 Subject: [PATCH 3/7] Add generic content wrapper + frio btn primary buttons class to newmemeber, unfollow, follow (auto + dfrn) --- mod/newmember.php | 4 +++- view/templates/auto_request.tpl | 6 ++++-- view/templates/dfrn_request.tpl | 8 +++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/mod/newmember.php b/mod/newmember.php index cd59cc780..c2ffe6464 100644 --- a/mod/newmember.php +++ b/mod/newmember.php @@ -8,7 +8,8 @@ use Friendica\Core\L10n; function newmember_content(App $a) { - $o = '

' . L10n::t('Welcome to Friendica') . '

'; + $o = '
'; + $o .= '

' . L10n::t('Welcome to Friendica') . '

'; $o .= '

' . L10n::t('New Member Checklist') . '

'; $o .= '
'; $o .= L10n::t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.'); @@ -54,6 +55,7 @@ function newmember_content(App $a) $o .= '
  • ' . '' . L10n::t('Go to the Help Section') . '
    ' . L10n::t('Our help pages may be consulted for detail on other program features and resources.') . '
  • ' . EOL; $o .= ''; $o .= '
    '; + $o .= '
    '; return $o; } diff --git a/view/templates/auto_request.tpl b/view/templates/auto_request.tpl index c7e10482e..9c737cf55 100644 --- a/view/templates/auto_request.tpl +++ b/view/templates/auto_request.tpl @@ -1,3 +1,4 @@ +

    {{$header}}

    {{if $myaddr == ""}} @@ -53,8 +54,9 @@
    {{if $submit}} - + {{/if}} - +
    +
    \ No newline at end of file diff --git a/view/templates/dfrn_request.tpl b/view/templates/dfrn_request.tpl index 8e686c33d..2f363f565 100644 --- a/view/templates/dfrn_request.tpl +++ b/view/templates/dfrn_request.tpl @@ -1,3 +1,4 @@ +

    {{$header}}

    {{if $myaddr}} @@ -61,7 +62,7 @@ -
    +
    @@ -83,8 +84,9 @@
    {{if $submit}} - + {{/if}} - +
    +
    \ No newline at end of file From 443210b4f0b6b2f9dd8e892da11e3331e0b04c01 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Tue, 11 Dec 2018 23:25:33 +0100 Subject: [PATCH 4/7] move templates to frio theme --- view/templates/auto_request.tpl | 6 +- view/templates/dfrn_request.tpl | 8 +- view/theme/frio/templates/auto_request.tpl | 62 +++++++++++++++ view/theme/frio/templates/dfrn_request.tpl | 92 ++++++++++++++++++++++ 4 files changed, 159 insertions(+), 9 deletions(-) create mode 100644 view/theme/frio/templates/auto_request.tpl create mode 100644 view/theme/frio/templates/dfrn_request.tpl diff --git a/view/templates/auto_request.tpl b/view/templates/auto_request.tpl index 9c737cf55..c7e10482e 100644 --- a/view/templates/auto_request.tpl +++ b/view/templates/auto_request.tpl @@ -1,4 +1,3 @@ -

    {{$header}}

    {{if $myaddr == ""}} @@ -54,9 +53,8 @@
    {{if $submit}} - + {{/if}} - +
    -
    \ No newline at end of file diff --git a/view/templates/dfrn_request.tpl b/view/templates/dfrn_request.tpl index 2f363f565..8e686c33d 100644 --- a/view/templates/dfrn_request.tpl +++ b/view/templates/dfrn_request.tpl @@ -1,4 +1,3 @@ -

    {{$header}}

    {{if $myaddr}} @@ -62,7 +61,7 @@ -
    +
    @@ -84,9 +83,8 @@
    {{if $submit}} - + {{/if}} - +
    -
    \ No newline at end of file diff --git a/view/theme/frio/templates/auto_request.tpl b/view/theme/frio/templates/auto_request.tpl new file mode 100644 index 000000000..9c737cf55 --- /dev/null +++ b/view/theme/frio/templates/auto_request.tpl @@ -0,0 +1,62 @@ +
    +

    {{$header}}

    + +{{if $myaddr == ""}} +

    +{{$page_desc}}
    +

    +

    +

    +{{$invite_desc}} +

    +

    +{{$desc}} +

    +{{/if}} + +{{if $request}} +
    +{{else}} + +{{/if}} + +{{if $photo}} + +{{/if}} + +{{if $url}}
    {{$url_label}}
    {{$url}}
    {{/if}} +{{if $location}}
    {{$location_label}}
    {{$location}}
    {{/if}} +{{if $keywords}}
    {{$keywords_label}}
    {{$keywords}}
    {{/if}} +{{if $about}}
    {{$about_label}}
    {{$about}}
    {{/if}} + +
    + + {{if $myaddr}} + {{$myaddr}} + + {{else}} + + {{/if}} + {{if $url}} + + {{/if}} +
    +
    + + +
    + +
    + +
    + {{if $submit}} + + {{/if}} + +
    +
    +
    \ No newline at end of file diff --git a/view/theme/frio/templates/dfrn_request.tpl b/view/theme/frio/templates/dfrn_request.tpl new file mode 100644 index 000000000..2f363f565 --- /dev/null +++ b/view/theme/frio/templates/dfrn_request.tpl @@ -0,0 +1,92 @@ +
    +

    {{$header}}

    + +{{if $myaddr}} +{{else}} +

    +{{$page_desc}}
    +

    +{{$invite_desc}} +

    +

    +{{$desc}} +

    +{{/if}} + +{{if $request}} +
    +{{else}} + +{{/if}} + +{{if $photo}} + +{{/if}} + +{{if $url}}
    {{$url_label}}
    {{$url}}
    {{/if}} +{{if $location}}
    {{$location_label}}
    {{$location}}
    {{/if}} +{{if $keywords}}
    {{$keywords_label}}
    {{$keywords}}
    {{/if}} +{{if $about}}
    {{$about_label}}
    {{$about}}
    {{/if}} + +
    + + {{if $myaddr}} + {{$myaddr}} + + {{else}} + + {{/if}} + {{if $url}} + + {{/if}} +
    +
    + +

    +{{$pls_answer}} +

    + +
    + +{{include file="field_yesno.tpl" field=$does_know_you}} + + +

    +{{$add_note}} +

    +
    + +
    + + +
    + +
    + {{if $submit}} + + {{/if}} + +
    +
    +
    \ No newline at end of file From dc7e6edca9bbf1b26cda130b1000159b00a7af63 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Fri, 14 Dec 2018 13:29:59 +0100 Subject: [PATCH 5/7] Add page-wrapper to oauth/edit in frio --- view/theme/frio/templates/settings/oauth_edit.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/view/theme/frio/templates/settings/oauth_edit.tpl b/view/theme/frio/templates/settings/oauth_edit.tpl index 91dfa0455..160004c6e 100644 --- a/view/theme/frio/templates/settings/oauth_edit.tpl +++ b/view/theme/frio/templates/settings/oauth_edit.tpl @@ -1,4 +1,4 @@ - +

    {{$title}}

    @@ -16,3 +16,4 @@
    +
    \ No newline at end of file From 5d817380341ab338bd85cf91589cc9efa7fdd65c Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Mon, 17 Dec 2018 23:15:14 +0100 Subject: [PATCH 6/7] Add page-wrapper for probe + webfinder --- mod/probe.php | 4 +++- mod/webfinger.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mod/probe.php b/mod/probe.php index b448ffd2b..7c41df8ac 100644 --- a/mod/probe.php +++ b/mod/probe.php @@ -15,7 +15,8 @@ function probe_content(App $a) killme(); } - $o = '

    Probe Diagnostic

    '; + $o = '
    '; + $o .= '

    Probe Diagnostic

    '; $o .= '
    '; $o .= 'Lookup address: '; @@ -30,6 +31,7 @@ function probe_content(App $a) $o .= str_replace("\n", '
    ', print_r($res, true)); $o .= ''; } + $o .= '
    '; return $o; } diff --git a/mod/webfinger.php b/mod/webfinger.php index 01743f05b..a48d2dba6 100644 --- a/mod/webfinger.php +++ b/mod/webfinger.php @@ -20,7 +20,8 @@ function webfinger_content(App $a) killme(); } - $o = '

    Webfinger Diagnostic

    '; + $o = '
    '; + $o .= '

    Webfinger Diagnostic

    '; $o .= ''; $o .= 'Lookup address: '; @@ -35,5 +36,7 @@ function webfinger_content(App $a) $o .= str_replace("\n", '
    ', print_r($res, true)); $o .= ''; } + $o .= '
    '; + return $o; } From 99e69e30a3c90ad31fc636195882febe8843f594 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 18 Dec 2018 06:52:09 +0000 Subject: [PATCH 7/7] Fix: Contacts can now be edited again --- view/theme/frio/templates/contact_edit.tpl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/view/theme/frio/templates/contact_edit.tpl b/view/theme/frio/templates/contact_edit.tpl index adddcb3dd..462df3cd2 100644 --- a/view/theme/frio/templates/contact_edit.tpl +++ b/view/theme/frio/templates/contact_edit.tpl @@ -45,10 +45,8 @@ {{if $poll_enabled}}
  • {{$lastupdtext|escape}} {{$last_update|escape}}
    {{if $poll_interval}} - - {{$updpub|escape}} {{$poll_interval}} - - + {{$updpub|escape}} {{$poll_interval}} + {{/if}}
  • {{/if}}