From eb21bbdd550e4d1efc9a4c6e506eb64ba2cf9842 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 27 Jan 2014 18:37:06 -0800 Subject: Ajaxchat package has way too many incompatible assumptions - after a lot of review, we can't work with it without re-writing huge chunks. Think I'll just start fresh. Ajax chat isn't that hard and we can do stuff with it that you just can't do with other chat clients because - well we've got zot. --- .../chat/lib/class/AJAXChatMySQLiDataBase.php | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 library/ajaxchat/chat/lib/class/AJAXChatMySQLiDataBase.php (limited to 'library/ajaxchat/chat/lib/class/AJAXChatMySQLiDataBase.php') diff --git a/library/ajaxchat/chat/lib/class/AJAXChatMySQLiDataBase.php b/library/ajaxchat/chat/lib/class/AJAXChatMySQLiDataBase.php deleted file mode 100644 index 9bc611e2d..000000000 --- a/library/ajaxchat/chat/lib/class/AJAXChatMySQLiDataBase.php +++ /dev/null @@ -1,91 +0,0 @@ -_connectionID = $dbConnectionConfig['link']; - $this->_dbName = $dbConnectionConfig['name']; - } - - // Method to connect to the DataBase server: - function connect(&$dbConnectionConfig) { - @$this->_connectionID = new mysqli( - $dbConnectionConfig['host'], - $dbConnectionConfig['user'], - $dbConnectionConfig['pass'] - ); - if($this->_connectionID->connect_errno) { - $this->_errno = mysqli_connect_errno(); - $this->_error = mysqli_connect_error(); - return false; - } - return true; - } - - // Method to select the DataBase: - function select($dbName) { - if(!$this->_connectionID->select_db($dbName)) { - $this->_errno = $this->_connectionID->errno; - $this->_error = $this->_connectionID->error; - return false; - } - $this->_dbName = $dbName; - return true; - } - - // Method to determine if an error has occured: - function error() { - return (bool)$this->_error; - } - - // Method to return the error report: - function getError() { - if($this->error()) { - $str = 'Error-Report: ' .$this->_error."\n"; - $str .= 'Error-Code: '.$this->_errno."\n"; - } else { - $str = 'No errors.'."\n"; - } - return $str; - } - - // Method to return the connection identifier: - function &getConnectionID() { - return $this->_connectionID; - } - - // Method to prevent SQL injections: - function makeSafe($value) { - return "'".$this->_connectionID->escape_string($value)."'"; - } - - // Method to perform SQL queries: - function sqlQuery($sql) { - return new AJAXChatMySQLiQuery($sql, $this->_connectionID); - } - - // Method to retrieve the current DataBase name: - function getName() { - return $this->_dbName; - } - - // Method to retrieve the last inserted ID: - function getLastInsertedID() { - return $this->_connectionID->insert_id; - } - -} -?> \ No newline at end of file -- cgit v1.2.3