From db8006f673ceefeea7982bc181f8f97311ed08c2 Mon Sep 17 00:00:00 2001 From: xevidos Date: Wed, 12 Dec 2018 11:10:15 -0500 Subject: [PATCH] Fixed find not focusing automatically, fixed updater showing error when there was no error, Fixed column that was showing due to failure to remove. --- components/editor/dialog.php | 1 + components/update/update.php | 12 ++++++++++-- components/user/dialog.php | 5 ++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/components/editor/dialog.php b/components/editor/dialog.php index cede631..594360f 100755 --- a/components/editor/dialog.php +++ b/components/editor/dialog.php @@ -53,6 +53,7 @@ switch($_GET['action']){ $(function(){ $('textarea[name="find"]').val(codiad.active.getSelectedText()); + $('textarea[name="find"]').focus(); }); diff --git a/components/update/update.php b/components/update/update.php index 72b6803..21e4bcf 100755 --- a/components/update/update.php +++ b/components/update/update.php @@ -320,6 +320,13 @@ ALTER TABLE `user_options` MODIFY `id` INT(11) NOT NULL AUTO_INCREMENT; $bind = "sss"; $bind_variables = array( $data["name"], $data["path"], $owner ); $return = sql::sql( $sql, $bind, $bind_variables, formatJSEND( "error", "Error creating project $project." ) ); + + if( sql::check_sql_error( $return ) ) { + } else { + + $this->restore(); + exit(formatJSEND( "error", "There was an error adding projects to database." )); + } } unlink( $projects_file ); } @@ -345,10 +352,11 @@ ALTER TABLE `user_options` MODIFY `id` INT(11) NOT NULL AUTO_INCREMENT; $this->username = $user["username"]; $this->set_default_options(); - echo formatJSEND( "success", array( "username" => $user["username"] ) ); + //echo formatJSEND( "success", array( "username" => $user["username"] ) ); } else { - echo formatJSEND( "error", "The Username is Already Taken" ); + $this->restore(); + exit(formatJSEND( "error", "The Username is Already Taken" )); } } unlink( $users_file ); diff --git a/components/user/dialog.php b/components/user/dialog.php index f4a51eb..2af0eab 100755 --- a/components/user/dialog.php +++ b/components/user/dialog.php @@ -35,17 +35,16 @@ -
- +
list_users(); - foreach( $users as $user => $data ){ + foreach( $users as $user => $data ) { ?>