Skip to content

Commit d4a8db5

Browse files
authored
Merge pull request #796 from LibreSign/backport/793/stable22
[stable22] remove more parts of tcpdi
2 parents d70fd08 + e3caf34 commit d4a8db5

File tree

11 files changed

+464
-94
lines changed

11 files changed

+464
-94
lines changed

.github/workflows/app-check-code.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/phpunit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ jobs:
7676
--database-pass=rootpassword \
7777
--admin-user=admin \
7878
--admin-pass=password
79+
- name: Enable app
80+
run: |
7981
./occ app:enable ${{ env.APP_NAME }}
82+
- name: Start built in server
83+
run: |
8084
php -S localhost:8080 &
8185
- name: Set up dependencies apps
8286
run: |

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Types of changes:
1313
- *Security* in case of vulnerabilities.
1414

1515
<!-- changelog-linker -->
16+
## 3.1.1 - 2022-05-05
17+
18+
# Fixed
19+
- Replaced more usages of TCPDI by LibreSignCLI
20+
1621
## 3.1.0 - 2022-04-26
1722

1823
# Added

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
]]>
1212
</description>
13-
<version>3.1.0</version>
13+
<version>3.1.1</version>
1414
<licence>agpl</licence>
1515
<author mail="[email protected]" homepage="https://librecode.coop">Libre Code</author>
1616
<documentation>

composer.lock

Lines changed: 37 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Migration/Version2040Date20211027183759.php

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66

77
use Closure;
88
use Doctrine\DBAL\Types\Types;
9-
use OC\SystemConfig;
10-
use OCA\Libresign\AppInfo\Application;
11-
use OCA\Libresign\Command\Install;
9+
use OCA\Libresign\Service\PdfParserService;
1210
use OCP\DB\ISchemaWrapper;
1311
use OCP\Files\File;
1412
use OCP\Files\IRootFolder;
15-
use OCP\IConfig;
1613
use OCP\IDBConnection;
1714
use OCP\Migration\IOutput;
1815
use OCP\Migration\SimpleMigrationStep;
@@ -22,28 +19,20 @@
2219
class Version2040Date20211027183759 extends SimpleMigrationStep {
2320
/** @var IRootFolder*/
2421
private $root;
25-
/** @var IDBConnection */
26-
private $connection;
27-
/** @var Install */
28-
private $install;
29-
/** @var IConfig */
30-
private $config;
31-
/** @var SystemConfig */
32-
private $systemConfig;
22+
/** @var PdfParserService */
23+
private $PdfParserService;
3324
/** @var array */
3425
private $rows;
35-
public function __construct(IRootFolder $root,
36-
IDBConnection $connection,
37-
IRootFolder $rootfolder,
38-
Install $install,
39-
IConfig $config,
40-
SystemConfig $systemConfig) {
26+
public function __construct(IDBConnection $connection,
27+
IRootFolder $root,
28+
PdfParserService $PdfParserService) {
4129
$this->connection = $connection;
4230
$this->install = $install;
4331
$this->config = $config;
4432
$this->systemConfig = $systemConfig;
4533
$this->rootFolder = $rootfolder;
4634
$this->root = $root;
35+
$this->PdfParserService = $PdfParserService;
4736
}
4837

4938
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options): void {
@@ -81,15 +70,15 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array
8170
/** @var File[] */
8271
$file = $userFolder->getById($row['node_id']);
8372
if (count($file) >= 1) {
84-
$data = $this->getMetadataFromCli($cli, $file[0]->getPath());
73+
$data = $this->PdfParserService->getMetadata($file[0]->getPath());
8574
$json = json_encode($data);
8675
$query = $this->connection->getQueryBuilder();
8776
$query
8877
->update('libresign_file')
8978
->set('metadata', $query->createNamedParameter($json))
9079
->where($query->expr()->eq('id', $query->createNamedParameter($row['id'])));
9180

92-
$query->execute();
81+
$query->executeStatement();
9382
}
9483
}
9584
}

0 commit comments

Comments
 (0)