Commit 46884dddb653f5a60244cf6ecf343dfc14a83e86

Authored by Eder Soares
Committed by GitHub
2 parents 05f9e7ae da049083
Exists in master

Merge pull request #6605 from portabilis/community-patch-2019-11-08

Community patch 08/11/2019
app/Console/Commands/LegacyLinkCommand.php
... ... @@ -59,6 +59,7 @@ class LegacyLinkCommand extends Command
59 59 'intranet/scripts',
60 60 'intranet/static',
61 61 'intranet/styles',
  62 + 'intranet/tmp',
62 63 ],
63 64 '../' => [
64 65 'modules',
... ...
app/Http/Controllers/BatchEnrollmentController.php
... ... @@ -85,7 +85,6 @@ class BatchEnrollmentController extends Controller
85 85 * Lista as enturmações da turma e possibilita a desenturmação em lote.
86 86 *
87 87 * @param LegacySchoolClass $schoolClass
88   - * @param EnrollmentService $enrollmentService
89 88 *
90 89 * @return View
91 90 */
... ...
app/Http/Requests/BatchEnrollmentRequest.php
... ... @@ -3,7 +3,6 @@
3 3 namespace App\Http\Requests;
4 4  
5 5 use Illuminate\Foundation\Http\FormRequest;
6   -use Illuminate\Support\Arr;
7 6  
8 7 class BatchEnrollmentRequest extends FormRequest
9 8 {
... ...
app/Http/Requests/EnrollmentRequest.php
... ... @@ -3,7 +3,6 @@
3 3 namespace App\Http\Requests;
4 4  
5 5 use Illuminate\Foundation\Http\FormRequest;
6   -use Illuminate\Support\Arr;
7 6  
8 7 class EnrollmentRequest extends FormRequest
9 8 {
... ...
app/Listeners/AuthenticatedUser.php
... ... @@ -13,7 +13,7 @@ class AuthenticatedUser
13 13 *
14 14 * @param Authenticated $event
15 15 *
16   - * @return void
  16 + * @throws ValidationException
17 17 */
18 18 public function handle(Authenticated $event)
19 19 {
... ...
app/Mail/ErrorTrackerMail.php
... ... @@ -25,7 +25,9 @@ class ErrorTrackerMail extends Mailable implements ShouldQueue
25 25 /**
26 26 * Create a new message instance.
27 27 *
28   - * @return void
  28 + * @param $to
  29 + * @param $subject
  30 + * @param $content
29 31 */
30 32 public function __construct($to, $subject, $content)
31 33 {
... ...
app/Models/Individual.php
... ... @@ -75,6 +75,8 @@ class Individual extends Model
75 75 }
76 76  
77 77 /**
  78 + * @param $value
  79 + *
78 80 * @return string
79 81 */
80 82 public function getMotherNameAttribute($value)
... ... @@ -87,6 +89,8 @@ class Individual extends Model
87 89 }
88 90  
89 91 /**
  92 + * @param $value
  93 + *
90 94 * @return string
91 95 */
92 96 public function getFatherNameAttribute($value)
... ... @@ -99,6 +103,8 @@ class Individual extends Model
99 103 }
100 104  
101 105 /**
  106 + * @param $value
  107 + *
102 108 * @return string
103 109 */
104 110 public function getGuardianNameAttribute($value)
... ...
app/Models/School.php
... ... @@ -3,7 +3,6 @@
3 3 namespace App\Models;
4 4  
5 5 use Illuminate\Database\Eloquent\Model;
6   -use App\Models\Enrollment;
7 6  
8 7 class School extends Model
9 8 {
... ...
app/Notifications/ResetPasswordNotification.php
... ... @@ -3,9 +3,8 @@
3 3 namespace App\Notifications;
4 4  
5 5 use Illuminate\Bus\Queueable;
6   -use Illuminate\Notifications\Notification;
7   -use Illuminate\Contracts\Queue\ShouldQueue;
8 6 use Illuminate\Notifications\Messages\MailMessage;
  7 +use Illuminate\Notifications\Notification;
9 8  
10 9 class ResetPasswordNotification extends Notification
11 10 {
... ...
app/Providers/AppServiceProvider.php
... ... @@ -2,22 +2,18 @@
2 2  
3 3 namespace App\Providers;
4 4  
5   -use App\Models\SchoolManager;
6   -use App\Observers\SchoolManagerObserver;
  5 +use App\Models\LegacyInstitution;
7 6 use App\Providers\Postgres\DatabaseServiceProvider;
8   -use Exception;
9 7 use App\Services\CacheManager;
10   -use App\Models\LegacyInstitution;
11 8 use App\Services\StudentUnificationService;
12 9 use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider;
13   -use iEducar\Support\Navigation\Breadcrumb;
  10 +use Exception;
14 11 use iEducar\Modules\ErrorTracking\HoneyBadgerTracker;
15 12 use iEducar\Modules\ErrorTracking\Tracker;
  13 +use iEducar\Support\Navigation\Breadcrumb;
16 14 use Illuminate\Database\Eloquent\Collection;
17   -use Illuminate\Http\Request;
18 15 use Illuminate\Pagination\Paginator;
19 16 use Illuminate\Support\Facades\Auth;
20   -use Illuminate\Support\Facades\Blade;
21 17 use Illuminate\Support\Facades\Cache;
22 18 use Illuminate\Support\Facades\Schema;
23 19 use Illuminate\Support\ServiceProvider;
... ...
app/Services/SchoolClass/AvailableTimeService.php
... ... @@ -56,8 +56,8 @@ class AvailableTimeService
56 56  
57 57 $otherSchoolClass = $schoolClassQuery->get();
58 58  
59   - foreach ($otherSchoolClass as $otherSchoolClass) {
60   - if ($this->schedulesMatch($schoolClass, $otherSchoolClass)) {
  59 + foreach ($otherSchoolClass as $oneSchoolClass) {
  60 + if ($this->schedulesMatch($schoolClass, $oneSchoolClass)) {
61 61 return false;
62 62 }
63 63 }
... ...
composer.json
... ... @@ -3,7 +3,7 @@
3 3 "description": "Software livre de gestão escolar",
4 4 "type": "project",
5 5 "license": "GPL-2.0-or-later",
6   - "version": "2.2.10",
  6 + "version": "2.2.11",
7 7 "keywords": [
8 8 "Portabilis",
9 9 "i-Educar"
... ...
composer.lock
... ... @@ -4,7 +4,7 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5 "This file is @generated automatically"
6 6 ],
7   - "content-hash": "116b686879b5b854694e79285273460d",
  7 + "content-hash": "723270812ec0d482a57df66262869817",
8 8 "packages": [
9 9 {
10 10 "name": "asm89/stack-cors",
... ... @@ -2375,16 +2375,16 @@
2375 2375 },
2376 2376 {
2377 2377 "name": "nikic/php-parser",
2378   - "version": "v4.2.5",
  2378 + "version": "v4.3.0",
2379 2379 "source": {
2380 2380 "type": "git",
2381 2381 "url": "https://github.com/nikic/PHP-Parser.git",
2382   - "reference": "b76bbc3c51f22c570648de48e8c2d941ed5e2cf2"
  2382 + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc"
2383 2383 },
2384 2384 "dist": {
2385 2385 "type": "zip",
2386   - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/b76bbc3c51f22c570648de48e8c2d941ed5e2cf2",
2387   - "reference": "b76bbc3c51f22c570648de48e8c2d941ed5e2cf2",
  2386 + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc",
  2387 + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc",
2388 2388 "shasum": ""
2389 2389 },
2390 2390 "require": {
... ... @@ -2392,7 +2392,7 @@
2392 2392 "php": ">=7.0"
2393 2393 },
2394 2394 "require-dev": {
2395   - "ircmaxell/php-yacc": "0.0.4",
  2395 + "ircmaxell/php-yacc": "0.0.5",
2396 2396 "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
2397 2397 },
2398 2398 "bin": [
... ... @@ -2401,7 +2401,7 @@
2401 2401 "type": "library",
2402 2402 "extra": {
2403 2403 "branch-alias": {
2404   - "dev-master": "4.2-dev"
  2404 + "dev-master": "4.3-dev"
2405 2405 }
2406 2406 },
2407 2407 "autoload": {
... ... @@ -2423,7 +2423,7 @@
2423 2423 "parser",
2424 2424 "php"
2425 2425 ],
2426   - "time": "2019-10-25T18:33:07+00:00"
  2426 + "time": "2019-11-08T13:50:10+00:00"
2427 2427 },
2428 2428 {
2429 2429 "name": "opis/closure",
... ...
docker/php/Dockerfile
... ... @@ -52,3 +52,6 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
52 52 COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
53 53  
54 54 COPY php.ini /usr/local/etc/php/php.ini
  55 +
  56 +COPY pdflib.so /usr/local/lib/php/extensions/no-debug-non-zts-20180731/pdflib.so
  57 +RUN echo "extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/pdflib.so" > /usr/local/etc/php/conf.d/pdflib.ini
... ...
docker/php/pdflib.so 0 → 100755
No preview for this file type
ieducar/intranet/include/clsPDF.inc.php
... ... @@ -145,7 +145,7 @@ class clsPDF
145 145 // Construção de página normal
146 146 $this->ClosePage();
147 147 $this->numeroPagina++;
148   - PDF_begin_page($this->pdf, $this->largura, $this->altura);
  148 + PDF_begin_page_ext($this->pdf, $this->largura, $this->altura, "");
149 149 $this->pagOpened = TRUE;
150 150 }
151 151 else {
... ... @@ -372,6 +372,10 @@ class clsPDF
372 372 */
373 373 public function insertImageScaled($tipo, $image, $x, $y, $maxWidth)
374 374 {
  375 + if ($image == "") {
  376 + throw new Exception('Parametro $image vazio');
  377 + }
  378 +
375 379 $image = realpath($image);
376 380 if (! is_readable($image)) {
377 381 throw new Exception('Caminho para arquivo de imagem inválido: "' . $image . '"');
... ...
ieducar/intranet/include/relatorio.inc.php
... ... @@ -117,7 +117,11 @@ class relatorios
117 117 $this->pdf->Write( $this->numeroPagina, $this->pdf->largura - $this->margem_direita - 25, 125, 15, 80, $this->fonte_titulo, 10, "#000000", "center" );
118 118  
119 119 // Insere o brasao da prefeitura
120   - $image = config('legacy.app.template.pdf.logo', 'imagens/brasao.gif');
  120 + $brasaoDefault = 'imagens/nvp_brasao_print.gif';
  121 + $image = config('legacy.app.template.pdf.logo', $brasaoDefault);
  122 + if ($image == '') {
  123 + $image = $brasaoDefault;
  124 + }
121 125 $this->pdf->insertImageScaled("gif", $image, $this->margem_esquerda + 4,
122 126 74, 45);
123 127  
... ...