Feature #347 - A constant in the instalaltion scripts has been renamed ( SYSTEM_INSTALLATION ).

skala
Ivan Tcholakov 16 years ago
parent dab06263fd
commit 821f3995bc
  1. 2
      main/install/index.php
  2. 2
      main/install/install_db.inc.php
  3. 2
      main/install/install_files.inc.php
  4. 10
      main/install/update-db-1.6.x-1.8.0.inc.php
  5. 8
      main/install/update-db-1.8.0-1.8.2.inc.php
  6. 8
      main/install/update-db-1.8.2-1.8.3.inc.php
  7. 8
      main/install/update-db-1.8.3-1.8.4.inc.php
  8. 8
      main/install/update-db-1.8.4-1.8.5.inc.php
  9. 8
      main/install/update-db-1.8.5-1.8.6.inc.php
  10. 8
      main/install/update-db-1.8.6-1.8.6.1.inc.php
  11. 8
      main/install/update-db-1.8.6.1-1.8.6.2.inc.php
  12. 8
      main/install/update-db-1.8.6.2-1.8.7.inc.php
  13. 8
      main/install/update-files-1.6.x-1.8.0.inc.php
  14. 2
      main/install/update-files-1.8.3-1.8.4.inc.php
  15. 2
      main/install/update-files-1.8.4-1.8.5.inc.php
  16. 2
      main/install/update-files-1.8.5-1.8.6.inc.php
  17. 2
      main/install/update-files-1.8.6-1.8.6.1.inc.php
  18. 2
      main/install/update-files-1.8.6.1-1.8.6.2.inc.php
  19. 2
      main/install/update-files-1.8.6.2-1.8.7.inc.php
  20. 8
      main/install/update_db.inc.php
  21. 10
      main/install/update_files.inc.php
  22. 2
      main/install/upgrade.php

@ -90,7 +90,7 @@ require_once 'install_upgrade.lib.php'; //also defines constants
require_once 'install_functions.inc.php';
// Some constants
define('DOKEOS_INSTALL', 1);
define('SYSTEM_INSTALLATION', 1);
define('MAX_COURSE_TRANSFER', 100);
define('INSTALL_TYPE_UPDATE', 'update');
define('FORM_FIELD_DISPLAY_LENGTH', 40);

@ -19,7 +19,7 @@ require_once 'install_upgrade.lib.php';
// This page can only be access through including from the install script.
if (!defined('DOKEOS_INSTALL')) {
if (!defined('SYSTEM_INSTALLATION')) {
echo 'You are not allowed here!';
exit;
}

@ -15,7 +15,7 @@
==============================================================================
*/
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
// Write the system config file
write_dokeos_config_file('../inc/conf/configuration.php');

@ -54,7 +54,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (empty ($updateFromConfigFile) || !file_exists($_POST['updatePath'].$updateFromConfigFile) || !in_array(get_config_param('clarolineVersion'), $update_from_version_6)) {
@ -98,8 +98,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
@ -123,7 +123,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
if (empty($dbStatsForm)) $dbStatsForm = $dbNameForm;
@ -445,7 +445,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (!$only_test){
include('update-db-scorm-1.6.x-1.8.0.inc.php');
}
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
if(empty($dbStatsForm)) $dbStatsForm = $dbNameForm;
if(empty($dbScormForm)) $dbScormForm = $dbNameForm;

@ -54,7 +54,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
@ -97,8 +97,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
@ -121,7 +121,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;
$dbScormForm = $dbNameForm;

@ -54,7 +54,7 @@ if( function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
@ -97,8 +97,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
}
@ -120,7 +120,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;

@ -54,7 +54,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
echo '<strong>'.get_lang('Error').' !</strong> Dokeos '.implode('|', $updateFromVersion).' '.get_lang('HasNotBeenFound').'.<br /><br />
@ -96,8 +96,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
}
@ -119,7 +119,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;

@ -36,7 +36,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
echo '<strong>'.get_lang('Error').' !</strong> Dokeos '.implode('|', $updateFromVersion).' '.get_lang('HasNotBeenFound').'.<br /><br />
@ -78,8 +78,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
}
@ -101,7 +101,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;

@ -36,7 +36,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
@ -79,8 +79,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
}
@ -105,7 +105,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;

@ -36,7 +36,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
@ -79,8 +79,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
}
@ -102,7 +102,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;

@ -36,7 +36,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
@ -79,8 +79,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
}
@ -102,7 +102,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;

@ -36,7 +36,7 @@ if (function_exists('ini_set')) {
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
//check if the current Dokeos install is elligible for update
if (!file_exists('../inc/conf/configuration.php')) {
@ -79,8 +79,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><button type="submit" class="back" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
}
@ -102,7 +102,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
// that we want to change the main databases as well...
$only_test = false;
$log = 0;
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
if ($singleDbForm) {
$dbStatsForm = $dbNameForm;

@ -27,13 +27,13 @@
* IMPORTANT: This script has to be included by install/index.php or
* update_courses.php
*
* DOKEOS_INSTALL is defined in the install/index.php (means that we are in
* SYSTEM_INSTALLATION is defined in the install/index.php (means that we are in
* the regular upgrade process)
*
* DOKEOS_COURSE_UPDATE is defined in update_courses.php (means we are
* executing update_courses.php to update courses separately)
*
* When DOKEOS_INSTALL or DOKEOS_COURSE_UPDATE are defined, do for every course:
* When SYSTEM_INSTALLATION or DOKEOS_COURSE_UPDATE are defined, do for every course:
* - create a new set of directories that reflect the new tools offered by 1.8
* - record an item_property for each directory added
*
@ -67,7 +67,7 @@ function insert_db($db_name, $folder_name, $text) {
==============================================================================
*/
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
$sys_course_path = $pathForm.'courses/';
//$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE);
@ -192,7 +192,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
rename($updatePath.'claroline/upload/video', $pathForm.'main/upload/video');
/*
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
//nothing to do this time
}
*/

@ -40,7 +40,7 @@ require_once '../inc/lib/main_api.lib.php';
require_once '../inc/lib/fileUpload.lib.php';
require_once '../inc/lib/database.lib.php';
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// Edit the Dokeos config file
$file = file('../inc/conf/configuration.php');

@ -19,7 +19,7 @@ require_once '../inc/lib/main_api.lib.php';
require_once '../inc/lib/fileUpload.lib.php';
require_once '../inc/lib/database.lib.php';
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// Edit the Dokeos config file
$file = file('../inc/conf/configuration.php');

@ -19,7 +19,7 @@ require_once '../inc/lib/main_api.lib.php';
require_once '../inc/lib/fileUpload.lib.php';
require_once '../inc/lib/database.lib.php';
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// Edit the Dokeos config file
$file = file('../inc/conf/configuration.php');

@ -19,7 +19,7 @@ require_once '../inc/lib/main_api.lib.php';
require_once '../inc/lib/fileUpload.lib.php';
require_once '../inc/lib/database.lib.php';
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// Edit the Dokeos config file
$file = file('../inc/conf/configuration.php');

@ -13,7 +13,7 @@ require_once '../inc/lib/main_api.lib.php';
require_once '../inc/lib/fileUpload.lib.php';
require_once '../inc/lib/database.lib.php';
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// Edit the Dokeos config file
$file = file('../inc/conf/configuration.php');
$fh = fopen('../inc/conf/configuration.php', 'w');

@ -13,7 +13,7 @@ require_once '../inc/lib/main_api.lib.php';
require_once '../inc/lib/fileUpload.lib.php';
require_once '../inc/lib/database.lib.php';
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// Start coding here...

@ -48,7 +48,7 @@ require_once("install_upgrade.lib.php");
*/
//check if we come from index.php or update_courses.php - otherwise display error msg
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE'))
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE'))
{
//check if the current Dokeos install is elligible for update
if (empty ($updateFromConfigFile) || !file_exists($_POST['updatePath'].$updateFromConfigFile) || !in_array(get_config_param('clarolineVersion'), $update_from_version))
@ -95,8 +95,8 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE'))
<strong>'.get_lang('DBHost').'</strong> : '.$dbHostForm.'<br />
<strong>'.get_lang('DBLogin').'</strong> : '.$dbUsernameForm.'<br />
<strong>'.get_lang('DBPassword').'</strong> : '.$dbPassForm.'<br /><br />
'.get_lang('PleaseGoBackToStep').' '. (defined('DOKEOS_INSTALL') ? '3' : '1').'.
<p><buton class="back" type="submit" name="step'. (defined('DOKEOS_INSTALL') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
'.get_lang('PleaseGoBackToStep').' '. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'.
<p><buton class="back" type="submit" name="step'. (defined('SYSTEM_INSTALLATION') ? '3' : '1').'" value="&lt; '.get_lang('Back').'">'.get_lang('Back').'</button></p>
</td></tr></table></form></body></html>';
exit ();
@ -113,7 +113,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE'))
//if this script has been included by index.php, not update_courses.php, so
// that we want to change the main databases as well...
$only_test = false;
if (defined('DOKEOS_INSTALL'))
if (defined('SYSTEM_INSTALLATION'))
{
/**
* Update the databases "pre" migration

@ -29,10 +29,10 @@
* Updates the Dokeos files from an older version
* IMPORTANT: This script has to be included by install/index.php and update_courses.php
*
* DOKEOS_INSTALL is defined in the install/index.php
* SYSTEM_INSTALLATION is defined in the install/index.php
* DOKEOS_COURSE_UPDATE is defined in update_courses.php
*
* When DOKEOS_INSTALL or DOKEOS_COURSE_UPDATE is defined, do for every course:
* When SYSTEM_INSTALLATION or DOKEOS_COURSE_UPDATE is defined, do for every course:
* - remove the .htaccess in the document folder
* - remove the index.php in the group folder
* - write a new group/index.php file, make it an empty html file
@ -46,7 +46,7 @@
* - remove the visibility field from the document table
* - update the item properties of the group documents
*
* Additionally, when DOKEOS_INSTALL is defined
* Additionally, when SYSTEM_INSTALLATION is defined
* - write a config file, configuration.php, with important settings
* - write a .htaccess file (with instructions for Apache) in the courses directory
* - remove the new main/upload/users directory and rename the main/img/users
@ -138,7 +138,7 @@ function fill_document_table($dir)
==============================================================================
*/
if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
$newPath = str_replace('\\', '/', realpath('../..')).'/';
$oldPath = $_POST['updatePath'];
@ -199,7 +199,7 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE')) {
}
}
if (defined('DOKEOS_INSTALL')) {
if (defined('SYSTEM_INSTALLATION')) {
// Write the Dokeos config file
write_dokeos_config_file($newPath.'main/inc/conf/configuration.php');

@ -62,7 +62,7 @@ require '../lang/english/install.inc.php';
require_once 'install_upgrade.lib.php';
require_once 'upgrade_lib.php';
define('DOKEOS_INSTALL', 1);
define('SYSTEM_INSTALLATION', 1);
define('MAX_COURSE_TRANSFER', 100);
define('INSTALL_TYPE_UPDATE', 'update');
define('FORM_FIELD_DISPLAY_LENGTH', 40);

Loading…
Cancel
Save