[248845] Refactoring generate1.php into different files with a functional approach
Fixing a last bug on the language.class.php file, constructors don't work in the same way in PHP as in Ruby.
diff --git a/classes/system/language.class.php b/classes/system/language.class.php
index 93f6baa..f31ef63 100644
--- a/classes/system/language.class.php
+++ b/classes/system/language.class.php
@@ -40,14 +40,14 @@
 	* A constructor expecting an associative array as its unique parameter
 	*/
 	static function fromRow($row) {
-		$this->Language($row['name'], $row['iso_code'], $row['locale'], $row['language_id']);
+		return new Language($row['name'], $row['iso_code'], $row['locale'], $row['language_id']);
 	}
   
 	static function all() {
 		$langs = array();
 		$language_result = mysql_query("SELECT * FROM languages WHERE languages.is_active");
 		while (($language_row = mysql_fetch_assoc($language_result)) != null) {
-			$langs[] = fromRow($language_row);
+			$langs[] = Language::fromRow($language_row);
 		}
 		return $langs;
 	}