The Higher Education and Research forge

Home My Page Projects Code Snippets Project Openings MonLabo
Summary Activity Tracker Tasks Docs SCM Files Dokuwiki Continious Integration Listes Sympa

SCM Repository

authorHerve Suaudeau <herve.suaudeau@parisdescartes.fr>
Tue, 28 Jul 2020 18:13:27 +0000 (20:13 +0200)
committerHerve Suaudeau <herve.suaudeau@parisdescartes.fr>
Tue, 28 Jul 2020 18:13:27 +0000 (20:13 +0200)
includes/MonLabo-shortcodes-publications.php
includes/MonLabo-shortcodes.php

index a0457d4..5410d64 100644 (file)
@@ -523,19 +523,16 @@ class MonLabo_shortcodes_publications extends MonLabo_shortcodes_mother_class {
                // 3 - Si persons, teams ou units = '*'
                //-------------------------------------
                if ( '*' === $persons ) {
                // 3 - Si persons, teams ou units = '*'
                //-------------------------------------
                if ( '*' === $persons ) {
-                       $persons_information = $MonLabo_access_data->get_persons_information();
                        $all_persons_id = MonLaboLib::secured_array_keys( $MonLabo_access_data->get_persons_information() );
                        if ( !empty( $all_persons_id ) ) {
                                $persons = MonLaboLib::secured_implode( '|', $all_persons_id );
                        }
                }
                if ( '*' === $teams ) {
                        $all_persons_id = MonLaboLib::secured_array_keys( $MonLabo_access_data->get_persons_information() );
                        if ( !empty( $all_persons_id ) ) {
                                $persons = MonLaboLib::secured_implode( '|', $all_persons_id );
                        }
                }
                if ( '*' === $teams ) {
-                       $teams_information = $MonLabo_access_data->get_teams_information();
-                       $all_teams_id = MonLaboLib::secured_array_keys( $teams_information );
+                       $all_teams_id = MonLaboLib::secured_array_keys( $MonLabo_access_data->get_teams_information() );
                        if ( !empty( $all_teams_id ) ) { $teams = MonLaboLib::secured_implode( '|', $all_teams_id ); }
                }
                if ( '*' === $units ) {
                        if ( !empty( $all_teams_id ) ) { $teams = MonLaboLib::secured_implode( '|', $all_teams_id ); }
                }
                if ( '*' === $units ) {
-                       $units_information = $MonLabo_access_data->get_units_information();
                        $all_units_id = MonLaboLib::secured_array_keys( $MonLabo_access_data->get_units_information() );
                        if ( !empty( $all_units_id ) ) { $units = MonLaboLib::secured_implode( '|', $all_units_id ); }
                }
                        $all_units_id = MonLaboLib::secured_array_keys( $MonLabo_access_data->get_units_information() );
                        if ( !empty( $all_units_id ) ) { $units = MonLaboLib::secured_implode( '|', $all_units_id ); }
                }
@@ -606,8 +603,7 @@ class MonLabo_shortcodes_publications extends MonLabo_shortcodes_mother_class {
                        }
                        if ( '__empty__' != $descartes_equipe ) {
                                if ( '*' === $descartes_equipe ) {  //Get all the descartes_publi_team_id list of teams configured in MonLabo
                        }
                        if ( '__empty__' != $descartes_equipe ) {
                                if ( '*' === $descartes_equipe ) {  //Get all the descartes_publi_team_id list of teams configured in MonLabo
-                                       $teams_information = $MonLabo_access_data->get_teams_information();
-                                       $all_teams_id = MonLaboLib::secured_array_keys( $teams_information );
+                                       $all_teams_id = MonLaboLib::secured_array_keys( $MonLabo_access_data->get_teams_information() );
                                        $descartes_team_ids   = self::_MonLaboTeamsIds_into_publicationServerTeamsIds( $all_teams_id, $base_to_use );
                                        if ( !empty( $descartes_team_ids ) ) { $descartes_equipe = MonLaboLib::secured_implode( '|', $descartes_team_ids ); }
                                }
                                        $descartes_team_ids   = self::_MonLaboTeamsIds_into_publicationServerTeamsIds( $all_teams_id, $base_to_use );
                                        if ( !empty( $descartes_team_ids ) ) { $descartes_equipe = MonLaboLib::secured_implode( '|', $descartes_team_ids ); }
                                }
@@ -664,8 +660,7 @@ class MonLabo_shortcodes_publications extends MonLabo_shortcodes_mother_class {
                                } elseif ( 'main_structure_page' === $page_mode ) {
                                        //On retourne les publications de toutes les personnes
                                        $persons = '';
                                } elseif ( 'main_structure_page' === $page_mode ) {
                                        //On retourne les publications de toutes les personnes
                                        $persons = '';
-                                       $persons_information = $MonLabo_access_data->get_persons_information();
-                                       $all_persons_id = MonLaboLib::secured_array_keys( $persons_information );
+                                       $all_persons_id = MonLaboLib::secured_array_keys( $MonLabo_access_data->get_persons_information() );
                                        if ( !empty( $all_persons_id ) ) { $persons = MonLaboLib::secured_implode( '|', $all_persons_id ); }
                                        $persons_id     = MonLaboLib::prepare_multiple_values_variable_into_array( $persons );
                                        $descartes_ids = self::_MonLaboPersonsIds_into_publicationServerAuthorsIds( $persons_id, $base_to_use );
                                        if ( !empty( $all_persons_id ) ) { $persons = MonLaboLib::secured_implode( '|', $all_persons_id ); }
                                        $persons_id     = MonLaboLib::prepare_multiple_values_variable_into_array( $persons );
                                        $descartes_ids = self::_MonLaboPersonsIds_into_publicationServerAuthorsIds( $persons_id, $base_to_use );
index 71b064a..edec977 100644 (file)
@@ -144,7 +144,6 @@ class MonLabo_shortcodes extends MonLabo_shortcodes_mother_class {
                        }
                } else {
                        // Préparation de la liste de toutes les unités existantes
                        }
                } else {
                        // Préparation de la liste de toutes les unités existantes
-                       $units_name = $access_data->get_units_name();
                        $existing_units_id = array( MAIN_STRUCT_NO_UNIT=>MAIN_STRUCT_NO_UNIT ) + MonLaboLib::secured_array_keys( $access_data->get_units_name() );
 
                        // si units non vide
                        $existing_units_id = array( MAIN_STRUCT_NO_UNIT=>MAIN_STRUCT_NO_UNIT ) + MonLaboLib::secured_array_keys( $access_data->get_units_name() );
 
                        // si units non vide
@@ -540,7 +539,6 @@ class MonLabo_shortcodes extends MonLabo_shortcodes_mother_class {
                        // On recherche une éventuelle équipe attachée à la page courante
                        $teams = self::_team_of_curent_page();
                        if ( '' === $teams ) {
                        // On recherche une éventuelle équipe attachée à la page courante
                        $teams = self::_team_of_curent_page();
                        if ( '' === $teams ) {
-                               $units_name = $access_data->get_units_name();
                                $units = MAIN_STRUCT_NO_UNIT.','.MonLaboLib::secured_implode( ',', MonLaboLib::secured_array_keys( $access_data->get_units_name() ) );
                        }
                }
                                $units = MAIN_STRUCT_NO_UNIT.','.MonLaboLib::secured_implode( ',', MonLaboLib::secured_array_keys( $access_data->get_units_name() ) );
                        }
                }