Skip to content

Commit

Permalink
Merge pull request #26 from nbuy/master
Browse files Browse the repository at this point in the history
fix xoops_gethandler() for internal class in cube_legacy 2.2.1
  • Loading branch information
kilica committed Aug 15, 2012
2 parents 62b83fb + bb3d66e commit 8dc545a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion html/include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,13 @@ function &xoops_gethandler($name, $optional = false )
XCube_DelegateUtils::call('Legacy.Event.GetHandler', new XCube_Ref($handler), $name, $optional);
if ($handler) return $handlers[$name] =& $handler;

require_once XOOPS_ROOT_PATH.'/kernel/'.$name.'.php';
// internal Class handler exist
if (XC_CLASS_EXISTS($class = 'Xoops'.ucfirst($name).'Handler')) {
$handlers[$name] = $handler = new $class($GLOBALS['xoopsDB']);
return $handler;
}
include_once XOOPS_ROOT_PATH.'/kernel/'.$name.'.php';
if (XC_CLASS_EXISTS($class)) {
$handlers[$name] = $handler = new $class($GLOBALS['xoopsDB']);
return $handler;
}
Expand Down

1 comment on commit 8dc545a

@bluemooninc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see

Please sign in to comment.