private static function spoolFilename($group)
{
- $file = dirname(dirname(__FILE__));
- $file .= '/spool/' . Banana::$protocole->name() . '/';
+ $file = Banana::$spool_root . '/' . Banana::$protocole->name() . '/';
if (!is_dir($file)) {
mkdir($file);
}
*/
public function markAllAsRead(array &$array = null)
{
- if (is_null($array)) {
+ if (is_null($array) && is_array($this->roots)) {
$array =& $this->roots;
- }
- if (!is_array($this->roots)) {
+ } elseif (is_null($array)) {
return;
}
foreach ($array as $id) {
} else {
$format = '%a %e %b';
}
- return utf8_encode(strftime($format, $stamp));
+ return strftime($format, $stamp);
}
/** displays children tree of a post
$res .= '<tr class="' . ($_index%2 ? 'pair' : 'impair') . ($overview->isread ? '' : ' new') . "\">\n";
$res .= '<td class="date">' . $this->formatDate($overview->date) . " </td>\n";
- $res .= '<td class="subj' . ($_index == $_ref ? ' cur' : '') . '">'
- . $_pfx_node .($hc ? ($_head ? $spfx_f : ($overview->parent_direct ? $spfx_s : $spfx_snd)) : $spfx_n);
+ $res .= '<td class="subj' . ($_index == $_ref ? ' cur' : '') . '"><div class="tree">'
+ . $_pfx_node .($hc ? ($_head ? $spfx_f : ($overview->parent_direct ? $spfx_s : $spfx_snd)) : $spfx_n)
+ . '</div>';
$subject = $overview->subject;
if (function_exists('hook_formatDisplayHeader')) {
list($subject, $link) = hook_formatDisplayHeader('subject', $subject, true);
for ($i = 0; $i < $pos ; $i++) {
$ndx += $this->overview[$this->overview[$id_parent]->children[$i]]->desc;
}
- $ndx++; //noeud père
+ $ndx++; //noeud père
$id_cur = $id_parent;
}