Skip to content
This repository has been archived by the owner on Aug 10, 2020. It is now read-only.

Commit

Permalink
simplifica e inicializa
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Jul 31, 2015
1 parent 06b1edb commit 03cc905
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DB_DataObject_SIVeL.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function mezclaAutom($otro, &$obs)
) {
//$obs .= " OJO texto";
if (trim($otro->$v) != ""
&& strstr($this->$v, $otro->$v) == false
&& strstr($this->$v, $otro->$v) === false
) {
// Si no está concatenamos texto
if (trim($this->$v) == "") {
Expand Down
1 change: 1 addition & 0 deletions PagBaseMultiple.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ function buildForm()
);


$ed = array();
$nac = 'eliminar';
$n = $this->getButtonName($nac);
$e =& $this->createElement('submit', $n, _('Eliminar'));
Expand Down
2 changes: 1 addition & 1 deletion PagFuentesFrecuentes.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function formularioValores(&$db, $idcaso)


if (isset($_SESSION['nuevo_copia_id'])
&& strstr($_SESSION['nuevo_copia_id'], ":") != false
&& strstr($_SESSION['nuevo_copia_id'], ":") !== false
) {
list($idc, $idp, $fecha)
= explode(':', $_SESSION['nuevo_copia_id']);
Expand Down
3 changes: 2 additions & 1 deletion PagPResponsables.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,14 @@ function formularioValores(&$db, $idcaso)
if (isset($_SESSION['recuperaErrorValida'])) {
$v = $_SESSION['recuperaErrorValida'];
} else {
$v = array();
$cpr = $this->bcaso_presponsable->_do->id_presponsable;
$v['id_presponsable'] = $cpr;
$pr=& $this->getElement('id_presponsable');
$pr->setValue($cpr);
$vscc = array();
if (isset($_SESSION['nuevo_copia_id'])
&& strstr($_SESSION['nuevo_copia_id'], ':') != false
&& strstr($_SESSION['nuevo_copia_id'], ':') !== false
) {
list($idpr, $id) = explode(':', $_SESSION['nuevo_copia_id']);
unset($_SESSION['nuevo_copia_id']);
Expand Down
1 change: 1 addition & 0 deletions PagTipoViolencia.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ function formularioValores(&$db, $idcaso)
while ($ndo->fetch()) {
$valscd[] = $ndo->id_contexto;
}
$v = array();
//$scd->setValue($valscd);
$v['id_contexto'] = $valscd;

Expand Down
4 changes: 2 additions & 2 deletions ResConsulta.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class ResConsulta
* @return void
*/
function ResConsulta(&$campos, &$db, &$resultado, &$conv, $mostrar,
$detallesform = array(), $ordCasos = array(), $busca_pr = null,
$detallesform = array(), $ordCasos = array(), $busca_pr = array(),
$ordenar = '', $primnom = true
) {
$this->campos =& $campos;
Expand Down Expand Up @@ -515,7 +515,6 @@ function extraeColectivas($idcaso, &$db, &$idp, &$ndp, &$cdp,
* @param object &$db Conexión a BD
* @param array $tablas Tablas
* @param string $donde Donde
* @param string $pFinchasta Caja de selección
* @param string $pMuestra Muestra
*
* @return void
Expand Down Expand Up @@ -3075,6 +3074,7 @@ function reporteCsvAdjunto($db, $idcaso, $campos, $conv, $sal)
{
$adjunto_renglon = "";
$vrpre = '"';
$escon = array();
foreach ($campos as $cc => $nc) {
$adjunto_renglon .= "";
$vr = $vrescon = "";
Expand Down
4 changes: 2 additions & 2 deletions aut.php
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ function localiza_conf()
if (($ps = strrpos($n, "/")) !== false) {
$n = substr($n, 0, $ps);
}
if (($pm = strpos($n, "/modulos")) != false) {
if (($pm = strpos($n, "/modulos")) !== false) {
$n = substr($n, 0, $pm);
}
$n = str_replace("/", "_", $n);
Expand All @@ -618,7 +618,7 @@ function localiza_conf()
}
if (strpos($n, "_") > 0) {
$nn = substr($n, strpos($n, "_") + 1);
} else if (($pp = strpos($n, ".")) == true) {
} else if (($pp = strpos($n, ".")) !== false) {
$nn = substr($n, 0, $pp);
} else {
$nn = $n;
Expand Down
2 changes: 1 addition & 1 deletion misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ function consulta_or_muchos(&$w, &$t, $ntabla, $gcon = "AND",
$d->$vl = var_escapa_cadena($id_prin[$il], $db);
}
if ($d->find()>0) {
if (strstr($t, $ntabla)==false) {
if (strstr($t, $ntabla) === false) {
$t .= ", " . $ntabla;
foreach ($llave_ntabla as $il => $vl) {
consulta_and_sinap(
Expand Down
1 change: 1 addition & 0 deletions misc_caso.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function elimina_caso(&$db, $idcaso)
";
hace_consulta($db, $q, false, false);

$bo = array();
foreach ($GLOBALS['ficha_tabuladores'] as $tab) {
list(, $c, $o) = $tab;
//echo "OJO 1 o=$o, c=$c<br>";
Expand Down
1 change: 1 addition & 0 deletions misc_importa.php
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,7 @@ function extrae_casos()
#$db = $dcaso->getDatabaseConnection();
$dcaso->orderBy('id');
$dcaso->find();
$ubicaso = array();
while ($dcaso->fetch()) {
$obs[$dcaso->id]=""; // No hay observaciones para esta conversión en BD
$fechacaso[$dcaso->id] = $dcaso->fecha;
Expand Down
2 changes: 1 addition & 1 deletion modulos/anexos/PagAnexo.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function perform(&$page, $actionName)
if (isset($page->_submitValues['archivo'])) {
$nombre = var_escapa($page->_submitValues['archivo']);
$inin = $_SESSION['basicos_id'] . "_";
if (strpos($nombre, '/') != false) {
if (strpos($nombre, '/') !== false) {
die("No puede tener el caracter/");
}
if ((substr($nombre, 0, strlen($inin))) != $inin) {
Expand Down
1 change: 1 addition & 0 deletions modulos/desplazamiento/PagDesplazamiento.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ function formularioAgrega(&$db, $idcaso)
? $this->bdesplazamiento->_do->fechaexpulsion : '';
$this->addElement('');

$gr =array();
list($dep, $mun, ) = PagUbicacion::creaCampos(
$this, 'departamentodecl', 'municipiodecl', 'clasedecl'
);
Expand Down
1 change: 1 addition & 0 deletions modulos/mapag/mapag_misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function determina_host()
if (isset($_SERVER['HTTP_REFERER'])) {
$pu = parse_url($_SERVER['HTTP_REFERER']);
} else {
$pu = array();
$pu['scheme'] = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ?
"https" : "http";
$pu['host'] = $_SERVER['HTTP_HOST'];
Expand Down
1 change: 1 addition & 0 deletions sitios/pruebas/ambiente.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function verificaInsercion(&$db, $tprueba, $na)
assert(count($tprueba) == count($na));

$nume = 0;
$nd = array();
/* Verificando */
foreach ($tprueba as $nt) {
$q = "SELECT COUNT(*) FROM $nt";
Expand Down

0 comments on commit 03cc905

Please sign in to comment.