Code refactoring in page.php
For a while now we have had occasional problems with rolling out Fakoli sites, due to the logic in the page.php files drifting out of date as new features are added (such as mobile login). This has led to a number of difficult to track down bugs and wasted a fair amount of time.
As such, I have finally gotten around to refactoring the page.php logic and moving it into a method on the core Fakoli object. Thus the entire page.php code will now look like this:
<?php
require_once "include/config.inc";
require_once "cms/core.inc";
Fakoli::using("page", "component", "section", "settings");
$page_id = checkNumeric($_GET["page_id"]);
$identifier = checkIdentifier($_GET["identifier"]);
$sectionIdentifier = checkIdentifier($_GET["section"]);
Fakoli::sendPage($sectionIdentifier, $identifier, $page_id);
?>
and any changes to the page access logic will be consistently pushed out to all Fakoli sites when the Fakoli library is updated from SVN.
Existing sites will not break if their page.php file is not updated to use the new method, but we should ensure that as we roll out software updates for our various projects we incorporate this change.
Onward to a brighter tomorrow with consistent login logic!
Minor Tweaks - Improvements for Data-bound Tabs and Page... » « Mighty Morphin' Mobile Edition
