11007 en cours
This commit is contained in:
parent
6dce12e621
commit
9f9817aee0
@ -465,6 +465,39 @@ class common {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lire les données de la page
|
||||
* @param string pageId
|
||||
* @param return contenu de la page
|
||||
*/
|
||||
public function getPage($page) {
|
||||
|
||||
return file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $page, 'content']));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Ecrire les données de la page
|
||||
* @param string pageId
|
||||
* @param string contenu de la page
|
||||
*/
|
||||
public function setPage($page, $value) {
|
||||
|
||||
file_put_contents(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']), $value);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Effacer les données de la page
|
||||
* @param string pageId
|
||||
* @param return statut de l'effacement
|
||||
*/
|
||||
public function deletePage($page) {
|
||||
|
||||
return unlink(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sauvegarde des données
|
||||
* @param array $keys Clé(s) des données
|
||||
@ -2337,17 +2370,20 @@ class core extends common {
|
||||
) {
|
||||
$this->addOutput([
|
||||
'title' => $title,
|
||||
'content' => file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getUrl(0), 'content'])),
|
||||
//'content' => file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getUrl(0), 'content'])),
|
||||
'content' => $this->getPage($this->getUrl(0)),
|
||||
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']),
|
||||
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
|
||||
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
|
||||
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
|
||||
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
|
||||
'contentRight' => $this->getData(['page',$this->getUrl(0),'barRight']) ?
|
||||
file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barRight']), 'content']))
|
||||
'contentRight' => $this->getData(['page',$this->getUrl(0),'barRight'])
|
||||
//file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barRight']), 'content']))
|
||||
? $this->getPage($this->getData(['page',$this->getUrl(0),'barRight']))
|
||||
: '',
|
||||
'contentLeft' => $this->getData(['page',$this->getUrl(0),'barLeft']) ?
|
||||
file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barLeft']), 'content']))
|
||||
'contentLeft' => $this->getData(['page',$this->getUrl(0),'barLeft'])
|
||||
//file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barLeft']), 'content']))
|
||||
? $this->getPage($this->getData(['page',$this->getUrl(0),'barLeft']))
|
||||
: '',
|
||||
]);
|
||||
}
|
||||
@ -2367,15 +2403,18 @@ class core extends common {
|
||||
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
|
||||
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
|
||||
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
|
||||
'contentRight' => $this->getData(['page',$this->getUrl(0),'barRight']) ?
|
||||
file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barRight']), 'content']))
|
||||
'contentRight' => $this->getData(['page',$this->getUrl(0),'barRight'])
|
||||
//file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barRight']), 'content']))
|
||||
//? $this->getPage($this->getData(['page',$this->getUrl(0),'barRight']))
|
||||
? $this->getPage($this->getData(['page',$this->getUrl(0),'barRight']))
|
||||
: '',
|
||||
'contentLeft' => $this->getData(['page',$this->getUrl(0),'barLeft']) ?
|
||||
file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barLeft']), 'content']))
|
||||
'contentLeft' => $this->getData(['page',$this->getUrl(0),'barLeft'])
|
||||
// ? file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getData(['page',$this->getUrl(0),'barLeft']), 'content']))
|
||||
? $this->getPage($this->getData(['page',$this->getUrl(0),'barLeft']))
|
||||
: '',
|
||||
]);
|
||||
$pageContent = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getUrl(0), 'content']));
|
||||
|
||||
//$pageContent = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getUrl(0), 'content']));
|
||||
$pageContent = $this->getPage($this->getUrl(0));
|
||||
}
|
||||
else {
|
||||
$moduleId = $this->getUrl(0);
|
||||
|
@ -429,7 +429,8 @@ class addon extends common {
|
||||
// Export des pages hébergeant le module
|
||||
$pageParam[$pageId] = $this->getData(['page',$pageId]);
|
||||
// Export du contenu de la page
|
||||
$pageContent[$pageId] = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $pageId, 'content']));
|
||||
//$pageContent[$pageId] = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $pageId, 'content']));
|
||||
$pageContent[$pageId] = $this->getPage($pageId);
|
||||
// Export de fr/module.json
|
||||
$moduleId = 'fr/module.json';
|
||||
$moduleDir = str_replace('site/data/','',$infoModules[$this->getUrl(2)]['dataDirectory']);
|
||||
|
@ -96,7 +96,8 @@ echo template::formOpen('pageEditForm');
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageEditContent', [
|
||||
'class' => 'editorWysiwyg',
|
||||
'value' => file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getUrl(2), 'content']))
|
||||
//'value' => file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getUrl(2), 'content']))
|
||||
'value' => $this->getPage($this->getUrl(2))
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -266,7 +266,8 @@ class search extends common {
|
||||
$this->getData(['page', $parentId, 'block']) !== 'bar') {
|
||||
$url = $parentId;
|
||||
$titre = $this->getData(['page', $parentId, 'title']);
|
||||
$content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $parentId, 'content']));
|
||||
//$content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $parentId, 'content']));
|
||||
$content = $this->getPage($parentId);
|
||||
$contenu = $titre . ' ' . $contenu ;
|
||||
// Pages sauf pages filles et articles de blog
|
||||
$tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier);
|
||||
@ -282,7 +283,8 @@ class search extends common {
|
||||
$this->getData(['page', $parentId, 'block']) !== 'bar') {
|
||||
$url = $childId;
|
||||
$titre = $this->getData(['page', $childId, 'title']);
|
||||
$content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $childId, 'content']));
|
||||
//$content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $childId, 'content']));
|
||||
$content = $this->getPage($childId);
|
||||
$contenu = $titre . ' ' . $contenu ;
|
||||
//Pages filles
|
||||
$tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier);
|
||||
|
Loading…
Reference in New Issue
Block a user