208. File Comparison Report

Produced on Mon May 12 13:05:11 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

208.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\inc\classes BxRSS.php Fri Oct 19 13:17:44 2007 UTC
2 Dolphin-v.6.1.0\inc\classes BxRSS.php Thu Mar 27 04:18:10 2008 UTC

208.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 378
Changed 2 4
Inserted 0 0
Removed 0 0

208.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

208.4 Active regular expressions

No regular expressions were active.

208.5 Comparison detail

1   <?   1   <?
2     2  
3   class BxRS S   3   class BxRS S
4   {   4   {
5       var $s XmlText;   5       var $s XmlText;
6          6       
7       //mand atory   7       //mand atory
8       var $t itle;   8       var $t itle;
9       var $l ink;   9       var $l ink;
10       var $d escription ;   10       var $d escription ;
11          11       
12       //opti onal   12       //opti onal
13       var $l anguage;   13       var $l anguage;
14       var $c opyright;   14       var $c opyright;
15       var $m anagingEdi tor;   15       var $m anagingEdi tor;
16       var $w ebMaster;   16       var $w ebMaster;
17       var $p ubDate;   17       var $p ubDate;
18       var $l astBuildDa te;   18       var $l astBuildDa te;
19       var $c ategory;   19       var $c ategory;
20       var $g enerator;   20       var $g enerator;
21       var $d ocs;   21       var $d ocs;
22       var $c loud;   22       var $c loud;
23       var $t tl;   23       var $t tl;
24       var $i mage;   24       var $i mage;
25       var $r ating;   25       var $r ating;
26       var $t extInput;   26       var $t extInput;
27       var $s kipHours;   27       var $s kipHours;
28       var $s kipDays;   28       var $s kipDays;
29          29       
30       //arra y with ite ms   30       //arra y with ite ms
31       var $i tems;   31       var $i tems;
32          32       
33       functi on BxRSS(  $url )   33       functi on BxRSS(  $url )
34       {   34       {
35           $t his -> ite ms = array ();   35           $t his -> ite ms = array ();
36              36           
37           if ( $url and  $this ->  sXmlText =  @file_get _contents(  $url ) )   37           if ( $url and  $this ->  sXmlText =  @file_get _contents(  $url ) )
38                $this ->  _doFillFr omText();   38                $this ->  _doFillFr omText();
39           el se   39           el se
40                return n ull;   40                return n ull;
41       }   41       }
42          42       
43       functi on _doFill FromText()   43       functi on _doFill FromText()
44       {   44       {
45           $v als = $ind  = array() ;   45           $v als = $ind  = array() ;
46              46           
47            $xml_parse r   =   xml_parser _create(
);
  47            $xml_parse r   =   xml_parser _create(   'UTF-8'   );
48              48           
49           xm l_parser_s et_option  ( $xml_par ser, XML_O PTION_CASE _FOLDING,  0 );   49           xm l_parser_s et_option  ( $xml_par ser, XML_O PTION_CASE _FOLDING,  0 );
50           xm l_parser_s et_option  ( $xml_par ser, XML_O PTION_SKIP _WHITE, 1  );   50           xm l_parser_s et_option  ( $xml_par ser, XML_O PTION_SKIP _WHITE, 1  );
51            // xml_parser _set_optio n   (   $xml_parse r,   XML_OPTION _TARGET_EN CODING,   'UTF-8'   );   51           
xml_parser _set_optio n   (   $xml_parse r,   XML_OPTION _TARGET_EN CODING,   'UTF-8'   );
52              52           
53           xm l_parse_in to_struct(  $xml_pars er, $this  -> sXmlTex t, $vals,  $ind );   53           xm l_parse_in to_struct(  $xml_pars er, $this  -> sXmlTex t, $vals,  $ind );
54              54           
55           xm l_parser_f ree( $xml_ parser );   55           xm l_parser_f ree( $xml_ parser );
56              56           
57           $t his -> sXm lText = '' ;   57           $t his -> sXm lText = '' ;
58              58           
59           // mandatory   59           // mandatory
60           $t his -> tit le         = $vals[ $ ind['title '][0] ]['v alue'];   60           $t his -> tit le         = $vals[ $ ind['title '][0] ]['v alue'];
61           $t his -> lin k          = $vals[ $ ind['link' ][0] ]['va lue'];   61           $t his -> lin k          = $vals[ $ ind['link' ][0] ]['va lue'];
62           $t his -> des cription   = $vals[ $ ind['descr iption'][0 ] ]['value '];   62           $t his -> des cription   = $vals[ $ ind['descr iption'][0 ] ]['value '];
63              63           
64           // optional   64           // optional
65           if ( $ind['la nguage']        and $ vals[ $ind ['language '][0] ]['l evel'] ==  3 )   65           if ( $ind['la nguage']        and $ vals[ $ind ['language '][0] ]['l evel'] ==  3 )
66                $this ->  language         = $ vals[ $ind ['language '][0] ]['v alue'];   66                $this ->  language         = $ vals[ $ind ['language '][0] ]['v alue'];
67              67           
68           if ( $ind['co pyright']       and $ vals[ $ind ['copyrigh t'][0] ][' level'] ==  3 )   68           if ( $ind['co pyright']       and $ vals[ $ind ['copyrigh t'][0] ][' level'] ==  3 )
69                $this ->  copyright        = $ vals[ $ind ['copyrigh t'][0] ][' value'];   69                $this ->  copyright        = $ vals[ $ind ['copyrigh t'][0] ][' value'];
70              70           
71           if ( $ind['ma nagingEdit or'] and $ vals[ $ind ['managing Editor'][0 ] ]['level '] == 3 )   71           if ( $ind['ma nagingEdit or'] and $ vals[ $ind ['managing Editor'][0 ] ]['level '] == 3 )
72                $this ->  managingE ditor  = $ vals[ $ind ['managing Editor'][0 ] ]['value '];   72                $this ->  managingE ditor  = $ vals[ $ind ['managing Editor'][0 ] ]['value '];
73              73           
74           if ( $ind['we bMaster']       and $ vals[ $ind ['webMaste r'][0] ][' level'] ==  3 )   74           if ( $ind['we bMaster']       and $ vals[ $ind ['webMaste r'][0] ][' level'] ==  3 )
75                $this ->  webMaster        = $ vals[ $ind ['webMaste r'][0] ][' value'];   75                $this ->  webMaster        = $ vals[ $ind ['webMaste r'][0] ][' value'];
76              76           
77           if ( $ind['la stBuildDat e']  and $ vals[ $ind ['lastBuil dDate'][0]  ]['level' ] == 3 )   77           if ( $ind['la stBuildDat e']  and $ vals[ $ind ['lastBuil dDate'][0]  ]['level' ] == 3 )
78                $this ->  lastBuild Date   = $ vals[ $ind ['lastBuil dDate'][0]  ]['value' ];   78                $this ->  lastBuild Date   = $ vals[ $ind ['lastBuil dDate'][0]  ]['value' ];
79              79           
80           if ( $ind['ge nerator']       and $ vals[ $ind ['generato r'][0] ][' level'] ==  3 )   80           if ( $ind['ge nerator']       and $ vals[ $ind ['generato r'][0] ][' level'] ==  3 )
81                $this ->  generator        = $ vals[ $ind ['generato r'][0] ][' value'];   81                $this ->  generator        = $ vals[ $ind ['generato r'][0] ][' value'];
82              82           
83           if ( $ind['do cs']            and $ vals[ $ind ['docs'][0 ] ]['level '] == 3 )   83           if ( $ind['do cs']            and $ vals[ $ind ['docs'][0 ] ]['level '] == 3 )
84                $this ->  docs             = $ vals[ $ind ['docs'][0 ] ]['value '];   84                $this ->  docs             = $ vals[ $ind ['docs'][0 ] ]['value '];
85              85           
86           if ( $ind['cl oud']           and $ vals[ $ind ['cloud'][ 0] ]['leve l'] == 3 )   86           if ( $ind['cl oud']           and $ vals[ $ind ['cloud'][ 0] ]['leve l'] == 3 )
87                $this ->  cloud            = $ vals[ $ind ['cloud'][ 0] ]['valu e'];   87                $this ->  cloud            = $ vals[ $ind ['cloud'][ 0] ]['valu e'];
88              88           
89           if ( $ind['tt l']             and $ vals[ $ind ['ttl'][0]  ]['level' ] == 3 )   89           if ( $ind['tt l']             and $ vals[ $ind ['ttl'][0]  ]['level' ] == 3 )
90                $this ->  ttl              = $ vals[ $ind ['ttl'][0]  ]['value' ];   90                $this ->  ttl              = $ vals[ $ind ['ttl'][0]  ]['value' ];
91              91           
92           if ( $ind['im age']           and $ vals[ $ind ['image'][ 0] ]['leve l'] == 3 )   92           if ( $ind['im age']           and $ vals[ $ind ['image'][ 0] ]['leve l'] == 3 )
93                $this ->  image            = $ vals[ $ind ['image'][ 0] ]['valu e'];   93                $this ->  image            = $ vals[ $ind ['image'][ 0] ]['valu e'];
94              94           
95           if ( $ind['ra ting']          and $ vals[ $ind ['rating'] [0] ]['lev el'] == 3  )   95           if ( $ind['ra ting']          and $ vals[ $ind ['rating'] [0] ]['lev el'] == 3  )
96                $this ->  rating           = $ vals[ $ind ['rating'] [0] ]['val ue'];   96                $this ->  rating           = $ vals[ $ind ['rating'] [0] ]['val ue'];
97              97           
98           if ( $ind['te xtInput']       and $ vals[ $ind ['textInpu t'][0] ][' level'] ==  3 )   98           if ( $ind['te xtInput']       and $ vals[ $ind ['textInpu t'][0] ][' level'] ==  3 )
99                $this ->  textInput        = $ vals[ $ind ['textInpu t'][0] ][' value'];   99                $this ->  textInput        = $ vals[ $ind ['textInpu t'][0] ][' value'];
100              100           
101           if ( $ind['sk ipHours']       and $ vals[ $ind ['skipHour s'][0] ][' level'] ==  3 )   101           if ( $ind['sk ipHours']       and $ vals[ $ind ['skipHour s'][0] ][' level'] ==  3 )
102                $this ->  skipHours        = $ vals[ $ind ['skipHour s'][0] ][' value'];   102                $this ->  skipHours        = $ vals[ $ind ['skipHour s'][0] ][' value'];
103              103           
104           if ( $ind['sk ipDays']        and $ vals[ $ind ['skipDays '][0] ]['l evel'] ==  3 )   104           if ( $ind['sk ipDays']        and $ vals[ $ind ['skipDays '][0] ]['l evel'] ==  3 )
105                $this ->  skipDays         = $ vals[ $ind ['skipDays '][0] ]['v alue'];   105                $this ->  skipDays         = $ vals[ $ind ['skipDays '][0] ]['v alue'];
106              106           
107           if ( $ind['pu bDate']         and $ vals[ $ind ['pubDate' ][0] ]['le vel'] == 3  )   107           if ( $ind['pu bDate']         and $ vals[ $ind ['pubDate' ][0] ]['le vel'] == 3  )
108                $this ->  pubDate          = $ vals[ $ind ['pubDate' ][0] ]['va lue'];   108                $this ->  pubDate          = $ vals[ $ind ['pubDate' ][0] ]['va lue'];
109              109           
110           if ( $ind['ca tegory']        and $ vals[ $ind ['category '][0] ]['l evel'] ==  3 )   110           if ( $ind['ca tegory']        and $ vals[ $ind ['category '][0] ]['l evel'] ==  3 )
111                $this ->  category         = $ vals[ $ind ['category '][0] ]['v alue'];   111                $this ->  category         = $ vals[ $ind ['category '][0] ]['v alue'];
112              112           
113           // get dolphi n version   113           // get dolphi n version
114           if ( $ind['do lphin']         and $ vals[ $ind ['dolphin' ][0] ]['le vel'] == 3  )   114           if ( $ind['do lphin']         and $ vals[ $ind ['dolphin' ][0] ]['le vel'] == 3  )
115                $this ->  dolVersio n      = $ vals[ $ind ['dolphin' ][0] ]['va lue'];   115                $this ->  dolVersio n      = $ vals[ $ind ['dolphin' ][0] ]['va lue'];
116              116           
117           // items   117           // items
118           if  ($ind &&  $ind['item '])   118           if  ($ind &&  $ind['item '])
119           fo reach( $in d['item']  as $itemIn d )   119           fo reach( $in d['item']  as $itemIn d )
120           {   120           {
121                if( $val s[ $itemIn d ]['type' ] == 'clos e' )   121                if( $val s[ $itemIn d ]['type' ] == 'clos e' )
122                    cont inue;   122                    cont inue;
123                   123                
124                $aItem =  array();   124                $aItem =  array();
125                $aItem[' category']  = array() ;   125                $aItem[' category']  = array() ;
126                   126                
127                while( $ vals[ ++$i temInd ][' level'] ==  4 )   127                while( $ vals[ ++$i temInd ][' level'] ==  4 )
128                {   128                {
129                    if(  $vals[ $it emInd ]['t ag'] == 'c ategory' )   129                    if(  $vals[ $it emInd ]['t ag'] == 'c ategory' )
130                         $aItem['ca tegory'][]  = $vals[  $itemInd ] ;   130                         $aItem['ca tegory'][]  = $vals[  $itemInd ] ;
131                    else   131                    else
132                         $aItem[ $v als[ $item Ind ]['tag '] ] = $va ls[ $itemI nd ];   132                         $aItem[ $v als[ $item Ind ]['tag '] ] = $va ls[ $itemI nd ];
133                }   133                }
134                $this ->  items[] =  new BxRSS Item( $aIt em );   134                $this ->  items[] =  new BxRSS Item( $aIt em );
135           }   135           }
136       }   136       }
137   }   137   }
138     138  
139     139  
140   class BxRS SItem   140   class BxRS SItem
141   {   141   {
142       var $t itle;   142       var $t itle;
143       var $l ink;   143       var $l ink;
144       var $d escription ;   144       var $d escription ;
145       var $a uthor;   145       var $a uthor;
146       var $c ategory;   146       var $c ategory;
147       var $c omments;   147       var $c omments;
148       var $p ubDate;   148       var $p ubDate;
149          149       
150       var $g uid;   150       var $g uid;
151       var $g uid_isPerm aLink;   151       var $g uid_isPerm aLink;
152          152       
153       var $s ource;   153       var $s ource;
154       var $s ource_url;   154       var $s ource_url;
155          155       
156       var $e nclosure;   156       var $e nclosure;
157       var $e nclosure_u rl;   157       var $e nclosure_u rl;
158       var $e nclosure_l ength;   158       var $e nclosure_l ength;
159       var $e nclosure_t ype;   159       var $e nclosure_t ype;
160          160       
161       functi on BxRSSIt em( $aItem  )   161       functi on BxRSSIt em( $aItem  )
162       {   162       {
163           $t his -> tit le       =  $aItem['t itle']['va lue'];   163           $t his -> tit le       =  $aItem['t itle']['va lue'];
164           $t his -> lin k        =  $aItem['l ink']['val ue'];   164           $t his -> lin k        =  $aItem['l ink']['val ue'];
165           $t his -> des cription =  $aItem['d escription ']['value' ];   165           $t his -> des cription =  $aItem['d escription ']['value' ];
166           $t his -> aut hor      =  $aItem['a uthor']['v alue'];   166           $t his -> aut hor      =  $aItem['a uthor']['v alue'];
167           $t his -> com ments    =  $aItem['c omments'][ 'value'];   167           $t his -> com ments    =  $aItem['c omments'][ 'value'];
168           $t his -> pub Date     =  $aItem['p ubDate'][' value'];   168           $t his -> pub Date     =  $aItem['p ubDate'][' value'];
169              169           
170           $t his -> sou rce      =  $aItem['s ource']['v alue'];   170           $t his -> sou rce      =  $aItem['s ource']['v alue'];
171           $t his -> sou rce_url  =  $aItem['s ource']['a ttributes' ]['url'];   171           $t his -> sou rce_url  =  $aItem['s ource']['a ttributes' ]['url'];
172              172           
173           $t his -> enc losure          = $aI tem['enclo sure']['va lue'];   173           $t his -> enc losure          = $aI tem['enclo sure']['va lue'];
174           $t his -> enc losure_url      = $aI tem['enclo sure']['at tributes'] ['url'];   174           $t his -> enc losure_url      = $aI tem['enclo sure']['at tributes'] ['url'];
175           $t his -> enc losure_len gth  = $aI tem['enclo sure']['at tributes'] ['length'] ;   175           $t his -> enc losure_len gth  = $aI tem['enclo sure']['at tributes'] ['length'] ;
176           $t his -> enc losure_typ e    = $aI tem['enclo sure']['at tributes'] ['type'];   176           $t his -> enc losure_typ e    = $aI tem['enclo sure']['at tributes'] ['type'];
177              177           
178           $t his -> gui d        =  $aItem['g uid']['val ue'];   178           $t his -> gui d        =  $aItem['g uid']['val ue'];
179              179           
180           if ( $aItem[' guid']['at tributes'] ['isPermaL ink'] == ' false' )   180           if ( $aItem[' guid']['at tributes'] ['isPermaL ink'] == ' false' )
181                $this ->  guid_isPe rmaLink =  false;   181                $this ->  guid_isPe rmaLink =  false;
182           el se   182           el se
183                $this ->  guid_isPe rmaLink =  true; //de fault valu e is true   183                $this ->  guid_isPe rmaLink =  true; //de fault valu e is true
184              184           
185           $t his -> cat egory = ar ray(); //  (title =>  url)   185           $t his -> cat egory = ar ray(); //  (title =>  url)
186           fo reach( $aI tem['categ ory'] as $ category )   186           fo reach( $aI tem['categ ory'] as $ category )
187           {   187           {
188                $this ->  category[  $category ['value']  ] = $categ ory['attri butes']['u rl'] ;   188                $this ->  category[  $category ['value']  ] = $categ ory['attri butes']['u rl'] ;
189           }   189           }
190       }   190       }
191   }   191   }