Path

ez projects / cie / forum / general / bug with ezselection and ci...


Bug with eZSelection and CIE 1.0.4

You need to be logged in to post messages in the forums. New users may register here.

Guillaume Kulakowski

Member since:
28 December 2005

Posts: 23

Tuesday 06 October 2009 9:52:23 am

Hi,

I have found a bug in eZselection traitment. In more eZSelectionHandler doesn't allow multi-selection.

This is the class with the correction :




<?php


include_once('extension/collectexport/modules/collectexport/parser.php');


 

class eZSelectionHandler extends BaseHandler


{


   function exportAttribute(&$attribute, $seperationChar)


   {


       $ret = false;


 

       $content = $attribute->content();


       $contentObjectAttribute = $attribute->contentObjectAttribute();


       $contentClassAttribute = $attribute->contentClassAttribute();


       $contentClassAttributeContent = $contentClassAttribute->content();


 

       if( isset( $contentClassAttributeContent['options'] ) )


       {


           // Build array( id => value ) and put it in cache


           $options = $contentClassAttributeContent['options'];


               $attGlobalKey = 'GlobalCollectexportAttribut_'.$contentClassAttribute->ID;


               if( !isset($GLOBALS[$attGlobalKey]) )


               {


               foreach( $options as $o )


               {


                       $GLOBALS[$attGlobalKey][$o['id']] = $o['name'];


               }


               }


 

               // multi-selection


               $arrayRet = array();


           foreach( $content as $selectionID )


           {


                   $arrayRet[] = $GLOBALS[$attGlobalKey][$selectionID];


           }


           $ret = implode( ', ', $arrayRet );


       }


       return $this->escape($ret, $seperationChar);


   }


}


 

?>


CGI WebFactory
My blog : http://www.llaumgui.com (not in eZ Publish ;-))

Up

Catherine Mollet

Member since:
29 October 2009

Posts: 2

Monday 30 November 2009 3:54:22 pm

Thanks a lot Guillaume. Works perfectly.
Up

// Heath

Member since:
04 March 2007

Posts: 94

Tuesday 29 November 2011 4:44:50 am

Hello Guillaume,

Thank you very much for reporting this issue and sharing a specific solution (We loved the snippet of modified code).

We hope to very soon review these changes in greater detail and upgrade them in the newly migrated cie project master repository during our work to update this solution for the latest releases of eZ Publish compatibility [0].

Thanks again for your continued support!

Apologies for the lateness of my reply.

Cheers,
Heath

[0] http://projects.ez.no/cie/forum/general/update_to_4_5

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
GitHub | https://github.com/brookinsconsulting
eZpedia community documentation project | http://ezpedia.org
eZecosystem - eZ Publish Planet | http://ezecosystem.org
eZPublishLegacy - eZ Publish Release Mirror | http://ezpublishlegacy.com

Up

// Heath

Member since:
04 March 2007

Posts: 94

Sunday 18 March 2012 8:15:38 am

Hello Guillaume,

We have added your improvement into the latest release,
http://projects.ez.no/cie/news/release_1_0_5_available

Thank you for your continued support!

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
GitHub | https://github.com/brookinsconsulting
eZpedia community documentation project | http://ezpedia.org
eZecosystem - eZ Publish Planet | http://ezecosystem.org
eZPublishLegacy - eZ Publish Release Mirror | http://ezpublishlegacy.com

Up

You need to be logged in to post messages in the forums. New users may register here.