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

Shorten personal comment

//modif Francois: => //FJ
parent 5632a2f6
......@@ -4,7 +4,7 @@ include('Warehouse.php');
if($_REQUEST['modfunc']=='print')
{
//modif Francois: call PDFStart to generate Print PDF
//FJ call PDFStart to generate Print PDF
if($_REQUEST['expanded_view'])
$_SESSION['orientation'] = 'landscape';
......@@ -17,7 +17,7 @@ if($_REQUEST['modfunc']=='print')
if(!$wkhtmltopdfPath)
$_ROSARIO['allow_edit'] = false;
//modif Francois: security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
//FJ security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
if (mb_substr($modname, -4, 4)!='.php' || mb_strpos($modname, '..')!==false || !is_file('modules/'.$modname))
{
include('ProgramFunctions/HackingLog.fnc.php');
......@@ -26,12 +26,12 @@ if($_REQUEST['modfunc']=='print')
else
include('modules/'.$modname);
//modif Francois: call PDFStop to generate Print PDF
//FJ call PDFStop to generate Print PDF
PDFStop($print_data);
}
elseif($_REQUEST['modfunc']=='help')
{
if (file_exists('Help_'.mb_substr($locale, 0, 2).'.php')) //modif Francois: translated help
if (file_exists('Help_'.mb_substr($locale, 0, 2).'.php')) //FJ translated help
include 'Help_'.mb_substr($locale, 0, 2).'.php';
else
include 'Help_en.php';
......@@ -40,7 +40,7 @@ elseif($_REQUEST['modfunc']=='help')
foreach($help as $program=>$help_txt)
{
//modif Francois: fix bug URL Modules.php?modfunc=help&modname=Student_Billing/Statements.php&_ROSARIO_PDF
//FJ fix bug URL Modules.php?modfunc=help&modname=Student_Billing/Statements.php&_ROSARIO_PDF
if($_REQUEST['modname']==$program || (mb_strpos($program, $_REQUEST['modname'])=== 0 && mb_strpos($_SERVER['QUERY_STRING'], $program)=== 21))
$help_text = $help_txt;
}
......@@ -61,7 +61,7 @@ else
<div id="footerwrap">
<a id="BottomButtonMenu" href="#" onclick="expandMenu(); return false;" title="<?php echo _('Menu'); ?>" class="BottomButton">&nbsp;<span><?php echo _('Menu'); ?></span></a>
<?php //modif Francois: icons
<?php //FJ icons
if($_SESSION['List_PHP_SELF'] && (User('PROFILE')=='admin' || User('PROFILE')=='teacher')) :
switch ($_SESSION['Back_PHP_SELF']) {
case 'student': $back_text = _('Student List'); break;
......
......@@ -2,7 +2,7 @@
error_reporting(0);
include('Warehouse.php');
if (file_exists('Help_'.mb_substr($locale, 0, 2).'.php')) //modif Francois: translated help
if (file_exists('Help_'.mb_substr($locale, 0, 2).'.php')) //FJ translated help
include 'Help_'.mb_substr($locale, 0, 2).'.php';
else
include 'Help_en.php';
......
......@@ -23,7 +23,7 @@ if(empty($_ROSARIO['Menu']))
foreach($menu as $modcat=>$profiles)
{
//modif Francois: bugfix remove modules with no programs
//FJ bugfix remove modules with no programs
$no_programs_in_module = true;
$programs = $profiles[$profile];
......@@ -50,7 +50,7 @@ if(empty($_ROSARIO['Menu']))
unset($_ROSARIO['Menu'][$modcat]);
}
//modif Francois: enable password change for students
//FJ enable password change for students
if(User('PROFILE')=='student')
//unset($_ROSARIO['Menu']['Users']);
unset($_ROSARIO['Menu']['Users']['parent']['Users/User.php']);
......
......@@ -13,7 +13,7 @@ if(isset($_REQUEST['modname']))
$_ROSARIO['is_popup'] = $_ROSARIO['not_ajax'] = false;
//modif Francois: security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
//FJ security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
if (in_array($modname, array('misc/ChooseRequest.php', 'misc/ChooseCourse.php', 'misc/ViewContact.php')) || ($modname == 'School_Setup/Calendar.php' && $_REQUEST['modfunc'] == 'detail') || (in_array($modname, array('Scheduling/MassDrops.php', 'Scheduling/Schedule.php', 'Scheduling/MassSchedule.php', 'Scheduling/MassRequests.php', 'Scheduling/Courses.php')) && $_REQUEST['modfunc'] == 'choose_course')) //popups
{
$_ROSARIO['is_popup'] = true;
......@@ -31,7 +31,7 @@ if(isset($_REQUEST['modname']))
$allowed = false;
//modif Francois: security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
//FJ security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
//allow PHP scripts in misc/ one by one in place of the whole folder
//if(mb_substr($_REQUEST['modname'],0,5)=='misc/')
if (in_array($modname, array('misc/ChooseRequest.php', 'misc/ChooseCourse.php', 'misc/Portal.php', 'misc/ViewContact.php')))
......@@ -43,7 +43,7 @@ if(isset($_REQUEST['modname']))
{
foreach($programs as $program=>$title)
{
//modif Francois: fix bug URL Modules.php?modname=Student_Billing/Statements.php&_ROSARIO_PDF
//FJ fix bug URL Modules.php?modname=Student_Billing/Statements.php&_ROSARIO_PDF
if($modname==$program || (mb_strpos($program, $modname)=== 0 && mb_strpos($_SERVER['QUERY_STRING'], $program)=== 8))
{
$allowed = true;
......
<?php
//modif Francois: create HackingLog function to centralize code
//FJ create HackingLog function to centralize code
function HackingLog()
{
global $RosarioNotifyAddress, $RosarioVersion;
......@@ -15,7 +15,7 @@ function HackingLog()
else
$ip = $_SERVER['REMOTE_ADDR'];
//modif Francois: add SendEmail function
//FJ add SendEmail function
include('ProgramFunctions/SendEmail.fnc.php');
$message = "INSERT INTO HACKING_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME,MODNAME,QUERY_STRING,USERNAME)
......
......@@ -4,7 +4,7 @@
if (!isset($PortalNotesFilesPath))
$PortalNotesFilesPath = 'assets/PortalNotesFiles/';
//modif Francois: Portal Polls functions
//FJ Portal Polls functions
function PortalPollsVote($poll_id, $votes_array)
{
......@@ -83,7 +83,7 @@ function PortalPollsDisplay($value,$name)
//verify if user is in excluded users list (format = '|[profile_id]:[user_id]')
$profile_id = User('PROFILE_ID');
if($profile_id != 0) //modif Francois: call right Student/Staff ID
if($profile_id != 0) //FJ call right Student/Staff ID
$user_id = $_SESSION['STAFF_ID'];
else
$user_id = $_SESSION['STUDENT_ID'];
......@@ -95,7 +95,7 @@ function PortalPollsDisplay($value,$name)
$PollForm = '';
//modif Francois: responsive rt td too large
//FJ responsive rt td too large
if (!isset($_REQUEST['_ROSARIO_PDF']))
$PollForm .= includeOnceColorBox('divPortalPoll'.$poll_id).'<div id="divPortalPoll'.$poll_id.'" class="divPortalPoll rt2colorBox">';
......@@ -142,7 +142,7 @@ function PortalPollsVotesDisplay($poll_id, $display_votes, $poll_questions_RET,
if (!$display_votes)
return ErrorMessage(array(button('check', '', '', 'bigger') .'&nbsp;'.(isset($_POST['poll_completed_string'])? $_POST['poll_completed_string'] : _('Poll completed'))),'Note');
//modif Francois: responsive rt td too large
//FJ responsive rt td too large
if (!$js_included_is_voting && !isset($_REQUEST['_ROSARIO_PDF']))
{
$votes_display .= includeOnceColorBox('divPortalPoll'.$poll_id);
......@@ -217,18 +217,18 @@ function makePublishing($value,$name)
$return = '';
//modif Francois: responsive rt td too large
//FJ responsive rt td too large
if (!isset($_REQUEST['_ROSARIO_PDF']))
{
$return .= includeOnceColorBox('divPublishing'.$id);
$return .= '<DIV id="divPublishing'.$id.'" class="rt2colorBox">'."\n";
}
//modif Francois: remove LO_field
//FJ remove LO_field
$return .= '<TABLE class="cellspacing-0 widefat"><TR><TD><b>'._('Visible Between').':</b><BR />';
$return .= DateInput($value,'values['.$id.']['.$name.']').' '._('to').' ';
$return .= DateInput($THIS_RET['END_DATE'],'values['.$id.'][END_DATE]').'</TD></TR>';
//modif Francois: css WPadmin
//FJ css WPadmin
$return .= '<TR><TD style="padding:0;">';
if(!$profiles_RET)
......@@ -239,7 +239,7 @@ function makePublishing($value,$name)
foreach(array('admin'=>_('Administrator w/Custom'),'teacher'=>_('Teacher w/Custom'),'parent'=>_('Parent w/Custom')) as $profile_id=>$profile)
{
$i++;
//modif Francois: add <label> on checkbox
//FJ add <label> on checkbox
if (isset($_REQUEST['LO_save']))
$return .= '<TD>'.$profile.' '.CheckboxInput((mb_strpos($THIS_RET['PUBLISHED_PROFILES'],','.$profile_id.',')!==false?true:''),'').' -</TD>';
else
......@@ -248,7 +248,7 @@ function makePublishing($value,$name)
$return .= '</TR><TR class="st">';
}
//modif Francois: Portal Polls add students teacher
//FJ Portal Polls add students teacher
$teachers_RET = DBGet(DBQuery("SELECT STAFF_ID,LAST_NAME,FIRST_NAME,MIDDLE_NAME FROM STAFF WHERE (SCHOOLS IS NULL OR STRPOS(SCHOOLS,',".UserSchool().",')>0) AND SYEAR='".UserSyear()."' AND PROFILE='teacher' ORDER BY LAST_NAME,FIRST_NAME"));
if(count($teachers_RET))
{
......@@ -263,7 +263,7 @@ function makePublishing($value,$name)
$return .= '<TD><label>'._($profile['TITLE']).' '.CheckboxInput((mb_strpos($THIS_RET['PUBLISHED_PROFILES'],",$profile[ID],")!==false?true:''),'').' -';
else
$return .= '<TD><label><INPUT type="checkbox" name="profiles['.$id.']['.$profile['ID'].']" value="Y"'.(mb_strpos($THIS_RET['PUBLISHED_PROFILES'],','.$profile['ID'].',')!==false?' checked':'').' /> '._($profile['TITLE']);
//modif Francois: Portal Polls add students teacher
//FJ Portal Polls add students teacher
if ($profile['ID'] == 0 && $_REQUEST['modname']=='School_Setup/PortalPolls.php') //student & verify this is not a Portal Note!
{
$return .= ': </label>'.SelectInput($THIS_RET['STUDENTS_TEACHER_ID'],'values['.$id.'][STUDENTS_TEACHER_ID]',_('Limit to Teacher'),$teachers, true, '', true);
......@@ -293,7 +293,7 @@ function makePublishing($value,$name)
return $return;
}
//modif Francois: file attached to portal notes
//FJ file attached to portal notes
function makeFileAttached($value,$name)
{ global $THIS_RET, $PortalNotesFilesPath;
static $filesAttachedCount = 0;
......@@ -312,7 +312,7 @@ function makeFileAttached($value,$name)
{
$filesAttachedCount ++;
//modif Francois: colorbox
//FJ colorbox
$view_online = '<img src="assets/themes/'. Preferences('THEME') .'/btn/visualize.png" class="button bigger" /> '._('View Online').'';
$download = '<img src="assets/themes/'. Preferences('THEME') .'/btn/download.png" class="button bigger" /> '._('Download').'';
......
<?php
//modif Francois: add SendEmail function
//FJ add SendEmail function
// $from: if empty, defaults to rosariosis@[yourserverdomain]
// $cc: Carbon Copy, comma separated list of emails
......@@ -10,7 +10,7 @@
/*
if($RosarioNotifyAddress)
{
//modif Francois: add SendEmail function
//FJ add SendEmail function
include('ProgramFunctions/SendEmail.fnc.php');
$message = "System: ".ParseMLField(Config('TITLE'))." \n";
......@@ -28,7 +28,7 @@
function SendEmail($to, $subject, $message, $from = null, $cc = null)
{
//modif Francois: add email headers
//FJ add email headers
if (empty($from))
{
// Get the site domain and get rid of www.
......
......@@ -18,8 +18,8 @@ function _makeTextInput($column,$name,$size,$request)
if($field['TYPE']=='numeric')
$value[$column] = str_replace('.00','',$value[$column]);
//modif Francois: text field is required
//modif Francois: text field maxlength=255
//FJ text field is required
//FJ text field maxlength=255
$options = $size.' maxlength=255'.($field['REQUIRED']=='Y' ? ' required': '');
return TextInput($value[$column], $request.'['.$column.']', $req[0].$name.$req[1], $options, $div);
......@@ -40,7 +40,7 @@ function _makeDateInput($column,$name,$request)
$req = $field['REQUIRED']=='Y' && $value[$column]=='' ? array('<span class="legend-red">','</span>') : array('','');
}
//modif Francois: date field is required
//FJ date field is required
$required = false;
if ($field['REQUIRED']=='Y')
$required = true;
......@@ -48,7 +48,7 @@ function _makeDateInput($column,$name,$request)
return DateInput($value[$column], $request.'['.$column.']', $req[0].$name.$req[1], $div, true, $required);
}
//modif Francois: display age next to birthdate
//FJ display age next to birthdate
function _makeStudentAge($column,$name)
{ global $value;
......@@ -103,7 +103,7 @@ function _makeSelectInput($column,$name,$request)
$options[$option] = $option;
}
//modif Francois: select field is required
//FJ select field is required
$extra = 'style="max-width:250px;"'.($field['REQUIRED']=='Y' ? ' required': '');
return SelectInput($value[$column], $request.'['.$column.']', $req[0].$name.$req[1], $options, _('N/A'), $extra, $div);
......@@ -141,7 +141,7 @@ function _makeAutoSelectInput($column,$name,$request)
$options[$option] = $option;
}
// add the 'new' option, is also the separator
//modif Francois: new option
//FJ new option
// $options['---'] = '---';
$options['---'] = '-'. _('Edit') .'-';
......@@ -190,13 +190,13 @@ function _makeAutoSelectInput($column,$name,$request)
if($value[$column]!='---' && count($options)>1)
{
//modif Francois: select field is required
//FJ select field is required
$extra = 'style="max-width:250px;"'.($field['REQUIRED']=='Y' ? ' required': '');
return SelectInput($value[$column],$request.'['.$column.']',$req[0].$name.$req[1],$options,_('N/A'),$extra,$div);
}
else
//modif Francois: new option
//FJ new option
// return TextInput($value[$column]=='---'?array('---','<span style="color:red">---</span>'):''.$value[$column],$request.'['.$column.']',$req[0].$name.$req[1],$size,$div);
return TextInput($value[$column]=='---'?array('---','<span style="color:red">-'. _('Edit') .'-</span>'):''.$value[$column],$request.'['.$column.']',$req[0].$name.$req[1],'',$div);
}
......@@ -226,8 +226,8 @@ function _makeTextareaInput($column,$name,$request)
else
$div = true;
//modif Francois: text area is required
//modif Francois: textarea field maxlength=5000
//FJ text area is required
//FJ textarea field maxlength=5000
return TextAreaInput($value[$column],$request.'['.$column.']',$name,'maxlength=5000'.($field['REQUIRED']=='Y' ? ' required': ''),$div);
}
......@@ -268,13 +268,13 @@ function _makeMultipleInput($column,$name,$request)
if($i%2==0)
$table .= '</TR><TR>';
//modif Francois: add <label> on checkbox
//FJ add <label> on checkbox
$table .= '<TD><label><INPUT type="checkbox" name="'.$request.'['.$column.'][]" value="'.htmlspecialchars($option,ENT_QUOTES).'"'.(mb_strpos($value[$column],'||'.$option.'||')!==false?' checked':'').' /> '.$option.'</label></TD>';
$i++;
}
$table .= '</TR><TR><TD colspan="2">';
//modif Francois: fix bug none selected not saved
//FJ fix bug none selected not saved
$table .= '<INPUT type="hidden" name="'.$request.'['.$column.'][none]" value="">';
$table .= '<TABLE class="width-100p" style="height:7px; border:1; border-style:none solid solid solid;"><TR><TD></TD></TR></TABLE>';
......@@ -361,7 +361,7 @@ function _makeStartInput($value,$column)
else
$div = true;
//modif Francois: remove LO_field
//FJ remove LO_field
return '<div class="nobr">'.$add.DateInput($value,'values[STUDENT_ENROLLMENT]['.$id.']['.$column.']','',$div,true).' - '.SelectInput($THIS_RET['ENROLLMENT_CODE'],'values[STUDENT_ENROLLMENT]['.$id.'][ENROLLMENT_CODE]','',$add_codes,_('N/A'),'style="max-width:150px;"').'</div>';
}
......@@ -412,7 +412,7 @@ function _makeSchoolInput($value,$column)
else
return SelectInput(UserSchool(),'values[STUDENT_ENROLLMENT]['.$id.'][SCHOOL_ID]','',$options,false,'',false);
else
//modif Francois: save new Student's Enrollment in Enrollment.inc.php
//FJ save new Student's Enrollment in Enrollment.inc.php
return '<input type="hidden" name="values[STUDENT_ENROLLMENT][new][SCHOOL_ID]" value="'.UserSchool().'" />'.$schools[UserSchool()][1]['TITLE'];
}
?>
<?php
//modif Francois: use Report Card Grades comments
//FJ use Report Card Grades comments
//function _makeLetterGrade($percent,$course_period_id=0,$staff_id=0,$ret='')
function _makeLetterGrade($percent,$course_period_id=0,$staff_id=0,$ret='TITLE')
{ global $programconfig,$_ROSARIO;
......@@ -47,7 +47,7 @@ function _makeLetterGrade($percent,$course_period_id=0,$staff_id=0,$ret='TITLE')
foreach($_ROSARIO['_makeLetterGrade']['grades'][$grade_scale_id] as $grade)
{
if($does_breakoff=='Y' ? $percent>=$programconfig[$staff_id][$course_period_id.'-'.$grade['ID']] && is_numeric($programconfig[$staff_id][$course_period_id.'-'.$grade['ID']]) : $percent>=$grade['BREAK_OFF'])
//modif Francois: use Report Card Grades comments
//FJ use Report Card Grades comments
//return $ret=='ID' ? $grade['ID'] : $grade['TITLE'];
return $grade[$ret];
}
......
<?php
//modif Francois: bypass strip_tags on the $_REQUEST vars
//FJ bypass strip_tags on the $_REQUEST vars
//used to get TinyMCE textarea content
function GetRawPOSTvar($key)
......
......@@ -249,7 +249,7 @@ $addJavascripts .= 'var menuStudentID = "'.UserStudentID().'"; var menuStaffID =
if(User('PROFILE')!='student')
$sql = "SELECT sy.SYEAR FROM SCHOOLS sy,STAFF s WHERE sy.ID='".UserSchool()."' AND s.SYEAR=sy.SYEAR AND (s.SCHOOLS IS NULL OR position(','||sy.ID||',' IN s.SCHOOLS)>0) AND s.USERNAME=(SELECT USERNAME FROM STAFF WHERE STAFF_ID='".$_SESSION['STAFF_ID']."')";
else
//modif Francois: limit school years to the years the student was enrolled
//FJ limit school years to the years the student was enrolled
//$sql = "SELECT DISTINCT sy.SYEAR FROM SCHOOLS sy,STUDENT_ENROLLMENT s WHERE s.SYEAR=sy.SYEAR";
$sql = "SELECT DISTINCT sy.SYEAR FROM SCHOOLS sy,STUDENT_ENROLLMENT s WHERE s.SYEAR=sy.SYEAR AND s.STUDENT_ID='".UserStudentID()."'";
......@@ -288,13 +288,13 @@ $addJavascripts .= 'var menuStudentID = "'.UserStudentID().'"; var menuStaffID =
$mp_array[] = $quarter['MARKING_PERIOD_ID'];
endforeach;
//modif Francois: reset UserMP if invalid
//FJ reset UserMP if invalid
if(!UserMP() || !in_array(UserMP(), $mp_array))
{
$_SESSION['UserMP'] = $RET[1]['MARKING_PERIOD_ID'];
}
//modif Francois: error if no quarters
//FJ error if no quarters
} else { ?>
<OPTION value=""><?php echo _('Error').': '._('No quarters found'); ?></OPTION>
<?php } ?>
......@@ -306,13 +306,13 @@ $addJavascripts .= 'var menuStudentID = "'.UserStudentID().'"; var menuStaffID =
</span>
<?php //modif Francois: error if no quarters
<?php //FJ error if no quarters
if (!count($RET))
$all_MP = '0';
else
$all_MP = GetAllMP('QTR',UserMP());
//modif Francois: multiple school periods for a course period
//FJ multiple school periods for a course period
//$QI = DBQuery("SELECT cp.PERIOD_ID,cp.COURSE_PERIOD_ID,sp.TITLE,sp.SHORT_NAME,cp.MARKING_PERIOD_ID,cp.DAYS,c.TITLE AS COURSE_TITLE FROM COURSE_PERIODS cp, SCHOOL_PERIODS sp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.PERIOD_ID=sp.PERIOD_ID AND cp.SYEAR='".UserSyear()."' AND cp.SCHOOL_ID='".UserSchool()."' AND cp.TEACHER_ID='".User('STAFF_ID')."' AND cp.MARKING_PERIOD_ID IN (".GetAllMP('QTR',UserMP()).") ORDER BY sp.SORT_ORDER");
$QI = DBQuery("SELECT cpsp.PERIOD_ID,cp.COURSE_PERIOD_ID,cpsp.COURSE_PERIOD_SCHOOL_PERIODS_ID,sp.TITLE,sp.SHORT_NAME,cp.MARKING_PERIOD_ID,cpsp.DAYS,c.TITLE AS COURSE_TITLE, cp.SHORT_NAME AS CP_SHORT_NAME
FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp,COURSES c,COURSE_PERIOD_SCHOOL_PERIODS cpsp
......@@ -342,7 +342,7 @@ $addJavascripts .= 'var menuStudentID = "'.UserStudentID().'"; var menuStaffID =
<?php $optgroup = FALSE;
foreach($RET as $period)
{
//modif Francois: add optroup to group periods by course periods
//FJ add optroup to group periods by course periods
if (!empty($period['COURSE_TITLE']) && $optgroup!=$period['COURSE_TITLE']) : //new optgroup ?>
<optgroup label="<?php echo htmlspecialchars($optgroup = $period['COURSE_TITLE']); ?>">
......@@ -364,9 +364,9 @@ $addJavascripts .= 'var menuStudentID = "'.UserStudentID().'"; var menuStaffID =
else
$selected = '';
//modif Francois: days display to locale
//FJ days display to locale
$days_convert = array('U'=>_('Sunday'),'M'=>_('Monday'),'T'=>_('Tuesday'),'W'=>_('Wednesday'),'H'=>_('Thursday'),'F'=>_('Friday'),'S'=>_('Saturday'));
//modif Francois: days numbered
//FJ days numbered
if (SchoolInfo('NUMBER_DAYS_ROTATION') !== null)
$days_convert = array('U'=>'7','M'=>'1','T'=>'2','W'=>'3','H'=>'4','F'=>'5','S'=>'6');
......
......@@ -75,13 +75,13 @@ if(!defined('WAREHOUSE_PHP'))
$locale = $_SESSION['locale'];
putenv('LC_ALL='.$locale);
setlocale(LC_ALL, $locale);
setlocale(LC_NUMERIC, 'english','en_US', 'en_US.utf8'); //modif Francois: numeric separator "."
setlocale(LC_NUMERIC, 'english','en_US', 'en_US.utf8'); //FJ numeric separator "."
if ($locale=='tr_TR.utf8')
setlocale(LC_CTYPE, 'english','en_US', 'en_US.utf8'); //modif Francois: bugfix for Turkish characters conversion
setlocale(LC_CTYPE, 'english','en_US', 'en_US.utf8'); //FJ bugfix for Turkish characters conversion
bindtextdomain('rosariosis', $LocalePath); //binds the messages domain to the locale folder
bind_textdomain_codeset('rosariosis','UTF-8'); //ensures text returned is utf-8, quite often this is iso-8859-1 by default
textdomain('rosariosis'); //sets the domain name, this means gettext will be looking for a file called rosariosis.mo
mb_internal_encoding('UTF-8'); //modif Francois: multibyte strings
mb_internal_encoding('UTF-8'); //FJ multibyte strings
// Modules
// Core modules (packaged with RosarioSIS):
......
<?php
//modif Francois: remove DatabaseType (oracle and mysql cases)
//FJ remove DatabaseType (oracle and mysql cases)
// Establish DB connection.
function db_start()
......@@ -234,7 +234,7 @@ function db_show_error($sql,$failnote,$additional='')
if($RosarioNotifyAddress)
{
//modif Francois: add SendEmail function
//FJ add SendEmail function
include('ProgramFunctions/SendEmail.fnc.php');
$message = "System: ".ParseMLField(Config('TITLE'))." \n";
......
......@@ -3,7 +3,7 @@
error_reporting(1);
session_start();
//modif Francois: check PHP version
//FJ check PHP version
if (version_compare(PHP_VERSION, '5.3.2') == -1) {
$error[] = 'RosarioSIS requires PHP 5.3.2 to run, your version is : ' . PHP_VERSION;
}
......@@ -20,7 +20,7 @@ else
{
include './Warehouse.php';
//modif Francois: verify PHP extensions and php.ini
//FJ verify PHP extensions and php.ini
$inipath = php_ini_loaded_file();
if ($inipath)
......@@ -81,7 +81,7 @@ else
}
}
//modif Francois: check wkhtmltopdf binary exists
//FJ check wkhtmltopdf binary exists
if (!empty($wkhtmltopdfPath) && !file_exists($wkhtmltopdfPath))
$error[] = 'The value for $wkhtmltopdfPath in config.inc.php is not correct.';
......
......@@ -3,7 +3,7 @@
function Currency($num,$sign='before',$red=false)
{
$original = $num;
//modif Francois: Bugfix Currency direct call via $extra['functions']
//FJ Bugfix Currency direct call via $extra['functions']
if($sign=='CR' && $num<0)
{
$cr = true;
......
......@@ -26,7 +26,7 @@ function UserCoursePeriod()
return (isset($_SESSION['UserCoursePeriod']) ? $_SESSION['UserCoursePeriod'] : null);
}
//modif Francois: multiple school periods for a course period
//FJ multiple school periods for a course period
function UserCoursePeriodSchoolPeriod()
{
return $_SESSION['UserCoursePeriodSchoolPeriod'];
......@@ -42,7 +42,7 @@ function UserStaffID()
return (isset($_SESSION['staff_id']) ? $_SESSION['staff_id'] : null);
}
//modif Francois: Forbid hacking user student/staff ID in URL
//FJ Forbid hacking user student/staff ID in URL
//add setters for $_SESSION['staff_id'] & $_SESSION['student_id']
/*
......@@ -104,7 +104,7 @@ function SetUserStaffID($staff_id)
case 'student':
default:
//modif Francois: create account
//FJ create account
if (User('PROFILE') || basename($_SERVER['PHP_SELF'])!='index.php')
$isHack = true;
......@@ -193,7 +193,7 @@ function SetUserStudentID($student_id)
break;
default:
//modif Francois: create account
//FJ create account
if (User('PROFILE') || basename($_SERVER['PHP_SELF'])!='index.php')
$isHack = true;
......
......@@ -5,7 +5,7 @@
Use in the where section of the query by CustomFields('where')
*/
//modif Francois: fix error Warning: Missing argument 3 for CustomFields()
//FJ fix error Warning: Missing argument 3 for CustomFields()
//function CustomFields($location,$type='student',$extra)
function CustomFields($location,$type='student',$extra=array())
{ global $_ROSARIO;
......
......@@ -41,15 +41,15 @@ function ProperDate($date='',$length='long')
if(!empty($_REQUEST['_ROSARIO_PDF']) && $_REQUEST['LO_save'] && Preferences('E_DATE')=='MM/DD/YYYY')
return $comment.$month.'/'.$day.'/'.$year;
//modif Francois: display locale with strftime()
//FJ display locale with strftime()
// if((Preferences('MONTH')=='m' || Preferences('MONTH')=='M') && (Preferences('DAY')=='j' || Preferences('DAY')=='d') && Preferences('YEAR'))
if((Preferences('MONTH')=='%m' || Preferences('MONTH')=='%b') && Preferences('DAY')=='%d' && Preferences('YEAR'))
$sep = '/';
else
$sep = ' ';
//modif Francois: display locale with strftime()
//modif Francois: NOBR on date
//FJ display locale with strftime()
//FJ NOBR on date
return $comment.'<span style="white-space:nowrap">'.mb_convert_case(iconv('','UTF-8',strftime((($length=='long' || Preferences('MONTH')!='%B')?Preferences('MONTH'):'%b').$sep.Preferences('DAY').$sep.Preferences('YEAR'),mktime(0,0,0,$month+0,$day+0,$year+0))), MB_CASE_TITLE).'</span>';
// return $comment.date((($length=='long' || Preferences('MONTH')!='F')?Preferences('MONTH'):'M').$sep.Preferences('DAY').$sep.Preferences('YEAR'),mktime(0,0,0,$month+0,$day+0,$year+0));
}
......@@ -165,7 +165,7 @@ function PrepareDate($date,$title='',$allow_na=true,$options='')
$return .= '<!-- '.$year.MonthNWSwitch($month,'tonum').$day.' -->';
}
//modif Francois: NOBR on date input
//FJ NOBR on date input