api function item/new renamed to item/store as that more closely reflects its purpose. It can also be used to store an edit of an existing item. I believe this is a reasonably safe change at this time as I don't believe there is any software currently making use of this call - instead using the Twitter API which is now a plugin.

Also some work to make the install documentation agnostic to project name variations. This is not yet complete.
This commit is contained in:
zotlabs
2016-12-02 21:51:00 -08:00
parent e2660eaad3
commit e776e79c1e
2 changed files with 57 additions and 30 deletions

View File

@@ -28,8 +28,8 @@
api_register_func('api/z/1.0/group','api_group', true);
api_register_func('api/red/xchan','api_red_xchan',true);
api_register_func('api/z/1.0/xchan','api_red_xchan',true);
api_register_func('api/red/item/new','red_item_new', true);
api_register_func('api/z/1.0/item/new','red_item_new', true);
api_register_func('api/red/item/store','red_item_store', true);
api_register_func('api/z/1.0/item/store','red_item_store', true);
api_register_func('api/red/item/full','red_item', true);
api_register_func('api/z/1.0/item/full','red_item', true);
@@ -341,15 +341,15 @@
}
function red_item_new($type) {
function red_item_store($type) {
if (api_user() === false) {
logger('api_red_item_new: no user');
logger('api_red_item_store: no user');
return false;
}
logger('api_red_item_new: REQUEST ' . print_r($_REQUEST,true));
logger('api_red_item_new: FILES ' . print_r($_FILES,true));
logger('api_red_item_store: REQUEST ' . print_r($_REQUEST,true));
logger('api_red_item_store: FILES ' . print_r($_FILES,true));
// set this so that the item_post() function is quiet and doesn't redirect or emit json