Source for file sysinfo.php
Documentation is available at sysinfo.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Model for the display of system information.
* @package Joomla.Administrator
* @var array Some PHP settings
* @var array Config values
* @var array Some system values
* Information about writable state of directories
* Method to get the ChangeLog
* @return array some php settings
* Method to get the config
* @return array config values
$this->config =
$registry->toArray();
$hidden =
array('host', 'user', 'password', 'ftp_user', 'ftp_pass', 'smtpuser', 'smtppass');
foreach ($hidden as $key)
$this->config[$key] =
'xxxxxx';
* Method to get the system information
* @return array system information values
if (isset
($_SERVER['SERVER_SOFTWARE']))
$sf =
$_SERVER['SERVER_SOFTWARE'];
$sf =
getenv('SERVER_SOFTWARE');
$this->info['dbversion'] =
$db->getVersion();
$this->info['dbcollation'] =
$db->getCollation();
$this->info['server'] =
$sf;
$this->info['version'] =
$version->getLongVersion();
$this->info['platform'] =
$platform->getLongVersion();
$this->info['useragent'] =
$_SERVER['HTTP_USER_AGENT'];
* Method to get the PHP info
* @return string PHP info
phpinfo(INFO_GENERAL |
INFO_CONFIGURATION |
INFO_MODULES);
$output =
preg_replace('#<table[^>]*>#', '<table class="table table-striped adminlist">', $output[1][0]);
$output =
str_replace('<div class="center">', '', $output);
$output =
preg_replace('#<tr class="h">(.*)<\/tr>#', '<thead><tr class="h">$1</tr></thead><tbody>', $output);
$output =
str_replace('</table>', '</tbody></table>', $output);
* Method to get the directory states
* @return array States of directories
// List all admin languages
foreach ($admin_langs as $folder)
if (!$folder->isDir() ||
$folder->isDot())
$this->_addDirectory('administrator/language/' .
$folder->getFilename(), JPATH_ADMINISTRATOR .
'/language/' .
$folder->getFilename());
// List all manifests folders
foreach ($manifests as $folder)
if (!$folder->isDir() ||
$folder->isDot())
$this->_addDirectory('administrator/manifests/' .
$folder->getFilename(), JPATH_ADMINISTRATOR .
'/manifests/' .
$folder->getFilename());
$this->_addDirectory('administrator/templates', JPATH_THEMES);
$this->_addDirectory('components', JPATH_SITE .
'/components');
$this->_addDirectory($cparams->get('image_path'), JPATH_SITE .
'/' .
$cparams->get('image_path'));
// List all images folders
$image_folders =
new DirectoryIterator(JPATH_SITE .
'/' .
$cparams->get('image_path'));
foreach ($image_folders as $folder)
if (!$folder->isDir() ||
$folder->isDot())
$this->_addDirectory('images/' .
$folder->getFilename(), JPATH_SITE .
'/' .
$cparams->get('image_path') .
'/' .
$folder->getFilename());
$this->_addDirectory('language', JPATH_SITE .
'/language');
// List all site languages
$site_langs =
new DirectoryIterator(JPATH_SITE .
'/language');
foreach ($site_langs as $folder)
if (!$folder->isDir() ||
$folder->isDot())
$this->_addDirectory('language/' .
$folder->getFilename(), JPATH_SITE .
'/language/' .
$folder->getFilename());
$this->_addDirectory('media', JPATH_SITE .
'/media');
$this->_addDirectory('modules', JPATH_SITE .
'/modules');
$plugin_groups =
new DirectoryIterator(JPATH_SITE .
'/plugins');
foreach ($plugin_groups as $folder)
if (!$folder->isDir() ||
$folder->isDot())
$this->_addDirectory('plugins/' .
$folder->getFilename(), JPATH_PLUGINS .
'/' .
$folder->getFilename());
$this->_addDirectory('templates', JPATH_SITE .
'/templates');
$this->_addDirectory('cache', JPATH_SITE .
'/cache', 'COM_ADMIN_CACHE_DIRECTORY');
$this->_addDirectory('administrator/cache', JPATH_CACHE, 'COM_ADMIN_CACHE_DIRECTORY');
$this->_addDirectory($registry->get('log_path', JPATH_ROOT .
'/log'), $registry->get('log_path', JPATH_ROOT .
'/log'), 'COM_ADMIN_LOG_DIRECTORY');
$this->_addDirectory($registry->get('tmp_path', JPATH_ROOT .
'/tmp'), $registry->get('tmp_path', JPATH_ROOT .
'/tmp'), 'COM_ADMIN_TEMP_DIRECTORY');
* Method to add a directory
* Method to add a directory
* @param string $name Directory Name
* @param string $path Directory path
* @param string $message Message
private function _addDirectory($name, $path, $message =
'')
* Method to get the editor
* @return string The default editor
* @note: has to be removed (it is present in the config...)
$this->editor =
$config->get('editor');
Documentation generated on Tue, 19 Nov 2013 15:14:46 +0100 by phpDocumentor 1.4.3