This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
core/mod/dreport.php
2015-09-22 02:32:04 -07:00

32 lines
487 B
PHP

<?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);
}