fix user roles to always return from session, even when empty (to save repeat lookups) * change Model authenticate_user method name to validate_user_credentials to avoid confusion with inbuilt DPAE method * recovered ordering on grouped data for mysql db queries (not for sqlite) * app only loads 1 Routes file so all requests handled by same file, routes.t loads 2 routes so ajax call doesn't need login and to demonstrate how to run 2 apps with .psgi script
fix app to work properly with app.psgi as command-line or apache: * moved ajax route back to Routes::AJAX * Routes & Routes::AJAX load private instances of Reporter.pm, no longer shared * moved dbname logic from 2 routes files to Reporter dbname builder so only happens once in app routes.t uses Plack::Builder for app, same as app.psgi
fix ajax calls when app running from app.psgi * dance() deprecated in favour of to_app() * but to_app() didn't load Routes::AJAX routes so couldn't find ajax_get_diagnoses route * see bin/app.psgi.readme * modifying app.psgi to use Plack::Builder fixed it but not when used by Apache (which used bin/app.pl->dance) * recurrent problems with separate AJAX route so combined the only 1 into main Routes file, prefixed as '/ajax' * separated test schema into its own file and separated reports.t into routes.t & model.t * change reporter.fgci (Apache script) to use bin/app.psgi (->to_app)
fix for 'mysql gone away' problem in Routes::AJAX - app definition was incorrect, and gave it a 'before' hook to check_db_connection as precaution; removed debugging info in DB::check_db_connection
returns message to report screen after submission; forced 'updated_at' timestamp as ON UPDATE doesn't seem to work; moved generation of previous reports list from login to search page and out of session into var; prevented ajax lookup if < 3 chars (seems to generate persistent error if db does search with undef param); moved SQL::Lib methods query construction to new create_query() method; moved 'deferred' display to main layout tt
separated Reporter::Validation class into RV::SearchForm & RV::ReportForm to isolate profiles; handles failure to find request from search form; ajax find diagnosis function required info key (ICDO3) to be not undef; hide some page elements in print view
queries to retrieve test results & result summaries from db; new route class for ajax calls; formatted report_form.tt; provided some tt vars via before_template_render hook