Author: jfthomps
Date: Tue Jul 25 14:48:09 2017
New Revision: 1802964

URL: http://svn.apache.org/viewvc?rev=1802964&view=rev
Log:
VCL-919 - Allow customization of notification messages sent to users

siteconfig.php: modified Messages::AJsaveMessages: added check to prevent 
message body from containing only whitespace

Modified:
    vcl/trunk/web/.ht-inc/siteconfig.php

Modified: vcl/trunk/web/.ht-inc/siteconfig.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/siteconfig.php?rev=1802964&r1=1802963&r2=1802964&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/siteconfig.php (original)
+++ vcl/trunk/web/.ht-inc/siteconfig.php Tue Jul 25 14:48:09 2017
@@ -3318,6 +3318,14 @@ class Messages {
                        sendJSON($arr);
                        return;
                }
+               if(preg_match('/^\s*$/', $body)) {
+                       $arr = array('status' => 'failed',
+                                    'msgid' => "messagesmsg",
+                                    'btn' => "messagessavebtn",
+                                    'errmsg' => _("Message cannot be empty"));
+                       sendJSON($arr);
+                       return;
+               }
                $affil = $this->affils[$affilid];
                $savekey = $key;
                if($keyparts[0] == 'usermessage')


Reply via email to