Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. */
  2. protected function _getSkinHooks( $name, $classname, $id )
  3. {
  4. /* Hooks: Are we overloading this class? */
  5. $hooksCache = ipsRegistry::cache()->getCache('hooks');
  6.  
  7. if( isset($hooksCache['skinHooks'][ $name ]) && is_array($hooksCache['skinHooks'][ $name ]) && count($hooksCache['skinHooks'][ $name ]) )
  8. {
  9. foreach( $hooksCache['skinHooks'][ $name ] as $classOverloader )
  10. {
  11. if( is_file( IPS_HOOKS_PATH . $classOverloader['filename'] ) )
  12. {
  13. if( ! class_exists( $classOverloader['className'] ) )
  14. {
  15. /* Hooks: Do we have the hook file? */
  16. $thisContents = file_get_contents( IPS_HOOKS_PATH . $classOverloader['filename'] );
  17. $thisContents = str_replace( $name."(~id~)", $classname, $thisContents );
  18.  
  19. ob_start();
  20. eval( $thisContents );
  21. ob_end_clean(); //linia problema (3849)
  22. }
  23.  
  24. if( class_exists( $classOverloader['className'] ) )
  25. {
  26. /* Hooks: We have the hook file and the class exists - reset the classname to load */
  27. $classname = $classOverloader['className'];
  28. }
  29. }
  30. }
  31. }
  32.  
  33. return $classname;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement