Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -21,9 +21,9 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Album Review Model
|
||||
*/
|
||||
class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \IPS\Content\ReportCenter, \IPS\Content\Hideable, \IPS\Content\Searchable, \IPS\Content\Embeddable
|
||||
class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \IPS\Content\Hideable, \IPS\Content\Searchable, \IPS\Content\Embeddable
|
||||
{
|
||||
use \IPS\Content\Reactable;
|
||||
use \IPS\Content\Reactable, \IPS\Content\Reportable;
|
||||
|
||||
/**
|
||||
* @brief [ActiveRecord] Multiton Store
|
||||
@@ -63,6 +63,7 @@ class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \
|
||||
'votes_helpful' => 'votes_helpful',
|
||||
'votes_data' => 'votes_data',
|
||||
'approved' => 'approved',
|
||||
'author_response' => 'author_response',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -105,7 +106,7 @@ class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \
|
||||
{
|
||||
parent::postCreate();
|
||||
|
||||
$this->item()->asNode()->setLastComment();
|
||||
$this->item()->asNode()->setLastReview( $this );
|
||||
$this->item()->asNode()->save();
|
||||
}
|
||||
|
||||
@@ -152,4 +153,16 @@ class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'embed.css', 'gallery', 'front' ) );
|
||||
return \IPS\Theme::i()->getTemplate( 'global', 'gallery' )->embedAlbumReview( $this, $this->item(), $this->url()->setQueryString( $params ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the container item class to use for mod permission checks
|
||||
*
|
||||
* @return string|NULL
|
||||
* @note By default we will return NULL and the container check will execute against Node::$contentItemClass, however
|
||||
* in some situations we may need to override this (i.e. for Gallery Albums)
|
||||
*/
|
||||
protected static function getContainerModPermissionClass()
|
||||
{
|
||||
return 'IPS\gallery\Album\Item';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user