Dotclear

Ticket #2128: patch

File patch, 949 bytes (added by jcp, 10 years ago)
  • (a) /tmp/class.dc.blog.php_orig vs. (b) inc/core/class.dc.blog.php

    a b  
    7979               $this->uid = $b->blog_uid; 
    8080               $this->name = $b->blog_name; 
    8181               $this->desc = $b->blog_desc; 
    82                $this->url = $b->blog_url; 
     82 
     83               /** 
     84               The host server might support SSL/TLS encryption, but using  
     85               it might not be mandatory, i.e. you  have a self-signed certificates. 
     86 
     87               Thus, here, we check whether the client is using  SSL/TLS or not,  
     88               and we set the default url so that every call to the getQmarkURL  
     89               function will return the good url (think about plugins for example). 
     90                */ 
     91               if (!empty ($_SERVER['HTTPS'])) 
     92                    $this->url = str_replace ('http://', 'https://', $b->blog_url); 
     93               else 
     94                    $this->url = $b->blog_url; 
     95 
    8396               $this->host = http::getHostFromURL($this->url); 
    8497               $this->creadt = strtotime($b->blog_creadt); 
    8598               $this->upddt = strtotime($b->blog_upddt); 

Sites map