mirror of https://github.com/BOINC/boinc.git
When the user sees her own posts or a moderator looks at them deleted ones will be marked as deleted. In all other situations deleted posts will not be shown.
(by Jens Seidler) svn path=/trunk/boinc/; revision=5188
This commit is contained in:
parent
0d9e784638
commit
b5cd558293
|
@ -3,18 +3,36 @@
|
||||||
require_once('../inc/util.inc');
|
require_once('../inc/util.inc');
|
||||||
require_once('../inc/time.inc');
|
require_once('../inc/time.inc');
|
||||||
require_once('../inc/forum.inc');
|
require_once('../inc/forum.inc');
|
||||||
|
require_once('../inc/user.inc');
|
||||||
|
require_once('../inc/db.inc');
|
||||||
db_init();
|
db_init();
|
||||||
|
|
||||||
$userid = $_GET['userid'];
|
$userid = $_GET['userid'];
|
||||||
$offset = $_GET['offset'];
|
$offset = $_GET['offset'];
|
||||||
if (!$offset) $offset=0;
|
if (!$offset) $offset=0;
|
||||||
|
if (!$userid) $userid=-1;
|
||||||
|
$hide = 1;
|
||||||
$count = 10;
|
$count = 10;
|
||||||
|
|
||||||
$user = lookup_user_id($userid);
|
$user = lookup_user_id($userid);
|
||||||
|
$logged_in_user = get_logged_in_user(false);
|
||||||
|
|
||||||
|
if( $logged_in_user = get_logged_in_user(false) ) {
|
||||||
|
$logged_in_user = getForumPreferences($logged_in_user);
|
||||||
|
if ( $user->id == $logged_in_user->id || isSpecialUser($logged_in_user,0) ) $hide = 0;
|
||||||
|
}
|
||||||
page_head("Posts by $user->name");
|
page_head("Posts by $user->name");
|
||||||
$result = mysql_query("select * from post where user=$userid order by id desc limit $offset,$count");
|
|
||||||
|
if( $hide ) {
|
||||||
|
$result = mysql_query("select * from post
|
||||||
|
where user=$userid
|
||||||
|
and hidden=0
|
||||||
|
order by id desc limit $offset,$count");
|
||||||
|
} else {
|
||||||
|
$result = mysql_query("select * from post
|
||||||
|
where user=$userid
|
||||||
|
order by id desc limit $offset,$count");
|
||||||
|
}
|
||||||
$n = 0;
|
$n = 0;
|
||||||
start_table();
|
start_table();
|
||||||
while($post = mysql_fetch_object($result)) {
|
while($post = mysql_fetch_object($result)) {
|
||||||
|
|
Loading…
Reference in New Issue