2011-07-20 Tomas Palacios <tomas.palacios@artica.es>
* godmode/groups/modu_group_list.php: Fixed a bug regarding adition of module groups with a blank "name" field. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4593 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
63ed1fa393
commit
be4313a8f1
|
@ -64,14 +64,19 @@ if ($create_group) {
|
||||||
$id_parent = (int) get_parameter ('id_parent');
|
$id_parent = (int) get_parameter ('id_parent');
|
||||||
$alerts_disabled = (bool) get_parameter ('alerts_disabled');
|
$alerts_disabled = (bool) get_parameter ('alerts_disabled');
|
||||||
$custom_id = (string) get_parameter ('custom_id');
|
$custom_id = (string) get_parameter ('custom_id');
|
||||||
|
|
||||||
|
if ($name){
|
||||||
|
$result = db_process_sql_insert('tmodule_group', array('name' => $name));
|
||||||
|
|
||||||
$result = db_process_sql_insert('tmodule_group', array('name' => $name));
|
if ($result) {
|
||||||
|
echo "<h3 class='suc'>".__('Group successfully created')."</h3>";
|
||||||
if ($result) {
|
}
|
||||||
echo "<h3 class='suc'>".__('Group successfully created')."</h3>";
|
else {
|
||||||
|
echo "<h3 class='error'>".__('There was a problem creating group')."</h3>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<h3 class='error'>".__('There was a problem creating group')."</h3>";
|
echo "<h3 class='error'>".__('Module group must have a name')."</h3>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,12 +89,18 @@ if ($update_group) {
|
||||||
$alerts_enabled = (bool) get_parameter ('alerts_enabled');
|
$alerts_enabled = (bool) get_parameter ('alerts_enabled');
|
||||||
$custom_id = (string) get_parameter ('custom_id');
|
$custom_id = (string) get_parameter ('custom_id');
|
||||||
|
|
||||||
$result = db_process_sql_update('tmodule_group', array('name' => $name), array('id_mg' => $id_group));
|
if ($name) {
|
||||||
if ($result !== false) {
|
$result = db_process_sql_update('tmodule_group', array('name' => $name), array('id_mg' => $id_group));
|
||||||
echo "<h3 class='suc'>".__('Group successfully updated')."</h3>";
|
|
||||||
|
if ($result !== false) {
|
||||||
|
echo "<h3 class='suc'>".__('Group successfully updated')."</h3>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "<h3 class='error'>".__('There was a problem modifying group')."</h3>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<h3 class='error'>".__('There was a problem modifying group')."</h3>";
|
echo "<h3 class='error'>".__('Module group must have a name')."</h3>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue