Dotclear


Ignore:
Timestamp:
11/23/16 08:21:31 (9 years ago)
Author:
Jean-Christian Denis
Branch:
default
Message:

Open trackbacks with behaviors and add basic Webmention support, closes #1917

File:
1 edited

Legend:

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

    r3170 r3415  
    16361636     public function pingback_ping($from_url, $to_url) 
    16371637     { 
    1638           # Come on, buddy! Don't make me waste time with this kind of silliness... 
    1639           if (!(filter_var($from_url, FILTER_VALIDATE_URL) && preg_match('!^https?://!',$from_url))) { 
    1640                throw new Exception(__('No valid source URL provided? Try again!'), 0); 
    1641           } 
    1642  
    1643           if (!(filter_var($to_url, FILTER_VALIDATE_URL) && preg_match('!^https?://!',$to_url))) { 
    1644                throw new Exception(__('No valid target URL provided? Try again!'), 0); 
    1645           } 
    1646  
    1647           if (html::sanitizeURL(urldecode($from_url)) == html::sanitizeURL(urldecode($to_url))) { 
    1648                throw new Exception(__('LOL!'), 0); 
    1649           } 
     1638          dcTrackback::checkURLs($from_url,$to_url); 
     1639 
     1640          $args = array('type'=>'pingback','from_url'=>$from_url,'to_url'=>$to_url); 
    16501641 
    16511642          # Time to get things done... 
    16521643          $this->setBlog(true); 
     1644 
     1645          # --BEHAVIOR-- publicBeforeReceiveTrackback 
     1646          $this->core->callBehavior('publicBeforeReceiveTrackback',$this->core,$args); 
     1647 
    16531648          $tb = new dcTrackback($this->core); 
    1654           return $tb->receive_pb($from_url, $to_url); 
     1649          return $tb->receivePingback($from_url,$to_url); 
    16551650     } 
    16561651} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map