Browse Source

collumn column

12_dev
Fred Tempez 4 months ago
parent
commit
28a83cfd6b
  1. 4
      core/module/plugin/plugin.php
  2. 4
      module/blog/blog.php
  3. 2
      module/form/form.php
  4. 2
      module/news/news.php

4
core/module/plugin/plugin.php

@ -301,7 +301,7 @@ class plugin extends common {
// Modules installés
$infoModules = helper::getModules();
// Clés moduleIds dans les pages
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
$inPages = helper::arraycolumn($this->getData(['page']),'moduleId', 'SORT_DESC');
foreach( $inPages as $key=>$value){
$pagesInfos[ $this->getData(['page', $key, 'title' ]) ] = $value;
}
@ -386,7 +386,7 @@ class plugin extends common {
$pages = json_decode(file_get_contents(self::DATA_DIR . $keyi18n . '/' . 'page.json'), true);
// Extraire les clés des modules
$pagesModules [$keyi18n] = array_filter(helper::arrayCollumn($pages['page'],'moduleId', 'SORT_DESC'), 'strlen');
$pagesModules [$keyi18n] = array_filter(helper::arraycolumn($pages['page'],'moduleId', 'SORT_DESC'), 'strlen');
// Générer ls liste des pages avec module pour la sauvegarde ou le backup
foreach( $pagesModules [$keyi18n] as $key=>$value ) {

4
module/blog/blog.php

@ -404,7 +404,7 @@ class blog extends common {
public function config() {
// Ids des articles par ordre de publication
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC'));
$articleIds = array_keys(helper::arraycolumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC'));
// Gestion des droits d'accès
$filterData=[];
foreach ($articleIds as $key => $value) {
@ -436,7 +436,7 @@ class blog extends common {
// Articles en fonction de la pagination
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
// Nombre de commentaires à approuver et approuvés
$approvals = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'comment' ]),'approval', 'SORT_DESC');
$approvals = helper::arraycolumn($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'comment' ]),'approval', 'SORT_DESC');
if ( is_array($approvals) ) {
$a = array_values($approvals);
$toApprove = count(array_keys($a,false));

2
module/form/form.php

@ -159,7 +159,7 @@ class form extends common {
public function option() {
// Liste des utilisateurs
$userIdsFirstnames = helper::arrayCollumn($this->getData(['user']), 'firstname');
$userIdsFirstnames = helper::arraycolumn($this->getData(['user']), 'firstname');
ksort($userIdsFirstnames);
self::$listUsers [] = '';
foreach ($userIdsFirstnames as $userId => $userFirstname) {

2
module/news/news.php

@ -192,7 +192,7 @@ class news extends common {
$this->update();
// Ids des news par ordre de publication
$newsIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC'));
$newsIds = array_keys(helper::arraycolumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC'));
// Pagination fixe
$pagination = helper::pagination($newsIds, $this->getUrl(),self::$itemsperPage );
// Liste des pages

Loading…
Cancel
Save