Skip to content

Commit 28e4014

Browse files
authored
Merge pull request #794 from LibreSign/backport/793/stable24
[stable24] remove more parts of tcpdi
2 parents 1cc9396 + 4b9500c commit 28e4014

File tree

12 files changed

+470
-98
lines changed

12 files changed

+470
-98
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
@@ -81,7 +81,11 @@ jobs:
8181
--database-pass=rootpassword \
8282
--admin-user=admin \
8383
--admin-pass=password
84+
- name: Enable app
85+
run: |
8486
./occ app:enable ${{ env.APP_NAME }}
87+
- name: Start built in server
88+
run: |
8589
php -S localhost:8080 &
8690
- name: Set up dependencies apps
8791
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+
## 5.1.1 - 2022-05-05
17+
18+
# Fixed
19+
- Replaced more usages of TCPDI by LibreSignCLI
20+
1621
## 5.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>5.1.0</version>
13+
<version>6.1.1</version>
1414
<licence>agpl</licence>
1515
<author mail="contact@librecode.coop" homepage="https://librecode.coop">Libre Code</author>
1616
<documentation>

composer.lock

Lines changed: 42 additions & 41 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 & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
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;
@@ -22,28 +20,20 @@
2220
class Version2040Date20211027183759 extends SimpleMigrationStep {
2321
/** @var IRootFolder*/
2422
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;
23+
/** @var PdfParserService */
24+
private $PdfParserService;
3325
/** @var array */
3426
private $rows;
35-
public function __construct(IRootFolder $root,
36-
IDBConnection $connection,
37-
IRootFolder $rootfolder,
38-
Install $install,
39-
IConfig $config,
40-
SystemConfig $systemConfig) {
27+
public function __construct(IDBConnection $connection,
28+
IRootFolder $root,
29+
PdfParserService $PdfParserService) {
4130
$this->connection = $connection;
4231
$this->install = $install;
4332
$this->config = $config;
4433
$this->systemConfig = $systemConfig;
4534
$this->rootFolder = $rootfolder;
4635
$this->root = $root;
36+
$this->PdfParserService = $PdfParserService;
4737
}
4838

4939
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options): void {
@@ -81,15 +71,15 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array
8171
/** @var File[] */
8272
$file = $userFolder->getById($row['node_id']);
8373
if (count($file) >= 1) {
84-
$data = $this->getMetadataFromCli($cli, $file[0]->getPath());
74+
$data = $this->PdfParserService->getMetadata($file[0]->getPath());
8575
$json = json_encode($data);
8676
$query = $this->connection->getQueryBuilder();
8777
$query
8878
->update('libresign_file')
8979
->set('metadata', $query->createNamedParameter($json))
9080
->where($query->expr()->eq('id', $query->createNamedParameter($row['id'])));
9181

92-
$query->execute();
82+
$query->executeStatement();
9383
}
9484
}
9585
}

0 commit comments

Comments
 (0)