Corrections de notices PHP

svn/root/tags/spip-3.0.4
Matthieu Marcillaud 11 years ago
parent 7f6cd3d2b1
commit 56209ad00a

@ -210,8 +210,10 @@ if (!class_exists('nanoSha2'))
$pad = ceil(($length+1+32/$this->bytesString)/$npad)*$npad-32/$this->bytesString;
$ords = array_pad($ords,$pad,0);
$mask = (1 << $this->bytesString) - 1;
for($i = 0; $i < count($ords) * $this->bytesString; $i += $this->bytesString)
for($i = 0; $i < count($ords) * $this->bytesString; $i += $this->bytesString) {
if (!isset($bin[$i>>5])) { $bin[$i>>5] = 0; } // pour eviter des notices.
$bin[$i>>5] |= ($ords[$i / $this->bytesString] & $mask) << (24 - $i%32);
}
$bin[] = $length*$this->bytesString;
return $bin;
}

@ -72,6 +72,7 @@ function ajax_retour($corps, $content_type = null){
$c = $GLOBALS['meta']["charset"];
header('Content-Type: '.$content_type.'; charset='.$c);
$debut = (($xml AND strlen(trim($corps))) ? '<'."?xml version='1.0' encoding='".$c."'?".">\n" : '');
$fin = "";
}
echo $debut, $corps, $fin, $e;
}

@ -83,7 +83,7 @@ function autoriser_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL) {
if (_ADMINS_RESTREINTS AND is_array($qui))
$qui['restreint'] = liste_rubriques_auteur($qui['id_auteur']);
if (_DEBUG_AUTORISER) spip_log("autoriser $faire $type $id ($qui[nom]) ?");
if (_DEBUG_AUTORISER) spip_log("autoriser $faire $type $id (" . (isset($qui['nom']) ? $qui['nom'] : '') . ") ?");
// passer par objet_type pour avoir les alias
// et supprimer les _
@ -122,7 +122,7 @@ function autoriser_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL) {
}
}
if (_DEBUG_AUTORISER) spip_log("$f($faire,$type,$id,$qui[nom]): ".($a?'OK':'niet'));
if (_DEBUG_AUTORISER) spip_log("$f($faire,$type,$id," . (isset($qui['nom']) ? $qui['nom'] : '') . "): ".($a?'OK':'niet'));
return $a;
}

@ -133,7 +133,7 @@ if (isset($GLOBALS['_INC_PUBLIC']) AND $GLOBALS['_INC_PUBLIC']) {
$affiche_boutons_admin = ($html AND ((
isset($_COOKIE['spip_admin'])
AND !$flag_preserver
AND (!isset($flag_preserver) OR !$flag_preserver)
) OR $debug));
if ($affiche_boutons_admin)

@ -47,10 +47,10 @@ function formulaires_login_charger_dist($cible="",$login="",$prive=null)
$valeurs = array(
'var_login' => $login,
'editable' => !$row,
'cnx' => $row['cnx'],
'cnx' => isset($row['cnx']) ? $row['cnx'] : '',
'auth_http' => login_auth_http(),
'rester_connecte' => ((_RENOUVELLE_ALEA < 12*3600)? '' : ' '),
'_logo' => $row['logo'],
'_logo' => isset($row['logo']) ? $row['logo'] : '',
'_alea_actuel' => isset($row['alea_actuel'])?$row['alea_actuel']:'',
'_alea_futur' => isset($row['alea_futur'])?$row['alea_futur']:'',
'_pipeline' => 'affiche_formulaire_login', // faire passer le formulaire dans un pipe dedie pour les methodes auth

Loading…
Cancel
Save