Merge pull request #70 from alrs/fix-dropped-common-errors
common: Fix Shadowed Errors
This commit is contained in:
commit
5029e6b73f
@ -65,12 +65,13 @@ func SendEmail(email, subject, msg string) (err error) {
|
||||
body += "\r\n" + msg
|
||||
|
||||
var c *smtp.Client
|
||||
var conn *tls.Conn
|
||||
if Config.SMTPEnableTLS {
|
||||
tlsconfig := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
ServerName: Config.SMTPServer,
|
||||
}
|
||||
conn, err := tls.Dial("tcp", Config.SMTPServer+":"+Config.SMTPPort, tlsconfig)
|
||||
conn, err = tls.Dial("tcp", Config.SMTPServer+":"+Config.SMTPPort, tlsconfig)
|
||||
if err != nil {
|
||||
LogWarning(err)
|
||||
return err
|
||||
|
@ -105,7 +105,7 @@ func (s *SQLSearcher) Query(q string, zones []int) (ids []int, err error) {
|
||||
|
||||
acc := qgen.NewAcc()
|
||||
stmt := acc.RawPrepare("SELECT `topics`.`tid` FROM `topics` INNER JOIN `replies` ON `topics`.`tid` = `replies`.`tid` WHERE (MATCH(`topics`.`title`) AGAINST (? IN NATURAL LANGUAGE MODE) OR MATCH(`topics`.`content`) AGAINST (? IN NATURAL LANGUAGE MODE) OR MATCH(`replies`.`content`) AGAINST (? IN NATURAL LANGUAGE MODE)) AND `topics`.`parentID` IN(" + zList + ");")
|
||||
err := acc.FirstError()
|
||||
err = acc.FirstError()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user