aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-09-28 09:27:59 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-09-28 09:27:59 +0200
commitdccd2da3563389a37ccddbb166bbb3b5ed3a0124 (patch)
tree31b646818c906339f01bd4538aee7364f5ef8c9d
parente986fc3e301f2a0cfb3b975fe60974fc5dcfd76b (diff)
parent44d7c6aac3548e94e35aed87ba7c06b04f374fc2 (diff)
downloadvolse-hubzilla-dccd2da3563389a37ccddbb166bbb3b5ed3a0124.tar.gz
volse-hubzilla-dccd2da3563389a37ccddbb166bbb3b5ed3a0124.tar.bz2
volse-hubzilla-dccd2da3563389a37ccddbb166bbb3b5ed3a0124.zip
Merge remote-tracking branch 'friendika/master'
-rw-r--r--boot.php4
-rw-r--r--include/diaspora.php3
-rw-r--r--include/items.php3
-rw-r--r--include/salmon.php3
-rw-r--r--js/acl.js4
-rw-r--r--mod/acl.php8
-rw-r--r--mod/friendika.php1
-rw-r--r--mod/hostxrd.php4
-rw-r--r--mod/xrd.php4
-rw-r--r--view/theme/duepuntozero/style.css4
-rw-r--r--view/theme/duepuntozero/wall_item.tpl2
-rw-r--r--view/theme/duepuntozero/wallwall_item.tpl2
-rw-r--r--view/theme/loozah/style.css1
-rw-r--r--view/xrd_host.tpl4
-rw-r--r--view/xrd_person.tpl6
15 files changed, 40 insertions, 13 deletions
diff --git a/boot.php b/boot.php
index 5b32e0573..24f965283 100644
--- a/boot.php
+++ b/boot.php
@@ -7,8 +7,8 @@ require_once('include/text.php');
require_once("include/pgettext.php");
require_once('include/nav.php');
-
-define ( 'FRIENDIKA_VERSION', '2.3.1116' );
+define ( 'FRIENDIKA_PLATFORM', 'Free Friendika');
+define ( 'FRIENDIKA_VERSION', '2.3.1117' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1092 );
diff --git a/include/diaspora.php b/include/diaspora.php
index 5b51314ac..1ae8ca800 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1267,7 +1267,7 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch) {
$return_code = $a->get_curl_code();
logger('diaspora_transmit: ' . $logid . ' returns: ' . $return_code);
- if(! $return_code) {
+ if((! $return_code) || (($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after')))) {
logger('diaspora_transmit: queue message');
// queue message for redelivery
q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`,`batch`)
@@ -1280,5 +1280,6 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch) {
);
}
+
return(($return_code) ? $return_code : (-1));
}
diff --git a/include/items.php b/include/items.php
index da5a18cad..a1baf7471 100644
--- a/include/items.php
+++ b/include/items.php
@@ -1042,6 +1042,9 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if((! $curl_stat) || (! strlen($xml)))
return(-1); // timed out
+ if(($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after')))
+ return(-1);
+
if(strpos($xml,'<?xml') === false) {
logger('dfrn_deliver: phase 2: no valid XML returned');
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
diff --git a/include/salmon.php b/include/salmon.php
index 9153f8994..3d525f51a 100644
--- a/include/salmon.php
+++ b/include/salmon.php
@@ -187,6 +187,9 @@ EOT;
logger('slapper returned ' . $return_code);
if(! $return_code)
return(-1);
+ if(($return_code == 503) && (stristr($a->get_curl_headers(),'retry-after')))
+ return(-1);
+
return ((($return_code >= 200) && ($return_code < 300)) ? 0 : 1);
}
diff --git a/js/acl.js b/js/acl.js
index ba6c6af73..b270adb6e 100644
--- a/js/acl.js
+++ b/js/acl.js
@@ -235,8 +235,8 @@ ACL.prototype.populate = function(data){
var height = Math.ceil(data.tot / that.nw) * 42;
that.list_content.height(height);
$(data.items).each(function(){
- html = "<div class='acl-list-item {4} {5}' id='{2}{3}'>"+that.item_tpl+"</div>";
- html = html.format( this.photo, this.name, this.type, this.id, '', this.network );
+ html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
+ html = html.format( this.photo, this.name, this.type, this.id, '', this.network, this.link );
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
//console.log(html);
that.list_content.append(html);
diff --git a/mod/acl.php b/mod/acl.php
index cb5959a95..f2d2456a6 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -53,12 +53,13 @@ function acl_init(&$a){
"photo" => "images/default-group-mm.png",
"name" => $g['name'],
"id" => intval($g['id']),
- "uids" => array_map("intval", explode(",",$g['uids']))
+ "uids" => array_map("intval", explode(",",$g['uids'])),
+ "link" => ''
);
}
- $r = q("SELECT `id`, `name`, `micro`, `network` FROM `contact`
+ $r = q("SELECT `id`, `name`, `micro`, `network`, `url` FROM `contact`
WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != ''
$sql_extra
ORDER BY `name` ASC ",
@@ -70,7 +71,8 @@ function acl_init(&$a){
"photo" => $g['micro'],
"name" => $g['name'],
"id" => intval($g['id']),
- "network" => $g['network']
+ "network" => $g['network'],
+ "link" => $g['url'],
);
}
diff --git a/mod/friendika.php b/mod/friendika.php
index c5d7de59f..b12110bd5 100644
--- a/mod/friendika.php
+++ b/mod/friendika.php
@@ -21,6 +21,7 @@ function friendika_init(&$a) {
'register_policy' => $register_policy[$a->config['register_policy']],
'admin' => $admin,
'site_name' => $a->config['sitename'],
+ 'platform' => FRIENDIKA_PLATFORM,
'info' => ((x($a->config,'info')) ? $a->config['info'] : '')
);
diff --git a/mod/hostxrd.php b/mod/hostxrd.php
index 1cc18da7a..e057cccad 100644
--- a/mod/hostxrd.php
+++ b/mod/hostxrd.php
@@ -1,11 +1,13 @@
<?php
+require_once('include/crypto.php');
+
function hostxrd_init(&$a) {
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
$tpl = file_get_contents('view/xrd_host.tpl');
echo str_replace(array(
- '$zroot','$domain','$zot_post'),array(z_root(),z_path(),z_root() . '/post'),$tpl);
+ '$zroot','$domain','$zot_post','$bigkey'),array(z_root(),z_path(),z_root() . '/post', salmon_key(get_config('system','site_pubkey'))),$tpl);
session_write_close();
exit();
diff --git a/mod/xrd.php b/mod/xrd.php
index dae6e4828..a416a2cf3 100644
--- a/mod/xrd.php
+++ b/mod/xrd.php
@@ -41,6 +41,7 @@ function xrd_init(&$a) {
$tpl = file_get_contents('view/xrd_person.tpl');
$o = replace_macros($tpl, array(
+ '$nick' => $r[0]['nickname'],
'$accturi' => $uri,
'$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'],
'$hcard_url' => $a->get_baseurl() . '/hcard/' . $r[0]['nickname'],
@@ -50,7 +51,8 @@ function xrd_init(&$a) {
'$dspr' => $dspr,
'$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'],
'$salmen' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'] . '/mention',
- '$modexp' => 'data:application/magic-public-key,' . $salmon_key
+ '$modexp' => 'data:application/magic-public-key,' . $salmon_key,
+ '$bigkey' => salmon_key($r[0]['pubkey'])
));
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index b0aa99a97..1bdd4a99f 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -507,6 +507,10 @@ input#dfrn-url {
margin-bottom: 30px;
}
+#profile-extra-links {
+ clear: both;
+}
+
#profile-extra-links ul {
list-style-type: none;
padding: 0px;
diff --git a/view/theme/duepuntozero/wall_item.tpl b/view/theme/duepuntozero/wall_item.tpl
index a81eda765..876f1fc72 100644
--- a/view/theme/duepuntozero/wall_item.tpl
+++ b/view/theme/duepuntozero/wall_item.tpl
@@ -16,7 +16,7 @@
</div>
<div class="wall-item-photo-end"></div>
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
- $lock
+ {{ if $lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$id);" title="$lock"></span>{{ endif }}
<div class="wall-item-location" id="wall-item-location-$id">$location</div>
</div>
</div>
diff --git a/view/theme/duepuntozero/wallwall_item.tpl b/view/theme/duepuntozero/wallwall_item.tpl
index a958ba65a..6403b5201 100644
--- a/view/theme/duepuntozero/wallwall_item.tpl
+++ b/view/theme/duepuntozero/wallwall_item.tpl
@@ -21,7 +21,7 @@
</div>
<div class="wall-item-photo-end"></div>
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
- $lock
+ {{ if $lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$id);" title="$lock"></span>{{ endif }}
<div class="wall-item-location" id="wall-item-location-$id">$location</div>
</div>
</div>
diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css
index 9289c9354..962d08fc0 100644
--- a/view/theme/loozah/style.css
+++ b/view/theme/loozah/style.css
@@ -406,6 +406,7 @@ nav {
}
#profile-extra-links {
+ clear: both;
margin-top: 20px;
margin-bottom: 20px;
margin-left: 20px;
diff --git a/view/xrd_host.tpl b/view/xrd_host.tpl
index ee687ffa9..d27f948ac 100644
--- a/view/xrd_host.tpl
+++ b/view/xrd_host.tpl
@@ -21,5 +21,9 @@
type="http://purl.org/zot/1.0/accept"
zot:accept="application/atom+xml" />
+ <Property xmlns:mk="http://salmon-protocol.org/ns/magic-key"
+ type="http://salmon-protocol.org/ns/magic-key"
+ mk:key_id="1">$bigkey</Property>
+
</XRD>
diff --git a/view/xrd_person.tpl b/view/xrd_person.tpl
index 7373499bf..2b5af3d0d 100644
--- a/view/xrd_person.tpl
+++ b/view/xrd_person.tpl
@@ -5,7 +5,7 @@
<Alias>$accturi</Alias>
<Alias>$profile_url</Alias>
- <Link rel="http://purl.org/zot/1.0/post"
+ <Link rel="http://purl.org/zot/1.0/post/$nick"
href="$zot_post" />
<Property xmlns:zot="http://purl.og/zot/1.0"
@@ -40,4 +40,8 @@
<Link rel="magic-public-key"
href="$modexp" />
+ <Property xmlns:mk="http://salmon-protocol.org/ns/magic-key"
+ type="http://salmon-protocol.org/ns/magic-key"
+ mk:key_id="1">$bigkey</Property>
+
</XRD>