Commit dec18d28 authored by Mario's avatar Mario

Merge branch '3.6RC'

parents 2addc204 bc253ed4
version: 1
url: $baseurl/cart
requires: local_channel
name: Cart
photo: $baseurl/addon/cart/view/img/cart.png
photo: icon:shopping-cart
categories: E-Commerce
This diff is collapsed.
This diff is collapsed.
......@@ -12,7 +12,7 @@ function cart_post_manual_checkout_confirm () {
cart_do_checkout ($order);
cart_do_checkout_after ($order);
//cart_do_fulfill ($order); //No auto fulfillment on manual payments.
//goaway(z_root() . '/cart/' . argv(1) . '/checkout/complete');
goaway(z_root() . '/cart/' . argv(1) . '/order/' . $orderhash);
}
function cart_checkout_complete (&$hookdata) {
......@@ -22,6 +22,7 @@ function cart_checkout_complete (&$hookdata) {
function cart_checkout_manual (&$hookdata) {
$page_uid = ((App::$profile_uid) ? App::$profile_uid : local_channel());
$nick = App::$profile['channel_address'];
$manualpayments = get_pconfig($page_uid,'cart','enable_manual_payments');
$manualpayments = isset($manualpayments) ? $manualpayments : false;
......@@ -38,12 +39,15 @@ function cart_checkout_manual (&$hookdata) {
}
$order = cart_loadorder($orderhash);
call_hooks('cart_calc_totals',$order);
$manualpayopts = get_pconfig($page_uid,'cart','manual_payopts');
$manualpayopts["order_hash"]=$orderhash;
$order["payopts"]=$manualpayopts;
$order["finishedtext"]=t("Finished");
$order["finishedurl"]= z_root() . '/cart/' . $nick;
$order["links"]["checkoutlink"] = z_root() . '/cart/' . $nick . '/checkout/start?cart='.$order["order_hash"];
$template = get_markup_template('basic_checkout_manual_confirm.tpl','addon/cart/');
call_hooks("cart_display_before",$order);
$display = replace_macros($template, $order);
$hookdata["checkoutdisplay"] = $display;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
{{include file="../../../view/tpl/basic_cart.tpl"}}
<div class="section-content-wrapper">
{{if !$order.checkedout}}
<div class="clearfix">
<div id="paypal-button" class="float-left mr-2"></div>
<a href="{{$links.checkoutlink}}" class="float-left p-1">Back to Payment Options</a>
</div>
<script>
paypal.Button.render({
env: '{{$paypalenv}}',
payment: function(data, actions) {
return actions.request.post('{{$buttonhook}}_create')
.then(function(res) {
return res.id;
});
},
onAuthorize: function(data, actions) {
return actions.request.post('{{$buttonhook}}_execute', {
paymentID: data.paymentID,
payerID: data.payerID
}).then(function () {window.location = '{{$finishedurl}}';});
}
}, '#paypal-button');
</script>
{{else}}
<h3>This order has been confirmed and is awaiting payment.</h3>
<h4><a href="{{$finishedurl}}">{{$finishedtext}}</a></h4>
{{/if}}
</div>
</div>
<form id="cart-hzservices-itemadmin-form" method="GET">
<div>
<ul>
{{foreach $skus as $sku}}
<button id="deactivatecommands-submit" class="btn btn-primary" type="submit" name="SKU" value="{{$sku.item_sku}}">{{$sku.item_sku}}</button> - {{$sku.item_desc}}<BR>
{{/foreach}}
</ul>
</div>
</form>
<div id="cart-hzservices-itemadmin-wrapper">
<h3>Hubzilla Services Administration</h3>
<div id="cart-hzservices-itemadmin-form-wrapper">
<form class="cart-hzservices-itemadmin-form" method="get">
<input type=hidden name="form_security_token" value="{{$security_token}}">
{{$formelements}}
</form>
</div>
<div id="cart-hzservices-itemadmin-skulist-wrapper">
{{$skulist}}
</div>
</div>
<div id="cart-hzservices-edititem-wrapper">
<h3>Edit Item: {{$sku}}</h3>
<div id="cart-hzservices-itemdetails-wrapper"><div class="panel panel-default">
<div class="panel-heading"><div class="panel-title">
<h4><a data-toggle="collapse" data-parent="#cart-hzservices-itemedit-wrapper" href="#itemdetails">Item Details</a></h4>
</div></div>
<div id="itemdetails" class="panel-collapse collapse in"><div id="cart-hzservices-edititem-form-wrapper">
<h1>Item Details</h1>
<form id="cart-hzservices-edititem-form" method="post" action="{{$formelements.uri}}">
<input type=hidden name="form_security_token" value="{{$security_token}}">
<input type=hidden name="cart_posthook" value="hzservices_itemedit">
<input type=hidden name="SKU" value="{{$sku}}">
{{$formelements.itemdetails}}
{{$formelements.item}}
<button id="itemdetails-submit" class="btn btn-primary" type="submit" name="submit" >{{$formelements.submit}}</button>
</form>
</div></div>
</div></div>
<div id="cart-hzservices-itemactivatecommands-wrapper"><div class="panel panel-default">
<div class="panel-heading"><div class="panel-title">
<h4><a data-toggle="collapse" data-parent="#cart-hzservices-itemedit-wrapper" href="#activatecommands">Activation Commands</a></h4>
</div></div>
<div id="activatecommands" class="panel-collapse collapse"><div id="cart-hzservices-edititem-form-wrapper">
<h1>Activation Commands</h1>
<form id="cart-hzservices-edititem-activation-form" method="post" action="{{$formelements.uri}}">
<input type=hidden name="form_security_token" value="{{$security_token}}">
<input type=hidden name="cart_posthook" value="hzservices_itemactivation">
<input type=hidden name="SKU" value="{{$sku}}">
{{$formelements.itemactivation}}
<button id="activatecommands-submit" class="btn btn-primary" type="submit" name="submit" >{{$formelements.submit}}</button>
{{$formelements.activate_commands}}
</form>
</div></div>
</div></div>
<div id="cart-hzservices-itemdeactivatecommands-wrapper"><div class="panel panel-default">
<div class="panel-heading"><div class="panel-title">
<h4><a data-toggle="collapse" data-parent="#cart-hzservices-itemedit-wrapper" href="#deactivatecommands">Deactivation Commands</a></h4>
</div></div>
<div id="deactivatecommands" class="panel-collapse collapse"><div id="cart-hzservices-edititem-form-wrapper">
<h1>Deactivation Commands</h1>
<form id="cart-hzservices-edititem-deactivation-form" method="post" action="{{$formelements.uri}}">
<input type=hidden name="form_security_token" value="{{$security_token}}">
<input type=hidden name="cart_posthook" value="hzservices_itemdeactivation">
<input type=hidden name="SKU" value="{{$sku}}">
{{$formelements.itemdeactivation}}
<button id="deactivatecommands-submit" class="btn btn-primary" type="submit" name="submit" >{{$formelements.submit}}</button>
{{$formelements.deactivate_commands}}
</form>
</div></div>
</div></div>
</div>
<div>
<h3>Paypal Transactions</h3>
<ul>
{{foreach $transactions as $transaction}}
<li><b>{{$transaction.amount}} ({{$transaction.currency}})</b> | {{$transaction.intent}} - {{$transaction.state}} | {{$transaction.timestamp}} | <i>{{$transaction.payer}}</i> </li>
{{/foreach}}
</ul>
</div>
<h1>CART CONTENTS</h1>
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<h2>CART CONTENTS</h2>
</div>
<div class="section-subtitle-wrapper">
<h3>{{if $title}}{{$title}}{{else}}Order{{/if}}</h3>
</div>
<div class="section-content-wrapper">
<form id="cart_form" method="post">
<input type="hidden" name="cart_posthook" value="update_item">
<table class="w-100">
<tr>
<th width=10%>Qty</th>
<th width=50%>Description</th>
<th width=20% style="text-align:right;">Price each {{if $currencysymbol}}({{$currencysymbol}}){{/if}}</th>
<th width=20% style="text-align:right;">Extended</th>
</tr>
{{foreach $items as $item}}
<tr>
<td>
{{if $order_checkedout}}
{{$item.item_qty}}
{{else}}
<input class="form-control form-control-sm" type="text" name="qty-{{$item.id}}" value="{{$item.item_qty}}" style="min-width: 4em;">
{{/if}}
</td>
<td>{{$item.item_desc}}</td>
<td style="text-align:right;">{{$item.item_price}}</td>
<td style="text-align:right;">{{$item.extended}}</td>
</tr>
{{/foreach}}
<tr>
<td colspan=4>
{{if !$order_checkedout}}
<button id="cart_update" class="btn btn-success btn-sm invisible" type="submit" name="Submit" title="Update Cart"><i class="fa fa-check"></i> Save Changes</button>
{{/if}}
</td>
</tr>
<div class="dm42cart catalog" style="width:100%;">
<div class='section-title-wrapper'>
<div class="title">{{if $title}}{{$title}}{{else}}Order{{/if}}</div>
</div>
<div class='section-content-wrapper' style="width:100%;">
<table style="width:100%;">
<tr>
<th width=60%>Description</th>
<th width=20% style="text-align:right;">Price each {{if $currencysymbol}}({{$currencysymbol}}){{/if}}</th>
<th width=20% style="text-align:right;">Extended</th>
</tr>
{{foreach $items as $item}}
<tr>
<td>{{$item.item_desc}}</td>
<td style="text-align:right;">{{$item.item_price}}</td>
<td style="text-align:right;">{{$item.extended}}</td>
</tr>
{{/foreach}}
<tr>
<td></td>
<th style="text-align:right;">Subtotal</th>
<td style="text-align:right;">{{$totals.Subtotal}}</td>
</tr>
<tr>
<td></td>
<th style="text-align:right;">Tax Total</th>
<td style="text-align:right;">{{$totals.Tax}}</td>
</tr>
<tr>
<td></td>
<th style="text-align:right;">Order Total</th>
<td style="text-align:right;">{{$totals.OrderTotal}}</td>
</tr>
{{if $totals.Payment}}
<tr>
<td></td>
<th>Payment</th>
<td style="text-align:right;">{{$totals.Payment}}</td>
</tr>
{{/if}}
</table>
</div>
</div>
<tr>
<td></td><td></td>
<th style="text-align:right;">Subtotal</th>
<td style="text-align:right;">{{$totals.Subtotal}}</td>
</tr>
<tr>
<td></td><td></td>
<th style="text-align:right;">Tax Total</th>
<td style="text-align:right;">{{$totals.Tax}}</td>
</tr>
<tr>
<td></td><td></td>
<th style="text-align:right;">Order Total</th>
<td style="text-align:right;">{{$totals.OrderTotal}}</td>
</tr>
{{if $totals.Payment}}
<tr>
<td></td>
<th>Payment</th>
<td style="text-align:right;">{{$totals.Payment}}</td>
</tr>
{{/if}}
</table>
</form>
<script>
$('#cart_form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] });
$('#cart_form').on('dirty.areYouSure', function() {
$('#cart_update').removeClass('invisible');
});
</script>
</div>
<!-- basic_checkout_*.tpl -->
<div class="dm42cart catalog">
<div class='section-title-wrapper'>
<div class="title">{{if $title}}{{$title}}{{else}}Catalog{{/if}}</div>
</div>
<div class='section-content-wrapper'>
<form method="post">
<input type="hidden" name="cart_posthook" value="add_item">
<table>
<tr>
<th></th>
<th>Description</th>
<th>Price each {{if $currencysymbol}}({{$currencysymbol}}){{/if}}</th>
</tr>
{{foreach $items as $item}}
<tr>
<td><button class="btn btn-primary" type="submit" name="add" id="newchannel-submit-button" value="{{$item.item_sku}}">Add</button></td>
<td>{{$item.item_desc}}</td>
<td>{{$item.item_price}}</td>
</tr>
{{/foreach}}
</table>
</form>
</div>
<div class="generic-content-wrapper dm42cart catalog">
<div class="section-title-wrapper clearfix">
{{if $total_qty}}
<a href="cart/{{$sellernick}}/checkout/start" class="btn btn-sm btn-success float-right"><i class="fa fa-shopping-cart"></i> Checkout ({{$total_qty}})</a>
{{/if}}
<h2>{{if $title}}{{$title}}{{else}}Catalog{{/if}}</h2>
</div>
<div class="section-content-wrapper">
<table class="w-100">
<tr>
<th></th>
<th>Description</th>
<th>Price each {{if $currencysymbol}}({{$currencysymbol}}){{/if}}</th>
<th></th>
<th></th>
</tr>
{{foreach $items as $item}}
<tr>
<td>
<form method="post">
<input type="hidden" name="cart_posthook" value="add_item">
<button class="btn btn-primary" type="submit" name="add" value="{{$item.item_sku}}">Add</button>
</form>
</td>
<td>{{$item.item_desc}}</td>
<td>{{$item.item_price}}</td>
<td>{{if $item.order_qty}}<i class="fa fa-shopping-cart"></i> {{$item.order_qty}}{{/if}}</td>
<td>
{{if $item.order_qty}}
<form method="post">
<input type="hidden" name="cart_posthook" value="update_item">
<input type="hidden" name="delsku" value="{{$item.item_sku}}">
<button class="btn btn-outline-danger btn-outline border-0" type="submit" name="remove" title="Remove from cart"><i class="fa fa-remove"></i></button>
</form>
{{/if}}
</td>
</tr>
{{/foreach}}
</table>
</div>
</div>
<center><h1>INVOICE</h1>
<h4>ORDER: {{$order_hash}}</h4>
</center>
{{include file="./basic_cart.tpl"}}
<div class="center">
<p>Print and send a copy of this invoice along with your check
or money order to:</p>
<p>{{$payopts.mailing_address}}</p>
<div class="section-content-wrapper">
<div class="center">
<p>Print and send a copy of this invoice along with your check or money order to:</p>
<p>{{$payopts.mailing_address}}</p>
</div>
{{if !$order.checkedout}}
<form method="post">
<input type=hidden name="cart_posthook" value="manual_checkout_confirm">
<input type=hidden name="orderhash" value="{{$order_hash}}">
<button class="btn btn-primary" type="submit" name="Confirm" id="cart-submit-button" value="Confirm">Confirm Order</button>
<a href="{{$links.checkoutlink}}" class="btn btn-outline-secondary">Back to Payment Options</a>
</form>
{{else}}
<h3>This order has been confirmed and is awaiting payment.</h3>
<h4><a href="{{$finishedurl}}">{{$finishedtext}}</a></h4>
{{/if}}
</div>
</div>
{{if !$order.checkedout}}
<form method="post">
<input type=hidden name="cart_posthook" value="manual_checkout_confirm">
<input type=hidden name="orderhash" value="{{$order_hash}}">
<button class="btn btn-primary" type="submit" name="Confirm" id="cart-submit-button" value="Confirm">Confirm Order</button>
</form>
{{else}}
<h3>This order has been confirmed and is awaiting payment.</h3>
<h4><a href="{{$finishedurl}}">{{$finishedtext}}</a></h4>
{{/if}}
{{include "./basic_cart.tpl"}}
<h1>Payment Options</h1>
<form method="post">
<input type="hidden" name="cart_posthook" value="checkout_choosepayment">
{{foreach from=$paymentopts key=payslug item=payopt}}
<input type="radio" name="paymenttypeslug" value="{{$payslug}}">{{$payopt.html}} <BR>
{{/foreach}}
<button class="btn btn-primary" type="submit" name="add" id="pay" value="pay">Continue with Payment</button>
</form>
{{include "./basic_cart.tpl"}}
<div class="section-subtitle-wrapper">
<h3>Payment Options</h3>
</div>
<div class="section-content-wrapper">
<form method="post">
<input type="hidden" name="cart_posthook" value="checkout_choosepayment">
<div class="form-group">
<select name="paymenttypeslug" class="form-control">
{{foreach from=$paymentopts key=payslug item=payopt}}
<option value="{{$payslug}}">{{$payopt.html}}</option>
{{/foreach}}
</select>
</div>
<div class="form-group">
<button class="btn btn-primary" type="submit" name="add" id="pay" value="pay">Proceed with Payment</button>
<a href="{{$links.cataloglink}}" class="btn btn-outline-secondary">Continue Shopping</a>
</div>
</form>
</div>
</div>
......@@ -75,5 +75,9 @@
</div>
</div>
<div>
{{$added_display.content}}
</div>
</div>
</div>
......@@ -3,14 +3,25 @@
{{else}}
<div><span style="font-weight:bold;">Item Fulfilled</span></div>
{{/if}}
<div class="cart-myshop-itemfulfill-form">
<div style="width:100%;">
<div class="cart-myshop-itemfulfill-form" style="float:left;">
<form method="post">
<input type=hidden name="form_security_token" value="{{$security_token}}">
<input type="hidden" name="cart_posthook" value="myshop_item_fulfill">
<input type="hidden" name="itemid" value="{{$item.id}}">
<button class="btn btn-primary" type="submit" name="cart-myshop-fullfill-item" id="newchannel-submit-button" value="{{$item.item_sku}}">Fulfill</button>
<button class="btn btn-primary" type="submit" name="cart-myshop-fullfill-item" id="item-{{$item.id}}-fulfill-button" value="{{$item.item_sku}}">Fulfill</button>
</form>
</div>
<div class="cart-myshop-itemcancel-form" style="float:left;">
<form method="post">
<input type=hidden name="form_security_token" value="{{$security_token}}">
<input type="hidden" name="cart_posthook" value="myshop_item_cancel">
<input type="hidden" name="itemid" value="{{$item.id}}">
<button class="btn btn-primary" type="submit" name="cart-myshop-cancel-item" id="item-{{$item.id}}-cancel-button" value="{{$item.item_sku}}">Cancel</button>
</form>
</div>
<div style="clear:both;"></div>
</div>
{{if $item.item_fulfilled}}<div class="warning">Warning: May result in duplicate product being sent.</div>{{/if}}
{{if $item.item_exception}}<div class="warning">Item Exception: Please review notes.</div>
<div class="cart-myshop-itemexception-form">
......
......@@ -232,7 +232,7 @@ class Diaspora_Receiver {
}
$body = markdown_to_bb($this->get_body());
$body = markdown_to_bb($this->get_body(), false, [ 'diaspora' => true ]);
// photo could be a single photo or an array of photos.
......@@ -280,7 +280,7 @@ class Diaspora_Receiver {
$ev['summary'] = escape_tags($this->get_property('summary',$event));
$ev['adjust'] = (($this->get_property('all_day',$event)) ? false : true);
$ev_timezone = notags($this->get_property('timezone',$event));
$ev['description'] = markdown_to_bb($this->get_property('description',$event));
$ev['description'] = markdown_to_bb($this->get_property('description',$event), false, [ 'diaspora' => true ]);
$ev_loc = $this->get_property('location',$event);
if($ev_loc) {
$ev_address = escape_tags($this->get_property('address',$ev_loc));
......@@ -311,7 +311,7 @@ class Diaspora_Receiver {
$datarray = array();
// Look for tags and linkify them
$results = linkify_tags('', $body, $this->importer['channel_id'], true);
$results = linkify_tags('', $body, $this->importer['channel_id'], false);
$datarray['term'] = array();
......@@ -358,13 +358,11 @@ class Diaspora_Receiver {
$cnt = preg_match_all('/@\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$body,$matches,PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
// don't include plustags in the term
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = [
'uid' => $this->importer['channel_id'],
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $term,
'term' => $mtch[2],
'url' => $mtch[1]
];
}
......@@ -386,13 +384,11 @@ class Diaspora_Receiver {
$cnt = preg_match_all('/\!\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$body,$matches,PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
// don't include plustags in the term
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = [
'uid' => $this->importer['channel_id'],
'ttype' => TERM_FORUM,
'otype' => TERM_OBJ_POST,
'term' => $term,
'term' => $mtch[2],
'url' => $mtch[1]
];
}
......@@ -448,6 +444,14 @@ class Diaspora_Receiver {
return 202;
}
if($this->importer['system']) {
if(! \Zotlabs\Lib\MessageFilter::evaluate($datarray,get_config('system','pubstream_incl'),get_config('system','pubstream_excl'))) {
logger('diaspora_post: filtering this author.');
return 202;
}
}
// Diaspora allows anybody to comment on public posts in theory
// In fact the comment will be rejected unless it is correctly signed
......@@ -519,7 +523,7 @@ class Diaspora_Receiver {
$orig_url = 'https://'.substr($orig_author,strpos($orig_author,'@')+1).'/'.$orig_url_arg.'/'.$orig_guid;
if($text)
$text = markdown_to_bb($text) . "\n";
$text = markdown_to_bb($text, false, [ 'diaspora' => true ]) . "\n";
else
$text = '';
......@@ -527,7 +531,7 @@ class Diaspora_Receiver {
$source_xml = get_diaspora_reshare_xml($source_url);
if($source_xml['status_message']) {
$body = markdown_to_bb($this->get_body($source_xml['status_message']));
$body = markdown_to_bb($this->get_body($source_xml['status_message']), false, [ 'diaspora' => true ]);
$orig_author = $this->get_author($source_xml['status_message']);
$orig_guid = notags($this->get_property('guid',$source_xml['status_message']));
......@@ -576,7 +580,7 @@ class Diaspora_Receiver {
$datarray = array();
// Look for tags and linkify them
$results = linkify_tags('', $body, $this->importer['channel_id'], true);
$results = linkify_tags('', $body, $this->importer['channel_id'], false);
$datarray['term'] = array();
......@@ -611,13 +615,11 @@ class Diaspora_Receiver {
$cnt = preg_match_all('/@\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$body,$matches,PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
// don't include plustags in the term
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = array(
'uid' => $this->importer['channel_id'],
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $term,
'term' => $mtch[2],
'url' => $mtch[1]
);
}
......@@ -652,6 +654,15 @@ class Diaspora_Receiver {
logger('diaspora_reshare: Ignoring this author.');
return 202;
}
if($this->importer['system']) {
if(! \Zotlabs\Lib\MessageFilter::evaluate($datarray,get_config('system','pubstream_incl'),get_config('system','pubstream_excl'))) {
logger('diaspora_reshare: filtering this author.');
return 202;
}
}
if(! post_is_importable($datarray,$contact)) {
logger('diaspora_reshare: filtering this author.');
......@@ -841,7 +852,7 @@ class Diaspora_Receiver {
return;
}
$body = markdown_to_bb($text);
$body = markdown_to_bb($text, false, [ 'diaspora' => true ]);
$maxlen = get_max_import_size();
......@@ -853,7 +864,7 @@ class Diaspora_Receiver {
$datarray = array();
// Look for tags and linkify them
$results = linkify_tags('', $body, $this->importer['channel_id'], true);
$results = linkify_tags('', $body, $this->importer['channel_id'], false);
$datarray['term'] = array();
......@@ -888,13 +899,11 @@ class Diaspora_Receiver {
$cnt = preg_match_all('/@\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$body,$matches,PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
// don't include plustags in the term
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = [
'uid' => $this->importer['channel_id'],
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $term,
'term' => $mtch[2],
'url' => $mtch[1]
];
}
......@@ -955,6 +964,17 @@ class Diaspora_Receiver {
return 202;
}
if($this->importer['system']) {
if(! \Zotlabs\Lib\MessageFilter::evaluate($datarray,get_config('system','pubstream_incl'),get_config('system','pubstream_excl'))) {
logger('diaspora_comment: filtering this author.');
return 202;
}
}
set_iconfig($datarray,'diaspora','fields',$unxml,true);
if($editing) {
......@@ -1073,7 +1093,7 @@ class Diaspora_Receiver {
continue;
}
$body = markdown_to_bb($msg_text);
$body = markdown_to_bb($msg_text, false, [ 'diaspora' => true ]);
$maxlen = get_max_import_size();
......@@ -1216,7 +1236,7 @@ class Diaspora_Receiver {
$reply = 0;
$subject = $conversation['subject']; //this is already encoded
$body = markdown_to_bb($msg_text);
$body = markdown_to_bb($msg_text, false, [ 'diaspora' => true ]);
$maxlen = get_max_import_size();
......@@ -1867,7 +1887,7 @@ class Diaspora_Receiver {
$ev['summary'] = escape_tags($this->get_property('summary'));
$ev['adjust'] = (($this->get_property('all_day')) ? false : true);
$ev_timezone = notags($this->get_property('timezone'));
$ev['description'] = markdown_to_bb($this->get_property('description'));
$ev['description'] = markdown_to_bb($this->get_property('description'), false, [ 'diaspora' => true ]);
$ev_loc = $this->get_property('location');
if($ev_loc) {
$ev_address = escape_tags($this->get_property('address',$ev_loc));
......
......@@ -27,6 +27,7 @@ function diaspora_load() {
Zotlabs\Extend\Hook::register_array('addon/diaspora/diaspora.php', [
'notifier_hub' => 'diaspora_process_outbound',
'notifier_process' => 'diaspora_notifier_process',
'federated_transports' => 'diaspora_federated_transports',
'permissions_create' => 'diaspora_permissions_create',
'permissions_update' => 'diaspora_permissions_update',
'module_loaded' => 'diaspora_load_module',
......@@ -79,6 +80,10 @@ function diaspora_author_is_pmable(&$b) {
$b['result'] = true;