xoops forums

fabou78

Friend of XOOPS
Posted on: 9/20 18:35
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 41
Since: 2012/6/16
#1

Issue with synchronize buttons in user admin panel

There is an issue with the synchronize option in admin->users as if you click on synchronize button at the top or any synchronize button associated with a particular user it will reset the NewBB count to zero even if a user has tons of posts in the forums.

I found out that the issue is related to SQL calls to table “bb_posts” while the correct table name is “newbb_posts” (it seem to me that this table has been renamed to “newbb_posts” at some point).

I have made the following changes in /modules/system/admin/users/jquery.php at line 53
-            $tables[] = array('table_name' => 'bb_posts''uid_column' => 'uid');
+            
$tables[] = array('table_name' => 'newbb_posts''uid_column' => 'uid');

for the per user synchronize option

And the following changes in /modules/system/admin/users/users.php at line 232
-        $tables[] = array('table_name' => 'bb_posts''uid_column' => 'uid');
+        
$tables[] = array('table_name' => 'newbb_posts''uid_column' => 'uid');

for the general (all users) synchronize option

Both corrections seem to work.


Can someone confirm if this is good enough?

I don’t know PHP and XOOPS so I can’t judge it would not introduce another issue somewhere else nor if there is somewhere else in the code that would need similar corrections.

The file modules/newbb/include/config.php seem to have quite a few more references to the old naming convention ( from line 81) can’t really figure out what this is doing.

I am happy to raise issue and submit corrections on github if that’s all needed to be done.

fabou78

Friend of XOOPS
Posted on: 9/21 7:40
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 41
Since: 2012/6/16
#2

Re: Issue with synchronize buttons in user admin panel

Issue #695 created on github https://github.com/XOOPS/XoopsCore25/issues/695