Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Group management
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2013-04-03 17:54:22 -0400 (Wed, 03 Apr 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -13,7 +13,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 12149 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
@@ -153,7 +153,7 @@ class admin_members_groups_groups extends ipsCommand
|
||||
|
||||
while ( $row = $this->DB->fetch( $o ) )
|
||||
{
|
||||
$_extra = ( $this->request['showSecondary'] ) ? ' OR mgroup_others LIKE \'%,' . intval($row['g_id']) . ',%\'' : '';
|
||||
$_extra = ( $this->request['showSecondary'] ) ? ' OR ' . $this->DB->buildWherePermission( array( intval($row['g_id']) ), 'mgroup_others', false ) : '';
|
||||
|
||||
/* As much as I hate nested queries, this is actually quicker especially when you add in the LIKE check.*/
|
||||
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count',
|
||||
@@ -435,6 +435,47 @@ class admin_members_groups_groups extends ipsCommand
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix settings
|
||||
//-----------------------------------------
|
||||
|
||||
$_toUpdate = array();
|
||||
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_extra='#show_groups#'" ) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($o) )
|
||||
{
|
||||
/* Dropdown with the deleted group selected? Return to default. */
|
||||
if( $r['conf_type'] == 'dropdown' AND $r['conf_value'] == $this->request['id'] )
|
||||
{
|
||||
$_toUpdate[ $r['conf_key'] ] = $r['conf_default'];
|
||||
}
|
||||
/* Multiselect with deleted group selected? Fix values then. */
|
||||
else if( $r['conf_type'] == 'multi' AND strpos( $r['conf_value'], (string) $this->request['id'] ) !== false )
|
||||
{
|
||||
$_values = explode( ',', $r['conf_value'] );
|
||||
$_newValues = array();
|
||||
|
||||
foreach( $_values as $_value )
|
||||
{
|
||||
if( $_value != $this->request['id'] )
|
||||
{
|
||||
$_newValues[] = $_value;
|
||||
}
|
||||
}
|
||||
|
||||
$_toUpdate[ $r['conf_key'] ] = ( count($_newValues) ) ? $_newValues : $r['conf_default'];
|
||||
}
|
||||
}
|
||||
|
||||
if( count($_toUpdate) )
|
||||
{
|
||||
/* The multiselect settings have evalphp which forces it to inspect $_POST */
|
||||
$_POST = array_merge( $_POST, $_toUpdate );
|
||||
IPSLib::updateSettings( $_toUpdate );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Rebuild caches
|
||||
//-----------------------------------------
|
||||
@@ -563,6 +604,10 @@ class admin_members_groups_groups extends ipsCommand
|
||||
$this->request['p_width'] = str_replace( ":", "", $this->request['p_width'] );
|
||||
$this->request['p_height'] = str_replace( ":", "", $this->request['p_height'] );
|
||||
|
||||
$this->request['g_attach_max'] = intval( $this->request['g_attach_max'] );
|
||||
$this->request['g_attach_per_post'] = intval( $this->request['g_attach_per_post'] );
|
||||
$this->request['p_max'] = intval( $this->request['p_max'] );
|
||||
|
||||
$sig_limits = array(
|
||||
$this->request['use_signatures'],
|
||||
$this->request['max_images'],
|
||||
@@ -594,7 +639,7 @@ class admin_members_groups_groups extends ipsCommand
|
||||
'g_hide_from_list' => intval($this->request['g_hide_from_list']),
|
||||
'g_perm_id' => $new_perm_set_id ? $new_perm_set_id : implode( ",", $this->request['permid'] ),
|
||||
'g_icon' => trim( IPSText::safeslashes( $_POST['g_icon'] ) ),
|
||||
'g_attach_max' => ( $this->request['g_attach_max'] == '' ) ? 0 : $this->request['g_attach_max'],
|
||||
'g_attach_max' => ( $this->request['g_attach_max'] == '' ) ? 0 : intval($this->request['g_attach_max']),
|
||||
'g_max_messages' => intval($this->request['g_max_messages']),
|
||||
'g_max_mass_pm' => intval($this->request['g_max_mass_pm']),
|
||||
'g_pm_flood_mins' => intval($this->request['g_pm_flood_mins']),
|
||||
@@ -848,6 +893,7 @@ class admin_members_groups_groups extends ipsCommand
|
||||
// And output to form
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}&{$this->form_code}", $this->lang->words['menu__manage_groups'] );
|
||||
$this->registry->output->html .= $this->html->groupsForm( $type, $group, $perm_masks, $blocks, $firstTab );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user