mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Fix for .DS_Store folders in Mac
This commit is contained in:
parent
19436d4953
commit
a501020198
2 changed files with 2 additions and 2 deletions
|
|
@ -157,7 +157,7 @@ class PluginAPI extends stdClass{
|
||||||
console("[INFO] Loading Plugins...");
|
console("[INFO] Loading Plugins...");
|
||||||
$dir = dir(FILE_PATH."plugins/");
|
$dir = dir(FILE_PATH."plugins/");
|
||||||
while(false !== ($file = $dir->read())){
|
while(false !== ($file = $dir->read())){
|
||||||
if($file !== "." and $file !== ".."){
|
if($file{0} !== "."){
|
||||||
if(strtolower(substr($file, -3)) === "php"){
|
if(strtolower(substr($file, -3)) === "php"){
|
||||||
$this->load(FILE_PATH."plugins/" . $file);
|
$this->load(FILE_PATH."plugins/" . $file);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
|
||||||
console("[INFO] Loading default APIs");
|
console("[INFO] Loading default APIs");
|
||||||
$dir = dir(FILE_PATH."src/API/");
|
$dir = dir(FILE_PATH."src/API/");
|
||||||
while(false !== ($file = $dir->read())){
|
while(false !== ($file = $dir->read())){
|
||||||
if($file !== "." and $file !== ".."){
|
if($file{0} !== "."){ //Hidden and upwards folders
|
||||||
$API = basename($file, ".php");
|
$API = basename($file, ".php");
|
||||||
if(strtolower($API) !== "serverapi"){
|
if(strtolower($API) !== "serverapi"){
|
||||||
$name = strtolower(substr($API, 0, -3));
|
$name = strtolower(substr($API, 0, -3));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue