Re: [Postfixadmin-devel] Return value of model/* classes
Brought to you by:
christian_boltz,
gingerdog
From: Rudi F. <va...@go...> - 2010-12-18 12:07:35
|
Hello, Between the models and the cli are the shells. In these classes we can change the 0, 1 problem. When i created the classes i orientated at the unix/linux format. 0 ok 1-n failure code. Regards Rudi Am Samstag, 18. Dezember 2010 schrieb Christian Boltz <pos...@cb...>: > Hello, > > while merging model/UserHander and scripts/models-ext/UserHandler, I > noticed that they use very different (and unfortunately incompatible) > return values. > > I took UserHandler->change_pw as an example, but this is most probably > an issue that appears at lots of functions inside the model/* classes. > > The "old" model/UserHandler returns > - true on success [1] > - false on failure > > The "new" scripts/models-ext/UserHandler (that I merged to > model/UserHandler some minutes ago, r896) returns > - 0 on success > - 1 on failure > > Needless to say than true and 0 are the exact opposite :-( > > The questions are: > - Will the XMLRPC interface compatibility break if we switch to 0/1? > (you can test this already with current SVN trunk for change_pw ;-) > - Will the CLI break if we use true/false? > - And finally: Which style is "better"? Which one should we use? > > > Regards, > > Christian Boltz > > [1] or if there is no error check, but that's another story ;-) > -- > In the beginning was the word, and the word was content-type: text/plain > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel > |