Robert Sesek [Fri, 7 Nov 2008 17:16:59 +0000 (12:16 -0500)]
Add BSApi::fetchValue() and BSApi::reset() methods
* Api.php:
(BSApi::fetchValue): New method to return the value of a field from either the record[] or values[] array
(BSApi::reset): New method to reset the API object to only have the REQ_AUTO field set
Robert Sesek [Tue, 1 Jul 2008 21:50:15 +0000 (17:50 -0400)]
ApiException will now string all of its exceptions together to form the message
* Api.php:
(ApiException::__construct): Add a prefix for the list of errors to be displayed
(ApiException::addException): Append the exception's message to ApiException->message
Robert Sesek [Wed, 25 Jun 2008 14:14:33 +0000 (10:14 -0400)]
Implement Iterator in BSDbResult
* Db.php: Add $iterator ivar
(BSDBResult::rewind): New method
(BSDBResult::current): New method
(BSDBResult::key): New method
(BSDBResult::next): New method
(BSDBResult::valid): New method
Robert Sesek [Fri, 25 Jan 2008 17:21:19 +0000 (12:21 -0500)]
Fixing some references to controller/action that we used back when we were going to have a controller module
* PrinterRootForm.php: Renamed BSPrinterRootForm->controller to be ->action and BSPrinterRootForm->action to be ->do
(BSPrinterRootForm::__construct): Changes to ivar assignment
(BSPrinterRootForm::paint): Changes for ivar names
* PrinterRootPage.php: ditto
(BSPrinterRootPage::redirect): Take a location instead of a controller/action pair; additionally, make changes for postvars
(BSPrinterRootPage::confirm): Rename parameters to match BSPrinterRootForm ivars
Robert Sesek [Thu, 24 Jan 2008 16:24:51 +0000 (11:24 -0500)]
Do not allow random() to take an array of high or low, just an optional fixed length (otherwise it will randomly select one)
* Functions.php:
(BSFunctions::random): Do not accept an Array as a parameter, just an optional int
* UnitTest/FunctionsTest.php:
(FunctionsTest::testRandom): Test using a fixed length as well as the random length
Robert Sesek [Wed, 23 Jan 2008 22:15:47 +0000 (17:15 -0500)]
Removing the is_browser() function
* Functions.php:
(BSFunctions::is_browser): Removed
(BSFunctions::download_file): Send both application/octet-stream and application/octetstream so we don't need to browser sniff anymore
* UnitTest/FunctionsTest.php: Removed the empty unit test for is_browser()
Robert Sesek [Wed, 23 Jan 2008 20:45:57 +0000 (15:45 -0500)]
We no longer need the ISSO_CHECK_POST_REFERER because we made BSInput::_checkPostReferer() public
* Input.php:
(BSInput::__construct): Remove the code that called _checkPostReferer()
(BSInput::checkPostReferer): Removed the _ from the old name and made it public
Robert Sesek [Mon, 14 Jan 2008 22:04:29 +0000 (17:04 -0500)]
Add sanity checks to BSPrinterNavigation when setting focus or sections
* PrinterNavigation.php
(BSPrinterNavigation::addFocus): Make sure the key is unique and exists before accepting it
(BSPrinterNavigation::addSection): ditto
Robert Sesek [Mon, 14 Jan 2008 20:04:19 +0000 (15:04 -0500)]
Fixing some things in the Printer system
* Printer.php: include PrinterNavigation.php
* PrinterRootElementPage.php:
(BSPrinterRootElementPage::get/setNavigator): Renamed from get/setNavigation()
(BSPrinterRootElementPage::paint): Fix a parse error caused by a missing concat op
Robert Sesek [Mon, 14 Jan 2008 19:41:00 +0000 (14:41 -0500)]
We now pass the installer test again, the issue was that InstallerTest->input wasn't being set. The circular ref to the rig in TestInstallerFixture was also cleaned up
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