*/
public static function store_like_signature($contact, $post_id) {
- $enabled = intval(get_config('system','diaspora_enabled'));
- if (!$enabled) {
- logger('Diaspora support disabled, not storing like signature', LOGGER_DEBUG);
- return false;
- }
-
// Is the contact the owner? Then fetch the private key
if (!$contact['self'] OR ($contact['uid'] == 0)) {
logger("No owner post, so not storing signature", LOGGER_DEBUG);
return false;
}
- $enabled = intval(get_config('system','diaspora_enabled'));
- if (!$enabled) {
- logger('Diaspora support disabled, not storing comment signature', LOGGER_DEBUG);
- return false;
- }
-
$contact["uprvkey"] = $uprvkey;
$message = self::construct_comment($item, $contact);
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
- if(get_config('system','diaspora_enabled')) {
- $tpl = get_markup_template('xrd_diaspora.tpl');
- $dspr = replace_macros($tpl,array(
- '$baseurl' => $a->get_baseurl(),
- '$dspr_guid' => $r[0]['guid'],
- '$dspr_key' => base64_encode(pemtorsa($r[0]['pubkey']))
- ));
- }
- else
- $dspr = '';
+ $tpl = get_markup_template('xrd_diaspora.tpl');
+ $dspr = replace_macros($tpl,array(
+ '$baseurl' => $a->get_baseurl(),
+ '$dspr_guid' => $r[0]['guid'],
+ '$dspr_key' => base64_encode(pemtorsa($r[0]['pubkey']))
+ ));
$tpl = get_markup_template('xrd_person.tpl');