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 Admin CP Restrictions
|
||||
* @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 04 Apr 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -241,6 +241,8 @@ class _admin extends \IPS\Dispatcher\Controller
|
||||
$current = $current->first();
|
||||
}
|
||||
|
||||
unset( \IPS\Data\Store::i()->administrators );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=core&module=staff&controller=admin&do=edit&id={$current['row_id']}&type={$current['row_id_type']}" ) );
|
||||
}
|
||||
}
|
||||
@@ -392,12 +394,22 @@ class _admin extends \IPS\Dispatcher\Controller
|
||||
protected function delete()
|
||||
{
|
||||
$current = \IPS\Db::i()->select( '*', 'core_admin_permission_rows', array( "row_id=? AND row_id_type=?", intval( \IPS\Request::i()->id ), \IPS\Request::i()->type ) )->first();
|
||||
if ( $current )
|
||||
|
||||
if ( $current['row_id_type'] === 'member' )
|
||||
{
|
||||
\IPS\Session::i()->log( 'acplog__acpr_deleted', array( ( $current['row_id_type'] == 'group' ? \IPS\Member\Group::load( $current['row_id'] )->name : \IPS\Member::load( $current['row_id'] )->name ) => FALSE ) );
|
||||
\IPS\Db::i()->delete( 'core_admin_permission_rows', array( 'row_id=? AND row_id_type=?', intval( \IPS\Request::i()->id ), \IPS\Request::i()->type ) );
|
||||
unset ( \IPS\Data\Store::i()->administrators );
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'restrictions_delete_member' );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'restrictions_delete_group' );
|
||||
}
|
||||
|
||||
/* Make sure the user confirmed the deletion */
|
||||
\IPS\Request::i()->confirmedDelete();
|
||||
|
||||
\IPS\Session::i()->log( 'acplog__acpr_deleted', array( ( $current['row_id_type'] == 'group' ? \IPS\Member\Group::load( $current['row_id'] )->name : \IPS\Member::load( $current['row_id'] )->name ) => FALSE ) );
|
||||
\IPS\Db::i()->delete( 'core_admin_permission_rows', array( 'row_id=? AND row_id_type=?', intval( \IPS\Request::i()->id ), \IPS\Request::i()->type ) );
|
||||
unset ( \IPS\Data\Store::i()->administrators );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=staff&controller=admin' ) );
|
||||
}
|
||||
@@ -417,16 +429,24 @@ class _admin extends \IPS\Dispatcher\Controller
|
||||
$table->include = array( 'member_id', 'action', 'ip_address', 'ctime' );
|
||||
$table->mainColumn = 'action';
|
||||
$table->parsers = array(
|
||||
'member_id' => function( $val )
|
||||
'member_id' => function( $val, $row )
|
||||
{
|
||||
try
|
||||
$member = \IPS\Member::load( $val );
|
||||
if ( $member->member_id )
|
||||
{
|
||||
return htmlentities( \IPS\Member::load( $val )->name, \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
else if ( $row['member_name'] != '' )
|
||||
{
|
||||
return htmlentities( $row['member_name'], \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Member doesn't exist anymore, but we also haven't stored the name
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
'action' => function( $val, $row )
|
||||
{
|
||||
@@ -467,9 +487,7 @@ class _admin extends \IPS\Dispatcher\Controller
|
||||
'member_id' => \IPS\Helpers\Table\SEARCH_MEMBER,
|
||||
'ip_address' => \IPS\Helpers\Table\SEARCH_CONTAINS_TEXT,
|
||||
'ctime' => \IPS\Helpers\Table\SEARCH_DATE_RANGE,
|
||||
'note' => \IPS\Helpers\Table\SEARCH_CONTAINS_TEXT,
|
||||
);
|
||||
$table->quickSearch = 'note';
|
||||
|
||||
/* Add a button for settings */
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'core', 'staff', 'restrictions_adminlogs_prune' ) )
|
||||
|
||||
Reference in new issue
Block a user