aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-11-17 13:40:27 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2011-11-17 13:40:27 +0100
commit844a36e2b6c9cd8e934b57b7d56b7a9863f12929 (patch)
tree3ba5f23865643ff8c660fb9c9a9eeb44327b8a1b
parent02281be0c3b19bcab3ae3a96475846104af11e92 (diff)
parentc9846b745dfe2a4c20ffe4e1f48bb18da3886fd4 (diff)
downloadvolse-hubzilla-844a36e2b6c9cd8e934b57b7d56b7a9863f12929.tar.gz
volse-hubzilla-844a36e2b6c9cd8e934b57b7d56b7a9863f12929.tar.bz2
volse-hubzilla-844a36e2b6c9cd8e934b57b7d56b7a9863f12929.zip
Merge remote-tracking branch 'friendica/master'
-rw-r--r--boot.php4
-rw-r--r--database.sql9
-rw-r--r--doc/Installing-Connectors.md10
-rw-r--r--include/diaspora.php4
-rw-r--r--include/items.php15
-rw-r--r--library/HTML5/TreeBuilder.php10
-rw-r--r--mod/settings.php2
-rw-r--r--update.php11
8 files changed, 45 insertions, 20 deletions
diff --git a/boot.php b/boot.php
index b11092256..7d9337b2e 100644
--- a/boot.php
+++ b/boot.php
@@ -9,9 +9,9 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDIKA_PLATFORM', 'Friendica');
-define ( 'FRIENDIKA_VERSION', '2.3.1165' );
+define ( 'FRIENDIKA_VERSION', '2.3.1167' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
-define ( 'DB_UPDATE_VERSION', 1103 );
+define ( 'DB_UPDATE_VERSION', 1104 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
diff --git a/database.sql b/database.sql
index 58b81b0ac..924cc49b2 100644
--- a/database.sql
+++ b/database.sql
@@ -113,7 +113,8 @@ CREATE TABLE IF NOT EXISTS `contact` (
KEY `issued-id` (`issued-id`),
KEY `dfrn-id` (`dfrn-id`),
KEY `blocked` (`blocked`),
- KEY `readonly` (`readonly`)
+ KEY `readonly` (`readonly`),
+ KEY `pending` (`pending`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@@ -245,8 +246,10 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `origin` (`origin`),
KEY `last-child` (`last-child`),
KEY `unseen` (`unseen`),
+ KEY `wall` (`wall`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `body` (`body`),
+ FULLTEXT KEY `tag` (`tag`),
FULLTEXT KEY `allow_cid` (`allow_cid`),
FULLTEXT KEY `allow_gid` (`allow_gid`),
FULLTEXT KEY `deny_cid` (`deny_cid`),
@@ -441,6 +444,10 @@ CREATE TABLE IF NOT EXISTS `user` (
PRIMARY KEY (`uid`),
KEY `nickname` (`nickname`),
KEY `account_expired` (`account_expired`),
+ KEY `hidewall` (`hidewall`),
+ KEY `blockwall` (`blockwall`),
+ KEY `blocked` (`blocked`),
+ KEY `verified` (`verified`),
KEY `login_date` (`login_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/doc/Installing-Connectors.md b/doc/Installing-Connectors.md
index 97476925e..328e3b6c4 100644
--- a/doc/Installing-Connectors.md
+++ b/doc/Installing-Connectors.md
@@ -43,7 +43,7 @@ $a->config['twitter']['consumersecret'] = 'your consumer_secret here';
```
After this, your user can configure their Twitter account settings
-from "Settings -> Plugin Settings".
+from "Settings -> Connector Settings".
Documentation: http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Twitter_Plugin
@@ -67,7 +67,7 @@ To get the OAuth Consumer key pair the user has to
(a) ask her Friendica admin if a pair already exists or
(b) has to register the Friendica server as a client application on the StatusNet server.
-This can be done from the account settings under "Settings -> Connections -> Register an OAuth client application -> Register a new application".
+This can be done from the account settings under "Settings -> Connections -> Register an OAuth client application -> Register a new application" on the StatusNet server.
During the registration of the OAuth client remember the following:
@@ -77,7 +77,7 @@ During the registration of the OAuth client remember the following:
* with read & write access
* the Source URL should be the URL of your Friendica server
-After the required credentials for the application are stored in the configuration you have to actually connect your Friendica account with StatusNet. This is done from the Settings -> Plugin Settings page. Follow the Sign in with StatusNet button, allow access and then copy the security code into the box provided. Friendica will then try to acquire the final OAuth credentials from the API.
+After the required credentials for the application are stored in the configuration you have to actually connect your Friendica account with StatusNet. This is done from the Settings -> Connector Settings page. Follow the Sign in with StatusNet button, allow access and then copy the security code into the box provided. Friendica will then try to acquire the final OAuth credentials from the API.
If successful the addon settings will allow you to select to post your public messages to your StatusNet account (have a look behind the little lock symbol beneath the status "editor" on your Home or Network pages).
@@ -113,12 +113,12 @@ d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set Site URL
to yoursubdomain.yourdomain.com. Set Site Domain to your yourdomain.com.
-On Friendica, visit the Facebook Settings section of the "Settings->Plugin Settings" page. And click 'Install Facebook Connector'.
+On Friendica, visit the Facebook Settings section of the "Settings->Connector Settings" page. And click 'Install Facebook Connector'.
This will ask you to login to Facebook and grant permission to the
plugin to do its stuff. Allow it to do so.
-You're done. To turn it off visit the Plugin Settings page again and
+You're done. To turn it off visit the Connector Settings page again and
'Remove Facebook posting'.
Videos and embeds will not be posted if there is no other content. Links
diff --git a/include/diaspora.php b/include/diaspora.php
index ff0c0c0d7..36457655e 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -455,7 +455,9 @@ function diaspora_request($importer,$xml) {
intval($importer['uid'])
);
- if(count($self)) {
+ // they are not CONTACT_IS_FOLLOWER anymore but that's what we have in the array
+
+ if(count($self) && $contact['rel'] == CONTACT_IS_FOLLOWER) {
$arr = array();
$arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $importer['uid']);
diff --git a/include/items.php b/include/items.php
index b8e258d3f..ecf19a86e 100644
--- a/include/items.php
+++ b/include/items.php
@@ -1469,10 +1469,11 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
continue;
// extract tag, if not duplicate, add to parent item
- if($xo->content) {
- if(! (stristr($r[0]['tag'],trim($xo->content)))) {
+ if($xo->id && $xo->content) {
+ $newtag = '#[url=' . $xo->id . ']'. $xo->content . '[/url]';
+ if(! (stristr($r[0]['tag'],$newtag))) {
q("UPDATE item SET tag = '%s' WHERE id = %d LIMIT 1",
- dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'),
+ dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . $newtag),
intval($r[0]['id'])
);
}
@@ -2011,15 +2012,17 @@ function local_delivery($importer,$data) {
if(($xt->type == ACTIVITY_OBJ_NOTE) && ($xt->id == $r[0]['uri'])) {
// extract tag, if not duplicate, and this user allows tags, add to parent item
- if($xo->content) {
- if(! (stristr($r[0]['tag'],trim($xo->content)))) {
+ if($xo->id && $xo->content) {
+ $newtag = '#[url=' . $xo->id . ']'. $xo->content . '[/url]';
+
+ if(! (stristr($r[0]['tag'],$newtag))) {
$i = q("SELECT `blocktags` FROM `user` where `uid` = %d LIMIT 1",
intval($importer['importer_uid'])
);
if(count($i) && ! ($i[0]['blocktags'])) {
q("UPDATE item SET tag = '%s' WHERE id = %d LIMIT 1",
- dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'),
+ dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . $newtag),
intval($r[0]['id'])
);
}
diff --git a/library/HTML5/TreeBuilder.php b/library/HTML5/TreeBuilder.php
index 10d446d1e..578e73682 100644
--- a/library/HTML5/TreeBuilder.php
+++ b/library/HTML5/TreeBuilder.php
@@ -3041,9 +3041,13 @@ class HTML5_TreeBuilder {
if (!empty($token['attr'])) {
foreach($token['attr'] as $attr) {
- // mike@macgirvin.com 2011-10-21, stray double quotes and/or numeric tags cause everything to abort
- $attr['name'] = str_replace('"','',$attr['name']);
- if($attr['name'] && (!$el->hasAttribute($attr['name'])) && (! is_numeric($attr['name']))) {
+
+ // mike@macgirvin.com 2011-11-17, check attribute name for
+ // validity (ignoring extenders and combiners) as illegal chars in names
+ // causes everything to abort
+
+ $valid = preg_match('/^[a-zA-Z\_\:]([\-a-zA-Z0-9\_\:\.]+$)/',$attr['name'],$matches);
+ if($attr['name'] && (!$el->hasAttribute($attr['name'])) && ($valid)) {
$el->setAttribute($attr['name'], $attr['value']);
}
}
diff --git a/mod/settings.php b/mod/settings.php
index 6cc80e3a6..a073a5e98 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -644,7 +644,7 @@ function settings_content(&$a) {
));
$hide_wall = replace_macros($opt_tpl,array(
- '$field' => array('hidewall', t('Hide profile details and all your messages from unknown viewers?'), $a->user['hidewall'], '', array(t('No'),t('Yes'))),
+ '$field' => array('hidewall', t('Hide your profile details from unknown viewers?'), $a->user['hidewall'], '', array(t('No'),t('Yes'))),
));
diff --git a/update.php b/update.php
index 362935c38..14d68ea12 100644
--- a/update.php
+++ b/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1103 );
+define( 'UPDATE_VERSION' , 1104 );
/**
*
@@ -884,6 +884,15 @@ function update_1102() {
}
+function update_1103() {
+ q("ALTER TABLE `item` ADD INDEX ( `wall` ) ");
+ q("ALTER TABLE `item` ADD FULLTEXT ( `tag` ) ");
+ q("ALTER TABLE `contact` ADD INDEX ( `pending` ) ");
+ q("ALTER TABLE `user` ADD INDEX ( `hidewall` ) ");
+ q("ALTER TABLE `user` ADD INDEX ( `blockwall` ) ");
+ q("ALTER TABLE `user` ADD INDEX ( `blocked` ) ");
+ q("ALTER TABLE `user` ADD INDEX ( `verified` ) ");
+}