Skip to content

Commit

Permalink
cleanup and minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nokonoko committed Aug 12, 2023
1 parent b3ff67c commit d7cda18
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ uguu.sq3
composer.phar
composer.lock
docker/uguuForDocker.tar.gz
!/.php-cs-fixer.cache
1 change: 0 additions & 1 deletion .node_version

This file was deleted.

1 change: 0 additions & 1 deletion .php-cs-fixer.cache

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uguu",
"version": "1.7.4",
"version": "1.7.5",
"description": "Uguu is a simple lightweight temporary file host with support for drop, paste, click and API uploading.",
"homepage": "https://uguu.se",
"repository": {
Expand All @@ -17,9 +17,9 @@
"url": "https://github.com/nokonoko/uguu/issues"
},
"devDependencies": {
"minify": "^9.1.0",
"ejs": "^3.1.8",
"node-jq": "^2.3.4",
"minify": "^10.3.0",
"ejs": "^3.1.9",
"node-jq": "^4.0.1",
"imagemin-cli": "^7.0.0",
"imagemin-pngquant": "^9.0.2"
}
Expand Down
3 changes: 1 addition & 2 deletions src/Classes/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,14 @@ public function doubleDotExtension(array $extension):string
*
* @param $file array The file you want to get the extension from.
*
* @return string The file extension of the file.
* @return string | bool The file extension of the file.
*/
public function fileExtension(array $file):string | bool
{
if(str_contains($file['name'], '.')){
$extension = explode('.', $file['name']);
$dotCount = substr_count($file['name'], '.');
return match ($dotCount) {
1 => end($extension),
2 => $this->doubleDotExtension($extension),
default => end($extension)
};
Expand Down
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowErrors": false
},
"dest": "dist",
"pkgVersion": "1.7.4",
"pkgVersion": "1.7.5",
"pages": [
"index.ejs",
"faq.ejs",
Expand Down

0 comments on commit d7cda18

Please # to comment.