From 0c2d9edd83c41866cda939b12f5127e94022a276 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 15 Oct 2014 21:15:20 +0200 Subject: it seems we do not have an key called item_id here so must be id only --- mod/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index dc593f22b..611434078 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1070,7 +1070,7 @@ function photos_content(&$a) { $body_e = prepare_text($item['body'],$item['mimetype']); $comments .= replace_macros($template,array( - '$id' => $item['item_id'], + '$id' => $item['id'], '$mode' => 'photos', '$profile_url' => $profile_link, '$name' => $name_e, -- cgit v1.2.3 From dc23030dcb18a23e7c8e74f6bf7076a3d31b9c60 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 15 Oct 2014 21:17:07 +0200 Subject: one more item_id > id --- mod/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 611434078..41aae0ec3 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1079,7 +1079,7 @@ function photos_content(&$a) { '$title' => $title_e, '$body' => $body_e, '$ago' => relative_date($item['created']), - '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), + '$indent' => (($item['parent'] != $item['id']) ? ' comment' : ''), '$drop' => $drop, '$comment' => $comment )); -- cgit v1.2.3 From 04a254d94a2dcebbfe767adad241d92eb913d4b2 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 15 Oct 2014 22:23:38 +0200 Subject: some work on single photo view comments --- mod/photos.php | 3 ++- view/tpl/photo_item.tpl | 41 +++++++++++++++++++++++------------------ view/tpl/photo_view.tpl | 4 ++++ 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 41aae0ec3..56e63237e 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1087,7 +1087,7 @@ function photos_content(&$a) { } if($can_post || $can_comment) { - $comments .= replace_macros($cmnt_tpl,array( + $commentbox = replace_macros($cmnt_tpl,array( '$return_path' => '', '$jsreload' => $return_url, '$type' => 'wall-comment', @@ -1129,6 +1129,7 @@ function photos_content(&$a) { '$like' => $like_e, '$dislike' => $dislike_e, '$comments' => $comments, + '$commentbox' => $commentbox, '$paginate' => $paginate, )); diff --git a/view/tpl/photo_item.tpl b/view/tpl/photo_item.tpl index e7d25fd55..16f9a76c2 100755 --- a/view/tpl/photo_item.tpl +++ b/view/tpl/photo_item.tpl @@ -1,22 +1,27 @@ -
-
- - {{$name}} -
+
+
+
+
+ + {{$name}} +
+
+
+
+ {{$name}} +
+
{{$ago}}
+
+
+
{{$title}}
+
{{$body}}
+
+ {{$drop}} +
-
- {{$name}} -
{{$ago}}
-
-
-
{{$title}}
-
{{$body}}
-
- {{$drop}} -
-
- {{$comment}} + {{$comment}} -
+
+
diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl index f895b3129..4a9c0dfe8 100755 --- a/view/tpl/photo_view.tpl +++ b/view/tpl/photo_view.tpl @@ -92,6 +92,10 @@ {{$comments}} +
+ {{$commentbox}} +
+
{{if $nextlink}}{{/if}} -- cgit v1.2.3 From 997ec0911c9d3eac0f86e7247fb9058b10c57134 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 15 Oct 2014 22:41:42 +0200 Subject: $comments > $commentbox --- mod/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 56e63237e..2b859b7f1 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -999,7 +999,7 @@ function photos_content(&$a) { $comments = ''; if(! count($r)) { if($can_post || $can_comment) { - $comments .= replace_macros($cmnt_tpl,array( + $commentbox = replace_macros($cmnt_tpl,array( '$return_path' => '', '$mode' => 'photos', '$jsreload' => $return_url, -- cgit v1.2.3 From 1eb478ba54206cca53653e7a579aa1a36fb03315 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 16 Oct 2014 00:47:02 +0100 Subject: SSL is broken you say? Well bah gum. Someone probably needs to update Lighttpd and Apache too. --- doc/install/sample-nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install/sample-nginx.conf b/doc/install/sample-nginx.conf index f53a3d5fb..dd3b63d3b 100644 --- a/doc/install/sample-nginx.conf +++ b/doc/install/sample-nginx.conf @@ -55,7 +55,7 @@ server { ssl_certificate /etc/nginx/ssl/red.example.net.chain.pem; ssl_certificate_key /etc/nginx/ssl/example.net.key; ssl_session_timeout 5m; - ssl_protocols SSLv3 TLSv1; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; ssl_prefer_server_ciphers on; -- cgit v1.2.3 From e80c20d2584e17b43dd456bbb4b3dc0f8c11eeb4 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 15 Oct 2014 17:55:20 -0700 Subject: Don't recognise hashtags starting with #, e.g. ### --- include/text.php | 4 ++-- version.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/text.php b/include/text.php index 0e38de2d2..fca23ca22 100644 --- a/include/text.php +++ b/include/text.php @@ -619,8 +619,8 @@ function get_tags($s) { } if(substr($mtch,-1,1) === '.') $mtch = substr($mtch,0,-1); - // ignore strictly numeric tags like #1 - if((strpos($mtch,'#') === 0) && ( ctype_digit(substr($mtch,1)) || substr($mtch,1,1) === '^')) + // ignore strictly numeric tags like #1 or #^ bookmarks or ## double hash + if((strpos($mtch,'#') === 0) && ( ctype_digit(substr($mtch,1)) || substr($mtch,1,1) === '^') || substr($mtch,1,1) === '#') continue; // try not to catch url fragments if(strpos($s,$mtch) && preg_match('/[a-zA-z0-9\/]/',substr($s,strpos($s,$mtch)-1,1))) diff --git a/version.inc b/version.inc index 1984d7bf1..ccf12f9fc 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-10-14.828 +2014-10-15.829 -- cgit v1.2.3 From 11ad127c68216734c406c393a361f2231e3a5a15 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 16 Oct 2014 01:57:04 +0100 Subject: Let's not play security expert. Use Mozillas recommended server config, even if it's ridiculously verbose. Reasoning - they make the browser, so if they've got it wrong, you're buggered anyway. --- doc/install/sample-nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install/sample-nginx.conf b/doc/install/sample-nginx.conf index dd3b63d3b..f533d8ee0 100644 --- a/doc/install/sample-nginx.conf +++ b/doc/install/sample-nginx.conf @@ -56,7 +56,7 @@ server { ssl_certificate_key /etc/nginx/ssl/example.net.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA; ssl_prefer_server_ciphers on; fastcgi_param HTTPS on; -- cgit v1.2.3 From ae9e1fa688c90e128637b5c44cf4705287f6cfa1 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 15 Oct 2014 18:35:56 -0700 Subject: missing event permissions --- include/acl_selectors.php | 3 ++- mod/events.php | 1 + view/tpl/event_form.tpl | 3 ++- view/tpl/event_head.tpl | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 0b68ba227..3cdbd411c 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -248,7 +248,8 @@ function populate_acl($defaults = null,$show_jotnets = true) { '$aclModalTitle' => t('Permissions'), '$aclModalDismiss' => t('Close') )); - + + logger($o); return $o; diff --git a/mod/events.php b/mod/events.php index c80d1dd39..d24f84d44 100755 --- a/mod/events.php +++ b/mod/events.php @@ -582,6 +582,7 @@ function events_content(&$a) { '$t_orig' => $t_orig, '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, + '$permissions' => t('Permissions'), '$acl' => (($orig_event['event_xchan']) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $perm_defaults),false)), '$submit' => t('Submit') diff --git a/view/tpl/event_form.tpl b/view/tpl/event_form.tpl index 2a580e3b8..d91e44458 100755 --- a/view/tpl/event_form.tpl +++ b/view/tpl/event_form.tpl @@ -66,7 +66,8 @@
{{$sh_text}}
-{{$acl}} + + {{$acl}}
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index 8388187d1..6f1d2f22c 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -115,10 +115,10 @@ $('#event-share-checkbox').change(function() { if ($('#event-share-checkbox').is(':checked')) { - $('#acl-wrapper').show(); + $('#event-permissions-button').show(); } else { - $('#acl-wrapper').hide(); + $('#event-permissions-button').hide(); } }).trigger('change'); -- cgit v1.2.3 From 4cbe69685965eaa8900d927a55487599b4683b2e Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 15 Oct 2014 18:36:36 -0700 Subject: remove log statement --- include/acl_selectors.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 3cdbd411c..5adafff2c 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -249,8 +249,6 @@ function populate_acl($defaults = null,$show_jotnets = true) { '$aclModalDismiss' => t('Close') )); - logger($o); - return $o; } -- cgit v1.2.3 From e1f88fd15d75f81af5017860b9f197771326c9b7 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 16 Oct 2014 02:02:11 -0700 Subject: jsonp support (thankxs fabrixxm) --- include/api.php | 5 ++++- include/taxonomy.php | 2 +- version.inc | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/api.php b/include/api.php index 2505def4c..8b52253dd 100644 --- a/include/api.php +++ b/include/api.php @@ -197,7 +197,10 @@ require_once('include/items.php'); case "json": header ("Content-Type: application/json"); foreach($r as $rr) - return json_encode($rr); + $json = json_encode($rr); + if ($_GET['callback']) + $json = $_GET['callback']."(".$json.")"; + return $json; break; case "rss": header ("Content-Type: application/rss+xml"); diff --git a/include/taxonomy.php b/include/taxonomy.php index 92003328f..35605da22 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -154,7 +154,7 @@ function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $ } function tags_sort($a,$b) { - if($a[0] == $b[0]) + if(strtolower($a[0]) == strtolower($b[0])) return 0; return((strtolower($a[0]) < strtolower($b[0])) ? -1 : 1); } diff --git a/version.inc b/version.inc index ccf12f9fc..ab083bbd8 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-10-15.829 +2014-10-16.830 -- cgit v1.2.3