fixed a bug in evalStory(): setting editableby-property only if modifier equals creator, before it was impossible to switch editablyby to null again

This commit is contained in:
Robert Gaggl 2003-01-28 16:46:25 +00:00
parent 45a09ebde6
commit 7ec367eb3e

View file

@ -10,8 +10,8 @@
function evalStory(param,modifier) { function evalStory(param,modifier) {
var result; var result;
// assign those properties that can be stored anyway // assign those properties that can be stored anyway
var editableby = parseInt(param.editableby,10); if (modifier == this.creator)
this.editableby = (modifier == this.creator && !isNaN(editableby) ? editableby : this.editableby); this.editableby = !isNaN(param.editableby) ? parseInt(param.editableby,10) : null;
this.discussions = (param.discussions_array || param.discussions == null ? 1 : 0); this.discussions = (param.discussions_array || param.discussions == null ? 1 : 0);
// loop through param and collect content properties // loop through param and collect content properties
var majorUpdate = false; var majorUpdate = false;