Koha/opac
Tomas Cohen Arazi 5a82616ab7 Bug 10582: Koha OPAC URL shows Perl error message before web installer was run
This patch makes opac/maintenance.pl run smoothly when the DB hasn't
been populated yet. It does so, by using C4::Templates::gettemplate
instead of C4::Auth::get_user_and_template as the maintenance page doesn't
need authentication checks at all, it should happen *before* any attempt
to check credentials.

To test:
- Backup and DROP your database
- Point your browser to the OPAC page
=> FAIL: An error is shown: "Cant's use an undefined value as an ARRAY..."
- Apply the patch
- Relad the page
=> SUCCESS: The maintenance page correctly shows.
We should now check the rest of the script's behaviour remains untouched:
- Reload your backed up DB
- Change your DB version number by hand to one version lower, like in:
  > UPDATE systempreferences SET value="3.1700042" WHERE variable LIKE '%version%';
- Go to the OPAC
=> SUCCESS: Maintenance page shows as expected
- Recover the right  version number, like in:
  > UPDATE systempreferences SET value="3.1700043" WHERE variable LIKE '%version%';
- Set OpacMaintenance to Show on the staff client
- Reload the OPAC
=> SUCCESS: Maintenance page shows as expected
- Set OpacMaintenance to 'Don't show' on the staff client
- Reload the OPAC
=> SUCCESS: Normal OPAC shows
- Sign off :-D

Regards

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, fixes long existing bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-06 13:51:37 -03:00
..
errors Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
rss
sco Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
svc Bug 12041 - improve Koha::Cache 2014-06-19 13:05:04 -03:00
ilsdi.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
maintenance.pl Bug 10582: Koha OPAC URL shows Perl error message before web installer was run 2014-11-06 13:51:37 -03:00
oai.pl Bug 10974: make OAI-PMH resumption tokens handle time correctly 2013-10-31 18:01:52 +00:00
opac-account.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-addbybiblionumber.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-alert-subscribe.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-authorities-home.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-authoritiesdetail.pl Bug 8981 follow-up: case 2012-11-29 22:07:29 -05:00
opac-basket.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-blocked.pl Bug 10195: (follow-up) update license; use Modern::Perl 2014-05-05 15:37:20 +00:00
opac-browser.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-changelanguage.pl Bug 4330 Fixing FSF statements 2012-05-28 17:53:51 +02:00
opac-course-details.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-course-reserves.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-detail.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-downloadcart.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-downloadshelf.pl Bug 12519 - Convert OPAC list download pop-up to modal dialog 2014-07-22 09:54:36 +12:00
opac-export.pl Bug 12174 follow-up of the patch (a missing print statement) 2014-07-31 12:00:55 -03:00
opac-ics.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-image.pl Bug 8255: allow local cover images to be cached 2012-06-25 18:12:29 +02:00
opac-imageviewer.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-ISBDdetail.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-main.pl BUG8446, Follow up: Improve local login fallback 2014-10-16 12:27:51 -03:00
opac-MARCdetail.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-memberentry.pl Bug 12718 - Show extended patron attributes in the OPAC 2014-08-26 11:36:02 -03:00
opac-messaging.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-modrequest-suspend.pl Bug 12876 - Reserve in waiting/transfer status may be cancelled by user 2014-09-23 20:46:50 -03:00
opac-modrequest.pl Bug 12876 - Reserve in waiting/transfer status may be cancelled by user 2014-09-23 20:46:50 -03:00
opac-mymessages.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-overdrive-search.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-passwd.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-patron-image.pl Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber 2013-10-14 21:08:02 +00:00
opac-privacy.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-ratings-ajax.pl Bug 8315 - fix 'C4::Output 3.02' errors in Koha 2012-06-29 11:59:13 +02:00
opac-ratings.pl Bug 5668 - Star ratings in the opac 2012-04-10 14:40:49 +02:00
opac-readingrecord.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-registration-verify.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-renew.pl Bug 12568 [QA Followup] - Use ':' as separator instead of '|' 2014-07-31 11:52:19 -03:00
opac-reserve.pl Bug 10433 - colspan calculation done by opac/opac-reserve.pl should be moved to template 2014-10-29 22:11:44 -03:00
opac-review.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-search-history.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-search.pl Bug 12538: Remove Solr without breaking anything else 2014-10-11 16:59:04 -03:00
opac-sendbasket.pl Bug 9530 making changes to opac/opac-sendbasket.pl 2014-10-27 10:38:22 -03:00
opac-sendshelf.pl Bug 9530 making changes to opac/opac-sendshelf.pl 2014-10-27 10:38:23 -03:00
opac-serial-issues.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-shareshelf.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-shelves.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-showmarc.pl Bug 13170 Remove of prog theme broke the OPAC's "view plain" option for MARC details 2014-11-04 18:52:53 -03:00
opac-showreviews.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-suggestions.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-tags.pl Bug 13083 - Hard-coded " by " in opac-tags.pl 2014-10-28 09:41:17 -03:00
opac-tags_subject.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-topissues.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac-user.pl BUG8446, Follow up: Remove unnecessary sysprefs, move to config 2014-10-16 12:27:49 -03:00
tracklinks.pl Bug 8917 : Shifting db dependent code to a module 2013-03-07 11:14:25 -05:00
unapi Bug 10085: unapi does not function under Plack 2013-04-23 08:33:51 -04:00