api files improvements/fixes and documentation

This commit is contained in:
zotlabs
2016-12-06 20:34:23 -08:00
parent abb045e1ff
commit 641e9ff508
3 changed files with 112 additions and 3 deletions

View File

@@ -197,10 +197,10 @@ function attach_list_files($channel_id, $observer, $hash = '', $filename = '', $
$sql_extra .= protect_sprintf(" and hash = '" . dbesc($hash) . "' ");
if($filename)
$sql_extra .= protect_sprintf(" and filename like '@" . dbesc($filename) . "@' ");
$sql_extra .= protect_sprintf(" and filename like '%" . dbesc($filename) . "%' ");
if($filetype)
$sql_extra .= protect_sprintf(" and filetype like '@" . dbesc($filetype) . "@' ");
$sql_extra .= protect_sprintf(" and filetype like '%" . dbesc($filetype) . "%' ");
if($entries)
$limit = " limit " . intval($start) . ", " . intval(entries) . " ";