diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-13 16:15:34 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-13 16:15:34 -0700 |
commit | 578f1b8ece49c6b8aa8eb34e33f37f456d5a4d90 (patch) | |
tree | a15539380cf545f6d15dca21d67f9e65d9ee05bf | |
parent | 73dad85867b1d55a7da7fea99c90c6364b85b399 (diff) | |
download | volse-hubzilla-578f1b8ece49c6b8aa8eb34e33f37f456d5a4d90.tar.gz volse-hubzilla-578f1b8ece49c6b8aa8eb34e33f37f456d5a4d90.tar.bz2 volse-hubzilla-578f1b8ece49c6b8aa8eb34e33f37f456d5a4d90.zip |
api extenesions for file migration
-rw-r--r-- | include/api.php | 9 | ||||
-rw-r--r-- | version.inc | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/api.php b/include/api.php index 863c7a463..258d197a5 100644 --- a/include/api.php +++ b/include/api.php @@ -622,7 +622,7 @@ require_once('include/attach.php'); function api_attach_list(&$a,$type) { logger('api_user: ' . api_user()); - json_return_and_die(attach_list_files(api_user(),get_observer_hash())); + json_return_and_die(attach_list_files(api_user(),get_observer_hash(),'','','','created asc')); } api_register_func('api/red/files','api_attach_list', true); @@ -635,10 +635,11 @@ require_once('include/attach.php'); dbesc($_REQUEST['file_id']) ); if($r) { - $data = dbunescbin($r[0]['data']); - if($r[0]['flags'] & ATTACH_FLAG_DIR) + if($r[0]['flags'] & ATTACH_FLAG_DIR) { $r[0]['is_dir'] = '1'; - if($r[0]['flags'] & ATTACH_FLAG_OS) + $r[0]['data'] = ''; + } + elseif($r[0]['flags'] & ATTACH_FLAG_OS) $r[0]['data'] = base64_encode(file_get_contents(dbunescbin($r[0]['data']))); else $r[0]['data'] = base64_encode(dbunescbin($r[0]['data'])); diff --git a/version.inc b/version.inc index 1da20db46..b8383a060 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-10-12.1183 +2015-10-13.1184 |