bootstrap(array('NbIns'), 'update_NbIns'); $this->bootstrap(array('NbValid'), 'update_NbValid'); } public function asso($key=null) { static $aid = null; if (is_null($aid)) { $gp = Get::v('n'); if ($p = strpos($gp, '/')) { $gp = substr($gp, 0, $p); } if ($gp) { $res = XDB::query('SELECT a.*, d.nom AS domnom, FIND_IN_SET(\'wiki_desc\', a.flags) AS wiki_desc, FIND_IN_SET(\'notif_unsub\', a.flags) AS notif_unsub FROM groupex.asso AS a LEFT JOIN groupex.dom AS d ON d.id = a.dom WHERE diminutif = {?}', $gp); if (!($aid = $res->fetchOneAssoc())) { $aid = array(); } } else { $aid = array(); } } if (empty($key)) { return $aid; } elseif ( isset($aid[$key]) ) { return $aid[$key]; } else { return null; } } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>