PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/content/code/trunk/administrator/components/com_artofcontent/libraries/loader.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 36 lines | 10 code | 4 blank | 22 comment | 1 complexity | b4ab272228c4ec4b824591b47674604b MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: loader.php 484 2010-12-20 23:40:27Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage com_artofcontent
  6. * @copyright Copyright 2010 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 <andrew.eddie@newlifeinit.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. }