[AppDB] big AppDB refactoring

tony_lambregts at telusplanet.net tony_lambregts at telusplanet.net
Sat Dec 18 13:43:47 CST 2004


Jonathan Ernst wrote:
> This patch is a big refactoring of the AppDB. Some files have been
> moved and renamed, others were simply deleted and many where fixed and
> improved. No functional differences (apart the fixed global vars).
> 
> *The configuration (config.inc.php) has to be updated on the live server*
> 
> CHANGELOG:
> - moved functional code out of procedural code
> - moved functional code out of object oriented code
> - moved classes in /include/classes/
> - moved functions libraries in /includes/functions/
> - deleted some no more needed files (content was duplicate or included in other files)
> - created a library for bugzilla related functions
> - moved some code from one library to another library (db related in /include/db.php, etc.)
> - improved the config file (using constants, ability to specify new parameters that would make it very easy to integrate the appdb on another site like ReactOS as they can replace references to winehq and bugs.winehq.org for example)
> - the debug parameter of the config file is now taken into consideration in the code (function isdebugging() has been improved)
> - fixed some obvious global vars bugs when encountered (so that the help system re-works and most broken admin functions are back)
> - replaced apidb occurences with appdb as it's the name of the application
> - replaced $apidb_root occurences with BASE constant because both were used and had the same value (so no more glbal $apidb_root needed)
> - updated TODO and CODING_STANDARD regarding these changes
> - overall improved security (because of global vars and using constants for the config so that it can't be changed using php injection)
> 
> Files added:
> - include/classes/application.php
> - include/classes/menu.php
> - include/classes/screenshot.php
> - include/classes/tableve.php
> - include/classes/category.php
> - include/classes/query.php
> - include/classes/session.php
> - include/classes/user.php
> - include/functions/appdb.php
> - include/functions/date.php
> - include/functions/maintainer.php
> - include/functions/rating.php
> - include/functions/util.php
> - include/functions/banner.php
> - include/functions/db.php
> - include/functions/pn_buttons.php
> - include/functions/sidebar_admin.php
> - include/functions/vote.php
> - include/functions/bugzilla.php
> - include/functions/help.php
> - include/functions/sidebar_login.php
> - include/functions/comments.php
> - include/functions/html.php
> - include/functions/query.php
> - include/functions/sidebar.php
> 
> 
> Files deleted:
> - include/appbyvendor_inc.php
> - include/appdb.php
> - include/application.php
> - include/appversion_inc.php
> - include/banner.php
> - include/category.php
> - include/comments.php
> - include/db.php
> - include/html.php
> - include/maintainer.php
> - include/menu.php
> - include/parsedate.php
> - include/pn_buttons.php
> - include/qclass.php
> - include/query_inc.php
> - include/rating.php
> - include/session.php
> - include/sidebar.php
> - include/sidebar_admin.php
> - include/sidebar_login.php
> - include/tableve.php
> - include/user.php
> - include/util.php
> - include/vote.php
> 
> File changed:
> - CODING_STANDARD
> - TODO
> - account.php
> - addcomment.php
> - appbrowse.php
> - appdbStats.php
> - appsubmit.php
> - appview.php
> - bugs.php
> - commentview.php
> - deletecomment.php
> - edituser.php
> - index.php
> - maintainerdelete.php
> - maintainersubmit.php
> - noteview.php
> - preferences.php
> - screenshots.php
> - search.php
> - stdquery.php
> - support.php
> - updaterating.php
> - updatevote.php
> - vendorview.php
> - votestats.php
> - admin/addAppFamily.php
> - admin/addAppNote.php
> - admin/addAppVersion.php
> - admin/addCategory.php
> - admin/addVendor.php
> - admin/adminAppQueue.php
> - admin/adminCommentView.php
> - admin/adminMaintainerQueue.php
> - admin/adminMaintainers.php
> - admin/deleteAny.php
> - admin/editAppFamily.php
> - admin/editAppNote.php
> - admin/editAppOwners.php
> - admin/editAppVersion.php
> - admin/editBundle.php
> - admin/editCategory.php
> - admin/editVendor.php
> - admin/index.php
> - admin/adminAppDataQueue.php
> - help/index.php
> - include/config.php.sample
> - include/header.php
> - include/incl.php
> - include/query_users.php
> 
<gack> you _can't_ be serious.

- One patch to do one thing. For example each of the following should their own 
patch.

   Change apidb_header() and apidb_footer() to appdb_header() and appdb_footer()
   Change apidb_fullurl() to appdb_fullurl
   Move include/tableve.php to include/classes/tableve.php
   Move include/application.php to include/classes/application.php
   ...

I know you probably will end up sending more than a dozen patches that way. 
However, I can't approve of a wholesale change, like this, in one go.

</gack>

The changes you propose are good ones. Just break them down.

--

Tony Lambregts




More information about the wine-devel mailing list