Fix for .DS_Store folders in Mac

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-02 17:33:24 +01:00
parent 19436d4953
commit a501020198
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ class PluginAPI extends stdClass{
console("[INFO] Loading Plugins...");
$dir = dir(FILE_PATH."plugins/");
while(false !== ($file = $dir->read())){
if($file !== "." and $file !== ".."){
if($file{0} !== "."){
if(strtolower(substr($file, -3)) === "php"){
$this->load(FILE_PATH."plugins/" . $file);
}

View File

@ -169,7 +169,7 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
console("[INFO] Loading default APIs");
$dir = dir(FILE_PATH."src/API/");
while(false !== ($file = $dir->read())){
if($file !== "." and $file !== ".."){
if($file{0} !== "."){ //Hidden and upwards folders
$API = basename($file, ".php");
if(strtolower($API) !== "serverapi"){
$name = strtolower(substr($API, 0, -3));