mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Don't display userclass batch options unless userclasses have been defined.
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* Administration Area - User classes
|
* Administration Area - User classes
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $
|
||||||
* $Revision: 1.34 $
|
* $Revision: 1.35 $
|
||||||
* $Date: 2009-11-18 01:04:26 $
|
* $Date: 2009-11-23 01:17:29 $
|
||||||
* $Author: e107coders $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -330,7 +330,8 @@ class uclassFrm extends e_form
|
|||||||
|
|
||||||
if(!e_QUERY || $action == 'list')
|
if(!e_QUERY || $action == 'list')
|
||||||
{
|
{
|
||||||
$ns->tablerender(UCSLAN_21, $emessage->render(). $uc->show_existing());
|
$uc->show_existing();
|
||||||
|
|
||||||
}
|
}
|
||||||
if(varset($_GET['id']) && varset($_GET['action'])=='edit')
|
if(varset($_GET['id']) && varset($_GET['action'])=='edit')
|
||||||
{
|
{
|
||||||
@@ -891,10 +892,15 @@ class uclass_manager
|
|||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$frm = new uclassFrm;
|
$frm = new uclassFrm;
|
||||||
|
$ns = e107::getRender();
|
||||||
|
|
||||||
|
|
||||||
if (!$total = $sql->db_Select('userclass_classes', '*'))
|
if (!$total = $sql->db_Select('userclass_classes', '*'))
|
||||||
{
|
{
|
||||||
$text .= UCSLAN_7;
|
$text = "";
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
$mes->add(UCSLAN_7, E_MESSAGE_INFO);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -912,11 +918,11 @@ class uclass_manager
|
|||||||
{
|
{
|
||||||
$text .= $frm->renderTableRow($this->fields, $this->fieldpref, $row, 'userclass_id');
|
$text .= $frm->renderTableRow($this->fields, $this->fieldpref, $row, 'userclass_id');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$text .= "</tbody></table></fieldset></form>";
|
$text .= "</tbody></table></fieldset></form>";
|
||||||
|
}
|
||||||
|
|
||||||
return $text;
|
$ns->tablerender(UCSLAN_21, $mes->render().$text );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
* Administration Area - Users
|
* Administration Area - Users
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
|
||||||
* $Revision: 1.70 $
|
* $Revision: 1.71 $
|
||||||
* $Date: 2009-11-22 14:10:06 $
|
* $Date: 2009-11-23 01:17:29 $
|
||||||
* $Author: e107coders $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -1045,7 +1045,7 @@ class users
|
|||||||
{
|
{
|
||||||
$uqry[e_UC_ADMIN] = " u.user_admin = 1 ";
|
$uqry[e_UC_ADMIN] = " u.user_admin = 1 ";
|
||||||
$uqry[e_UC_MEMBER] = " u.user_ban = '0' ";
|
$uqry[e_UC_MEMBER] = " u.user_ban = '0' ";
|
||||||
$uqry[e_UC_MAINADMIN] = " u.user_perms = '0' ";
|
$uqry[e_UC_MAINADMIN] = " (u.user_perms = '0' OR u.user_perms = '0.') ";
|
||||||
$uqry['unverified'] = " u.user_ban = 2 ";
|
$uqry['unverified'] = " u.user_ban = 2 ";
|
||||||
$uqry['banned'] = " u.user_ban = 1 ";
|
$uqry['banned'] = " u.user_ban = 1 ";
|
||||||
$uqry['bounced'] = " u.user_ban = 3 ";
|
$uqry['bounced'] = " u.user_ban = 3 ";
|
||||||
@@ -1249,17 +1249,29 @@ class users
|
|||||||
|
|
||||||
$removeClasses = $assignClasses; // Userclass list of userclasses that can be removed
|
$removeClasses = $assignClasses; // Userclass list of userclasses that can be removed
|
||||||
$removeClasses[0] = array('userclass_name'=>array('userclass_id'=>0, 'userclass_name'=>USRLAN_220));
|
$removeClasses[0] = array('userclass_name'=>array('userclass_id'=>0, 'userclass_name'=>USRLAN_220));
|
||||||
|
|
||||||
|
|
||||||
|
if(count($assignClasses))
|
||||||
|
{
|
||||||
|
$uclasses = array(
|
||||||
|
'userclass' =>array('Assign Userclass...',$assignClasses),
|
||||||
|
'remuserclass' =>array('Remove Userclass..', $removeClasses)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$uclasses = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $frm->batchoptions(
|
return $frm->batchoptions(
|
||||||
array(
|
array(
|
||||||
'ban_selected' =>USRLAN_30,
|
'ban_selected' =>USRLAN_30,
|
||||||
'unban_selected' =>USRLAN_33,
|
'unban_selected' =>USRLAN_33,
|
||||||
'activate_selected' =>USRLAN_32,
|
'activate_selected' =>USRLAN_32,
|
||||||
'delete_selected' =>LAN_DELETE
|
'delete_selected' =>LAN_DELETE
|
||||||
),
|
),$uclasses
|
||||||
array(
|
|
||||||
'userclass' =>array('Assign Userclass...',$assignClasses),
|
|
||||||
'remuserclass' =>array('Remove Userclass..', $removeClasses)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user