diff --git a/CHANGELOG b/CHANGELOG
index 7fc5835a7..bfb5ad2b2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,44 @@
+Hubzilla 1.10
+ Wiki:
+ Lots of enhanced functionality, usability improvements, and bugfixes from v1.8
+ Turned into an optional feature (default on) but disabled in UNO
+ Sync:
+ Items are now relocated (links patched) when syncing to clones
+ Access Tokens:
+ New feature - allows members to create access controlled guest logins and create/share 'dropbox' style links to protected resources.
+ UI:
+ Use icons instead of iconic text constructs
+ Only request geolocation permission when creating a post, not on page load
+ provide 'redeliver' option on Delivery Report page for when things really stuff up
+ CalDAV/CardDAV management pages with heaps of functionality
+ Lib:
+ z_fetch_url() updated to accept different request methods and request bodies
+ item_store(), item_store_update() now return the stored items
+ vcard microformat changes to remain spec compliant
+ microformat meta tags added to post/comments
+ AbConfig API changed to use channel_id rather than channel_hash, which was overly complicated to use
+ SuperCurl class added to provide a framework for re-use of obscure CURL options
+ Allow absolute links to CSS/JS files on CDN
+ Add Let'sEncrypt intermediate cert to lib in case you forget to install it on the server
+ Update fullcalendar and jquery (3.1) libs
+ Update sabre/dav to 3.2.0
+ Change content export from a month/year system to begin/end
+ Use streaming I/O for delivering large photos
+ Allow multiple App description files in a single plugin directory
+ optimise a couple of troublesome/inefficient SQL queries
+ avoid sending clone sync packets to dead sites
+ Resolved Issues:
+ channel home page not providing content to clients with javascript disabled
+ Replace '@' obfuscation with html entity rather than the unicode look-alike
+ xchan_query() failing to detect duplicates, resulting in inefficient queries
+ issues with 'use existing photo' for profile photo
+ layout editor "list all layouts" returned empty
+ oembed - better detect video file URLs so they aren't loaded into memory.
+ handcrafted bbcode tables could end up with way too much whitespace due to CRLF translation
+ refresh permissions whitescreen in 1.8
+ force immediate profile photo update on local site
+ regression: 'save bookmarks' post action missing
+
Hubzilla 1.8
Administration:
Cleanup and resolve some edge cases with addon repository manager
diff --git a/README.md b/README.md
index 8a6c003fc..9929f6a16 100644
--- a/README.md
+++ b/README.md
@@ -47,4 +47,16 @@ Possible website applications include
Installing Hubzilla
+**Who Are We and What Are Our Principles?**
+
+The Hubzilla community is powered by passionate volunteers creating an open source **commons** of decentralised services which are highly integrated and can rival the feature set of centralised providers. We are open to sponsorship and donations to cover expenses and compensate for our time and energy, however the project core is basically non-profit and is not designed for the purpose of commercial gain or exploitation.
+
+Some sites may include monetisation strategies such as subscriptions and *freemium* models where members pay for resources they consume beyond a basic level. The project community supports such monetisation initiatives (nobody should be forced to pay "out of pocket" to provide a service to others), but we maintain the **commons** to provide open and free access of the software to all.
+
+The software is not designed for data collection of its members or providing advertising. We don't have a need or desire for these things and feel that software built around these goals is poorly designed and represents compromised principles and ethics.
+
+As a project, we are inclusive of all beliefs and cultures and do what we are able to provide an environment that is free from hostility and harrassment. Whether or not we succeed in this endaevour requires constant vigilance and help from all members of the community, working together to build an inter-networking tool with amazing potential.
+
+
+
[](https://travis-ci.org/redmatrix/hubzilla)
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index d5b41274b..5af8174bf 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -62,6 +62,15 @@ class Cron {
}
+ // delete expired access tokens
+
+ q("delete from atoken where atoken_expires != '%s' && atoken_expires < %s",
+ dbesc(NULL_DATE),
+ dbutcnow()
+ );
+
+
+
// Ensure that every channel pings a directory server once a month. This way we can discover
// channels and sites that quietly vanished and prevent the directory from accumulating stale
// or dead entries.
diff --git a/Zotlabs/Lib/AbConfig.php b/Zotlabs/Lib/AbConfig.php
index 138d0dfea..cab59abbd 100644
--- a/Zotlabs/Lib/AbConfig.php
+++ b/Zotlabs/Lib/AbConfig.php
@@ -5,8 +5,10 @@ namespace Zotlabs\Lib;
class AbConfig {
- static public function Load($chan,$xhash) {
- $r = q("select * from abconfig where chan = %d and xchan = '%s'",
+ static public function Load($chan,$xhash,$family = '') {
+ if($family)
+ $where = sprintf(" and family = '%s' ",dbesc($family));
+ $r = q("select * from abconfig where chan = %d and xchan = '%s' $where",
intval($chan),
dbesc($xhash)
);
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php
index f33e257f4..15609c3c8 100644
--- a/Zotlabs/Module/Acl.php
+++ b/Zotlabs/Module/Acl.php
@@ -130,13 +130,40 @@ class Acl extends \Zotlabs\Web\Controller {
if(local_channel()) {
if($extra_channels_sql != '')
$extra_channels_sql = " OR (abook_channel IN ($extra_channels_sql)) and abook_hidden = 0 ";
+
+ $r2 = null;
+
+ $r1 = q("select * from atoken where atoken_uid = %d",
+ intval(local_channel())
+ );
+ if($r1) {
+ require_once('include/security.php');
+ $r2 = array();
+ foreach($r1 as $rr) {
+ $x = atoken_xchan($rr);
+ $r2[] = [
+ 'id' => 'a' . $rr['atoken_id'] ,
+ 'hash' => $x['xchan_hash'],
+ 'name' => $x['xchan_name'],
+ 'micro' => $x['xchan_photo_m'],
+ 'url' => z_root(),
+ 'nick' => $x['xchan_addr'],
+ 'abook_their_perms' => 0,
+ 'abook_flags' => 0,
+ 'abook_self' => 0
+ ];
+ }
+ }
+
$r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms, abook_flags, abook_self
FROM abook left join xchan on abook_xchan = xchan_hash
WHERE (abook_channel = %d $extra_channels_sql) AND abook_blocked = 0 and abook_pending = 0 and xchan_deleted = 0 $sql_extra2 order by $order_extra2 xchan_name asc" ,
intval(local_channel())
);
-
+ if($r2)
+ $r = array_merge($r2,$r);
+
}
else { // Visitors
$r = q("SELECT xchan_hash as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self
diff --git a/Zotlabs/Module/Cloud.php b/Zotlabs/Module/Cloud.php
index 9845c5658..68d84e070 100644
--- a/Zotlabs/Module/Cloud.php
+++ b/Zotlabs/Module/Cloud.php
@@ -13,6 +13,9 @@ use \Zotlabs\Storage;
// composer autoloader for SabreDAV
require_once('vendor/autoload.php');
+require_once('include/attach.php');
+
+
/**
* @brief Fires up the SabreDAV server.
*
diff --git a/Zotlabs/Module/Dav.php b/Zotlabs/Module/Dav.php
index 9b4b576c8..ba2394388 100644
--- a/Zotlabs/Module/Dav.php
+++ b/Zotlabs/Module/Dav.php
@@ -14,6 +14,7 @@ use \Zotlabs\Storage;
// composer autoloader for SabreDAV
require_once('vendor/autoload.php');
+require_once('include/attach.php');
/**
* @brief Fires up the SabreDAV server.
diff --git a/Zotlabs/Module/Embedphotos.php b/Zotlabs/Module/Embedphotos.php
index 2cd420664..0dac873c5 100644
--- a/Zotlabs/Module/Embedphotos.php
+++ b/Zotlabs/Module/Embedphotos.php
@@ -159,7 +159,7 @@ function embedphotos_widget_album($args) {
'$upload' => array(t('Upload'), z_root() . '/photos/' . \App::$profile['channel_address'] . '/upload/' . bin2hex($album)),
'$order' => false,
'$upload_form' => $upload_form,
- '$usage' => $usage_message
+ '$no_fullscreen_btn' => true
));
return $o;
diff --git a/Zotlabs/Module/Home.php b/Zotlabs/Module/Home.php
index f3ba96fdd..79449c3b2 100644
--- a/Zotlabs/Module/Home.php
+++ b/Zotlabs/Module/Home.php
@@ -28,6 +28,19 @@ class Home extends \Zotlabs\Web\Controller {
goaway($dest);
}
+
+ if(remote_channel() && (! $splash) && $_SESSION['atoken']) {
+ $r = q("select * from atoken where atoken_id = %d",
+ intval($_SESSION['atoken'])
+ );
+ if($r) {
+ $x = channelx_by_n($r[0]['atoken_uid']);
+ if($x) {
+ goaway(z_root() . '/channel/' . $x['channel_address']);
+ }
+ }
+ }
+
if(get_account_id() && ! $splash) {
goaway(z_root() . '/new_channel');
diff --git a/Zotlabs/Module/Lockview.php b/Zotlabs/Module/Lockview.php
index 4776e1c56..d86a3c1d8 100644
--- a/Zotlabs/Module/Lockview.php
+++ b/Zotlabs/Module/Lockview.php
@@ -1,17 +1,31 @@
1) ? argv(1) : 0);
if (is_numeric($type)) {
$item_id = intval($type);
$type='item';
- } else {
+ }
+ else {
$item_id = ((argc() > 2) ? intval(argv(2)) : 0);
}
@@ -98,6 +112,13 @@ class Lockview extends \Zotlabs\Web\Controller {
if($r)
foreach($r as $rr)
$l[] = '