*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
* @param $cfg Configuration array
* @return $apiInstance An instance of this API class
*/
- public final static function createWernisApi (array $cfg) {
+ public static final function createWernisApi (array $cfg) {
// Create a new instance
$apiInstance = new WernisApi();
global $_CONFIG;
include "templates/zurueck.html";
include "templates/fuss.html";
- die();
+ exit();
}
// Fehlermeldung ausgeben und beenden
}
// All (maybe) fine so remove the response header from server
- $response = $response[(count($response) - 1)];
+ for ($idx = (count($response) - 1); $idx > 1; $idx--) {
+ $line = trim($response[$idx]);
+ if (!empty($line)) {
+ $response = $line;
+ break;
+ }
+ }
// Prepare the returning result for higher functions
if (substr($response, 0, 1) == '&') {