Merge remote-tracking branch 'friendica/master'

This commit is contained in:
Fabio Comuni 2011-12-22 16:35:58 +01:00
commit 0dce36bdbc
3 changed files with 19 additions and 7 deletions

View file

@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php'); require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1201' ); define ( 'FRIENDICA_VERSION', '2.3.1202' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1112 ); define ( 'DB_UPDATE_VERSION', 1112 );

View file

@ -69,7 +69,7 @@ function diaspora_dispatch($importer,$msg) {
$ret = diaspora_retraction($importer,$xmlbase->retraction,$msg); $ret = diaspora_retraction($importer,$xmlbase->retraction,$msg);
} }
elseif($xmlbase->signed_retraction) { elseif($xmlbase->signed_retraction) {
$ret = diaspora_signed_retraction($importer,$xmlbase->retraction,$msg); $ret = diaspora_signed_retraction($importer,$xmlbase->signed_retraction,$msg);
} }
elseif($xmlbase->photo) { elseif($xmlbase->photo) {
$ret = diaspora_photo($importer,$xmlbase->photo,$msg); $ret = diaspora_photo($importer,$xmlbase->photo,$msg);
@ -1569,6 +1569,7 @@ EOT;
function diaspora_retraction($importer,$xml) { function diaspora_retraction($importer,$xml) {
$guid = notags(unxmlify($xml->guid)); $guid = notags(unxmlify($xml->guid));
$diaspora_handle = notags(unxmlify($xml->diaspora_handle)); $diaspora_handle = notags(unxmlify($xml->diaspora_handle));
$type = notags(unxmlify($xml->type)); $type = notags(unxmlify($xml->type));
@ -1600,7 +1601,8 @@ function diaspora_retraction($importer,$xml) {
// NOTREACHED // NOTREACHED
} }
function diaspora_signed_retraction($importer,$xml) { function diaspora_signed_retraction($importer,$xml,$msg) {
$guid = notags(unxmlify($xml->target_guid)); $guid = notags(unxmlify($xml->target_guid));
$diaspora_handle = notags(unxmlify($xml->sender_handle)); $diaspora_handle = notags(unxmlify($xml->sender_handle));
@ -1608,8 +1610,10 @@ function diaspora_signed_retraction($importer,$xml) {
$sig = notags(unxmlify($xml->target_author_signature)); $sig = notags(unxmlify($xml->target_author_signature));
$contact = diaspora_get_contact_by_handle($importer['uid'],$diaspora_handle); $contact = diaspora_get_contact_by_handle($importer['uid'],$diaspora_handle);
if(! $contact) if(! $contact) {
logger('diaspora_signed_retraction: no contact');
return; return;
}
// this may not yet work for comments. Need to see how the relaying works // this may not yet work for comments. Need to see how the relaying works
// and figure out who signs it. // and figure out who signs it.
@ -1628,7 +1632,7 @@ function diaspora_signed_retraction($importer,$xml) {
if($type === 'StatusMessage') { if($type === 'StatusMessage') {
$r = q("select * from item where guid = '%s' and uid = %d limit 1", $r = q("select * from item where guid = '%s' and uid = %d limit 1",
dbesc('guid'), dbesc($guid),
intval($importer['uid']) intval($importer['uid'])
); );
if(count($r)) { if(count($r)) {
@ -1640,6 +1644,8 @@ function diaspora_signed_retraction($importer,$xml) {
} }
} }
} }
else
logger('diaspora_signed_retraction: unknown type: ' . $type);
return 202; return 202;
// NOTREACHED // NOTREACHED

View file

@ -200,8 +200,14 @@ ACL.prototype.update_view = function(){
$(that.group_uids[id]).each(function(i,v) { $(that.group_uids[id]).each(function(i,v) {
if(uclass == "grouphide") if(uclass == "grouphide")
$("#c"+v).removeClass("groupshow"); $("#c"+v).removeClass("groupshow");
if(uclass != "") if(uclass != "") {
$("#c"+v).addClass(uclass); var cls = $("#c"+v).attr('class');
if( cls == undefined)
return true;
var hiding = cls.indexOf('grouphide');
if(hiding == -1)
$("#c"+v).addClass(uclass);
}
}); });
break; break;