Skip to content

Commit

Permalink
Remvoe superglobal
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Jun 25, 2024
1 parent 9eea0db commit 437a9c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/midcom/config/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

use midcom\bundle\dependencyInjection\cachePass;
use Symfony\Component\HttpFoundation\Request;

/**
* Collection of simple helper methods for testing site configuration
Expand Down Expand Up @@ -209,12 +210,12 @@ private function check_for_utility(string $testname, int $fail_code, string $fai
}
}

public function show()
public function show(Request $request)
{
echo '<table>';

$this->print_section('MidCOM ' . midcom::VERSION, $this->messages['midcom']);
$this->print_section($_SERVER['SERVER_SOFTWARE'], $this->messages['php']);
$this->print_section($request->server->get('SERVER_SOFTWARE'), $this->messages['php']);
$this->print_section('External Utilities', $this->messages['external']);

echo '</table>';
Expand Down
3 changes: 2 additions & 1 deletion lib/midcom/core/urlmethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
*/
class midcom_core_urlmethods
{
public function process_config() : Response
public function process_config(Request $request) : Response
{
midcom::get()->style->data['request'] = $request;
return new StreamedResponse(function() {
midcom::get()->style->show_midcom('config-test');
});
Expand Down
4 changes: 2 additions & 2 deletions lib/midcom/style/config-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<body>

<?php
$runner = new midcom_config_test();
$runner = new midcom_config_test;
$runner->check();
$runner->show();
$runner->show($this->data['request']);
?>
</body>
</html>

0 comments on commit 437a9c2

Please sign in to comment.