Skip to content

Commit 9a63c19

Browse files
authored
Merge pull request #480 from portabilis/portabilis-patch-2019-01-15
Portabilis patch 15/01/2019
2 parents 929b978 + 3e147c6 commit 9a63c19

22 files changed

+328
-305
lines changed

app/Console/Commands/ReportsInstallCommand.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ReportsInstallCommand extends Command
1313
*
1414
* @var string
1515
*/
16-
protected $signature = 'reports:install';
16+
protected $signature = 'reports:install {--no-compile}';
1717

1818
/**
1919
* The console command description.
@@ -45,6 +45,7 @@ protected function getInitialReportsDatabaseFile()
4545
public function handle(Filesystem $filesystem, Connection $connection)
4646
{
4747
$file = $this->getInitialReportsDatabaseFile();
48+
$compile = $this->option('no-compile') === false;
4849

4950
if (!$filesystem->exists($file)) {
5051
$this->error('Initial reports database file not found.');
@@ -58,10 +59,13 @@ public function handle(Filesystem $filesystem, Connection $connection)
5859
$filesystem->get($file)
5960
);
6061

61-
$this->call('reports:compile');
62+
if ($compile) {
63+
$this->call('reports:compile');
64+
}
6265

6366
$this->call('migrate', [
64-
'--force' => true
67+
'--force' => true,
68+
'--path' => 'ieducar/modules/Reports/database/migrations',
6569
]);
6670
}
6771
}

app/Http/Controllers/LegacyController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private function overrideGlobals()
230230
$_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] ?? $this->request->getRequestUri();
231231

232232
$_GET = empty($_GET) ? $this->request->query->all() : $_GET;
233-
$_POST = empty($_POST) ? $this->request->request->all() : $_POST;
233+
$_POST = (empty($_POST) && $this->request->isMethod('post')) ? $this->request->request->all() : $_POST;
234234
$_FILES = empty($_FILES) ? $this->request->files->all() : $_FILES;
235235
$_COOKIE = empty($_COOKIE) ? $this->request->cookies->all() : $_COOKIE;
236236
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Software livre de gestão escolar",
44
"type": "project",
55
"license": "GPL-2.0-or-later",
6-
"version": "2.1.1",
6+
"version": "2.1.2",
77
"keywords": [
88
"Portabilis",
99
"i-Educar"

0 commit comments

Comments
 (0)