Yannick Warnier 14 éve
szülő
commit
550eab895a
2 módosított fájl, 10 hozzáadás és 13 törlés
  1. 9 12
      main/admin/sub_language.class.php
  2. 1 1
      main/inc/lib/main_api.lib.php

+ 9 - 12
main/admin/sub_language.class.php

@@ -1,22 +1,19 @@
-<?php
-/* For licensing terms, see /license.txt */
+<?php /* For licensing terms, see /license.txt */
 /**
-==================================================================================
-	@author Isaac flores paz <florespaz@bidsoftperu.com> - Added 9 july of 2009
-==================================================================================
-*/
-/*
-==============================================================================
-		Class SubLanguageManager
-==============================================================================
-*/
+ * SubLanguageManager class definition file
+ * @package chamilo.admin.sublanguage 
+ */
+/**
+ * SubLanguageManager class manages the edition
+ * @class SubLanguageManager
+ */
 class SubLanguageManager {
 
     private function __construct() {
     	//void
     }
     /**
-     * Get all data of lang folder (forum.inc.php,gradebook.inc.php,notebook.inc.php)
+     * Get all files of lang folder (forum.inc.php,gradebook.inc.php,notebook.inc.php)
      * @param String The lang path folder  (/var/www/my_lms/main/lang/spanish)
      * @param bool true if we only want the "subname" trad4all instead of  trad4all.inc.php
      * @return Array All file of lang folder

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

@@ -1718,7 +1718,7 @@ function api_get_setting($variable, $key = null) {
     global $_setting;
     //return is_null($key) ? (!empty($_setting[$variable]) ? $_setting[$variable] : null) : $_setting[$variable][$key];  does not allow "0" values
     //Allowing "0" values
-    return is_null($key) ? (($_setting[$variable] != '') ? $_setting[$variable] : null) : $_setting[$variable][$key];
+    return is_null($key) ? ((isset($_setting[$variable]) && $_setting[$variable] != '') ? $_setting[$variable] : null) : $_setting[$variable][$key];
 }
 
 /**