Commit 2f75356b authored by Skia's avatar Skia
Browse files

Force last existant revision in Wiki: can be reverted if the DB is cleaned

parent 21f00811
......@@ -127,6 +127,18 @@ class wiki extends basedb
function load_by_fullpath ( $fullpath )
{
$req = new requete($this->db, "SELECT wiki.id_wiki, MAX(`id_rev`) as max
FROM `wiki`
INNER JOIN `wiki_rev`
ON ( `wiki`.`id_wiki`=`wiki_rev`.`id_wiki` )
WHERE `wiki`.`fullpath_wiki` = '" . mysql_real_escape_string($fullpath) . "'");
$row = $req->get_row();
$max = $row['max'];
$wiki = $row['id_wiki'];
new update($this->dbrw,"wiki",array("id_rev_last"=>$max),array("id_wiki"=>$wiki));
$req = new requete($this->db, "SELECT *
FROM `wiki`
INNER JOIN `wiki_rev`
......
Supports Markdown
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