Line 378... |
Line 378... |
378 |
|
378 |
|
379 |
|
379 |
|
- |
|
380 |
|
- |
|
381 |
// FORMS
|
- |
|
382 |
function FormOpen($method = "", $tag = "", $formMethod = "post") {
|
- |
|
383 |
/* Debut de la modif ACeditor */
|
- |
|
384 |
// ACEditor: id=\"ACEditor\" name=\"ACEditor\" ci-dessous le if a été ajouté (initialement, seule la ligne du else existait)
|
- |
|
385 |
// 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
|
- |
|
386 |
// Sinon surtout pas car ça marche plus dans la mesure ou plusieurs formulaires auraient ces ID et name et dans ce cas
|
- |
|
387 |
// il semble que le dernier soit considéré, c'est à dire pas le bon :o(
|
- |
|
388 |
|
380 |
|
389 |
if (ereg('edit$', $this->href($method, $tag))) {
|
- |
|
390 |
$result = "<form id=\"ACEditor\" name=\"ACEditor\" action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
|
- |
|
391 |
} else {
|
- |
|
392 |
$result = "<form action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
|
381 |
// FORMS
|
393 |
}
|
382 |
function FormOpen($method = "", $tag = "", $formMethod = "post") {
|
394 |
|
383 |
$result = "<form action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
|
395 |
/* fin de la modif ACeditor */
|
384 |
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wiki\" value=\"".$this->MiniHref($method, $tag)."\" />\n";
|
396 |
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wiki\" value=\"".$this->MiniHref($method, $tag)."\" />\n";
|
385 |
return $result;
|
397 |
return $result;
|
Line 510... |
Line 522... |
510 |
$pages=array();
|
522 |
$pages=array();
|
511 |
$comments=array();
|
523 |
$comments=array();
|
512 |
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"))
|
524 |
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"))
|
513 |
{
|
525 |
{
|
514 |
// load complete comments
|
526 |
// load complete comments
|
515 |
$num=0;
|
- |
|
516 |
foreach ($ids as $id)
|
527 |
foreach ($ids as $id)
|
517 |
{
|
528 |
{
|
518 |
$comment = $this->LoadSingle("select * from ".$this->config["table_prefix"]."pages where id = '".$id["id"]."' limit 1");
|
529 |
$comment = $this->LoadSingle("select * from ".$this->config["table_prefix"]."pages where id = '".$id["id"]."' limit 1");
|
- |
|
530 |
$num=0;
|
- |
|
531 |
if (!isset($comments[$comment["comment_on"]])) $comments[$comment["comment_on"]]='';
|
519 |
if (!isset($comments[$comment["comment_on"]]) && $num < $limit)
|
532 |
if (!$comments[$comment["comment_on"]] && $num < $limit)
|
520 |
{
|
533 |
{
|
521 |
$comments[$comment["comment_on"]] = $comment;
|
534 |
$comments[$comment["comment_on"]] = $comment;
|
522 |
$num++;
|
535 |
$num++;
|
523 |
}
|
536 |
}
|
524 |
}
|
537 |
}
|
Line 720... |
Line 733... |
720 |
"referrers_purge_time" => 24,
|
733 |
"referrers_purge_time" => 24,
|
721 |
"pages_purge_time" => 90,
|
734 |
"pages_purge_time" => 90,
|
722 |
"default_write_acl" => "*",
|
735 |
"default_write_acl" => "*",
|
723 |
"default_read_acl" => "*",
|
736 |
"default_read_acl" => "*",
|
724 |
"default_comment_acl" => "*",
|
737 |
"default_comment_acl" => "*",
|
- |
|
738 |
"menu_page" => "PageMenu",
|
725 |
"preview_before_save" => "0");
|
739 |
"preview_before_save" => "0");
|
Line 726... |
Line 740... |
726 |
|
740 |
|
727 |
// load config
|
741 |
// load config
|
728 |
if (!$configfile = GetEnv("WAKKA_CONFIG")) $configfile = "wakka.config.php";
|
742 |
if (!$configfile = GetEnv("WAKKA_CONFIG")) $configfile = "wakka.config.php";
|