PageRenderTime 44ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/redirect/code/trunk/administrator/components/com_redirect/libraries/loader.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 51 lines | 16 code | 5 blank | 30 comment | 2 complexity | c3759002d7c292a54844f5fd37d5297b MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: loader.php 576 2011-02-25 05:03:45Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage com_artofpdf
  6. * @copyright Copyright 2005 - 2011 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License version 2 or later.
  8. * @link http://www.theartofjoomla.com
  9. * @author Andrew Eddie <support@theartofjoomla.com>
  10. */
  11. // no direct access
  12. defined('_JEXEC') or die;
  13. /**
  14. * Replacement for jimport that falls back to jimport.
  15. *
  16. * @param string $path The library path.
  17. *
  18. * @return
  19. * @since 1.0
  20. * @author Sam Moffat
  21. */
  22. function juimport($path)
  23. {
  24. // Attempt to load the path locally but...
  25. // Unfortunately 1.5 doesn't check the file exists before including it so we mask it
  26. $res = JLoader::import($path, dirname(__FILE__));
  27. if (!$res) {
  28. // fall back when it doesn't work
  29. return jimport($path);
  30. }
  31. return $res;
  32. }
  33. if (!function_exists('jximport')) {
  34. /**
  35. * Proxy for juimport function.
  36. *
  37. * @param string $path The library path.
  38. *
  39. * @return
  40. * @since 1.0
  41. */
  42. function jximport($path)
  43. {
  44. return juimport($path);
  45. }
  46. }