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