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