Merge branch 'development' into 'master'

Fixed find not focusing automatically, fixed updater showing error when there…

See merge request xevidos/codiad!18
This commit is contained in:
Isaac Brown 2018-12-12 11:10:40 -05:00
commit 5bf3c9bdcb
3 changed files with 13 additions and 5 deletions

View file

@ -53,6 +53,7 @@ switch($_GET['action']){
$(function(){
<?php if($_GET['action']=='search'){ ?>
$('textarea[name="find"]').val(codiad.active.getSelectedText());
$('textarea[name="find"]').focus();
<?php } ?>
});

View file

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

View file

@ -35,17 +35,16 @@
<tr>
<th width="150"><?php i18n("Username"); ?></th>
<th width="85"><?php i18n("Password"); ?></th>
<th width="75"><?php i18n("Projects"); ?></th>
<th width="70"><?php i18n("Delete"); ?></th>
</tr>
</table>
<div class="user-wrapper">
<table width="100%" style="word-wrap: break-word;word-break: break-all;">
<table width="100%" style="word-wrap: break-word;word-break: break-all;">
<?php
// Get projects JSON data
$users = $User->list_users();
foreach( $users as $user => $data ){
foreach( $users as $user => $data ) {
?>
<tr>
<td width="150"><?php echo($data['username']); ?></td>