| Line 19... |
Line 19... |
| 19 |
// | |
|
19 |
// | |
|
| 20 |
// | You should have received a copy of the GNU General Public License |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
| 21 |
// | along with Foobar; if not, write to the Free Software |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
| 22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
| 24 |
// CVS : $Id: iw_integrateur.fonct.php,v 1.15 2006-04-28 12:41:26 florian Exp $
|
24 |
// CVS : $Id: iw_integrateur.fonct.php,v 1.16 2006-06-07 22:40:36 ddelon Exp $
|
| 25 |
/**
|
25 |
/**
|
| 26 |
* Fonctions de l'integrateur de page Wikini
|
26 |
* Fonctions de l'integrateur de page Wikini
|
| 27 |
*
|
27 |
*
|
| 28 |
* Application permettant d'intégrer des pages wikini dans Papyrus.
|
28 |
* Application permettant d'intégrer des pages wikini dans Papyrus.
|
| 29 |
*
|
29 |
*
|
| Line 31... |
Line 31... |
| 31 |
//Auteur original :
|
31 |
//Auteur original :
|
| 32 |
*@author David Delon <david.delon@clapas.net>
|
32 |
*@author David Delon <david.delon@clapas.net>
|
| 33 |
//Autres auteurs :
|
33 |
//Autres auteurs :
|
| 34 |
*@author Aucun
|
34 |
*@author Aucun
|
| 35 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@copyright Tela-Botanica 2000-2004
|
| 36 |
*@version $Revision: 1.15 $ $Date: 2006-04-28 12:41:26 $
|
36 |
*@version $Revision: 1.16 $ $Date: 2006-06-07 22:40:36 $
|
| 37 |
*
|
37 |
*
|
| 38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
| 39 |
// | ENTETE du PROGRAMME |
|
39 |
// | ENTETE du PROGRAMME |
|
| 40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 48... |
Line 48... |
| 48 |
|
48 |
|
| Line 49... |
Line 49... |
| 49 |
require_once PAP_CHEMIN_API_PEAR.'Net/URL.php';
|
49 |
require_once PAP_CHEMIN_API_PEAR.'Net/URL.php';
|
| 50 |
|
50 |
|
| 51 |
// TODO : un seul fichier de configuration ?
|
51 |
// TODO : un seul fichier de configuration ?
|
| Line 52... |
Line 52... |
| 52 |
/** Inclusion du fichier de configuration de cette application.*/
|
52 |
/** Inclusion du fichier de configuration de cette application.*/
|
| Line 53... |
Line 53... |
| 53 |
require_once '../configuration/adwi_configuration.inc.php';
|
53 |
require_once 'client/integrateur_wikini/configuration/adwi_configuration.inc.php';
|
| 54 |
|
54 |
|
| Line 403... |
Line 403... |
| 403 |
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
|
403 |
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
|
| Line 404... |
Line 404... |
| 404 |
|
404 |
|
| 405 |
// Ajout d'une feuille de style externe
|
405 |
// Ajout d'une feuille de style externe
|
| Line 406... |
Line -... |
| 406 |
GEN_stockerStyleExterne ('wikini', 'client/integrateur_wikini/presentations/styles/wikini.css') ;
|
- |
|
| 407 |
|
- |
|
| 408 |
// TODO
|
- |
|
| 409 |
// Changement du niveau d'erreur pour éviter les Notices PHP dues à Wikini
|
- |
|
| 410 |
|
406 |
GEN_stockerStyleExterne ('wikini', 'client/integrateur_wikini/presentations/styles/wikini.css') ;
|
| 411 |
|
407 |
|
| 412 |
global $wiki;
|
408 |
global $wiki;
|
| 413 |
global $wikini_config_defaut;
|
409 |
global $wikini_config_defaut;
|
| 414 |
$sortie='';
|
410 |
$sortie='';
|
| Line 415... |
Line -... |
| 415 |
$wakkaConfig = $GLOBALS['wikini_config_defaut'];
|
- |
|
| 416 |
$wiki = new Wiki_Papyrus($wakkaConfig);
|
411 |
$wakkaConfig = $GLOBALS['wikini_config_defaut'];
|
| 417 |
|
412 |
$wiki = new Wiki_Papyrus($wakkaConfig);
|
| 418 |
|
413 |
|
| 419 |
if ($GLOBALS['_GEN_commun']['pear_auth']->checkAuth()) {
|
414 |
if ($GLOBALS['_GEN_commun']['pear_auth']->checkAuth()) {
|
| 420 |
if (!isset($_SESSION["user"]) || ($_SESSION["user"]=="")) {
|
415 |
if (!isset($_SESSION["user"]) || ($_SESSION["user"]=="")) {
|
| Line 460... |
Line 455... |
| 460 |
$sortie.= ob_get_contents();
|
455 |
$sortie.= ob_get_contents();
|
| 461 |
ob_end_clean();
|
456 |
ob_end_clean();
|
| Line 462... |
Line 457... |
| 462 |
|
457 |
|
| Line 463... |
Line -... |
| 463 |
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
|
- |
|
| 464 |
|
- |
|
| 465 |
|
458 |
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
|
| 466 |
//return remplacerEntiteHTLM("<div id=\"wikini_page\" onLoad=\"thisForm=document.ACEditor;\" ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
|
459 |
|
| 467 |
if ($method!="edit") {
|
460 |
if ($method!="edit") {
|
| 468 |
return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\" ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
|
461 |
return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\" ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
|
| 469 |
}
|
462 |
}
|
| 470 |
else {
|
463 |
else {
|
| Line 471... |
Line -... |
| 471 |
return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\">"."\n".$sortie.'</div>'."\n");
|
- |
|
| 472 |
}
|
464 |
return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\">"."\n".$sortie.'</div>'."\n");
|
| Line 473... |
Line 465... |
| 473 |
|
465 |
}
|
| 474 |
|
466 |
|