mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 06:57:32 -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 static $casts = [ | ||||
|         'page_numbering_alignment'           => 'string', | ||||
|         'page_numbering'                     => 'bool', | ||||
|         'auto_archive_invoice_cancelled'     => 'bool', | ||||
|         'email_from_name'                    => 'string', | ||||
|  | ||||
| @ -134,13 +134,21 @@ class SelfUpdateController extends BaseController | ||||
| 
 | ||||
|         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"); | ||||
| 
 | ||||
|  | ||||
| @ -190,6 +190,7 @@ class CreateEntityPdf implements ShouldQueue | ||||
| 
 | ||||
|             if(config('ninja.invoiceninja_hosted_pdf_generation') || config('ninja.pdf_generator') == 'hosted_ninja'){ | ||||
|                 $pdf = (new NinjaPdf())->build($maker->getCompiledHTML(true)); | ||||
|                  | ||||
|                 $pdf = $this->pageNumbering($pdf, $this->company); | ||||
| 
 | ||||
|             } | ||||
|  | ||||
| @ -23,7 +23,8 @@ class PDF extends FPDI | ||||
| 
 | ||||
|         $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}']); | ||||
| 
 | ||||
| @ -33,7 +34,8 @@ class PDF extends FPDI | ||||
| 
 | ||||
|     public function setAlignment($alignment) | ||||
|     { | ||||
|         $this->text_alignment = $alignment; | ||||
|         if(in_array($alignment, ['C','L','R'])) | ||||
|             $this->text_alignment = $alignment; | ||||
| 
 | ||||
|         return $this; | ||||
|     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user