mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-02-05 13:08:21 +00:00
Fixing that really annoying bug
This commit is contained in:
parent
48f2e1b365
commit
a2e4507b46
|
@ -62,7 +62,7 @@ class Account {
|
|||
*/
|
||||
function get_user_info($conn, $id) {
|
||||
// Setting SQL query
|
||||
$sql = "SELECT * FROM users WHERE id = ".$id;
|
||||
$sql = "SELECT id, username FROM users WHERE id = ".$id;
|
||||
// Getting results
|
||||
$query = mysqli_query($conn, $sql);
|
||||
// Fetching associated info
|
||||
|
@ -79,7 +79,7 @@ class Account {
|
|||
function is_admin($conn, $id) {
|
||||
if (isset($id) || !empty($id)) {
|
||||
// Setting SQL query
|
||||
$sql = "SELECT * FROM users WHERE id = ".$id;
|
||||
$sql = "SELECT admin FROM users WHERE id = ".$id;
|
||||
// Getting results
|
||||
$query = mysqli_query($conn, $sql);
|
||||
// Fetching associated info
|
||||
|
|
|
@ -332,7 +332,7 @@
|
|||
</form>";
|
||||
flyoutShow(header, description, actionBox);
|
||||
|
||||
$('#descriptionInput').val("<?php echo str_replace('"', '\"', $image_alt); ?>");
|
||||
$('#descriptionInput').val("<?php if ($image_alt != "No description avalible") echo str_replace('"', '\"', $image_alt); ?>");
|
||||
|
||||
$("#descriptionConfirm").submit(function(event) {
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue