|
From: <ir...@us...> - 2012-11-07 12:51:05
|
Revision: 10246
http://sourceforge.net/p/xoops/svn/10246
Author: irmtfan
Date: 2012-11-07 12:51:02 +0000 (Wed, 07 Nov 2012)
Log Message:
-----------
bug fix: in XOOPSCORE/search.php $xoopsModuleConfig and $xoopsModule is not set
Modified Paths:
--------------
XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt
XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php
Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt
===================================================================
--- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-11-07 00:33:42 UTC (rev 10245)
+++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-11-07 12:51:02 UTC (rev 10246)
@@ -1,3 +1,8 @@
+date 2012-11-07
+===================================
+1- bug fix: in XOOPSCORE/search.php $xoopsModuleConfig and $xoopsModule is not set
+in newbb/include/search.inc.php
+
date 2012-11-06
===================================
1- bug fix: in view all topic page: a typo "all" instead of all when the status is not set
Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php
===================================================================
--- XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php 2012-11-07 00:33:42 UTC (rev 10245)
+++ XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php 2012-11-07 12:51:02 UTC (rev 10246)
@@ -13,11 +13,19 @@
if (!defined('XOOPS_ROOT_PATH')) {
exit();
}
+include_once XOOPS_ROOT_PATH . "/modules/newbb/include/functions.ini.php";
function newbb_search($queryarray, $andor, $limit, $offset, $userid, $forums = 0, $sortby = 0, $searchin = "both", $criteriaExtra = "")
{
global $myts;
-
+ // irmtfan - in XOOPSCORE/search.php $xoopsModuleConfig is not set
+ if ( !isset($GLOBALS["xoopsModuleConfig"]) ) {
+ $GLOBALS["xoopsModuleConfig"] = newbb_load_config();
+ }
+ // irmtfan - in XOOPSCORE/search.php $xoopsModule is not set
+ if ( !is_object($GLOBALS["xoopsModule"]) && is_object($GLOBALS["module"]) && $GLOBALS["module"]->getVar("dirname") == "newbb" ) {
+ $GLOBALS["xoopsModule"] = $GLOBALS["module"];
+ }
$forum_handler = xoops_getmodulehandler('forum', 'newbb');
$valid_forums = $forum_handler->getIdsByValues($forums); // can we use view permission? $forum_handler->getIdsByValues($forums, "view")
|