380,7 → 380,19 |
|
// FORMS |
function FormOpen($method = "", $tag = "", $formMethod = "post") { |
/* Debut de la modif ACeditor */ |
// ACEditor: id=\"ACEditor\" name=\"ACEditor\" ci-dessous le if a été ajouté (initialement, seule la ligne du else existait) |
// si l'url se termine par edit (expression régulière edit$), on est en mode édition et dans ce cas on donne les id et name au formulaire |
// Sinon surtout pas car ça marche plus dans la mesure ou plusieurs formulaires auraient ces ID et name et dans ce cas |
// il semble que le dernier soit considéré, c'est à dire pas le bon :o( |
|
if (ereg('edit$', $this->href($method, $tag))) { |
$result = "<form id=\"ACEditor\" name=\"ACEditor\" action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n"; |
} else { |
$result = "<form action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n"; |
} |
|
/* fin de la modif ACeditor */ |
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wiki\" value=\"".$this->MiniHref($method, $tag)."\" />\n"; |
return $result; |
} |
512,11 → 524,12 |
if ($ids = $this->LoadAll("select min(id) as id from ".$this->config["table_prefix"]."pages where comment_on != '' group by tag order by id desc")) |
{ |
// load complete comments |
$num=0; |
foreach ($ids as $id) |
{ |
$comment = $this->LoadSingle("select * from ".$this->config["table_prefix"]."pages where id = '".$id["id"]."' limit 1"); |
if (!isset($comments[$comment["comment_on"]]) && $num < $limit) |
$num=0; |
if (!isset($comments[$comment["comment_on"]])) $comments[$comment["comment_on"]]=''; |
if (!$comments[$comment["comment_on"]] && $num < $limit) |
{ |
$comments[$comment["comment_on"]] = $comment; |
$num++; |
722,6 → 735,7 |
"default_write_acl" => "*", |
"default_read_acl" => "*", |
"default_comment_acl" => "*", |
"menu_page" => "PageMenu", |
"preview_before_save" => "0"); |
|
// load config |