示例#1
0
}

// Import the library loader if necessary.
if (!class_exists('JLoader'))
{
	require_once JPATH_PLATFORM . '/loader.php';
}

class_exists('JLoader') or die;

// Register the library base path for CMS libraries.
JLoader::registerPrefix('J', JPATH_PLATFORM . '/cms');

// Define the Joomla version if not already defined.
if (!defined('JVERSION')) {
	$jversion = new JVersion;
	define('JVERSION', $jversion->getShortVersion());
}

// Define Jokte version
require_once JPATH_PLATFORM . '/cms/version/joktev.php';
if (!defined('VJOKTE')) {
	$vjokte = new JVjokte;
	define('VJOKTE', $vjokte->getVersionCorta());
}

// Register the location of renamed classes so they can be autoloaded
// The old name are considered deprecated and this should be removed in 3.0
JLoader::register('JRule', JPATH_PLATFORM . '/joomla/access/rule.php');
JLoader::register('JRules', JPATH_PLATFORM . '/joomla/access/rules.php');
示例#2
0
 /**
  * Fix Joomla version in #__extensions table if wrong (doesn't equal JVersion short version)
  *
  * @return   mixed  string update version if success, false if fail
  */
 public function fixUpdateVersion()
 {
     $table = JTable::getInstance('Extension');
     $table->load('700');
     $cache = new JRegistry($table->manifest_cache);
     $updateVersion = $cache->get('version');
     $cmsVersion = new JVjokte();
     if ($updateVersion == $cmsVersion->getVersionCorta()) {
         return $updateVersion;
     } else {
         $cache->set('version', $cmsVersion->getVersionCorta());
         $table->manifest_cache = $cache->toString();
         if ($table->store()) {
             return $cmsVersion->getVersionCorta();
         } else {
             return false;
         }
     }
 }
示例#3
0
 /**
  * method to get the system information
  *
  * @return array system information values
  */
 function &getInfo()
 {
     if (is_null($this->info)) {
         $this->info = array();
         $version = new JVjokte();
         $platform = new JPlatform();
         $db = JFactory::getDBO();
         if (isset($_SERVER['SERVER_SOFTWARE'])) {
             $sf = $_SERVER['SERVER_SOFTWARE'];
         } else {
             $sf = getenv('SERVER_SOFTWARE');
         }
         $this->info['php'] = php_uname();
         $this->info['dbversion'] = $db->getVersion();
         $this->info['dbcollation'] = $db->getCollation();
         $this->info['phpversion'] = phpversion();
         $this->info['server'] = $sf;
         $this->info['sapi_name'] = php_sapi_name();
         $this->info['version'] = $version->getVersionLarga();
         $this->info['platform'] = $platform->getLongVersion();
         $this->info['useragent'] = $_SERVER['HTTP_USER_AGENT'];
     }
     return $this->info;
 }