Move home in app/home #7522

1.10.x
Julio Montoya 10 years ago
parent 48264f796c
commit b893971977
  1. 0
      app/home/default_platform_document/index.html
  2. 0
      app/home/default_platform_document/template_thumb/audiocomment.gif
  3. 0
      app/home/default_platform_document/template_thumb/checklist.gif
  4. 0
      app/home/default_platform_document/template_thumb/compare.gif
  5. 0
      app/home/default_platform_document/template_thumb/courseobjectives.gif
  6. 0
      app/home/default_platform_document/template_thumb/coursetitle.gif
  7. 0
      app/home/default_platform_document/template_thumb/cyclechart.gif
  8. 0
      app/home/default_platform_document/template_thumb/description.gif
  9. 0
      app/home/default_platform_document/template_thumb/diagram.gif
  10. 0
      app/home/default_platform_document/template_thumb/empty.gif
  11. 0
      app/home/default_platform_document/template_thumb/flash.gif
  12. 0
      app/home/default_platform_document/template_thumb/index.html
  13. 0
      app/home/default_platform_document/template_thumb/learnerwonder.gif
  14. 0
      app/home/default_platform_document/template_thumb/leftlist.gif
  15. 0
      app/home/default_platform_document/template_thumb/leftrightlist.gif
  16. 0
      app/home/default_platform_document/template_thumb/noimage.gif
  17. 0
      app/home/default_platform_document/template_thumb/phasetimeline.gif
  18. 0
      app/home/default_platform_document/template_thumb/rightlist.gif
  19. 0
      app/home/default_platform_document/template_thumb/stopthink.gif
  20. 0
      app/home/default_platform_document/template_thumb/table.gif
  21. 0
      app/home/default_platform_document/template_thumb/video.gif
  22. 0
      app/home/default_platform_document/template_thumb/yourinstructor.gif
  23. 0
      app/home/faq.html
  24. 0
      app/home/home_menu.html
  25. 0
      app/home/home_news.html
  26. 0
      app/home/home_notice.html
  27. 0
      app/home/home_tabs.html
  28. 0
      app/home/home_top.html
  29. 0
      app/home/index.html
  30. 0
      app/home/register_top.html
  31. 21
      main/admin/configure_homepage.php
  32. 5
      main/install/update-configuration.inc.php
  33. 8
      main/install/update-files-1.9.0-1.10.0.inc.php

@ -143,6 +143,7 @@ if (!empty($_SESSION['user_language_choice'])) {
$languageGet = isset($_GET['language']) ? Security::remove_XSS($_GET['language']) : $lang;
// Ensuring availability of main files in the corresponding language
$homePath = api_get_path(SYS_APP_PATH).'home/';
if (api_is_multiple_url_enabled()) {
$access_url_id = api_get_current_access_url_id();
@ -153,9 +154,9 @@ if (api_is_multiple_url_enabled()) {
$clean_url = str_replace('/', '-', $clean_url);
$clean_url .= '/';
$homep = api_get_path(SYS_PATH).'home/'; //homep for Home Path
$homep_new = api_get_path(SYS_PATH).'home/'.$clean_url; //homep for Home Path added the url
$new_url_dir = api_get_path(SYS_PATH).'home/'.$clean_url;
$homep = $homePath; //homep for Home Path
$homep_new = $homePath.'home/'.$clean_url; //homep for Home Path added the url
$new_url_dir = $homePath.$clean_url;
//we create the new dir for the new sites
if (!is_dir($new_url_dir)) {
mkdir($new_url_dir, api_get_permissions_for_new_directories());
@ -163,16 +164,16 @@ if (api_is_multiple_url_enabled()) {
}
} else {
$homep_new = '';
$homep = api_get_path(SYS_PATH).'home/'; //homep for Home Path
$homep = $homePath; //homep for Home Path
}
$menuf = 'home_menu'; //menuf for Menu File
$newsf = 'home_news'; //newsf for News File
$topf = 'home_top'; //topf for Top File
$menuf = 'home_menu'; //menuf for Menu File
$newsf = 'home_news'; //newsf for News File
$topf = 'home_top'; //topf for Top File
$noticef = 'home_notice'; //noticef for Notice File
$menutabs= 'home_tabs'; //menutabs for tabs Menu
$mtloggedin= 'home_tabs_logged_in'; //menutabs for tabs Menu
$ext = '.html'; //ext for HTML Extension - when used frequently, variables are
$menutabs = 'home_tabs'; //menutabs for tabs Menu
$mtloggedin = 'home_tabs_logged_in'; //menutabs for tabs Menu
$ext = '.html'; //ext for HTML Extension - when used frequently, variables are
// faster than hardcoded strings
$homef = array($menuf, $newsf, $topf, $noticef, $menutabs, $mtloggedin);

@ -13,8 +13,8 @@ if (defined('SYSTEM_INSTALLATION')) {
Log::notice("Starting " . basename(__FILE__));
// Edit the configuration file
$file = file(api_get_path(CONFIGURATION_PATH) . 'configuration.php');
$fh = fopen(api_get_path(CONFIGURATION_PATH) . 'configuration.php', 'w');
$file = file(api_get_path(CONFIGURATION_PATH) . 'configuration.php');
$fh = fopen(api_get_path(CONFIGURATION_PATH) . 'configuration.php', 'w');
$found_version_old = false;
$found_stable_old = false;
@ -38,7 +38,6 @@ if (defined('SYSTEM_INSTALLATION')) {
$found_software_url = true;
$line = '$_configuration[\'software_url\'] = \'' . $software_url . '\';' . "\r\n";
} elseif (stripos($line, '$userPasswordCrypted') !== false) {
//$line = '$userPasswordCrypted = \'' . ($userPasswordCrypted) . '\';' . "\r\n";
$line = '$_configuration[\'password_encryption\'] = \'' .$userPasswordCrypted.'\';' . "\r\n";
} elseif (stripos($line, '?>') !== false) {
$ignore = true;

@ -137,6 +137,7 @@ if (defined('SYSTEM_INSTALLATION')) {
'wiki',
'work',
);
$list = scandir($langPath);
foreach ($list as $entry) {
if (is_dir($langPath . $entry) &&
@ -163,7 +164,7 @@ if (defined('SYSTEM_INSTALLATION')) {
unlink(api_get_path(SYS_PATH).'courses/.htaccess');
}
// Move files and dirs.
// Move dirs into new structures.
$movePathList = [
api_get_path(SYS_CODE_PATH).'upload/users/groups' => api_get_path(SYS_UPLOAD_PATH).'groups',
@ -171,6 +172,7 @@ if (defined('SYSTEM_INSTALLATION')) {
api_get_path(SYS_CODE_PATH).'upload/badges' => api_get_path(SYS_UPLOAD_PATH).'badges',
api_get_path(SYS_PATH).'courses' => api_get_path(SYS_COURSE_PATH),
api_get_path(SYS_PATH).'searchdb' => api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb',
api_get_path(SYS_PATH).'home' => api_get_path(SYS_APP_PATH).'home',
];
foreach ($movePathList as $origin => $destination) {
@ -178,6 +180,10 @@ if (defined('SYSTEM_INSTALLATION')) {
rename($origin, $destination);
}
}
// Remove archive
@rrmdir(api_get_path(SYS_PATH).'archive');
} else {
echo 'You are not allowed here !'. __FILE__;
}

Loading…
Cancel
Save