Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge

This commit is contained in:
zotlabs 2017-02-12 17:40:45 -08:00
commit 7c72886b1b
4 changed files with 30 additions and 19 deletions

View File

@ -32,7 +32,7 @@ The $Projectname software stack is a relatively standard webserver application w
[*= nomadic identity] The ability to authenticate and easily migrate an identity across independent hubs and web domains. Nomadic identity provides true ownership of an online identity, because the identities of the channels controlled by an account on a hub are not tied to the hub itself. A hub is more like a "host" for channels. With Hubzilla, you don't have an "account" on a server like you do on typical websites; you own an identity that you can take with you across the grid by using clones. [*= nomadic identity] The ability to authenticate and easily migrate an identity across independent hubs and web domains. Nomadic identity provides true ownership of an online identity, because the identities of the channels controlled by an account on a hub are not tied to the hub itself. A hub is more like a "host" for channels. With Hubzilla, you don't have an "account" on a server like you do on typical websites; you own an identity that you can take with you across the grid by using clones.
[*= [url=[baseurl]/help/developer/api_zot]Zot[/url]] The novel JSON-based protocol for implementing secure decentralised communications and services. It differs from many other communication protocols by building communications on top of a decentralised identity and authentication framework. The authentication component is similar to OpenID conceptually but is insulated from DNS-based identities. Where possible remote authentication is silent and invisible. This provides a mechanism for internet-scale distributed access control which is unobtrusive. [*= [url=[baseurl]/help/developer/zot_protocol]Zot[/url]] The novel JSON-based protocol for implementing secure decentralised communications and services. It differs from many other communication protocols by building communications on top of a decentralised identity and authentication framework. The authentication component is similar to OpenID conceptually but is insulated from DNS-based identities. Where possible remote authentication is silent and invisible. This provides a mechanism for internet-scale distributed access control which is unobtrusive.
[/dl] [/dl]
[h3]Features[/h3] [h3]Features[/h3]

View File

@ -74,7 +74,7 @@
$(".panel-collapse.in").find('a').each(function(){ $(".panel-collapse.in").find('a').each(function(){
var url = document.createElement('a'); var url = document.createElement('a');
url.href = window.location; url.href = window.location;
var pageName = url.href.split('/').pop().split('#').shift(); var pageName = url.href.split('/').pop().split('#').shift().split('?').shift();
var linkName = $(this).attr('href').split('/').pop(); var linkName = $(this).attr('href').split('/').pop();
if(pageName === linkName) { if(pageName === linkName) {
var tocUl = $(this).closest('li').append('<ul>').find('ul'); var tocUl = $(this).closest('li').append('<ul>').find('ul');
@ -116,8 +116,15 @@
// When the page loads, it does not scroll to the section specified in the URL because it // When the page loads, it does not scroll to the section specified in the URL because it
// has not been constructed yet by the script. This will reload the URL // has not been constructed yet by the script. This will reload the URL
if (typeof(location.href.split('#')[1]) !== 'undefined') { if (typeof(location.href.split('#')[1]) !== 'undefined') {
location.replace(location.href) var p = document.createElement('a');
p.href = location.href;
var portstr = '';
if(p.port !== '') {
portstr = ':'+ p.port;
}
var newref = p.protocol + '//'+ p.hostname + portstr + p.pathname + p.hash.split('?').shift();
location.replace(newref)
} }
}); });
</script> </script>

View File

@ -1315,7 +1315,7 @@ function import_webpage_element($element, $channel, $type) {
return null; // return null if invalid element type return null; // return null if invalid element type
} }
$arr['uid'] = $channel['channel_id']; $arr['uid'] = local_channel();
$arr['aid'] = $channel['channel_account_id']; $arr['aid'] = $channel['channel_account_id'];
// Check if an item already exists based on the name // Check if an item already exists based on the name
@ -1376,36 +1376,40 @@ function import_webpage_element($element, $channel, $type) {
} }
} }
$z = q("select * from iconfig where v = '%s' and k = '%s' and cat = 'system' limit 1", // $z = q("select * from iconfig where v = '%s' and k = '%s' and cat = 'system' limit 1",
dbesc($name), // dbesc($name),
dbesc($namespace) // dbesc($namespace)
); // );
$i = q("select id, edited, item_deleted from item where mid = '%s' and uid = %d limit 1", $i = q("select id, edited, item_deleted from item where mid = '%s' and uid = %d limit 1",
dbesc($arr['mid']), dbesc($arr['mid']),
intval(local_channel()) intval(local_channel())
); );
$remote_id = 0;
if($z && $i) { \Zotlabs\Lib\IConfig::Set($arr,'system',$namespace,(($name) ? $name : substr($arr['mid'],0,16)),true);
$remote_id = $z[0]['id'];
if($i) {
$arr['id'] = $i[0]['id']; $arr['id'] = $i[0]['id'];
// don't update if it has the same timestamp as the original // don't update if it has the same timestamp as the original
if($arr['edited'] > $i[0]['edited']) if($arr['edited'] > $i[0]['edited'])
$x = item_store_update($arr, $execflag); $x = item_store_update($arr,$execflag);
} }
else { else {
if(($i) && (intval($i[0]['item_deleted']))) { if(($i) && (intval($i[0]['item_deleted']))) {
// was partially deleted already, finish it off // was partially deleted already, finish it off
q("delete from item where mid = '%s' and uid = %d", q("delete from item where mid = '%s' and uid = %d",
dbesc($arr['mid']), dbesc($arr['mid']),
intval(local_channel()) intval(local_channel())
); );
} }
$x = item_store($arr, $execflag); else
$x = item_store($arr,$execflag);
} }
if($x['success']) {
if($x && $x['success']) {
$item_id = $x['item_id']; $item_id = $x['item_id'];
update_remote_id($channel, $item_id, $arr['item_type'], $name, $namespace, $remote_id, $arr['mid']); //update_remote_id($channel, $item_id, $arr['item_type'], $name, $namespace, $remote_id, $arr['mid']);
$element['import_success'] = 1; $element['import_success'] = 1;
} }
else { else {

View File

@ -252,7 +252,7 @@ header #banner #logo-text {
display: block; display: block;
position: fixed; position: fixed;
top: 51px; top: 51px;
width: 100%; left: 0px;
max-height: 50%; max-height: 50%;
background: $comment_item_colour; background: $comment_item_colour;
padding: 20px; padding: 20px;