aboutsummaryrefslogtreecommitdiffstats
path: root/library/spam
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-27 23:27:16 -0800
committerfriendica <info@friendica.com>2012-02-27 23:27:16 -0800
commit53412dacd4cb52f0c1162af7ba66aa01f71147b3 (patch)
tree8d6792d5e06efae2b26ae0a70696cd6278d57a6c /library/spam
parent2b730ae86d1b49edda74aa6cbb0f9ed3a008ed13 (diff)
downloadvolse-hubzilla-53412dacd4cb52f0c1162af7ba66aa01f71147b3.tar.gz
volse-hubzilla-53412dacd4cb52f0c1162af7ba66aa01f71147b3.tar.bz2
volse-hubzilla-53412dacd4cb52f0c1162af7ba66aa01f71147b3.zip
update globaldir when page-type changes, add spam date field
Diffstat (limited to 'library/spam')
-rw-r--r--library/spam/b8/storage/storage_frndc.php54
1 files changed, 2 insertions, 52 deletions
diff --git a/library/spam/b8/storage/storage_frndc.php b/library/spam/b8/storage/storage_frndc.php
index cbc6fe81a..7702c108b 100644
--- a/library/spam/b8/storage/storage_frndc.php
+++ b/library/spam/b8/storage/storage_frndc.php
@@ -147,58 +147,8 @@ class b8_storage_frndc extends b8_storage_base
public function connect()
{
- return TRUE;
-
- # Are we already connected?
- if($this->connected === TRUE)
- return TRUE;
-
- # Are we using an existing passed resource?
- if($this->config['connection'] === FALSE) {
- # ... yes we are, but the connection is not a resource, so return an error
- $this->connected = FALSE;
- return self::DATABASE_CONNECTION_BAD_RESOURCE;
- }
-
- elseif($this->config['connection'] === NULL) {
-
- # ... no we aren't so we have to connect.
-
- if($this->_connection = mysql_connect($this->config['host'], $this->config['user'], $this->config['pass'])) {
- if(mysql_select_db($this->config['database'], $this->_connection) === FALSE) {
- $this->connected = FALSE;
- return self::DATABASE_SELECT_ERROR . ": " . mysql_error();
- }
- }
- else {
- $this->connected = FALSE;
- return self::DATABASE_CONNECTION_ERROR;
- }
-
- }
-
- else {
- # ... yes we are
- $this->_connection = $this->config['connection'];
- }
-
- # Just in case ...
- if($this->_connection === NULL) {
- $this->connected = FALSE;
- return self::DATABASE_CONNECTION_FAIL;
- }
-
- # Check to see if the wordlist table exists
- if(mysql_query('DESCRIBE ' . $this->config['table_name'], $this->_connection) === FALSE) {
- $this->connected = FALSE;
- return self::DATABASE_TABLE_ACCESS_FAIL . ": " . mysql_error();
- }
-
- # Everything is okay and connected
$this->connected = TRUE;
-
- # Let's see if this is a b8 database and the version is okay
- return $this->check_database();
+ return TRUE;
}
@@ -235,7 +185,7 @@ class b8_storage_frndc extends b8_storage_base
# ... and fetch the data
$result = q('
- SELECT token, count
+ SELECT *
FROM ' . $this->config['table_name'] . '
WHERE ' . $where . ' AND uid = ' . $uid );