Robert Sesek [Sun, 13 Jan 2008 21:37:31 +0000 (13:37 -0800)]
Removing the BSVariableRegistry and instead making public static vars in BSApp for the necessary inter-linking modules
* Api.php: No longer use BSApp::registry() but rather just the cvars
* App.php: Make the ivars cvars so we no longer need singleton stuff
(BSApp::_instance): Removed
(BSApp::registry): Removed
(BSApp::load_module): Removed, just directly instantiate now
(BSApp::required_modules): Removed
(BSVariableRegistry): Removed
* Input.php: Use cvars instead of the BSApp::registry()
* Installer.php: ditto
* Mail.php: ditto
* Pagination.php: ditto
* Template.php: ditto
Robert Sesek [Sun, 13 Jan 2008 20:43:26 +0000 (12:43 -0800)]
Removing a lot of old system variables from BSApp
* App.php: Removed BSApp->application, BSApp->appPath, BSApp->appVersion, BSApp->webPath
(BSApp::set_application): Removed
(BSApp::get_application): Removed
(BSApp::set_app_path): Removed
(BSApp::get_app_path): Removed
(BSApp::set_app_version): Removed
(BSApp::get_app_version): Removed
(BSApp::set_web_path): Removed
(BSApp::get_web_path): Removed
* Printer.php: Add BSPrinter->copyright to store copyright information for the footer of pages
(BSPrinter::get_copyright): New method
(BSPrinter::set_copyright): New method
* PrinterNavigation.php: BSPrinter->realm is now the only component used for titles
(BSPrinterNavigation::constructHeaderHtml): Now uses only the realm
* PrinterRootElementPage.php: Again, only use BSPrinter->realm
(BSPrinterRootElementPage::paint): Switch to using only the realm in the title and using BSPrinter->copyright in the footer
Robert Sesek [Sun, 13 Jan 2008 18:46:16 +0000 (10:46 -0800)]
Fixing a few functions that broke during the refactoring
* Functions.php:
(BSFunctions::swap_css_classes): This function wasn't marked static so it wasn't refactored, fixed both of those issues
(BSFunctions::scan_directory): Issues arose with _help_scan_directory()
(BSFunctions::_help_scan_directory): ditto
Robert Sesek [Fri, 30 Nov 2007 18:47:12 +0000 (13:47 -0500)]
Fixing some warnings that I discovered through unit testing under E_ALL
* Functions.php:
(BSFunctions::FetchMicrotimeDiff): Refactored the local vars
* Template.php:
(BSTemplate::fetch): Fixed a warning generated by the uncached template counter
(BSTemplate::flush): Fixed a warning about the microtime diff because we weren't passing a microtime, just the seconds
Robert Sesek [Sat, 22 Sep 2007 18:44:56 +0000 (14:44 -0400)]
Fix a failing unit test to work around the file system being slow
* UnitTest/TemplateTest.php:
(TemplateTest::testDbCache): sleep() for a second in order to allow the file system to catch up to the changes we're making
Robert Sesek [Sat, 15 Sep 2007 17:03:44 +0000 (13:03 -0400)]
Added the installer unit test
* Installer.php:
(BSInstaller::__construct): Fixed a bad call to the registry
* UnitTest/AllTests.php: Add the installer test
* UnitTest/InstallerTest.php: New file
Robert Sesek [Thu, 16 Aug 2007 20:51:48 +0000 (20:51 +0000)]
Removing the usage counter in from the template system
* Template.php:
(BSTemplate::cache): No longer initialize the usage counter
(BSTemplate::fetch): Only increment the BSTemplate->uncached[] template counter when the template is not cached
(BSTemplate::flsuh): Remove the template debug block and only show uncached templates and their usage
Robert Sesek [Thu, 16 Aug 2007 20:44:53 +0000 (20:44 +0000)]
Removing the SVN constant option and the ISSO_MT_START (thanks to $_SERVER['REQUEST_TIME'])
* Template.php:
(BSTemplate::flush): No longer display SVN information and we can use $_SERVER[REQUEST_TIME] so we don't need to define ISSO_MT_START
* App.php: Remove documentation about constants
Robert Sesek [Thu, 16 Aug 2007 20:35:59 +0000 (20:35 +0000)]
Simplifying the loading of templates so we don't have two exceptions to throw for the same type of error
* Template.php
(BSTemplate::_loadTemplate): Check if the path is a file and can be read, instead of checking the result of file_get_contents() becaues that way we don't throw multiple exceptions in the same method unnecessarily
Robert Sesek [Wed, 15 Aug 2007 07:06:17 +0000 (07:06 +0000)]
Making the two MySQL tests create an InnoDB database so that we can practice our new transaction test
* UnitTest/DatabaseMySQLTest.php:
(DatabaseMySQLTest::setUp): Create the test table as InnoDB
* UnitTest/DatabaseMySQLiTest.php:
(DatabaseMySQLiTest::setUp): ditto
* UnitTest/DatabaseTestAbstract.php:
(DatabaseTestAbstract::testTransactions): New method
Robert Sesek [Tue, 14 Aug 2007 03:38:41 +0000 (03:38 +0000)]
Changing the registry part of BSRegister to be a new inner class called BSVariableRegistry
* Register.php:
(BSRegister::__construct): Instantiate a new instance of BSVariableRegistry
(BSRegister::Registry): New method
(BSRegister::Register): Removed
(BSRegister::Unregister): Removed
(BSRegister::Get): Removed
(BSRegister::GetType): Removed
(BSRegister::GetAll): Removed
(BSVariableRegistry): New class
* docs/UnitTest/RegisterTest.php: Updated the unit test for the new BSRegister functionality
Robert Sesek [Sat, 28 Jul 2007 17:37:32 +0000 (17:37 +0000)]
Starting to migrate from SimpleTest to PHPUnit.
* docs/UnitTestReport.php: Renamed to SimpleTestReporter
* docs/UnitTest/AllTests.php: Changing the path to the test reporter, see above.
* docs/PHPUnitTestReporter.php: Added
Robert Sesek [Sat, 21 Apr 2007 21:23:47 +0000 (21:23 +0000)]
- In Pagination::constructPageNav() we added the $addParam paramter to not force adding the ? or & onto the end of $baselink
- Fixed "Call to undefined method BSInput::input_clean()"
Robert Sesek [Wed, 4 Apr 2007 02:40:20 +0000 (02:40 +0000)]
Removing BSTemplate database-driven system in place of BSTemplateFs (which is now called BSTemplate) because we never use database-driven templates any more, but rather file templates with database caching
Robert Sesek [Wed, 4 Apr 2007 01:46:09 +0000 (01:46 +0000)]
Rewrote the <lang> tag parser in BSTemplate::_parsePhrases():
- Now the indices in the tag actually correspond to the appropriate argument
- It looks a lot cooler?