Fix author not seeing self priv questions
This commit is contained in:
parent
b0a0698c06
commit
b2c13d22d0
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
include("../include/settings.php");
|
include("../include/settings.php");
|
||||||
|
include("../include/functions.php");
|
||||||
|
|
||||||
if(!isset($_GET["q"])){
|
if(!isset($_GET["q"])){
|
||||||
echo("Question not specified.");
|
echo("Question not specified.");
|
||||||
|
|
2
user.php
2
user.php
|
@ -60,7 +60,7 @@ if(isset($_GET["p"])){
|
||||||
$h_user = $db->query("SELECT * FROM users WHERE id = " . $h_question["by"] . ";")->fetchArray(SQLITE3_ASSOC);
|
$h_user = $db->query("SELECT * FROM users WHERE id = " . $h_question["by"] . ";")->fetchArray(SQLITE3_ASSOC);
|
||||||
|
|
||||||
$q_key = md5($h_question["question"]);
|
$q_key = md5($h_question["question"]);
|
||||||
if($p_user["id"] == $h_question["user"] and ($h_question["private"] != 1 or $q_md5 != $_GET["key"])){ // Only show question that are for this user
|
if($p_user["id"] == $h_question["user"] and ($h_question["private"] != 1 or $q_md5 != $_GET["key"] or $is_current_user)){ // Only show question that are for this user
|
||||||
|
|
||||||
echo('<div class="highlighted-post">');
|
echo('<div class="highlighted-post">');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue