1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Issue #1493 : Allow tracking of topics via tracking page only (no emails). (work in progress)

This commit is contained in:
Cameron
2016-04-05 11:21:53 -07:00
parent 925704309e
commit 3c2def3a31
6 changed files with 30 additions and 8 deletions

View File

@@ -327,6 +327,8 @@ class e107forum
exit;
}
$trackByEmail = ($this->prefs->get('trackemail',true)) ? true : false;
$sql = e107::getDb();
if($sql->select('forum_track', '*', "track_userid=".USERID." AND track_thread=".$threadID))
@@ -334,7 +336,7 @@ class e107forum
if($this->track('del', USERID, $threadID))
{
$ret['html'] = IMAGE_untrack;
$ret['msg'] = LAN_FORUM_8004; // "Email notifications for this topic are now turned off. ";
$ret['msg'] = ($trackByEmail) ? LAN_FORUM_8004 : LAN_FORUM_8006 ; // "Email notifications for this topic are now turned off. ";
$ret['status'] = 'info';
}
else
@@ -348,7 +350,7 @@ class e107forum
{
if($this->track('add', USERID, $threadID))
{
$ret['msg'] = LAN_FORUM_8003; // "Email notifications for this topic are now turned on. ";
$ret['msg'] = ($trackByEmail) ? LAN_FORUM_8003 : LAN_FORUM_8005; // "Email notifications for this topic are now turned on. ";
$ret['html'] = IMAGE_track;
$ret['status'] = 'ok';
}
@@ -1646,8 +1648,9 @@ class e107forum
$tp = e107::getParser();
$trackingPref = $this->prefs->get('track');
$trackingEmailPref = $this->prefs->get('trackemail',true);
if(empty($trackingPref))
if(empty($trackingPref) || empty($trackingEmailPref))
{
return false;
}