Dotclear

Changeset 375:91268cf48758


Ignore:
Timestamp:
06/15/11 15:14:25 (14 years ago)
Author:
Dsls <dsls@…>
Branch:
default
Message:

Better support for http valued public_url and themes_url. Closes #1222

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_theme.php

    r270 r375  
    156156      
    157157     $radio_id = 'theme_'.html::escapeHTML($id); 
    158      $theme_url = http::concatURL($core->blog->url,$core->blog->settings->system->themes_url.'/'.$id); 
     158     if (preg_match('#^http(s)?://#',$core->blog->settings->system->themes_url)) { 
     159          $theme_url = http::concatURL($core->blog->settings->system->themes_url,'/'.$id); 
     160     } else { 
     161          $theme_url = http::concatURL($core->blog->url,$core->blog->settings->system->themes_url.'/'.$id); 
     162     } 
    159163     $has_conf = file_exists(path::real($core->blog->themes_path.'/'.$id).'/_config.php'); 
    160164     $has_css = file_exists(path::real($core->blog->themes_path.'/'.$id).'/style.css'); 
  • admin/media_item.php

    r270 r375  
    394394     if ($file->media_image) 
    395395     { # We look for thumbnails too 
    396           $media_root = $core->blog->host.path::clean($core->blog->settings->system->public_url).'/'; 
     396          if (preg_match('#^http(s)?://#',$this->core->blog->settings->system->public_url)) { 
     397               $media_root = $core->blog->settings->system->public_url; 
     398          } else { 
     399               $media_root = $core->blog->host.path::clean($core->blog->settings->system->public_url).'/'; 
     400          } 
    397401          foreach ($file->media_thumb as $v) { 
    398402               $v = preg_replace('/^'.preg_quote($media_root,'/').'/','',$v); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map