/** * Adds a new blacklist from binary blacklist edit admin web page. * * @param Array $blacklistArray * * @return bool */ public function addBlacklist($blacklistArray) { return $this->_pdo->queryInsert(sprintf(' INSERT INTO binaryblacklist (groupname, regex, status, description, optype, msgcol) VALUES (%s, %s, %d, %s, %d, %d)', $blacklistArray['groupname'] == '' ? 'null' : $this->_pdo->escapeString(preg_replace('/a\\.b\\./i', 'alt.binaries.', $blacklistArray['groupname'])), $this->_pdo->escapeString($blacklistArray['regex']), $blacklistArray['status'], $this->_pdo->escapeString($blacklistArray['description']), $blacklistArray['optype'], $blacklistArray['msgcol'])); }