Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] saving list config was: extending soap..

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: address@concealed
  • To: Joe Vieira <address@concealed>
  • Cc: "address@concealed" <address@concealed>
  • Subject: Re: [sympa-dev] saving list config was: extending soap..
  • Date: Tue, 13 May 2008 15:21:02 -0700

First off - if you have your debug value set to 3 or higher you should be
able to see if and how List::save_config is called.

If save_config is being called it is probably dying on saving the list
configuration -- I do not have the time to run your code, but I am guessing
that the params being passed to $list are causing save_config() to choke...
that is *just* a guess at this point.

< elsif ($what eq "owner") {
< my @owner = $list->get_owners();
< $owner[0]->[0]->{'email'} = $param;
< $list->{'admin'}->{'owner'}[0] = $owner[0]->[0];
< }

Something about the above just doesn't look right... :)

In editList(), it seemed (to me) that you were about to go the route of
wwsympa::do_edit_list by calling List::apply_defaults to create the pinfo
hash -- You don't use this to validate arbitrary parameter arrays passed to
function, instead you create the list params inside of this function. A
better place to generate the parameter array would be the calling function,
as this allows you to keep the editList() function reasonably abstract enough
for other uses.



Code formatting conventions:

You might wish to follow the code style of the other developers when making
changes to Sympa. For example, function names are
words_seperated_by_underscores, and conditionals are written like:

< if ($list->save_config($sender)) {
< return 1;
< }
< else {
< [do error...]


could be done more simply like:

< unless ($list->save_config($sender)){
< [do error...]
< }









On Tue, May 13, 2008 at 03:38:37PM -0400, Joe Vieira wrote:
> So, Does anyone have any pointers for me on how to SAVE a list object
> after i've edited it. this seems like it should be really simple...
> Joe
>
> Joe Vieira wrote:
> >3976 is the feature request ID. my crude attempt at implementation is
> >there (diff file), but like i said i've been unable to save the config
> >changes, so i haven't really cleaned the code up or made it nice and
> >snappy yet.
> >
> >
> >Joe
> >
> >
> >Joe Vieira wrote:
> >
> >>Okay, cool. I will do that today
> >>
> >>i am going to be out of town for a week so i'm going to have to put this
> >>on hold for a little bit, but i'll get the feature request in at the
> >>least.
> >>
> >>Joe
> >>
> >>address@concealed wrote:
> >>
> >>
> >>>Hi Joe -
> >>>
> >>>https://sourcesup.cru.fr/tracker/?group_id=23
> >>>
> >>>This is the feature/bug tracker for sympa -- it might be good if you
> >>>added an entry for your project there. Once you have a feature request
> >>>open, you could then post your patches for the implementation.
> >>>
> >>>I have a desire to to help you out with this and think that the feature
> >>>tracker would be the best place to catalogue the code changes you will
> >>>perform.
> >>>
> >>>Yours Truly,
> >>>Charles
> >>>
> >>>On Thu, Apr 10, 2008 at 08:34:24AM -0400, Joe Vieira wrote:
> >>>
> >>>
> >>>
> >>>>I've already got everything needed written, i just can't SAVE the list
> >>>>correctly.
> >>>>
> >>>>Joe Vieira wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Olivier Sala??n wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Hi Joe,
> >>>>>>
> >>>>>>Joe Vieira a ??crit :
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>I am also making a few changes to support administrative functions,
> >>>>>>>for import from our old list server, and for automation from our
> >>>>>>>automated systems.
> >>>>>>>Yes, i am modifying sympasoap.pm, i've already modified the WSDL and
> >>>>>>>created a few of the other functions i need, everything else is
> >>>>>>>working fine just getting the actual list to save the changes has
> >>>>>>>been
> >>>>>>>annoying.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>If many sympa users have the same needs, it's too bad everybody are
> >>>>>>doing the same customizations on their own.
> >>>>>>The ideal would be that you describe your context and needs in a very
> >>>>>>precise way. Producing such a specification would motivate us to write
> >>>>>>the code.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>I've no problem writing the code to do it myself and submitting it back
> >>>>>into the project, which is why i am looking for pointers on HOW to save
> >>>>>the config back.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>&admin::update_list okay, i'll give that function a shot! thanks a
> >>>>>>>ton
> >>>>>>>for your help!
> >>>>>>>
> >>>>>>>do you know if &admin::update_list can modify any of the LDAP include
> >>>>>>>stuff? i am assuming it can't because it's in the admin module...so a
> >>>>>>>point in the right direction there would be helpful also =).
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>Actualy the &admin::update_list() subroutine is not the appropriate
> >>>>>>way
> >>>>>>to save a list config on disk, because it is very much related to list
> >>>>>>famillies and you probably don't use this feature.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>So what function IS appropriate? or what was i doing wrong using
> >>>>>&List::save_config()?
> >>>>>
> >>>>>
> >>>>>Thanks a lot!
> >>>>>Joe
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>
> >
> >
>



Archive powered by MHonArc 2.6.19+.

Top of Page