20. File Comparison Report

Produced on Wed Jun 18 08:01:29 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.

20.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.1\groups\orca\classes BxLang.php Wed Apr 9 17:44:58 2008 UTC
2 Dolphin-v.6.1.2\groups\orca\classes BxLang.php Thu Jun 5 05:00:11 2008 UTC

20.2 Comparison summary

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

20.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
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

20.4 Active regular expressions

No regular expressions were active.

20.5 Comparison detail

1   <?   1   <?
2   /********* ********** ********** ********** ********** ********** ********** ******   2   /********* ********** ********** ********** ********** ********** ********** ******
3   *                              O rca Intera ctive Foru m Script   3   *                              O rca Intera ctive Foru m Script
4   *                                 --------- --------   4   *                                 --------- --------
5   *     begi n                 : F r Nov 10 2 006   5   *     begi n                 : F r Nov 10 2 006
6   *     copy right             : ( C) 2006 Bo onEx Group   6   *     copy right             : ( C) 2006 Bo onEx Group
7   *     webs ite               : h ttp://www. boonex.com /   7   *     webs ite               : h ttp://www. boonex.com /
8   * This fil e is part  of Orca -  Interactiv e Forum Sc ript   8   * This fil e is part  of Orca -  Interactiv e Forum Sc ript
9   *   9   *
10   * Orca is  free softw are. This  work is li censed und er a Creat ive Common s Attribut ion 3.0 Li cense.    10   * Orca is  free softw are. This  work is li censed und er a Creat ive Common s Attribut ion 3.0 Li cense. 
11   * http://c reativecom mons.org/l icenses/by /3.0/   11   * http://c reativecom mons.org/l icenses/by /3.0/
12   *   12   *
13   * Orca is  distribute d in the h ope that i t will be  useful, bu t WITHOUT  ANY WARRAN TY;   13   * Orca is  distribute d in the h ope that i t will be  useful, bu t WITHOUT  ANY WARRAN TY;
14   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.   14   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.
15   * See the  Creative C ommons Att ribution 3 .0 License  for more  details.    15   * See the  Creative C ommons Att ribution 3 .0 License  for more  details. 
16   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Orca,    16   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Orca, 
17   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m   17   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m
18   ********** ********** ********** ********** ********** ********** ********** *****/   18   ********** ********** ********** ********** ********** ********** ********** *****/
19     19  
20     20  
21   //  langua ge compili ng class   21   //  langua ge compili ng class
22     22  
23   class BxLa ng   23   class BxLa ng
24   {      24   {   
25       var $_ sLang = 'e n';   25       var $_ sLang = 'e n';
26       var $_ sSkin = 'd efault';   26       var $_ sSkin = 'd efault';
27       var $_ iVisualPro cessing =  true;   27       var $_ iVisualPro cessing =  true;
28     28  
29       functi on BxLang  ($sLang, $ sSkin)   29       functi on BxLang  ($sLang, $ sSkin)
30       {   30       {
31           $t his->_sLan g = $sLang ;   31           $t his->_sLan g = $sLang ;
32           $t his->_sSki n = preg_r eplace ('# _\w{2}$#',  '', $sSki n);   32           $t his->_sSki n = preg_r eplace ('# _\w{2}$#',  '', $sSki n);
33       }   33       }
34     34  
35       functi on setVisu alProcessi ng ($i)   35       functi on setVisu alProcessi ng ($i)
36       {   36       {
37           $t his->_iVis ualProcess ing = $i;   37           $t his->_iVis ualProcess ing = $i;
38       }   38       }
39     39  
40       functi on compile  ()   40       functi on compile  ()
41       {      41       {   
42           $r et =  $thi s->_copyFr omOrig ();   42           $r et =  $thi s->_copyFr omOrig ();
43     43  
44           $t his->_clea nJsCache ( );           44           $t his->_clea nJsCache ( );        
45     45  
46           re turn $ret;   46           re turn $ret;
47       }   47       }
48     48  
49       functi on _cleanJ sCache ()   49       functi on _cleanJ sCache ()
50       {   50       {
51           gl obal $gCon f;   51           gl obal $gCon f;
52     52  
53           if  (isset($g Conf['dir' ]['cache'] ))   53           if  (isset($g Conf['dir' ]['cache'] ))
54           {   54           {
55                $d = dir ($gConf['d ir']['cach e']);   55                $d = dir ($gConf['d ir']['cach e']);
56                  56               
57                while (F ALSE !== ( $entry = $ d->read()) )   57                while (F ALSE !== ( $entry = $ d->read()) )
58                {   58                {
59                    if ( $entry ==  '.' || $en try == '.. ')   59                    if ( $entry ==  '.' || $en try == '.. ')
60                    {   60                    {
61                         continue;   61                         continue;
62                    }   62                    }
63     63  
64                    @unl ink ($gCon f['dir'][' cache'] .  $entry);   64                    @unl ink ($gCon f['dir'][' cache'] .  $entry);
65                }   65                }
66     66  
67           }   67           }
68       }   68       }
69     69  
70       functi on _copyFr omOrig ()   70       functi on _copyFr omOrig ()
71       {   71       {
72           gl obal $gCon f;   72           gl obal $gCon f;
73     73  
74           //  copy base   74           //  copy base
75           if  (!$this-> _fullCopy  ($gConf['d ir']['layo uts'] . 'b ase', $gCo nf['dir'][ 'layouts']  . 'base_'  . $this-> _sLang))   75           if  (!$this-> _fullCopy  ($gConf['d ir']['layo uts'] . 'b ase', $gCo nf['dir'][ 'layouts']  . 'base_'  . $this-> _sLang))
76                return f alse;   76                return f alse;
77     77  
78           //  copy skin s   78           //  copy skin s
79           $s DirSkin =  $gConf['di r']['layou ts'] . $th is->_sSkin ;   79           $s DirSkin =  $gConf['di r']['layou ts'] . $th is->_sSkin ;
80           if  (!$this-> _fullCopy  ($sDirSkin , $sDirSki n . '_' .  $this->_sL ang))   80           if  (!$this-> _fullCopy  ($sDirSkin , $sDirSki n . '_' .  $this->_sL ang))
81                return f alse;   81                return f alse;
82     82  
83           //  copy clas ses   83           //  copy clas ses
84           $s DirClasses  = preg_re place ('#c lasses/\w{ 2}/$#', 'c lasses/',  $gConf['di r']['class es']);   84           $s DirClasses  = preg_re place ('#c lasses/\w{ 2}/$#', 'c lasses/',  $gConf['di r']['class es']);
85           if  (!$this-> _fullCopy  ($sDirClas ses, $sDir Classes .  $this->_sL ang, false ))   85           if  (!$this-> _fullCopy  ($sDirClas ses, $sDir Classes .  $this->_sL ang, false ))
86                return f alse;   86                return f alse;
87     87  
88           //  copy java scripts   88           //  copy java scripts
89           $s DirJs = pr eg_replace  ('#js/\w{ 2}/$#', 'j s/', $gCon f['dir'][' js']);   89           $s DirJs = pr eg_replace  ('#js/\w{ 2}/$#', 'j s/', $gCon f['dir'][' js']);
90           if  (!$this-> _fullCopy  ($sDirJs,  $sDirJs .  $this->_sL ang, false ))   90           if  (!$this-> _fullCopy  ($sDirJs,  $sDirJs .  $this->_sL ang, false ))
91                return f alse;   91                return f alse;
92     92  
93           re turn true;   93           re turn true;
94       }   94       }
95     95  
96       functi on _replac eVars ($sF ilePath)   96       functi on _replac eVars ($sF ilePath)
97       {   97       {
98           $s  = $this-> _fileGetCo ntents ($s FilePath);   98           $s  = $this-> _fileGetCo ntents ($s FilePath);
99     99  
100           $s Ext = subs tr($sFileP ath, -4);   100           $s Ext = subs tr($sFileP ath, -4);
101     101  
102           if  ('.xsl' = = $sExt ||  '.php' ==  $sExt ||  '.js' == s ubstr($sFi lePath, -3 ))   102           if  ('.xsl' = = $sExt ||  '.php' ==  $sExt ||  '.js' == s ubstr($sFi lePath, -3 ))
103           {             103           {          
104                $this->_ replaceLan gs ($s);   104                $this->_ replaceLan gs ($s);
105           }   105           }
106       106    
107           if  ('.xsl' = = $sExt ||  '.php' ==  $sExt ||  '.css' ==  $sExt)   107           if  ('.xsl' = = $sExt ||  '.php' ==  $sExt ||  '.css' ==  $sExt)
108           {               108           {            
109                $this->_ replacePat ches ($s);             109                $this->_ replacePat ches ($s);          
110           }   110           }
111     111  
112           if  ('loader. php' == su bstr($sFil ePath, -10 ))   112           if  ('loader. php' == su bstr($sFil ePath, -10 ))
113           {   113           {
114                $s = str _replace ( "'..'","'. ./..'", $s );   114                $s = str _replace ( "'..'","'. ./..'", $s );
115           }   115           }
116     116  
117           $t his->_file PutContent s ($sFileP ath, $s);   117           $t his->_file PutContent s ($sFileP ath, $s);
118     118  
119           if  ($this->_ iVisualPro cessing)    119           if  ($this->_ iVisualPro cessing) 
120                echo "." ;   120                echo "." ;
121       }   121       }
122     122  
123       functi on _replac ePatches ( &$s)   123       functi on _replac ePatches ( &$s)
124       {   124       {
125           $s  = str_rep lace (   125           $s  = str_rep lace (
126                array(   126                array(
127                    'bas e/',    127                    'bas e/', 
128                    $thi s->_sSkin  . '/'   128                    $thi s->_sSkin  . '/'
129                ),    129                ), 
130                array(   130                array(
131                    'bas e_' . $thi s->_sLang  . '/',    131                    'bas e_' . $thi s->_sLang  . '/', 
132                    $thi s->_sSkin  . '_' . $t his->_sLan g . '/'   132                    $thi s->_sSkin  . '_' . $t his->_sLan g . '/'
133                ),   133                ),
134                $s);                134                $s);             
135       }   135       }
136     136  
137       functi on _langRe placeHandl er ($m)   137       functi on _langRe placeHandl er ($m)
138       {   138       {
139           re turn getLa ngString($ m[1], $thi s->_sLang) ;   139           re turn getLa ngString($ m[1], $thi s->_sLang) ;
140       }   140       }
141     141  
142       functi on _replac eLangs (&$ s)   142       functi on _replac eLangs (&$ s)
143       {            143       {         
144           $s  = preg_re place_call back ('#\[ L\[(.*?)\] \]#', arra y($this, ' _langRepla ceHandler' ), $s);   144           $s  = preg_re place_call back ('#\[ L\[(.*?)\] \]#', arra y($this, ' _langRepla ceHandler' ), $s);
145       }   145       }
146     146  
147       functi on _fullCo py ($sourc e, $target , $recursi vely = tru e)   147       functi on _fullCo py ($sourc e, $target , $recursi vely = tru e)
148       {   148       {
149           if  (is_dir($ source))   149           if  (is_dir($ source))
150           {   150           {
151                 @mkdir($ta rget
);
  151                 @mkdir($ta rget ,   0755 );
    152                @chmod($ target, 07 55);
152                  153               
153                $d = dir ($source);   154                $d = dir ($source);
154                  155               
155                while (F ALSE !== ( $entry = $ d->read()) )   156                while (F ALSE !== ( $entry = $ d->read()) )
156                {   157                {
157                    if ( $entry ==  '.' || $en try == '.. ')   158                    if ( $entry ==  '.' || $en try == '.. ')
158                    {   159                    {
159                         continue;   160                         continue;
160                    }   161                    }
161                      162                   
162                    $Ent ry = $sour ce . '/' .  $entry;   163                    $Ent ry = $sour ce . '/' .  $entry;
163                    if ( is_dir($En try))   164                    if ( is_dir($En try))
164                    {   165                    {
165                         if ($recur sively)   166                         if ($recur sively)
166                         {   167                         {
167                             if (!$ this->_ful lCopy($Ent ry, $targe t . '/' .  $entry))   168                             if (!$ this->_ful lCopy($Ent ry, $targe t . '/' .  $entry))
168                                 re turn false ;   169                                 re turn false ;
169                         }   170                         }
170                    }   171                    }
171                    else   172                    else
172                    {                     173                    {                  
173                         if (!copy( $Entry, $t arget . '/ ' . $entry ))   174                         if (!copy( $Entry, $t arget . '/ ' . $entry ))
174                             return  false;   175                             return  false;
    176                         @chmod($ta rget . '/'  . $entry,  0644);
175                         $this->_re placeVars  ($target .  '/' . $en try);   177                         $this->_re placeVars  ($target .  '/' . $en try);
176                    }   178                    }
177                }   179                }
178                  180               
179                $d->clos e();   181                $d->clos e();
180           }   182           }
181           el se   183           el se
182           {                 184           {              
183                if (!cop y($source,  $target))   185                if (!cop y($source,  $target))
184                    retu rn false;   186                    retu rn false;
    187                @chmod($ target, 06 44);
185                $this->_ replaceVar s ($target );   188                $this->_ replaceVar s ($target );
186           }   189           }
187     190  
188           re turn true;   191           re turn true;
189       }   192       }
190     193  
191       functi on _fileGe tContents  ($sFilePat h)   194       functi on _fileGe tContents  ($sFilePat h)
192       {   195       {
193           re turn file_ get_conten ts ($sFile Path);   196           re turn file_ get_conten ts ($sFile Path);
194       }   197       }
195     198  
196       functi on _filePu tContents  ($sFilePat h, $s)   199       functi on _filePu tContents  ($sFilePat h, $s)
197       {   200       {
198           $f  = fopen ( $sFilePath , 'w');   201           $f  = fopen ( $sFilePath , 'w');
199           if  (!$f) ret urn false;   202           if  (!$f) ret urn false;
200           fw rite ($f,  $s);   203           fw rite ($f,  $s);
201           fc lose($f);   204           fc lose($f);
202           re turn true;   205           re turn true;
203       }   206       }
204   }   207   }
205     208  
206   ?>   209   ?>