Homec4science

WebComment: fix detection of restricted reviews

Authored by Tibor Simko <tibor.simko@cern.ch> on Dec 9 2010, 14:48.

Description

WebComment: fix detection of restricted reviews

  • Fix detection of whether a review is restricted or public, making the failed web test case to work again.
  • Note that the bug was due to x and y or z' technique that is dangerous to use when y may be false, such as empty string. It is safer instead to use (x and [y] or [z])[0]' technique because `[y]' is always true regardless of the value of y. However, the present fix commits the simple, more readable, and less error-prone if/else alternative.

Details

Event Timeline

Tibor Simko <tibor.simko@cern.ch> committed R3600:a17eff2cff94: WebComment: fix detection of restricted reviews (authored by Tibor Simko <tibor.simko@cern.ch>).Dec 9 2010, 14:59