Minor - flint fixes

pull/2484/head
jmontoyaa 8 years ago
parent 3ab7b56d2f
commit 3daf627d3b
  1. 13
      main/auth/inscription.php
  2. 1
      main/cron/lang/list_undefined_langvars.php
  3. 5
      main/cron/lang/switch_files_to_gettext.php
  4. 10
      main/inc/lib/fileManage.lib.php
  5. 6
      main/inc/lib/internationalization.lib.php
  6. 9
      main/inc/lib/sessionmanager.lib.php

@ -91,7 +91,6 @@ if (!empty($course_code_redirect)) {
}
if ($user_already_registered_show_terms === false) {
// STUDENT/TEACHER
if (api_get_setting('allow_registration_as_teacher') != 'false') {
if (in_array('status', $allowedFields)) {
@ -108,7 +107,6 @@ if ($user_already_registered_show_terms === false) {
}
}
if (api_is_western_name_order()) {
// FIRST NAME and LAST NAME
$form->addElement('text', 'firstname', get_lang('FirstName'), ['size' => 40]);
@ -150,7 +148,6 @@ if ($user_already_registered_show_terms === false) {
$form->addElement('text', 'openid', get_lang('OpenIDURL'), ['size' => 40]);
}
// USERNAME
if (api_get_setting('login_is_email') != 'true') {
$form->addText(
@ -197,7 +194,6 @@ if ($user_already_registered_show_terms === false) {
$form->addRule(['pass1', 'pass2'], get_lang('PassTwo'), 'compare');
$form->addPasswordRule('pass1');
// PHONE
if (in_array('phone', $allowedFields)) {
$form->addElement(
@ -225,7 +221,6 @@ if ($user_already_registered_show_terms === false) {
}
}
// OFFICIAL CODE
if (CONFVAL_ASK_FOR_OFFICIAL_CODE) {
if (in_array('official_code', $allowedFields)) {
@ -245,7 +240,6 @@ if ($user_already_registered_show_terms === false) {
}
}
// EXTENDED FIELDS
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'mycomptetences') == 'true'
@ -258,6 +252,7 @@ if ($user_already_registered_show_terms === false) {
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
);
}
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'mydiplomas') == 'true'
) {
@ -269,6 +264,7 @@ if ($user_already_registered_show_terms === false) {
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
);
}
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'myteach') == 'true'
) {
@ -280,6 +276,7 @@ if ($user_already_registered_show_terms === false) {
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
);
}
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'mypersonalopenarea') == 'true'
) {
@ -291,6 +288,7 @@ if ($user_already_registered_show_terms === false) {
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
);
}
if (api_get_setting('extended_profile') === 'true') {
if (api_get_setting('extendedprofile_registration', 'mycomptetences') === 'true' &&
api_get_setting('extendedprofile_registrationrequired', 'mycomptetences') === 'true'
@ -332,8 +330,7 @@ if ($user_already_registered_show_terms === false) {
);
}
//CAPTCHA
// CAPTCHA
$captcha = api_get_setting('allow_captcha');
$allowCaptcha = $captcha === 'true';

@ -72,4 +72,3 @@ foreach ($undefined_terms as $term => $file) {
echo "</td></tr>\n";
}
echo "</table>\n";

@ -1,6 +1,7 @@
<?php /* For licensing terms, see /license.txt */
<?php
/* For licensing terms, see /license.txt */
/**
* Script to switch all PHP files in Chamilo to a more Gettext-like syntax
* Script to switch all PHP files in Chamilo to a more Gettext-like syntax.
*
* @package chamilo.cron.lang
*/

@ -64,6 +64,7 @@ function my_delete($file)
return true;
}
}
return false; // no file or directory to delete
}
@ -258,6 +259,7 @@ function move($source, $target, $forceMove = true, $moveContent = false)
return true;
}
}
return false;
}
@ -346,8 +348,10 @@ function getextension($filename)
/**
* Get a list of all PHP (.php) files in a given directory. Includes .tpl files
* @param string $base_path The base path in which to find the corresponding files
* @param bool $includeStatic Include static .html, .htm and .css files
*
* @param string $base_path The base path in which to find the corresponding files
* @param bool $includeStatic Include static .html, .htm and .css files
*
* @return array
*/
function getAllPhpFiles($base_path, $includeStatic = false)
@ -381,4 +385,4 @@ function getAllPhpFiles($base_path, $includeStatic = false)
$list = null;
return $files;
}
}

@ -413,9 +413,9 @@ function api_get_timezone()
* @param bool $returnNullIfInvalidDate if the date is not correct return null instead of the current date
* @param bool $returnObj
*
* @return string|DateTime The DATETIME in UTC to be inserted in the DB,
* or null if the format of the argument is not supported
* or datetime
* @return string|DateTime The DATETIME in UTC to be inserted in the DB,
* or null if the format of the argument is not supported
* or datetime
*
* @author Julio Montoya - Adding the 2nd parameter
* @author Guillaume Viguier <guillaume.viguier@beeznest.com>

@ -3242,9 +3242,9 @@ class SessionManager
s.session_category_id,
c.name as category_name,
s.description,
(SELECT COUNT(*) FROM session_rel_user WHERE session_id = s.id) as users,
(SELECT COUNT(*) FROM c_lp WHERE session_id = s.id) as lessons,
(SELECT value FROM extra_field_values WHERE field_id = 16 AND item_id = s.id) as image
(SELECT COUNT(*) FROM session_rel_user WHERE session_id = s.id) as users,
(SELECT COUNT(*) FROM c_lp WHERE session_id = s.id) as lessons,
(SELECT value FROM extra_field_values WHERE field_id = 16 AND item_id = s.id) as image
FROM $tbl_session s
LEFT JOIN $tbl_session_category c
ON s.session_category_id = c.id
@ -3256,7 +3256,7 @@ class SessionManager
$plugin = BuyCoursesPlugin::create();
$checker = $plugin->isEnabled();
$sessions = [];
if (Database::num_rows($result) > 0) {
while ($row = Database::fetch_array($result, 'ASSOC')) {
if ($checker) {
@ -3267,6 +3267,7 @@ class SessionManager
}
$sessions[] = $row;
}
return $sessions;
} else {
return false;

Loading…
Cancel
Save