2010-12-22 Miguel de Dios <miguel.dedios@artica.es>

* operation/events/events.php: fixed the show list of events when to delete
	the events.
	
	Fixes: #3141622
	
	* operation/events/events_list.php: cleaned source code style.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3684 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-12-22 13:37:15 +00:00
parent cabb7989bd
commit da97830f00
3 changed files with 28 additions and 13 deletions

View File

@ -1,3 +1,12 @@
2010-12-22 Miguel de Dios <miguel.dedios@artica.es>
* operation/events/events.php: fixed the show list of events when to delete
the events.
Fixes: #3141622
* operation/events/events_list.php: cleaned source code style.
2010-12-22 Ramon Novoa <rnovoa@artica.es>
* include/fgraph.php: Read the event_type when drawing module

View File

@ -271,21 +271,23 @@ if ($validate) {
if ($delete) {
$ids = (array) get_parameter ("eventid", -1);
if($ids[0] != -1){
if ($ids[0] != -1) {
$return = delete_event ($ids, ($group_rep == 1));
print_result_message ($return,
__('Successfully deleted'),
__('Could not be deleted'));
}
require_once('operation/events/events_list.php');
}
switch($section) {
case 'list':
require_once('operation/events/events_list.php');
break;
case 'validate':
require_once('operation/events/events_validate.php');
break;
else {
switch($section) {
case 'list':
require_once('operation/events/events_list.php');
break;
case 'validate':
require_once('operation/events/events_validate.php');
break;
}
}
require_jquery_file ('bgiframe');

View File

@ -64,11 +64,13 @@ else {
if ($ev_group > 0 && in_array ($ev_group, array_keys ($groups))) {
//If a group is selected and it's in the groups allowed
$sql_post = " AND id_grupo = $ev_group";
} else {
}
else {
if (is_user_admin ($config["id_user"])) {
//Do nothing if you're admin, you get full access
$sql_post = "";
} else {
}
else {
//Otherwise select all groups the user has rights to.
$sql_post = " AND id_grupo IN (".implode (",", array_keys ($groups)).")";
}
@ -380,7 +382,8 @@ foreach ($result as $event) {
$data[4] .= print_image ("images/ok.png", true,
array ("title" => __('Validate event')));
$data[4] .= '</a>&nbsp;';
}else {
}
else {
$data[4] .= print_image ("images/tick.png", true,
array ("title" => __('Event validated'))).'&nbsp;';
}
@ -391,7 +394,8 @@ foreach ($result as $event) {
$data[4] .= print_image ("images/cross.png", true,
array ("title" => __('Delete event')));
$data[4] .= '</a>&nbsp;';
}else {
}
else {
$data[4] .= print_image ("images/cross.disabled.png", true,
array ("title" => __('Is not allowed delete events in process'))).'&nbsp;';
}