Commit 621f5547 authored by François Jacquet's avatar François Jacquet
Browse files

Fix PHP notices, bis

Format PHP code
parent bc9683fa
......@@ -1492,11 +1492,11 @@ function CheckBoxOnclick( $name, $title = '' )
$onclick_URL = "'" . PreparePHP_SELF(
$_REQUEST,
array(),
$_REQUEST[ $name ] == 'Y' ? array( $name => '' ) : array( $name => 'Y' )
isset( $_REQUEST[ $name ] ) && $_REQUEST[ $name ] == 'Y' ? array( $name => '' ) : array( $name => 'Y' )
) . "'";
$input = '<input type="checkbox" name="' . $name . '" value="Y"' .
( $_REQUEST[ $name ] == 'Y' ? ' checked' : '' ) .
( isset( $_REQUEST[ $name ] ) && $_REQUEST[ $name ] == 'Y' ? ' checked' : '' ) .
' onclick="ajaxLink(' . $onclick_URL . ');" />';
if ( $title != '' )
......
......@@ -1003,7 +1003,8 @@ function Widgets( $item, &$myextra = null )
// Mailing Labels Widget.
case 'mailing_labels':
if ( $_REQUEST['mailing_labels'] == 'Y' )
if ( isset( $_REQUEST['mailing_labels'] )
&& $_REQUEST['mailing_labels'] === 'Y' )
{
require_once 'ProgramFunctions/MailingLabel.fnc.php';
......
......@@ -74,7 +74,7 @@ else
$_SESSION['FSA_menu_id'] = $_REQUEST['menu_id'];
}
if ( $_REQUEST['submit']['save']
if ( ! empty( $_REQUEST['submit']['save'] )
&& $_REQUEST['food_service']
&& $_POST['food_service']
&& AllowEdit() )
......@@ -236,13 +236,15 @@ if ( ! empty( $_REQUEST['submit']['print'] ) )
}
else
{
$description_select = '';
if ( AllowEdit() )
{
$description_RET = DBGet( "SELECT DISTINCT DESCRIPTION FROM CALENDAR_EVENTS WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' AND TITLE='" . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . "' AND DESCRIPTION IS NOT NULL ORDER BY DESCRIPTION" );
if ( ! empty( $description_RET ) )
{
$description_select = '<option value="">' . _( 'or select previous meal' ) . '</option>';
$description_select .= '<option value="">' . _( 'or select previous meal' ) . '</option>';
foreach ( (array) $description_RET as $description )
{
......
......@@ -394,7 +394,7 @@ function makeTextInput( $value, $name )
{
global $THIS_RET;
if ( $THIS_RET['MENU_ITEM_ID'] )
if ( ! empty( $THIS_RET['MENU_ITEM_ID'] ) )
{
$id = $THIS_RET['MENU_ITEM_ID'];
}
......@@ -434,7 +434,7 @@ function makeSelectInput( $value, $name )
{
global $THIS_RET, $items_select, $categories_select, $icons_select;
if ( $THIS_RET['MENU_ITEM_ID'] )
if ( ! empty( $THIS_RET['MENU_ITEM_ID'] ) )
{
$id = $THIS_RET['MENU_ITEM_ID'];
}
......
......@@ -69,12 +69,16 @@ $type_select = '<label>' . _( 'Type' ) . ': <select name=type_select><option val
foreach ( (array) $types as $short_name => $type )
{
$type_select .= '<option value="' . $short_name . '"' . ( $_REQUEST['type_select'] == $short_name ? ' selected' : '' ) . '>' . $type . '</option>';
$type_select .= '<option value="' . $short_name . '"' .
( isset( $_REQUEST['type_select'] ) && $_REQUEST['type_select'] == $short_name ? ' selected' : '' ) . '>' .
$type . '</option>';
}
foreach ( (array) $menus_RET as $menu )
{
$type_select .= '<option value="' . $menu['TITLE'] . '"' . ( $_REQUEST['type_select'] == $menu['TITLE'] ? ' selected' : '' ) . '>' . $menu['TITLE'] . '</option>';
$type_select .= '<option value="' . $menu['TITLE'] . '"' .
( isset( $_REQUEST['type_select'] ) && $_REQUEST['type_select'] == $menu['TITLE'] ? ' selected' : '' ) . '>' .
$menu['TITLE'] . '</option>';
}
$type_select .= '</select></label>';
......
......@@ -131,7 +131,7 @@ if ( UserStudentID() && ! $_REQUEST['modfunc'] )
WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "'
AND s.STUDENT_ID=fssa.STUDENT_ID
AND s.STUDENT_ID!='" . UserStudentID() . "'" .
( $_REQUEST['include_inactive'] ? '' :
( ! empty( $_REQUEST['include_inactive'] ) ? '' :
" AND exists(SELECT ''
FROM STUDENT_ENROLLMENT
WHERE STUDENT_ID=s.STUDENT_ID
......
......@@ -42,6 +42,8 @@ if ( UserStudentID() && ! $_REQUEST['modfunc'] )
AND SYEAR='" . UserSyear() . "'
AND (START_DATE<=CURRENT_DATE AND (END_DATE IS NULL OR CURRENT_DATE<=END_DATE)))" );
$student_select = '';
if ( ! empty( $xstudents ) )
{
$student_select = _( 'Student' ) . ' <select name="student_select"><option value="">' . _( 'Not Specified' ) . '</option>';
......@@ -56,25 +58,43 @@ if ( UserStudentID() && ! $_REQUEST['modfunc'] )
}
echo '<form action="' . PreparePHP_SELF() . '" method="POST">';
DrawHeader( _( 'Timeframe' ) . ': ' . PrepareDate( $start_date, '_start' ) . ' ' . _( 'to' ) . ' ' . PrepareDate( $end_date, '_end' ) . ' : ' . $type_select . ( $student_select ? ' : ' . $student_select : '' ) . ' : <input type="submit" value="' . _( 'Go' ) . '">' );
DrawHeader(
_( 'Timeframe' ) . ': ' . PrepareDate( $start_date, '_start' ) . ' ' .
_( 'to' ) . ' ' . PrepareDate( $end_date, '_end' ) .
' ' . $type_select .
( $student_select ? ' : ' . $student_select : '' ) .
' ' . Buttons( _( 'Go' ) )
);
echo '</form>';
DrawHeader( NoInput( $student['FULL_NAME'], '&nbsp;' . $student['STUDENT_ID'] ), '', NoInput( red( $student['BALANCE'] ), _( 'Balance' ) ) );
DrawHeader(
NoInput( $student['FULL_NAME'], '&nbsp;' . $student['STUDENT_ID'] ),
NoInput( red( $student['BALANCE'] ), _( 'Balance' ) )
);
if ( $_REQUEST['detailed_view'] != 'true' )
if ( isset( $_REQUEST['detailed_view'] )
&& $_REQUEST['detailed_view'] != 'true' )
{
DrawHeader( '<a href="' . PreparePHP_SELF( $_REQUEST, array(), array( 'detailed_view' => 'true' ) ) . '">' . _( 'Detailed View' ) . '</a>' );
DrawHeader(
'<a href="' . PreparePHP_SELF( $_REQUEST, array(), array( 'detailed_view' => 'true' ) ) . '">' . _( 'Detailed View' ) . '</a>'
);
}
else
{
DrawHeader( '<a href="' . PreparePHP_SELF( $_REQUEST, array(), array( 'detailed_view' => 'false' ) ) . '">' . _( 'Original View' ) . '</a>' );
DrawHeader(
'<a href="' . PreparePHP_SELF( $_REQUEST, array(), array( 'detailed_view' => 'false' ) ) . '">' . _( 'Original View' ) . '</a>'
);
}
if ( $student['BALANCE'] )
{
$where = '';
if ( ! empty( $_REQUEST['student_select'] ) )
{
$where = " AND fst.STUDENT_ID='" . $_REQUEST['student_select'] . "'";
$where .= " AND fst.STUDENT_ID='" . $_REQUEST['student_select'] . "'";
}
if ( ! empty( $_REQUEST['type_select'] ) )
......@@ -82,7 +102,8 @@ if ( UserStudentID() && ! $_REQUEST['modfunc'] )
$where .= " AND fst.SHORT_NAME='" . $_REQUEST['type_select'] . "'";
}
if ( $_REQUEST['detailed_view'] == 'true' )
if ( isset( $_REQUEST['detailed_view'] )
&& $_REQUEST['detailed_view'] == 'true' )
{
$RET = DBGet( "SELECT fst.TRANSACTION_ID AS TRANS_ID,fst.TRANSACTION_ID,
fst.STUDENT_ID,fst.DISCOUNT,
......@@ -176,6 +197,10 @@ if ( UserStudentID() && ! $_REQUEST['modfunc'] )
{
$RET[$RET_key] = array_map( 'types_locale', $RET_val );
}
$group = array();
$link = array();
}
ListOutput(
......
......@@ -130,6 +130,7 @@ StaffWidgets( 'fsa_status' );
StaffWidgets( 'fsa_barcode' );
StaffWidgets( 'fsa_exists_Y' );
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] .= ",(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE";
$extra['SELECT'] .= ",(SELECT coalesce(STATUS,'" . DBEscapeString( _( 'Active' ) ) . "') FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS STATUS";
$extra['functions'] += array( 'BALANCE' => 'red' );
......
......@@ -4,9 +4,13 @@ StaffWidgets( 'fsa_status' );
StaffWidgets( 'fsa_barcode' );
StaffWidgets( 'fsa_exists_Y' );
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] .= ",(SELECT coalesce(STATUS,'" . DBEscapeString( _( 'Active' ) ) . "') FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS STATUS";
$extra['SELECT'] .= ",(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE";
$extra['functions'] += array( 'BALANCE' => 'red' );
$extra['columns_after'] = array( 'BALANCE' => _( 'Balance' ), 'STATUS' => _( 'Status' ) );
Search( 'staff_id', $extra );
......@@ -22,14 +26,25 @@ if ( UserStaffID() && ! $_REQUEST['modfunc'] )
$staff = $staff[1];
echo '<form action="' . PreparePHP_SELF() . '" method="POST">';
DrawHeader( _( 'Timeframe' ) . ': ' . PrepareDate( $start_date, '_start' ) . ' ' . _( 'to' ) . ' ' . PrepareDate( $end_date, '_end' ) . ' : ' . $type_select . ' : <input type="submit" value="' . _( 'Go' ) . '">' );
DrawHeader(
_( 'Timeframe' ) . ': ' . PrepareDate( $start_date, '_start' ) . ' ' .
_( 'to' ) . ' ' . PrepareDate( $end_date, '_end' ) . ' ' .
$type_select .
' ' . Buttons( _( 'Go' ) )
);
echo '</form>';
//FJ fix bug no balance
// DrawHeader(NoInput($staff['FULL_NAME'],'&nbsp;'.$staff['STAFF_ID']),'', NoInput(red($student['BALANCE']),_('Balance')));
DrawHeader( NoInput( $staff['FULL_NAME'], '&nbsp;' . $staff['STAFF_ID'] ), '', NoInput( red( $staff['BALANCE'] ), _( 'Balance' ) ) );
DrawHeader(
NoInput( $staff['FULL_NAME'], '&nbsp;' . $staff['STAFF_ID'] ),
NoInput( red( $staff['BALANCE'] ), _( 'Balance' ) )
);
if ( $_REQUEST['detailed_view'] != 'true' )
if ( isset( $_REQUEST['detailed_view'] )
&& $_REQUEST['detailed_view'] != 'true' )
{
DrawHeader( "<a href=" . PreparePHP_SELF( $_REQUEST, array(), array( 'detailed_view' => 'true' ) ) . ">" . _( 'Detailed View' ) . "</a>" );
}
......
......@@ -6,7 +6,8 @@ if ( $_REQUEST['modfunc'] === 'save' )
{
$st_list = "'" . implode( "','", $_REQUEST['st_arr'] ) . "'";
$extra['WHERE'] = " AND s.STUDENT_ID IN (" . $st_list . ")";
$extra['WHERE'] = isset( $extra['WHERE'] ) ? $extra['WHERE'] : '';
$extra['WHERE'] .= " AND s.STUDENT_ID IN (" . $st_list . ")";
$date = RequestedDate( 'include_active_date', '' );
......@@ -34,8 +35,12 @@ if ( $_REQUEST['modfunc'] === 'save' )
/* $extra['SELECT'] .= ',c.TITLE AS COURSE_TITLE,p_cp.TITLE AS PERIOD_TITLE,sr.MARKING_PERIOD_ID,p_cp.DAYS,p_cp.ROOM';
$extra['FROM'] .= ' LEFT OUTER JOIN SCHEDULE sr ON (sr.STUDENT_ID=ssm.STUDENT_ID),COURSES c,COURSE_PERIODS p_cp,SCHOOL_PERIODS sp ';
$extra['WHERE'] .= " AND p_cp.PERIOD_ID=sp.PERIOD_ID AND ssm.SYEAR=sr.SYEAR AND sr.COURSE_ID=c.COURSE_ID AND sr.COURSE_PERIOD_ID=p_cp.COURSE_PERIOD_ID AND ('".$date."' BETWEEN sr.START_DATE AND sr.END_DATE $date_extra)";*/
$extra['SELECT'] = ',c.TITLE AS COURSE_TITLE,p_cp.TITLE AS PERIOD_TITLE,sr.MARKING_PERIOD_ID,p_cp.ROOM';
$extra['FROM'] = ' LEFT OUTER JOIN SCHEDULE sr ON (sr.STUDENT_ID=ssm.STUDENT_ID),COURSES c,COURSE_PERIODS p_cp ';
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] .= ',c.TITLE AS COURSE_TITLE,p_cp.TITLE AS PERIOD_TITLE,sr.MARKING_PERIOD_ID,p_cp.ROOM';
$extra['FROM'] = isset( $extra['FROM'] ) ? $extra['FROM'] : '';
$extra['FROM'] .= ' LEFT OUTER JOIN SCHEDULE sr ON (sr.STUDENT_ID=ssm.STUDENT_ID),COURSES c,COURSE_PERIODS p_cp ';
$extra['WHERE'] .= " AND ssm.SYEAR=sr.SYEAR
AND sr.COURSE_ID=c.COURSE_ID
AND sr.COURSE_PERIOD_ID=p_cp.COURSE_PERIOD_ID
......
......@@ -25,17 +25,30 @@ if ( empty( $_REQUEST['LO_sort'] ) )
//$RET = DBGet( "SELECT s.LAST_NAME||', '||s.FIRST_NAME||' '||COALESCE(s.MIDDLE_NAME,' ') AS FULL_NAME,f.AMOUNT AS DEBIT,'' AS CREDIT,f.TITLE||' '||COALESCE(f.COMMENTS,' ') AS EXPLANATION,f.ASSIGNED_DATE AS DATE,f.ID AS ID FROM BILLING_FEES f,STUDENTS s WHERE f.STUDENT_ID=s.STUDENT_ID AND f.SYEAR='".UserSyear()."' AND f.SCHOOL_ID='".UserSchool()."' AND f.ASSIGNED_DATE BETWEEN '".$start_date."' AND '".$end_date."' UNION SELECT s.LAST_NAME||', '||s.FIRST_NAME||' '||COALESCE(s.MIDDLE_NAME,' ') AS FULL_NAME,'' AS DEBIT,p.AMOUNT AS CREDIT,COALESCE(p.COMMENTS,' ') AS EXPLANATION,p.PAYMENT_DATE AS DATE,p.ID AS ID FROM BILLING_PAYMENTS p,STUDENTS s WHERE p.STUDENT_ID=s.STUDENT_ID AND p.SYEAR='".UserSyear()."' AND p.SCHOOL_ID='".UserSchool()."' AND p.PAYMENT_DATE BETWEEN '".$start_date."' AND '".$end_date."' ORDER BY DATE",$functions);
$extra['functions'] = array( 'DEBIT' => '_makeCurrency', 'CREDIT' => '_makeCurrency', 'DATE' => 'ProperDate' );
$fees_extra = $extra;
$fees_extra['SELECT'] = isset( $fees_extra['SELECT'] ) ? $fees_extra['SELECT'] : '';
$fees_extra['SELECT'] .= ",f.AMOUNT AS DEBIT,'' AS CREDIT,f.TITLE||' '||COALESCE(f.COMMENTS,' ') AS EXPLANATION,f.ASSIGNED_DATE AS DATE,f.ID AS ID";
$fees_extra['FROM'] = isset( $fees_extra['FROM'] ) ? $fees_extra['FROM'] : '';
$fees_extra['FROM'] .= ',BILLING_FEES f';
$fees_extra['WHERE'] = isset( $fees_extra['WHERE'] ) ? $fees_extra['WHERE'] : '';
$fees_extra['WHERE'] .= " AND f.STUDENT_ID=s.STUDENT_ID AND f.SYEAR=ssm.SYEAR
AND f.SCHOOL_ID=ssm.SCHOOL_ID AND f.ASSIGNED_DATE BETWEEN '" . $start_date . "' AND '" . $end_date . "'";
$RET = GetStuList( $fees_extra );
$payments_extra = $extra;
$payments_extra['SELECT'] = isset( $payments_extra['SELECT'] ) ? $payments_extra['SELECT'] : '';
$payments_extra['SELECT'] .= ",'' AS DEBIT,p.AMOUNT AS CREDIT,COALESCE(p.COMMENTS,' ') AS EXPLANATION,p.PAYMENT_DATE AS DATE,p.ID AS ID";
$payments_extra['FROM'] = isset( $payments_extra['FROM'] ) ? $payments_extra['FROM'] : '';
$payments_extra['FROM'] .= ',BILLING_PAYMENTS p';
$payments_extra['WHERE'] = isset( $payments_extra['WHERE'] ) ? $payments_extra['WHERE'] : '';
$payments_extra['WHERE'] .= " AND p.STUDENT_ID=s.STUDENT_ID AND p.SYEAR=ssm.SYEAR AND p.SCHOOL_ID=ssm.SCHOOL_ID AND p.PAYMENT_DATE BETWEEN '" . $start_date . "' AND '" . $end_date . "'";
$payments_RET = GetStuList( $payments_extra );
......@@ -60,8 +73,8 @@ $columns = array(
$link['add']['html'] = array(
'FULL_NAME' => '<b>' . _( 'Total' ) . '</b>',
'DEBIT' => '<b>' . Currency( $totals['DEBIT'] ) . '</b>',
'CREDIT' => '<b>' . Currency( $totals['CREDIT'] ) . '</b>',
'DEBIT' => '<b>' . Currency( ( isset( $totals['DEBIT'] ) ? $totals['DEBIT'] : 0 ) ) . '</b>',
'CREDIT' => '<b>' . Currency( ( isset( $totals['CREDIT'] ) ? $totals['CREDIT'] : 0 ) ) . '</b>',
'DATE' => '&nbsp;',
'EXPLANATION' => '&nbsp;',
);
......
......@@ -7,7 +7,7 @@ if ( empty( $_REQUEST['search_modfunc'] ) )
DrawHeader( ProgramTitle() );
$extra['new'] = true;
$extra['action'] .= "&_ROSARIO_PDF=true";
$extra['action'] = empty( $extra['action'] ) ? '&_ROSARIO_PDF=true' : $extra['action'] . '&_ROSARIO_PDF=true';
Search( 'student_id', $extra );
}
......@@ -16,7 +16,8 @@ else
// For the Student Fees / Student Payments programs.
$_REQUEST['print_statements'] = true;
if ( $_REQUEST['mailing_labels'] === 'Y' )
if ( isset( $_REQUEST['mailing_labels'] )
&& $_REQUEST['mailing_labels'] === 'Y' )
{
$extra['group'][] = 'ADDRESS_ID';
}
......@@ -31,7 +32,8 @@ else
foreach ( (array) $students_RET as $student )
{
if ( $_REQUEST['mailing_labels'] === 'Y' )
if ( isset( $_REQUEST['mailing_labels'] )
&& $_REQUEST['mailing_labels'] === 'Y' )
{
foreach ( (array) $student as $address )
{
......@@ -42,10 +44,9 @@ else
DrawHeader( _( 'Statement' ) );
DrawHeader( $address['FULL_NAME'], $address['STUDENT_ID'] );
DrawHeader( $address['GRADE_ID'] );
DrawHeader( SchoolInfo( 'TITLE' ) );
DrawHeader( ProperDate( DBDate() ) );
DrawHeader( SchoolInfo( 'TITLE' ), ProperDate( DBDate() ) );
echo '<br /><br /><table class="width-100p"><tr><td style="width:50px;"> &nbsp; </td>
echo '<br /><br /><br /><table class="width-100p"><tr><td style="width:50px;"> &nbsp; </td>
<td>' . $address['MAILING_LABEL'] . '</td></tr></table><br />';
SetUserStudentID( $address['STUDENT_ID'] );
......@@ -65,8 +66,7 @@ else
DrawHeader( _( 'Statement' ) );
DrawHeader( $student['FULL_NAME'], $student['STUDENT_ID'] );
DrawHeader( $student['GRADE_ID'] );
DrawHeader( SchoolInfo( 'TITLE' ) );
DrawHeader( ProperDate( DBDate() ) );
DrawHeader( SchoolInfo( 'TITLE' ), ProperDate( DBDate() ) );
require 'modules/Student_Billing/StudentFees.php';
require 'modules/Student_Billing/StudentPayments.php';
......
......@@ -6,10 +6,10 @@ if ( empty( $_REQUEST['print_statements'] ) )
{
DrawHeader( ProgramTitle() );
Search( 'student_id', $extra );
Search( 'student_id', ( isset( $extra ) ? $extra : null ) );
}
if ( $_REQUEST['values']
if ( ! empty( $_REQUEST['values'] )
&& $_POST['values']
&& AllowEdit()
&& UserStudentID() )
......@@ -176,6 +176,8 @@ if ( UserStudentID()
'COMMENTS' => _( 'Comment' ),
);
$link = array();
if ( empty( $_REQUEST['print_statements'] ) )
{
$link['add']['html'] = array(
......@@ -210,7 +212,7 @@ if ( UserStudentID()
ListOutput( $RET, $columns, 'Fee', 'Fees', $link, array(), $options );
if ( ! $_REQUEST['print_statements']
if ( empty( $_REQUEST['print_statements'] )
&& AllowEdit() )
{
echo '<div class="center">' . SubmitButton() . '</div>';
......
......@@ -6,13 +6,13 @@ if ( empty( $_REQUEST['print_statements'] ) )
{
DrawHeader( ProgramTitle() );
Search( 'student_id' );
Search( 'student_id', ( isset( $extra ) ? $extra : null ) );
}
// Add eventual Dates to $_REQUEST['values'].
AddRequestedDates( 'values', 'post' );
if ( $_REQUEST['values']
if ( ! empty( $_REQUEST['values'] )
&& $_POST['values']
&& AllowEdit()
&& UserStudentID() )
......@@ -182,7 +182,9 @@ if ( UserStudentID()
'LUNCH_PAYMENT' => _( 'Lunch Payment' ),
);
if ( ! $_REQUEST['print_statements']
$link = array();
if ( empty( $_REQUEST['print_statements'] )
&& AllowEdit() )
{
$link['add']['html'] = array(
......@@ -223,7 +225,7 @@ if ( UserStudentID()
$options
);
if ( ! $_REQUEST['print_statements']
if ( empty( $_REQUEST['print_statements'] )
&& AllowEdit() )
{
echo '<div class="center">' . SubmitButton() . '</div>';
......@@ -249,7 +251,7 @@ if ( UserStudentID()
DrawHeader( $table );
if ( ! $_REQUEST['print_statements']
if ( empty( $_REQUEST['print_statements'] )
&& AllowEdit() )
{
echo '</form>';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment