Changeset 365

Show
Ignore:
Timestamp:
09/17/07 07:31:21 (1 year ago)
Author:
bermiferrer
Message:

Fixing bug produced when computing AK_SITE_URL_SUFFIX in more than one level. Reported at http://forum.akelos.org/discussion/69

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/models/framework_setup.php

    r357 r365  
    711711    function relativizeStylesheetPaths() 
    712712    { 
    713         if($this->hasUrlSuffix()){ 
     713        $asset_path = $this->_getAssetBasePath(); 
     714        if($this->hasUrlSuffix() || !empty($asset_path)){ 
    714715            $url_suffix = trim($this->getUrlSuffix(),'/'); 
    715             $asset_path = $this->_getAssetBasePath(); 
    716716            if(!empty($asset_path)){ 
    717                 $url_suffix = $url_suffix.'/'.$asset_path
     717                $url_suffix = trim($url_suffix.'/'.$asset_path,'/')
    718718            } 
    719719            foreach ($this->stylesheets as $stylesheet) { 
  • trunk/lib/constants.php

    r357 r365  
    115115if(!AK_CLI && AK_WEB_REQUEST){ 
    116116 
    117     defined('AK_SITE_URL_SUFFIX') ? null : define('AK_SITE_URL_SUFFIX', 
    118     '/'.str_replace(array(join(DS,array_diff((array)@explode(DS,AK_BASE_DIR), 
    119     (array)@explode('/',AK_REQUEST_URI))), AK_BASE_DIR, DS),'',AK_BASE_DIR)); 
     117    defined('AK_SITE_URL_SUFFIX') ? null : define('AK_SITE_URL_SUFFIX', str_replace(array(join(DS,array_diff((array)@explode(DS,AK_BASE_DIR), (array)@explode('/',AK_REQUEST_URI))), DS), array('','/'), AK_BASE_DIR)); 
    120118 
    121119    defined('AK_AUTOMATIC_SSL_DETECTION') ? null : define('AK_AUTOMATIC_SSL_DETECTION', 1);