Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -51,6 +51,11 @@ class _Status extends \IPS\Content\Item implements \IPS\Content\Lockable, \IPS\C
|
||||
*/
|
||||
protected static $multitons;
|
||||
|
||||
/**
|
||||
* @brief Include In Sitemap
|
||||
*/
|
||||
public static $includeInSitemap = FALSE;
|
||||
|
||||
/**
|
||||
* Columns needed to query for search result / stream view
|
||||
*
|
||||
@@ -468,7 +473,7 @@ class _Status extends \IPS\Content\Item implements \IPS\Content\Lockable, \IPS\C
|
||||
|
||||
/* Set the content and check to make sure it passes any profanity filters */
|
||||
$this->content = $this->id ? $values['status_content_' . $this->id ] : $values['status_content'];
|
||||
$sendFilterNotifications = $this->checkProfanityFilters( FALSE, $this->_new, NULL, FALSE );
|
||||
$sendFilterNotifications = $this->checkProfanityFilters( FALSE, !$this->_new, NULL, FALSE, 'core_Members', $this->_new ? ['status'] : NULL );
|
||||
|
||||
/* If this is an edit, and $sendFilterNotifications is FALSE, send after edit notifications */
|
||||
if ( !$this->_new AND $sendFilterNotifications === FALSE )
|
||||
@@ -490,6 +495,12 @@ class _Status extends \IPS\Content\Item implements \IPS\Content\Lockable, \IPS\C
|
||||
*/
|
||||
public function url( $action=NULL )
|
||||
{
|
||||
/* Status Posts and comments don't support get PrefComment */
|
||||
if ( $action === 'getPrefComment' )
|
||||
{
|
||||
$action = NULL;
|
||||
}
|
||||
|
||||
if( $this->_url === NULL )
|
||||
{
|
||||
$member = \IPS\Member::load( $this->member_id );
|
||||
@@ -621,25 +632,6 @@ class _Status extends \IPS\Content\Item implements \IPS\Content\Lockable, \IPS\C
|
||||
return ( $member->moderateNewContent( $considerPostBeforeRegistering ) or \IPS\Settings::i()->profile_comment_approval );
|
||||
}
|
||||
|
||||
/**
|
||||
* Can delete?
|
||||
*
|
||||
* @param \IPS\Member|NULL $member The member to check for (NULL for currently logged in member)
|
||||
* @return bool
|
||||
*/
|
||||
public function canDelete( $member=NULL )
|
||||
{
|
||||
$member = $member ?: \IPS\Member::loggedIn();
|
||||
|
||||
/* Profile owner should always be able to delete */
|
||||
if ( $member->member_id == $this->member_id )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return parent::canDelete( $member );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Cached comment count
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user