Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
mike63740
Worker
Worker



Joined: Jun 21, 2010
Posts: 102

PostPosted: Mon Oct 30, 2017 12:08 am Reply with quote

All users get the same summary listed below.
Inbox : 1 New: 3 Read: 2 Saved: 6 Outbox: 7

I am fine-tuning a new installation in XAMPP. The installation works well or as designed.

This error comes from migrating custom settings from a previous RavenNuke 2.51 installation. My theme is fisubice.
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Mon Oct 30, 2017 5:15 am Reply with quote

Yes its a bug, I found it on a installation from a customer some months ago.

Open /modules/Your_Account/includes/ui-0privmsgs.php

find:

php Code:
	$sql = 'SELECT 1, COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type IN (0, 1, 5) UNION '

. 'SELECT 2, COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 0 UNION '
. 'SELECT 3, COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 1 UNION '
. 'SELECT 4, COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_from_userid = ' . $uid . ' AND privmsgs_type = 2 UNION '
// . 'SELECT 5, COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 3 UNION '
. 'SELECT 6, COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_from_userid = ' . $uid . ' AND privmsgs_type = 4 UNION '
. 'SELECT 7, COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 5';
$result = $db->sql_query($sql);
list(, $ya_totpms) = $db->sql_fetchrow($result); // 1
list(, $ya_oldpms) = $db->sql_fetchrow($result); // 2
list(, $ya_newpms) = $db->sql_fetchrow($result); // 3
list(, $ya_outpms) = $db->sql_fetchrow($result); // 4
// list(, $ya_savpms) = $db->sql_fetchrow($result); // 5
list(, $ya_savpms) = $db->sql_fetchrow($result); // 6
list(, $ya_outpms) = $db->sql_fetchrow($result); // 7


replace it with:

php Code:
	$result = $db->sql_query('SELECT COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type IN (0, 1, 5)');

list($ya_totpms) = $db->sql_fetchrow($result);
$result = $db->sql_query('SELECT COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 0');
list($ya_oldpms) = $db->sql_fetchrow($result);
$result = $db->sql_query('SELECT COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 1');
list($ya_newpms) = $db->sql_fetchrow($result);
$result = $db->sql_query('SELECT COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 2');
list($ya_outpms) = $db->sql_fetchrow($result);
$result = $db->sql_query('SELECT COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 4');
list($ya_savpms) = $db->sql_fetchrow($result);
$result = $db->sql_query('SELECT COUNT(*) FROM ' . $prefix . '_bbprivmsgs WHERE privmsgs_to_userid = ' . $uid . ' AND privmsgs_type = 5');
list($ya_outpms) = $db->sql_fetchrow($result);


Last edited by neralex on Mon Oct 30, 2017 4:30 pm; edited 1 time in total 
View user's profile Send private message
mike63740







PostPosted: Mon Oct 30, 2017 9:19 am Reply with quote

Error fixed.
Inbox : 0 New: 0 Read: 0 Saved: 0 Outbox: 0

neralex, thank you. Very Happy
 
neralex







PostPosted: Mon Oct 30, 2017 9:38 am Reply with quote

Cheers
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©