Changeset 327

Show
Ignore:
Timestamp:
02/23/10 20:26:34 (5 months ago)
Author:
izzy
Message:

! imdb_person::born() and died() have been broken by IMDB changes again - fixed (see ticket #120; backport from trunk)

Location:
branches/php4-imdbonly
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/php4-imdbonly/doc/CHANGELOG

    r320 r327  
    77------------------- 
    88! imdb::releaseInfo() did not recognize entries without day - fixed. 
     9! imdb_person::born() and died() have been broken by IMDB changes again - fixed 
    910 
    1011v1.2.3 (14.02.2010) 
  • branches/php4-imdbonly/imdb_person.class.php

    r312 r327  
    398398      if ($this->page["Bio"] == "") $this->openpage ("Bio","person"); 
    399399      if ( preg_match('|Date of Birth</h5>\s*(.*)<br|iUms',$this->page["Bio"],$match) ) { 
    400         preg_match('/OnThisDay\?(day=(\d{1,2})|)(.{0,1}month=(.*?)"|)/ims',$match[1],$daymon); 
     400        preg_match('|/date/(\d+)-(\d+)/.*?>\d+\s+(.*?)<|',$match[1],$daymon); 
    401401        preg_match('|/search/name\?birth_year=(\d{4})|ims',$match[1],$dyear); 
    402402        preg_match('|/search/name\?birth_place=.*?">(.*)<|ims',$match[1],$dloc); 
    403         $this->birthday = array("day"=>$daymon[2],"month"=>$daymon[4],"mon"=>$this->monthNo($daymon[4]),"year"=>$dyear[1],"place"=>$dloc[1]); 
     403        $this->birthday = array("day"=>$daymon[2],"month"=>$daymon[3],"mon"=>$$daymon[1],"year"=>$dyear[1],"place"=>$dloc[1]); 
    404404      } 
    405405    } 
     
    418418      if ($this->page["Bio"] == "") $this->openpage ("Bio","person"); 
    419419      if (preg_match('|Date of Death</h5>(.*)<br|iUms',$this->page["Bio"],$match)) { 
    420         preg_match('/OnThisDay\?(day=(\d{1,2})|)(.{0,1}month=(.*?)"|)/ims',$match[1],$daymon); 
     420        preg_match('|/date/(\d+)-(\d+)/.*?>\d+\s+(.*?)<|',$match[1],$daymon); 
    421421        preg_match('|/search/name\?death_date=(\d{4})|ims',$match[1],$dyear); 
    422422        preg_match('/(\,\s*([^\(]+))/ims',$match[1],$dloc); 
    423423        preg_match('/\(([^\)]+)\)/ims',$match[1],$dcause); 
    424         $this->deathday = array("day"=>$daymon[2],"month"=>$daymon[4],"mon"=>$this->monthNo($daymon[4]),"year"=>$dyear[1],"place"=>$dloc[2],"cause"=>$dcause[1]); 
     424        $this->deathday = array("day"=>$daymon[2],"month"=>$daymon[3],"mon"=>$daymon[1],"year"=>$dyear[1],"place"=>$dloc[2],"cause"=>$dcause[1]); 
    425425      } 
    426426    }