@@ -55,10 +55,10 @@ public function create_table($table_map_query = null)
55
55
public function search ($ subject , $ body , $ alt_body , $ attachments )
56
56
{
57
57
$ req = $ this ->select ()->from ($ this ->tableName , '* ' )
58
- ->where (self ::DB_SUBJECT . '=:sub ' , array (':sub ' => $ subject ))
59
- ->where (self ::DB_BODY . '=:body ' , array (':body ' => $ body ))
60
- ->where (self ::DB_ALT_BODY . '=:altb ' , array (':altb ' => $ alt_body ))
61
- ->where (self ::DB_ATTACHMENTS .'=:att ' , array (':att ' => $ attachments ))
58
+ ->where (self ::DB_SUBJECT . '=:sub ' , array (':sub ' => $ this -> secureData ( $ subject) ))
59
+ ->where (self ::DB_BODY . '=:body ' , array (':body ' => $ this -> secureData ( $ body, '' , true ) ))
60
+ ->where (self ::DB_ALT_BODY . '=:altb ' , array (':altb ' => $ this -> secureData ( $ alt_body) ))
61
+ ->where (self ::DB_ATTACHMENTS .'=:att ' , array (':att ' => $ this -> secureData ( $ attachments) ))
62
62
->limit (1 );
63
63
$ result = $ this ->fetch_sql ($ req , 'fetchRow ' );
64
64
@@ -83,10 +83,10 @@ public function search($subject, $body, $alt_body, $attachments)
83
83
public function add ($ subject , $ body , $ alt_body , $ attachments )
84
84
{
85
85
$ content = array (
86
- self ::DB_SUBJECT => $ subject ,
87
- self ::DB_BODY => \ BfwMailer \ Helpers \Secure:: secureData ($ body , 'string ' , true ),
88
- self ::DB_ALT_BODY => $ alt_body ,
89
- self ::DB_ATTACHMENTS => $ attachments
86
+ self ::DB_SUBJECT => $ this -> secureData ( $ subject) ,
87
+ self ::DB_BODY => $ this -> secureData ($ body , '' , true ),
88
+ self ::DB_ALT_BODY => $ this -> secureData ( $ alt_body) ,
89
+ self ::DB_ATTACHMENTS => $ this -> secureData ( $ attachments)
90
90
);
91
91
92
92
$ req = $ this ->insert ()->into ($ this ->tableName , $ content )->execute ();
0 commit comments