- Resuelto problema de formato de fecha con el campo 'fecha de nacimiento' de un candidato.
- Arreglado problema de configuración al subir a producción. - Añadir auditoría para documentos y capacidades de un candidato. git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@66 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
a659e6a624
commit
359b5ac33c
@ -28,6 +28,7 @@ $configSpecific = array(
|
|||||||
'connectionString' => 'mysql:host=PRODUCTION_HOST;dbname=PRODUCTION_DBNAME',
|
'connectionString' => 'mysql:host=PRODUCTION_HOST;dbname=PRODUCTION_DBNAME',
|
||||||
'username' => 'USERNAME',
|
'username' => 'USERNAME',
|
||||||
'password' => 'PASSWORD',
|
'password' => 'PASSWORD',
|
||||||
|
'charset'=>'utf8',
|
||||||
),
|
),
|
||||||
|
|
||||||
// Application Log
|
// Application Log
|
||||||
|
|||||||
@ -28,6 +28,7 @@ $configSpecific = array(
|
|||||||
'connectionString' => 'mysql:host=maquetaweb.ws;dbname=maqueta_intranet_stage',
|
'connectionString' => 'mysql:host=maquetaweb.ws;dbname=maqueta_intranet_stage',
|
||||||
'username' => 'maqueta_intranet',
|
'username' => 'maqueta_intranet',
|
||||||
'password' => 'intranet',
|
'password' => 'intranet',
|
||||||
|
'charset'=>'utf8',
|
||||||
),
|
),
|
||||||
|
|
||||||
// Application Log
|
// Application Log
|
||||||
@ -43,7 +44,11 @@ $configSpecific = array(
|
|||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
'params'=>array(
|
||||||
|
// Ruta de los currículums de los candidatos
|
||||||
|
'curriculumPath' => dirname(__FILE__) . '/../../public_html/intranet/documentos/',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* @property string $telefono_fijo
|
* @property string $telefono_fijo
|
||||||
* @property string $telefono_movil
|
* @property string $telefono_movil
|
||||||
* @property string $sexo
|
* @property string $sexo
|
||||||
* @property string $fecha_nacimiento
|
* @property date $fecha_nacimiento
|
||||||
* @property string $lugar_nacimiento
|
* @property string $lugar_nacimiento
|
||||||
* @property datetime $fecha_alta
|
* @property datetime $fecha_alta
|
||||||
* @property datetime $fecha_modificacion
|
* @property datetime $fecha_modificacion
|
||||||
@ -306,8 +306,8 @@ class Candidato extends CActiveRecord
|
|||||||
//PHP dates are displayed as dd/mm/yyyy
|
//PHP dates are displayed as dd/mm/yyyy
|
||||||
//MYSQL dates are stored as yyyy-mm-dd
|
//MYSQL dates are stored as yyyy-mm-dd
|
||||||
if ($this->fecha_nacimiento != '') {
|
if ($this->fecha_nacimiento != '') {
|
||||||
$unafecha = DateTime::createFromFormat('d/m/Y', $this->fecha_nacimiento);
|
$dateToMySQL=date('Y-m-d', CDateTimeParser::parse($this->fecha_nacimiento, Yii::app()->locale->dateFormat));
|
||||||
$this->fecha_nacimiento = $unafecha->format('Y-m-d');
|
$this->fecha_nacimiento = $dateToMySQL;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::beforeSave();
|
parent::beforeSave();
|
||||||
@ -317,8 +317,9 @@ class Candidato extends CActiveRecord
|
|||||||
protected function afterFind() {
|
protected function afterFind() {
|
||||||
//PHP dates are displayed as dd/mm/yyyy
|
//PHP dates are displayed as dd/mm/yyyy
|
||||||
//MYSQL dates are stored as yyyy-mm-dd
|
//MYSQL dates are stored as yyyy-mm-dd
|
||||||
$unafecha = DateTime::createFromFormat('Y-m-d', $this->fecha_nacimiento);
|
|
||||||
$this->fecha_nacimiento = $unafecha->format('d/m/Y');
|
$dateToLocale=Yii::app()->dateFormatter->formatDateTime(CDateTimeParser::parse($this->fecha_nacimiento, 'yyyy-MM-dd'),'medium',null);
|
||||||
|
$this->fecha_nacimiento = $dateToLocale;
|
||||||
|
|
||||||
parent::afterFind();
|
parent::afterFind();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -103,4 +103,10 @@ class CandidatoCapacidad extends CActiveRecord
|
|||||||
'criteria'=>$criteria,
|
'criteria'=>$criteria,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function behaviors() {
|
||||||
|
return array(
|
||||||
|
'LoggableBehavior'=> 'application.modules.auditTrail.behaviors.LoggableBehavior',
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -142,4 +142,9 @@ class CandidatoDocumento extends CActiveRecord
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function behaviors() {
|
||||||
|
return array(
|
||||||
|
'LoggableBehavior'=> 'application.modules.auditTrail.behaviors.LoggableBehavior',
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user