Merge pull request #1904 from emanuele45/fixlets

Fixlets
Fix the upgrade queries even though upgrade is not (yet) used

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #1907 from emanuele45/small_upgrade_fix

Fix the upgrade queries even though upgrade is not (yet) used
db_last_error.php was not in the list of files checked for writability when installing - thanks jorin for reporting

Signed-off-by: emanuele <emanuele45@gmail.com>