Changeset 552da81


Ignore:
Timestamp:
Aug 30, 2015, 8:56:20 PM (11 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
master
Children:
b757e0e
Parents:
b858e6f
Message:

Fixed inconsistent slash handling in WEBSERVICE_BASE_URL cmake setting and further processing in the php files

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    rb858e6f r552da81  
    4242OPTION(WITH_LOCAL_PHPSLIM "Install PHP slim from this repository" OFF)
    4343OPTION(WITH_LOCAL_PHPGUZZLE "Install PHP Guzzle from this repository" OFF)
    44 SET(WEBSERVICE_BASE_URL "/siweather/webservice/v${WEBSERVICE_API_VERSION}" CACHE TYPE STRING)
     44SET(WEBSERVICE_BASE_URL "/siweather/webservice/${WEBSERVICE_API_VERSION}" CACHE TYPE STRING)
    4545
    4646SET(BUILD_DEBUG_WANTED ${BUILD_DEBUG})
  • src/webservice/config/config.php.in

    rb858e6f r552da81  
    2121$config = [
    2222        "mode" => "@WEBSERVICE_MODE@",
    23         "webserviceBaseUrl" => "http://localhost@WEBSERVICE_BASE_URL@@WEBSERVICE_API_VERSION@",
     23        "webserviceBaseUrl" => "http://localhost@WEBSERVICE_BASE_URL@",
    2424        "spatialiteExtension" => "mod_spatialite.so",
    2525        "geoipservice" => "http://freegeoip.net/json",
  • src/webservice/htaccess.in

    rb858e6f r552da81  
    2222# Requires AllowOverride All directive in your apache config
    2323RewriteEngine On
    24 RewriteBase @WEBSERVICE_BASE_URL@@WEBSERVICE_API_VERSION@
     24RewriteBase @WEBSERVICE_BASE_URL@
    2525RewriteCond %{REQUEST_FILENAME} !-f
    2626RewriteCond %{REQUEST_FILENAME} !-d
    27 RewriteRule ^ index.php$1 [QSA,NC,L]
     27RewriteRule ^ index.php [QSA,NC,L]
  • src/webservice/htdocs/SiWeather/Webservice/Setup.php

    rb858e6f r552da81  
    342342                $result = $response->getStatusCode();
    343343                if($result != 200){
    344                         $errorMessage = \Translator::swGettext("Got http error %s (%s) at url %s", $result, $response->getReasonPhrase(), $baseUrl ."/". $url);
     344                        $errorMessage = \Translator::swGettext("Got http error %s (%s) at url %s", $result, $response->getReasonPhrase(), $baseUrl . $url);
    345345                        return false;
    346346                }
  • src/webservice/htdocs/SiWeather/Webservice/WebserviceConfig.php

    rb858e6f r552da81  
    7171        public function webserviceBaseUrl(){
    7272                $baseUrl = $this->_config["webserviceBaseUrl"];
    73                 if(substr($baseUrl, strlen($baseUrl) - 1, 1) != "/"){
     73                if(substr($baseUrl, strlen($baseUrl), 1) != "/"){
    7474                        $baseUrl .= "/";
    7575                }
Note: See TracChangeset for help on using the changeset viewer.