From c21d06176ca56bae2efd1c467078d02c87b9fd10 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 3 May 2012 14:27:26 +0000 Subject: [PATCH] Arreglo de error de descargas de documentos git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk@141 e2b1556b-49f8-d141-9351-52d6861a72d9 --- src/Objects/Usuario.php | 4 ++-- src/descargas.php | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Objects/Usuario.php b/src/Objects/Usuario.php index 5be2b32..8e88c41 100644 --- a/src/Objects/Usuario.php +++ b/src/Objects/Usuario.php @@ -19,7 +19,7 @@ } public function getRutaCV($id){ - if($this->tieneRol(4) || $this->tieneRol(3)) { // || $this->tieneRol(7)){ + if($this->tieneRol(4) || $this->tieneRol(3)) || $this->tieneRol(7)){ $consulta = "SELECT curriculum FROM curriculum_usuario WHERE cod = '".$id."'"; $bd = new BD(); $ruta = $bd->getCampo($consulta); @@ -41,7 +41,7 @@ } public function getNombreCV($id){ - if($this->tieneRol(4) || $this->tieneRol(3)) { // || $this->tieneRol(7)){ + if($this->tieneRol(4) || $this->tieneRol(3)) || $this->tieneRol(7)){ $ruta = $this->getRutaCV($id); $consulta="SELECT CONCAT(nombre,\" \",apellidos,\" (\",fecha,\")\") FROM usuarios, curriculum_usuario WHERE curriculum_usuario.cod=\"".$id."\" AND curriculum_usuario.oid = usuarios.oid"; $bd = new BD(); diff --git a/src/descargas.php b/src/descargas.php index 036b0a4..634cbe4 100644 --- a/src/descargas.php +++ b/src/descargas.php @@ -28,10 +28,9 @@ $url = $constantes['srcDocs']; $nombreFichero=""; $nombreMostrar=""; $estado=false; -echo $_GET['tipo']; + switch ($_GET['tipo']) { - case "cv": - if(!$usuario->tieneRol("4") && !$usuario->tieneRol("3")){ // && !$usuario->tieneRol("7")){ + case "cv": if(!$usuario->tieneRol("4") && !$usuario->tieneRol("3")) && !$usuario->tieneRol("7")){ $msg=$locale['1491']; } else { $estado=true; @@ -84,7 +83,6 @@ if($estado){ header( "Pragma: public"); header( "Content-Length: ".filesize($ruta)); @readfile( $ruta ); - //echo $ruta; } else { if($msg=="") $msg=$locale['1490'];