forked from ZwiiCMS-Team/ZwiiCMS
[9.0.21] Pages parentes non sélectionnables dans lien de TinyMCE
This commit is contained in:
parent
96cf295374
commit
67cda016a4
@ -553,24 +553,18 @@ class common {
|
||||
$children = [];
|
||||
// Exclure les barres
|
||||
if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) {
|
||||
foreach($childIds as $childId) {
|
||||
$children [] = ['title' => $this->getData(['page', $childId, 'title']) ,
|
||||
'value'=> $rewrite.$childId
|
||||
];
|
||||
}
|
||||
if (empty($childIds)) {
|
||||
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
||||
'value'=> $rewrite.$parentId
|
||||
];
|
||||
} else {
|
||||
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
||||
'value'=> $rewrite.$parentId ,
|
||||
'menu' => $children
|
||||
foreach($childIds as $childId) {
|
||||
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) . ' / '. $this->getData(['page', $childId, 'title']) ,
|
||||
'value'=> $rewrite.$childId
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 3 tentatives
|
||||
for($i = 0; $i < 3; $i++) {
|
||||
if (file_put_contents ('core/vendor/tinymce/link_list.json', json_encode($parents), LOCK_EX) !== false) {
|
||||
|
Loading…
Reference in New Issue
Block a user