Commit ae0efcdd authored by Ayolo's avatar Ayolo

bleh

parent dba38241
......@@ -38,6 +38,10 @@ $site->add_js("js/explorer.js");
$file = new dfile($site->db, $site->dbrw);
$folder = new dfolder($site->db, $site->dbrw);
$forum=false;
if(isset($_REQUEST['forum']) && $_REQUEST['forum']=='vrai')
$forum=true;
if ( isset($_REQUEST["id_folder"]) && !( isset($_REQUEST["id_file"]) && $file->is_valid() ) )
$folder->load_by_id($_REQUEST["id_folder"]);
......@@ -145,7 +149,7 @@ while ( $row = $req->get_row() )
}
$fcts->add($gal);
if ( $folder->is_right($site->user,DROIT_AJOUTITEM) )
if ( !$forum && $folder->is_right($site->user,DROIT_AJOUTITEM) )
{
$folder->droits_acces |= 0x200;
......
......@@ -603,7 +603,7 @@ class form extends stdcontents
/** Ajoute une barre de bouton de syntaxe DokuWiki
* @param $area_name nom du textarea concerné (attribut 'name' et non pas 'id' !)
*/
function add_dokuwiki_toolbar($area_name,$id_asso=null,$folder=null)
function add_dokuwiki_toolbar($area_name,$id_asso=null,$folder=null,$forum=false)
{
global $wwwtopdir;
......@@ -611,7 +611,14 @@ class form extends stdcontents
if ( !is_null($id_asso) )
$context="id_asso=".$id_asso;
if($forum)
{
if(!empty($context))
$context.='&forum=vrai';
else
$context='forum=vrai';
}
if ( !is_null($folder) )
{
if ( !empty($context) )
......
......@@ -53,7 +53,9 @@ class site extends interfaceweb
global $timing;
$timing["includes"] = microtime(true)+$timing["all"];
$timing["site::site"] -= microtime(true);
$this->siteae=$siteae;
$dbro = new mysqlae ();
if (!$dbro->dbh)
......
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