Skip to content

Commit e2ab12d

Browse files
committed
2 parents cb2c322 + 9841785 commit e2ab12d

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# web-server-source
2-
pemapmodder.zapto.org source (partial)
2+
Source code for http://pmt.mcpe.me (partial)
33

44
## Requirements
5-
* PHP 5.6 (yes, and the default PHP 5 installation on Ubuntu is PHP 5.5)
5+
* At least PHP 5.6 (default PHP 5 installation on apt is PHP 5.5, make sure to install PHP 5.6 instead), PHP 7.0+ _recommended_
66
* PHP YAML extension
77
* PHP cURL extension
88
* probably other things that I forgot

phar-result.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,15 @@
121121
if($_POST["inspection_lint"] === "on"){
122122
$inspections[] = new SyntaxErrorInspection($dir);
123123
}
124-
$jsonData = [
125-
"phar" => "http://pmt.mcpe.me" . $url,
126-
"expiry" => time() + 7200,
127-
"inspections" => []
128-
];
129-
foreach($inspections as $inspection){
130-
$result = $inspection->run();
131-
if(!$jsonExpected){
132-
$result->htmlEcho();
133-
}else{
134-
$jsonData["inspections"][$result->getName()] = $result->jsonResult();
135-
}
136-
}
137124
if($jsonExpected){
125+
$jsonData = [
126+
"phar" => "http://pmt.mcpe.me" . $url,
127+
"expiry" => time() + 7200,
128+
"inspections" => []
129+
];
130+
foreach($inspections as $inspection){
131+
$jsonData["inspections"][$result->getName()] = $inspection->run()->jsonResult();
132+
}
138133
echo json_encode($jsonData);
139134
die;
140135
}
@@ -148,6 +143,9 @@
148143
echo "<hr>";
149144
echo "<h2>Inspections</h2>";
150145
echo "<ul>";
146+
foreach($inspections as $inspection){
147+
$inspection->run()->htmlEcho();
148+
}
151149
echo "</ul>";
152150
echo "<p>End of inspections</p>";
153151
?>

0 commit comments

Comments
 (0)