[MODULES] Introduce the concept of abstract modules to V3

Introduce placeholder for abstract upload and thumb modules
Temporarily supress some bugs
This commit is contained in:
2021-04-15 00:30:35 +01:00
committed by Hugo Sales
parent 539f1861a6
commit ccf3aa990a
30 changed files with 106 additions and 60 deletions

View File

@@ -22,7 +22,7 @@ namespace Plugin\Cover;
use App\Core\DB\DB;
use App\Core\Event;
use App\Core\Module;
use App\Core\Modules\Module;
use App\Core\Router\RouteLoader;
use App\Util\Common;

View File

@@ -22,7 +22,7 @@
namespace Plugin\Directory;
use App\Core\Event;
use App\Core\Module;
use App\Core\Modules\Module;
use App\Core\Router\RouteLoader;
class Directory extends Module

View File

@@ -33,7 +33,7 @@
namespace Plugin\EmailNotifications;
use App\Core\Event;
use App\Core\Module;
use App\Core\Modules\Module;
class EmailNotifications extends Module
{

View File

@@ -32,7 +32,7 @@
namespace Plugin\Embed;
use App\Core\Module;
use App\Core\Modules\Module;
/**
* Base class for the Embed plugin that does most of the heavy lifting to get

View File

@@ -22,10 +22,10 @@ namespace Plugin\Favourite;
use App\Core\DB\DB;
use App\Core\Event;
use App\Core\Form;
use App\Core\Module;
use App\Entity\Favourite as Fave;
use App\Core\Modules\Module;
use App\Entity\Note;
use App\Util\Common;
use Plugin\Favourite\Entity\Favourite as Fave;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;

View File

@@ -20,7 +20,7 @@
namespace Plugin\Media;
use App\Core\Event;
use App\Core\Module;
use App\Core\Modules\Module;
use App\Core\Router\RouteLoader;
class Media extends Module

View File

@@ -24,7 +24,7 @@ use App\Core\DB\DB;
use App\Core\Event;
use App\Core\Form;
use function App\Core\I18n\_m;
use App\Core\Module;
use App\Core\Modules\Module;
use App\Core\Router\RouteLoader;
use App\Entity\Note;
use App\Entity\PollResponse;

View File

@@ -22,7 +22,7 @@ namespace Plugin\ProfileColor;
use App\Core\DB\DB;
use App\Core\Event;
use App\Core\Module;
use App\Core\Modules\Module;
use App\Core\Router\RouteLoader;
use App\Util\Common;

View File

@@ -22,7 +22,7 @@ namespace Plugin\Repeat;
use App\Core\DB\DB;
use App\Core\Event;
use App\Core\Form;
use App\Core\Module;
use App\Core\Modules\Module;
use App\Entity\Note;
use App\Util\Common;
use App\Util\Exception\NotFoundException;

View File

@@ -25,7 +25,7 @@ use App\Core\DB\DB;
use App\Core\Event;
use App\Core\Form;
use function App\Core\I18n\_m;
use App\Core\Module;
use App\Core\Modules\Module;
use App\Entity\Note;
use App\Util\Common;
use App\Util\Exceptiion\InvalidFormException;

View File

@@ -16,7 +16,7 @@
namespace Plugin\StoreRemoteMedia;
use App\Core\Module;
use App\Core\Modules\Module;
/**
* The StoreRemoteMedia plugin downloads remotely attached files to local server.

View File

@@ -19,10 +19,8 @@
namespace Plugin\TreeNotes;
use App\Core\Modules\Module;
use App\Entity\Note;
use App\Core\Event;
use App\Core\Module;
use Functional as F;
class TreeNotes extends Module
{
@@ -31,7 +29,7 @@ class TreeNotes extends Module
*/
public function onFormatNoteList(array &$notes_in_trees_out)
{
$roots = array_filter($notes_in_trees_out, function(Note $note) { return $note->getReplyTo() == null; }, ARRAY_FILTER_USE_BOTH);
$roots = array_filter($notes_in_trees_out, function (Note $note) { return $note->getReplyTo() == null; }, ARRAY_FILTER_USE_BOTH);
$notes_in_trees_out = $this->build_tree($roots, $notes_in_trees_out);
}
@@ -46,7 +44,7 @@ class TreeNotes extends Module
private function build_subtree(Note $parent, array $notes)
{
$children = array_filter($notes, function(Note $n) use ($parent) { return $parent->getId() == $n->getReplyTo(); }, ARRAY_FILTER_USE_BOTH);
$children = array_filter($notes, function (Note $n) use ($parent) { return $parent->getId() == $n->getReplyTo(); }, ARRAY_FILTER_USE_BOTH);
return ['note' => $parent, 'replies' => $this->build_tree($children, $notes)];
}
}

View File

@@ -28,7 +28,7 @@
namespace Plugin\FFmpeg;
use App\Core\Module;
use App\Core\Modules\Module;
use Plugin\Media\Util\ImageFile;
class FFmpeg extends Module

View File

@@ -0,0 +1,23 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-13 03:09+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#. TRANS: Plugin description.
#: FFmpegPlugin.php:104
msgid "Use PHP-FFMpeg for resizing animated GIFs"
msgstr ""

View File

@@ -33,7 +33,7 @@
namespace Plugin\XMPPNotifications;
use App\Core\Event;
use App\Core\Module;
use App\Core\Modules\Module;
class XMPPNotifications extends Module
{