From: <du...@us...> - 2012-12-12 13:47:00
|
Revision: 10370 http://sourceforge.net/p/xoops/svn/10370 Author: dugris Date: 2012-12-12 13:46:57 +0000 (Wed, 12 Dec 2012) Log Message: ----------- fix Users Synchronize post for installed modules Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/jquery.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php 2012-12-12 12:59:08 UTC (rev 10369) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php 2012-12-12 13:46:57 UTC (rev 10370) @@ -168,4 +168,9 @@ $modversion['config'][$i]['formtype'] = 'select'; $modversion['config'][$i]['valuetype'] = 'text'; $modversion['config'][$i]['options'] = array(date('H:i') => 'H:i', date('H:i:s') => 'H:i:s', date('H:i A') => 'H:i A' , date('H:i:s A ') => 'H:i:s A'); -$modversion['config'][$i]['default'] = 'H:i:s'; \ No newline at end of file +$modversion['config'][$i]['default'] = 'H:i:s'; + +// Users Synchronize post +$modversion['sync']['table_name'] = 'page_content'; +$modversion['sync']['uid_column'] = 'content_author'; +$modversion['sync']['criteria'] = new Criteria('content_status', 1); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/jquery.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/jquery.php 2012-12-12 12:59:08 UTC (rev 10369) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/jquery.php 2012-12-12 13:46:57 UTC (rev 10370) @@ -51,10 +51,16 @@ 'table_name' => 'xoopscomments', 'uid_column' => 'com_uid', 'criteria' => new Criteria('com_status', XOOPS_COMMENT_ACTIVE) ); - // Count forum posts - if ($module_handler->getByDirname("newbb")) { - $tables[] = array('table_name' => 'bb_posts', 'uid_column' => 'uid'); + + $system_module = new SystemModule(); + $list = $system_module->getModuleList(); + foreach ($list as $k => $v) { + $sync = $v->getInfo('sync'); + if ( isset($sync) && count($sync) >= 2 ) { + $tables[] = $sync; + } } + $uid = $system->cleanVars($_REQUEST, 'uid', 'int'); $total_posts = 0; foreach ($tables as $table) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php 2012-12-12 12:59:08 UTC (rev 10369) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php 2012-12-12 13:46:57 UTC (rev 10370) @@ -54,14 +54,15 @@ 'table_name' => 'xoopscomments', 'uid_column' => 'com_uid', 'criteria' => new Criteria('com_status', XOOPS_COMMENT_ACTIVE) ); - // Count Content posts - if ($module_handler->getByDirname("fmcontent")) { - $tables[] = array('table_name' => 'fmcontent_content', 'uid_column' => 'content_uid'); + + $system_module = new SystemModule(); + $list = $system_module->getModuleList(); + foreach ($list as $k => $v) { + $sync = $v->getInfo('sync'); + if ( isset($sync) && count($sync) >= 2 ) { + $tables[] = $sync; + } } - // Count forum posts - if ($module_handler->getByDirname("newbb")) { - $tables[] = array('table_name' => 'bb_posts', 'uid_column' => 'uid'); - } switch ($type) { case 'user': |