Subversion Repositories Applications.wikini

Compare Revisions

Regard whitespace Rev 48 → Rev 49

/trunk/api/rest/modules/0.5/Pages.php
20,7 → 20,7
private $creerPage = false;
private $templateDefaut = null;
 
private $retour = null;
private $retour = 'txt';
private $formats_retour = array('text/plain','text/html');
private $format_texte;
 
121,11 → 121,20
$page = $this->wiki->LoadPage($page);
 
if ($page != null) {
// attention les wikis sont souvent en ISO !
$page["body"] = $this->convertirTexteWikiVersEncodageAppli($page['body']);
if($section != null) {
$sections_tab = explode(',', $section);
if(count($sections_tab) > 1) {
foreach($sections_tab as $section_t) {
$page["sections"][$section_t] = $this->decouperPageSection($page["body"], $section_t);
}
} else {
$page["body"] = $this->decouperPageSection($page["body"], $section);
}
}
}
 
return $page;
}
198,6 → 207,11
switch ($this->retour) {
case self::MIME_HTML:
$texte = $this->wiki->Format($page["body"], "wakka");
if(!empty($page["sections"])) {
foreach($page["sections"] as &$page_section) {
$page_section = $this->wiki->Format($page_section, "wakka");
}
}
$mime = self::MIME_HTML;
break;
default:
211,6 → 225,7
'titre' => $this->pageNom,
'mime' => $mime,
'texte' => $texte,
'sections' => $page["sections"],
'href' => $url);
 
return $retour;