Image.evalImg (param, modifier)
function checks if new Image-parameters are correct ...

  • Parameter Obj:
    Object containing the form values
  • Parameter Obj:
    User-Object modifying this image
  • Returns
    Obj Object containing two properties: - error (boolean): true if error happened, false if everything went fine - message (String): containing a message to user
Sourcecode in Image/objectFunctions.js:
1:   function evalImg(param, modifier) {
2:      this.alttext = param.alttext;
3:      this.modifier = modifier;
4:      this.modifytime = new Date();
5:      if (this.thumbnail) {
6:         this.thumbnail.alttext = this.alttext;
7:         this.thumbnail.modifytime = this.modifytime;
8:         this.thumbnail.modifier = this.modifier;
9:      }
10:     // check name of topic (if specified)
11:     var topicName = null;
12:     if (param.topic) {
13:        if (!param.topic.isURL())
14:           throw new Exception("topicNoSpecialChars");
15:        topicName = param.topic;
16:     } else if (param.addToTopic)
17:        topicName = param.addToTopic;
18:     this.topic = topicName;
19:     return new Message("update");
20:  }