Skip to content

Commit 9b82ca4

Browse files
committed
Merge
2 parents f12154c + ed4f8dd commit 9b82ca4

File tree

1,730 files changed

+45806
-36137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,730 files changed

+45806
-36137
lines changed

certificates/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
/* For licensing terms, see /license.txt */
33
/**
4-
* Show specified user certificate
4+
* Show specified user certificate.
5+
*
56
* @package chamilo.certificate
67
*/
7-
88
require_once '../main/inc/global.inc.php';
99

1010
$action = isset($_GET['action']) ? $_GET['action'] : null;
@@ -29,7 +29,7 @@
2929
'top' => 0,
3030
'right' => 0,
3131
'bottom' => 0,
32-
'left' => 0
32+
'left' => 0,
3333
];
3434

3535
$orientation = api_get_configuration_value('certificate_pdf_orientation');

cli-config.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33

44
/**
55
* Script needed to execute bin/doctrine.php in the command line
6-
* in order to:
6+
* in order to:.
77
*
88
* - Generate migrations
99
* - Create schema
1010
* - Update schema
1111
* - Validate schema
1212
* - Etc
13-
**/
14-
13+
*/
1514
use Doctrine\ORM\Tools\Console\ConsoleRunner;
1615

1716
require_once __DIR__.'/vendor/autoload.php';
@@ -31,7 +30,7 @@
3130
'host' => $_configuration['db_host'],
3231
'user' => $_configuration['db_user'],
3332
'password' => $_configuration['db_password'],
34-
'dbname' => $_configuration['main_database']
33+
'dbname' => $_configuration['main_database'],
3534
];
3635

3736
$database->connect($dbParams, realpath(__DIR__).'/', realpath(__DIR__).'/');

custompages/first_login-dist.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22
/* For licensing terms, see /license.txt */
33
/**
4-
* Quick page to react to first login cases
4+
* Quick page to react to first login cases.
5+
*
56
* @package chamilo.custompages
67
*/
7-
88
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
99
require_once __DIR__.'/language.php';
1010

1111
/**
12-
* Security checks
12+
* Security checks.
1313
*/
1414
if (!isset($_SESSION['conditional_login']['uid'])) {
1515
die("Not Authorised");
@@ -60,15 +60,15 @@
6060
}
6161
$www = api_get_path('WEB_PATH');
6262
/**
63-
* HTML output
63+
* HTML output.
6464
*/
6565
?>
6666
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6767
<html>
6868
<head>
6969
<title>Custompage - login</title>
7070
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
71-
<script type="text/javascript" src="<?php echo $www ?>web/assets/jquery/dist/jquery.min.js"></script>
71+
<script type="text/javascript" src="<?php echo $www; ?>web/assets/jquery/dist/jquery.min.js"></script>
7272
<script type="text/javascript">
7373
$(document).ready(function() {
7474
if (top.location != location)

custompages/index-logged-dist.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<?php
22
/* For licensing terms, see /license.txt */
33
/**
4-
* Redirect to normal Chamilo
4+
* Redirect to normal Chamilo.
5+
*
56
* @package chamilo.custompages
67
*/
78
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
89

910
$www = api_get_path('WEB_PATH');
1011
/**
11-
* Redirect
12+
* Redirect.
1213
*/
1314
header("Location: $www/user_portal.php");
1415
exit;

custompages/index-unlogged-dist.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22
/* For licensing terms, see /license.txt */
33
/**
4-
* Redirect script
4+
* Redirect script.
5+
*
56
* @package chamilo.custompages
67
*/
7-
88
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
99
require_once __DIR__.'/language.php';
1010

1111
/**
12-
* Homemade micro-controller
12+
* Homemade micro-controller.
1313
*/
1414
if (isset($_GET['loginFailed'])) {
1515
if (isset($_GET['error'])) {
@@ -37,14 +37,14 @@
3737
$rootWeb = api_get_path('WEB_PATH');
3838

3939
/**
40-
* HTML output
40+
* HTML output.
4141
*/
4242
?>
4343
<html>
4444
<head>
4545
<title>Custompage - login</title>
4646
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
47-
<script type="text/javascript" src="<?php echo $rootWeb ?>web/assets/jquery/dist/jquery.min.js"></script>
47+
<script type="text/javascript" src="<?php echo $rootWeb; ?>web/assets/jquery/dist/jquery.min.js"></script>
4848
<script type="text/javascript">
4949
$(document).ready(function() {
5050
if (top.location != location) {
@@ -62,11 +62,11 @@
6262
</head>
6363
<body>
6464
<div id="backgroundimage">
65-
<img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/page-background.png" class="backgroundimage" />
65+
<img src="<?php echo api_get_path(WEB_PATH); ?>/custompages/images/page-background.png" class="backgroundimage" />
6666
</div>
6767
<div id="wrapper">
6868
<div id="header">
69-
<img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/header.png" alt="Logo" />
69+
<img src="<?php echo api_get_path(WEB_PATH); ?>/custompages/images/header.png" alt="Logo" />
7070
</div> <!-- #header -->
7171
<div id="login-form-box" class="form-box">
7272
<div id="login-form-info" class="form-info">
@@ -79,7 +79,7 @@
7979
echo '<div id="login-form-info" class="form-error">'.$error_message.'</div>';
8080
}
8181
?>
82-
<form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH)?>index.php" method="post">
82+
<form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH); ?>index.php" method="post">
8383
<div>
8484
<label for="login">*<?php echo custompages_get_lang('User'); ?></label>
8585
<input name="login" type="text" /><br />
@@ -95,13 +95,13 @@
9595
<?php if (api_get_setting('allow_registration') === 'true') {
9696
?>
9797
<a href="<?php echo api_get_path(WEB_CODE_PATH); ?>auth/inscription.php?language=<?php echo api_get_interface_language(); ?>">
98-
<?php echo custompages_get_lang('Registration')?>
98+
<?php echo custompages_get_lang('Registration'); ?>
9999
</a><br />
100100
<?php
101101
} ?>
102102

103103
<a href="<?php echo api_get_path(WEB_CODE_PATH); ?>auth/lostPassword.php?language=<?php echo api_get_interface_language(); ?>">
104-
<?php echo custompages_get_lang('LostPassword')?>
104+
<?php echo custompages_get_lang('LostPassword'); ?>
105105
</a>
106106
</div>
107107
</div> <!-- #form -->

custompages/language.inc.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
* to the best pick according to the visitor's browser's options.
77
* 2011, Jean-Karim Bockstael, CBlue <jeankarim@cblue.be>
88
* This requires the Chamilo system to be initialized
9-
* (note that it's easier to do the following include in the parent page)
9+
* (note that it's easier to do the following include in the parent page).
10+
*
1011
* @package chamilo.custompages
1112
*/
1213
/**
13-
* Returns the best match between available languages and visitor preferences
14+
* Returns the best match between available languages and visitor preferences.
15+
*
1416
* @return string the best match as 2-chars code, null when none match
15-
*/
17+
*/
1618
function get_preferred_language($available_langs)
1719
{
1820
// Parsing the Accept-languages HTTP header
@@ -43,7 +45,7 @@ function get_preferred_language($available_langs)
4345
}
4446

4547
/**
46-
* Get a language variable in a specific language
48+
* Get a language variable in a specific language.
4749
*/
4850
function custompages_get_lang($variable)
4951
{

custompages/language.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/* For licensing terms, see /license.txt */
33
/**
44
* Definition of language-related functions for cases where th user isn't
5-
* logged in yet
5+
* logged in yet.
6+
*
67
* @package chamilo.custompages
78
*/
89
// Get helper functions
@@ -19,7 +20,7 @@
1920
'de' => 'german',
2021
'es' => 'spanish',
2122
'gl' => 'galician',
22-
'eu' => 'basque'
23+
'eu' => 'basque',
2324
];
2425
$lang_match = $chamilo_langs[get_preferred_language($available_langs)];
2526
// recover previous value ...

custompages/loggedout-dist.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* For licensing terms, see /license.txt */
33
/**
44
* Displayed after the user has been logged out.
5+
*
56
* @package chamilo.custompages
67
*/
7-
88
$called_direcly = !function_exists('api_get_path');
99
if ($called_direcly) {
1010
return '';
@@ -15,15 +15,15 @@
1515
$www = api_get_path('WEB_PATH');
1616

1717
/**
18-
* HTML output
18+
* HTML output.
1919
*/
2020
?>
2121
<!DOCTYPE html>
2222
<html>
2323
<head>
2424
<title>Custompage - logged out</title>
2525
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
26-
<script type="text/javascript" src="<?php echo $www ?>web/assets/jquery/dist/jquery.min.js"></script>
26+
<script type="text/javascript" src="<?php echo $www; ?>web/assets/jquery/dist/jquery.min.js"></script>
2727
<script type="text/javascript">
2828
$(document).ready(function() {
2929
if (top.location != location)
@@ -33,11 +33,11 @@
3333
</head>
3434
<body>
3535
<div id="backgroundimage">
36-
<img src="<?php echo $www ?>/custompages/images/page-background.png" class="backgroundimage" alt="background"/>
36+
<img src="<?php echo $www; ?>/custompages/images/page-background.png" class="backgroundimage" alt="background"/>
3737
</div>
3838
<div id="wrapper">
3939
<div id="header">
40-
<img src="<?php echo $www ?>/custompages/images/header.png" alt="Logo" />
40+
<img src="<?php echo $www; ?>/custompages/images/header.png" alt="Logo" />
4141
</div>
4242

4343
<div id="login-form-box" class="form-box">
@@ -47,7 +47,7 @@
4747
</div>
4848
<a href="<?php echo $www.'user_portal.php'; ?>">Go to your portal</a>
4949
<div id="footer">
50-
<img src="<?php echo $www ?>/custompages/images/footer.png" alt="footer"/>
50+
<img src="<?php echo $www; ?>/custompages/images/footer.png" alt="footer"/>
5151
</div>
5252
</div>
5353
</body>

custompages/lostpassword-dist.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* For licensing terms, see /license.txt */
33
/**
44
* Quick form to ask for password reminder.
5+
*
56
* @package chamilo.custompages
67
*/
7-
88
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
99
require_once __DIR__.'/language.php';
1010

@@ -14,7 +14,7 @@
1414
<head>
1515
<title><?php echo custompages_get_lang('LostPassword'); ?></title>
1616
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
17-
<script type="text/javascript" src="<?php echo $rootWeb ?>web/assets/jquery/dist/jquery.min.js"></script>
17+
<script type="text/javascript" src="<?php echo $rootWeb; ?>web/assets/jquery/dist/jquery.min.js"></script>
1818

1919
<script type="text/javascript">
2020
$(document).ready(function() {
@@ -41,7 +41,7 @@
4141
echo '<div id="registration-form-error" class="form-error"><ul>'.$content['info'].'</ul></div>';
4242
}
4343

44-
echo isset($content['form']) ? $content['form'] : ''
44+
echo isset($content['form']) ? $content['form'] : '';
4545
?>
4646
</div> <!-- #form -->
4747
<div id="footer">

custompages/registration-dist.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* This script allows for specific registration rules (see CustomPages feature of Chamilo)
55
* Please contact CBlue regarding any licences issues.
66
* Author: noel@cblue.be
7-
* Copyright: CBlue SPRL, 20XX (GNU/GPLv3)
7+
* Copyright: CBlue SPRL, 20XX (GNU/GPLv3).
8+
*
89
* @package chamilo.custompages
9-
**/
10-
10+
*/
1111
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
1212
require_once __DIR__.'/language.php';
1313
/**
14-
* Removes some unwanted elementend of the form object
14+
* Removes some unwanted elementend of the form object.
1515
*/
1616
$content['form']->removeElement('extra_mail_notify_invitation');
1717
$content['form']->removeElement('extra_mail_notify_message');
@@ -27,7 +27,7 @@
2727

2828
// Deprecated since 2015-03-26
2929
/**
30-
* Code to change the way QuickForm render html
30+
* Code to change the way QuickForm render html.
3131
*/
3232
/*
3333
$renderer = & $content['form']->defaultRenderer();
@@ -84,7 +84,7 @@
8484
<title><?php echo custompages_get_lang('Registration'); ?></title>
8585
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8686
<meta http-equiv="X-UA-Compatible" content="IE=edge">
87-
<script type="text/javascript" src="<?php echo $rootWeb ?>web/assets/jquery/dist/jquery.min.js"></script>
87+
<script type="text/javascript" src="<?php echo $rootWeb; ?>web/assets/jquery/dist/jquery.min.js"></script>
8888
</head>
8989
<body>
9090
<img id="backgroundimage" src="/custompages/images/page-background.png"">
@@ -106,7 +106,7 @@
106106
?>
107107
</div>
108108
<div id="links">
109-
<!--<a href="mailto: support@cblue.be"><?php echo custompages_get_lang('NeedContactAdmin')?></a><br />-->
109+
<!--<a href="mailto: support@cblue.be"><?php echo custompages_get_lang('NeedContactAdmin'); ?></a><br />-->
110110
</div>
111111
</div>
112112
<div id="footer">

0 commit comments

Comments
 (0)