aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Dreport.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Dreport.php')
-rw-r--r--Zotlabs/Module/Dreport.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php
index 8906a4f81..42f337b76 100644
--- a/Zotlabs/Module/Dreport.php
+++ b/Zotlabs/Module/Dreport.php
@@ -12,24 +12,12 @@ class Dreport extends \Zotlabs\Web\Controller {
}
$table = 'item';
-
$channel = \App::get_channel();
+ $mid = ((argc() > 1) ? unpack_link_id(argv(1)) : '');
- $mid = ((argc() > 1) ? argv(1) : '');
- $encoded_mid = '';
-
- 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) {
- $encoded_mid = $mid;
- $mid = @base64url_decode(substr($mid,4));
- }
+ $mid = ((argc() > 2) ? unpack_link_id(argv(2)) : '');
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 )) ",
@@ -43,7 +31,7 @@ class Dreport extends \Zotlabs\Web\Controller {
}
}
sleep(3);
- goaway(z_root() . '/dreport/' . (($encoded_mid) ? $encoded_mid : $mid));
+ goaway(z_root() . '/dreport/' . gen_link_id($mid));
}
if(! $mid) {