Browse Source

Move home in app/home #7522

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

+ 0 - 0
home/default_platform_document/index.html → app/home/default_platform_document/index.html


+ 0 - 0
home/default_platform_document/template_thumb/audiocomment.gif → app/home/default_platform_document/template_thumb/audiocomment.gif


+ 0 - 0
home/default_platform_document/template_thumb/checklist.gif → app/home/default_platform_document/template_thumb/checklist.gif


+ 0 - 0
home/default_platform_document/template_thumb/compare.gif → app/home/default_platform_document/template_thumb/compare.gif


+ 0 - 0
home/default_platform_document/template_thumb/courseobjectives.gif → app/home/default_platform_document/template_thumb/courseobjectives.gif


+ 0 - 0
home/default_platform_document/template_thumb/coursetitle.gif → app/home/default_platform_document/template_thumb/coursetitle.gif


+ 0 - 0
home/default_platform_document/template_thumb/cyclechart.gif → app/home/default_platform_document/template_thumb/cyclechart.gif


+ 0 - 0
home/default_platform_document/template_thumb/description.gif → app/home/default_platform_document/template_thumb/description.gif


+ 0 - 0
home/default_platform_document/template_thumb/diagram.gif → app/home/default_platform_document/template_thumb/diagram.gif


+ 0 - 0
home/default_platform_document/template_thumb/empty.gif → app/home/default_platform_document/template_thumb/empty.gif


+ 0 - 0
home/default_platform_document/template_thumb/flash.gif → app/home/default_platform_document/template_thumb/flash.gif


+ 0 - 0
home/default_platform_document/template_thumb/index.html → app/home/default_platform_document/template_thumb/index.html


+ 0 - 0
home/default_platform_document/template_thumb/learnerwonder.gif → app/home/default_platform_document/template_thumb/learnerwonder.gif


+ 0 - 0
home/default_platform_document/template_thumb/leftlist.gif → app/home/default_platform_document/template_thumb/leftlist.gif


+ 0 - 0
home/default_platform_document/template_thumb/leftrightlist.gif → app/home/default_platform_document/template_thumb/leftrightlist.gif


+ 0 - 0
home/default_platform_document/template_thumb/noimage.gif → app/home/default_platform_document/template_thumb/noimage.gif


+ 0 - 0
home/default_platform_document/template_thumb/phasetimeline.gif → app/home/default_platform_document/template_thumb/phasetimeline.gif


+ 0 - 0
home/default_platform_document/template_thumb/rightlist.gif → app/home/default_platform_document/template_thumb/rightlist.gif


+ 0 - 0
home/default_platform_document/template_thumb/stopthink.gif → app/home/default_platform_document/template_thumb/stopthink.gif


+ 0 - 0
home/default_platform_document/template_thumb/table.gif → app/home/default_platform_document/template_thumb/table.gif


+ 0 - 0
home/default_platform_document/template_thumb/video.gif → app/home/default_platform_document/template_thumb/video.gif


+ 0 - 0
home/default_platform_document/template_thumb/yourinstructor.gif → app/home/default_platform_document/template_thumb/yourinstructor.gif


+ 0 - 0
home/faq.html → app/home/faq.html


+ 0 - 0
home/home_menu.html → app/home/home_menu.html


+ 0 - 0
home/home_news.html → app/home/home_news.html


+ 0 - 0
home/home_notice.html → app/home/home_notice.html


+ 0 - 0
home/home_tabs.html → app/home/home_tabs.html


+ 0 - 0
home/home_top.html → app/home/home_top.html


+ 0 - 0
home/index.html → app/home/index.html


+ 0 - 0
home/register_top.html → app/home/register_top.html


+ 11 - 10
main/admin/configure_homepage.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);
 

+ 2 - 3
main/install/update-configuration.inc.php

@@ -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;

+ 7 - 1
main/install/update-files-1.9.0-1.10.0.inc.php

@@ -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__;
 }