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 @@