diff --git a/web/includes/actions/eventdetail.php b/web/includes/actions/eventdetail.php new file mode 100644 index 000000000..c0507776f --- /dev/null +++ b/web/includes/actions/eventdetail.php @@ -0,0 +1,47 @@ +beginTransaction(); + foreach ( getAffectedIds('markEid') as $markEid ) { + dbQuery('UPDATE Events SET Cause=?, Notes=? WHERE Id=?', + array( + $_REQUEST['newEvent']['Cause'], + $_REQUEST['newEvent']['Notes'], + $markEid + ) + ); + } + $dbConn->commit(); + $refreshParent = true; + $closePopup = true; +} +?> diff --git a/web/includes/actions/events.php b/web/includes/actions/events.php index dff69d738..10642f329 100644 --- a/web/includes/actions/events.php +++ b/web/includes/actions/events.php @@ -29,21 +29,7 @@ if ( !canEdit('Events') ) { return; } // end if ! canEdit(Events) -if ( $action == 'eventdetail' ) { - $dbConn->beginTransaction(); - foreach ( getAffectedIds('markEid') as $markEid ) { - dbQuery('UPDATE Events SET Cause=?, Notes=? WHERE Id=?', - array( - $_REQUEST['newEvent']['Cause'], - $_REQUEST['newEvent']['Notes'], - $markEid - ) - ); - } - $dbConn->commit(); - $refreshParent = true; - $closePopup = true; -} else if ( $action == 'archive' ) { +if ( $action == 'archive' ) { $dbConn->beginTransaction(); foreach( getAffectedIds('markEid') as $markEid ) { dbQuery('UPDATE Events SET Archived=? WHERE Id=?', array(1, $markEid));