log = LoggerManager::getLogger('messageboard'); $this->db = new PearDatabase(); } function create_tables () { $query = 'CREATE TABLE '.$this->table_name.' ( '; $query .='id char(36) NOT NULL'; $query .=', date_entered datetime NOT NULL'; $query .=', description text'; $query .=', deleted bool NOT NULL default 0'; $query .=', converted bool NOT NULL default 0'; $query .=', PRIMARY KEY ( id ) )'; $this->log->info($query); mysql_query($query); } function drop_tables () { $query = 'DROP TABLE IF EXISTS '.$this->table_name; $this->log->info($query); mysql_query($query); } // This method is used to provide backward compatibility with old data that was prefixed with http:// // We now automatically prefix http:// function remove_redundant_http() { if(eregi("http://", $this->website)) { $this->website = substr($this->website, 7); } } } ?>