NobuNobu
nobun****@users*****
2006年 4月 3日 (月) 14:44:19 JST
Index: xoops2jp/html/modules/base/class/modulePreloadWating.class.php diff -u xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.1 xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.2 --- xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.1 Sun Apr 2 23:54:54 2006 +++ xoops2jp/html/modules/base/class/modulePreloadWating.class.php Mon Apr 3 14:44:19 2006 @@ -9,78 +9,79 @@ } function callbackWatingShow(&$controller,&$eventArgs) { + $xoopsDB =& Database::getInstance(); // for News Module $module_handler =& xoops_gethandler('module'); if ($module_handler->getCount(new Criteria('dirname', 'news'))) { - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("stories")." WHERE published=0"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")." WHERE published=0"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/news/admin/index.php?op=newarticle"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_SUBMS; $eventArgs['modules'][] = $blockVal; } } // for MyLinks Module if ($module_handler->getCount(new Criteria('dirname', 'mylinks'))) { - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mylinks_links")." WHERE status=0"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status=0"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listNewLinks"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_WLNKS; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mylinks_broken")); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_broken")); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listBrokenLinks"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_BLNK; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mylinks_mod")); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_mod")); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listModReq"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_MLNKS; $eventArgs['modules'][] = $blockVal; } } // for MyDownloads Modules if ($module_handler->getCount(new Criteria('dirname', 'mydownloads'))) { - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mydownloads_downloads")." WHERE status=0"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status=0"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listNewDownloads"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_WDLS; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mydownloads_broken").""); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_broken").""); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listBrokenDownloads"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_BFLS; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mydownloads_mod").""); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_mod").""); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listModReq"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_MFLS; $eventArgs['modules'][] = $blockVal; } } // for Comments - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("xoopscomments")." WHERE com_status=1"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_status=1"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/system/admin.php?module=0&status=1&fct=comments"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] =_MB_BASE_COMPEND; $eventArgs['modules'][] = $blockVal; }