
04-01-2012, 01:36 AM
|
 |
|
|
Join Date: May 2010
Location: Florida
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
You can rest assure this clown has misunderstood what you said 95% of his posts are misunderstandings..........lol
Quote:
Originally Posted by nhawk
I think you misunderstood what I said.
Promotions.php contains this code (note the "save a bit of cpu time.")..
Code:
// $nextrun is the time difference between runs. Should be sent over from cron.php!!
// We only check the users that have been active since the lastrun to save a bit of cpu time.
$thisrun = TIMENOW;
$lastrun = $vbulletin->crondata['promotions_lastrun'] ? $vbulletin->crondata['promotions_lastrun'] : $thisrun - ($nextrun - $thisrun);
$promotions = $vbulletin->db->query_read("
SELECT user.joindate, user.userid, user.membergroupids, user.posts, user.reputation,
user.usergroupid, user.displaygroupid, user.customtitle, user.username, user.ipoints,
userpromotion.joinusergroupid, userpromotion.reputation AS jumpreputation, userpromotion.posts AS jumpposts,
userpromotion.date AS jumpdate, userpromotion.type, userpromotion.strategy,
usergroup.title, usergroup.usertitle AS ug_usertitle,
usertextfield.rank
FROM " . TABLE_PREFIX . "user AS user
INNER JOIN " . TABLE_PREFIX . "userpromotion AS userpromotion ON (user.usergroupid = userpromotion.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (userpromotion.joinusergroupid = usergroup.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON (usertextfield.userid = user.userid)
" . iif(VB_AREA != 'AdminCP', "WHERE user.lastactivity >= $lastrun")
);
That code does not allow the promotions system to move users to a different usergroup if they have been inactive in 30 days. The only way to fix that is to remove the .iif at the end of the query.
And FYI, this is confirmed and in the product backlog in JIRA. http://tracker.vbulletin.com/browse/VBIV-12929
But we are so far off topic now that I think it's time to stop posting the good/bad of vB 4. 
|
|