Beispiel #1
0
 * @copyright	Copyright (C) 2013 Cook Self Service. All rights reserved.
 * @author		J. HUARD (http://j-cook.pro) - G. Tomaselli (http://bygiro.com)
 * @license     MIT License (MIT)
 */
defined('_JEXEC') or die;
@define("DS", DIRECTORY_SEPARATOR);
@define('PATH_LIBRARY_JDOM', JPATH_SITE . DS . 'libraries' . DS . 'jdom');
jimport('joomla.version');
$version = new JVersion();
if (!class_exists('CkJLoader')) {
    // Joomla! 1.6 - 1.7
    if (version_compare($version->RELEASE, '2.5', '<')) {
        // Load the missing class file
        require_once PATH_LIBRARY_JDOM . DS . 'legacy' . DS . 'loader.php';
        // Register the autoloader functions.
        CkJLoader::setup();
    } else {
        class CkJLoader extends JLoader
        {
        }
    }
}
/**
 * Jdom plugin class.
 *
 * @package     Joomla.plugin
 * @subpackage  System.jdom
 */
class plgSystemJdom extends JPlugin
{
    public function onAfterInitialise()
Beispiel #2
0
 protected function includeFile($relativeName, $className)
 {
     $file = $this->searchFile($relativeName);
     //Not founded
     if (!$file) {
         return false;
     }
     CkJLoader::register($className, $file);
     return true;
 }
Beispiel #3
0
    } else {
        class CkJLoader extends JLoader
        {
        }
    }
}
// Automatically find the class files (Platform 12.1)
CkJLoader::registerPrefix('RtiprintClass', JPATH_ADMIN_RTIPRINT . DS . 'classes');
CkJLoader::registerPrefix('RtiprintHelper', JPATH_ADMIN_RTIPRINT . DS . 'helpers');
// Find Legacy Files (class files missing in previous versions)
CkJLoader::registerPrefix('RtiprintLegacy', JPATH_ADMIN_RTIPRINT . DS . 'legacy');
CkJLoader::discover('RtiprintClass', JPATH_ADMIN_RTIPRINT . DS . 'classes');
CkJLoader::discover('RtiprintHelper', JPATH_ADMIN_RTIPRINT . DS . 'helpers');
// Some helpers
CkJLoader::register('JToolBarHelper', JPATH_ADMINISTRATOR . DS . "includes" . DS . "toolbar.php", true);
CkJLoader::register('JSubMenuHelper', JPATH_ADMINISTRATOR . DS . "includes" . DS . "toolbar.php", true);
// Register all Models because of unsolved random JLoader issue.
// Cook offers 3 months subscribtion for the person who solve this issue.
JLoader::register('RtiprintModelChangelogs', JPATH_COMPONENT . DS . 'models' . DS . 'changelogs.php');
JLoader::register('RtiprintModelChangelog', JPATH_COMPONENT . DS . 'models' . DS . 'changelog.php');
JLoader::register('RtiprintModelTowns', JPATH_COMPONENT . DS . 'models' . DS . 'towns.php');
JLoader::register('RtiprintModelTown', JPATH_COMPONENT . DS . 'models' . DS . 'town.php');
JLoader::register('RtiprintModelBuildings', JPATH_COMPONENT . DS . 'models' . DS . 'buildings.php');
JLoader::register('RtiprintModelBuilding', JPATH_COMPONENT . DS . 'models' . DS . 'building.php');
JLoader::register('RtiprintModelOperatingsystems', JPATH_COMPONENT . DS . 'models' . DS . 'operatingsystems.php');
JLoader::register('RtiprintModelOperatingsystem', JPATH_COMPONENT . DS . 'models' . DS . 'operatingsystem.php');
JLoader::register('RtiprintModelServers', JPATH_COMPONENT . DS . 'models' . DS . 'servers.php');
JLoader::register('RtiprintModelServer', JPATH_COMPONENT . DS . 'models' . DS . 'server.php');
JLoader::register('RtiprintModelManufacturers', JPATH_COMPONENT . DS . 'models' . DS . 'manufacturers.php');
JLoader::register('RtiprintModelManufacturer', JPATH_COMPONENT . DS . 'models' . DS . 'manufacturer.php');
JLoader::register('RtiprintModelPrintermdls', JPATH_COMPONENT . DS . 'models' . DS . 'printermdls.php');