diff --git a/web/includes/actions/eventdetail.php b/web/includes/actions/eventdetail.php index 20bd084ee..d0a05829c 100644 --- a/web/includes/actions/eventdetail.php +++ b/web/includes/actions/eventdetail.php @@ -41,7 +41,6 @@ if ( $action == 'eventdetail' ) { ); } $dbConn->commit(); - $refreshParent = true; - $closePopup = true; + $redirect = $_SERVER['HTTP_REFERER']; } ?> diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index cb9809052..2a81214b2 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -1021,7 +1021,7 @@ function getEventDetailHTML($eid='', $eids='') { $inputs = ''; $disabled = 'disabled="disabled"'; $null = ''; - + if ( !canEdit('Events') ) return; // We have to manually insert the csrf key into the form when using a modal generated via ajax call @@ -1031,22 +1031,23 @@ function getEventDetailHTML($eid='', $eids='') { $csrf_input = ''; } - if ( isset($eid) ){ // Single Event Mode - $title = translate('Event').' '.$eid.PHP_EOL; - $inputs .= ''.PHP_EOL; + if ( $eid ){ // Single Event Mode $eid = validInt($eid); + $title = translate('Event').' '.$eid.PHP_EOL; + $inputs .= ''.PHP_EOL; $newEvent = dbFetchOne('SELECT E.* FROM Events AS E WHERE E.Id = ?', NULL, array($eid)); - } elseif ( isset($eids) ) { // Multi Event Mode + } elseif ( $eids ) { // Multi Event Mode $title = translate('Events'); $sql = 'SELECT E.* FROM Events AS E WHERE '; $sqlWhere = array(); $sqlValues = array(); foreach ( $eids as $eid ) { - $inputs .= ''.PHP_EOL; + $eid = validInt($eid); + $inputs .= ''.PHP_EOL; $sqlWhere[] = 'E.Id = ?'; - $sqlValues[] = validInt($eid); + $sqlValues[] = $eid; } unset($eid); $sql .= join(' OR ', $sqlWhere); @@ -1064,8 +1065,8 @@ function getEventDetailHTML($eid='', $eids='') { } else { // Event Mode not specified - should we really proceed if neither eid nor eids is set? $title = translate('Events'); } - - $result .= '