* fixed bug that caused sending of notification mails when a story is saved
offline. (potentially, this would work with offline files, images etc. if they existed.) * reduced a few lines of code
This commit is contained in:
		
							parent
							
								
									6dcf6eb53a
								
							
						
					
					
						commit
						6f5c56c038
					
				
					 1 changed files with 4 additions and 7 deletions
				
			
		|  | @ -74,12 +74,9 @@ function evalPreferences(param, modifier) { | ||||||
|    this.layout = param.layout ? this.layouts.get(param.layout) : null; |    this.layout = param.layout ? this.layouts.get(param.layout) : null; | ||||||
| 
 | 
 | ||||||
|    // e-mail notification
 |    // e-mail notification
 | ||||||
|    var n = parseInt(param.notify_create, 10); |    prefs.notify_create = parseInt(param.notify_create, 10) || null; | ||||||
|    prefs.notify_create = (!isNaN(n) ? n : null); |    prefs.notify_update = parseInt(param.notify_update, 10) || null; | ||||||
|    n = parseInt(param.notify_update, 10); |    prefs.notify_upload = parseInt(param.notify_upload, 10) || null; | ||||||
|    prefs.notify_update = (!isNaN(n) ? n : null); |  | ||||||
|    n = parseInt(param.notify_upload,10); |  | ||||||
|    prefs.notify_upload = (!isNaN(n) ? n : null); |  | ||||||
| 
 | 
 | ||||||
|    // store preferences
 |    // store preferences
 | ||||||
|    this.preferences.setAll(prefs); |    this.preferences.setAll(prefs); | ||||||
|  | @ -222,7 +219,7 @@ function isNotificationEnabled() { | ||||||
|  */ |  */ | ||||||
| function sendNotification(type, obj) { | function sendNotification(type, obj) { | ||||||
|    var notify = this.preferences.getProperty("notify_" + type); |    var notify = this.preferences.getProperty("notify_" + type); | ||||||
|    if (!notify || notify == 0) |    if (this.online === 0 || !notify || notify == 0) | ||||||
|       return; |       return; | ||||||
|    var recipients = new Array(); |    var recipients = new Array(); | ||||||
|    for (var i=0; i<this.members.size(); i++) { |    for (var i=0; i<this.members.size(); i++) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue