= 5.1.0 required by date functions $errorReportingLevel = E_ALL & ~E_NOTICE; error_reporting($errorReportingLevel); ini_set('error_reporting', $errorReportingLevel); trigger_error("WPS: {$_SERVER['REQUEST_METHOD']} https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}", E_USER_NOTICE); // TODO: RMMR DBG if ('POST' === $_SERVER['REQUEST_METHOD']) { trigger_error("WPS POST BODY: " . Request::getRequestBody(), E_USER_NOTICE); // TODO: RMMR DBG } if (file_exists(APP_PATH_ROOT . "/config/.config_{$_SERVER['SERVER_NAME']}.php")) { require APP_PATH_ROOT . "/config/.config_{$_SERVER['SERVER_NAME']}.php"; } if (file_exists(APP_PATH_ROOT . "/.config.php")) include APP_PATH_ROOT . "/.config.php"; require_once APP_PATH_ROOT . "/superedit-SEF.php"; SEF('DEBUG_S'); Lib::loadClass('ApiUser'); Lib::loadClass('Api'); session_start(); session_write_close(); $apiUser = new ApiUser(); // ?LOGIN=LOGOUT if ('LOGOUT' == V::get('LOGIN', '', $_GET)) { $apiUser->logout(); } else { $apiUser->auth(); } set_time_limit(5 * 60); $taskPath = Request::getRewriteTaskPath(); $taskPath = "/xml/wps{$taskPath}"; IF(V::get('DBG','',$_GET)){echo'
taskPath (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($taskPath);echo'
';} if ('/xml/wfs' == substr($taskPath, 0, 8)) { $taskPath = "/xml/wfsQgis/" . substr($taskPath, 9); } try { $api = new Api(); $api->setUser($apiUser); $apiBaseUri = Request::getScriptUri(); $api->setBaseUri($apiBaseUri);// TODO: RMME - replaced with Api_WfsNs::getBaseWfsUri(); $api->execute($taskPath); } catch (HttpException $e) { DBG::log($e); Http::sendHeaderByCode($e->getCode()); echo $e->getMessage(); } catch (Exception $e) { Http::sendHeaderByCode(500); echo $e->getMessage(); } ?>