spaces, quotes extra braces

This commit is contained in:
Isaac Connor 2019-09-25 10:13:32 -04:00
parent 80710e6551
commit afd10e49d6
1 changed files with 189 additions and 191 deletions

View File

@ -196,7 +196,7 @@ function collectData() {
ajaxError('Unrecognised action or insufficient permissions');
if ( !empty($entitySpec['func']) ) {
$data = eval( 'return( '.$entitySpec['func']." );" );
$data = eval('return('.$entitySpec['func'].');');
} else {
$data = array();
$postFuncs = array();
@ -249,10 +249,10 @@ function collectData() {
$groupSql[] = $elementData['group'];
}
}
}
} # end foreach element
if ( count($fieldSql) ) {
$sql = 'select '.join( ', ', $fieldSql ).' from '.$entitySpec['table'];
$sql = 'SELECT '.join(', ', $fieldSql).' FROM '.$entitySpec['table'];
if ( $joinSql )
$sql .= ' '.join(' ', array_unique($joinSql));
if ( $id && !empty($entitySpec['selector']) ) {
@ -335,8 +335,7 @@ if ( !isset($_REQUEST['layout']) ) {
switch( $_REQUEST['layout'] ) {
case 'xml NOT CURRENTLY SUPPORTED' :
{
header("Content-type: application/xml" );
header('Content-type: application/xml');
echo('<?xml version="1.0" encoding="iso-8859-1"?>'."\n");
echo '<'.strtolower($_REQUEST['entity']).">\n";
foreach ( $data as $key=>$value ) {
@ -345,7 +344,6 @@ switch( $_REQUEST['layout'] ) {
}
echo '</'.strtolower($_REQUEST['entity']).">\n";
break;
}
case 'json' :
{
$response = array( strtolower(validJsStr($_REQUEST['entity'])) => $data );
@ -355,11 +353,11 @@ switch( $_REQUEST['layout'] ) {
break;
}
case 'text' :
{
header('Content-type: text/plain' );
echo join( ' ', array_values( $data ) );
break;
}
default:
ZM\Error('Unsupported layout: '. $_REQUEST['layout']);
}
function getFrameImage() {