Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -182,7 +182,7 @@ class _comments extends \IPS\Content\Api\CommentController
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
$this->class = 'IPS\cms\Records\Comment' . $database->id;
|
||||
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
@@ -193,12 +193,22 @@ class _comments extends \IPS\Content\Api\CommentController
|
||||
try
|
||||
{
|
||||
$recordClass = 'IPS\cms\Records' . $database->id;
|
||||
/** @var \IPS\cms\Records $record */
|
||||
$record = $recordClass::load( \IPS\Request::i()->record );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\Exception( 'INVALID_ID', '2T311/5', 403 );
|
||||
}
|
||||
|
||||
if( $record->useForumComments() )
|
||||
{
|
||||
$this->class = 'IPS\cms\Records\CommentTopicSync' . $database->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->class = 'IPS\cms\Records\Comment' . $database->id;
|
||||
}
|
||||
|
||||
/* Get author */
|
||||
if ( $this->member )
|
||||
@@ -221,7 +231,7 @@ class _comments extends \IPS\Content\Api\CommentController
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( \IPS\Request::i()->author === 0 )
|
||||
if ( (int) \IPS\Request::i()->author === 0 )
|
||||
{
|
||||
$author = new \IPS\Member;
|
||||
$author->name = \IPS\Request::i()->author_name;
|
||||
|
||||
Reference in new issue
Block a user