Commit 215f172d authored by François Jacquet's avatar François Jacquet
Browse files

Add space between negation and variable: ! $var

parent 01352479
......@@ -4,7 +4,7 @@ function MailingLabel($address_id)
{ global $THIS_RET,$_ROSARIO;
$student_id = $THIS_RET['STUDENT_ID'];
if ( $address_id && !$_ROSARIO['MailingLabel'][ $address_id ][ $student_id ])
if ( $address_id && ! $_ROSARIO['MailingLabel'][ $address_id ][ $student_id ])
{
$people_RET = DBGet(DBQuery("SELECT p.FIRST_NAME,p.MIDDLE_NAME,p.LAST_NAME,
coalesce(a.MAIL_ADDRESS,a.ADDRESS) AS ADDRESS,coalesce(a.MAIL_CITY,a.CITY) AS CITY,coalesce(a.MAIL_STATE,a.STATE) AS STATE,coalesce(a.MAIL_ZIPCODE,a.ZIPCODE) AS ZIPCODE
......
......@@ -16,7 +16,7 @@ function PortalPollsVote($poll_id, $votes_array)
WHERE PORTAL_POLL_ID='".$poll_id."'
ORDER BY ID"));
if ( !$poll_RET || !$poll_questions_RET)
if ( ! $poll_RET || ! $poll_questions_RET)
return ErrorMessage(array('Poll does not exist'));//should never be displayed, so do not translate
//add user to excluded users list (format = '|[profile_id]:[user_id]')
......@@ -117,7 +117,7 @@ function PortalPollsDisplay($value,$name)
WHERE PORTAL_POLL_ID='".$poll_id."'
ORDER BY ID"), array('OPTIONS' => 'Linkify'));
if ( !$poll_RET || !$poll_questions_RET)
if ( ! $poll_RET || ! $poll_questions_RET)
return ErrorMessage(array('Poll does not exist'));//should never be displayed, so do not translate
//verify if user is in excluded users list (format = '|[profile_id]:[user_id]')
......@@ -208,7 +208,7 @@ function PortalPollForm($poll_id, $profile_id, $user_id, $poll_questions_RET)
function PortalPollsVotesDisplay($poll_id, $display_votes, $poll_questions_RET, $votes_number, $js_included_is_voting = false)
{
if ( !$display_votes)
if ( ! $display_votes)
{
$poll_completed_str = isset($_POST['poll_completed_string']) ? $_POST['poll_completed_string'] : _('Poll completed');
......@@ -216,7 +216,7 @@ function PortalPollsVotesDisplay($poll_id, $display_votes, $poll_questions_RET,
}
//FJ responsive rt td too large
if ( !$js_included_is_voting)
if ( ! $js_included_is_voting)
{
$votes_display .= '<div id="divPortalPoll'.$poll_id.'" class="divPortalPoll rt2colorBox">'."\n";
}
......@@ -254,7 +254,7 @@ function PortalPollsVotesDisplay($poll_id, $display_votes, $poll_questions_RET,
$votes_display .= '<p>'.$total_votes_str.': '.$votes_number.'</p>';
if ( !$js_included_is_voting)
if ( ! $js_included_is_voting)
$votes_display .= '</div>';
return $votes_display;
......
......@@ -44,7 +44,7 @@ function SendEmail($to, $subject, $message, $from = null, $cc = null)
FILTER_SANITIZE_EMAIL
));
if ( !$programname )
if ( ! $programname )
$programname = 'rosariosis';
$from = $programname . '@' . $sitename;
......
......@@ -37,7 +37,7 @@ function _makeTextInput( $column, $name, $request )
{
$div = true;
$req = $field['REQUIRED'] === 'Y' && !$value[ $column ] ?
$req = $field['REQUIRED'] === 'Y' && ! $value[ $column ] ?
array( '<span class="legend-red">', '</span>' ) :
array( '', '' );
}
......@@ -94,7 +94,7 @@ function _makeDateInput( $column, $name, $request )
{
$div = true;
$req = $field['REQUIRED'] === 'Y' && !$value[ $column ] ?
$req = $field['REQUIRED'] === 'Y' && ! $value[ $column ] ?
array( '<span class="legend-red">', '</span>' ) :
array( '', '' );
}
......@@ -146,7 +146,7 @@ function _makeSelectInput( $column, $name, $request )
{
$div = true;
$req = $field['REQUIRED'] === 'Y' && !$value[ $column ] ?
$req = $field['REQUIRED'] === 'Y' && ! $value[ $column ] ?
array( '<span class="legend-red">', '</span>' ) :
array( '', '' );
}
......@@ -222,7 +222,7 @@ function _makeAutoSelectInput( $column, $name, $request )
{
$div = true;
$req = $field['REQUIRED'] === 'Y' && ( !$value[ $column ] || $value[ $column ] === '---' ) ?
$req = $field['REQUIRED'] === 'Y' && ( ! $value[ $column ] || $value[ $column ] === '---' ) ?
array( '<span class="legend-red">', '</span>' ) :
array( '', '' );
}
......@@ -293,7 +293,7 @@ function _makeAutoSelectInput( $column, $name, $request )
foreach ( (array) $options_RET as $option )
{
if ( $option['CUSTOM_' . $field['ID']] != ''
&& !$options[$option['CUSTOM_' . $field['ID']]] )
&& ! $options[$option['CUSTOM_' . $field['ID']]] )
{
$options[$option['CUSTOM_' . $field['ID']]] = array(
$option['CUSTOM_' . $field['ID']],
......@@ -304,7 +304,7 @@ function _makeAutoSelectInput( $column, $name, $request )
}
// make sure the current value is in the list
if ( !$value[ $column ]
if ( ! $value[ $column ]
&& !isset( $options[$value[ $column ]] ) )
{
$options[$value[ $column ]] = array(
......@@ -560,7 +560,7 @@ function _makeType( $value, $column )
{
global $THIS_RET;
if ( !$THIS_RET['ID'] )
if ( ! $THIS_RET['ID'] )
$THIS_RET['ID'] = 'new';
return SelectInput(
......@@ -588,7 +588,7 @@ function _makeDate( $value, $column = 'MEDICAL_DATE' )
global $THIS_RET,
$table;
if ( !$THIS_RET['ID'] )
if ( ! $THIS_RET['ID'] )
$THIS_RET['ID'] = 'new';
return DateInput(
......@@ -614,7 +614,7 @@ function _makeComments( $value, $column )
global $THIS_RET,
$table;
if ( !$THIS_RET['ID'] )
if ( ! $THIS_RET['ID'] )
$THIS_RET['ID'] = 'new';
return TextInput(
......@@ -657,7 +657,7 @@ function _makeStartInput( $value, $column )
$default = $default[1]['START_DATE'];
if ( !$default ||
if ( ! $default ||
strtotime( DBDate() ) > strtotime( $default ) )
{
$default = DBDate();
......@@ -672,7 +672,7 @@ function _makeStartInput( $value, $column )
$id = 'new';
}
if ( !$add_codes )
if ( ! $add_codes )
{
$options_RET = DBGet( DBQuery( "SELECT ID,TITLE AS TITLE
FROM STUDENT_ENROLLMENT_CODES
......@@ -733,7 +733,7 @@ function _makeEndInput( $value, $column )
else
$id = 'new';
if ( !$drop_codes )
if ( ! $drop_codes )
{
$options_RET = DBGet( DBQuery( "SELECT ID,TITLE AS TITLE
FROM STUDENT_ENROLLMENT_CODES
......
......@@ -83,7 +83,7 @@ function _update29alpha()
* And ADD it again with course_period_school_periods_id
*/
$SQL_dups = "";
if ( !$SQL_dups_RET )
if ( ! $SQL_dups_RET )
$return = false;
$SQL_add_ID = "ALTER TABLE ONLY course_period_school_periods
DROP CONSTRAINT course_period_school_periods_pkey;
......
......@@ -30,13 +30,13 @@ function _makeLetterGrade( $percent, $course_period_id = 0, $staff_id = 0, $ret
global $programconfig,
$_ROSARIO;
if ( !$course_period_id )
if ( ! $course_period_id )
$course_period_id = UserCoursePeriod();
if ( !$staff_id )
if ( ! $staff_id )
$staff_id = User( 'STAFF_ID' );
if ( !$programconfig[ $staff_id ] )
if ( ! $programconfig[ $staff_id ] )
{
$config_RET = DBGet( DBQuery( "SELECT TITLE,VALUE
FROM PROGRAM_USER_CONFIG
......@@ -51,7 +51,7 @@ function _makeLetterGrade( $percent, $course_period_id = 0, $staff_id = 0, $ret
}
// Save courses in $_ROSARIO['_makeLetterGrade']['courses'] global var
if ( !$_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ])
if ( ! $_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ])
$_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ] = DBGet( DBQuery( "SELECT DOES_BREAKOFF,GRADE_SCALE_ID
FROM COURSE_PERIODS
WHERE COURSE_PERIOD_ID='" . $course_period_id . "'" ) );
......@@ -82,7 +82,7 @@ function _makeLetterGrade( $percent, $course_period_id = 0, $staff_id = 0, $ret
return $percent;
// Save grades in $_ROSARIO['_makeLetterGrade']['grades'] global var
if ( !$_ROSARIO['_makeLetterGrade']['grades'][ $grade_scale_id ] )
if ( ! $_ROSARIO['_makeLetterGrade']['grades'][ $grade_scale_id ] )
$_ROSARIO['_makeLetterGrade']['grades'][ $grade_scale_id ] = DBGet( DBQuery( "SELECT TITLE,ID,BREAK_OFF,COMMENT
FROM REPORT_CARD_GRADES
WHERE SYEAR='" . UserSyear() . "'
......
......@@ -2,13 +2,13 @@
function _makePercentGrade($grade_id,$course_period_id=0,$staff_id=0)
{ global $programconfig,$_ROSARIO;
if ( !$course_period_id)
if ( ! $course_period_id)
$course_period_id = UserCoursePeriod();
if ( !$staff_id)
if ( ! $staff_id)
$staff_id = User('STAFF_ID');
if ( !$programconfig[ $staff_id ])
if ( ! $programconfig[ $staff_id ])
{
$config_RET = DBGet(DBQuery("SELECT TITLE,VALUE FROM PROGRAM_USER_CONFIG WHERE USER_ID='".$staff_id."' AND PROGRAM='Gradebook'"),array(),array('TITLE'));
if (count($config_RET))
......@@ -17,12 +17,12 @@ function _makePercentGrade($grade_id,$course_period_id=0,$staff_id=0)
else
$programconfig[ $staff_id ] = true;
}
if ( !$_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ])
if ( ! $_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ])
$_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ] = DBGet(DBQuery("SELECT DOES_BREAKOFF,GRADE_SCALE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='".$course_period_id."'"));
$does_breakoff = $_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ][1]['DOES_BREAKOFF'];
$grade_scale_id = $_ROSARIO['_makeLetterGrade']['courses'][ $course_period_id ][1]['GRADE_SCALE_ID'];
if ( !$_ROSARIO['_makeLetterGrade']['grades'][ $grade_scale_id ])
if ( ! $_ROSARIO['_makeLetterGrade']['grades'][ $grade_scale_id ])
$_ROSARIO['_makeLetterGrade']['grades'][ $grade_scale_id ] = DBGet(DBQuery("SELECT TITLE,ID,BREAK_OFF FROM REPORT_CARD_GRADES WHERE SYEAR='".UserSyear()."' AND SCHOOL_ID='".UserSchool()."' AND GRADE_SCALE_ID='".$grade_scale_id."' ORDER BY BREAK_OFF IS NOT NULL DESC,BREAK_OFF DESC,SORT_ORDER"));
//$grades = array('A+','A','A-','B+','B','B-','C+','C','C-','D+','D','D-','F');
......
......@@ -21,7 +21,7 @@ function _makeNextSchool($value,$column)
function _makeCalendar($value,$column)
{ global $calendars_RET;
if ( !$calendars_RET)
if ( ! $calendars_RET)
$calendars_RET = DBGet(DBQuery("SELECT CALENDAR_ID,DEFAULT_CALENDAR,TITLE FROM ATTENDANCE_CALENDARS WHERE SYEAR='".UserSyear()."'"),array(),array('CALENDAR_ID'));
return $calendars_RET[ $value ][1]['TITLE'];
......
......@@ -25,11 +25,11 @@ function AllowEdit( $modname = false )
if ( User( 'PROFILE' ) === 'admin' )
{
if ( !$modname
if ( ! $modname
&& isset( $_ROSARIO['allow_edit'] ) )
return $_ROSARIO['allow_edit'];
if ( !$modname )
if ( ! $modname )
$modname = $_REQUEST['modname'];
// Student / User Info tabs
......@@ -74,7 +74,7 @@ function AllowUse( $modname = false )
{
global $_ROSARIO;
if ( !$modname )
if ( ! $modname )
$modname = $_REQUEST['modname'];
// Student / User Info tabs
......
......@@ -88,7 +88,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
$field_title = $fields[ $field_id ][1]['TITLE'];
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= '<b>' . $field_title . ': </b>';
switch ( $fields[ $field_id ][1]['TYPE'] )
......@@ -101,7 +101,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND s." . $field_name . "='" . $value . "' ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= _( 'Yes' );
}
// No
......@@ -109,7 +109,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND (s." . $field_name . "!='Y' OR s." . $field_name . " IS NULL) ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= _( 'No' );
}
......@@ -125,14 +125,14 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND (s." . $field_name . "='' OR s." . $field_name . " IS NULL) ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= _( 'No Value' );
}
else
{
$return .= " AND s." . $field_name . "='" . $value . "' ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
{
$select_options = explode( '<br />', nl2br( $fields[ $field_id ][1]['SELECT_OPTIONS'] ) );
......@@ -175,7 +175,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND (s." . $field_name . "='' OR s." . $field_name . " IS NULL) ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= _( 'No Value' );
}
// Other Value (Edit Pull-Down only)
......@@ -187,14 +187,14 @@ function CustomFields( $location, $type = 'student', $extra = array() )
FROM " . ( $type == 'staff' ? 'STAFF' : 'CUSTOM' ) . "_FIELDS
WHERE ID='" . $field_id . "')||'\r')=0 ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= _( 'Other Value' );
}
else
{
$return .= " AND s." . $field_name . "='" . $value . "' ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= $value;
}
......@@ -210,7 +210,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND (s." . $field_name . "='' OR s." . $field_name . " IS NULL) ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= _( 'No Value' );
}
// matches "searched expression"
......@@ -219,7 +219,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND s." . $field_name . "='" . mb_substr( $value, 1, -1 ) . "' ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= mb_substr( $value, 1, -1 );
}
// starts with
......@@ -227,7 +227,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND LOWER(s." . $field_name . ") LIKE '" . mb_strtolower( $value ) . "%' ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= _('starts with') . ' ' .
str_replace( "''", "'", $value );
}
......@@ -235,7 +235,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
break;
}
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= '<br />';
}
......@@ -253,7 +253,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND s." . $field_name . " >= '" . $value . "' ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
{
$_ROSARIO['SearchTerms'] .= '<b>' . $field_title . ': </b>' .
'<span class="sizep2">&ge;</span> ';
......@@ -282,7 +282,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
{
$return .= " AND s." . $field_name . " <= '" . $value . "' ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
{
$_ROSARIO['SearchTerms'] .= '<b>' . $field_title . ': </b>' .
'<span class="sizep2">&le;</span> ';
......@@ -306,7 +306,7 @@ function CustomFields( $location, $type = 'student', $extra = array() )
$return .= " AND s." . $field_name . " IS NULL ";
if ( !$extra['NoSearchTerms'] )
if ( ! $extra['NoSearchTerms'] )
$_ROSARIO['SearchTerms'] .= '<b>' . $field_title . ': </b>' .
_( 'No Value' ) . '<br />';
}
......
......@@ -10,7 +10,7 @@
* Pass in an array with error messages and this will display them
* in a standard fashion.
* In a program you may have:
* @example if ( !$sch ) $error[] = _( 'School not provided.' );
* @example if ( ! $sch ) $error[] = _( 'School not provided.' );
* @example if ( $count === 0 ) $error[] = _( 'Number of students is zero.' ); ErrorMessage( $error );
*
* Why use this? It will tell the user if they have multiple errors
......
......@@ -63,7 +63,7 @@ function GetAllMP( $mp, $marking_period_id = '0' )
$mp = 'FY';
}
elseif ( !$mp )
elseif ( ! $mp )
{
$mp = GetMP( $marking_period_id, 'MP' );
}
......@@ -107,7 +107,7 @@ function GetAllMP( $mp, $marking_period_id = '0' )
$qtr_RET = DBGet( DBQuery( $qtr_SQL ), array(), array( 'PARENT_ID' ) );
//FJ error if no quarters
if ( !$qtr_RET )
if ( ! $qtr_RET )
return ErrorMessage( $error_no_qtr, 'fatal' );
switch ( $mp )
......
......@@ -53,7 +53,7 @@ function GetStaffList(& $extra)
}
else
{
if ( !$extra['columns_after'])
if ( ! $extra['columns_after'])
$extra['columns_after'] = array();
if ( $extra['staff_fields']['view'])
......@@ -127,7 +127,7 @@ function appendStaffSQL($sql,$extra)
//$sql .= " AND s.STAFF_ID='".$_REQUEST['usrid']."'";
$sql .= " AND s.STAFF_ID IN (".$usrids.")";
if ( !$extra['NoSearchTerms'])
if ( ! $extra['NoSearchTerms'])
$_ROSARIO['SearchTerms'] .= '<b>'._('User ID').': </b>'.$usrids.'<br />';
}
}
......@@ -136,7 +136,7 @@ function appendStaffSQL($sql,$extra)
{
$sql .= " AND UPPER(s.LAST_NAME) LIKE '".mb_strtoupper($_REQUEST['last'])."%'";
if ( !$extra['NoSearchTerms'])
if ( ! $extra['NoSearchTerms'])
$_ROSARIO['SearchTerms'] .= '<b>'._('Last Name starts with').': </b>'.str_replace("''", "'", $_REQUEST['last']).'<br />';
}
......@@ -144,7 +144,7 @@ function appendStaffSQL($sql,$extra)
{
$sql .= " AND UPPER(s.FIRST_NAME) LIKE '".mb_strtoupper($_REQUEST['first'])."%'";
if ( !$extra['NoSearchTerms'])
if ( ! $extra['NoSearchTerms'])
$_ROSARIO['SearchTerms'] .= '<b>'._('First Name starts with').': </b>'.str_replace("''", "'", $_REQUEST['first']).'<br />';
}
......@@ -152,7 +152,7 @@ function appendStaffSQL($sql,$extra)
{
$sql .= " AND s.PROFILE='".$_REQUEST['profile']."'";
if ( !$extra['NoSearchTerms'])
if ( ! $extra['NoSearchTerms'])
$_ROSARIO['SearchTerms'] .= '<b>'._('Profile').': </b>'._(UCFirst($_REQUEST['profile'])).'<br />';
}
......@@ -160,7 +160,7 @@ function appendStaffSQL($sql,$extra)
{
$sql .= " AND UPPER(s.USERNAME) LIKE '".mb_strtoupper($_REQUEST['username'])."%'";
if ( !$extra['NoSearchTerms'])
if ( ! $extra['NoSearchTerms'])
$_ROSARIO['SearchTerms'] .= '<b>'._('UserName starts with').': </b>'.str_replace("''", "'", $_REQUEST['username']).'<br />';
}
......
......@@ -67,11 +67,11 @@ function GetStuList( &$extra = array() )
$extra['DATE'] = DBDate();
}
elseif ( !$extra['MP'] )
elseif ( ! $extra['MP'] )
{
$extra['MP'] = GetCurrentMP( 'QTR', $extra['DATE'], false );
}
elseif ( !$extra['DATE'] )
elseif ( ! $extra['DATE'] )
{
$extra['DATE'] = DBDate();
}
......@@ -80,7 +80,7 @@ function GetStuList( &$extra = array() )
if ( isset( $_REQUEST['expanded_view'] )
&& $_REQUEST['expanded_view'] == 'true' )
{
if ( !$extra['columns_after'] )
if ( ! $extra['columns_after'] )
{
$extra['columns_after'] = array();
}
......@@ -111,8 +111,8 @@ function GetStuList( &$extra = array() )
AND TITLE IN ('CONTACT_INFO','HOME_PHONE','GUARDIANS','ALL_CONTACTS')
AND USER_ID='" . User( 'STAFF_ID' ) . "'"), array(), array( 'TITLE' ) );
if ( !$view_fields_RET
&& !$view_address_RET
if ( ! $view_fields_RET
&& ! $view_address_RET
&& !isset( $view_other_RET['CONTACT_INFO'] ) )
{
$extra['columns_after'] = array(
......@@ -425,7 +425,7 @@ function GetStuList( &$extra = array() )
&& $_REQUEST['_search_all_schools'] == 'Y';
// Normal SELECT
if ( !$is_select_only )
if ( ! $is_select_only )
{
// Search All Schools
......@@ -484,7 +484,7 @@ function GetStuList( &$extra = array() )
}
if ( UserSchool()
&& !$is_search_all_schools )
&& ! $is_search_all_schools )
{
$sql .= " AND ssm.SCHOOL_ID='" . UserSchool() . "'";
}
......@@ -506,7 +506,7 @@ function GetStuList( &$extra = array() )
//$sql = 'SELECT '.$distinct;
// Normal SELECT
if ( !$is_select_only )
if ( ! $is_select_only )
{
// Include Inactive Students
if ( $is_include_inactive )
......@@ -592,7 +592,7 @@ function GetStuList( &$extra = array() )
case 'student':
// Normal SELECT
if ( !$is_select_only )
if ( ! $is_select_only )
{
// Student Full Name
$sql .= "s.LAST_NAME||', '||s.FIRST_NAME||' '||coalesce(s.MIDDLE_NAME,' ') AS FULL_NAME,";
......@@ -830,7 +830,7 @@ function makeParents( $student_id, $column )
AND sjp.ADDRESS_ID='" . $THIS_RET['ADDRESS_ID'] . "'" . $constraint .
" ORDER BY sjp.CUSTODY,sjp.STUDENT_RELATION,p.LAST_NAME,p.FIRST_NAME" ) );
if ( !$people_RET )
if ( ! $people_RET )
{
return '';
}
......@@ -914,7 +914,7 @@ function appendSQL( $sql, $extra = array() )
//$sql .= " AND ssm.STUDENT_ID IN '".$_REQUEST['stuid']."'";
$sql .= " AND ssm.STUDENT_ID IN (" . $stuids . ")";
if ( !$no_search_terms )
if ( ! $no_search_terms )
{
$_ROSARIO['SearchTerms'] .= '<b>' . sprintf( _( '%s ID' ), Config( 'NAME' ) ) .
': </b>' . $stuids . '<br />';
......@@ -928,7 +928,7 @@ function appendSQL( $sql, $extra = array() )
{
$sql .= " AND LOWER(s.LAST_NAME) LIKE '" . mb_strtolower( $_REQUEST['last'] ) . "%'";
if ( !$no_search_terms )
if ( ! $no_search_terms )
{
$_ROSARIO['SearchTerms'] .= '<b>' . _( 'Last Name starts with' ) . ': </b>' .
str_replace( "''", "'", $_REQUEST['last'] ) . '<br />';
......@@ -941,7 +941,7 @@ function appendSQL( $sql, $extra = array() )