Commit c530f50e authored by Feu's avatar Feu

soyons un brin plus léger

parent 88b4a0ab
......@@ -26,14 +26,14 @@ class cachedcontents extends stdcontents
}
public function is_cached()
{
return file_exists(CACHE_DIR.$this->uid);
{
return file_exists(CACHE_DIR.$this->uid) && !isset($_GET["__nocache"]);
}
public function get_cache()
{
if ( !$this->is_cached() )
return nulll;
return null;
$data = file_get_contents(CACHE_DIR.$this->uid);
$p1 = strpos($data,"\n");
......
......@@ -375,12 +375,7 @@ class sujetforum extends stdcontents
/* utilisateur authentifié */
if ($user->is_valid())
{
$this->buffer .= "<a href=\"?page=reply&amp;id_forum=".
$forum->id.
"&amp;id_sujet=".
$sujet->id.
"&amp;id_message=".
$row['id_message'].
$this->buffer .= "<a href=\"?page=reply&amp;id_message=".$row['id_message'].
"&amp;quote=1\">Répondre en citant</a>";
}
......@@ -395,17 +390,12 @@ class sujetforum extends stdcontents
else
{
$spage = ceil($start/$npp);
$this->buffer .= " | <a href=\"?page=edit&amp;id_forum=".
$forum->id.
"&amp;id_sujet=".
$sujet->id.
"&amp;id_message=".
$row['id_message']."\">Modifier</a> | ".
$this->buffer .= " | <a href=\"?page=edit&amp;id_message=".$row['id_message']."\">Modifier</a> | ".
"<a href=\"?page=delete&amp;id_message=".$row['id_message']."&amp;spage=$spage\">Supprimer</a>";
}
}
$this->buffer .= "&nbsp;<a href=\"#top\" title=\"Aller plus haut, Aller plus oooooo...\" ><img src=\"".$topdir."images/forum/top.png\" /></a>";
$this->buffer .= "&nbsp;<a href=\"#top\"><img src=\"".$topdir."images/forum/top.png\" /></a>";
$this->buffer .= "</p>\n";
$this->buffer .= "<div class=\"auteur\">\n";
......
......@@ -78,6 +78,10 @@ class dokusyntax
$this->firstpass($table,$text,"#<html>(.*?)</html>#se","\$this->preformat('\\1','html')");
$this->firstpass($table,$text,"#<php>(.*?)</php>#se","\$this->preformat('\\1','php')");
$this->firstpass($table,$text,"#<file>(.*?)</file>#se","\$this->preformat('\\1','file')");
// block de code
$this->firstpass($table,$text,"/(\n( {2,}|\t)[^\*\-\n ][^\n]+)(\n( {2,}|\t)[^\n]*)*/se","\$this->preformat('\\0','block')","\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment