Răsfoiți Sursa

Replace css files from main/css to app/Resources/public/css see #7522

Julio Montoya 10 ani în urmă
părinte
comite
c73bbbc449

+ 8 - 13
.gitignore

@@ -1,23 +1,19 @@
-# Chamilo configuration
-main/inc/conf
-
-# Temp directories
-archive/*
-!archive/.htaccess
-
+# Cache directories
 app/cache/*
 !app/cache/.htaccess
 
-app/logs/*
+# Chamilo configuration
+app/config/
 
 # Courses
-
 app/courses/*
-courses/*
-!courses/index.html
 
 # Home
-home/*
+app/home/*
+
+app/logs/*
+app/Resources/translations/*
+app/Resources/views/*
 
 # Upload content
 app/upload/*
@@ -26,7 +22,6 @@ app/upload/*
 *.log
 
 # IDE settings
-
 .idea
 .idea/*
 .idea/dictionaries/*

+ 4 - 0
app/Resources/public/css/themes/chamilo/default.css

@@ -215,3 +215,7 @@ footer{
 footer a{
   color: #ffffff;
 }
+
+.navbar-default .navbar-brand {
+  color:white;
+}

+ 3 - 4
main/dropbox/dropbox_init.inc.php

@@ -119,7 +119,7 @@ Version 1.4 (Yannick Warnier)
  */
 /*	INIT SECTION */
 
-use \ChamiloSession as Session;
+use ChamiloSession as Session;
 
 // including the basic Chamilo initialisation file
 require_once '../inc/global.inc.php';
@@ -348,9 +348,8 @@ if ($view == 'sent' OR empty($view)) {
 /*	HEADER & TITLE */
 
 if (isset($origin) && $origin == 'learnpath') {
-    // if we come from the learning path we have to include the stylesheet and the required javascripts manually.
-    echo '<link rel="stylesheet" type="text/css" href="', api_get_path(WEB_CODE_PATH), 'css/default.css">';
-    echo $javascript;
+    $htmlHeadXtra[] = $javascript;
+	Display::display_reduced_header($nameTools, 'Dropbox');
 } else {
     Display::display_header($nameTools, 'Dropbox');
 }

+ 1 - 1
main/inc/ajax/course_home.ajax.php

@@ -19,7 +19,7 @@ switch ($action) {
                 $tool_image = Display::return_icon($tool_image, null, null, null, null, true);
                 $na_image = str_replace('.gif', '_na.gif', $tool_image);
             } else {
-                // Display::return_icon() also checks in the main/css/{theme}/icons folder
+                // Display::return_icon() also checks in the app/Resources/public/css/themes/{theme}/icons folder
                 $tool_image = (substr($tool_info['image'], 0, strpos($tool_info['image'], '.'))).'.png';
                 $tool_image = Display::return_icon(
                     $tool_image,

+ 8 - 25
main/inc/global_error_message.inc.php

@@ -56,9 +56,11 @@ if (is_int($global_error_code) && $global_error_code > 0) {
         $theme = 'chamilo';
     }
 
-	$css_path = 'main/css/';
+	$css_path = 'app/Resources/public/css/';
+	$themePath = $css_path.'themes/'.$theme.'/';
+
 	$css_web_path = 'web/assets/';
-	$css_file = $css_path.$theme.'default.css';
+	$css_file = $themePath.'default.css';
 	$bootstrap_file = $css_web_path.'bootstrap/dist/css/bootstrap.min.css';
 	$css_base_file = $css_path.'base.css';
 
@@ -94,11 +96,6 @@ if (is_int($global_error_code) && $global_error_code > 0) {
         }
     }
 
-    $css_def = str_replace("@import url('bootstrap.css');", '', $css_def);
-	$css_def = str_replace('main/', $root_rel.'main/', $css_def);
-	$css_def = str_replace('images/', $root_rel.$css_path.$theme.'images/', $css_def);
-	$css_def = str_replace('../../img/', $root_rel.'main/img/', $css_def);
-
 	$global_error_message = array();
 
 	switch ($global_error_code) {
@@ -142,13 +139,11 @@ if (is_int($global_error_code) && $global_error_code > 0) {
 			$global_error_message['title'] = $DatabaseUnavailableTitle;
 			$global_error_message['description'] = $DatabaseUnavailableDescription;
 			break;
-
 		case 6:
 			$global_error_message['section'] = $SectionProtection;
 			$global_error_message['title'] = $AlreadyInstalledTitle;
 			$global_error_message['description'] = $AlreadyInstalledDescription;
 			break;
-
 		default:
 			$global_error_message['section'] = $SectionTechnicalIssues;
 			$global_error_message['title'] = $TechnicalIssuesTitle;
@@ -165,7 +160,7 @@ if (is_int($global_error_code) && $global_error_code > 0) {
 
 	$global_error_message['encoding'] = 'UTF-8';
 	$global_error_message['css'] = $css_def;
-	$global_error_message['chamilo_logo'] = $root_rel.$css_path.$theme.'/images/header-logo.png';
+	$global_error_message['chamilo_logo'] = $css_web_path.'themes/'.$theme.'/images/header-logo.png';
 
 
 // {ORGANISATION}	moved from the header
@@ -185,24 +180,11 @@ if (is_int($global_error_code) && $global_error_code > 0) {
 		<body>
 		<div id="page-wrap">
 			<header>
-				<section id="main" class="container">
-					<div class="row">
-						<div class="col-lg-3">
-							<div class="logo">
-								<a href="#">
-								 <img vspace="10" hspace="10" alt="Chamilo" src="{CHAMILO_LOGO}">
-								 </a>
-							</div>
-						</div>
-						<div class="col-lg-9">
-						</div>
-					</div>
-				</section>
-
 				<section id="menu-bar">
 					<nav class="navbar navbar-default">
 					<div class="container">
 						<div class="navbar-header">
+						    <a class="navbar-brand" href="#">Chamilo</a>
 							<button type="button" class="navbar-toggle btn" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="true">
 								<span class="sr-only">Toggle navigation</span>
 								<span class="icon-bar"></span>
@@ -221,12 +203,13 @@ if (is_int($global_error_code) && $global_error_code > 0) {
 					</div><!-- /.container-fluid -->
 				</nav>
 				</section>
-
+                <!--
 				<section id="breadcrumb-bar">
 					<div class="container">
 						<ul class="breadcrumb"> <li> <a href="#">{SECTION}</a></li></ul>
 					</div>
 				</section>
+				!-->
 			</header>
 			<div id="top_main_content" class="container">
 				<div class="col-md-12">

+ 21 - 12
main/inc/lib/api.lib.php

@@ -288,6 +288,7 @@ define('SYS_CODE_PATH', 'SYS_CODE_PATH');
 define('SYS_LANG_PATH', 'SYS_LANG_PATH');
 define('WEB_IMG_PATH', 'WEB_IMG_PATH');
 define('WEB_CSS_PATH', 'WEB_CSS_PATH');
+define('WEB_PUBLIC_PATH', 'WEB_PUBLIC_PATH');
 define('SYS_CSS_PATH', 'SYS_CSS_PATH');
 define('SYS_PLUGIN_PATH', 'SYS_PLUGIN_PATH');
 define('PLUGIN_PATH', 'SYS_PLUGIN_PATH'); // deprecated ?
@@ -303,6 +304,8 @@ define('WEB_AJAX_PATH', 'WEB_AJAX_PATH');
 define('SYS_TEST_PATH', 'SYS_TEST_PATH');
 define('WEB_TEMPLATE_PATH', 'WEB_TEMPLATE_PATH');
 define('SYS_TEMPLATE_PATH', 'SYS_TEMPLATE_PATH');
+define('SYS_PUBLIC_PATH', 'SYS_PUBLIC_PATH');
+
 define('WEB_FONTS_PATH', 'WEB_FONTS_PATH');
 define('SYS_FONTS_PATH', 'SYS_FONTS_PATH');
 
@@ -583,6 +586,7 @@ require_once __DIR__.'/internationalization.lib.php';
  * api_get_path(SYS_UPLOAD_PATH)                /var/www/chamilo/app/upload/
  * api_get_path(SYS_ARCHIVE_PATH)               /var/www/chamilo/app/cache
  * api_get_path(SYS_COURSE_PATH)                /var/www/chamilo/app/courses/
+ * api_get_path(SYS_CSS_PATH)                   /var/www/chamilo/app/Resources/public/css
  * api_get_path(SYS_CODE_PATH)                  /var/www/chamilo/main/
  * api_get_path(INCLUDE_PATH)                   /var/www/chamilo/main/inc/
  * api_get_path(LIBRARY_PATH)                   /var/www/chamilo/main/inc/lib/
@@ -591,7 +595,7 @@ require_once __DIR__.'/internationalization.lib.php';
  * api_get_path(SYS_PLUGIN_PATH)                /var/www/chamilo/plugin/
  * api_get_path(SYS_TEST_PATH)                  /var/www/chamilo/tests/
  * api_get_path(SYS_TEMPLATE_PATH)              /var/www/chamilo/main/template/
- * api_get_path(SYS_CSS_PATH)                   /var/www/chamilo/app/Resources/public/css
+ * api_get_path(SYS_PUBLIC_PATH)                /var/www/chamilo/web/
  *
  * api_get_path(WEB_SERVER_ROOT_PATH)           http://www.mychamilo.org/
  * api_get_path(WEB_PATH)                       http://www.mychamilo.org/chamilo/
@@ -605,6 +609,7 @@ require_once __DIR__.'/internationalization.lib.php';
  * api_get_path(WEB_LIBRARY_JS_PATH)            http://www.mychamilo.org/chamilo/web/Chamilo/javascript
  * api_get_path(WEB_TEMPLATE_PATH)              http://www.mychamilo.org/chamilo/main/template/
  * api_get_path(WEB_UPLOAD_PATH)                http://www.mychamilo.org/chamilo/app/upload/
+ * api_get_path(WEB_PUBLIC_PATH)                http://www.mychamilo.org/chamilo/web/
  *
  *
  *
@@ -656,7 +661,9 @@ function api_get_path($path_type, $path = null)
         SYS_TEST_PATH           => 'tests/',
         WEB_TEMPLATE_PATH       => 'template/',
         WEB_UPLOAD_PATH         => 'app/upload/',
+        WEB_PUBLIC_PATH         => 'web/',
         SYS_TEMPLATE_PATH       => 'template/',
+        SYS_PUBLIC_PATH         => 'web/',
         WEB_FONTS_PATH          => 'fonts/',
         SYS_FONTS_PATH          => 'fonts/',
     );
@@ -676,8 +683,6 @@ function api_get_path($path_type, $path = null)
     static $root_sys;
     static $root_rel;
 
-
-
     // Always load root_web modifications for multiple url features
     global $_configuration;
     //default $_configuration['root_web'] configuration
@@ -772,6 +777,7 @@ function api_get_path($path_type, $path = null)
         $paths[SYS_ARCHIVE_PATH]        = $paths[SYS_PATH].$paths[SYS_ARCHIVE_PATH];
         $paths[SYS_TEST_PATH]           = $paths[SYS_PATH].$paths[SYS_TEST_PATH];
         $paths[SYS_TEMPLATE_PATH]       = $paths[SYS_CODE_PATH].$paths[SYS_TEMPLATE_PATH];
+        $paths[SYS_PUBLIC_PATH]         = $paths[SYS_PATH].$paths[SYS_PUBLIC_PATH];
         $paths[SYS_CSS_PATH]            = $paths[SYS_PATH].$paths[SYS_CSS_PATH];
         $paths[SYS_FONTS_PATH]          = $paths[SYS_CODE_PATH].$paths[SYS_FONTS_PATH];
 
@@ -788,6 +794,7 @@ function api_get_path($path_type, $path = null)
 
         $paths[WEB_TEMPLATE_PATH]       = $paths[WEB_CODE_PATH].$paths[WEB_TEMPLATE_PATH];
         $paths[WEB_UPLOAD_PATH]         = $paths[WEB_PATH].$paths[WEB_UPLOAD_PATH];
+        $paths[WEB_PUBLIC_PATH]         = $paths[WEB_PATH].$paths[WEB_PUBLIC_PATH];
 
         $paths[INCLUDE_PATH]            = $paths[SYS_CODE_PATH].$paths[INCLUDE_PATH];
         $paths[LIBRARY_PATH]            = $paths[SYS_CODE_PATH].$paths[LIBRARY_PATH];
@@ -4283,11 +4290,11 @@ function api_get_visual_theme() {
  * Note: Directory names (names of themes) in the file system should contain ASCII-characters only.
  */
 function api_get_themes() {
-    $cssdir = api_get_path(SYS_PATH).'main/css/';
+    $cssdir = api_get_path(SYS_CSS_PATH);
     $list_dir = array();
     $list_name = array();
 
-    if (@is_dir($cssdir)) {
+    if (is_dir($cssdir)) {
         $themes = @scandir($cssdir);
 
         if (is_array($themes)) {
@@ -4298,7 +4305,7 @@ function api_get_themes() {
                     if (substr($theme, 0, 1) == '.') {
                         continue;
                     } else {
-                        if (@is_dir($cssdir.$theme)) {
+                        if (is_dir($cssdir.$theme)) {
                             $list_dir[] = $theme;
                             $list_name[] = ucwords(str_replace('_', ' ', $theme));
                         }
@@ -4307,6 +4314,7 @@ function api_get_themes() {
             }
         }
     }
+
     return array($list_dir, $list_name);
 }
 
@@ -6491,8 +6499,9 @@ function api_get_unique_id() {
  * Get home path
  * @return string
  */
-function api_get_home_path() {
-    $home = 'home/';
+function api_get_home_path()
+{
+    $home = 'app/home/';
     if (api_get_multiple_access_url()) {
         $access_url_id = api_get_current_access_url_id();
         $url_info = api_get_access_url($access_url_id);
@@ -6500,11 +6509,11 @@ function api_get_home_path() {
         $clean_url = api_replace_dangerous_char($url);
         $clean_url = str_replace('/', '-', $clean_url);
         $clean_url .= '/';
-        // if $clean_url ==  "localhost/" means that the multiple URL was not well configured we don't rename the $home variable
-        //if ($clean_url != 'localhost/') {
-            $home = 'home/' . $clean_url;
-        //}
+
+        $home = 'app/home/' . $clean_url;
+
     }
+
     return $home;
 }
 

+ 53 - 40
main/inc/lib/banner.lib.php

@@ -161,24 +161,27 @@ function getCustomTabs() {
 function return_logo($theme) {
     $_course = api_get_course_info();
     $html = '';
-    $logo = api_get_path(SYS_CODE_PATH).'css/'.$theme.'/images/header-logo.png';
+    $logo = api_get_path(SYS_CSS_PATH).'themes/'.$theme.'/images/header-logo.png';
 
     $site_name = api_get_setting('siteName');
     if (file_exists($logo)) {
         $site_name = api_get_setting('Institution').' - '.$site_name;
-
-            $image_url = api_get_path(WEB_CSS_PATH).$theme.'/images/header-logo.png';
-            $logo = Display::img($image_url, $site_name, array('title'=>$site_name,'class'=>'img-responsive'));
-            $html .= Display::url($logo, api_get_path(WEB_PATH).'index.php');
-
+        $image_url = api_get_path(WEB_CSS_PATH).'themes/'.$theme.'/images/header-logo.png';
+        $logo = Display::img(
+            $image_url,
+            $site_name,
+            array('title' => $site_name, 'class' => 'img-responsive')
+        );
+        $html .= Display::url($logo, api_get_path(WEB_PATH).'index.php');
     } else {
         $html .= '<a href="'.api_get_path(WEB_PATH).'index.php" target="_top">'.$site_name.'</a>';
-        $iurl  = api_get_setting('InstitutionUrl');
+        $iurl = api_get_setting('InstitutionUrl');
         $iname = api_get_setting('Institution');
 
         if (!empty($iname)) {
             $html .= '-&nbsp;<a href="'.$iurl.'" target="_top">'.$iname.'</a>';
         }
+
         // External link section a.k.a Department - Department URL
         if (isset($_course['extLink']) && $_course['extLink']['name'] != '') {
             $html .= '<span class="extLinkSeparator"> - </span>';
@@ -195,25 +198,34 @@ function return_logo($theme) {
     return $html;
 }
 
-function return_notification_menu() {
-
+function return_notification_menu()
+{
     $_course    = api_get_course_info();
     $course_id  = api_get_course_id();
     $user_id    = api_get_user_id();
 
     $html = '';
 
-    if ((api_get_setting('showonline', 'world') == 'true' AND !$user_id) OR (api_get_setting('showonline', 'users') == 'true' AND $user_id) OR (api_get_setting('showonline', 'course') == 'true' AND $user_id AND $course_id)) {
+    if ((api_get_setting('showonline', 'world') == 'true' && !$user_id) ||
+        (api_get_setting('showonline', 'users') == 'true' && $user_id) ||
+        (api_get_setting('showonline', 'course') == 'true' && $user_id && $course_id)
+    ) {
         $number = who_is_online_count(api_get_setting('time_limit_whosonline'));
 
         $number_online_in_course = 0;
-        if(!empty($_course['id'])) {
-            $number_online_in_course = who_is_online_in_this_course_count($user_id, api_get_setting('time_limit_whosonline'), $_course['id']);
+        if (!empty($_course['id'])) {
+            $number_online_in_course = who_is_online_in_this_course_count(
+                $user_id,
+                api_get_setting('time_limit_whosonline'),
+                $_course['id']
+            );
         }
 
         // Display the who's online of the platform
         if ($number) {
-            if ((api_get_setting('showonline', 'world') == 'true' AND !$user_id) OR (api_get_setting('showonline', 'users') == 'true' AND $user_id)) {
+            if ((api_get_setting('showonline', 'world') == 'true' && !$user_id) ||
+                (api_get_setting('showonline', 'users') == 'true' && $user_id)
+            ) {
                 $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_top" title="'.get_lang('UsersOnline').'" >'.
                             Display::return_icon('user.png', get_lang('UsersOnline'), array(), ICON_SIZE_TINY).' '.$number.'</a></li>';
             }
@@ -221,7 +233,10 @@ function return_notification_menu() {
 
         // Display the who's online for the course
         if ($number_online_in_course) {
-            if (is_array($_course) AND api_get_setting('showonline', 'course') == 'true' AND isset($_course['sysCode'])) {
+            if (is_array($_course) &&
+                api_get_setting('showonline', 'course') == 'true' &&
+                isset($_course['sysCode'])
+            ) {
                 $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php?cidReq='.$_course['sysCode'].'" target="_top">'.
                         Display::return_icon('course.png', get_lang('UsersOnline').' '.get_lang('InThisCourse'), array(), ICON_SIZE_TINY).' '.$number_online_in_course.' </a></li>';
             }
@@ -237,17 +252,17 @@ function return_notification_menu() {
         //}
     }
 
-
     if (api_get_setting('accessibility_font_resize') == 'true') {
         $html .= '<li class="resize_font">';
         $html .= '<span class="decrease_font" title="'.get_lang('DecreaseFontSize').'">A</span> <span class="reset_font" title="'.get_lang('ResetFontSize').'">A</span> <span class="increase_font" title="'.get_lang('IncreaseFontSize').'">A</span>';
         $html .= '</li>';
     }
+
     return $html;
 }
 
-function return_navigation_array() {
-
+function return_navigation_array()
+{
     $navigation = array();
     $menu_navigation = array();
     $possible_tabs = get_tabs();
@@ -268,7 +283,9 @@ function return_navigation_array() {
         }
 
         // My Profile
-        if (api_get_setting('show_tabs', 'my_profile') == 'true' && api_get_setting('allow_social_tool') != 'true') {
+        if (api_get_setting('show_tabs', 'my_profile') == 'true' &&
+            api_get_setting('allow_social_tool') != 'true'
+        ) {
             $navigation['myprofile'] = $possible_tabs['myprofile'];
         } else {
             $menu_navigation['myprofile'] = $possible_tabs['myprofile'];
@@ -365,23 +382,22 @@ function return_navigation_array() {
     return array('menu_navigation' => $menu_navigation, 'navigation' => $navigation, 'possible_tabs' => $possible_tabs);
 }
 
-function return_menu() {
-    $navigation         = return_navigation_array();
-    $navigation         = $navigation['navigation'];
+function return_menu()
+{
+    $navigation = return_navigation_array();
+    $navigation = $navigation['navigation'];
 
     // Displaying the tabs
 
-    $lang = ''; //el for "Edit Language"
+    $lang = api_get_setting('platformLanguage');
 
     if (!empty($_SESSION['user_language_choice'])) {
         $lang = $_SESSION['user_language_choice'];
     } elseif (!empty($_SESSION['_user']['language'])) {
         $lang = $_SESSION['_user']['language'];
-    } else {
-        $lang = api_get_setting('platformLanguage');
     }
 
-    //Preparing home folder for multiple urls
+    // Preparing home folder for multiple urls
 
     if (api_get_multiple_access_url()) {
         $access_url_id = api_get_current_access_url_id();
@@ -401,10 +417,10 @@ function return_menu() {
         $homep = api_get_path(SYS_PATH).'home/';
     }
 
-    $ext        = '.html';
-    $menutabs   = 'home_tabs';
+    $ext = '.html';
+    $menutabs = 'home_tabs';
     $mtloggedin = 'home_tabs_logged_in';
-    $home_top   = '';
+    $home_top = '';
 
     if (is_file($homep.$menutabs.'_'.$lang.$ext) && is_readable($homep.$menutabs.'_'.$lang.$ext)) {
         $home_top = @(string)file_get_contents($homep.$menutabs.'_'.$lang.$ext);
@@ -432,22 +448,18 @@ function return_menu() {
         }
 
         $home_top = api_to_system_encoding($home_top, api_detect_encoding(strip_tags($home_top)));
-
         $open_mtloggedin = str_replace('{rel_path}',api_get_path(REL_PATH), $home_top);
         $open_mtloggedin = api_to_system_encoding($open_mtloggedin, api_detect_encoding(strip_tags($open_mtloggedin)));
-
     }
 
     $lis = '';
 
     if (!empty($open) OR !empty($open_mtloggedin)) {
         if (strpos($open.$open_mtloggedin, 'show_menu') === false) {
-
             if (api_is_anonymous()) {
                 $navigation[SECTION_CAMPUS]  = null;
             }
         } else {
-            //$lis .= Display::tag('li', $open);
             if (api_get_user_id() && !api_is_anonymous()) {
                 $lis .= $open_mtloggedin;
             } else {
@@ -481,11 +493,11 @@ function return_menu() {
 
 function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
 {
-    $session_id     = api_get_session_id();
-    $session_name   = api_get_session_name($session_id);
-    $_course        = api_get_course_info();
-    $user_id        = api_get_user_id();
-    $course_id      = api_get_course_id();
+    $session_id = api_get_session_id();
+    $session_name = api_get_session_name($session_id);
+    $_course = api_get_course_info();
+    $user_id = api_get_user_id();
+    $course_id = api_get_course_id();
 
     /*  Plugins for banner section */
     $web_course_path = api_get_path(WEB_COURSE_PATH);
@@ -504,7 +516,6 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
         $_course['name'] = api_htmlentities($_course['name']);
         $course_title = cut($_course['name'], MAX_LENGTH_BREADCRUMB);
 
-
         switch (api_get_setting('breadcrumbs_course_homepage')) {
             case 'get_lang':
                 $navigation_item['title'] = Display::img(api_get_path(WEB_IMG_PATH).'home.png', get_lang('CourseHomepageLink')).' '.get_lang('CourseHomepageLink');
@@ -568,7 +579,8 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
             } elseif($breadcrumb_step['name'] == 'gallery') {
                 $navigation_item['title'] = get_lang('Gallery');
             }
-            //Fixes breadcrumb title now we applied the Security::remove_XSS and we cut the string depending of the MAX_LENGTH_BREADCRUMB value
+            // Fixes breadcrumb title now we applied the Security::remove_XSS and
+            // we cut the string depending of the MAX_LENGTH_BREADCRUMB value
             $navigation_item['title'] = cut($navigation_item['title'], MAX_LENGTH_BREADCRUMB);
             $navigation_item['title'] = Security::remove_XSS($navigation_item['title']);
             $navigation[] = $navigation_item;
@@ -668,5 +680,6 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
             $html .= Display::tag('ul', $lis, array('class'=>'breadcrumb'));
         }
     }
-    return $html ;
+
+    return $html;
 }

+ 2 - 2
main/inc/lib/display.lib.php

@@ -1,7 +1,7 @@
 <?php
 /* For licensing terms, see /license.txt */
 
-use \ChamiloSession as Session;
+use ChamiloSession as Session;
 
 /**
  * Class Display
@@ -761,7 +761,7 @@ class Display
             $size = ICON_SIZE_SMALL;
         }
 
-        //Checking the theme icons folder example: main/css/chamilo/icons/XXX
+        //Checking the theme icons folder example: app/Resources/public/css/themes/chamilo/icons/XXX
         if (is_file($code_path.$theme.$size_extra.$image)) {
             $icon = $w_code_path.$theme.$size_extra.$image;
         } elseif (is_file($code_path.'img/icons/'.$size_extra.$image)) {

+ 2 - 4
main/inc/lib/pdf.lib.php

@@ -384,10 +384,8 @@ class PDF
         $document_html = preg_replace($clean_search, '', $document_html);
 
         //absolute path for frames.css //TODO: necessary?
-        $absolute_css_path 	= api_get_path(WEB_CODE_PATH).'css/'.api_get_setting('stylesheets').'/frames.css';
-        $document_html		= str_replace('href="./css/frames.css"','href="'.$absolute_css_path.'"', $document_html);
-
-        //$document_html=str_replace('<link rel="stylesheet" http://my.chamilo.net/main/css/chamilo/frames.css type="text/css" />','', $document_html);
+        $absolute_css_path = api_get_path(WEB_CSS_PATH).api_get_setting('stylesheets').'/frames.css';
+        $document_html = str_replace('href="./css/frames.css"','href="'.$absolute_css_path.'"', $document_html);
 
         $document_html= str_replace('../../','',$document_html);
         $document_html= str_replace('../','',$document_html);

+ 2 - 2
main/install/configuration.dist.php

@@ -199,7 +199,7 @@ $_configuration['system_stable'] = NEW_VERSION_STABLE;
 //$_configuration['session_days_before_coach_access'] = 0;
 // Default session days after coach access
 //$_configuration['session_days_after_coach_access'] = 0;
-// PDF Logo header located in main/css/xxx/images/pdf_logo_header.png
+// PDF Logo header in app/Resources/public/css/themes/xxx/images/pdf_logo_header.png
 //$_configuration['pdf_logo_header'] = false;
 // Order inscription user list by official_code
 //$_configuration['order_user_list_by_official_code'] = false;
@@ -236,7 +236,7 @@ $_configuration['system_stable'] = NEW_VERSION_STABLE;
 // Auto detect language custom pages.
 // $_configuration['auto_detect_language_custom_pages'] = true;
 // If the database is down this css style will be used to show the errors.
-//$_configuration['theme_fallback'] = 'chamilo'; // (main/css/chamilo)
+//$_configuration['theme_fallback'] = 'chamilo'; // (chamilo theme)
 // The default template that will be use in the system.
 //$_configuration['default_template'] = 'default'; // (main/template/default)
 // Show reduce LP report

+ 1 - 1
main/install/index.php

@@ -350,7 +350,7 @@ if ($encryptPassForm == '1') {
         <div class="row">
             <div id="header_left" class="col-md-4">
                 <div id="logo">
-                    <img src="../css/chamilo/images/header-logo.png" hspace="10" vspace="10" alt="Chamilo" />
+                    <img src="<?php echo api_get_path(WEB_CSS_PATH) ?>themes/chamilo/images/header-logo.png" hspace="10" vspace="10" alt="Chamilo" />
                 </div>
             </div>
         </div>

+ 10 - 6
main/install/install.lib.php

@@ -910,10 +910,6 @@ function display_requirements(
                 <td class="requirements-item">'.api_get_path(SYS_UPLOAD_PATH).'courses/</td>
                 <td class="requirements-value">'.check_writable(api_get_path(SYS_UPLOAD_PATH).'courses/').'</td>
             </tr>
-            <tr>
-                <td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'default_course_document/images/</td>
-                <td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'default_course_document/images/').'</td>
-            </tr>
             <tr>
                 <td class="requirements-item">'.api_get_path(SYS_ARCHIVE_PATH).'</td>
                 <td class="requirements-value">'.check_writable(api_get_path(SYS_ARCHIVE_PATH)).'</td>
@@ -927,8 +923,16 @@ function display_requirements(
                 <td class="requirements-value">'.check_writable(api_get_path(SYS_APP_PATH).'home/').'</td>
             </tr>
             <tr>
-                <td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'css/</td>
-                <td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'css/', true).' <br />('.get_lang('SuggestionOnlyToEnableCSSUploadFeature').')</td>
+                <td class="requirements-item">'.api_get_path(SYS_CSS_PATH).'</td>
+                <td class="requirements-value">'.check_writable(api_get_path(SYS_CSS_PATH), true).'</td>
+            </tr>
+            <tr>
+                <td class="requirements-item">'.api_get_path(SYS_PUBLIC_PATH).'</td>
+                <td class="requirements-value">'.check_writable(api_get_path(SYS_PUBLIC_PATH)).'</td>
+            </tr>
+            <tr>
+                <td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'default_course_document/images/</td>
+                <td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'default_course_document/images/').'</td>
             </tr>
             <tr>
                 <td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'lang/</td>

+ 1 - 1
tests/main/inc/lib/main_api.lib.test.php

@@ -488,7 +488,7 @@ class TestMainApi extends UnitTestCase {
 	}
 
 	function testApiGetThemes(){
-		$cssdir= api_get_path(SYS_PATH).'main/css/';
+		$cssdir= api_get_path(SYS_CSS_PATH);
 		$res=api_get_themes();
 		$this->assertTrue($res);
 		$this->assertTrue($cssdir);