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 Warning Reason Node
|
||||
* @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 23 Apr 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -91,6 +91,7 @@ class _Reason extends \IPS\Node\Model
|
||||
, 'unlimited' => -1, 'unlimitedLang' => 'never'
|
||||
) ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'wr_remove_override', $this->id ? $this->remove_override : TRUE ) );
|
||||
$form->add( new \IPS\Helpers\Form\Editor( 'wr_notes', $this->id ? $this->notes : NULL, FALSE, array( 'app' => 'core', 'key' => 'Modcp', 'autoSaveKey' => "warn-member-default", 'attachIds' => ( $this->id ? array( $this->id, NULL, 'warndefault' ) : NULL ), 'minimize' => 'warn_member_note_placeholder' ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,7 +148,7 @@ class _Reason extends \IPS\Node\Model
|
||||
*/
|
||||
public function postSaveForm( $values )
|
||||
{
|
||||
|
||||
\IPS\File::claimAttachments( "warn-member-default", $this->id, NULL, 'warndefault' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,4 +160,17 @@ class _Reason extends \IPS\Node\Model
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* [ActiveRecord] Delete Record
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
\IPS\File::unclaimAttachments( "warn-member-default", $this->id, NULL, 'warndefault' );
|
||||
\IPS\Db::i()->update( 'core_members_warn_logs', array( 'wl_reason' => 0 ), array( "wl_reason=?", $this->id ) );
|
||||
return parent::delete();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user