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)