mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-22 19:30:20 +00:00
Fix errors in nsfw addon
This commit is contained in:
parent
6b1b043dd8
commit
c0971779c6
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
@ -119,7 +118,9 @@ function nsfw_prepare_body_content_filter(&$hook_data)
|
||||||
$word_list = ['nsfw'];
|
$word_list = ['nsfw'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$found = false;
|
$found = false;
|
||||||
|
$tag_search = false;
|
||||||
|
|
||||||
if (count($word_list)) {
|
if (count($word_list)) {
|
||||||
$body = $hook_data['item']['title'] . "\n" . nsfw_extract_photos($hook_data['item']['body']);
|
$body = $hook_data['item']['title'] . "\n" . nsfw_extract_photos($hook_data['item']['body']);
|
||||||
|
|
||||||
|
@ -129,7 +130,6 @@ function nsfw_prepare_body_content_filter(&$hook_data)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tag_search = false;
|
|
||||||
switch ($word[0]) {
|
switch ($word[0]) {
|
||||||
case '/'; // Regular expression
|
case '/'; // Regular expression
|
||||||
$found = @preg_match($word, $body);
|
$found = @preg_match($word, $body);
|
||||||
|
|
Loading…
Reference in a new issue