diff --git a/app/Controllers/CrawlerController.php b/app/Controllers/CrawlerController.php index 7af3859..1225d14 100644 --- a/app/Controllers/CrawlerController.php +++ b/app/Controllers/CrawlerController.php @@ -4,7 +4,7 @@ namespace App\Controllers; use App\Libraries\MyCrawler\YamapLibrary as MyCrawler; use App\Controllers\CommonController; -use App\Libraries\MyStorage\Mangboard\UserLibrary; +use App\Libraries\Mangboard\UserLibrary; class CrawlerController extends CommonController { diff --git a/app/Libraries/Cloudflare/CloudflareLibrary.php b/app/Libraries/CloudflareLibrary.php similarity index 99% rename from app/Libraries/Cloudflare/CloudflareLibrary.php rename to app/Libraries/CloudflareLibrary.php index 1911179..191115e 100644 --- a/app/Libraries/Cloudflare/CloudflareLibrary.php +++ b/app/Libraries/CloudflareLibrary.php @@ -1,6 +1,6 @@ _user_model; } - public function getWebLibrary(string $host): WebLibrary - { - if ($this->_web_library === null) { - $this->_web_library = new WebLibrary($host); - } - return $this->_web_library; - } // 로그인 메서드 public function login(string $host, string $id, string $password): bool|UserEntity { diff --git a/app/Libraries/MyAuth/GoogleLibrary.php b/app/Libraries/MyAuth/GoogleLibrary.php index 71c3822..67f38ec 100644 --- a/app/Libraries/MyAuth/GoogleLibrary.php +++ b/app/Libraries/MyAuth/GoogleLibrary.php @@ -2,9 +2,10 @@ namespace App\Libraries\MyAuth; -use App\Entities\SNSUserEntity; -use App\Entities\UserEntity; use App\Libraries\MySocket\GoogleLibrary as MySocketLibrary; +use App\Libraries\MyAuthLibrary; +use App\Entities\UserEntity; +use App\Entities\SNSUserEntity; class GoogleLibrary extends MyAuthLibrary { diff --git a/app/Libraries/MyAuth/LocalLibrary.php b/app/Libraries/MyAuth/LocalLibrary.php index 7e8cb79..0f33f3c 100644 --- a/app/Libraries/MyAuth/LocalLibrary.php +++ b/app/Libraries/MyAuth/LocalLibrary.php @@ -2,6 +2,7 @@ namespace App\Libraries\MyAuth; +use App\Libraries\MyAuthLibrary; use App\Entities\UserEntity; class LocalLibrary extends MyAuthLibrary diff --git a/app/Libraries/MyAuth/MyAuthLibrary.php b/app/Libraries/MyAuthLibrary.php similarity index 97% rename from app/Libraries/MyAuth/MyAuthLibrary.php rename to app/Libraries/MyAuthLibrary.php index 38a5ba8..e5646c5 100644 --- a/app/Libraries/MyAuth/MyAuthLibrary.php +++ b/app/Libraries/MyAuthLibrary.php @@ -1,6 +1,6 @@ getOriginName(); if (file_exists($saveFilePath)) { $fileInfos = pathinfo($saveFilePath, PATHINFO_ALL); - $saveFile = $fileInfos['filename'] . "_" . uniqid() . $fileInfos['extension']; + $saveFile = base64_encode($fileInfos['filename']) . "." . $fileInfos['extension']; $saveFilePath = $fullPath . DIRECTORY_SEPARATOR . $this->getOriginName(); log_message("notice", __FUNCTION__ . "파일명 변경 : 원본파일 {$this->getOriginName()}->저장파일 {$saveFile}"); $this->setOriginName($saveFile); diff --git a/app/Libraries/MyStorage/MyStorageLibrary.php b/app/Libraries/MyStorageLibrary.php similarity index 97% rename from app/Libraries/MyStorage/MyStorageLibrary.php rename to app/Libraries/MyStorageLibrary.php index 648d8ec..06f46e9 100644 --- a/app/Libraries/MyStorage/MyStorageLibrary.php +++ b/app/Libraries/MyStorageLibrary.php @@ -1,6 +1,6 @@ isFileType($path, $file, $type)) { - $files[] = $file; + $file_ext = pathinfo($path . DIRECTORY_SEPARATOR . $file_name, PATHINFO_EXTENSION); + if ($this->isFileType($file_ext, $type)) { + $files[] = $file_name; } } return $files;