Fix bug#4450 Query is duplicated on Ctrl+Enter

Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
bug #4405 Cannot import (open_basedir): fix another case

Signed-off-by: Marc Delisle <marc@infomarc.info>
Merge commit '0306e2b'
Fix merge conflict

Signed-off-by: Marc Delisle <marc@infomarc.info>