Template and Lang Prefs

Rod

No avatar

2006-02-10 02:56

I have found a strange difference in servers that I can't explain. I have set up a cart on a test server just fine, I transfer it and all works fine except in the admin configuration page. The templates selection shows: .. and the language selection is blank.

I've tracked it down to the throwTemplatesSelect function. What could be different from sever to server break this fuction? I made a test file and placed it on my two servers:



<?php
  
function throwTemplatesSelect$sDirName null ){

    
$sOption =  null;
    
$oDir =     dir"templates/" );
    
$lp =       0;

    while( 
false !== ( $sDir $oDir->read( ) ) ){
      if( 
$lp >){
        if( 
is_dir"templates/".$sDir ) && $sDir != 'admin' ){
          if( isset( 
$sDirName ) && $sDirName == $sDir.'/' )
            
$sSelected 'selected="selected"';
          else
            
$sSelected null;

          
$sOption .= '<option value="'.$sDir.'/" '.$sSelected.'>'.$sDir.'</option>';
        }
      }
      
$lp++;
    } 
// end while

    
$oDir->close( );

    return 
$sOption;

    }


    
$test throwTemplatesSelect();
    echo 
$test;

    
?>



On one server it returns:
<option value="default/" >default</option>

and on the other:
<option value="../" >..</option>

But the dir structure is the same on both.

treewood (OpenSolution)

Avatar: treewood

2006-02-10 06:22

Rod - we know that problem. Search forum by word ''throwTemplatesSelect'' to check this problem

Back to top
about us | contact