Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/documentserver_community.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-01-24 15:41:56 +0300
committerRobin Appelman <robin@icewind.nl>2020-01-24 15:41:56 +0300
commit993c34482b5fcf33257bbe6d3b95621573d03195 (patch)
treebf33e8949cf4a3f06b08c9757f6cebce19d4f077 /lib
parent71e3357f9ac21de1a591058282d4e8266177e7fa (diff)
use repair step for font rebuilding
Diffstat (limited to 'lib')
-rw-r--r--lib/Migration/RebuildFonts.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/Migration/RebuildFonts.php b/lib/Migration/RebuildFonts.php
new file mode 100644
index 0000000..4b2371a
--- /dev/null
+++ b/lib/Migration/RebuildFonts.php
@@ -0,0 +1,48 @@
+<?php declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2020 Robin Appelman <robin@icewind.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\DocumentServer\Migration;
+
+use OCA\DocumentServer\Document\FontManager;
+use OCP\Migration\IOutput;
+use OCP\Migration\IRepairStep;
+
+class RebuildFonts implements IRepairStep {
+ private $fontManager;
+
+ public function __construct(FontManager $fontManager) {
+ $this->fontManager = $fontManager;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getName() {
+ return 'Rebuild font library';
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function run(IOutput $output) {
+ $this->fontManager->rebuildFonts();
+ }
+}