diff options
author | Thomas Willingham <founder@kakste.com> | 2014-01-24 03:44:50 +0000 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2014-01-24 03:44:50 +0000 |
commit | d57361ea4ace5d392623a316068fb5041d116ace (patch) | |
tree | 17bde386ecda7740ded4b072c3d913718a681e93 | |
parent | 357ddd1bf708bfa1c3973bf9a69a333b3338a5ce (diff) | |
download | volse-hubzilla-d57361ea4ace5d392623a316068fb5041d116ace.tar.gz volse-hubzilla-d57361ea4ace5d392623a316068fb5041d116ace.tar.bz2 volse-hubzilla-d57361ea4ace5d392623a316068fb5041d116ace.zip |
Make share previews a bit longer. We can't go any longer than this
without suhosin starting to break things for channels with long names
- this limit works with the channel with the longest name in the matrix
today, but we may need to make this a pconfig anyway.
-rw-r--r-- | include/conversation.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php index 46a01d3c9..4b292ca4d 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1296,12 +1296,18 @@ function render_location_default($item) { function prepare_page($item) { +$foo = $item['owner_xchan']; $a = get_app(); + $upstreamshare = '1'; + if ($foo == 'njsQ2vWa65pH-kwIKfGINOqDT2k_05ZIAeQxP9Ozk16z1WLTxTNlly4_vQKx2huTPCQqMz8shvgB3f7JVPzkdw') { + $upstreamshare = ''; + } $naked = ((get_pconfig($item['uid'],'system','nakedpage')) ? 1 : 0); $observer = $a->get_observer(); $zid = ($observer['xchan_addr']); - $preview = substr(urlencode($item['body']), 0, 100); + //240 chars is the longest we can have before we start hitting problems with suhosin sites + $preview = substr(urlencode($item['body']), 0, 240); $link = z_root() . '/' . $a->cmd; if(array_key_exists('webpage',$a->layout) && array_key_exists('authored',$a->layout['webpage'])) { if($a->layout['webpage']['authored'] === 'none') @@ -1316,7 +1322,8 @@ function prepare_page($item) { '$title' => smilies(bbcode($item['title'])), '$body' => prepare_body($item,true), '$preview' => $preview, - '$link' => $link + '$link' => $link, + '$upstreamshare' => $upstreamshare )); } |