rrodriguez 14 年之前
父节点
当前提交
3d0cae12a7
共有 4 个文件被更改,包括 10 次插入10 次删除
  1. 3 3
      main/admin/settings.lib.php
  2. 4 5
      main/auth/profile.php
  3. 1 1
      main/lang/english/admin.inc.php
  4. 2 1
      main/lang/spanish/admin.inc.php

+ 3 - 3
main/admin/settings.lib.php

@@ -396,7 +396,7 @@ function upload_stylesheet($values,$picture)
 						if ( substr($entry, -1) == '/') continue;
 
 						$pos_slash = strpos($entry, '/');
-						$entry_without_first_dir = substr($entry, $pos_slash + 1);
+						$entry_without_first_dir = substr($entry, $pos_slash + 1);				
 						// If there is still a slash, we need to make sure the directories are created
 						if(strpos($entry_without_first_dir, '/') !== false) {
 							if(!is_dir($extraction_path.dirname($entry_without_first_dir))) {
@@ -420,11 +420,11 @@ function upload_stylesheet($values,$picture)
 			$zip->close();
 
 		} else {
-			Display::display_error_message(get_lang('ErrorReadingZip'));
+			Display::display_error_message(get_lang('ErrorReadingZip').$info['extension'], false);
 		}
 	} else {
 		// Simply move the file
-		move_uploaded_file($picture['tmp_name'], api_get_path(SYS_CODE_PATH).'css/'.$style_name.'/'.$picture['name']);
+		move_uploaded_file($picture['tmp_name'], api_get_path(SYS_CODE_PATH).'css/'.$style_name.'/'.$picture['name']);	
 	}
 }
 

+ 4 - 5
main/auth/profile.php

@@ -256,7 +256,7 @@ if (api_get_setting('profile', 'language') !== 'true') {
 
 //	EXTENDED PROFILE  this make the page very slow!
 if (api_get_setting('extended_profile') == 'true') {
-	if ($_GET['type'] == 'extended') {
+	if (!isset($_GET['type']) || (isset($_GET['type']) && $_GET['type'] == 'extended')) {
 		//$form->addElement('html', '<a href="javascript: void(0);" onclick="javascript: show_extend();"> show_extend_profile</a>');
 		$form->addElement('static', null, '<em>'.get_lang('OptionalTextFields').'</em>');
 		//	MY COMPETENCES
@@ -294,7 +294,6 @@ if (is_profile_editable() && api_get_setting('profile', 'password') == 'true') {
 
 // EXTRA FIELDS
 $extra = UserManager::get_extra_fields(0, 50, 5, 'ASC');
-
 $extra_data = UserManager::get_extra_user_data(api_get_user_id(), true);
 foreach ($extra as $id => $field_details) {
 	if ($field_details[6] == 0) {
@@ -823,10 +822,10 @@ if (api_get_setting('allow_social_tool') == 'true') {
 			echo '<div id="social-content-online">';
 				if (api_get_setting('extended_profile') == 'true') {
 					$show = isset($_GET['show']) ? '&amp;show='.Security::remove_XSS($_GET['show']) : '';
-					if (isset($_GET['type']) && $_GET['type'] == 'extended') {
-						echo '<a href="profile.php?type=reduced'.$show.'"><span class="social-menu-text1">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</span></a>';
+					if (isset($_GET['type']) && $_GET['type'] == 'reduced') {
+						echo '<a href="profile.php?type=extended '.$show.'"><span class="social-menu-text1">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.get_lang('EditExtendProfile').'</span></a>';
 					} else {
-						echo '<a href="profile.php?type=extended'.$show.'"><span class="social-menu-text1">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.get_lang('EditExtendProfile').'</span></a>';
+						echo '<a href="profile.php?type=reduced'.$show.'"><span class="social-menu-text1">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).'&nbsp;'.get_lang('EditNormalProfile').'</span></a>';
 					}
 				}
 			echo '</div>';

+ 1 - 1
main/lang/english/admin.inc.php

@@ -1268,4 +1268,4 @@ $AddUsersToGroup = "Add users to group";
 $ErrorReadingZip = "Error reading ZIP file";
 $ErrorStylesheetFilesExtensionsInsideZip = "The only accepted extensions in the ZIP file are jpg, jpeg, png, gif and css.";
 $MyTextHere = "Enter your text here...";
-?>
+?>

+ 2 - 1
main/lang/spanish/admin.inc.php

@@ -1239,6 +1239,7 @@ $GradebookNumberDecimalsComment = "Establecer el número de decimales permitidos
 $EditSessionsToURL = "Editar sesiones de una URL";
 $AddSessionsToURL = "Añadir sesiones a una URL";
 $SessionListIn = "Lista de sesiones en";
+$DataFiller = "Rellenar datos";
 $FillUsers = "Completa los usuarios";
 $ThisSectionIsOnlyVisibleOnSourceInstalls = "Esta sección sólo es visible en instalaciones desde el código fuente, no en versiones estables de la plataforma. Se le permitirá insertar en su plataforma datos de prueba. Úselo con cuidado (los datos son realmente insertados) y sólo es aconsejable para utilizar como desarrollo o en instalaciones donde necesite datos de prueba.";
 $UsersFillingReport = "Rellenar el informe de usuarios";
@@ -1268,4 +1269,4 @@ $AddUsersToGroup = "Añadir usuarios al grupo";
 $ErrorReadingZip = "Error leyendo el archivo ZIP";
 $ErrorStylesheetFilesExtensionsInsideZip = "Las únicas extensiones aceptadas en el archivo ZIP son jpg, jpeg, png, gif y css.";
 $MyTextHere = "Introduzca su texto aquí...";
-?>
+?>