29 lines
594 B
PHP
29 lines
594 B
PHP
<?php
|
|
/**
|
|
* Fonctions utiles au plugin Block Log
|
|
*
|
|
* @plugin Block Log
|
|
* @copyright 2019
|
|
* @author tofulm
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Blocklog\Fonctions
|
|
*/
|
|
|
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
return;
|
|
}
|
|
|
|
function trouver_blocklog($id_objet, $objet){
|
|
$from = array(
|
|
'spip_blocklogs as B',
|
|
'spip_blocklogs_liens as L'
|
|
);
|
|
$where = array(
|
|
'L.id_objet='.intval($id_objet),
|
|
'L.objet='.sql_quote($objet),
|
|
'L.id_blocklog=B.id_blocklog'
|
|
);
|
|
$blockchaine = sql_getfetsel('blockchaine', $from, $where, '', 'B.id_blocklog DESC', 1);
|
|
|
|
return $blockchaine;
|
|
}
|