Welcome to Geeklog, Anonymous Thursday, May 02 2024 @ 09:32 pm EDT

Geeklog Forums

Possible error in emailstories function


Status: offline

akerin

Forum User
Junior
Registered: 08/22/02
Posts: 19
I have just started using the manual digest to email stories (1.3.7 sr2), When sending them out the mdigest plugin would not complete (lastemailed variable not set), but email would be sent - to more users than I would have expected. Looking at lib-common under the COM_emailUserTopics function I see:

// Get users who want stories emailed to them $usersql = "SELECT username,email,etids,{$_TABLES['users']}.uid AS uuid " . "FROM {$_TABLES['users']}, {$_TABLES['userindex']} " . "WHERE {$_TABLES['userindex']}.uid = {$_TABLES['users']}.uid AND (etids <> '-')";

By changing etids <> '-' to etids <> '' this seemed to correct the error, and the email was only sent to the correct people. The mdigest also completed properly. Maybe I've screwed something up somewhere else (user table?) if this isn't a bug.

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

The meaning of the etids field changed in 1.3.7. To quote from the source (usersettings.php):

Text Formatted Code
    if (empty ($user_etids)) { // an empty string now means "all topics"    
        $user_etids = buildTopicList ();
    } elseif ($user_etids == '-') { // this means "no topics"
        $user_etids = '';
    }

bye, Dirk

 Quote

Status: offline

akerin

Forum User
Junior
Registered: 08/22/02
Posts: 19
Yep, that will be it - I returned it to '-' and changed the database table.... I also had the problem with the empty $grouplist that someone else reported - it was the same problem - group admin didn't belong to any groups...
 Quote

All times are EDT. The time is now 09:32 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content