accepte un sous forme d'un tableau associatif
This commit is contained in:
parent
6e202aff50
commit
05c63e9155
1 changed files with 10 additions and 4 deletions
|
@ -21,7 +21,6 @@ function inc_blocklog_dist($objet, $id_objet = 0, $num = 0, $chaine = '') {
|
||||||
spip_log('objet = '.$objet, 'blocklog');
|
spip_log('objet = '.$objet, 'blocklog');
|
||||||
spip_log('id_objet = '.$id_objet, 'blocklog');
|
spip_log('id_objet = '.$id_objet, 'blocklog');
|
||||||
spip_log('num = '.$num, 'blocklog');
|
spip_log('num = '.$num, 'blocklog');
|
||||||
spip_log($chaine, 'blocklog');
|
|
||||||
spip_log('----------------', 'blocklog');
|
spip_log('----------------', 'blocklog');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,18 +29,25 @@ function inc_blocklog_dist($objet, $id_objet = 0, $num = 0, $chaine = '') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($chaine)) {
|
if (is_array($chaine)) {
|
||||||
$chaine = implode('|', $chaine);
|
$c = [];
|
||||||
|
foreach ($chaine as $i => $v) {
|
||||||
|
$c[] = $v;
|
||||||
|
}
|
||||||
|
$chaine = implode('|', $c);
|
||||||
|
}
|
||||||
|
if (defined('_DEBUG_BLOCKLOG')) {
|
||||||
|
spip_log($chaine, 'blocklog');
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = date_create();
|
$date = date_create();
|
||||||
$chaine .= "|". date_timestamp_get($date);
|
$chaine .= "|". date_timestamp_get($date);
|
||||||
$chaine = hash(_BACKLOG_ALGO, $chaine);
|
$chaine = hash(_BLOCKLOG_ALGO, $chaine);
|
||||||
|
|
||||||
|
|
||||||
$blockchaine = sql_getfetsel('blockchaine', 'spip_blocklogs',1,'', 'id_blocklog DESC', '1');
|
$blockchaine = sql_getfetsel('blockchaine', 'spip_blocklogs',1,'', 'id_blocklog DESC', '1');
|
||||||
|
|
||||||
$blockchaine .= "|" . $chaine;
|
$blockchaine .= "|" . $chaine;
|
||||||
$blockchaine = hash(_BACKLOG_ALGO, $blockchaine);
|
$blockchaine = hash(_BLOCKLOG_ALGO, $blockchaine);
|
||||||
|
|
||||||
|
|
||||||
$set = array (
|
$set = array (
|
||||||
|
|
Loading…
Add table
Reference in a new issue