* Version: 0.2
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/
-require('addon/buffer/bufferapp.php');
+require 'addon/buffer/bufferapp.php';
+use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
$b['postopts'] .= 'buffer';
}
-function buffer_send(&$a,&$b) {
-
+function buffer_send(App $a, &$b)
+{
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
return;
$item["body"] = preg_replace("(\[s\](.*?)\[\/s\])ism",'-$1-',$item["body"]);
}
- $post = plaintext($a, $item, $limit, $includedlinks, $htmlmode);
+ $post = plaintext($item, $limit, $includedlinks, $htmlmode);
logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG);
// The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures
$tempfile = "";
require_once "include/plaintext.php";
require_once "include/network.php";
- $msgarr = plaintext($a, $b, $max_char, true, 7);
+ $msgarr = plaintext($b, $max_char, true, 7);
$msg = $msgarr["text"];
if (($msg == "") && isset($msgarr["title"]))
}
}
- $msgarr = plaintext($a, $item, $max_char, true, 7);
+ $msgarr = plaintext($item, $max_char, true, 7);
$msg = $msgarr["text"];
if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) {
$max_char = 280;
require_once "include/plaintext.php";
- $msgarr = plaintext($a, $b, $max_char, true, 8);
+ $msgarr = plaintext($b, $max_char, true, 8);
$msg = $msgarr["text"];
if (($msg == "") && isset($msgarr["title"])) {
// -----------------
$max_char = 280;
require_once "include/plaintext.php";
- $msgarr = plaintext($a, $b, $max_char, true, 8);
+ $msgarr = plaintext($b, $max_char, true, 8);
$msg = $msgarr["text"];
if (($msg == "") && isset($msgarr["title"])) {
}
}
- $msgarr = plaintext($a, $item, $max_char, true, 8);
+ $msgarr = plaintext($item, $max_char, true, 8);
$msg = $msgarr["text"];
if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) {