spaces/quotes

pull/3038/head
Isaac Connor 2017-06-08 13:37:26 -04:00
parent 84fd80b242
commit 81c2216eb6
1 changed files with 102 additions and 101 deletions

View File

@ -1,18 +1,19 @@
<?php
if ( empty($_REQUEST['id']) && empty($_REQUEST['eids']) ) {
ajaxError( "No event id(s) supplied" );
ajaxError( 'No event id(s) supplied' );
}
if ( canView( 'Events' ) ) {
switch ( $_REQUEST['action'] ) {
case 'video' : {
case 'video' :
{
if ( empty($_REQUEST['videoFormat']) ) {
ajaxError( "Video Generation Failure, no format given" );
ajaxError( 'Video Generation Failure, no format given' );
} elseif ( empty($_REQUEST['rate']) ) {
ajaxError( "Video Generation Failure, no rate given" );
ajaxError( 'Video Generation Failure, no rate given' );
} elseif ( empty($_REQUEST['scale']) ) {
ajaxError( "Video Generation Failure, no scale given" );
ajaxError( 'Video Generation Failure, no scale given' );
} else {
$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'.monitorLimitSql();
if ( !($event = dbFetchOne( $sql, NULL, array( $_REQUEST['id'] ) )) )
@ -33,7 +34,7 @@ if ( canView( 'Events' ) ) {
ajaxResponse();
break;
}
case "export" :
case 'export' :
{
require_once( ZM_SKIN_PATH.'/includes/export_functions.php' );
@ -71,7 +72,7 @@ if ( canView( 'Events' ) ) {
if ( $exportFile = exportEvents( $exportIds, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat ) )
ajaxResponse( array( 'exportFile'=>$exportFile ) );
else
ajaxError( "Export Failed" );
ajaxError( 'Export Failed' );
break;
}
}
@ -97,7 +98,7 @@ if ( canEdit( 'Events' ) ) {
case 'archive' :
case 'unarchive' :
{
$archiveVal = ($_REQUEST['action'] == "archive")?1:0;
$archiveVal = ($_REQUEST['action'] == 'archive')?1:0;
dbQuery( 'UPDATE Events SET Archived = ? WHERE Id = ?', array( $archiveVal, $_REQUEST['id']) );
ajaxResponse( array( 'refreshEvent'=>true, 'refreshParent'=>false ) );
break;