aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorv12mike <github@ingenious.co.nz>2019-09-10 08:33:01 -0400
committerMarc Alexander <admin@m-a-styles.de>2019-11-21 13:44:19 +0100
commit63b7518a0f8b09d23a0d45c50d98aa3ff607f613 (patch)
tree00fab54c2fd8658d889eb264d49983d5da84a3c3 /phpBB/viewforum.php
parent01b0ec19c681b76b59ae37c77d56357b2197bb8b (diff)
downloadforums-63b7518a0f8b09d23a0d45c50d98aa3ff607f613.tar
forums-63b7518a0f8b09d23a0d45c50d98aa3ff607f613.tar.gz
forums-63b7518a0f8b09d23a0d45c50d98aa3ff607f613.tar.bz2
forums-63b7518a0f8b09d23a0d45c50d98aa3ff607f613.tar.xz
forums-63b7518a0f8b09d23a0d45c50d98aa3ff607f613.zip
[ticket/9837] Make unapproved posts visible to posters
Improvements for feature following review PHPBB3-9837
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 4691512cbd..f6107b7c3b 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -899,6 +899,11 @@ if (count($topic_list))
// Replies
$replies = $phpbb_content_visibility->get_count('topic_posts', $row, $topic_forum_id) - 1;
+ //correct for case of unapproved topic visible to poster - a bit dirty but efficient
+ if ($replies < 0)
+ {
+ $replies++;
+ }
if ($row['topic_status'] == ITEM_MOVED)
{
span> $f failed: $!\n"; print F foreach @_ } sub logit { outpend "/var/log/etc-monitorer.log", sprintf("[%s] @_\n", chomp_(`date`)) } foreach my $dir (@ARGV) { my $destdir = '/home/.sysconf/' . cat_('/var/lib/machine_ident'); my @etcfiles = glob_("$dir/*"); foreach (@etcfiles) { if ($_ eq '/etc/sudoers' #- /etc/sudoers can't be a link || $_ eq '/etc/mtab' #- same for /etc/mtab || !-f || -l && readlink =~ m|^/|) { #- we want to trap relative symlinks only next; } my $dest = "$destdir$_"; mkdir_p(dirname($dest)); #- case of newly created directories logit("restoring broken symlink $_ -> $dest"); if (-l) { system("cp $_ $dest 2>/dev/null"); } else { system("mv $_ $dest 2>/dev/null"); } symlinkf($dest, $_); } foreach (difference2([ grep { -f && s/^\Q$destdir\E// } glob_("$destdir$dir/*") ], [ @etcfiles ])) { logit("removing $destdir$_ because of deleted $_"); unlink "$destdir$_"; } }