Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

+13 -4
View File
@@ -126,6 +126,7 @@ class _files extends \IPS\Content\Api\ItemController
* @apiparam int hidden 0 = unhidden; 1 = hidden, pending moderator approval; -1 = hidden (as if hidden by a moderator)
* @apiparam int pinned 1/0 indicating if the file should be featured
* @apiparam int featured 1/0 indicating if the file should be featured
* @apiparam bool anonymous If 1, the item will be posted anonymously.
* @throws 1S303/7 NO_CATEGEORY The category ID does not exist
* @throws 1S303/8 NO_AUTHOR The author ID does not exist
* @throws 1S303/9 NO_TITLE No title was supplied
@@ -173,7 +174,15 @@ class _files extends \IPS\Content\Api\ItemController
}
else
{
$author = new \IPS\Member;
if ( \IPS\Request::i()->author === 0 )
{
$author = new \IPS\Member;
$author->name = \IPS\Request::i()->author_name;
}
else
{
throw new \IPS\Api\Exception( 'NO_AUTHOR', '1S303/8', 400 );
}
}
}
@@ -321,7 +330,7 @@ class _files extends \IPS\Content\Api\ItemController
* @apiparam int locked 1/0 indicating if the file should be locked
* @apiparam int hidden 0 = unhidden; 1 = hidden, pending moderator approval; -1 = hidden (as if hidden by a moderator)
* @apiparam int featured 1/0 indicating if the file should be featured
* @param int $id ID Number
* @apiparam bool anonymous If 1, the item will be posted anonymously.
* @throws 2S303/C INVALID_ID The file ID is invalid or the authorized user does not have permission to view it
* @throws 1S303/D NO_CATEGORY The category ID does not exist or the authorized user does not have permission to post in it
* @throws 1S303/E NO_AUTHOR The author ID does not exist
@@ -530,8 +539,8 @@ class _files extends \IPS\Content\Api\ItemController
'dip' => \IPS\Request::i()->ipAddress(),
'dmid' => (int) $this->member->member_id,
'dsize' => 0,
'dua' => 'REST API',
'dbrowsers' => '',
'dua' => $_SERVER['HTTP_USER_AGENT'] ?? '',
'dbrowsers' => 'REST API',
'dos' => ''
) );
}