mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 05:24:35 -04:00
minor fixes for self updater
This commit is contained in:
parent
51455cacef
commit
a2977ef1ad
@ -277,6 +277,7 @@ class CompanySettings extends BaseSettings
|
|||||||
public $auto_archive_invoice_cancelled = false;
|
public $auto_archive_invoice_cancelled = false;
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
|
'page_numbering_alignment' => 'string',
|
||||||
'page_numbering' => 'bool',
|
'page_numbering' => 'bool',
|
||||||
'auto_archive_invoice_cancelled' => 'bool',
|
'auto_archive_invoice_cancelled' => 'bool',
|
||||||
'email_from_name' => 'string',
|
'email_from_name' => 'string',
|
||||||
|
@ -134,13 +134,21 @@ class SelfUpdateController extends BaseController
|
|||||||
|
|
||||||
nlog("Extracting zip");
|
nlog("Extracting zip");
|
||||||
|
|
||||||
$zipFile = new \PhpZip\ZipFile();
|
// $zipFile = new \PhpZip\ZipFile();
|
||||||
|
|
||||||
$zipFile->openFile($file);
|
// $zipFile->openFile($file);
|
||||||
|
|
||||||
$zipFile->extractTo(base_path());
|
// $zipFile->extractTo(base_path());
|
||||||
|
|
||||||
$zipFile->close();
|
// $zipFile->close();
|
||||||
|
|
||||||
|
$zip = new \ZipArchive;
|
||||||
|
|
||||||
|
$res = $zip->open($file);
|
||||||
|
if ($res === TRUE) {
|
||||||
|
$zip->extractTo(base_path());
|
||||||
|
$zip->close();
|
||||||
|
}
|
||||||
|
|
||||||
nlog("Finished extracting files");
|
nlog("Finished extracting files");
|
||||||
|
|
||||||
|
@ -190,6 +190,7 @@ class CreateEntityPdf implements ShouldQueue
|
|||||||
|
|
||||||
if(config('ninja.invoiceninja_hosted_pdf_generation') || config('ninja.pdf_generator') == 'hosted_ninja'){
|
if(config('ninja.invoiceninja_hosted_pdf_generation') || config('ninja.pdf_generator') == 'hosted_ninja'){
|
||||||
$pdf = (new NinjaPdf())->build($maker->getCompiledHTML(true));
|
$pdf = (new NinjaPdf())->build($maker->getCompiledHTML(true));
|
||||||
|
|
||||||
$pdf = $this->pageNumbering($pdf, $this->company);
|
$pdf = $this->pageNumbering($pdf, $this->company);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ class PDF extends FPDI
|
|||||||
$this->SetXY(0, -5);
|
$this->SetXY(0, -5);
|
||||||
|
|
||||||
$this->SetFont('Arial','I', 9);
|
$this->SetFont('Arial','I', 9);
|
||||||
|
$this->SetTextColor(135,135,135);
|
||||||
|
|
||||||
$trans = ctrans('texts.pdf_page_info', ['current' => $this->PageNo(), 'total' => '{nb}']);
|
$trans = ctrans('texts.pdf_page_info', ['current' => $this->PageNo(), 'total' => '{nb}']);
|
||||||
|
|
||||||
@ -33,6 +34,7 @@ class PDF extends FPDI
|
|||||||
|
|
||||||
public function setAlignment($alignment)
|
public function setAlignment($alignment)
|
||||||
{
|
{
|
||||||
|
if(in_array($alignment, ['C','L','R']))
|
||||||
$this->text_alignment = $alignment;
|
$this->text_alignment = $alignment;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user