blob: 7e245fbe0a09a431eb74370a5f872c8e0f2667fc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
function dreport_content(&$a) {
if(! local_channel()) {
notice( t('Permission denied') . EOL);
return;
}
$channel = $a->get_channel();
$mid = ((argc() > 1) ? argv(1) : '');
if(! $mid) {
notice( t('Invalid message') . EOL);
return;
}
$r = q("select * from dreport where dreport_xchan = '%s' and dreport_mid = '%s'",
dbesc($channel['channel_hash']),
dbesc($mid)
);
if(! $r) {
notice( t('no results') . EOL);
return;
}
return print_r($r,true);
}
|