Le samedi 18 décembre 2004 à 19:31 -0500, Chris Morgan a écrit :
I looked the patch over, you move include/user.php to include/classes/user.php but you didn't just move the class, you moved the class AND functions that call in to the user class. Why bother separating things into functions and classes if this isn't even the case in the patch?
I moved user into classes because it is a class and removed functions that are not method of this class into another library. A class is a class and shouldn't contain other code I think.
See: http://www.phpfreaks.com/tutorials/35/1.php for example
Don't you ever tried to do $current->loggedin() in the past before to see that loggedin() was not a method ?
I wish we could have at least talked about this patch before you went through the effort to make these changes. I can't see any reason why we should separate functions and classes. Right now the name of the php file indicates what the contents of the file are. Lets talk about where we are going with
The names don't tell you if it's a class or not and are not clear enough in my opinion. It's no wonder why many things in the code are made "by hand" while functions already exist in the include directory (sql queries, things in includes/html are barely used, etc). Some files have an _inc suffix which is redundant as they are in a directory named include... There are also too many files and maybe we could improve this situation (people not using or finding usefull functions) by reorganising it (that was the purpose of my patch and it's huge because deleting files and adding new files make diffs huge).
this and look at some examples of how these changes would improve things before we decide to make them.
I thought that the include directory was not exactly well organised; you have files in it that have different purposes. Some are just plain includes (headers, footers), others are classes and others provide functions. Last but not least some mix classes and functions and you even have some files in / that provide usefull (sometimes duplicated functions).
As to discuss it you know that it's hard for me to be woken up at nights to discuss every thing so I thought I'll simply do the changes, test it the whole day (and be confident that it makes much more good than bad and that everything works just the same or better)
I think that we could decide alltogether if you think my arguments for reorganising the includes/functions is valid or not and if it is we could start moving it.
Finally I saw you committed my config changes and I'm glad you saw that it might be an improvement over the current situation. I'll send a new patch that _only_ takes advantage of the new config file.
Thanks for your time and efforts, Jonathan