chamilo /
chamilo-lms
| 1 | <?php |
||
| 2 | |||
| 3 | /* For licensing terms, see /license.txt */ |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Updates the Chamilo files from version 1.10.0 to version 1.11.0 |
||
| 7 | * This script operates only in the case of an update, and only to change the |
||
| 8 | * active version number (and other things that might need a change) in the |
||
| 9 | * current configuration file. |
||
| 10 | */ |
||
| 11 | error_log('Starting '.basename(__FILE__)); |
||
| 12 | |||
| 13 | global $debug; |
||
| 14 | |||
| 15 | if (defined('SYSTEM_INSTALLATION')) { |
||
| 16 | // Changes for 2.0.0 |
||
| 17 | $pluginPath = api_get_path(SYS_PLUGIN_PATH); |
||
| 18 | |||
| 19 | // The ImsLti plugin has been integrated to core in 2.0 |
||
| 20 | $ltiPluginPath = $pluginPath.'ImsLti'; |
||
| 21 | |||
| 22 | if (is_dir($ltiPluginPath)) { |
||
| 23 | @rrmdir($ltiPluginPath); |
||
|
0 ignored issues
–
show
Are you sure the usage of
rrmdir($ltiPluginPath) is correct as it seems to always return null.
This check looks for function or method calls that always return null and whose return value is used. class A
{
function getObject()
{
return null;
}
}
$a = new A();
if ($a->getObject()) {
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. Loading history...
|
|||
| 24 | } |
||
| 25 | |||
| 26 | // Copy configuration.php from app/config/configuration.php to config/configuration.php |
||
| 27 | $old = api_get_path(SYMFONY_SYS_PATH).'app/config/configuration.php'; |
||
| 28 | $new = api_get_path(SYMFONY_SYS_PATH).'config/configuration.php'; |
||
| 29 | copy($old, $new); |
||
| 30 | |||
| 31 | error_log('Finish script '.basename(__FILE__)); |
||
| 32 | } else { |
||
| 33 | echo 'You are not allowed here !'.__FILE__; |
||
| 34 | } |
||
| 35 |
If you suppress an error, we recommend checking for the error condition explicitly: