diff options
author | Max Kostikov <max@kostikov.co> | 2019-03-17 12:16:20 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-03-17 12:16:20 +0100 |
commit | e28bde6ccdb03b370df1dbc8654d69c905b8a235 (patch) | |
tree | 097670ea22a5965d709825152cf82f3bd7b86719 | |
parent | e92514ee632aea74aad812432f37259c3fec5fc1 (diff) | |
parent | 769dd174bd3d87fd3494537b4f9429454654584b (diff) | |
download | volse-hubzilla-e28bde6ccdb03b370df1dbc8654d69c905b8a235.tar.gz volse-hubzilla-e28bde6ccdb03b370df1dbc8654d69c905b8a235.tar.bz2 volse-hubzilla-e28bde6ccdb03b370df1dbc8654d69c905b8a235.zip |
Merge branch 'dreport_fixes' into 'dev'
fix dreport redeliver
See merge request hubzilla/core!1556
-rw-r--r-- | Zotlabs/Module/Dreport.php | 15 | ||||
-rw-r--r-- | view/tpl/dreport.tpl | 8 |
2 files changed, 13 insertions, 10 deletions
diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php index 2c125b7a9..1538ea278 100644 --- a/Zotlabs/Module/Dreport.php +++ b/Zotlabs/Module/Dreport.php @@ -16,17 +16,20 @@ class Dreport extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); $mid = ((argc() > 1) ? argv(1) : ''); + $encoded_mid = ''; - if(strpos($mid,'b64.') === 0) + if(strpos($mid,'b64.') === 0) { + $encoded_mid = $mid; $mid = @base64url_decode(substr($mid,4)); - - + } if($mid === 'push') { $table = 'push'; $mid = ((argc() > 2) ? argv(2) : ''); - if(strpos($mid,'b64.') === 0) + if(strpos($mid,'b64.') === 0) { + $encoded_mid = $mid; $mid = @base64url_decode(substr($mid,4)); + } if($mid) { $i = q("select id from item where mid = '%s' and uid = %d and ( author_xchan = '%s' or ( owner_xchan = '%s' and item_wall = 1 )) ", @@ -40,7 +43,7 @@ class Dreport extends \Zotlabs\Web\Controller { } } sleep(3); - goaway(z_root() . '/dreport/' . urlencode($mid)); + goaway(z_root() . '/dreport/' . (($encoded_mid) ? $encoded_mid : $mid)); } if($mid === 'mail') { @@ -158,7 +161,7 @@ class Dreport extends \Zotlabs\Web\Controller { $o = replace_macros(get_markup_template('dreport.tpl'), array( '$title' => sprintf( t('Delivery report for %1$s'),basename($mid)) . '...', '$table' => $table, - '$mid' => urlencode($mid), + '$mid' => (($encoded_mid) ? $encoded_mid : $mid), '$options' => t('Options'), '$push' => t('Redeliver'), '$entries' => $entries diff --git a/view/tpl/dreport.tpl b/view/tpl/dreport.tpl index 1f5915609..a6b05b326 100644 --- a/view/tpl/dreport.tpl +++ b/view/tpl/dreport.tpl @@ -3,11 +3,11 @@ {{if $table == 'item'}} <div class="dropdown pull-right"> <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{$options}}"> - <i class="fa fa-sort-desc"></i> + <i class="fa fa-cog"></i> </button> - <ul class="dropdown-menu"> - <li><a href="dreport/push/{{$mid}}">{{$push}}</a></li> - </ul> + <div class="dropdown-menu"> + <a href="dreport/push/{{$mid}}" class="dropdown-item" >{{$push}}</a> + </div> </div> {{/if}} <h2>{{$title}}</h2> |