[dev] apis: next steps

Karsten Fourmont fourmont at gmx.de
Sat May 6 03:38:13 PDT 2006


Hi,

some changes I like to do to get the api.phps right in HEAD as well as 
FRAMEWORK3:

1) Nag: due to new fields in NAG, the add() and modify() functions now 
have very long parameter lists. I'd like to change them to accept hash 
arrays like the other apps do to. Positive side effect is, that api.php 
does not need to be changed when adding new fields and can thus the same 
code works for HEAD and FRAMEWORK_3.

2) I'd like to (manually) merge the latest bugfix changes from api HEAD 
to FRAMEWORK_3.
    Namely:
     - no longer use option arrays. They never really worked
     - fix handling of different sources
     - turba: use correct delete function

3) for removeUserData: call removeByParent if possible, otherwise
    work around it. S.th. like this:
    if (method_exists( $history, 'removeByParent') {
        $histories = $history->removeByParent('mnemo:' . $user);
    } else {
         $all = $history->getByTimestamp('>',0,array(),'mnemo:' . $user);
	$histories->removebyNames(array_keys($all));
    }

    As $all can get quite big removeByParent is still preferred.

    Shall I merge this into FRAMEWORK_3 then as well? Personally I'd say 
yes, but it's not needed.


Cheers,
  Karsten


More information about the dev mailing list