X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fthird_party%2Fapi%2Fwernisportal%2Fclass_WernisApi.php;h=d2e105488c8b40ca83ce8e40e09223de992a9106;hp=42936f106b99d01d7753e698f59ceb3554c05d59;hb=0088a32f8609875b6151dfa516f7c2d92fa3a5a8;hpb=49f84a522f0ccac3b70728cd41011a0be0eed8cf diff --git a/inc/classes/third_party/api/wernisportal/class_WernisApi.php b/inc/classes/third_party/api/wernisportal/class_WernisApi.php index 42936f10..d2e10548 100644 --- a/inc/classes/third_party/api/wernisportal/class_WernisApi.php +++ b/inc/classes/third_party/api/wernisportal/class_WernisApi.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @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 * @@ -70,10 +70,6 @@ class WernisApi extends BaseFrameworkSystem { protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** @@ -82,7 +78,7 @@ class WernisApi extends BaseFrameworkSystem { * @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(); @@ -146,7 +142,7 @@ class WernisApi extends BaseFrameworkSystem { global $_CONFIG; include "templates/zurueck.html"; include "templates/fuss.html"; - die(); + exit(); } // Fehlermeldung ausgeben und beenden @@ -222,7 +218,13 @@ class WernisApi extends BaseFrameworkSystem { } // 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) == '&') {