[svn r20709] FS#306 - Replacing some natural language unsafe occurrences of the function ucfirst().

skala
Ivan Tcholakov 16 years ago
parent d4663a7518
commit 5a41aa413d
  1. 10
      main/admin/calendar.lib.php
  2. 4
      main/admin/calendar_view_print.php
  3. 6
      main/admin/configure_homepage.php
  4. 4
      main/admin/course_user_list.php
  5. 12
      main/admin/index.php
  6. 8
      main/admin/resume_session.php
  7. 2
      main/calendar/myagenda.inc.php
  8. 2
      main/chat/chat_whoisonline.php
  9. 6
      main/inc/lib/text.lib.php
  10. 2
      main/mySpace/access_details.php
  11. 2
      main/newscorm/lp_edit.php
  12. 2
      main/notebook/index.php
  13. 2
      main/reservation/reservation.php
  14. 2
      main/social/profile.php
  15. 8
      main/work/work.lib.php
  16. 8
      main/work/work.php

@ -753,7 +753,7 @@ function display_agenda_items()
{
$month_bar = date("m",strtotime($myrow["start_date"])).date("Y",strtotime($myrow["start_date"]));
echo "\t<tr>\n\t\t<td class=\"agenda_month_divider\" colspan=\"3\" valign=\"top\">".
ucfirst(format_locale_date("%B %Y",strtotime($myrow["start_date"]))).
api_ucfirst(format_locale_date("%B %Y",strtotime($myrow["start_date"]))).
"</td>\n\t</tr>\n";
}
@ -822,14 +822,14 @@ function display_agenda_items()
--------------------------------------------------*/
echo "<tr class='row_odd'>";
echo "\t\t<td>".get_lang("StartTimeWindow").": ";
echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."&nbsp;&nbsp;&nbsp;";
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["start_date"])))."";
echo "</td>\n";
echo "\t\t<td>";
if ($myrow["end_date"]<>"0000-00-00 00:00:00")
{
echo get_lang("EndTimeWindow").": ";
echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"])))."";
}
echo "</td>\n";
@ -1067,11 +1067,11 @@ function display_one_agenda_item($agenda_id)
--------------------------------------------------*/
echo "\t<tr class=\"".$stylenotbold."\">\n";
echo "\t\t<td>".get_lang("StartTime").": ";
echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."&nbsp;&nbsp;&nbsp;";
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["start_date"])))."";
echo "</td>\n";
echo "\t\t<td>".get_lang("EndTime").": ";
echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"])))."";
echo "</td>\n";
echo "\n\t</tr>\n";

@ -82,14 +82,14 @@ while($row=Database::fetch_array($result))
echo get_lang('StartTime').' : ';
echo ucfirst(format_locale_date($dateFormatLong,strtotime($row["start_date"])))."&nbsp;&nbsp;&nbsp;";
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($row["start_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($row["start_date"])))."";
echo '<br />';
echo get_lang('EndTime').' : ';
echo ucfirst(format_locale_date($dateFormatLong,strtotime($row["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($row["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($row["end_date"])))."";
echo '<br /><br />';

@ -1,4 +1,4 @@
<?php // $Id: configure_homepage.php 20441 2009-05-10 07:39:15Z ivantcholakov $
<?php // $Id: configure_homepage.php 20709 2009-05-15 19:12:37Z ivantcholakov $
/*
===== =========================================================================
Dokeos - elearning and course management software
@ -924,8 +924,8 @@ switch($action){
<div class="menusection">
<span class="menusectioncaption"><?php echo get_lang('User'); ?></span>
<ul class="menulist">
<li><span style="color: #9D9DA1; font-weight: bold;"><?php echo ucfirst(get_lang('Registration')); ?></span></li>
<li><span style="color: #9D9DA1; font-weight: bold;"><?php echo ucfirst(get_lang('LostPassword')); ?></span></li>
<li><span style="color: #9D9DA1; font-weight: bold;"><?php echo api_ucfirst(get_lang('Registration')); ?></span></li>
<li><span style="color: #9D9DA1; font-weight: bold;"><?php echo api_ucfirst(get_lang('LostPassword')); ?></span></li>
</ul>
</div>

@ -15,7 +15,7 @@ for ($i=0;$i<count($list_course_all_info);$i++) {
if (count($list_course)==0) {
?>
<tr>
<td><?php echo ucfirst((get_lang('HaveNoCourse'))); ?></td>
<td><?php echo api_ucfirst((get_lang('HaveNoCourse'))); ?></td>
</tr>
<?php
}
@ -25,4 +25,4 @@ if (count($list_course)==0) {
<td><?php echo mb_convert_encoding($list_course[$k],'UTF-8',$charset);?></td>
</tr>
<?php }?>
</table>
</table>

@ -1,4 +1,4 @@
<?php // $Id: index.php 20441 2009-05-10 07:39:15Z ivantcholakov $
<?php // $Id: index.php 20709 2009-05-15 19:12:37Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
@ -83,7 +83,7 @@ if(api_is_platform_admin())
if (api_is_platform_admin()) {
?>
<div class="admin_section">
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo ucfirst(get_lang('Users')); ?></h4>
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo api_ucfirst(get_lang('Users')); ?></h4>
<ul>
<li style="list-style-type:none"><form method="get" action="user_list.php">
<input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
@ -91,7 +91,7 @@ if (api_is_platform_admin()) {
</button>
</form>
</li>
<li><a href="user_list.php?search=advanced"><?php echo ucfirst(get_lang('AdvancedSearch')); ?></a></li>
<li><a href="user_list.php?search=advanced"><?php echo api_ucfirst(get_lang('AdvancedSearch')); ?></a></li>
<li><a href="user_list.php"> <?php echo get_lang('UserList') ?></a></li>
<li><a href="user_add.php"> <?php echo get_lang('AddUsers') ?></a></li>
<li><a href="user_export.php"> <?php echo get_lang('ExportUserListXMLCSV') ?></a></li>
@ -105,7 +105,7 @@ else
{
?>
<div class="admin_section">
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo ucfirst(get_lang('Users')); ?></h4>
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo api_ucfirst(get_lang('Users')); ?></h4>
<ul>
<li><a href="user_list.php"> <?php echo get_lang('UserList') ?></a></li>
<li><a href="../mySpace/user_add.php"> <?php echo get_lang('AddUsers') ?></a></li>
@ -119,7 +119,7 @@ else
if(api_is_platform_admin()) {
?>
<div class="admin_section">
<h4><?php Display::display_icon('course.gif', get_lang('Courses')); ?> <?php echo ucfirst(get_lang('Courses')); ?></h4>
<h4><?php Display::display_icon('course.gif', get_lang('Courses')); ?> <?php echo api_ucfirst(get_lang('Courses')); ?></h4>
<ul><li style="list-style-type:none"><form method="get" action="course_list.php">
<input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
<button class="search" type="submit"> <?php echo get_lang('Search');?>
@ -143,7 +143,7 @@ if(api_is_platform_admin()) {
</div>
<div class="admin_section">
<h4><?php Display::display_icon('settings.gif', get_lang('Platform')); ?> <?php echo ucfirst(get_lang('Platform')); ?></h4>
<h4><?php Display::display_icon('settings.gif', get_lang('Platform')); ?> <?php echo api_ucfirst(get_lang('Platform')); ?></h4>
<ul>
<li><a href="settings.php"><?php echo get_lang('DokeosConfigSettings') ?></a></li>
<li><a href="system_announcements.php"><?php echo get_lang('SystemAnnouncements') ?></a></li>

@ -1,4 +1,4 @@
<?php // $Id: resume_session.php 18673 2009-02-25 04:53:55Z yannoo $
<?php // $Id: resume_session.php 20709 2009-05-15 19:12:37Z ivantcholakov $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -130,7 +130,7 @@ api_display_tool_title($tool_name);
<!-- show nb_days_before and nb_days_after only if they are different from 0 -->
<tr>
<td>
<?php echo ucfirst(get_lang('DaysBefore')) ?> :
<?php echo api_ucfirst(get_lang('DaysBefore')) ?> :
</td>
<td>
<?php echo intval($session['nb_days_access_before_beginning']) ?>
@ -138,7 +138,7 @@ api_display_tool_title($tool_name);
</tr>
<tr>
<td>
<?php echo ucfirst(get_lang('DaysAfter')) ?> :
<?php echo api_ucfirst(get_lang('DaysAfter')) ?> :
</td>
<td>
<?php echo intval($session['nb_days_access_after_end']) ?>
@ -257,4 +257,4 @@ else {
<?php
// footer
Display :: display_footer();
?>
?>

@ -839,7 +839,7 @@ function show_simple_personal_agenda($user_id)
--------------------------------------------------*/
// adding an internal anchor
$content.= date("d", strtotime($myrow["date"]))." ".$MonthsLong[date("n", strtotime($myrow["date"])) - 1]." ".date("Y", strtotime($myrow["date"]))."&nbsp;";
$content.= ucfirst(strftime(get_lang("timeNoSecFormat"), strtotime($myrow["date"])));
$content.= api_ucfirst(strftime(get_lang("timeNoSecFormat"), strtotime($myrow["date"])));
/*--------------------------------------------------
display: the title

@ -114,7 +114,7 @@ if (!empty($course))
?>
<tr>
<td width="1%" valign="top"><img src="<?php echo $file_url;?>" border="0" width="22" alt="" /></td>
<td width="99%"><?php if($status == 1) echo Display::return_icon('teachers.gif', get_lang('Teacher'),array('height' => '11')).' '; else echo Display::return_icon('students.gif', get_lang('Student'), array('height' => '11'));?><a <?php if($status == 1) echo 'class="master"';// ?> name="user_<?php echo $enreg['user_id']; ?>" href="<?php echo api_get_self(); ?>?<?php echo api_get_cidreq();?>&showPic=<?php if($showPic == $enreg['user_id']) echo '0'; else echo $enreg['user_id']; ?>#user_<?php echo $enreg['user_id']; ?>"><?php echo ucfirst($enreg['firstname']).' '.ucfirst($enreg['lastname']); ?></a></td>
<td width="99%"><?php if($status == 1) echo Display::return_icon('teachers.gif', get_lang('Teacher'),array('height' => '11')).' '; else echo Display::return_icon('students.gif', get_lang('Student'), array('height' => '11'));?><a <?php if($status == 1) echo 'class="master"';// ?> name="user_<?php echo $enreg['user_id']; ?>" href="<?php echo api_get_self(); ?>?<?php echo api_get_cidreq();?>&showPic=<?php if($showPic == $enreg['user_id']) echo '0'; else echo $enreg['user_id']; ?>#user_<?php echo $enreg['user_id']; ?>"><?php echo api_ucfirst($enreg['firstname']).' '.api_ucfirst($enreg['lastname']); ?></a></td>
</tr>
<?php

@ -1,4 +1,4 @@
<?php // $Id: text.lib.php 20682 2009-05-15 11:11:07Z ivantcholakov $
<?php // $Id: text.lib.php 20709 2009-05-15 19:12:37Z ivantcholakov $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -286,8 +286,8 @@ function date_to_str_ago($date)
static $sec_time_time, $sec_time_sing, $sec_time_plu;
if (!$initialized) {
$today = ucfirst(get_lang('Today'));
$yesterday = ucfirst(get_lang('Yesterday'));
$today = api_ucfirst(get_lang('Today'));
$yesterday = api_ucfirst(get_lang('Yesterday'));
$min_decade=get_lang('MinDecade');
$min_year=get_lang('MinYear');

@ -296,7 +296,7 @@ echo '<strong>'.get_lang('User').': '.$mainUserInfo['firstName'].' '.$mainUserIn
<div id="container-9">
<ul>
<li><a href="access_details.php?type=day&course=<?php echo $course_code?>&student=<?php echo $user_id?>"><span> <?php echo get_lang('Day'); ?></span></a></li>
<li><a href="access_details.php?type=month&course=<?php echo $course_code?>&student=<?php echo $user_id?>"><span><?php echo ucfirst(get_lang('MinMonth')); ?></span></a></li>
<li><a href="access_details.php?type=month&course=<?php echo $course_code?>&student=<?php echo $user_id?>"><span><?php echo api_ucfirst(get_lang('MinMonth')); ?></span></a></li>
</ul>
<?php echo '<div id="show"></div>';?>
</div>

@ -94,7 +94,7 @@ if (api_get_setting('allow_course_theme') == 'true')
}
//Author
//$form -> addElement('text', 'lp_author', ucfirst(get_lang('Author')));
//$form -> addElement('text', 'lp_author', api_ucfirst(get_lang('Author')));
//$form->add_html_editor('lp_author', get_lang('Author'));
$form->addElement('html_editor','lp_author',get_lang('Author'),array('size'=>80) );

@ -36,7 +36,7 @@ event_access_tool(TOOL_NOTEBOOK);
if ( isset($_GET['action']) && ($_GET['action'] == 'addnote' || $_GET['action'] == 'editnote')) {
$tool=get_lang('NotebookManagement');
$interbreadcrumb[] = array ("url"=>"index.php", "name"=> ucfirst(get_lang(TOOL_NOTEBOOK)));
$interbreadcrumb[] = array ("url"=>"index.php", "name"=> api_ucfirst(get_lang(TOOL_NOTEBOOK)));
}
// displaying the header

@ -130,7 +130,7 @@ if ($gogogo&&!empty($_GET['cat'])) {
ob_end_clean();
$legend=getBlock('green').' '.ucfirst(get_lang('OpenBooking')).' '.getBlock('blue').' '.get_lang('TimePicker').' '.getBlock('orange').' '.get_lang('OutPeriod').' '.getBlock('red').' '.get_lang('Reserved').' '.getBlock('grey').' '.get_lang('NoReservations').' '.getBlock('black').' '.get_lang('Blackout');
$legend=getBlock('green').' '.api_ucfirst(get_lang('OpenBooking')).' '.getBlock('blue').' '.get_lang('TimePicker').' '.getBlock('orange').' '.get_lang('OutPeriod').' '.getBlock('red').' '.get_lang('Reserved').' '.getBlock('grey').' '.get_lang('NoReservations').' '.getBlock('black').' '.get_lang('Blackout');
echo '<br /><br /><div style="text-align:right; border-bottom: 2px dotted #666; margin: 0 0 0.2em 0; padding: 0.2em;clear:both;font-family: Verdana,sans-serif;font-size: 1.2em;color:#666;font-weight:bold">'.$GLOBALS['weekstart'].' - '.$GLOBALS['weekend'].'</div>'.$buffer.'<div style="clear:both;">&nbsp;</div><div style="background-color:#EEE;padding: 0.5em;font-family:Verdana;sans-serif;font-size:10px;text-align:center">'.$legend.'</div>';
}
}

@ -760,7 +760,7 @@ echo '<div id="social-profile-container">';
//echo '<pre>';
if ( is_array($list) ) {
echo '<div class="sectiontitle">';
echo ucfirst(get_lang('MyCourses'));
echo api_ucfirst(get_lang('MyCourses'));
echo '</div>';
echo '<div class="social-content-training">';
//Courses whithout sessions

@ -1,4 +1,4 @@
<?php //$Id: work.lib.php 20700 2009-05-15 16:35:50Z cvargas1 $
<?php //$Id: work.lib.php 20709 2009-05-15 19:12:37Z ivantcholakov $
/* For licensing terms, see /dokeos_license.txt */
/**
* @package dokeos.work
@ -6,7 +6,7 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default.
* @author Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management
* @version $Id: work.lib.php 20700 2009-05-15 16:35:50Z cvargas1 $
* @version $Id: work.lib.php 20709 2009-05-15 19:12:37Z ivantcholakov $
*/
/**
* Displays action links (for admins, authorized groups members and authorized students)
@ -622,7 +622,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
}
if ($direc_date!='' && $direc_date!='0000-00-00 00:00:00') {
$my_direc_date = ucfirst(format_locale_date($dateFormatShort,strtotime($direc_date))).'&nbsp;&nbsp;&nbsp;&nbsp;';
$my_direc_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($direc_date))).'&nbsp;&nbsp;&nbsp;&nbsp;';
$my_direc_date .= ucfirst(strftime($timeNoSecFormat,strtotime($direc_date)));
$row[]= date_to_str_ago($direc_date).'<br><span class="dropbox_date">'.$my_direc_date.'</span>';
} else {
@ -683,7 +683,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$row[]= build_document_icon_tag('file',$work->url);
$row[]= '<a href="download.php?file='.$url.'"'.$class.'><img src="../img/filesave.gif" style="float:right;" alt="'.get_lang('Save').'" title="'.get_lang('Save').'" />'.$work->title.'</a><br />'.$work->description;
$row[]= display_user_link($row2['insert_user_id'],$work->author).$qualification_string;// $work->author;
$sent_date = ucfirst(format_locale_date($dateFormatShort,strtotime($work->sent_date))).'&nbsp;&nbsp;&nbsp;&nbsp;';
$sent_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($work->sent_date))).'&nbsp;&nbsp;&nbsp;&nbsp;';
$sent_date .= ucfirst(strftime($timeNoSecFormat,strtotime($work->sent_date)));
$row[]= date_to_str_ago($work->sent_date).$add_string.'<br><span class="dropbox_date">'.$sent_date.'</span>';

@ -1,4 +1,4 @@
<?php //$Id: work.php 20700 2009-05-15 16:35:50Z cvargas1 $
<?php //$Id: work.php 20709 2009-05-15 19:12:37Z ivantcholakov $
/* For licensing terms, see /dokeos_license.txt */
/**
* @package dokeos.work
@ -6,7 +6,7 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default.
* @author Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management
* @version $Id: work.php 20700 2009-05-15 16:35:50Z cvargas1 $
* @version $Id: work.php 20709 2009-05-15 19:12:37Z ivantcholakov $
*
* @todo refactor more code into functions, use quickforms, coding standards, ...
*/
@ -1074,9 +1074,9 @@ if($is_special > 0):
Display :: display_normal_message($publication['description']);
}
$ends_on = ucfirst(format_locale_date($dateFormatLong,strtotime($homework['ends_on']))).' ';
$ends_on = api_ucfirst(format_locale_date($dateFormatLong,strtotime($homework['ends_on']))).' ';
$ends_on .= ucfirst(strftime($timeNoSecFormat,strtotime($homework['ends_on'])));
$expires_on = ucfirst(format_locale_date($dateFormatLong,strtotime($homework['expires_on']))).' ';
$expires_on = api_ucfirst(format_locale_date($dateFormatLong,strtotime($homework['expires_on']))).' ';
$expires_on .= ucfirst(strftime($timeNoSecFormat,strtotime($homework['expires_on'])));
if($has_ended) {
Display :: display_error_message(get_lang('EndDateAlreadyPassed').' '.$ends_on);

Loading…
Cancel
Save