Install.php suggestion [message #165402] |
Sat, 11 June 2011 17:43 |
|
Dayo
Messages: 101 Registered: April 2011
Karma: 0
|
Senior Member |
|
|
Attached is a diff of changes to install.php.
Two general types:
1. Grammar stuff (Minor): fixed some typos and tightened up some of the slightly rambling style
2. Variable Structure (Major): I found it really difficult to understand the logic and flow until I realised that when I see, say, "$WWW_ROOT" it may not refer to the "$WWW_ROOT" from GLOBALS.PHP. So I decided to go through and rationalise things by applying some structure.
Variables in all capital text now always originate from GLOBALS.PHP (mostly - apart from in function decompress_archive) and others are in lower case.
The "$WWW_ROOT" posted from the local form for instance has now been changed to "$form_www_root" and if there is any "$WWW_ROOT", then it has come from GLOBALS.PHP. This gives structure and now someone not as intimately familiar with the code as you devs can figure out what is what.
This obviously doesn't change anything functionally but sets the stage for a plan to latter look into restructuring GLOBALS.PHP to address my gripes as set out HERE.
This needs a proper review before it can be committed. I know that as it does not have a direct functional pay off, it may be seen as a PITA but sorting this will allow further stuff later that will help streamline the application.
Cheers.
****
Edit: Did a review myself and made a few changes. Revision attached.
[Updated on: Sun, 12 June 2011 00:37] Report message to a moderator
|
|
|
|
|
|
|
|