Dotclear

Changeset 1672:d92b8e8317d2


Ignore:
Timestamp:
08/31/13 14:56:21 (11 years ago)
Author:
Florent Cotton <florent.cotton@…>
Branch:
pingbacks
Message:

Découverte automatique des URLs de trackback/pingback toujours : les URLs relatives figurant dans le corps du billet sont désormais prises en charge lors de la découverte. Devrait finir de résoudre #1627

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.trackback.php

    r1671 r1672  
    366366               for ($i = 0; $i<count($match); $i++) 
    367367               { 
    368                     if (preg_match('/href="(https?:\/\/[^"]+)"/ms', $match[$i][1], $matches)) { 
     368                    if (preg_match('/href="((https?:\/)?\/[^"]+)"/ms', $match[$i][1], $matches)) { 
    369369                         $res[$matches[1]] = 1; 
    370370                    } 
     
    378378               for ($i = 0; $i<count($match); $i++) 
    379379               { 
    380                     if (preg_match('/cite="(https?:\/\/[^"]+)"/ms', $match[$i][2], $matches)) { 
     380                    if (preg_match('/cite="((https?:\/)?\/[^"]+)"/ms', $match[$i][2], $matches)) { 
    381381                         $res[$matches[1]] = 1; 
    382382                    } 
     
    389389     private function getPingURL($url) 
    390390     { 
     391          if (strpos($url,'/') === 0) { 
     392               $url = http::getHost().$url; 
     393          } 
     394           
    391395          try 
    392396          { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map