aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-10-12 09:21:08 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-10-12 09:21:08 +0000
commit149fff359650240ff29700b8e49794fec219f49c (patch)
tree4c5ad858d4338a17b7509e50b60d965e73092712 /phpBB/viewforum.php
parentdd83786c49696b0a72fc285cc0d3bf12119ea57d (diff)
downloadforums-149fff359650240ff29700b8e49794fec219f49c.tar
forums-149fff359650240ff29700b8e49794fec219f49c.tar.gz
forums-149fff359650240ff29700b8e49794fec219f49c.tar.bz2
forums-149fff359650240ff29700b8e49794fec219f49c.tar.xz
forums-149fff359650240ff29700b8e49794fec219f49c.zip
login prompt upon notified about new topic
enabled prune_viewed at auto_prune. git-svn-id: file:///svn/phpbb/trunk@4576 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 64de63fced..82cd462050 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -111,6 +111,12 @@ if ($forum_data['forum_password'])
login_forum_box($forum_data);
}
+// Redirect to login upon emailed notification links
+if (isset($_GET['e']) && (int) $_GET['e'] && $user->data['user_id'] == ANONYMOUS)
+{
+ login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])), '', $user->lang['LOGIN_NOTIFY_FORUM']);
+}
+
// Permissions check
if (!$auth->acl_get('f_read', $forum_id))
{
@@ -165,12 +171,18 @@ if ($forum_data['forum_type'] == FORUM_POST)
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
// Do the forum Prune thang - cron type job ...
- // TODO
- // Include viewed too... new row necessary for auto pruning...
if ($forum_data['prune_next'] < time() && $forum_data['enable_prune'])
{
include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
- auto_prune($forum_id, 'posted', $forum_data['forum_flags'], $forum_data['prune_days'], $forum_data['prune_freq']);
+
+ if ($forum_data['prune_days'])
+ {
+ auto_prune($forum_id, 'posted', $forum_data['forum_flags'], $forum_data['prune_days'], $forum_data['prune_freq']);
+ }
+ if ($forum_data['prune_viewed'])
+ {
+ auto_prune($forum_id, 'viewed', $forum_data['forum_flags'], $forum_data['prune_viewed'], $forum_data['prune_freq']);
+ }
}
// Forum rules, subscription info and word censors