mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
parent
b8df74beca
commit
1af505701b
7 changed files with 25 additions and 25 deletions
|
@ -15,7 +15,7 @@ use Friendica\Core\Logger;
|
|||
use Friendica\Core\PConfig;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
function ljpost_install() {
|
||||
Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
||||
|
@ -170,20 +170,20 @@ function ljpost_send(&$a,&$b) {
|
|||
if($x && strlen($x[0]['timezone']))
|
||||
$tz = $x[0]['timezone'];
|
||||
|
||||
$lj_username = Strings::escape(PConfig::get($b['uid'],'ljpost','lj_username'));
|
||||
$lj_password = Strings::escape(PConfig::get($b['uid'],'ljpost','lj_password'));
|
||||
$lj_journal = Strings::escape(PConfig::get($b['uid'],'ljpost','lj_journal'));
|
||||
$lj_username = XML::escape(PConfig::get($b['uid'],'ljpost','lj_username'));
|
||||
$lj_password = XML::escape(PConfig::get($b['uid'],'ljpost','lj_password'));
|
||||
$lj_journal = XML::escape(PConfig::get($b['uid'],'ljpost','lj_journal'));
|
||||
// if(! $lj_journal)
|
||||
// $lj_journal = $lj_username;
|
||||
|
||||
$lj_blog = Strings::escape(PConfig::get($b['uid'],'ljpost','lj_blog'));
|
||||
$lj_blog = XML::escape(PConfig::get($b['uid'],'ljpost','lj_blog'));
|
||||
if(! strlen($lj_blog))
|
||||
$lj_blog = Strings::escape('http://www.livejournal.com/interface/xmlrpc');
|
||||
$lj_blog = XML::escape('http://www.livejournal.com/interface/xmlrpc');
|
||||
|
||||
if($lj_username && $lj_password && $lj_blog) {
|
||||
$title = Strings::escape($b['title']);
|
||||
$title = XML::escape($b['title']);
|
||||
$post = BBCode::convert($b['body']);
|
||||
$post = Strings::escape($post);
|
||||
$post = XML::escape($post);
|
||||
$tags = ljpost_get_tags($b['tag']);
|
||||
|
||||
$date = DateTimeFormat::convert($b['created'], $tz);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue