File tree Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change 1
1
# web-server-source
2
- pemapmodder.zapto.org source (partial)
2
+ Source code for http://pmt.mcpe.me (partial)
3
3
4
4
## 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 _
6
6
* PHP YAML extension
7
7
* PHP cURL extension
8
8
* probably other things that I forgot
Original file line number Diff line number Diff line change 121
121
if ($ _POST ["inspection_lint " ] === "on " ){
122
122
$ inspections [] = new SyntaxErrorInspection ($ dir );
123
123
}
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
- }
137
124
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
+ }
138
133
echo json_encode ($ jsonData );
139
134
die;
140
135
}
148
143
echo "<hr> " ;
149
144
echo "<h2>Inspections</h2> " ;
150
145
echo "<ul> " ;
146
+ foreach ($ inspections as $ inspection ){
147
+ $ inspection ->run ()->htmlEcho ();
148
+ }
151
149
echo "</ul> " ;
152
150
echo "<p>End of inspections</p> " ;
153
151
?>
You can’t perform that action at this time.
0 commit comments