Added support for port number when connecting to SQL database.
PHP 7 compatibility - converting from mysql_* to mysqli_* functions.
Preg_replace fixes - /e not allowed.
PHP 7 compatibility - fixing class constructors.
Ensure that UIDs are integers when deleting comments and trackbacks.
Another minor error in commented line.
Missed some updated code lines in last commit.