forked from ZwiiCMS-Team/ZwiiCMS
collumn column
This commit is contained in:
parent
b360acca02
commit
28a83cfd6b
@ -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 ) {
|
||||
|
@ -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));
|
||||
|
@ -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) {
|
||||
|
@ -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…
Reference in New Issue
Block a user