Removed a debug message, added a re-selection of data if the password is converted, fixed issue where files could not be uploaded due to directory option added.

This commit is contained in:
xevidos 2019-03-13 13:57:32 -04:00
parent 5b9e048758
commit 819408c0f5
3 changed files with 5 additions and 7 deletions

View file

@ -19,7 +19,7 @@ checkSession();
<label><?php i18n("Upload Files"); ?></label> <label><?php i18n("Upload Files"); ?></label>
<div id="upload-drop-zone"> <div id="upload-drop-zone">
<span id="upload-wrapper"> <span id="upload-wrapper">
<input id="fileupload" type="file" name="upload[]" data-url="components/filemanager/controller.php?action=upload&path=<?php echo($_GET['path']); ?>" multiple directory webkitdirectory mozdirectory> <input id="fileupload" type="file" name="upload[]" data-url="components/filemanager/controller.php?action=upload&path=<?php echo($_GET['path']); ?>" multiple>
<span id="upload-clicker"><?php i18n("Drag Files or Click Here to Upload"); ?></span> <span id="upload-clicker"><?php i18n("Drag Files or Click Here to Upload"); ?></span>
</span> </span>
<div id="upload-progress"><div class="bar"></div></div> <div id="upload-progress"><div class="bar"></div></div>

View file

@ -167,10 +167,6 @@ class User {
public function Authenticate() { public function Authenticate() {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if( $this->username == "" || $this->password == "" ) { if( $this->username == "" || $this->password == "" ) {
exit( formatJSEND( "error", "Username or password can not be blank." ) ); exit( formatJSEND( "error", "Username or password can not be blank." ) );
@ -239,6 +235,10 @@ class User {
$query = "UPDATE users SET password=? WHERE username=?;"; $query = "UPDATE users SET password=? WHERE username=?;";
$bind_variables = array( $this->password, $this->username ); $bind_variables = array( $this->password, $this->username );
$return = $sql->query( $query, $bind_variables, array() ); $return = $sql->query( $query, $bind_variables, array() );
$query = "SELECT * FROM users WHERE username=? AND password=?;";
$bind_variables = array( $this->username, $this->password );
$return = $sql->query( $query, $bind_variables, array() );
} }
} }

View file

@ -72,8 +72,6 @@
authenticate: function() { authenticate: function() {
console.log( this.loginForm.serialize() );
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: this.controller + '?action=authenticate', url: this.controller + '?action=authenticate',