Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #16  
Old 13 Sep 2013, 20:32
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
If you're talking about trying the last code you posted above, that won't work because the only way the condition would be true is if pm.folderid was equal to -1 and to 0. If you wanted to do it that way you'd need an OR (and add parens), like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


But that's actually equivalent to "AND pm.folderid IN (0, -1)", which is what you get by removing the NOT.
Reply With Quote
  #17  
Old 13 Sep 2013, 20:33
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Real name: Anthony
Check the PM folders after it runs on its own for PM's that got deleted, but left the msg in the box, you will no longer be able to click or delete via the forum.
Reply With Quote
  #18  
Old 15 Sep 2013, 15:35
smirkley smirkley is offline
 
Join Date: Apr 2008
Originally Posted by kh99 View Post
If you're talking about trying the last code you posted above, that won't work because the only way the condition would be true is if pm.folderid was equal to -1 and to 0. If you wanted to do it that way you'd need an OR (and add parens), like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


But that's actually equivalent to "AND pm.folderid IN (0, -1)", which is what you get by removing the NOT.
Forgot to return to this, but yes you are correct. My attempt didnt work as you suggested. Didnt prune anything in tests.

I will try your suggestion next and report back the results.

Is there a preferred methed? Use the OR or use the AND without the NOT?
Reply With Quote
  #19  
Old 15 Sep 2013, 15:52
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by smirkley View Post
Is there a preferred methed? Use the OR or use the AND without the NOT?
No, it's just two different ways of expressing the same condition.
Reply With Quote
  #20  
Old 16 Sep 2013, 00:02
smirkley smirkley is offline
 
Join Date: Apr 2008
Originally Posted by kh99 View Post
If you're talking about trying the last code you posted above, that won't work because the only way the condition would be true is if pm.folderid was equal to -1 and to 0. If you wanted to do it that way you'd need an OR (and add parens), like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


But that's actually equivalent to "AND pm.folderid IN (0, -1)", which is what you get by removing the NOT.
That did the trick on a manual run of the cron. I will be testing it on auto cron tonight, but it looks like it worked perfect.

Thank you once again kh99
(I will likely post these changes on the original 3.7 thread)
(if it says reusable code, does that mean I can submit this in my name with original credits as a new 4.x mod?)
Reply With Quote
  #21  
Old 17 Sep 2013, 04:42
smirkley smirkley is offline
 
Join Date: Apr 2008
Thank you all.

I checked tonight to verify a natural automatic cron prune of stale pm's on a test account in a test usergroup.

Previously I verified it works as desired with a manual run of the cron, but I wanted additional verification on auto-cron plus to check for any other anomoloies.

I logged in and noticed it hadnt worked. I logged in my acp and looked at my cron que and noticed a few of them had stacked up due to lack of traffic. So I clicked my forum a few times and rechecked the cron. Caught up and done according to logs. Then I logged in my test account, and low and behold, it worked and worked perfectly in both inbox and sent folders, leaving custom folders untouched.


Now, as far as this problem suggested,..
Originally Posted by snakes1100 View Post
That hack doesnt work 100% regardless of changing the xml file, your going to end up with bad results on deleted PM records still showing up for users, which they cant get rid of.
I have no idea what this is referring to as two test user accounts, two different usergroups, and three manual cron tests and two auto cron tests,... and I have not experienced this at all.

In fact, it works perfectly.


THANK YOU all that helped !!
Reply With Quote
  #22  
Old 15 May 2014, 13:52
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Originally Posted by smirkley View Post
Thank you all.

I checked tonight to verify a natural automatic cron prune of stale pm's on a test account in a test usergroup.

Previously I verified it works as desired with a manual run of the cron, but I wanted additional verification on auto-cron plus to check for any other anomoloies.

I logged in and noticed it hadnt worked. I logged in my acp and looked at my cron que and noticed a few of them had stacked up due to lack of traffic. So I clicked my forum a few times and rechecked the cron. Caught up and done according to logs. Then I logged in my test account, and low and behold, it worked and worked perfectly in both inbox and sent folders, leaving custom folders untouched.


Now, as far as this problem suggested,..

I have no idea what this is referring to as two test user accounts, two different usergroups, and three manual cron tests and two auto cron tests,... and I have not experienced this at all.

In fact, it works perfectly.


THANK YOU all that helped !!
Hello smirkley, I am trying to add this to my forums and I would like to know what was the final changes you did to the prunepms.php file to get this working like you wanted it to. Can you please share it my Man?
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Administrative and Maintenance Tools Auto Purge Threads Seductor vBulletin 4.x Add-ons 74 11 Nov 2019 12:08



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:20.

Layout Options | Width: Wide Color: