Correction fonction attach.class.php


Réécriture d'url pose problème quand on veut supprimer des fichiers dans le filemanager.

Ligne 58 du fichier /actions/attach.class.php

function attach(&$wiki){ //fonction attach sans reecriture d'url.

   	$this->wiki = $wiki;

		$this->attachConfig = $this->wiki->GetConfigValue("attach_config");

		if (empty($this->attachConfig["ext_images"])) $this->attachConfig["ext_images"] = "gif|jpeg|png|jpg";

		if (empty($this->attachConfig["ext_script"])) $this->attachConfig["ext_script"] = "php|php3|asp|asx|vb|vbs|js";

		if (empty($this->attachConfig['upload_path'])) $this->attachConfig['upload_path'] = 'upload_dir';

		if (empty($this->attachConfig['update_symbole'])) $this->attachConfig['update_symbole'] = '<img src="images/update.png" alt="handout" class="handout" />';

		if (empty($this->attachConfig['max_file_size'])) $this->attachConfig['max_file_size'] = 1024*30000;	//100ko max

		if (empty($this->attachConfig['fmDelete_symbole'])) $this->attachConfig['fmDelete_symbole'] = '<img src="images/supprime.png" />';

		if (empty($this->attachConfig['fmRestore_symbole'])) $this->attachConfig['fmRestore_symbole'] = '<img src="images/undo.png" />';

		if (empty($this->attachConfig['fmTrash_symbole'])) $this->attachConfig['fmTrash_symbole'] = '<img src="images/poubelle.png" />';

		$this->isSafeMode = ini_get("safe_mode");

	}


devient

function attach(&$wiki){ //fonction attach avec réécriture d'url

   	$this->wiki = $wiki;
		$this->attachConfig = $this->wiki->GetConfigValue("attach_config");
		if (empty($this->attachConfig["ext_images"])) $this->attachConfig["ext_images"] = "gif|jpeg|png|jpg";
		if (empty($this->attachConfig["ext_script"])) $this->attachConfig["ext_script"] = "php|php3|asp|asx|vb|vbs|js";
		if (empty($this->attachConfig['upload_path'])) $this->attachConfig['upload_path'] = 'upload_dir';
		if (empty($this->attachConfig['update_symbole'])) $this->attachConfig['update_symbole'] = "<img src=\"". $this->wiki->config[url_site]."/images/update.png\" alt=\"handout\" class=\"handout\" />";
		if (empty($this->attachConfig['max_file_size'])) $this->attachConfig['max_file_size'] = 1024*30000;	//100ko max
		if (empty($this->attachConfig['fmDelete_symbole'])) $this->attachConfig['fmDelete_symbole'] = "<img src=\"". $this->wiki->config[url_site]."/images/supprime.png\" />";
		if (empty($this->attachConfig['fmRestore_symbole'])) $this->attachConfig['fmRestore_symbole'] = "<img src=\"". $this->wiki->config[url_site]."/images/undo.png\" />";
		if (empty($this->attachConfig['fmTrash_symbole'])) $this->attachConfig['fmTrash_symbole'] = "<img src=\"". $this->wiki->config[url_site]."/images/poubelle.png\" />";
		$this->isSafeMode = ini_get("safe_mode");
	}

 
IMP :: RSS :: HTML :: TXT :: Clone :: Historique :: Propriétaire : PierreLachance