OAIHarvest: error reporting fix

* Adapts reporting to new repo format.  (closes #1804) (PR #1812)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: Link_Records error message fix

* Fixes the bug in str.join(recids) in get_recid_and_reportnumber function;
  recids should be converted to strings before calling join function.
  (PR #1734)

Signed-off-by: Sebastian Witowski <sebastian.witowski@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
OAIHarvest: conversion argument name upgrade

* Adds the missing upgrade script for changes done to OAI harvest
  source arguments in f9271a0 that could cause name problems during
  harvesting when upgrading an existing installation.  (PR #1753)

* Amends the web-tests to look for the proper new name.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Acked-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: more robust decompose_bibdocfile_url()

* Improves decompose_bibdocfile_url() function to be more robust with
  respect to uncommon characters in docnames.  (PR #1957)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
I18N: fix gender problem in a French translation

* Fixes "aucun information" gender problem.  (PR #2089)

Signed-off-by: Ludmila Marian <ludmila.marian@gmail.com>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  I18N: fix gender problem in a French translation

* Merge note: corrected one similar phrase.

Conflicts:
	po/fr.po

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: change name failure raises exception

* If the bibdoc name was not changed, the `change_name()` function will
  raise an exception.  (PR #2071)

Signed-off-by: Sebastian Witowski <sebastian.witowski@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Bibdocfile: change_name missing parameter fix

* Fixes the missing parameter in BibDoc.change_name function in
  bibdocfile_managedocfiles (GENSBM was failing due to that).
  (PR #1818)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: `deferRelatedFormatsCreation` param fix

* Adds `deferRelatedFormatsCreation` of `Create_Upload_Files_Interface`
  to the table filling step, fixing submission troubles, following up
  40c208ec8b6908a463db452476d2cf19bec47ed8.  (addresses #2142)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: `test_revise_picture_admin` test fix

* Fixes `test_revise_picture_admin` web test.  (closes #2142)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: support for elements' custom_level

* Adds support for optionally setting a custom_level ('M' for mandatory or
  'O' for optional) for each element through the element description,
  overriding the default level. Useful for dynamically produced elements.
  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: print white space instead of None

* Avoids printing "None" (by passing None to string formatting).
  Instead, print a single white space.  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: more robust JavaScript check

* Before running a custom JavaScript function on an element, check if
  the element is not undefined.  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: duplicate docname fix

* Fixes an issue when checking duplicate docnames in the
  BibDocFile client that caused a false alert.  (PR #1930)

* Fixes the report output which had the wrong order of arguments.

Reported-by: Alexander Wagner <a.wagner@fz-juelich.de>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: CSRF tokens in account settings forms

* Improves internal account settings edit page (`/youraccount/edit`)
  by generating unique CSRF tokens valid five minutes.  (closes #1855)

* Accepts only POST requests and verifies CSRF token expiry when
  performing desired settings change (`/youraccount/change`).

Reported-by: Bessem Amira <bessem.amira@cnudst.rnrt.tn>
Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  WebSession: CSRF tokens in account settings forms
  BibDocFile: duplicate docname fix

Conflicts:
	modules/bibdocfile/lib/bibdocfilecli.py
	modules/websession/lib/webaccount.py
	modules/websession/lib/websession_regression_tests.py
	modules/websession/lib/websession_templates.py
	modules/websession/lib/websession_webinterface.py
	modules/websession/lib/webuser.py

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: CSRF token in API key settings form

* Adds CSRF token to the API keys settings form as well.  Amends template
  and `/youraccount/apikey` handler accordingly.  (see #1855)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.1'

* maint-1.1:
  WebSession: CSRF token in API key settings form
  WebSession: CSRF tokens in account settings forms
  BibDocFile: duplicate docname fix
  I18N: fix gender problem in a French translation

* Merge note: CSRF generation and verifications functions amended
  to reflect that `session_param_get()` now returns `None` instead
  of raising `KeyError`.

Conflicts:
	modules/websession/lib/webaccount.py
	modules/websession/lib/websession_templates.py
	modules/websession/lib/websession_webinterface.py
	po/fr.po

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: CSRF token in profiling settings

* Adds CSRF token to the profiling settings form as well.  (see #1855)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
BibRank: (Overflow|ZeroDivision)Error usability

* Improves handling of OverlowError, ZeroDivisionError in the bibrank
  word indexer by suggesting the administrator to schedule a regular
  reindexing of the word similarity tables.  (closes #105) (PR #2146)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>