Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Report Comment Model
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 15 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -64,14 +64,50 @@ class _Comment extends \IPS\Content\Comment
|
||||
* @brief Title
|
||||
*/
|
||||
public static $title = 'report_comment';
|
||||
|
||||
|
||||
/**
|
||||
* Get mapped value
|
||||
*
|
||||
* @param string $key date,content,ip_address,first
|
||||
* @return mixed
|
||||
*/
|
||||
public function mapped( $key )
|
||||
{
|
||||
/* Get the reported content items title */
|
||||
if ( $key === 'title' )
|
||||
{
|
||||
return $this->item()->mapped( 'title' );
|
||||
}
|
||||
|
||||
return parent::mapped( $key );
|
||||
}
|
||||
|
||||
/**
|
||||
* Can view this entry
|
||||
*
|
||||
* @param \IPS\Member|NULL $member The member or NULL for currently logged in member.
|
||||
* @return bool
|
||||
*/
|
||||
public function canView( $member = NULL )
|
||||
{
|
||||
$member = $member ?: \IPS\Member::loggedIn();
|
||||
|
||||
$return = parent::canView($member);
|
||||
|
||||
if ( $return AND $member->modPermission('can_view_reports') )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get URL for doing stuff
|
||||
*
|
||||
* @param string|NULL $action Action
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function url( $action=NULL )
|
||||
public function url( $action='find' )
|
||||
{
|
||||
$url = parent::url( $action );
|
||||
if ( isset( $url->queryString['do'] ) )
|
||||
@@ -80,4 +116,4 @@ class _Comment extends \IPS\Content\Comment
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user