Bootstrap 5 continued + bugfixes

This commit is contained in:
Joey Kimsey
2024-12-15 17:19:08 -05:00
parent de6d608857
commit 2220c6cda3
27 changed files with 198 additions and 148 deletions

View File

@ -214,6 +214,10 @@ class Forms extends Check {
* @return {bool}
*/
public static function passwordResetCode() {
if ( !Input::exists( 'resetCode' ) ) {
self::addUserError( 'Invalid resetCode.' );
return false;
}
if ( !self::token() ) {
return false;
}

View File

@ -212,12 +212,13 @@ class Preferences {
}
if ( 'file' == $details['type'] ) {
if ( Input::exists( $name ) ) {
$folder = IMAGE_UPLOAD_DIRECTORY . App::$activeUser->username . DIRECTORY_SEPARATOR;
if ( !Upload::image( $name, $folder ) ) {
Issues::add( 'error', [ 'There was an error with your upload.' => Check::systemErrors() ] );
} else {
$folder = UPLOAD_DIRECTORY . App::$activeUser->username . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR;
$upload = Upload::image( $name, $folder );
if ( $upload ) {
$route = str_replace( APP_ROOT_DIRECTORY, '', $folder );
$prefsArray[$name] = $route . Upload::last();
} else {
Issues::add( 'error', [ 'There was an error with your upload.' => Check::userErrors() ] );
}
}
}