* added init section to validate.php (can be moved out at a later stage when
we have sm_init) which takes care of starting the error handler and creation
of the template object
(With many thanks to Jason Wickers (jwickers at scs.wsu.edu))
----
There are still a few minor things to iron out, but overall
it works fairly well at this point. Any plugin that calls
DisplayPageHeader() will now have to replace their </body></html>
with a simple call to noframes_bottom() to be compatible...
(Possibly rename that function to DisplayPageFooter in the future)
is a conditional session_start which will only start a session if none
has been before. This will make us compatible with the upcoming PHP 4.3.3
release. Thanks Phil Driscoll for the tip.
If session is automatically started before the class
definitions are loaded, many functions (compose, certain
parts of read_body, download, etc.) will fail with the
following error:
The script tried to execute a method or access a
property of an incomplete object.
Still to do: ensure that we close the session using
session_write_close() as soon as the page is finished
loading session-specific variables to reduce
contention between frames.
stuff in plugins.
Then I moved some files:
src/validate.php -> include/validate.php
src/load_prefs.php -> include/load_prefs.php
src/options_personal.php -> include/options/personal.php
src/options_display.php -> include/options/display.php
src/options_folder.php -> include/options/folder.php
Basically, the concept here is that src/ should ONLY contain files that
actually get called from the web browser as a php script directly. All
of these files do not really contain functions or anything (so the
functions/ directory did not really make sense), but were more strictly
include files.
Of course, the name functions for a directory is bad organization, IMHO,
anyhow. I guess class would fall in the same category. Oh well, some of
that might get fixed someday.
So, new rule. Only put it in src/ if it gets called directly.
That was really sort of an unwritten rule before. However, since it was
never really enforced or officialized, things got sloppy.
I think I have everything fixed in the CORE with this traumatic moves. I
am sure all of the plugins will be broken. Oh well, the error messages
should be pretty loud and easy enough to fix.