Skip to content

Commit cb2c322

Browse files
committed
Fixes
1 parent 9a223a2 commit cb2c322

File tree

5 files changed

+10
-33
lines changed

5 files changed

+10
-33
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
*.phar
22
/data/data.json
33
gc_last
4-
.idea
4+
.idea/
55
!favicon.ico
66
/pg_/
77
/github*/
88
*.zip
9+
/pmb/
10+
/nowhere/
11+

.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RewriteRule ^(index.php)?$ /pocketmine.php
1111
RewriteRule ^pg/viewSrc\.php/(.*)$ /pg/viewSrc.php?path=$1
1212
RewriteRule ^pg/viewSrc/(.*)$ /pg/viewSrc.php?path=$1
1313
RewriteRule ^(pg/([^\.]+)(\.[a-z]+))/.*$ /$1
14+
RewriteRule ^pmb/dl/(.+).phar$ /pmb/dl.php?branch=$1
1415
RewriteCond %{REQUEST_URI} !/robots\.txt$ [nocase]
1516
RewriteRule \.txt$ - [forbidden,last]
1617

inspections/SyntaxErrorInspection.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
<?php
22

3-
/**
4-
* pmt.mcpe.me
5-
* Copyright (C) 2015 PEMapModder
6-
* This program is free software; you can redistribute it and/or modify
7-
* it under the terms of the GNU General Public License as published by
8-
* the Free Software Foundation; either version 2 of the License, or
9-
* (at your option) any later version.
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
* You should have received a copy of the GNU General Public License along
15-
* with this program; if not, write to the Free Software Foundation, Inc.,
16-
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17-
*/
18-
193
namespace inspections;
204

215
class SyntaxErrorInspection{
@@ -31,8 +15,7 @@ public function run(){
3115
$good = 0;
3216
$bad = 0;
3317
foreach(new \RegexIterator(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->dir)), "#\\.php\$#") as $file){
34-
$ef = escapeshellarg($file);
35-
exec("php -l $ef 2>&1", $out);
18+
exec("php -l $file 2>&1", $out);
3619
$lint = implode("<br>", $out);
3720
if(strpos($lint, "No syntax errors detected in") === 0){
3821
$good++;

insta/new.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function urlGet($url, $post = false, $postFields = []){
2929
$api = $_REQUEST["api"];
3030
$namespace = (is_numeric($_SESSION["github_login"]{0}) ? "_" : "") . str_replace("-", "_", $_SESSION["github_login"]) . "\\" . $name;
3131
$main = $namespace . "\\" . "Main";
32-
$config = isset($_REQUEST["config"]) and $_REQUEST["config"] == "on";
32+
$config = (isset($_REQUEST["config"]) and $_REQUEST["config"] == "on");
3333
$configCode = $config ? (' $this->saveDefaultConfig();' . "\n") : "";
3434
$skeletons = (int) $_REQUEST["skeletons"];
3535
$tasks = (int) $_REQUEST["tasks"];
@@ -100,6 +100,9 @@ public function onRun(\$ticks){
100100
EOF;
101101
$files["src--" . str_replace("\\", "--", $namespace) . "--$className.php"] = ["content" => $c];
102102
}
103+
if($config){
104+
$files["resources--config.yml"] = "---\n\n...\n";
105+
}
103106

104107
foreach($skeletonNames as $className){
105108
$c = <<<EOF

vardump/NullVariable.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
<?php
22

3-
/*
4-
* pmt.mcpe.me
5-
*
6-
* Copyright (C) 2015 PEMapModder
7-
*
8-
* This program is free software: you can redistribute it and/or modify
9-
* it under the terms of the GNU Lesser General Public License as published by
10-
* the Free Software Foundation, either version 3 of the License, or
11-
* (at your option) any later version.
12-
*
13-
* @author PEMapModder
14-
*/
15-
163
namespace vardump;
174

185
class NullVariable extends Variable{

0 commit comments

Comments
 (0)