[svn r20693] FS#306 - Replacing some natural language unsafe occurrences of the functions strtolower() and strtoupper().

skala
Ivan Tcholakov 16 years ago
parent 5dcd632414
commit 23c944be83
  1. 8
      main/inc/lib/search/search_widget.php
  2. 6
      main/survey/survey.php
  3. 18
      main/upload/form.scorm.php

@ -142,8 +142,8 @@ function search_widget_normal_form($action, $show_thesaurus, $sf_terms, $op) {
<tr>
<td id="operator-select">
'. get_lang('SearchCombineSearchWith') .':<br />
<input type="radio" class="search-operator" name="operator" value="or" '. $or_checked .'>'. strtoupper(get_lang('Or')) .'</input>
<input type="radio" class="search-operator" name="operator" value="and" '. $and_checked .'>'. strtoupper(get_lang('And')) .'</input>
<input type="radio" class="search-operator" name="operator" value="or" '. $or_checked .'>'. api_strtoupper(get_lang('Or')) .'</input>
<input type="radio" class="search-operator" name="operator" value="and" '. $and_checked .'>'. api_strtoupper(get_lang('And')) .'</input>
</td>
<td></td>
<td>
@ -226,8 +226,8 @@ function search_widget_prefilter_form($action, $show_thesaurus, $sf_terms, $op,
<tr>
<td id="operator-select">
'. get_lang('SearchCombineSearchWith') .':<br />
<input type="radio" class="search-operator" name="operator" value="or" '. $or_checked .'>'. strtoupper(get_lang('Or')) .'</input>
<input type="radio" class="search-operator" name="operator" value="and" '. $and_checked .'>'. strtoupper(get_lang('And')) .'</input>
<input type="radio" class="search-operator" name="operator" value="or" '. $or_checked .'>'. api_strtoupper(get_lang('Or')) .'</input>
<input type="radio" class="search-operator" name="operator" value="and" '. $and_checked .'>'. api_strtoupper(get_lang('And')) .'</input>
</td>
<td></td>
<td>

@ -1,4 +1,4 @@
<?php // $Id: survey.php 20682 2009-05-15 11:11:07Z ivantcholakov $
<?php // $Id: survey.php 20693 2009-05-15 13:27:00Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
@ -23,7 +23,7 @@
* @package dokeos.survey
* @author unknown
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
* @version $Id: survey.php 20682 2009-05-15 11:11:07Z ivantcholakov $
* @version $Id: survey.php 20693 2009-05-15 13:27:00Z ivantcholakov $
*
* @todo use quickforms for the forms
*/
@ -135,7 +135,7 @@ if (isset($_GET['action'])) {
if (isset($_GET['message'])) {
// we have created the survey or updated the survey
if (in_array($_GET['message'], array('SurveyUpdatedSuccesfully','SurveyCreatedSuccesfully'))) {
Display::display_confirmation_message(get_lang($message_information).','.PHP_EOL.strtolower(get_lang('YouCanNowAddQuestionToYourSurvey')));
Display::display_confirmation_message(get_lang($message_information).','.PHP_EOL.api_strtolower(get_lang('YouCanNowAddQuestionToYourSurvey')));
}
// we have added a question
if (in_array($_GET['message'], array('QuestionAdded','QuestionUpdated'))) {

@ -35,7 +35,7 @@ $nameTools = get_lang("FileUpload");
$interbreadcrumb[]= array ("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang("Learnpath"));
Display::display_header($nameTools,"Path");
//show the title
//api_display_tool_title(get_lang("Learnpath")." - ".$nameTools.$add_group_to_title);
//api_display_tool_title(get_lang("Learnpath")." - ".$nameTools.$add_group_to_title);
//TODO: Include right language file
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
@ -43,7 +43,7 @@ include('../newscorm/content_makers.inc.php');
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
$form = new FormValidator('','POST','upload.php','','id="upload_form" enctype="multipart/form-data" style="background-image: url(\'../img/scorm.jpg\'); background-repeat: no-repeat; background-position: 600px;"');
$form->addElement('header', '', $nameTools);
$form->addElement('header', '', $nameTools);
$form->addElement('hidden', 'curdirpath', $path);
$form->addElement('hidden', 'tool', $my_tool);
@ -74,28 +74,28 @@ $form->addElement('style_submit_button','submit', get_lang('Send'),'class="save"
$form->addElement('html', '<br /><br /><br />');
/*$list = get_zip_files_in_garbage();
if(count($list)>0){
$select_file_name = &$form->addElement('select','file_name',get_lang('Or').' '.strtolower(get_lang('UploadLocalFileFromGarbageDir')));
$select_file_name = &$form->addElement('select','file_name',get_lang('Or').' '.api_strtolower(get_lang('UploadLocalFileFromGarbageDir')));
foreach($list as $file){
$select_file_name->addOption($file,$file);
}
$form->addElement('submit', 'submit', get_lang('Download'));
}
else{
$text_empty = &$form->addElement('text', 'empty', get_lang('Or').' '.strtolower(get_lang('UploadLocalFileFromGarbageDir')));
$text_empty = &$form->addElement('text', 'empty', get_lang('Or').' '.api_strtolower(get_lang('UploadLocalFileFromGarbageDir')));
$defaults["empty"] = get_lang('Empty');
$text_empty->freeze();
}*/
$form->add_real_progress_bar('uploadScorm','user_file');
// the rules for the form
$form->addRule('user_file', '<div class="required">'.get_lang('ThisFieldIsRequired'), 'required');
// the default values for the form
// the rules for the form
$form->addRule('user_file', '<div class="required">'.get_lang('ThisFieldIsRequired'), 'required');
// the default values for the form
$defaults = array('index_document'=>'checked="checked"');
$form->setDefaults($defaults);
$form->display();
// footer
// footer
Display::display_footer();
?>
?>

Loading…
Cancel
Save