254. File Comparison Report

Produced on Mon May 12 13:05:39 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.

254.1 Files compared

# Location File Last Modified
1 Mon May 12 13:05:39 2008 UTC
2 Dolphin-v.6.1.0\orca\classes BxLang.php Wed Apr 9 17:44:52 2008 UTC

254.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 1 206
Removed 0 0

254.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

254.4 Active regular expressions

No regular expressions were active.

254.5 Comparison detail

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