Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

Location:
plugins/fairTrackbacks
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/fairTrackbacks/_define.php

    r2257 r2566  
    2323     ) 
    2424); 
    25 ?> 
  • plugins/fairTrackbacks/_public.php

    r1179 r2566  
    1616     $core->spamfilters[] = 'dcFilterFairTrackbacks'; 
    1717} 
    18 ?> 
  • plugins/fairTrackbacks/class.dc.filter.fairtrackbacks.php

    r1179 r2566  
    1818     public $active = true; 
    1919     public $order = -10; 
    20       
     20 
    2121     public function __construct($core) 
    2222     { 
    2323          parent::__construct($core); 
    2424     } 
    25       
     25 
    2626     protected function setInfo() 
    2727     { 
    2828          $this->description = __('Checks trackback source for a link to the post'); 
    2929     } 
    30       
    31       
     30 
     31 
    3232     public function isSpam($type,$author,$email,$site,$ip,$content,$post_id,&$status) 
    3333     { 
     
    3535               return; 
    3636          } 
    37            
     37 
    3838          try 
    3939          { 
    4040               $default_parse = array('scheme'=>'','host'=>'','path'=>'','query'=>''); 
    4141               $S = array_merge($default_parse,parse_url($site)); 
    42                 
     42 
    4343               if ($S['scheme'] != 'http' || !$S['host'] || !$S['path']) { 
    4444                    throw new Exception('Invalid URL'); 
    4545               } 
    46                 
     46 
    4747               # Check incomink link page 
    4848               $post = $this->core->blog->getPosts(array('post_id' => $post_id)); 
    4949               $post_url = $post->getURL(); 
    5050               $P = array_merge($default_parse,parse_url($post_url)); 
    51                 
     51 
    5252               if ($post_url == $site) { 
    5353                    throw new Exception('Same source and destination'); 
    5454               } 
    55                 
     55 
    5656               $o = netHttp::initClient($site,$path); 
    5757               $o->setTimeout(3); 
    5858               $o->get($path); 
    59                 
     59 
    6060               # Trackback source does not return 200 status code 
    6161               if ($o->getStatus() != 200) { 
    6262                    throw new Exception('Invalid Status Code'); 
    6363               } 
    64                 
     64 
    6565               $tb_page = $o->getContent(); 
    66                 
     66 
    6767               # Do we find a link to post in trackback source? 
    6868               if ($S['host'] == $P['host']) { 
     
    7272               } 
    7373               $pattern = preg_quote($pattern,'/'); 
    74                 
     74 
    7575               if (!preg_match('/'.$pattern.'/',$tb_page)) { 
    7676                    throw new Exception('Unfair'); 
     
    8383     } 
    8484} 
    85 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map