mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 13:36:22 +05:30
Cleaning up
Simplify add and edit content. Bugs fixes and improvements.
This commit is contained in:
parent
5f271a2370
commit
e3e393a7bd
27 changed files with 1898 additions and 3252 deletions
|
|
@ -22,8 +22,7 @@ $path = null;
|
|||
|
||||
if (login()) {
|
||||
|
||||
if (is_dir($dir)) {
|
||||
} else {
|
||||
if (!is_dir($dir)) {
|
||||
mkdir($dir, 0755, true);
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +38,7 @@ if (login()) {
|
|||
if($check !== false) {
|
||||
if ($error === UPLOAD_ERR_OK) {
|
||||
$extension = pathinfo($name, PATHINFO_EXTENSION);
|
||||
if (!in_array($extension, $whitelist)) {
|
||||
if (!in_array(strtolower($extension), $whitelist)) {
|
||||
$error = 'Invalid file type uploaded.';
|
||||
} else {
|
||||
move_uploaded_file($tmp_name, $dir . $timestamp . '-' . $name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue