|
From: <rgr...@us...> - 2014-01-16 01:40:46
|
Revision: 12262
http://sourceforge.net/p/xoops/svn/12262
Author: rgriffith
Date: 2014-01-16 01:40:42 +0000 (Thu, 16 Jan 2014)
Log Message:
-----------
Fixes #1291 - xoops_getModuleOption() did not respect $dirname
Applied patch supplied by andrey3761
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php 2014-01-15 22:55:17 UTC (rev 12261)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php 2014-01-16 01:40:42 UTC (rev 12262)
@@ -977,8 +977,8 @@
function xoops_getModuleOption($option, $dirname = '')
{
static $modOptions = array();
- if (is_array($modOptions) && array_key_exists($option, $modOptions)) {
- return $modOptions[$option];
+ if (is_array($modOptions) && isset($modOptions[$dirname][$option])) {
+ return $modOptions[$dirname][$option];
}
$ret = false;
@@ -991,7 +991,7 @@
$ret = $moduleConfig[$option];
}
}
- $modOptions[$option] = $ret;
+ $modOptions[$dirname][$option] = $ret;
return $ret;
}
|