Skip to content

Commit

Permalink
Merge pull request #59 from Case-Games/dev/aaron-junker/hotfix
Browse files Browse the repository at this point in the history
Dev/aaron junker/hotfix
  • Loading branch information
Aaron-Junker authored Jan 24, 2021
2 parents 894fdc2 + d99a716 commit 9b65bd0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
7 changes: 6 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
## Fixed bugs
* _ (#)
-->
# Pb2.4Bfx1
## Fixed bugs
* Some debug function were still in the image plugin
# Pb2.4Bfx0
> USOC now supports PHP8. Through a backwards compatibity script it still supports PHP7.4.
> The PHP7.4 support ends in the summer of 2020
Expand All @@ -17,6 +20,8 @@
* Added a beautiful installer
* Removed install.html
* Added a hint in the admin area if the install folder still exists

![](https://i.imgur.com/SVr1Apj.png)
* ID selection on admin/pages/useredit.php now only allows range from lowest id to highest id
* Added return declarations to functions
* Added a backwards compatibility script
Expand Down Expand Up @@ -99,7 +104,7 @@
* You can't edit yourself now
* Shows now an error if the user doesn't exists
* 2fa
* Code input is now styled and in `login .php`
* Code input is now styled and in `login.php`
* You can now cancel code input
* You can not login with a other account if you haven't finished login yet
* Chenged order of items on `about.php`
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Useful simple open-source CMS

![](https://img.shields.io/badge/Version%20in%20developement%20in%20this%20branch-Pb2.4Bfx0-blue)
![](https://img.shields.io/badge/Version%20in%20developement%20in%20this%20branch-Pb2.5Bfx0-blue)

<img src="https://i.imgur.com/BLlWYYQ.png" height="200" /><img src="https://i.imgur.com/YPstj8L.png" height="200" />

Expand Down
2 changes: 1 addition & 1 deletion docs/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Old pre-alpha and pre-beta versions aren't supported with bugfixes.
### Pre-Beta
| Version | Supported|Newest Version|
| ------- | ---------|--------------|
| Pb2.4 | :x: | Pb2.4Bfx0 |
| Pb2.4 | :x: | Pb2.4Bfx1 |
| Pb2.3 | :x: | Pb2.3Bfx0 |
| Pb2.2 | :x: | Pb2.2Bfx0 |
| Pb2.1 | :x: | Pb2.1Bfx0 |
Expand Down
2 changes: 1 addition & 1 deletion includes/class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class U{
* @since Pb2.4Bfx0
* @var int
*/
public int $versionCode = 20240900;
public int $versionCode = 20240901;
/**
* True when USOC is modded
* @since Pb2.0Bfx0RCA
Expand Down
24 changes: 12 additions & 12 deletions plugins/images/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ function getLangImage($string){
}
}, "DeleteHandler" => function (int $Id){},
"ShowHandler" => function ($code, $data){
// $fileExtension = strtolower(pathinfo($data["Name"], PATHINFO_EXTENSION));
// $width = (isset($_GET["width"]) ? $_GET["width"]."px" : "");
// if($fileExtension == "jpg"){
// $code = "<img width=\"".$width."\" src=\"data:image/jpg;charset=utf8;base64,".base64_encode($code)."\" />";
// }elseif($fileExtension == "png"){
// $code = "<img width=\"".$width."\" src=\"data:image/png;charset=utf8;base64,".base64_encode($code)."\" />";
// }elseif($fileExtension == "jpeg"){
// $code = "<img width=\"".$width."\" src=\"data:image/jpeg;charset=utf8;base64,".base64_encode($code)."\" />";
// }elseif($fileExtension == "gif"){
// $code = "<img width=\"".$width."\" src=\"data:image/gif;charset=utf8;base64,".base64_encode($code)."\" />";
// }
header("Content-Type: image/jpg");
$fileExtension = strtolower(pathinfo($data["Name"], PATHINFO_EXTENSION));
$width = (isset($_GET["width"]) ? $_GET["width"]."px" : "");
if($fileExtension == "jpg"){
$code = "<img width=\"".$width."\" src=\"data:image/jpg;charset=utf8;base64,".base64_encode($code)."\" />";
}elseif($fileExtension == "png"){
$code = "<img width=\"".$width."\" src=\"data:image/png;charset=utf8;base64,".base64_encode($code)."\" />";
}elseif($fileExtension == "jpeg"){
$code = "<img width=\"".$width."\" src=\"data:image/jpeg;charset=utf8;base64,".base64_encode($code)."\" />";
}elseif($fileExtension == "gif"){
$code = "<img width=\"".$width."\" src=\"data:image/gif;charset=utf8;base64,".base64_encode($code)."\" />";
}
//header("Content-Type: image/jpg");
return $code;
}, "HTML" => False, "EditHandler" => function (int $Id, $data){}, "CreateNewContent" => True, "ContentCreateHandler" => "Upload", "ContentEditHandler" => "Upload"];
?>

0 comments on commit 9b65bd0

Please sign in to comment.