https://reisub.nsupdate.info/git
/
friendica-addons.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e060931
)
[dwpost] Remove references to obsolete virtual field item.tag
author
Hypolite Petovan
<hypolite@mrpetovan.com>
Thu, 14 May 2020 02:38:39 +0000
(22:38 -0400)
committer
Hypolite Petovan
<hypolite@mrpetovan.com>
Thu, 14 May 2020 02:38:39 +0000
(22:38 -0400)
dwpost/dwpost.php
patch
|
blob
|
history
diff --git
a/dwpost/dwpost.php
b/dwpost/dwpost.php
index
9bcee9c
..
3d4b42a
100644
(file)
--- a/
dwpost/dwpost.php
+++ b/
dwpost/dwpost.php
@@
-14,6
+14,7
@@
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Core\Logger;
use Friendica\Database\DBA;
use Friendica\DI;
+use Friendica\Model\Tag;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
@@
-191,7
+192,7
@@
function dwpost_send(App $a, array &$b)
$title = $b['title'];
$post = BBCode::convert($b['body']);
$post = XML::escape($post);
$title = $b['title'];
$post = BBCode::convert($b['body']);
$post = XML::escape($post);
- $tags =
dwpost_get_tags($b['tag'
]);
+ $tags =
Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG
]);
$date = DateTimeFormat::convert($b['created'], $tz);
$year = intval(substr($date,0,4));
$date = DateTimeFormat::convert($b['created'], $tz);
$year = intval(substr($date,0,4));
@@
-236,12
+237,3
@@
EOT;
Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG);
}
}
Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG);
}
}
-
-function dwpost_get_tags($post)
-{
- preg_match_all("/\]([^\[#]+)\[/", $post, $matches);
-
- $tags = implode(', ', $matches[1]);
-
- return $tags;
-}