Changeset ,493

Show
Ignore:
Timestamp:
11/04/08 12:38:28 (2 months ago)
Author:
fidojones
branch-nick:
bzr
Message:

algunas correciones y chequeos mas al crear subdominios

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/panel/admin_panel/modulos/mod_apache/include_funciones.php

    r492 r493  
    205205                        $tpl->assign(SUBDOMINIO, $substrip); 
    206206                        $tpl->assign(DOMINIO, $domstrip); 
    207                         if($variables["APACHE_DOCUMENTROOT"]!=_CFG_APACHE_DESACTIVADO) 
    208                                 $tpl->assign(APACHE_SUBDOCUMENTROOT, substr($variables["APACHE_DOCUMENTROOT"],0,-(strlen($carpetastrip)))); 
    209                         else 
     207                        $ruta_minima=_CFG_APACHE_DOCUMENTROOT.$domstrip; 
     208                        if($variables["APACHE_DOCUMENTROOT"]!=_CFG_APACHE_DESACTIVADO && strpos($carpetastrip,$domstrip)===false){ 
     209                                $openbasedir_path=substr($variables["APACHE_DOCUMENTROOT"],0,-(strlen($carpetastrip))); 
     210                                if(strpos($openbasedir_path,$ruta_minima)!==false){ 
     211                                        $tpl->assign(APACHE_SUBDOCUMENTROOT, $openbasedir_path); 
     212                                }else{ 
     213                                        $tpl->assign(APACHE_SUBDOCUMENTROOT, $ruta_minima); 
     214                                        $variables["CFG_DOCUMENTROOT"]=$ruta_minima; 
     215                                } 
     216                        }else{ 
    210217                                $tpl->assign(APACHE_SUBDOCUMENTROOT, $variables["APACHE_DOCUMENTROOT"]); 
     218                        } 
    211219                }else{ 
    212220                        $tpl->assign(DOMINIO, $dominio);