Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace TCPDI by TCPDF #2607

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
"license": "AGPL",
"require": {
"endroid/qr-code": "^4.6",
"iio/libmergepdf": "dev-move-tcpdi-parser-to-package",
"jsignpdf/jsignpdf-php": "^1.2",
"mikehaertl/php-pdftk": "^0.13.0",
"pagerfanta/pagerfanta": "^3.6",
"smalot/pdfparser": "^2.4",
"symfony/console": "^5.4",
"tecnickcom/tcpdf": "^6.4",
"tecnickcom/tcpdf": "^6.7",
"wobeto/email-blur": "^1.0"
},
"require-dev": {
Expand Down Expand Up @@ -62,11 +61,5 @@
"psr-4": {
"OCP\\": "vendor/nextcloud/ocp/OCP"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/LibreCodeCoop/libmergepdf"
}
]
}
}
181 changes: 5 additions & 176 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions lib/Db/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
namespace OCA\Libresign\Db;

use OCP\AppFramework\Db\Entity;
use stdClass;

/**
* @method void setId(int $id)
Expand All @@ -45,8 +46,7 @@
* @method string getCallback()
* @method void setStatus(int $status)
* @method int getStatus()
* @method void setPages(int $pages)
* @method int getPages()
* @method string getMetadata()
*/
class File extends Entity {
/** @var integer */
Expand Down Expand Up @@ -97,4 +97,16 @@ public function __construct() {
$this->addType('status', 'integer');
$this->addType('metadata', 'string');
}

public function setMetadata($metadata): void {
if (is_array($metadata)) {
$metadata = json_encode($metadata);
}
$this->metadata = (string) $metadata;
$this->markFieldUpdated('metadata');
}

public function getMetadataDecoded(): ?stdClass {
return json_decode($this->metadata);
}
}
2 changes: 1 addition & 1 deletion lib/Db/SignRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @method void setDisplayName(string $displayName)
* @method string getDisplayName()
* @method void setMetadata(array $metadata)
* @method string getMetadata()
* @method array getMetadata()
*/
class SignRequest extends Entity {
/** @var integer */
Expand Down
3 changes: 0 additions & 3 deletions lib/Db/SignRequestMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ public function incrementNotificationCounter(SignRequest $signRequest, string $m
try {
$fromDatabase = $this->getById($signRequest->getId());
$metadata = $fromDatabase->getMetadata();
if (!empty($metadata)) {
$metadata = json_decode($metadata, true);
}
if (!isset($metadata['notify'])) {
$this->firstNotification = true;
}
Expand Down
Loading
Loading