Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: update globaldir when page-type changes, add spam date field clicking contact on contacts page broken link * master:
This commit is contained in:
commit
718c5ea23e
2
boot.php
2
boot.php
|
@ -11,7 +11,7 @@ require_once('include/cache.php');
|
||||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_VERSION', '2.3.1265' );
|
define ( 'FRIENDICA_VERSION', '2.3.1265' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1128 );
|
define ( 'DB_UPDATE_VERSION', 1129 );
|
||||||
|
|
||||||
define ( 'EOL', "<br />\r\n" );
|
define ( 'EOL', "<br />\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
|
|
|
@ -844,6 +844,7 @@ CREATE TABLE IF NOT EXISTS `spam` (
|
||||||
`spam` INT NOT NULL DEFAULT '0',
|
`spam` INT NOT NULL DEFAULT '0',
|
||||||
`ham` INT NOT NULL DEFAULT '0',
|
`ham` INT NOT NULL DEFAULT '0',
|
||||||
`term` CHAR(255) NOT NULL,
|
`term` CHAR(255) NOT NULL,
|
||||||
|
`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
INDEX ( `uid` ),
|
INDEX ( `uid` ),
|
||||||
INDEX ( `spam` ),
|
INDEX ( `spam` ),
|
||||||
INDEX ( `ham` ),
|
INDEX ( `ham` ),
|
||||||
|
|
|
@ -147,58 +147,8 @@ class b8_storage_frndc extends b8_storage_base
|
||||||
public function connect()
|
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;
|
$this->connected = TRUE;
|
||||||
|
return TRUE;
|
||||||
# Let's see if this is a b8 database and the version is okay
|
|
||||||
return $this->check_database();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +185,7 @@ class b8_storage_frndc extends b8_storage_base
|
||||||
# ... and fetch the data
|
# ... and fetch the data
|
||||||
|
|
||||||
$result = q('
|
$result = q('
|
||||||
SELECT token, count
|
SELECT *
|
||||||
FROM ' . $this->config['table_name'] . '
|
FROM ' . $this->config['table_name'] . '
|
||||||
WHERE ' . $where . ' AND uid = ' . $uid );
|
WHERE ' . $where . ' AND uid = ' . $uid );
|
||||||
|
|
||||||
|
|
|
@ -505,6 +505,7 @@ function contacts_content(&$a) {
|
||||||
'username' => $rr['name'],
|
'username' => $rr['name'],
|
||||||
'sparkle' => $sparkle,
|
'sparkle' => $sparkle,
|
||||||
'itemurl' => $rr['url'],
|
'itemurl' => $rr['url'],
|
||||||
|
'url' => $url,
|
||||||
'network' => network_to_name($rr['network']),
|
'network' => network_to_name($rr['network']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,8 @@ function settings_post(&$a) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$old_page_flags = $a->user['page-flags'];
|
||||||
|
|
||||||
if(($a->argc > 1) && ($a->argv[1] === 'oauth') && x($_POST,'remove')){
|
if(($a->argc > 1) && ($a->argv[1] === 'oauth') && x($_POST,'remove')){
|
||||||
$key = $_POST['remove'];
|
$key = $_POST['remove'];
|
||||||
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
|
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
|
||||||
|
@ -375,7 +377,7 @@ function settings_post(&$a) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($old_visibility != $net_publish) {
|
if(($old_visibility != $net_publish) || ($page_flags != $old_page_flags)) {
|
||||||
// Update global directory in background
|
// Update global directory in background
|
||||||
$url = $_SESSION['my_url'];
|
$url = $_SESSION['my_url'];
|
||||||
if($url && strlen(get_config('system','directory_submit_url')))
|
if($url && strlen(get_config('system','directory_submit_url')))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1128 );
|
define( 'UPDATE_VERSION' , 1129 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -1109,3 +1109,8 @@ function update_1127() {
|
||||||
) ENGINE = MyISAM DEFAULT CHARSET=utf8");
|
) ENGINE = MyISAM DEFAULT CHARSET=utf8");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function update_1128() {
|
||||||
|
q("alter table spam add `date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `term` ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue