[Postfixadmin-devel] Merging model/ and scripts/models-ext/
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <pos...@cb...> - 2010-11-26 23:48:37
|
Hello, The classes in scripts/models-ext/ contain some changes that affect the public interface of the classes. @David: Can you please review them and add some comments? I don't want to break the XMLRPC interface or anything else ;-) - is model/ + is scripts/models-ext/ AliasClass: - public function get($all=false) { - $username = escape_string($this->username); + public function get($alias, $all=false) { + $alias = escape_string($alias); ... - return $list; + $this->return = $list; + return 0; } - return array(); + return 1; UserHandler: - public function change_pass($old_password, $new_password) { + public function change_pw($new_password, $old_password, + $match = true) { This will break for sure (changed function name and parameter order), also the code inside the function changed a lot. $match = true means that the old password is checked before doing anything. For admin mode, it would probably be easier to make $old_password optional (which would also require the changed parameter order ;-) (Or would this be less secure?) If I get xmlrpc.php right, the functions are not directly accessable over the API, but are wrapped (in this case in the UserProxy, function change_pass) - right? That would mean if we change the function parameters, we have to change - xmlrpc.php - users/password.php (Again: Right?) UserHandler in scripts/models-ext/ also contains several new functions, but this shouldn't break anything ;-) I really have to (find some time to) dig deeper in those classes... Regards, Christian Boltz -- "Oh, hallo ersma... ick schein zu laufen... Denn wolle mer ma kucken, wat hier so los is... also erstmal isset gut, wenn icke ne CPU finden taet. Denn auf irgendwat schein ick jo ausjefuehrt zu wern, nae? Und denn, was hammwer denn noch so allet? Ah, eine HD? Jut. Denn kucken wer ma, wat da so allet druff is... (usw.) ... ah, unn wat zum Krach- machen hamwer oooch?..." [David Haller in suse-linux zum Bootvorgang] |