Thread: [Phpsysinfo-subversion] SF.net SVN: phpsysinfo:[642] branches/namiltd-ini
Brought to you by:
namiltd
|
From: <na...@us...> - 2012-08-24 19:15:20
|
Revision: 642
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=642&view=rev
Author: namiltd
Date: 2012-08-24 19:15:13 +0000 (Fri, 24 Aug 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/includes/plugin/class.PSI_Plugin.inc.php
Added Paths:
-----------
branches/namiltd-ini/config.php
branches/namiltd-ini/phpsysinfo.ini
Removed Paths:
-------------
branches/namiltd-ini/config.php.new
branches/namiltd-ini/plugins/BAT/BAT.config.php
branches/namiltd-ini/plugins/MDStatus/MDStatus.config.php
branches/namiltd-ini/plugins/PS/PS.config.php
branches/namiltd-ini/plugins/PSStatus/PSStatus.config.php
branches/namiltd-ini/plugins/Quotas/Quotas.config.php
branches/namiltd-ini/plugins/SMART/SMART.config.php
branches/namiltd-ini/plugins/SNMPPInfo/SNMPPInfo.config.php
branches/namiltd-ini/plugins/UpdateNotifier/UpdateNotifier.config.php
branches/namiltd-ini/plugins/ipmi/ipmi.config.php
Added: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php (rev 0)
+++ branches/namiltd-ini/config.php 2012-08-24 19:15:13 UTC (rev 642)
@@ -0,0 +1,42 @@
+<?php
+if (!defined('PSI_CONFIG_FILE')){
+ define('PSI_CONFIG_FILE', APP_ROOT.'/phpsysinfo.ini');
+ if ((!is_readable(PSI_CONFIG_FILE)) || !($config = @parse_ini_file(PSI_CONFIG_FILE, true))){
+ $tpl = new Template("/templates/html/error_config.html");
+ echo $tpl->fetch();
+ die();
+ } else {
+ foreach ($config as $name=>$group) {
+ if (strtoupper($name)=="MAIN") {
+ foreach ($group as $param=>$value) {
+ if (strtoupper($param)==="REFRESH"){
+ if ($value===""){
+ define('PSI_'.strtoupper($param), 0);
+ } else {
+ define('PSI_'.strtoupper($param), $value);
+ }
+ } else {
+ if ($value===""){
+ define('PSI_'.strtoupper($param), false);
+ } else if ($value==1){
+ define('PSI_'.strtoupper($param), true);
+ } else {
+ define('PSI_'.strtoupper($param), $value);
+ }
+ }
+ }
+ } else {
+ foreach ($group as $param=>$value) {
+ if ($value===""){
+ define('PSI_PLUGIN_'.strtoupper($name).'_'.strtoupper($param), false);
+ } else if ($value==1){
+ define('PSI_PLUGIN_'.strtoupper($name).'_'.strtoupper($param), true);
+ } else {
+ define('PSI_PLUGIN_'.strtoupper($name).'_'.strtoupper($param), $value);
+ }
+ }
+ }
+ }
+ }
+}
+?>
Property changes on: branches/namiltd-ini/config.php
___________________________________________________________________
Added: svn:mime-type
+ text/x-php
Added: svn:keywords
+ Id
Added: svn:mergeinfo
+
Added: svn:eol-style
+ LF
Deleted: branches/namiltd-ini/config.php.new
===================================================================
--- branches/namiltd-ini/config.php.new 2012-08-24 19:00:23 UTC (rev 641)
+++ branches/namiltd-ini/config.php.new 2012-08-24 19:15:13 UTC (rev 642)
@@ -1,277 +0,0 @@
-<?php
-/**
- * PSI Config File
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
-
-// ********************************
-// MAIN PARAMETERS
-// ********************************
-
-/**
- * Turn on debugging of some functions and include errors and warnings in xml and provide a popup for displaying errors
- * - false : no debug information are stored in xml or displayed
- * - true : debug information stored in xml and displayed *be careful if set this to true, may include sensitive information from your pc*
- */
-define('PSI_DEBUG', false);
-
-/**
- * Turn on/off compression for JavaScript file
- * - define('PSI_JS_COMPRESSION', false); //no compression (recommended with slow processor)
- * - define('PSI_JS_COMPRESSION', 'None'); //code minimizing
- * - define('PSI_JS_COMPRESSION', 'Normal'); //code packing
- */
-define('PSI_JS_COMPRESSION', 'Normal');
-
-/**
- * Additional paths where to look for installed programs
- * Example : define('PSI_ADD_PATHS', '/opt/bin,/opt/sbin');
- */
-define('PSI_ADD_PATHS', false);
-
-/**
- * Plugins that should be included in xml and output (!!!plugin names are case-sensitive!!!)
- * List of plugins should look like "plugin,plugin,plugin". See /plugins directory
- * - define('PSI_PLUGINS', 'MDStatus,PS'); // list of plugins
- * - define('PSI_PLUGINS', false); //no plugins
- * included plugins:
- * - MDStatus - show the raid status and whats currently going on
- * - PS - show a process tree of all running processes
- * - PSStatus - show a graphical representation if a process is running or not
- * - Quotas - show a table with all quotas that are active and there current state
- * - SMART - show S.M.A.R.T. information from drives that support it
- * - BAT - show battery state on a laptop
- * - ipmi - show IPMI status
- * - UpdateNotifier - show update notifications (only for Ubuntu server)
- * - SNMPPInfo - show printers info via SNMP
- */
-define('PSI_PLUGINS', false);
-
-
-// ********************************
-// DISPLAY PARAMETERS
-// ********************************
-
-/**
- * Define the default display mode
- * auto: let user browser choose the mode
- * dynamic: use javascript to refresh data
- * static: static page (use metatag to reload page)
- */
-define('PSI_DEFAULT_DISPLAY_MODE', 'auto');
-
-/**
- * Define the default language
- */
-define('PSI_DEFAULT_LANG', 'en');
-
-/**
- * Define the default template
- */
-define('PSI_DEFAULT_TEMPLATE', 'phpsysinfo');
-
-/**
- * Show or hide language picklist
- */
-define('PSI_SHOW_PICKLIST_LANG', true);
-
-/**
- * Show or hide template picklist
- */
-define('PSI_SHOW_PICKLIST_TEMPLATE', true);
-
-/**
- * Define the interval for refreshing data in ms
- * - 0 = disabled
- * - 1000 = 1 second
- * - Default is 60 seconds
- */
-define('PSI_REFRESH', 60000);
-
-/**
- * Show a graph for current cpuload
- * - true = displayed, but it's a performance hit (because we have to wait to get a value, 1 second)
- * - false = will not be displayed
- */
-define('PSI_LOAD_BAR', false);
-
-/**
- * Display the virtual host name and address
- * - Default is canonical host name and address
- * - Use define('PSI_USE_VHOST', true); to display virtual host name.
- */
-define('PSI_USE_VHOST', false);
-
-/**
- * Controls the units & format for network, memory and filesystem
- * - 1 KiB = 2^10 bytes = 1,024 bytes
- * - 1 KB = 10^3 bytes = 1,000 bytes
- * - 'B' everything is in Byte
- * - 'PiB' everything is in PeBiByte
- * - 'TiB' everything is in TeBiByte
- * - 'GiB' everything is in GiBiByte
- * - 'MiB' everything is in MeBiByte
- * - 'KiB' everything is in KiBiByte
- * - 'auto_binary' everything is automatic done if value is to big for, e.g MiB then it will be in GiB
- * - 'PB' everything is in PetaByte
- * - 'TB' everything is in TeraByte
- * - 'GB' everything is in GigaByte
- * - 'MB' everything is in MegaByte
- * - 'KB' everything is in KiloByte
- * - 'auto_decimal' everything is automatic done if value is to big for, e.g MB then it will be in GB
- */
-define('PSI_BYTE_FORMAT', 'auto_binary');
-
-/**
- * Format in which temperature is displayed
- * - 'c' shown in celsius
- * - 'f' shown in fahrenheit
- * - 'c-f' both shown first celsius and fahrenheit in braces
- * - 'f-c' both shown first fahrenheit and celsius in braces
- */
-define('PSI_TEMP_FORMAT', 'c');
-
-
-// ********************************
-// SENSORS PARAMETERS
-// ********************************
-
-/**
- * Define the motherboard monitoring program (!!!names are case-sensitive!!!)
- * We support the following programs so far
- * - LMSensors http://www.lm-sensors.org/
- * - Healthd http://healthd.thehousleys.net/
- * - HWSensors http://www.openbsd.org/
- * - MBMon http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html
- * - MBM5 http://mbm.livewiredev.com/
- * - Coretemp
- * - IPMI http://openipmi.sourceforge.net/
- * - K8Temp http://hur.st/k8temp/
- * Example: If you want to use lmsensors : define('PSI_SENSOR_PROGRAM', 'LMSensors');
- */
-define('PSI_SENSOR_PROGRAM', false);
-
-/**
- * Define how to access the monitor program
- * Available methods for the above list are in the following list
- * default method 'command' should be fine for everybody
- * !!! tcp connections are only made local and on the default port !!!
- * - LMSensors command, file
- * - Healthd command
- * - HWSensors command
- * - MBMon command, tcp
- * - MBM5 file
- * - Coretemp command
- * - IPMI command
- * - K8Temp command
- */
-define('PSI_SENSOR_ACCESS', 'command');
-
-/**
- * Hddtemp program
- * If the hddtemp program is available we can read the temperature, if hdd is smart capable
- * !!ATTENTION!! hddtemp might be a security issue
- * - define('PSI_HDD_TEMP', 'tcp'); // read data from hddtemp deamon (localhost:7634)
- * - define('PSI_HDD_TEMP', 'command'); // read data from hddtemp programm (must be set suid)
- */
-define('PSI_HDD_TEMP', false);
-
-
-// ********************************
-// FILESYSTEM PARAMETERS
-// ********************************
-
-/**
- * Show mount point
- * - true = show mount point
- * - false = do not show mount point
- */
-define('PSI_SHOW_MOUNT_POINT', true);
-
-/**
- * Show mount option
- * - true = show mount option
- * - false = do not show mount option
- */
-define('PSI_SHOW_MOUNT_OPTION', true);
-
-/**
- * Show mount credentials
- * - true = show mount credentials
- * - false = do not show mount credentials
- */
-define('PSI_SHOW_MOUNT_CREDENTIALS', false);
-
-/**
- * Show inode usage
- * - true = display used inodes in percent
- * - false = hide them
- */
-define('PSI_SHOW_INODES', true);
-
-/**
- * Hide mounts
- * Example : define('PSI_HIDE_MOUNTS', '/home,/usr');
- */
-define('PSI_HIDE_MOUNTS', '');
-
-/**
- * Hide filesystem types
- * Example : define('PSI_HIDE_FS_TYPES', 'tmpfs,usbfs');
- */
-define('PSI_HIDE_FS_TYPES', '');
-
-/**
- * Hide partitions
- * Example : define('PSI_HIDE_DISKS', 'rootfs');
- */
-define('PSI_HIDE_DISKS', '');
-
-
-// ********************************
-// NETWORK PARAMETERS
-// ********************************
-
-/**
- * Hide network interfaces
- * Example : define('PSI_HIDE_NETWORK_INTERFACE', 'eth0,sit0');
- */
-define('PSI_HIDE_NETWORK_INTERFACE', '');
-
-/**
- * Show network interfaces infos for Linux, FreeBSD, Haiku and WinNT (experimental)
- * Example : define('PSI_SHOW_NETWORK_INFOS', true);
- */
-define('PSI_SHOW_NETWORK_INFOS', false);
-
-
-// ********************************
-// UPS PARAMETERS
-// ********************************
-
-/**
- * Define the ups monitoring program (!!!names are case-sensitive!!!)
- * We support the following programs so far
- * - 1. Apcupsd http://www.apcupsd.com/
- * - 2. Nut http://www.networkupstools.org/
- * Example: If you want to use Apcupsd : define('PSI_UPS_PROGRAM', 'Apcupsd');
- */
-define('PSI_UPS_PROGRAM', false);
-
-/**
- * Apcupsd supports multiple UPSes
- * You can specify comma delimited list in the form <hostname>:<port> or <ip>:<port>. The defaults are: 127.0.0.1:3551
- * See the following parameters in apcupsd.conf: NETSERVER, NISIP, NISPORT
- */
-define('PSI_UPS_APCUPSD_LIST', '127.0.0.1:3551');
-
-?>
Modified: branches/namiltd-ini/includes/plugin/class.PSI_Plugin.inc.php
===================================================================
--- branches/namiltd-ini/includes/plugin/class.PSI_Plugin.inc.php 2012-08-24 19:00:23 UTC (rev 641)
+++ branches/namiltd-ini/includes/plugin/class.PSI_Plugin.inc.php 2012-08-24 19:15:13 UTC (rev 642)
@@ -87,13 +87,9 @@
*/
private function _getconfig()
{
- $filename = $this->_plugin_base.$this->_plugin_name.".config.php";
- if (file_exists($filename)) {
- if (is_readable($filename)) {
- include_once $filename;
- } else {
- $this->global_error->addError("getconfig()", "Config-File for plugin ".$this->_plugin_name." exist but can't be read!");
- }
+ if ( (!defined('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_ACCESS')) &&
+ (!defined('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_FILE')) ) {
+ $this->global_error->addError("config.ini", "Config for plugin ".$this->_plugin_name." not exist!");
}
}
Added: branches/namiltd-ini/phpsysinfo.ini
===================================================================
--- branches/namiltd-ini/phpsysinfo.ini (rev 0)
+++ branches/namiltd-ini/phpsysinfo.ini 2012-08-24 19:15:13 UTC (rev 642)
@@ -0,0 +1,414 @@
+; PSI Config File
+;
+; @category PHP
+; @package PSI
+; @author Michael Cramer <Big...@us...>
+; @copyright 2009 phpSysInfo
+; @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
+; @version SVN: $Id$
+; @link http://phpsysinfo.sourceforge.net
+
+[main]
+; ********************************
+; MAIN PARAMETERS
+; ********************************
+
+; Turn on debugging of some functions and include errors and warnings in xml and provide a popup for displaying errors
+; - false : no debug information are stored in xml or displayed
+; - true : debug information stored in xml and displayed *be careful if set this to true, may include sensitive information from your pc*
+;
+DEBUG=false
+
+; Turn on/off compression for JavaScript file
+; - JS_COMPRESSION=false //no compression (recommended with slow processor)
+; - JS_COMPRESSION="None" //code minimizing
+; - JS_COMPRESSION="Normal" //code packing
+;
+JS_COMPRESSION="Normal"
+
+; Additional paths where to look for installed programs
+; Example : ADD_PATHS="/opt/bin,/opt/sbin"
+;
+ADD_PATHS=false
+
+; Plugins that should be included in xml and output (!!!plugin names are case-sensitive!!!)
+; List of plugins should look like "plugin,plugin,plugin". See /plugins directory
+; - PLUGINS="MDStatus,PS" //list of plugins
+; - PLUGINS=false //no plugins
+; included plugins:
+; - MDStatus - show the raid status and whats currently going on
+; - PS - show a process tree of all running processes
+; - PSStatus - show a graphical representation if a process is running or not
+; - Quotas - show a table with all quotas that are active and there current state
+; - SMART - show S.M.A.R.T. information from drives that support it
+; - BAT - show battery state on a laptop
+; - ipmi - show IPMI status
+; - UpdateNotifier - show update notifications (only for Ubuntu server)
+; - SNMPPInfo - show printers info via SNMP
+;
+PLUGINS=false
+
+
+; ********************************
+; DISPLAY PARAMETERS
+; ********************************
+
+
+; Define the default display mode
+; auto: let user browser choose the mode
+; dynamic: use javascript to refresh data
+; static: static page (use metatag to reload page)
+;
+DEFAULT_DISPLAY_MODE="auto"
+
+
+; Define the default language
+;
+DEFAULT_LANG="en"
+
+
+; Define the default template
+;
+DEFAULT_TEMPLATE="phpsysinfo"
+
+
+; Show or hide language picklist
+;
+SHOW_PICKLIST_LANG=true
+
+
+; Show or hide template picklist
+;
+SHOW_PICKLIST_TEMPLATE=true
+
+
+; Define the interval for refreshing data in ms
+; - 0 = disabled
+; - 1000 = 1 second
+; - Default is 60 seconds
+;
+REFRESH=60000
+
+
+; Show a graph for current cpuload
+; - true = displayed, but it's a performance hit (because we have to wait to get a value, 1 second)
+; - false = will not be displayed
+;
+LOAD_BAR=false
+
+
+; Display the virtual host name and address
+; - Default is canonical host name and address
+; - Use USE_VHOST=true to display virtual host name.
+;
+USE_VHOST=false
+
+
+; Controls the units & format for network, memory and filesystem
+; - 1 KiB = 2^10 bytes = 1,024 bytes
+; - 1 KB = 10^3 bytes = 1,000 bytes
+; - "B" everything is in Byte
+; - "PiB" everything is in PeBiByte
+; - "TiB" everything is in TeBiByte
+; - "GiB" everything is in GiBiByte
+; - "MiB" everything is in MeBiByte
+; - "KiB" everything is in KiBiByte
+; - "auto_binary" everything is automatic done if value is to big for, e.g MiB then it will be in GiB
+; - "PB" everything is in PetaByte
+; - "TB" everything is in TeraByte
+; - "GB" everything is in GigaByte
+; - "MB" everything is in MegaByte
+; - "KB" everything is in KiloByte
+; - "auto_decimal" everything is automatic done if value is to big for, e.g MB then it will be in GB
+;
+BYTE_FORMAT="auto_binary"
+
+
+; Format in which temperature is displayed
+; - "c" shown in celsius
+; - "f" shown in fahrenheit
+; - "c-f" both shown first celsius and fahrenheit in braces
+; - "f-c" both shown first fahrenheit and celsius in braces
+;
+TEMP_FORMAT="c"
+
+
+; ********************************
+; SENSORS PARAMETERS
+; ********************************
+
+
+; Define the motherboard monitoring program (!!!names are case-sensitive!!!)
+; We support the following programs so far
+; - LMSensors http://www.lm-sensors.org/
+; - Healthd http://healthd.thehousleys.net/
+; - HWSensors http://www.openbsd.org/
+; - MBMon http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html
+; - MBM5 http://mbm.livewiredev.com/
+; - Coretemp
+; - IPMI http://openipmi.sourceforge.net/
+; - K8Temp http://hur.st/k8temp/
+; Example: If you want to use lmsensors : SENSOR_PROGRAM="LMSensors"
+;
+SENSOR_PROGRAM=false
+
+
+; Define how to access the monitor program
+; Available methods for the above list are in the following list
+; default method "command" should be fine for everybody
+; !!! tcp connections are only made local and on the default port !!!
+; - LMSensors command, file
+; - Healthd command
+; - HWSensors command
+; - MBMon command, tcp
+; - MBM5 file
+; - Coretemp command
+; - IPMI command
+; - K8Temp command
+;
+SENSOR_ACCESS="command"
+
+
+; Hddtemp program
+; If the hddtemp program is available we can read the temperature, if hdd is smart capable
+; !!ATTENTION!! hddtemp might be a security issue
+; - HDD_TEMP="tcp" // read data from hddtemp deamon (localhost:7634)
+; - HDD_TEMP="command" // read data from hddtemp programm (must be set suid)
+;
+HDD_TEMP=false
+
+
+; ********************************
+; FILESYSTEM PARAMETERS
+; ********************************
+
+
+; Show mount point
+; - true = show mount point
+; - false = do not show mount point
+;
+SHOW_MOUNT_POINT=true
+
+; Show mount option
+; - true = show mount option
+; - false = do not show mount option
+;
+SHOW_MOUNT_OPTION=true
+
+
+; Show mount credentials
+; - true = show mount credentials
+; - false = do not show mount credentials
+;
+SHOW_MOUNT_CREDENTIALS=false
+
+
+; Show inode usage
+; - true = display used inodes in percent
+; - false = hide them
+;
+SHOW_INODES=true
+
+
+; Hide mounts
+; Example : HIDE_MOUNTS="/home,/usr"
+;
+HIDE_MOUNTS=""
+
+
+; Hide filesystem types
+; Example : HIDE_FS_TYPES="tmpfs,usbfs"
+;
+HIDE_FS_TYPES=""
+
+
+; Hide partitions
+; Example : HIDE_DISKS="rootfs"
+;
+HIDE_DISKS=""
+
+
+; ********************************
+; NETWORK PARAMETERS
+; ********************************
+
+
+; Hide network interfaces
+; Example : HIDE_NETWORK_INTERFACE="eth0,sit0"
+;
+HIDE_NETWORK_INTERFACE=""
+
+
+; Show network interfaces infos for Linux, FreeBSD, Haiku and WinNT (experimental)
+; Example : SHOW_NETWORK_INFOS=true
+;
+SHOW_NETWORK_INFOS=false
+
+
+; ********************************
+; UPS PARAMETERS
+; ********************************
+
+
+; Define the ups monitoring program (!!!names are case-sensitive!!!)
+; We support the following programs so far
+; - 1. Apcupsd http://www.apcupsd.com/
+; - 2. Nut http://www.networkupstools.org/
+; Example: If you want to use Apcupsd : UPS_PROGRAM="Apcupsd"
+;
+UPS_PROGRAM=false
+
+
+; Apcupsd supports multiple UPSes
+; You can specify comma delimited list in the form <hostname>:<port> or <ip>:<port>. The defaults are: 127.0.0.1:3551
+; See the following parameters in apcupsd.conf: NETSERVER, NISIP, NISPORT
+;
+UPS_APCUPSD_LIST="127.0.0.1:3551"
+
+[bat]
+; BAT Plugin configuration
+
+; define how to access the battery statistic data
+; - "command" read /proc/acpi/battery/BAT0/info and read /proc/acpi/battery/BAT0/state
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "bat_info.txt" and "bat_state.txt"; content is the output from "cat /proc/acpi/battery/BAT0/info" and "cat /proc/acpi/battery/BAT0/state")
+;
+ACCESS="command"
+
+; define the battery device
+;
+DEVICE="BAT0"
+
+
+[ipmi]
+; ipmi Plugin configuration
+
+; define how to access the IPMI statistic data
+; - "command" ipmitool command is run everytime the block gets refreshed or build
+; if access error execute first: chmod 666 /dev/ipmi0
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ipmi.txt"; content is the output from "ipmitool sensor")
+;
+ACCESS="command"
+
+
+[mdstatus]
+; MDStatus Plugin configuration
+
+; define how to access the mdstat statistic data
+; - "file" /proc/mdstat is read
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "mdstat.txt"; content is the output from "cat /proc/mdstat")
+;
+ACCESS="file"
+
+
+[ps]
+; PS Plugin configuration
+
+; define how to access the ps statistic data
+; - "command" ps command is run everytime the block gets refreshed or build / on WINNT information is retrieved everytime through WMI
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ps.txt"; content is the output from "ps -axo pid,ppid,pmem,args")
+;
+ACCESS="command"
+
+
+[psstatus]
+; PSStatus Plugin configuration
+
+; define how to access the psstatus statistic data
+; - "command" pidof command is run everytime the block gets refreshed or build / on WINNT information is retrieved everytime through WMI
+; - "data" a file must be available in the data directory of the phpsysinfo installation with the filename "psstatus.txt"; content is the output from
+; <code>ps=("apache2" "mysqld" "sshd"); for((i=0;i<${#ps};i++)); do echo ${ps[$i]} "|" `pidof -s ${ps[$i]}` ;done</code>
+;
+; @var string
+;
+ACCESS="command"
+
+; controls which processes are checked if they are running
+;
+; @var string contains a list of process names that are checked, names are seperated by a comma (on WINNT names must end with '.exe')
+;
+PROCESSES="mysqld, sshd, explorer.exe"
+
+
+[quotas]
+; Quotas Plugin configuration
+;
+; define how to access the repquota statistic data
+; - "command" repquota command is run everytime the block gets refreshed or build
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "quotas.txt"; content is the output from "repquota -au")
+;
+ACCESS="command"
+
+
+[smart]
+; SMART Plugin configuration
+
+; Smartctl program
+; If the smartctl program is available we can read S.M.A.R.T informations
+; - "command" smartctl command is run everytime the block gets refreshed or build
+; if error: Smartctl open device: /dev/sda failed: Permission denied
+; Not recommended method:
+; execute: chmod 4755 /usr/sbin/smartctl
+; - "data" (a file must be available in the data directory of the
+; phpsysinfo installation with the filename "SMART{disk_number}.txt";
+; content is the output from "smartctl --all device")
+;
+ACCESS="data"
+
+; Smartctl devices to monitor
+; If the smartctl support is enabled, those disks information will be displayed
+; - DEVICES="/dev/hda,/dev/hdb" // Will display those two disks informations
+;
+DEVICES="/dev/sda, /dev/sdb"
+
+; Smartctl --device option value
+; If the smartctl support is enabled, enter the --device option value for smartctl command
+; - DEVICE=false // If this option is not needed
+; - DEVICE="marvell" // If marvell
+;
+DEVICE=false
+
+; Smartctl ID# and column name from "Vendor Specific SMART Attributes with Thresholds" table
+; If the smartctl support is enabled, enter the ID#-COLUMN_NAME from "Vendor Specific SMART Attributes with Thresholds" table from smartctl output.
+; or for no SCSI devices: ID#-COLUMN_NAME-REPLACEMENT_ID# where REPLACEMENT_ID# is an alternative ID number.
+; COLUMN_NAME of this ID# will be displayed in the phpsysinfo S.M.A.R.T table. If you want RAW_VALUE to be displayed for the temperature (ID# 194) enter 194-RAW_VALUE
+; - IDS="194-VALUE,4-VALUE,009-RAW_VALUE" // ID#-COLUMN_NAME, ID#-COLUMN_NAME, etc...
+;
+IDS="005-RAW_VALUE,194-RAW_VALUE,4-RAW_VALUE,009-RAW_VALUE,012-RAW_VALUE,193-RAW_VALUE-225,001-RAW_VALUE,007-RAW_VALUE,200-RAW_VALUE,197-RAW_VALUE,198-RAW_VALUE"
+
+
+[snmppinfo]
+; SNMPPInfo Plugin configuration
+
+; define how to access the SNMP Printer Info statistic data
+; - "php-snmp" execute php snmprealwalk function (php-snmp module must be installed)
+; - "command" execute snmpwalk command
+; - "data" a file must be available in the data directory of the
+; phpsysinfo installation with the filename "SNMPPInfo{printer_number}.txt";
+; content is the output from:
+; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.1.5 > SNMPPInfo{printer_number}.txt
+; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.43.11.1.1 >> SNMPPInfo{printer_number}.txt
+;
+ACCESS="php-snmp"
+
+;define the Printer devices
+;
+; @var string contains a list of printer addresses that are checked
+;
+DEVICES="192.168.0.5, 192.168.0.9"
+
+
+[updatenotifier]
+; Update Notifier Plugin configuration
+
+; define the update info file format
+; - true: Ubuntu Landscape format (file: /var/lib/update-notifier/updates-available)
+; - false: universal format (format: A;B)
+; A: total packages to update
+; B: security packages to update
+;
+UBUNTU_LANDSCAPE_FORMAT=true
+
+; define the update info file
+;
+FILE="/var/lib/update-notifier/updates-available"
+
Property changes on: branches/namiltd-ini/phpsysinfo.ini
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Id
Added: svn:mergeinfo
+
Added: svn:eol-style
+ LF
Deleted: branches/namiltd-ini/plugins/BAT/BAT.config.php
===================================================================
--- branches/namiltd-ini/plugins/BAT/BAT.config.php 2012-08-24 19:00:23 UTC (rev 641)
+++ branches/namiltd-ini/plugins/BAT/BAT.config.php 2012-08-24 19:15:13 UTC (rev 642)
@@ -1,27 +0,0 @@
-<?php
-/**
- * BAT Plugin Config File
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Plugin_BAT
- * @author Erkan VALENTIN <jac...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * define how to access the battery statistic data
- * - 'command' read /proc/acpi/battery/BAT0/info and read /proc/acpi/battery/BAT0/state
- * - 'data' (a file must be available in the data directory of the phpsysinfo installation with the filename "bat_info.txt" and "bat_state.txt"; content is the output from "cat /proc/acpi/battery/BAT0/info" and "cat /proc/acpi/battery/BAT0/state")
- */
-define('PSI_PLUGIN_BAT_ACCESS', 'command');
-
- /**
- * define the battery device
- */
-define('PSI_PLUGIN_BAT_DEVICE', 'BAT0');
-
-?>
Deleted: branches/namiltd-ini/plugins/MDStatus/MDStatus.config.php
===================================================================
--- branches/namiltd-ini/plugins/MDStatus/MDStatus.config.php 2012-08-24 19:00:23 UTC (rev 641)
+++ branches/namiltd-ini/plugins/MDStatus/MDStatus.config.php 2012-08-24 19:15:13 UTC (rev 642)
@@ -1,21 +0,0 @@
-<?php
-/**
- * MDStatus Plugin Config File
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Plugin_MDStatus
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * define how to access the mdstat statistic data
- * - 'file' /proc/mdstat is read
- * - 'data' (a file must be available in the data directory of the phpsysinfo installation with the filename "mdstat.txt"; content is the output from "cat /proc/mdstat")
- */
-define('PSI_PLUGIN_MDSTATUS_ACCESS', 'file');
-?>
Deleted: branches/namiltd-ini/plugins/PS/PS.config.php
===================================================================
--- branches/namiltd-ini/plugins/PS/PS.config.php 2012-08-24 19:00:23 UTC (rev 641)
+++ branches/namiltd-ini/plugins/PS/PS.config.php 2012-08-24 19:15:13 UTC (rev 642)
@@ -1,21 +0,0 @@
-<?php
-/**
- * PS Plugin Config File
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Plugin_PS
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * define how to access the ps statistic data
- * - 'command' ps command is run everytime the block gets refreshed or build / on WINNT information is retrieved everytime through WMI
- * - 'data' (a file must be available in the data directory of the phpsysinfo installation with the ...
[truncated message content] |
|
From: <na...@us...> - 2012-08-26 23:26:00
|
Revision: 653
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=653&view=rev
Author: namiltd
Date: 2012-08-26 23:25:51 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/config.php
branches/namiltd-ini/includes/class.CommonFunctions.inc.php
branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php
branches/namiltd-ini/includes/xml/class.XML.inc.php
branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php
branches/namiltd-ini/plugins/SMART/class.SMART.inc.php
branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-08-26 20:38:45 UTC (rev 652)
+++ branches/namiltd-ini/config.php 2012-08-26 23:25:51 UTC (rev 653)
@@ -1,6 +1,7 @@
<?php
if (!defined('PSI_CONFIG_FILE')){
define('PSI_CONFIG_FILE', APP_ROOT.'/phpsysinfo.ini');
+ define('ARRAY_EXP', '/^return array \([^;]*\);$/'); //array expression search
if ((!is_readable(PSI_CONFIG_FILE)) || !($config = @parse_ini_file(PSI_CONFIG_FILE, true))){
$tpl = new Template("/templates/html/error_config.html");
echo $tpl->fetch();
@@ -13,18 +14,13 @@
$name_prefix='PSI_PLUGIN_'.strtoupper($name).'_';
}
foreach ($group as $param=>$value) {
- if ( (strtoupper($name)==="MAIN")
- &&(strtoupper($param)==="REFRESH") ){
- if ($value===""){
- define($name_prefix.strtoupper($param), 0);
- } else {
- define($name_prefix.strtoupper($param), $value);
- }
+ if ($value===""){
+ define($name_prefix.strtoupper($param), false);
+ } else if ($value==1){
+ define($name_prefix.strtoupper($param), true);
} else {
- if ($value===""){
- define($name_prefix.strtoupper($param), false);
- } else if ($value==1){
- define($name_prefix.strtoupper($param), true);
+ if (strstr($value, ',')) {
+ define($name_prefix.strtoupper($param), 'return '.var_export(preg_split('/\s*,\s*/', $value, -1, PREG_SPLIT_NO_EMPTY),1).';');
} else {
define($name_prefix.strtoupper($param), $value);
}
Modified: branches/namiltd-ini/includes/class.CommonFunctions.inc.php
===================================================================
--- branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-08-26 20:38:45 UTC (rev 652)
+++ branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-08-26 23:25:51 UTC (rev 653)
@@ -68,9 +68,12 @@
} else {
$arrPath = preg_split('/:/', getenv("PATH"), -1, PREG_SPLIT_NO_EMPTY);
}
- if (PSI_ADD_PATHS !== false) {
- $addpaths = preg_split('/,/', PSI_ADD_PATHS, -1, PREG_SPLIT_NO_EMPTY);
- $arrPath = array_merge($addpaths, $arrPath); // In this order so $addpaths is before $arrPath when looking for a program
+ if ( defined('PSI_ADD_PATHS') && (PSI_ADD_PATHS !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_ADD_PATHS)) {
+ $arrPath = array_merge(eval(PSI_ADD_PATHS), $arrPath); // In this order so $addpaths is before $arrPath when looking for a program
+ } else {
+ $arrPath = array_merge(array(PSI_ADD_PATHS), $arrPath); // In this order so $addpaths is before $arrPath when looking for a program
+ }
}
//add some default paths if we still have no paths here
if ( empty($arrPath) && PHP_OS != 'WINNT') {
@@ -322,8 +325,15 @@
*/
public static function getPlugins()
{
- $plugins = preg_split("/[\s]?,[\s]?/", PSI_PLUGINS, -1, PREG_SPLIT_NO_EMPTY);
- return $plugins;
+ if ( defined('PSI_PLUGINS') && (PSI_PLUGINS !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGINS)) {
+ return eval(PSI_PLUGINS);
+ } else {
+ return array(PSI_PLUGINS);
+ }
+ } else {
+ return array();
+ }
}
}
?>
Modified: branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php
===================================================================
--- branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php 2012-08-26 20:38:45 UTC (rev 652)
+++ branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php 2012-08-26 23:25:51 UTC (rev 653)
@@ -39,12 +39,18 @@
public function __construct()
{
parent::__construct();
- $upses = preg_split('/,/', PSI_UPS_APCUPSD_LIST, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($upses as $ups) {
- CommonFunctions::executeProgram('apcaccess', 'status '.trim($ups), $temp);
- if (! empty($temp)) {
- $this->_output[] = $temp;
+ if ( defined('PSI_UPS_APCUPSD_LIST') && (PSI_UPS_APCUPSD_LIST !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_UPS_APCUPSD_LIST)) {
+ $upses = eval(PSI_UPS_APCUPSD_LIST);
+ } else {
+ $upses = array(PSI_UPS_APCUPSD_LIST);
}
+ foreach ($upses as $ups) {
+ CommonFunctions::executeProgram('apcaccess', 'status '.trim($ups), $temp);
+ if (! empty($temp)) {
+ $this->_output[] = $temp;
+ }
+ }
}
}
Modified: branches/namiltd-ini/includes/xml/class.XML.inc.php
===================================================================
--- branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-08-26 20:38:45 UTC (rev 652)
+++ branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-08-26 23:25:51 UTC (rev 653)
@@ -140,7 +140,15 @@
private function _buildNetwork()
{
$network = $this->_xml->addChild('Network');
- $hideDevices = preg_split("/[\s]?,[\s]?/", PSI_HIDE_NETWORK_INTERFACE, -1, PREG_SPLIT_NO_EMPTY);
+ if ( defined('PSI_HIDE_NETWORK_INTERFACE') && (PSI_HIDE_NETWORK_INTERFACE !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_HIDE_NETWORK_INTERFACE)) {
+ $hideDevices = eval(PSI_HIDE_NETWORK_INTERFACE);
+ } else {
+ $hideDevices = array(PSI_HIDE_NETWORK_INTERFACE);
+ }
+ } else {
+ $hideDevices = array();
+ }
foreach ($this->_sys->getNetDevices() as $dev) {
if (!in_array(trim($dev->getName()), $hideDevices)) {
$device = $network->addChild('NetDevice');
@@ -302,14 +310,26 @@
{
$hideMounts = $hideFstypes = $hideDisks = array();
$i = 1;
- if (PSI_HIDE_MOUNTS !== "") {
- $hideMounts = preg_split('/,/', PSI_HIDE_MOUNTS, -1, PREG_SPLIT_NO_EMPTY);
+ if ( defined('PSI_HIDE_MOUNTS') && (PSI_HIDE_MOUNTS !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_HIDE_MOUNTS)) {
+ $hideMounts = eval(PSI_HIDE_MOUNTS);
+ } else {
+ $hideMounts = array(PSI_HIDE_MOUNTS);
+ }
}
- if (PSI_HIDE_FS_TYPES !== "") {
- $hideFstypes = preg_split('/,/', PSI_HIDE_FS_TYPES, -1, PREG_SPLIT_NO_EMPTY);
+ if ( defined('PSI_HIDE_FS_TYPES') && (PSI_HIDE_FS_TYPES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_HIDE_FS_TYPES)) {
+ $hideFstypes = eval(PSI_HIDE_FS_TYPES);
+ } else {
+ $hideFstypes = array(PSI_HIDE_FS_TYPES);
+ }
}
- if (PSI_HIDE_DISKS !== "") {
- $hideDisks = preg_split('/,/', PSI_HIDE_DISKS, -1, PREG_SPLIT_NO_EMPTY);
+ if ( defined('PSI_HIDE_DISKS') && (PSI_HIDE_DISKS !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_HIDE_DISKS)) {
+ $hideDisks = eval(PSI_HIDE_DISKS);
+ } else {
+ $hideDisks = array(PSI_HIDE_DISKS);
+ }
}
$fs = $this->_xml->addChild('FileSystem');
foreach ($this->_sys->getDiskDevices() as $disk) {
@@ -502,7 +522,17 @@
$options = $this->_xml->addChild('Options');
$options->addAttribute('tempFormat', defined('PSI_TEMP_FORMAT') ? PSI_TEMP_FORMAT : 'c');
$options->addAttribute('byteFormat', defined('PSI_BYTE_FORMAT') ? PSI_BYTE_FORMAT : 'auto_binary');
- $options->addAttribute('refresh', defined('PSI_REFRESH') ? PSI_REFRESH : 0);
+ if ( defined('PSI_REFRESH') ) {
+ if ( PSI_REFRESH === false) {
+ $options->addAttribute('refresh', 0);
+ } else if ( PSI_REFRESH === true) {
+ $options->addAttribute('refresh', 1);
+ } else {
+ $options->addAttribute('refresh', PSI_REFRESH);
+ }
+ } else {
+ $options->addAttribute('refresh', 60000);
+ }
$options->addAttribute('showPickListTemplate', defined('PSI_SHOW_PICKLIST_TEMPLATE') ? (PSI_SHOW_PICKLIST_TEMPLATE ? 'true' : 'false') : 'false');
$options->addAttribute('showPickListLang', defined('PSI_SHOW_PICKLIST_LANG') ? (PSI_SHOW_PICKLIST_LANG ? 'true' : 'false') : 'false');
$plug = $this->_xml->addChild('UsedPlugins');
Modified: branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php
===================================================================
--- branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php 2012-08-26 20:38:45 UTC (rev 652)
+++ branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php 2012-08-26 23:25:51 UTC (rev 653)
@@ -61,12 +61,18 @@
$this->_filecontent[] = array(trim($process->Caption), trim($process->ProcessId));
}
} else {
- $processes = preg_split("/([\s]+)?,([\s]+)?/", PSI_PLUGIN_PSSTATUS_PROCESSES, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($processes as $process) {
- CommonFunctions::executeProgram("pidof", "-s ".$process, $buffer, PSI_DEBUG);
- if (strlen(trim($buffer)) > 0) {
- $this->_filecontent[] = array($process, trim($buffer));
+ if ( defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && (PSI_PLUGIN_PSSTATUS_PROCESSES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_PSSTATUS_PROCESSES)) {
+ $processes = eval(PSI_PLUGIN_PSSTATUS_PROCESSES);
+ } else {
+ $processes = array(PSI_PLUGIN_PSSTATUS_PROCESSES);
}
+ foreach ($processes as $process) {
+ CommonFunctions::executeProgram("pidof", "-s ".$process, $buffer, PSI_DEBUG);
+ if (strlen(trim($buffer)) > 0) {
+ $this->_filecontent[] = array($process, trim($buffer));
+ }
+ }
}
}
break;
@@ -98,12 +104,19 @@
if ( empty($this->_filecontent)) {
return;
}
- foreach (preg_split("/([\s]+)?,([\s]+)?/", PSI_PLUGIN_PSSTATUS_PROCESSES, -1, PREG_SPLIT_NO_EMPTY) as $process) {
- if ($this->_recursiveinarray($process, $this->_filecontent)) {
- $this->_result[] = array($process, true);
+ if ( defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && (PSI_PLUGIN_PSSTATUS_PROCESSES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_PSSTATUS_PROCESSES)) {
+ $processes = eval(PSI_PLUGIN_PSSTATUS_PROCESSES);
} else {
- $this->_result[] = array($process, false);
+ $processes = array(PSI_PLUGIN_PSSTATUS_PROCESSES);
}
+ foreach ($processes as $process) {
+ if ($this->_recursiveinarray($process, $this->_filecontent)) {
+ $this->_result[] = array($process, true);
+ } else {
+ $this->_result[] = array($process, false);
+ }
+ }
}
}
Modified: branches/namiltd-ini/plugins/SMART/class.SMART.inc.php
===================================================================
--- branches/namiltd-ini/plugins/SMART/class.SMART.inc.php 2012-08-26 20:38:45 UTC (rev 652)
+++ branches/namiltd-ini/plugins/SMART/class.SMART.inc.php 2012-08-26 23:25:51 UTC (rev 653)
@@ -53,37 +53,61 @@
parent::__construct(__CLASS__, $enc);
switch (PSI_PLUGIN_SMART_ACCESS) {
case 'command':
- $disks = preg_split('/([\s]+)?,([\s]+)?/', PSI_PLUGIN_SMART_DEVICES, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($disks as $disk) {
- $buffer = "";
- if (CommonFunctions::executeProgram('smartctl', '--all'.((PSI_PLUGIN_SMART_DEVICE) ? ' --device '.PSI_PLUGIN_SMART_DEVICE : '').' '.$disk, $buffer, PSI_DEBUG)) {
- $this->_filecontent[$disk] = $buffer;
+ if ( defined('PSI_PLUGIN_SMART_DEVICES') && (PSI_PLUGIN_SMART_DEVICES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) {
+ $disks = eval(PSI_PLUGIN_SMART_DEVICES);
+ } else {
+ $disks = array(PSI_PLUGIN_SMART_DEVICES);
}
+ foreach ($disks as $disk) {
+ $buffer = "";
+ if (CommonFunctions::executeProgram('smartctl', '--all'.((PSI_PLUGIN_SMART_DEVICE) ? ' --device '.PSI_PLUGIN_SMART_DEVICE : '').' '.$disk, $buffer, PSI_DEBUG)) {
+ $this->_filecontent[$disk] = $buffer;
+ }
+ }
}
- $fullIds = preg_split('/([\s]+)?,([\s]+)?/', PSI_PLUGIN_SMART_IDS, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($fullIds as $fullId) {
- $arrFullId = preg_split('/-/', $fullId);
- $this->_ids[intval($arrFullId[0])] = strtolower($arrFullId[1]);
- if (!empty($arrFullId[2]))
- $this->_ids[intval($arrFullId[2])] = "#replace-".intval($arrFullId[0]);
+ if ( defined('PSI_PLUGIN_SMART_IDS') && (PSI_PLUGIN_SMART_IDS !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) {
+ $fullIds = eval(PSI_PLUGIN_SMART_IDS);
+ } else {
+ $fullIds = array(PSI_PLUGIN_SMART_IDS);
+ }
+ foreach ($fullIds as $fullId) {
+ $arrFullId = preg_split('/-/', $fullId);
+ $this->_ids[intval($arrFullId[0])] = strtolower($arrFullId[1]);
+ if (!empty($arrFullId[2]))
+ $this->_ids[intval($arrFullId[2])] = "#replace-".intval($arrFullId[0]);
+ }
}
break;
case 'data':
- $disks = preg_split('/([\s]+)?,([\s]+)?/', PSI_PLUGIN_SMART_DEVICES, -1, PREG_SPLIT_NO_EMPTY);
- $dn=0;
- foreach ($disks as $disk) {
- $buffer="";
- if ((CommonFunctions::rfts(APP_ROOT."/data/SMART{$dn}.txt", $buffer))&&(!empty($buffer))){
- $this->_filecontent[$disk] = $buffer;
+ if ( defined('PSI_PLUGIN_SMART_DEVICES') && (PSI_PLUGIN_SMART_DEVICES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) {
+ $disks = eval(PSI_PLUGIN_SMART_DEVICES);
+ } else {
+ $disks = array(PSI_PLUGIN_SMART_DEVICES);
}
- $dn++;
+ $dn=0;
+ foreach ($disks as $disk) {
+ $buffer="";
+ if ((CommonFunctions::rfts(APP_ROOT."/data/SMART{$dn}.txt", $buffer))&&(!empty($buffer))){
+ $this->_filecontent[$disk] = $buffer;
+ }
+ $dn++;
+ }
}
- $fullIds = preg_split('/([\s]+)?,([\s]+)?/', PSI_PLUGIN_SMART_IDS, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($fullIds as $fullId) {
- $arrFullId = preg_split('/-/', $fullId);
- $this->_ids[intval($arrFullId[0])] = strtolower($arrFullId[1]);
- if (!empty($arrFullId[2]))
- $this->_ids[intval($arrFullId[2])] = "#replace-".intval($arrFullId[0]);
+ if ( defined('PSI_PLUGIN_SMART_IDS') && (PSI_PLUGIN_SMART_IDS !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) {
+ $fullIds = eval(PSI_PLUGIN_SMART_IDS);
+ } else {
+ $fullIds = array(PSI_PLUGIN_SMART_IDS);
+ }
+ foreach ($fullIds as $fullId) {
+ $arrFullId = preg_split('/-/', $fullId);
+ $this->_ids[intval($arrFullId[0])] = strtolower($arrFullId[1]);
+ if (!empty($arrFullId[2]))
+ $this->_ids[intval($arrFullId[2])] = "#replace-".intval($arrFullId[0]);
+ }
}
break;
default:
Modified: branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php
===================================================================
--- branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php 2012-08-26 20:38:45 UTC (rev 652)
+++ branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php 2012-08-26 23:25:51 UTC (rev 653)
@@ -47,56 +47,74 @@
parent::__construct(__CLASS__, $enc);
switch (PSI_PLUGIN_SNMPPINFO_ACCESS) {
case 'command':
- $printers = preg_split('/([\s]+)?,([\s]+)?/', PSI_PLUGIN_SNMPPINFO_DEVICES, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($printers as $printer) {
- CommonFunctions::executeProgram("snmpwalk", "-On -c public -v 1 ".$printer." 1.3.6.1.2.1.1.5", $buffer, PSI_DEBUG);
- if (strlen(trim($buffer)) > 0) {
- $this->_filecontent[$printer] = $buffer;
- CommonFunctions::executeProgram("snmpwalk", "-On -c public -v 1 ".$printer." 1.3.6.1.2.1.43.11.1.1", $buffer2, PSI_DEBUG);
- if (strlen(trim($buffer2)) > 0) {
- $this->_filecontent[$printer] = $buffer."\n".$buffer2;
- }else{
- $this->_filecontent[$printer] = $buffer;
- }
- }
+ if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && (PSI_PLUGIN_SNMPPINFO_DEVICES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_SNMPPINFO_DEVICES)) {
+ $printers = eval(PSI_PLUGIN_SNMPPINFO_DEVICES);
+ } else {
+ $printers = array(PSI_PLUGIN_SNMPPINFO_DEVICES);
+ }
+ foreach ($printers as $printer) {
+ CommonFunctions::executeProgram("snmpwalk", "-On -c public -v 1 ".$printer." 1.3.6.1.2.1.1.5", $buffer, PSI_DEBUG);
+ if (strlen(trim($buffer)) > 0) {
+ $this->_filecontent[$printer] = $buffer;
+ CommonFunctions::executeProgram("snmpwalk", "-On -c public -v 1 ".$printer." 1.3.6.1.2.1.43.11.1.1", $buffer2, PSI_DEBUG);
+ if (strlen(trim($buffer2)) > 0) {
+ $this->_filecontent[$printer] = $buffer."\n".$buffer2;
+ }else{
+ $this->_filecontent[$printer] = $buffer;
+ }
+ }
+ }
}
break;
case 'php-snmp':
- snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);
- snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC);
- $printers = preg_split('/([\s]+)?,([\s]+)?/', PSI_PLUGIN_SNMPPINFO_DEVICES, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($printers as $printer) {
- if (! PSI_DEBUG) restore_error_handler();
- $bufferarr=snmprealwalk($printer, "public", "1.3.6.1.2.1.1.5");
- if (! PSI_DEBUG) set_error_handler('errorHandlerPsi');
- if (! empty($bufferarr)) {
- $buffer="";
- foreach ($bufferarr as $id=>$string) {
- $buffer=$buffer.$id." = ".$string."\n";
- }
- if (! PSI_DEBUG) restore_error_handler();
- $bufferarr2=snmprealwalk($printer, "public", "1.3.6.1.2.1.43.11.1.1");
- if (! PSI_DEBUG) set_error_handler('errorHandlerPsi');
- if (! empty($bufferarr2)) {
- foreach ($bufferarr2 as $id=>$string) {
- $buffer=$buffer.$id." = ".$string."\n";
- }
- }
- if (strlen(trim($buffer)) > 0) {
- $this->_filecontent[$printer] = $buffer;
- }
- }
- }
+ snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);
+ snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC);
+ if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && (PSI_PLUGIN_SNMPPINFO_DEVICES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_SNMPPINFO_DEVICES)) {
+ $printers = eval(PSI_PLUGIN_SNMPPINFO_DEVICES);
+ } else {
+ $printers = array(PSI_PLUGIN_SNMPPINFO_DEVICES);
+ }
+ foreach ($printers as $printer) {
+ if (! PSI_DEBUG) restore_error_handler();
+ $bufferarr=snmprealwalk($printer, "public", "1.3.6.1.2.1.1.5");
+ if (! PSI_DEBUG) set_error_handler('errorHandlerPsi');
+ if (! empty($bufferarr)) {
+ $buffer="";
+ foreach ($bufferarr as $id=>$string) {
+ $buffer=$buffer.$id." = ".$string."\n";
+ }
+ if (! PSI_DEBUG) restore_error_handler();
+ $bufferarr2=snmprealwalk($printer, "public", "1.3.6.1.2.1.43.11.1.1");
+ if (! PSI_DEBUG) set_error_handler('errorHandlerPsi');
+ if (! empty($bufferarr2)) {
+ foreach ($bufferarr2 as $id=>$string) {
+ $buffer=$buffer.$id." = ".$string."\n";
+ }
+ }
+ if (strlen(trim($buffer)) > 0) {
+ $this->_filecontent[$printer] = $buffer;
+ }
+ }
+ }
+ }
break;
case 'data':
- $printers = preg_split('/([\s]+)?,([\s]+)?/', PSI_PLUGIN_SNMPPINFO_DEVICES, -1, PREG_SPLIT_NO_EMPTY);
- $pn=0;
- foreach ($printers as $printer) {
- $buffer="";
- if ((CommonFunctions::rfts(APP_ROOT."/data/SNMPPInfo{$pn}.txt", $buffer))&&(!empty($buffer))){
- $this->_filecontent[$printer] = $buffer;
+ if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && (PSI_PLUGIN_SNMPPINFO_DEVICES !== false) ) {
+ if (preg_match(ARRAY_EXP, PSI_PLUGIN_SNMPPINFO_DEVICES)) {
+ $printers = eval(PSI_PLUGIN_SNMPPINFO_DEVICES);
+ } else {
+ $printers = array(PSI_PLUGIN_SNMPPINFO_DEVICES);
}
- $pn++;
+ $pn=0;
+ foreach ($printers as $printer) {
+ $buffer="";
+ if ((CommonFunctions::rfts(APP_ROOT."/data/SNMPPInfo{$pn}.txt", $buffer))&&(!empty($buffer))){
+ $this->_filecontent[$printer] = $buffer;
+ }
+ $pn++;
+ }
}
break;
default:
@@ -116,26 +134,26 @@
if ( empty($this->_filecontent)) {
return;
}
- foreach ($this->_filecontent as $printer=>$result) {
- $lines = preg_split('/\n/', $result);
- foreach ($lines as $line) {
- if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.6.1.(.*) = STRING:\s(.*)/', $line, $data)) {
- $this->_result[$printer][$data[1]]['prtMarkerSuppliesDescription']=trim($data[2],"\"");
- }
- if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.7.1.(.*) = INTEGER:\s(.*)/', $line, $data)) {
- $this->_result[$printer][$data[1]]['prtMarkerSuppliesSupplyUnit']=$data[2];
- }
- if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.8.1.(.*) = INTEGER:\s(.*)/', $line, $data)) {
- $this->_result[$printer][$data[1]]['prtMarkerSuppliesMaxCapacity']=$data[2];
- }
- if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.9.1.(.*) = INTEGER:\s(.*)/', $line, $data)) {
- $this->_result[$printer][$data[1]]['prtMarkerSuppliesLevel']=$data[2];
- }
- if (preg_match('/^.1.3.6.1.2.1.1.5.0 = STRING:\s(.*)/', $line, $data)) {
- $this->_result[$printer][0]['prtMarkerSuppliesDescription']=$data[1];
- }
- }
- }
+ foreach ($this->_filecontent as $printer=>$result) {
+ $lines = preg_split('/\n/', $result);
+ foreach ($lines as $line) {
+ if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.6.1.(.*) = STRING:\s(.*)/', $line, $data)) {
+ $this->_result[$printer][$data[1]]['prtMarkerSuppliesDescription']=trim($data[2],"\"");
+ }
+ if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.7.1.(.*) = INTEGER:\s(.*)/', $line, $data)) {
+ $this->_result[$printer][$data[1]]['prtMarkerSuppliesSupplyUnit']=$data[2];
+ }
+ if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.8.1.(.*) = INTEGER:\s(.*)/', $line, $data)) {
+ $this->_result[$printer][$data[1]]['prtMarkerSuppliesMaxCapacity']=$data[2];
+ }
+ if (preg_match('/^.1.3.6.1.2.1.43.11.1.1.9.1.(.*) = INTEGER:\s(.*)/', $line, $data)) {
+ $this->_result[$printer][$data[1]]['prtMarkerSuppliesLevel']=$data[2];
+ }
+ if (preg_match('/^.1.3.6.1.2.1.1.5.0 = STRING:\s(.*)/', $line, $data)) {
+ $this->_result[$printer][0]['prtMarkerSuppliesDescription']=$data[1];
+ }
+ }
+ }
}
/**
@@ -146,22 +164,22 @@
public function xml()
{
foreach ($this->_result as $printer=>$markersupplies_item) {
- $xmlsnmppinfo_printer = $this->xml->addChild("Printer");
- $xmlsnmppinfo_printer->addAttribute("Device", $printer);
- foreach ($markersupplies_item as $marker=>$snmppinfo_item) {
- if ($marker==0) {
- $xmlsnmppinfo_printer->addAttribute("Name", $snmppinfo_item['prtMarkerSuppliesDescription']);
- } else {
- $xmlsnmppinfo = $xmlsnmppinfo_printer->addChild("MarkerSupplies");
- if (isset($snmppinfo_item['prtMarkerSuppliesDescription']))
- $xmlsnmppinfo->addAttribute("Description", $snmppinfo_item['prtMarkerSuppliesDescription']);
- else
- $xmlsnmppinfo->addAttribute("Description",""); /* empty on some devices */
- $xmlsnmppinfo->addAttribute("SupplyUnit", $snmppinfo_item['prtMarkerSuppliesSupplyUnit']);
- $xmlsnmppinfo->addAttribute("MaxCapacity", $snmppinfo_item['prtMarkerSuppliesMaxCapacity']);
- $xmlsnmppinfo->addAttribute("Level", $snmppinfo_item['prtMarkerSuppliesLevel']);
- }
- }
+ $xmlsnmppinfo_printer = $this->xml->addChild("Printer");
+ $xmlsnmppinfo_printer->addAttribute("Device", $printer);
+ foreach ($markersupplies_item as $marker=>$snmppinfo_item) {
+ if ($marker==0) {
+ $xmlsnmppinfo_printer->addAttribute("Name", $snmppinfo_item['prtMarkerSuppliesDescription']);
+ } else {
+ $xmlsnmppinfo = $xmlsnmppinfo_printer->addChild("MarkerSupplies");
+ if (isset($snmppinfo_item['prtMarkerSuppliesDescription']))
+ $xmlsnmppinfo->addAttribute("Description", $snmppinfo_item['prtMarkerSuppliesDescription']);
+ else
+ $xmlsnmppinfo->addAttribute("Description",""); /* empty on some devices */
+ $xmlsnmppinfo->addAttribute("SupplyUnit", $snmppinfo_item['prtMarkerSuppliesSupplyUnit']);
+ $xmlsnmppinfo->addAttribute("MaxCapacity", $snmppinfo_item['prtMarkerSuppliesMaxCapacity']);
+ $xmlsnmppinfo->addAttribute("Level", $snmppinfo_item['prtMarkerSuppliesLevel']);
+ }
+ }
}
return $this->xml->getSimpleXmlElement();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-08-27 05:16:44
|
Revision: 654
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=654&view=rev
Author: namiltd
Date: 2012-08-27 05:16:33 +0000 (Mon, 27 Aug 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/includes/class.CommonFunctions.inc.php
branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php
branches/namiltd-ini/includes/xml/class.XML.inc.php
branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php
branches/namiltd-ini/plugins/SMART/class.SMART.inc.php
branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php
Modified: branches/namiltd-ini/includes/class.CommonFunctions.inc.php
===================================================================
--- branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-08-26 23:25:51 UTC (rev 653)
+++ branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-08-27 05:16:33 UTC (rev 654)
@@ -68,7 +68,7 @@
} else {
$arrPath = preg_split('/:/', getenv("PATH"), -1, PREG_SPLIT_NO_EMPTY);
}
- if ( defined('PSI_ADD_PATHS') && (PSI_ADD_PATHS !== false) ) {
+ if ( defined('PSI_ADD_PATHS') && is_string(PSI_ADD_PATHS) ) {
if (preg_match(ARRAY_EXP, PSI_ADD_PATHS)) {
$arrPath = array_merge(eval(PSI_ADD_PATHS), $arrPath); // In this order so $addpaths is before $arrPath when looking for a program
} else {
@@ -325,7 +325,7 @@
*/
public static function getPlugins()
{
- if ( defined('PSI_PLUGINS') && (PSI_PLUGINS !== false) ) {
+ if ( defined('PSI_PLUGINS') && is_string(PSI_PLUGINS) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGINS)) {
return eval(PSI_PLUGINS);
} else {
Modified: branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php
===================================================================
--- branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php 2012-08-26 23:25:51 UTC (rev 653)
+++ branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php 2012-08-27 05:16:33 UTC (rev 654)
@@ -39,7 +39,7 @@
public function __construct()
{
parent::__construct();
- if ( defined('PSI_UPS_APCUPSD_LIST') && (PSI_UPS_APCUPSD_LIST !== false) ) {
+ if ( defined('PSI_UPS_APCUPSD_LIST') && is_string(PSI_UPS_APCUPSD_LIST) ) {
if (preg_match(ARRAY_EXP, PSI_UPS_APCUPSD_LIST)) {
$upses = eval(PSI_UPS_APCUPSD_LIST);
} else {
Modified: branches/namiltd-ini/includes/xml/class.XML.inc.php
===================================================================
--- branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-08-26 23:25:51 UTC (rev 653)
+++ branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-08-27 05:16:33 UTC (rev 654)
@@ -140,7 +140,7 @@
private function _buildNetwork()
{
$network = $this->_xml->addChild('Network');
- if ( defined('PSI_HIDE_NETWORK_INTERFACE') && (PSI_HIDE_NETWORK_INTERFACE !== false) ) {
+ if ( defined('PSI_HIDE_NETWORK_INTERFACE') && is_string(PSI_HIDE_NETWORK_INTERFACE) ) {
if (preg_match(ARRAY_EXP, PSI_HIDE_NETWORK_INTERFACE)) {
$hideDevices = eval(PSI_HIDE_NETWORK_INTERFACE);
} else {
@@ -310,21 +310,21 @@
{
$hideMounts = $hideFstypes = $hideDisks = array();
$i = 1;
- if ( defined('PSI_HIDE_MOUNTS') && (PSI_HIDE_MOUNTS !== false) ) {
+ if ( defined('PSI_HIDE_MOUNTS') && is_string(PSI_HIDE_MOUNTS) ) {
if (preg_match(ARRAY_EXP, PSI_HIDE_MOUNTS)) {
$hideMounts = eval(PSI_HIDE_MOUNTS);
} else {
$hideMounts = array(PSI_HIDE_MOUNTS);
}
}
- if ( defined('PSI_HIDE_FS_TYPES') && (PSI_HIDE_FS_TYPES !== false) ) {
+ if ( defined('PSI_HIDE_FS_TYPES') && is_string(PSI_HIDE_FS_TYPES) ) {
if (preg_match(ARRAY_EXP, PSI_HIDE_FS_TYPES)) {
$hideFstypes = eval(PSI_HIDE_FS_TYPES);
} else {
$hideFstypes = array(PSI_HIDE_FS_TYPES);
}
}
- if ( defined('PSI_HIDE_DISKS') && (PSI_HIDE_DISKS !== false) ) {
+ if ( defined('PSI_HIDE_DISKS') && is_string(PSI_HIDE_DISKS) ) {
if (preg_match(ARRAY_EXP, PSI_HIDE_DISKS)) {
$hideDisks = eval(PSI_HIDE_DISKS);
} else {
Modified: branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php
===================================================================
--- branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php 2012-08-26 23:25:51 UTC (rev 653)
+++ branches/namiltd-ini/plugins/PSStatus/class.PSStatus.inc.php 2012-08-27 05:16:33 UTC (rev 654)
@@ -61,7 +61,7 @@
$this->_filecontent[] = array(trim($process->Caption), trim($process->ProcessId));
}
} else {
- if ( defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && (PSI_PLUGIN_PSSTATUS_PROCESSES !== false) ) {
+ if ( defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && is_string(PSI_PLUGIN_PSSTATUS_PROCESSES) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_PSSTATUS_PROCESSES)) {
$processes = eval(PSI_PLUGIN_PSSTATUS_PROCESSES);
} else {
@@ -104,7 +104,7 @@
if ( empty($this->_filecontent)) {
return;
}
- if ( defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && (PSI_PLUGIN_PSSTATUS_PROCESSES !== false) ) {
+ if ( defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && is_string(PSI_PLUGIN_PSSTATUS_PROCESSES) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_PSSTATUS_PROCESSES)) {
$processes = eval(PSI_PLUGIN_PSSTATUS_PROCESSES);
} else {
Modified: branches/namiltd-ini/plugins/SMART/class.SMART.inc.php
===================================================================
--- branches/namiltd-ini/plugins/SMART/class.SMART.inc.php 2012-08-26 23:25:51 UTC (rev 653)
+++ branches/namiltd-ini/plugins/SMART/class.SMART.inc.php 2012-08-27 05:16:33 UTC (rev 654)
@@ -53,7 +53,7 @@
parent::__construct(__CLASS__, $enc);
switch (PSI_PLUGIN_SMART_ACCESS) {
case 'command':
- if ( defined('PSI_PLUGIN_SMART_DEVICES') && (PSI_PLUGIN_SMART_DEVICES !== false) ) {
+ if ( defined('PSI_PLUGIN_SMART_DEVICES') && is_string(PSI_PLUGIN_SMART_DEVICES) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) {
$disks = eval(PSI_PLUGIN_SMART_DEVICES);
} else {
@@ -66,7 +66,7 @@
}
}
}
- if ( defined('PSI_PLUGIN_SMART_IDS') && (PSI_PLUGIN_SMART_IDS !== false) ) {
+ if ( defined('PSI_PLUGIN_SMART_IDS') && is_string(PSI_PLUGIN_SMART_IDS) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) {
$fullIds = eval(PSI_PLUGIN_SMART_IDS);
} else {
@@ -81,7 +81,7 @@
}
break;
case 'data':
- if ( defined('PSI_PLUGIN_SMART_DEVICES') && (PSI_PLUGIN_SMART_DEVICES !== false) ) {
+ if ( defined('PSI_PLUGIN_SMART_DEVICES') && is_string(PSI_PLUGIN_SMART_DEVICES) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) {
$disks = eval(PSI_PLUGIN_SMART_DEVICES);
} else {
@@ -96,7 +96,7 @@
$dn++;
}
}
- if ( defined('PSI_PLUGIN_SMART_IDS') && (PSI_PLUGIN_SMART_IDS !== false) ) {
+ if ( defined('PSI_PLUGIN_SMART_IDS') && is_string(PSI_PLUGIN_SMART_IDS) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) {
$fullIds = eval(PSI_PLUGIN_SMART_IDS);
} else {
Modified: branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php
===================================================================
--- branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php 2012-08-26 23:25:51 UTC (rev 653)
+++ branches/namiltd-ini/plugins/SNMPPInfo/class.SNMPPInfo.inc.php 2012-08-27 05:16:33 UTC (rev 654)
@@ -47,7 +47,7 @@
parent::__construct(__CLASS__, $enc);
switch (PSI_PLUGIN_SNMPPINFO_ACCESS) {
case 'command':
- if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && (PSI_PLUGIN_SNMPPINFO_DEVICES !== false) ) {
+ if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && is_string(PSI_PLUGIN_SNMPPINFO_DEVICES) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SNMPPINFO_DEVICES)) {
$printers = eval(PSI_PLUGIN_SNMPPINFO_DEVICES);
} else {
@@ -70,7 +70,7 @@
case 'php-snmp':
snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);
snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC);
- if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && (PSI_PLUGIN_SNMPPINFO_DEVICES !== false) ) {
+ if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && is_string(PSI_PLUGIN_SNMPPINFO_DEVICES) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SNMPPINFO_DEVICES)) {
$printers = eval(PSI_PLUGIN_SNMPPINFO_DEVICES);
} else {
@@ -101,7 +101,7 @@
}
break;
case 'data':
- if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && (PSI_PLUGIN_SNMPPINFO_DEVICES !== false) ) {
+ if ( defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && is_string(PSI_PLUGIN_SNMPPINFO_DEVICES) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SNMPPINFO_DEVICES)) {
$printers = eval(PSI_PLUGIN_SNMPPINFO_DEVICES);
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-08-27 11:08:52
|
Revision: 660
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=660&view=rev
Author: namiltd
Date: 2012-08-27 11:08:40 +0000 (Mon, 27 Aug 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/includes/autoloader.inc.php
Removed Paths:
-------------
branches/namiltd-ini/includes/mb/class.Coretemp.inc.php
branches/namiltd-ini/includes/mb/class.HDDTemp.inc.php
branches/namiltd-ini/includes/mb/class.HWSensors.inc.php
branches/namiltd-ini/includes/mb/class.Healthd.inc.php
branches/namiltd-ini/includes/mb/class.IPMI.inc.php
branches/namiltd-ini/includes/mb/class.K8Temp.inc.php
branches/namiltd-ini/includes/mb/class.LMSensors.inc.php
branches/namiltd-ini/includes/mb/class.MBM5.inc.php
branches/namiltd-ini/includes/mb/class.MBMon.inc.php
branches/namiltd-ini/includes/mb/class.Sensors.inc.php
branches/namiltd-ini/includes/ups/class.Apcupsd.inc.php
branches/namiltd-ini/includes/ups/class.Nut.inc.php
branches/namiltd-ini/includes/ups/class.UPS.inc.php
branches/namiltd-ini/plugins/BAT/
branches/namiltd-ini/plugins/MDStatus/
branches/namiltd-ini/plugins/PS/
branches/namiltd-ini/plugins/PSStatus/
branches/namiltd-ini/plugins/Quotas/
branches/namiltd-ini/plugins/SMART/
branches/namiltd-ini/plugins/SNMPPInfo/
branches/namiltd-ini/plugins/UpdateNotifier/
branches/namiltd-ini/plugins/ipmi/
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/ChangeLog 2012-08-27 11:08:40 UTC (rev 660)
@@ -3,7 +3,9 @@
phpSysInfo 3.1.0
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
-
+ - [UPD] Plugin ipmi ranamed to IPMIInfo and Update-Notifier to UpdateNotifier (to avoid name conflicts)
+ - [UPD] Case-insensitive for most of parameters
+
- [FIX] Fixed Bug [ 3561124 ] Incorrect reading of free mem on Mac OS X (thanks to pbobbenb)
phpSysInfo 3.0.19
@@ -12,11 +14,11 @@
- [ADD] Partial support of Minix and Haiku
- [ADD] Added Greek language (gr)
- [ADD] Alpine and Puppy to detected distros
-
+
- [Fix] Fixed LMSensor sensors detection
- [FIX] Fix CPU detection on Linux and BSD
- [FIX] Fix wrong values display on STATIC page
-
+
phpSysInfo 3.0.18
- [ADD] SMART plugin REPLACEMENT_ID# (alternative ID number) config option
Modified: branches/namiltd-ini/includes/autoloader.inc.php
===================================================================
--- branches/namiltd-ini/includes/autoloader.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/autoloader.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -24,10 +24,22 @@
*/
function __autoload($class_name)
{
- $class_name = str_replace('-', '', $class_name);
- $dirs = array('/plugins/'.$class_name.'/', '/includes/', '/includes/interface/', '/includes/to/', '/includes/to/device/', '/includes/os/', '/includes/mb/', '/includes/plugin/', '/includes/xml/', '/includes/web/', '/includes/error/', '/includes/js/', '/includes/output/', '/includes/ups/');
+ //$class_name = str_replace('-', '', $class_name);
+ /* case-insensitive folders */
+ $dirs = array('/plugins/'.strtolower($class_name).'/', '/includes/mb/', '/includes/ups/');
+
foreach ($dirs as $dir) {
+ if (file_exists(APP_ROOT.$dir.'class.'.strtolower($class_name).'.inc.php')) {
+ include_once APP_ROOT.$dir.'class.'.strtolower($class_name).'.inc.php';
+ return;
+ }
+ }
+
+ /* case-sensitive folders */
+ $dirs = array('/includes/', '/includes/interface/', '/includes/to/', '/includes/to/device/', '/includes/os/', '/includes/plugin/', '/includes/xml/', '/includes/web/', '/includes/error/', '/includes/js/', '/includes/output/');
+
+ foreach ($dirs as $dir) {
if (file_exists(APP_ROOT.$dir.'class.'.$class_name.'.inc.php')) {
include_once APP_ROOT.$dir.'class.'.$class_name.'.inc.php';
return;
Deleted: branches/namiltd-ini/includes/mb/class.Coretemp.inc.php
===================================================================
--- branches/namiltd-ini/includes/mb/class.Coretemp.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/mb/class.Coretemp.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -1,62 +0,0 @@
-<?php
-/**
- * coretemp sensor class
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * getting hardware temperature information through sysctl
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @author William Johansson <ra...@ra...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version Release: 3.0
- * @link http://phpsysinfo.sourceforge.net
- */
-class Coretemp extends Sensors
-{
- /**
- * get temperature information
- *
- * @return void
- */
- private function _temperature()
- {
- $smp = 1;
- CommonFunctions::executeProgram('sysctl', '-n kern.smp.cpus', $smp);
- for ($i = 0; $i < $smp; $i++) {
- $temp = 0;
- if (CommonFunctions::executeProgram('sysctl', '-n dev.cpu.'.$i.'.temperature', $temp)) {
- $dev = new SensorDevice();
- $dev->setName("CPU ".($i + 1));
- $dev->setValue($temp);
- $dev->setMax(70);
- $this->mbinfo->setMbTemp($dev);
- }
- }
- }
-
- /**
- * get the information
- *
- * @see PSI_Interface_Sensor::build()
- *
- * @return Void
- */
- public function build()
- {
- $this->_temperature();
- }
-}
-?>
Deleted: branches/namiltd-ini/includes/mb/class.HDDTemp.inc.php
===================================================================
--- branches/namiltd-ini/includes/mb/class.HDDTemp.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/mb/class.HDDTemp.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -1,136 +0,0 @@
-<?php
-/**
- * hddtemp sensor class
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * getting information from hddtemp
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @author T.A. van Roermund <ti...@va...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version Release: 3.0
- * @link http://phpsysinfo.sourceforge.net
- */
-class HDDTemp extends Sensors
-{
- /**
- * get the temperature information from hddtemp
- * access is available through tcp or command
- *
- * @return array temperatures in array
- */
- private function _temperature()
- {
- $ar_buf = array();
- switch (PSI_HDD_TEMP) {
- case "tcp":
- $lines = '';
- // Timo van Roermund: connect to the hddtemp daemon, use a 5 second timeout.
- $fp = @fsockopen('localhost', 7634, $errno, $errstr, 5);
- // if connected, read the output of the hddtemp daemon
- if ($fp) {
- while (!feof($fp)) {
- $lines .= fread($fp, 1024);
- }
- fclose($fp);
- } else {
- $this->error->addError("HDDTemp error", $errno.", ".$errstr);
- }
- $lines = str_replace("||", "|\n|", $lines);
- $ar_buf = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
- break;
- case "command":
- $strDrives = "";
- $strContent = "";
- $hddtemp_value = "";
- if (CommonFunctions::rfts("/proc/diskstats", $strContent, 0, 4096, false)) {
- $arrContent = preg_split("/\n/", $strContent, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($arrContent as $strLine) {
- preg_match("/^\s(.*)\s([a-z]*)\s(.*)/", $strLine, $arrSplit);
- if (! empty($arrSplit[2])) {
- $strDrive = '/dev/'.$arrSplit[2];
- if (file_exists($strDrive)) {
- $strDrives = $strDrives.$strDrive.' ';
- }
- }
- }
- } else {
- if (CommonFunctions::rfts("/proc/partitions", $strContent, 0, 4096, false)) {
- $arrContent = preg_split("/\n/", $strContent, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($arrContent as $strLine) {
- if (!preg_match("/^\s(.*)\s([\/a-z0-9]*(\/disc))\s(.*)/", $strLine, $arrSplit)) {
- preg_match("/^\s(.*)\s([a-z]*)\s(.*)/", $strLine, $arrSplit);
- }
- if (! empty($arrSplit[2])) {
- $strDrive = '/dev/'.$arrSplit[2];
- if (file_exists($strDrive)) {
- $strDrives = $strDrives.$strDrive.' ';
- }
- }
- }
- }
- }
- if (trim($strDrives) == "") {
- break;
- }
- if (CommonFunctions::executeProgram("hddtemp", $strDrives, $hddtemp_value)) {
- $hddtemp_value = preg_split("/\n/", $hddtemp_value, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($hddtemp_value as $line) {
- $temp = preg_split("/:\s/", $line, 3);
- if (count($temp) == 3 && preg_match("/^[0-9]/", $temp[2])) {
- preg_match("/^([0-9]*)(.*)/", $temp[2], $ar_temp);
- $temp[2] = trim($ar_temp[1]);
- $temp[3] = trim($ar_temp[2]);
- array_push($ar_buf, "|".implode("|", $temp)."|");
- }
- }
- }
- break;
- default:
- $this->error->addConfigError("temperature()", "PSI_HDD_TEMP");
- break;
- }
- // Timo van Roermund: parse the info from the hddtemp daemon.
- foreach ($ar_buf as $line) {
- $data = array();
- if (preg_match("/\|(.*)\|(.*)\|(.*)\|(.*)\|/", $line, $data)) {
- if (trim($data[3]) != "ERR") {
- // get the info we need
- $dev = new SensorDevice();
- $dev->setName($data[1] . ' (' . $data[2] . ')');
- if (is_numeric($data[3])) {
- $dev->setValue($data[3]);
- }
- $dev->setMax(60);
- $this->mbinfo->setMbTemp($dev);
- }
- }
- }
- }
-
- /**
- * get the information
- *
- * @see PSI_Interface_Sensor::build()
- *
- * @return Void
- */
- public function build()
- {
- $this->_temperature();
- }
-}
-?>
Deleted: branches/namiltd-ini/includes/mb/class.HWSensors.inc.php
===================================================================
--- branches/namiltd-ini/includes/mb/class.HWSensors.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/mb/class.HWSensors.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -1,123 +0,0 @@
-<?php
-/**
- * hwsensors sensor class
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * getting information from hwsensors
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version Release: 3.0
- * @link http://phpsysinfo.sourceforge.net
- */
-class HWSensors extends Sensors
-{
- /**
- * content to parse
- *
- * @var array
- */
- private $_lines = array();
-
- /**
- * fill the private content var through tcp or file access
- */
- function __construct()
- {
- parent::__construct();
- switch (strtolower(PSI_SENSOR_ACCESS)) {
- case 'tcp':
- $lines = "";
- CommonFunctions::executeProgram('sysctl', '-w hw.sensors', $lines);
- $this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
- break;
- default:
- $this->error->addConfigError('__construct()', 'PSI_SENSOR_ACCESS');
- break;
- }
- }
-
- /**
- * get temperature information
- *
- * @return void
- */
- private function _temperature()
- {
- foreach ($this->_lines as $line) {
- $ar_buf = preg_split("/[\s,]+/", $line);
- if (isset($ar_buf[3]) && $ar_buf[2] == 'temp') {
- $dev = new SensorDevice();
- $dev->setName($ar_buf[1]);
- $dev->setValue($ar_buf[3]);
- $dev->setMax(70);
- $this->mbinfo->setMbTemp($dev);
- }
- }
- }
-
- /**
- * get fan information
- *
- * @return void
- */
- private function _fans()
- {
- foreach ($this->_lines as $line) {
- $ar_buf = preg_split("/[\s,]+/", $line);
- if (isset($ar_buf[3]) && $ar_buf[2] == 'fanrpm') {
- $dev = new SensorDevice();
- $dev->setName($ar_buf[1]);
- $dev->setValue($ar_buf[3]);
- $this->mbinfo->setMbFan($dev);
- }
- }
- }
-
- /**
- * get voltage information
- *
- * @return void
- */
- private function _voltage()
- {
- foreach ($this->_lines as $line) {
- $ar_buf = preg_split("/[\s,]+/", $line);
- if (isset($ar_buf[3]) && $ar_buf[2] == 'volts_dc') {
- $dev = new SensorDevice();
- $dev->setName($ar_buf[1]);
- $dev->setValue($ar_buf[3]);
- $this->mbinfo->setMbVolt($dev);
- }
- }
- }
-
-
- /**
- * get the information
- *
- * @see PSI_Interface_Sensor::build()
- *
- * @return Void
- */
- public function build()
- {
- $this->_temperature();
- $this->_voltage();
- $this->_fans();
- }
-}
-?>
Deleted: branches/namiltd-ini/includes/mb/class.Healthd.inc.php
===================================================================
--- branches/namiltd-ini/includes/mb/class.Healthd.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/mb/class.Healthd.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -1,155 +0,0 @@
-<?php
-/**
- * healthd sensor class
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * getting information from healthd
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version Release: 3.0
- * @link http://phpsysinfo.sourceforge.net
- */
-class Healthd extends Sensors
-{
- /**
- * content to parse
- *
- * @var array
- */
- private $_lines = array();
-
- /**
- * fill the private content var through tcp or file access
- */
- public function __construct()
- {
- parent::__construct();
- switch (strtolower(PSI_SENSOR_ACCESS)) {
- case 'command':
- $lines = "";
- CommonFunctions::executeProgram('healthdc', '-t', $lines);
- $this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
- break;
- default:
- $this->error->addConfigError('__construct()', 'PSI_SENSOR_ACCESS');
- break;
- }
- }
-
- /**
- * get temperature information
- *
- * @return void
- */
- private function _temperature()
- {
- $ar_buf = preg_split("/\t+/", $this->_lines);
- $dev1 = new SensorDevice();
- $dev1->setName('temp1');
- $dev1->setValue($ar_buf[1]);
- $dev1->setMax(70);
- $this->mbinfo->setMbTemp($dev1);
- $dev2 = new SensorDevice();
- $dev2->setName('temp1');
- $dev2->setValue($ar_buf[2]);
- $dev2->setMax(70);
- $this->mbinfo->setMbTemp($dev2);
- $dev3 = new SensorDevice();
- $dev3->setName('temp1');
- $dev3->setValue($ar_buf[3]);
- $dev3->setMax(70);
- $this->mbinfo->setMbTemp($dev3);
- }
-
- /**
- * get fan information
- *
- * @return void
- */
- private function _fans()
- {
- $ar_buf = preg_split("/\t+/", $this->_lines);
- $dev1 = new SensorDevice();
- $dev1->setName('fan1');
- $dev1->setValue($ar_buf[4]);
- $dev1->setMin(3000);
- $this->mbinfo->setMbFan($dev1);
- $dev2 = new SensorDevice();
- $dev2->setName('fan2');
- $dev2->setValue($ar_buf[5]);
- $dev2->setMin(3000);
- $this->mbinfo->setMbFan($dev2);
- $dev3 = new SensorDevice();
- $dev3->setName('fan3');
- $dev3->setValue($ar_buf[6]);
- $dev3->setMin(3000);
- $this->mbinfo->setMbFan($dev3);
- }
-
- /**
- * get voltage information
- *
- * @return array voltage in array with lable
- */
- private function _voltage()
- {
- $ar_buf = preg_split("/\t+/", $this->_lines);
- $dev1 = new SensorDevice();
- $dev1->setName('Vcore1');
- $dev1->setValue($ar_buf[7]);
- $this->mbinfo->setMbVolt($dev1);
- $dev2 = new SensorDevice();
- $dev2->setName('Vcore2');
- $dev2->setValue($ar_buf[8]);
- $this->mbinfo->setMbVolt($dev2);
- $dev3 = new SensorDevice();
- $dev3->setName('3volt');
- $dev3->setValue($ar_buf[9]);
- $this->mbinfo->setMbVolt($dev3);
- $dev4 = new SensorDevice();
- $dev4->setName('+5Volt');
- $dev4->setValue($ar_buf[10]);
- $this->mbinfo->setMbVolt($dev4);
- $dev5 = new SensorDevice();
- $dev5->setName('+12Volt');
- $dev5->setValue($ar_buf[11]);
- $this->mbinfo->setMbVolt($dev5);
- $dev6 = new SensorDevice();
- $dev6->setName('-12Volt');
- $dev6->setValue($ar_buf[12]);
- $this->mbinfo->setMbVolt($dev6);
- $dev7 = new SensorDevice();
- $dev7->setName('-5Volt');
- $dev7->setValue($ar_buf[13]);
- $this->mbinfo->setMbVolt($dev7);
- }
-
- /**
- * get the information
- *
- * @see PSI_Interface_Sensor::build()
- *
- * @return Void
- */
- public function build()
- {
- $this->_temperature();
- $this->_fans();
- $this->_voltage();
- }
-}
-?>
Deleted: branches/namiltd-ini/includes/mb/class.IPMI.inc.php
===================================================================
--- branches/namiltd-ini/includes/mb/class.IPMI.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/mb/class.IPMI.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -1,105 +0,0 @@
-<?php
-/**
- * ipmi sensor class
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * getting information from ipmitool
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version Release: 3.0
- * @link http://phpsysinfo.sourceforge.net
- */
-class IPMI extends Sensors
-{
- /**
- * content to parse
- *
- * @var array
- */
- private $_lines = array();
-
- /**
- * fill the private content var through tcp or file access
- */
- public function __construct()
- {
- parent::__construct();
- switch (strtolower(PSI_SENSOR_ACCESS)) {
- case 'command':
- $lines = "";
- CommonFunctions::executeProgram('ipmitool', 'sensor', $lines);
- $this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
- break;
- default:
- $this->error->addConfigError('__construct()', 'PSI_SENSOR_ACCESS');
- break;
- }
- }
-
- /**
- * get temperature information
- *
- * @return void
- */
- private function _temp()
- {
- foreach ($this->_lines as $line) {
- $buffer = preg_split("/[ ]+\|[ ]+/", $line);
- if ($buffer[2] == "degrees C" && $buffer[5] != "na") {
- $dev = new SensorDevice();
- $dev->setName($buffer[0]);
- $dev->setValue($buffer[1]);
- $dev->setMax($buffer[8]);
- $this->mbinfo->setMbTemp($dev);
- }
- }
- }
-
- /**
- * get voltage information
- *
- * @return void
- */
- private function _voltage()
- {
- foreach ($this->_lines as $line) {
- $buffer = preg_split("/[ ]+\|[ ]+/", $line);
- if ($buffer[2] == "Volts" && $buffer[5] != "na") {
- $dev = new SensorDevice();
- $dev->setName($buffer[0]);
- $dev->setValue($buffer[1]);
- $dev->setMin($buffer[5]);
- $dev->setMax($buffer[8]);
- $this->mbinfo->setMbVolt($dev);
- }
- }
- }
-
- /**
- * get the information
- *
- * @see PSI_Interface_Sensor::build()
- *
- * @return Void
- */
- public function build()
- {
- $this->_temp();
- $this->_voltage();
- }
-}
-?>
Deleted: branches/namiltd-ini/includes/mb/class.K8Temp.inc.php
===================================================================
--- branches/namiltd-ini/includes/mb/class.K8Temp.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/mb/class.K8Temp.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -1,87 +0,0 @@
-<?php
-/**
- * K8Temp sensor class
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * getting information from k8temp
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version Release: 3.0
- * @link http://phpsysinfo.sourceforge.net
- */
-class K8Temp extends Sensors
-{
- /**
- * content to parse
- *
- * @var array
- */
- private $_lines = array();
-
- /**
- * fill the private array
- */
- function __construct()
- {
- parent::__construct();
- switch (strtolower(PSI_SENSOR_ACCESS)) {
- case 'command':
- $lines = "";
- CommonFunctions::executeProgram('k8temp', '', $lines);
- $this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
- break;
- default:
- $this->error->addConfigError('__construct()', 'PSI_SENSOR_ACCESS');
- break;
- }
- }
-
- /**
- * get temperature information
- *
- * @return void
- */
- private function _temperature()
- {
- foreach ($this->_lines as $line) {
- if (preg_match('/(.*):\s*(\d*)/', $line, $data)) {
- if ($data[2] > 0) {
- $dev = new SensorDevice();
- $dev->setName($data[1]);
- $dev->setMax('70.0');
- if ($data[2] < 250) {
- $dev->setValue($data[2]);
- }
- $this->mbinfo->setMbTemp($dev);
- }
- }
- }
- }
-
- /**
- * get the information
- *
- * @see PSI_Interface_Sensor::build()
- *
- * @return Void
- */
- public function build()
- {
- $this->_temperature();
- }
-}
-?>
Deleted: branches/namiltd-ini/includes/mb/class.LMSensors.inc.php
===================================================================
--- branches/namiltd-ini/includes/mb/class.LMSensors.inc.php 2012-08-27 06:29:36 UTC (rev 659)
+++ branches/namiltd-ini/includes/mb/class.LMSensors.inc.php 2012-08-27 11:08:40 UTC (rev 660)
@@ -1,245 +0,0 @@
-<?php
-/**
- * lmsensor sensor class
- *
- * PHP version 5
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version SVN: $Id$
- * @link http://phpsysinfo.sourceforge.net
- */
- /**
- * getting information from lmsensor
- *
- * @category PHP
- * @package PSI_Sensor
- * @author Michael Cramer <Big...@us...>
- * @copyright 2009 phpSysInfo
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @version Release: 3.0
- * @link http://phpsysinfo.sourceforge.net
- */
-class LMSensors extends Sensors
-{
- /**
- * content to parse
- *
- * @var array
- */
- private $_lines = array();
-
- /**
- * fill the private content var through tcp or file access
- */
- function __construct()
- {
- parent::__construct();
- switch (strtolower(PSI_SENSOR_ACCESS)) {
- case 'command':
- if (CommonFunctions::executeProgram("sensors", "", $lines)) {
- // Martijn Stolk: Dirty fix for misinterpreted output of sensors,
- // where info could come on next line when the label is too long.
- $lines = str_replace(":\n", ":", $lines);
- $lines = str_replace("\n\n", "\n", $lines);
- $this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
- }
- break;
- case 'file':
- if (CommonFunctions::rfts(APP_ROOT.'/data/lmsensors.txt', $lines)) {
- $lines = str_replace(":\n", ":", $lines);
- $lines = str_replace("\n\n", "\n", $lines);
- $this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
- }
- break;
- default:
- $this->error->addConfigError('__construct()', 'PSI_SENSOR_ACCESS');
- break;
- }
- }
-
- /**
- * get temperature information
- *
- * @return void
- */
- private function _temperature()
- {
- $ar_buf = array();
- foreach ($this->_lines as $line) {
- $data = array();
- if (preg_match("/(.*):(.*)\((.*)=(.*),(.*)=(.*)\)(.*)/", $line, $data)) {
- ;
- } elseif (preg_match("/(.*):(.*)\((.*)=(.*)\)(.*)/", $line, $data)) {
- ;
- } else {
- (preg_match("/(.*):(.*)/", $line, $data));
- }
- if (count($data) > 1) {
- $temp = substr(trim($data[2]), -1);
- switch ($temp) {
- case "C":
- case "F":
- array_push($ar_buf, $line);
- }
- }
- }
- foreach ($ar_buf as $line) {
- $data = array();
- if (preg_match("/(.*):(.*).C[ ]*\((.*)=(.*).C,(.*)=(.*).C\)(.*)\)/", $line, $data)) {
- ;
- } elseif (preg_match("/(.*):(.*).C[ ]*\((.*)=(.*).C,(.*)=(.*).C\)(.*)/", $line, $data)) {
- ;
- } elseif (preg_match("/(.*):(.*).C[ ]*\((.*)=(.*).C\)(.*)/", $line, $data)) {
- ;
- } else {
- (preg_match("/(.*):(.*).C[ \t]*$/", $line, $data));
- }
- foreach ($data as $key=>$value) {
- if (preg_match("/^\+?([0-9\.]+).?$/", trim($value), $newvalue)) {
- $data[$key] = trim($newvalue[1]);
- } else {
- $data[$key] = trim($value);
- }
- }
- $dev = new SensorDevice();
- $dev->setName($data[1]);
- $dev->setValue($data[2]);
-
- if (isset($data[6]) && $data[2] <= $data[6]) {
- $dev->setMax(max($data[4],$data[6]));
- } elseif (isset($data[4]) && $data[2] <= $data[4]) {
- $dev->setMax($data[4]);
- }
- $this->mbinfo->setMbTemp($dev);
- }
- }
-
- /**
- * get fan information
- *
- * @return void
- */
- private func...
[truncated message content] |
|
From: <na...@us...> - 2012-08-28 18:08:28
|
Revision: 664
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=664&view=rev
Author: namiltd
Date: 2012-08-28 18:08:16 +0000 (Tue, 28 Aug 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/config.php
branches/namiltd-ini/includes/class.CommonFunctions.inc.php
branches/namiltd-ini/includes/error/class.Error.inc.php
branches/namiltd-ini/includes/output/class.Output.inc.php
branches/namiltd-ini/includes/output/class.WebpageXML.inc.php
branches/namiltd-ini/includes/output/class.WebpageXSLT.inc.php
branches/namiltd-ini/includes/xml/class.XML.inc.php
branches/namiltd-ini/phpsysinfo.ini
branches/namiltd-ini/sample/main/1-cpuinfo.txt
branches/namiltd-ini/sample/main/1-dfiP.txt
branches/namiltd-ini/sample/main/1-dfkP.txt
branches/namiltd-ini/sample/main/1-mount.txt
branches/namiltd-ini/sample/main/cpuinfo1.txt
branches/namiltd-ini/sample/main/df1.txt
branches/namiltd-ini/sample/main/mount1.txt
branches/namiltd-ini/sample/main/swaps1.txt
branches/namiltd-ini/sample/motherboard/ipmitool/ipmitool1.txt
branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors1.txt
branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors2.txt
branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors3.txt
branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors4.txt
branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors5.txt
branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors6.txt
branches/namiltd-ini/sample/motherboard/mbm5/MBM51.csv
branches/namiltd-ini/sample/plugin_bat/ac_state1.txt
branches/namiltd-ini/sample/plugin_bat/battery_info1.txt
branches/namiltd-ini/sample/plugin_bat/battery_state1.txt
branches/namiltd-ini/sample/plugin_mdstat/raid1.txt
branches/namiltd-ini/sample/plugin_mdstat/raid2.txt
branches/namiltd-ini/sample/plugin_mdstat/raid3.txt
branches/namiltd-ini/sample/plugin_mdstat/raid4.txt
branches/namiltd-ini/sample/plugin_mdstat/raid5.txt
branches/namiltd-ini/sample/plugin_mdstat/raid6.txt
branches/namiltd-ini/sample/plugin_psstatus/psstatus1.txt
branches/namiltd-ini/templates/html/error_config.html
branches/namiltd-ini/templates/html/index_all.html
branches/namiltd-ini/templates/html/index_dynamic.html
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/config.php 2012-08-28 18:08:16 UTC (rev 664)
@@ -1,7 +1,48 @@
<?php
if (!defined('PSI_CONFIG_FILE')){
+ /**
+ * phpSysInfo version
+ */
+ define('PSI_VERSION','3.1.x');
+
+ /**
+ * phpSysInfo configuration
+ */
define('PSI_CONFIG_FILE', APP_ROOT.'/phpsysinfo.ini');
+
+ /* get git revision */
+ if (file_exists (APP_ROOT.'/.git/HEAD')){
+ if (function_exists('errorHandlerPsi')) restore_error_handler();
+ $contents = file_get_contents(APP_ROOT.'/.git/HEAD');
+ if (function_exists('errorHandlerPsi')) set_error_handler('errorHandlerPsi');
+ if ($contents && preg_match("/^ref:\s+(.*)\/([^\/\s]*)/m", $contents, $matches)) {
+ if (function_exists('errorHandlerPsi')) restore_error_handler();
+ $contents = file_get_contents(APP_ROOT.'/.git/'.$matches[1]."/".$matches[2]);
+ if (function_exists('errorHandlerPsi')) set_error_handler('errorHandlerPsi');
+ if ($contents && preg_match("/^([^\s]*)/m", $contents, $revision)) {
+ define('PSI_VERSION_STRING', PSI_VERSION ."-".$matches[2]."-".$revision[1]);
+ } else {
+ define('PSI_VERSION_STRING', PSI_VERSION ."-".$matches[2]);
+ }
+ }
+ }
+ /* get svn revision */
+ if ((!defined('PSI_VERSION_STRING'))&&(file_exists (APP_ROOT.'/.svn/entries'))){
+ if (function_exists('errorHandlerPsi')) restore_error_handler();
+ $contents = file_get_contents(APP_ROOT.'/.svn/entries');
+ if (function_exists('errorHandlerPsi')) set_error_handler('errorHandlerPsi');
+ if ($contents && preg_match("/dir\n(.+)/", $contents, $matches)) {
+ define('PSI_VERSION_STRING', PSI_VERSION."-r".$matches[1]);
+ } else {
+ define('PSI_VERSION_STRING', PSI_VERSION);
+ }
+ }
+ if (!defined('PSI_VERSION_STRING')){
+ define('PSI_VERSION_STRING', PSI_VERSION);
+ }
+
define('ARRAY_EXP', '/^return array \([^;]*\);$/'); //array expression search
+
if ((!is_readable(PSI_CONFIG_FILE)) || !($config = @parse_ini_file(PSI_CONFIG_FILE, true))){
$tpl = new Template("/templates/html/error_config.html");
echo $tpl->fetch();
Modified: branches/namiltd-ini/includes/class.CommonFunctions.inc.php
===================================================================
--- branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-08-28 18:08:16 UTC (rev 664)
@@ -25,33 +25,8 @@
*/
class CommonFunctions
{
- /**
- * phpSysInfo version
- *
- * @var string
- */
- const PSI_VERSION = '3.1.x';
- public static $PSI_VERSION_STRING = self::PSI_VERSION;
-
/**
- * get svn version info
- *
- * @return none
- */
- public static function checkForSVN()
- {
- if (file_exists (dirname(__FILE__) . '/.svn/entries')){
- restore_error_handler();
- $contents = file_get_contents(dirname(__FILE__) . '/.svn/entries');
- set_error_handler('errorHandlerPsi');
- if ($contents && preg_match("/dir\n(.+)/", $contents, $matches))
- self::$PSI_VERSION_STRING = self::PSI_VERSION."-r".$matches[1];
- }
- }
-
-
- /**
* Find a system program, do also path checking when not running on WINNT
* on WINNT we simply return the name with the exe extension to the program name
*
@@ -327,9 +302,9 @@
{
if ( defined('PSI_PLUGINS') && is_string(PSI_PLUGINS) ) {
if (preg_match(ARRAY_EXP, PSI_PLUGINS)) {
- return eval(PSI_PLUGINS);
+ return eval(strtolower(PSI_PLUGINS));
} else {
- return array(PSI_PLUGINS);
+ return array(strtolower(PSI_PLUGINS));
}
} else {
return array();
Modified: branches/namiltd-ini/includes/error/class.Error.inc.php
===================================================================
--- branches/namiltd-ini/includes/error/class.Error.inc.php 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/includes/error/class.Error.inc.php 2012-08-28 18:08:16 UTC (rev 664)
@@ -161,7 +161,7 @@
$dom->appendChild($root);
$xml = new SimpleXMLExtended(simplexml_import_dom($dom), 'UTF-8');
$generation = $xml->addChild('Generation');
- $generation->addAttribute('version', CommonFunctions::$PSI_VERSION_STRING);
+ $generation->addAttribute('version', PSI_VERSION_STRING);
$generation->addAttribute('timestamp', time());
$xmlerr = $xml->addChild("Errors");
foreach ($this->_arrErrorList as $arrLine) {
Modified: branches/namiltd-ini/includes/output/class.Output.inc.php
===================================================================
--- branches/namiltd-ini/includes/output/class.Output.inc.php 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/includes/output/class.Output.inc.php 2012-08-28 18:08:16 UTC (rev 664)
@@ -37,7 +37,6 @@
*/
public function __construct()
{
- CommonFunctions::checkForSVN();
CommonFunctions::checkForExtensions();
$this->error = Error::singleton();
$this->_checkConfig();
Modified: branches/namiltd-ini/includes/output/class.WebpageXML.inc.php
===================================================================
--- branches/namiltd-ini/includes/output/class.WebpageXML.inc.php 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/includes/output/class.WebpageXML.inc.php 2012-08-28 18:08:16 UTC (rev 664)
@@ -165,7 +165,7 @@
$this->_completeXML = true;
}
if ($plugin) {
- if (in_array($plugin, CommonFunctions::getPlugins())) {
+ if (in_array(strtolower($plugin), CommonFunctions::getPlugins())) {
$this->_pluginName = $plugin;
$this->_pluginRequest = true;
}
Modified: branches/namiltd-ini/includes/output/class.WebpageXSLT.inc.php
===================================================================
--- branches/namiltd-ini/includes/output/class.WebpageXSLT.inc.php 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/includes/output/class.WebpageXSLT.inc.php 2012-08-28 18:08:16 UTC (rev 664)
@@ -40,7 +40,6 @@
*/
public function run()
{
- CommonFunctions::checkForSVN();
CommonFunctions::checkForExtensions(array('xsl'));
$xmlfile = $this->getXMLString();
$xslfile = "phpsysinfo.xslt";
Modified: branches/namiltd-ini/includes/xml/class.XML.inc.php
===================================================================
--- branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-08-28 18:08:16 UTC (rev 664)
@@ -517,7 +517,7 @@
$this->_xml = new SimpleXMLExtended(simplexml_import_dom($dom), $this->_sysinfo->getEncoding());
$generation = $this->_xml->addChild('Generation');
- $generation->addAttribute('version', CommonFunctions::$PSI_VERSION_STRING);
+ $generation->addAttribute('version', PSI_VERSION_STRING);
$generation->addAttribute('timestamp', time());
$options = $this->_xml->addChild('Options');
$options->addAttribute('tempFormat', defined('PSI_TEMP_FORMAT') ? strtolower(PSI_TEMP_FORMAT) : 'c');
Modified: branches/namiltd-ini/phpsysinfo.ini
===================================================================
--- branches/namiltd-ini/phpsysinfo.ini 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/phpsysinfo.ini 2012-08-28 18:08:16 UTC (rev 664)
@@ -279,13 +279,13 @@
DEVICE="BAT0"
-[ipmi]
-; ipmi Plugin configuration
+[ipmiinfo]
+; ipmiinfo Plugin configuration
; define how to access the IPMI statistic data
; - "command" ipmitool command is run everytime the block gets refreshed or build
; if access error execute first: chmod 666 /dev/ipmi0
-; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ipmi.txt"; content is the output from "ipmitool sensor")
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ipmiinfo.txt"; content is the output from "ipmitool sensor")
;
ACCESS="command"
@@ -349,7 +349,7 @@
; Not recommended method:
; execute: chmod 4755 /usr/sbin/smartctl
; - "data" (a file must be available in the data directory of the
-; phpsysinfo installation with the filename "SMART{disk_number}.txt";
+; phpsysinfo installation with the filename "smart{disk_number}.txt";
; content is the output from "smartctl --all device")
;
ACCESS="command"
@@ -383,10 +383,10 @@
; - "php-snmp" execute php snmprealwalk function (php-snmp module must be installed)
; - "command" execute snmpwalk command
; - "data" a file must be available in the data directory of the
-; phpsysinfo installation with the filename "SNMPPInfo{printer_number}.txt";
+; phpsysinfo installation with the filename "snmppinfo{printer_number}.txt";
; content is the output from:
-; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.1.5 > SNMPPInfo{printer_number}.txt
-; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.43.11.1.1 >> SNMPPInfo{printer_number}.txt
+; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.1.5 > snmppinfo{printer_number}.txt
+; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.43.11.1.1 >> snmppinfo{printer_number}.txt
;
ACCESS="php-snmp"
Modified: branches/namiltd-ini/sample/main/1-cpuinfo.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/main/1-dfiP.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/main/1-dfkP.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/main/1-mount.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/main/cpuinfo1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/main/df1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/main/mount1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/main/swaps1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/ipmitool/ipmitool1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors2.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors3.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors4.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors5.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/lmsensors/lmsensors6.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/motherboard/mbm5/MBM51.csv
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_bat/ac_state1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_bat/battery_info1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_bat/battery_state1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_mdstat/raid1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_mdstat/raid2.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_mdstat/raid3.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_mdstat/raid4.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_mdstat/raid5.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_mdstat/raid6.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/sample/plugin_psstatus/psstatus1.txt
===================================================================
(Binary files differ)
Modified: branches/namiltd-ini/templates/html/error_config.html
===================================================================
--- branches/namiltd-ini/templates/html/error_config.html 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/templates/html/error_config.html 2012-08-28 18:08:16 UTC (rev 664)
@@ -16,7 +16,7 @@
<h1>phpSysInfo - Error</h1>
<div style="position:absolute;top:150px;text-align:center;width:95%;">
<p style="margin:12pt;"><strong>config.php</strong> does not exist or is not readable by the webserver in the phpsysinfo directory.</p>
- <p style="margin:12pt;">Generated by <a href="http://phpsysinfo.sourceforge.net/">phpSysInfo - <?php echo CommonFunctions::$PSI_VERSION_STRING ?></a></p>
+ <p style="margin:12pt;">Generated by <a href="http://phpsysinfo.sourceforge.net/">phpSysInfo - <?php echo PSI_VERSION_STRING ?></a></p>
</div>
</body>
</html>
Modified: branches/namiltd-ini/templates/html/index_all.html
===================================================================
--- branches/namiltd-ini/templates/html/index_all.html 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/templates/html/index_all.html 2012-08-28 18:08:16 UTC (rev 664)
@@ -34,7 +34,7 @@
<p style="margin:12pt;">Loading <a href="index.php?disp=static">redirection target</a></p>
<p style="margin:12pt;">In approx. 2 seconds the redirection target page should load.<br/>
If it doesn't please select the link above.</p>
- <p style="margin:12pt;">Generated by <a href="http://phpsysinfo.sourceforge.net/">phpSysInfo - <?php echo CommonFunctions::$PSI_VERSION_STRING ?></a></p>
+ <p style="margin:12pt;">Generated by <a href="http://phpsysinfo.sourceforge.net/">phpSysInfo - <?php echo PSI_VERSION_STRING ?></a></p>
</div>
</body>
</html>
Modified: branches/namiltd-ini/templates/html/index_dynamic.html
===================================================================
--- branches/namiltd-ini/templates/html/index_dynamic.html 2012-08-27 22:27:01 UTC (rev 663)
+++ branches/namiltd-ini/templates/html/index_dynamic.html 2012-08-28 18:08:16 UTC (rev 664)
@@ -23,12 +23,12 @@
<script type="text/JavaScript" src="./js.php?name=jquery.treeTable"></script>
<script type="text/JavaScript" src="./js.php?name=phpsysinfo"></script>
<?php foreach (CommonFunctions::getPlugins() as $plugin) : ?>
- <?php if (file_exists("./plugins/".strtolower($plugin)."/css/".strtolower($plugin).".css")) : ?>
- <link type="text/css" rel="stylesheet" href="./plugins/<?php echo strtolower($plugin) ?>/css/<?php echo strtolower($plugin) ?>.css" />
+ <?php if (file_exists("./plugins/".$plugin."/css/".$plugin.".css")) : ?>
+ <link type="text/css" rel="stylesheet" href="./plugins/<?php echo $plugin ?>/css/<?php echo $plugin ?>.css" />
<?php endif; ?>
- <script type="text/JavaScript" src="./js.php?plugin=<?php echo strtolower($plugin) ?>"></script>
+ <script type="text/JavaScript" src="./js.php?plugin=<?php echo $plugin ?>"></script>
<?php endforeach; ?>
- <title>phpSysInfo <?php echo CommonFunctions::$PSI_VERSION_STRING ?></title>
+ <title>phpSysInfo <?php echo PSI_VERSION_STRING ?></title>
</head>
<body>
<div id="loader">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-08-31 09:03:36
|
Revision: 667
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=667&view=rev
Author: namiltd
Date: 2012-08-31 09:03:26 +0000 (Fri, 31 Aug 2012)
Log Message:
-----------
Updated jQuery plugin to 1.8.1
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/js/jQuery/README
branches/namiltd-ini/js/jQuery/jquery.js
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-08-29 08:34:08 UTC (rev 666)
+++ branches/namiltd-ini/ChangeLog 2012-08-31 09:03:26 UTC (rev 667)
@@ -5,6 +5,8 @@
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
- [UPD] Plugin ipmi ranamed to IPMIInfo and Update-Notifier to UpdateNotifier (to avoid name conflicts)
- [UPD] Case-insensitive for most of parameters
+ - [UPD] Updated jQuery plugin to 1.8.1
+ - [UPD] Updated jQuery plugin nyroModal to 1.6.2+jquery1.8fix
- [FIX] Fixed Bug [ 3561124 ] Incorrect reading of free mem on Mac OS X (thanks to pbobbenb)
Modified: branches/namiltd-ini/js/jQuery/README
===================================================================
--- branches/namiltd-ini/js/jQuery/README 2012-08-29 08:34:08 UTC (rev 666)
+++ branches/namiltd-ini/js/jQuery/README 2012-08-31 09:03:26 UTC (rev 667)
@@ -3,7 +3,7 @@
jquery.js
---------
-VERSION : 1.8.1pre 9683f82d9d89059371fe2e4428f2d4fe676966f2
+VERSION : 1.8.1
URL : http://jquery.com/
DESC : jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle
events, perform animations, and add Ajax interactions to your web pages.
Modified: branches/namiltd-ini/js/jQuery/jquery.js
===================================================================
--- branches/namiltd-ini/js/jQuery/jquery.js 2012-08-29 08:34:08 UTC (rev 666)
+++ branches/namiltd-ini/js/jQuery/jquery.js 2012-08-31 09:03:26 UTC (rev 667)
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.8.1pre 9683f82d9d89059371fe2e4428f2d4fe676966f2
+ * jQuery JavaScript Library v1.8.1
* http://jquery.com/
*
* Includes Sizzle.js
@@ -9,7 +9,7 @@
* Released under the MIT license
* http://jquery.org/license
*
- * Date: Tue Aug 28 2012 21:05:58 GMT-0700 (PDT)
+ * Date: Thu Aug 30 2012 17:17:22 GMT-0400 (Eastern Daylight Time)
*/
(function( window, undefined ) {
var
@@ -186,7 +186,7 @@
selector: "",
// The current version of jQuery being used
- jquery: "1.8.1pre 9683f82d9d89059371fe2e4428f2d4fe676966f2",
+ jquery: "1.8.1",
// The default length of a jQuery object is 0
length: 0,
@@ -4866,8 +4866,10 @@
return results.length > 0 ? fn( results, argument, not ) : [];
}
-function handlePOS( selector, context, results, seed, groups ) {
- var match, not, anchor, ret, elements, currentContexts, part, lastIndex,
+function handlePOS( groups, context, results, seed ) {
+ var group, part, j, groupLen, token, selector,
+ anchor, elements, match, matched,
+ lastIndex, currentContexts, not,
i = 0,
len = groups.length,
rpos = matchExpr["POS"],
@@ -4886,52 +4888,60 @@
};
for ( ; i < len; i++ ) {
- // Reset regex index to 0
- rpos.exec("");
- selector = groups[i].selector;
- ret = [];
- anchor = 0;
+ group = groups[i];
+ part = "";
elements = seed;
- while ( (match = rpos.exec( selector )) ) {
- lastIndex = rpos.lastIndex = match.index + match[0].length;
- if ( lastIndex > anchor ) {
- part = selector.slice( anchor, match.index );
- anchor = lastIndex;
- currentContexts = [ context ];
+ for ( j = 0, groupLen = group.length; j < groupLen; j++ ) {
+ token = group[j];
+ selector = token.string;
+ if ( token.part === "PSEUDO" ) {
+ // Reset regex index to 0
+ rpos.exec("");
+ anchor = 0;
+ while ( (match = rpos.exec( selector )) ) {
+ matched = true;
+ lastIndex = rpos.lastIndex = match.index + match[0].length;
+ if ( lastIndex > anchor ) {
+ part += selector.slice( anchor, match.index );
+ anchor = lastIndex;
+ currentContexts = [ context ];
- if ( rcombinators.test(part) ) {
- if ( elements ) {
- currentContexts = elements;
+ if ( rcombinators.test(part) ) {
+ if ( elements ) {
+ currentContexts = elements;
+ }
+ elements = seed;
+ }
+
+ if ( (not = rendsWithNot.test( part )) ) {
+ part = part.slice( 0, -5 ).replace( rcombinators, "$&*" );
+ anchor++;
+ }
+
+ if ( match.length > 1 ) {
+ match[0].replace( rposgroups, setUndefined );
+ }
+ elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not );
}
- elements = seed;
+ part = "";
}
- if ( (not = rendsWithNot.test( part )) ) {
- part = part.slice( 0, -5 ).replace( rcombinators, "$&*" );
- anchor++;
- }
+ }
- if ( match.length > 1 ) {
- match[0].replace( rposgroups, setUndefined );
- }
- elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not );
+ if ( !matched ) {
+ part += selector;
}
+ matched = false;
}
- if ( elements ) {
- ret = ret.concat( elements );
-
- if ( (part = selector.slice( anchor )) ) {
- if ( rcombinators.test(part) ) {
- multipleContexts( part, ret, results, seed );
- } else {
- Sizzle( part, context, results, seed ? seed.concat(elements) : elements );
- }
+ if ( part ) {
+ if ( rcombinators.test(part) ) {
+ multipleContexts( part, elements || [ context ], results, seed );
} else {
- push.apply( results, ret );
+ Sizzle( part, context, results, seed ? seed.concat(elements) : elements );
}
} else {
- Sizzle( selector, context, results, seed );
+ push.apply( results, elements );
}
}
@@ -4949,7 +4959,7 @@
// POS handling
if ( matchExpr["POS"].test(selector) ) {
- return handlePOS( selector, context, results, seed, match );
+ return handlePOS( match, context, results, seed );
}
if ( seed ) {
@@ -4960,11 +4970,12 @@
} else if ( match.length === 1 ) {
// Take a shortcut and set the context if the root selector is an ID
- if ( (tokens = slice.call( match[0], 0 )).length > 2 && Expr.relative[ tokens[1].part ] &&
+ if ( (tokens = slice.call( match[0], 0 )).length > 2 &&
+ (token = tokens[0]).part === "ID" &&
contextNodeType === 9 && !xml &&
- (match = matchExpr["ID"].exec( tokens[0].string )) ) {
+ Expr.relative[ tokens[1].part ] ) {
- context = Expr.find["ID"]( match[1], context, xml )[0];
+ context = Expr.find["ID"]( token.captures[0].replace( rbackslash, "" ), context, xml )[0];
if ( !context ) {
return results;
}
@@ -6377,6 +6388,9 @@
ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
rposition = /^(top|right|bottom|left)$/,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
rmargin = /^margin/,
rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
@@ -6868,12 +6882,14 @@
jQuery.cssHooks[ name ] = {
get: function( elem, computed, extra ) {
if ( computed ) {
- if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) {
- return getWidthOrHeight( elem, name, extra );
- } else {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {
return jQuery.swap( elem, cssShow, function() {
return getWidthOrHeight( elem, name, extra );
});
+ } else {
+ return getWidthOrHeight( elem, name, extra );
}
}
},
@@ -8924,6 +8940,7 @@
// if we include width, step value is 1 to do all cssExpand values,
// if we don't include width, step value is 2 to skip over Left and Right
+ includeWidth = includeWidth? 1 : 0;
for( ; i < 4 ; i += 2 - includeWidth ) {
which = cssExpand[ i ];
attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-02 11:20:02
|
Revision: 669
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=669&view=rev
Author: namiltd
Date: 2012-09-02 11:19:56 +0000 (Sun, 02 Sep 2012)
Log Message:
-----------
Fixed UTF8 encoding for Linux
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/config.php
branches/namiltd-ini/data/distros.ini
branches/namiltd-ini/includes/class.CommonFunctions.inc.php
branches/namiltd-ini/includes/os/class.OS.inc.php
branches/namiltd-ini/includes/output/class.Output.inc.php
Added Paths:
-----------
branches/namiltd-ini/gfx/images/Turbo.png
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-08-31 15:51:27 UTC (rev 668)
+++ branches/namiltd-ini/ChangeLog 2012-09-02 11:19:56 UTC (rev 669)
@@ -2,6 +2,8 @@
phpSysInfo 3.1.0
+ - [ADD] Turbolinux to detected distros
+
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
- [UPD] Plugin ipmi ranamed to IPMIInfo and Update-Notifier to UpdateNotifier (to avoid name conflicts)
- [UPD] Case-insensitive for most of parameters
@@ -9,6 +11,7 @@
- [UPD] Updated jQuery plugin nyroModal to 1.6.2+jquery1.8fix
- [FIX] Fixed Bug [ 3561124 ] Incorrect reading of free mem on Mac OS X (thanks to pbobbenb)
+ - [FIX] Fixed UTF8 encoding for Linux
phpSysInfo 3.0.19
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-08-31 15:51:27 UTC (rev 668)
+++ branches/namiltd-ini/config.php 2012-09-02 11:19:56 UTC (rev 669)
@@ -1,10 +1,10 @@
<?php
if (!defined('PSI_CONFIG_FILE')){
+//putenv('LANG=C.UTF-8');
/**
* phpSysInfo version
*/
define('PSI_VERSION','3.1.x');
-
/**
* phpSysInfo configuration
*/
@@ -41,6 +41,29 @@
define('PSI_VERSION_STRING', PSI_VERSION);
}
+ /* get Linux charset */
+ if (PHP_OS == 'Linux'){
+ if (file_exists ('/etc/sysconfig/i18n')){
+ if (function_exists('errorHandlerPsi')) restore_error_handler();
+ $contents = file_get_contents('/etc/sysconfig/i18n');
+ if (function_exists('errorHandlerPsi')) set_error_handler('errorHandlerPsi');
+ if ($contents && preg_match("/^(LANG=\".*\")/m", $contents, $matches)) {
+ if (exec($matches[1].' locale -k LC_CTYPE 2>/dev/null', $lines)) {
+ foreach ($lines as $line) {
+ if ($contents && preg_match("/^charmap=\"(.*)\"/m", $line, $matches)) {
+ define('PSI_SYSTEM_CHARSET', $matches[1]);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (!defined('PSI_SYSTEM_CHARSET')){
+ define('PSI_SYSTEM_CHARSET', null);
+ }
+
+
define('ARRAY_EXP', '/^return array \([^;]*\);$/'); //array expression search
if ((!is_readable(PSI_CONFIG_FILE)) || !($config = @parse_ini_file(PSI_CONFIG_FILE, true))){
Modified: branches/namiltd-ini/data/distros.ini
===================================================================
--- branches/namiltd-ini/data/distros.ini 2012-08-31 15:51:27 UTC (rev 668)
+++ branches/namiltd-ini/data/distros.ini 2012-09-02 11:19:56 UTC (rev 669)
@@ -158,3 +158,7 @@
[Wary Puppy]
Image = "Puppy.png"
Files = "/etc/DISTRO_SPECS"
+
+[Turbolinux]
+Image = "Turbo.png"
+Files = "/etc/turbolinux-release"
Added: branches/namiltd-ini/gfx/images/Turbo.png
===================================================================
(Binary files differ)
Property changes on: branches/namiltd-ini/gfx/images/Turbo.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified: branches/namiltd-ini/includes/class.CommonFunctions.inc.php
===================================================================
--- branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-08-31 15:51:27 UTC (rev 668)
+++ branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-09-02 11:19:56 UTC (rev 669)
@@ -221,11 +221,11 @@
*/
public static function checkForExtensions($arrExt = array())
{
- if (PHP_OS == "Minix")
- $arrReq = array('simplexml', 'pcre', 'xml', 'dom');
- if (PHP_OS == "WINNT")
+ if ( (PHP_OS == "Minix") || (PSI_SYSTEM_CHARSET == "UTF-8") )
+ $arrReq = array('simplexml', 'pcre', 'xml', 'dom');
+ else if (PHP_OS == "WINNT")
$arrReq = array('simplexml', 'pcre', 'xml', 'mbstring', 'dom', 'com_dotnet');
- else
+ else
$arrReq = array('simplexml', 'pcre', 'xml', 'mbstring', 'dom');
$extensions = array_merge($arrExt, $arrReq);
$text = "";
Modified: branches/namiltd-ini/includes/os/class.OS.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.OS.inc.php 2012-08-31 15:51:27 UTC (rev 668)
+++ branches/namiltd-ini/includes/os/class.OS.inc.php 2012-09-02 11:19:56 UTC (rev 669)
@@ -55,7 +55,7 @@
*/
public function getEncoding()
{
- return null;
+ return PSI_SYSTEM_CHARSET;
}
/**
Modified: branches/namiltd-ini/includes/output/class.Output.inc.php
===================================================================
--- branches/namiltd-ini/includes/output/class.Output.inc.php 2012-08-31 15:51:27 UTC (rev 668)
+++ branches/namiltd-ini/includes/output/class.Output.inc.php 2012-09-02 11:19:56 UTC (rev 669)
@@ -37,9 +37,11 @@
*/
public function __construct()
{
- CommonFunctions::checkForExtensions();
$this->error = Error::singleton();
$this->_checkConfig();
+ CommonFunctions::checkForExtensions();
+// $this->error = Error::singleton();
+// $this->_checkConfig();
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-04 05:52:58
|
Revision: 677
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=677&view=rev
Author: namiltd
Date: 2012-09-04 05:52:51 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
renaming phpsysinfo.ini to phpsysinfo.ini.new
Modified Paths:
--------------
branches/namiltd-ini/README
Added Paths:
-----------
branches/namiltd-ini/phpsysinfo.ini.new
Removed Paths:
-------------
branches/namiltd-ini/phpsysinfo.ini
Modified: branches/namiltd-ini/README
===================================================================
--- branches/namiltd-ini/README 2012-09-03 20:54:44 UTC (rev 676)
+++ branches/namiltd-ini/README 2012-09-04 05:52:51 UTC (rev 677)
@@ -34,8 +34,8 @@
Just decompress and untar the source (which you should have done by now,
if you're reading this...), into your webserver's document root.
- There is a configuration file called config.php.new. If this a brand new
- installation, you should copy this file to config.php and edit it.
+ There is a configuration file called phpsysinfo.ini.new. If this a brand new
+ installation, you should copy this file to phpsysinfo.ini and edit it.
- make sure your 'php.ini' file's include_path entry contains "."
- make sure your 'php.ini' has safe_mode set to 'off'.
Deleted: branches/namiltd-ini/phpsysinfo.ini
===================================================================
--- branches/namiltd-ini/phpsysinfo.ini 2012-09-03 20:54:44 UTC (rev 676)
+++ branches/namiltd-ini/phpsysinfo.ini 2012-09-04 05:52:51 UTC (rev 677)
@@ -1,414 +0,0 @@
-; PSI Config File
-;
-; @category PHP
-; @package PSI
-; @author Michael Cramer <Big...@us...>
-; @copyright 2009 phpSysInfo
-; @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
-; @version SVN: $Id$
-; @link http://phpsysinfo.sourceforge.net
-
-[main]
-; ********************************
-; MAIN PARAMETERS
-; ********************************
-
-; Turn on debugging of some functions and include errors and warnings in xml and provide a popup for displaying errors
-; - false : no debug information are stored in xml or displayed
-; - true : debug information stored in xml and displayed *be careful if set this to true, may include sensitive information from your pc*
-;
-DEBUG=false
-
-; Turn on/off compression for JavaScript file
-; - JS_COMPRESSION=false //no compression (recommended with slow processor)
-; - JS_COMPRESSION="None" //code minimizing
-; - JS_COMPRESSION="Normal" //code packing
-;
-JS_COMPRESSION="Normal"
-
-; Additional paths where to look for installed programs
-; Example : ADD_PATHS="/opt/bin,/opt/sbin"
-;
-ADD_PATHS=false
-
-; Plugins that should be included in xml and output
-; List of plugins should look like "plugin,plugin,plugin". See /plugins directory
-; - PLUGINS="MDStatus,PS" //list of plugins
-; - PLUGINS=false //no plugins
-; included plugins:
-; - MDStatus - show the raid status and whats currently going on
-; - PS - show a process tree of all running processes
-; - PSStatus - show a graphical representation if a process is running or not
-; - Quotas - show a table with all quotas that are active and there current state
-; - SMART - show S.M.A.R.T. information from drives that support it
-; - BAT - show battery state on a laptop
-; - ipmi - show IPMI status
-; - UpdateNotifier - show update notifications (only for Ubuntu server)
-; - SNMPPInfo - show printers info via SNMP
-;
-PLUGINS=false
-
-
-; ********************************
-; DISPLAY PARAMETERS
-; ********************************
-
-
-; Define the default display mode
-; auto: let user browser choose the mode
-; dynamic: use javascript to refresh data
-; static: static page (use metatag to reload page)
-;
-DEFAULT_DISPLAY_MODE="auto"
-
-
-; Define the default language
-;
-DEFAULT_LANG="en"
-
-
-; Define the default template
-;
-DEFAULT_TEMPLATE="phpsysinfo"
-
-
-; Show or hide language picklist
-;
-SHOW_PICKLIST_LANG=true
-
-
-; Show or hide template picklist
-;
-SHOW_PICKLIST_TEMPLATE=true
-
-
-; Define the interval for refreshing data in ms
-; - 0 = disabled
-; - 1000 = 1 second
-; - Default is 60 seconds
-;
-REFRESH=60000
-
-
-; Show a graph for current cpuload
-; - true = displayed, but it's a performance hit (because we have to wait to get a value, 1 second)
-; - false = will not be displayed
-;
-LOAD_BAR=false
-
-
-; Display the virtual host name and address
-; - Default is canonical host name and address
-; - Use USE_VHOST=true to display virtual host name.
-;
-USE_VHOST=false
-
-
-; Controls the units & format for network, memory and filesystem
-; - 1 KiB = 2^10 bytes = 1,024 bytes
-; - 1 KB = 10^3 bytes = 1,000 bytes
-; - "B" everything is in Byte
-; - "PiB" everything is in PeBiByte
-; - "TiB" everything is in TeBiByte
-; - "GiB" everything is in GiBiByte
-; - "MiB" everything is in MeBiByte
-; - "KiB" everything is in KiBiByte
-; - "auto_binary" everything is automatic done if value is to big for, e.g MiB then it will be in GiB
-; - "PB" everything is in PetaByte
-; - "TB" everything is in TeraByte
-; - "GB" everything is in GigaByte
-; - "MB" everything is in MegaByte
-; - "KB" everything is in KiloByte
-; - "auto_decimal" everything is automatic done if value is to big for, e.g MB then it will be in GB
-;
-BYTE_FORMAT="auto_binary"
-
-
-; Format in which temperature is displayed
-; - "c" shown in celsius
-; - "f" shown in fahrenheit
-; - "c-f" both shown first celsius and fahrenheit in braces
-; - "f-c" both shown first fahrenheit and celsius in braces
-;
-TEMP_FORMAT="c"
-
-
-; ********************************
-; SENSORS PARAMETERS
-; ********************************
-
-
-; Define the motherboard monitoring program
-; We support the following programs so far
-; - LMSensors http://www.lm-sensors.org/
-; - Healthd http://healthd.thehousleys.net/
-; - HWSensors http://www.openbsd.org/
-; - MBMon http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html
-; - MBM5 http://mbm.livewiredev.com/
-; - Coretemp
-; - IPMI http://openipmi.sourceforge.net/
-; - K8Temp http://hur.st/k8temp/
-; Example: If you want to use lmsensors : SENSOR_PROGRAM="LMSensors"
-;
-SENSOR_PROGRAM=false
-
-
-; Define how to access the monitor program
-; Available methods for the above list are in the following list
-; default method "command" should be fine for everybody
-; !!! tcp connections are only made local and on the default port !!!
-; - LMSensors command, file
-; - Healthd command
-; - HWSensors command
-; - MBMon command, tcp
-; - MBM5 file
-; - Coretemp command
-; - IPMI command
-; - K8Temp command
-;
-SENSOR_ACCESS="command"
-
-
-; Hddtemp program
-; If the hddtemp program is available we can read the temperature, if hdd is smart capable
-; !!ATTENTION!! hddtemp might be a security issue
-; - HDD_TEMP="tcp" //read data from hddtemp deamon (localhost:7634)
-; - HDD_TEMP="command" //read data from hddtemp programm (must be set suid)
-;
-HDD_TEMP=false
-
-
-; ********************************
-; FILESYSTEM PARAMETERS
-; ********************************
-
-
-; Show mount point
-; - true = show mount point
-; - false = do not show mount point
-;
-SHOW_MOUNT_POINT=true
-
-; Show mount option
-; - true = show mount option
-; - false = do not show mount option
-;
-SHOW_MOUNT_OPTION=true
-
-
-; Show mount credentials
-; - true = show mount credentials
-; - false = do not show mount credentials
-;
-SHOW_MOUNT_CREDENTIALS=false
-
-
-; Show inode usage
-; - true = display used inodes in percent
-; - false = hide them
-;
-SHOW_INODES=true
-
-
-; Hide mounts
-; Example : HIDE_MOUNTS="/home,/usr"
-;
-HIDE_MOUNTS=""
-
-
-; Hide filesystem types
-; Example : HIDE_FS_TYPES="tmpfs,devtmpfs,usbfs"
-;
-HIDE_FS_TYPES=""
-
-
-; Hide partitions
-; Example : HIDE_DISKS="rootfs"
-;
-HIDE_DISKS=""
-
-
-; ********************************
-; NETWORK PARAMETERS
-; ********************************
-
-
-; Hide network interfaces
-; Example : HIDE_NETWORK_INTERFACE="eth0,sit0"
-;
-HIDE_NETWORK_INTERFACE=""
-
-
-; Show network interfaces infos for Linux, FreeBSD, Haiku and WinNT (experimental)
-; Example : SHOW_NETWORK_INFOS=true
-;
-SHOW_NETWORK_INFOS=false
-
-
-; ********************************
-; UPS PARAMETERS
-; ********************************
-
-
-; Define the ups monitoring program
-; We support the following programs so far
-; - 1. Apcupsd http://www.apcupsd.com/
-; - 2. Nut http://www.networkupstools.org/
-; Example: If you want to use Apcupsd : UPS_PROGRAM="Apcupsd"
-;
-UPS_PROGRAM=false
-
-
-; Apcupsd supports multiple UPSes
-; You can specify comma delimited list in the form <hostname>:<port> or <ip>:<port>. The defaults are: 127.0.0.1:3551
-; See the following parameters in apcupsd.conf: NETSERVER, NISIP, NISPORT
-;
-UPS_APCUPSD_LIST="127.0.0.1:3551"
-
-[bat]
-; BAT Plugin configuration
-
-; define how to access the battery statistic data
-; - "command" read /proc/acpi/battery/BAT0/info and read /proc/acpi/battery/BAT0/state
-; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "bat_info.txt" and "bat_state.txt"; content is the output from "cat /proc/acpi/battery/BAT0/info" and "cat /proc/acpi/battery/BAT0/state")
-;
-ACCESS="command"
-
-; define the battery device
-;
-DEVICE="BAT0"
-
-
-[ipmiinfo]
-; ipmiinfo Plugin configuration
-
-; define how to access the IPMI statistic data
-; - "command" ipmitool command is run everytime the block gets refreshed or build
-; if access error execute first: chmod 666 /dev/ipmi0
-; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ipmiinfo.txt"; content is the output from "ipmitool sensor")
-;
-ACCESS="command"
-
-
-[mdstatus]
-; MDStatus Plugin configuration
-
-; define how to access the mdstat statistic data
-; - "file" /proc/mdstat is read
-; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "mdstat.txt"; content is the output from "cat /proc/mdstat")
-;
-ACCESS="file"
-
-
-[ps]
-; PS Plugin configuration
-
-; define how to access the ps statistic data
-; - "command" ps command is run everytime the block gets refreshed or build / on WINNT information is retrieved everytime through WMI
-; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ps.txt"; content is the output from "ps -axo pid,ppid,pmem,args")
-;
-ACCESS="command"
-
-
-[psstatus]
-; PSStatus Plugin configuration
-
-; define how to access the psstatus statistic data
-; - "command" pidof command is run everytime the block gets refreshed or build / on WINNT information is retrieved everytime through WMI
-; - "data" a file must be available in the data directory of the phpsysinfo installation with the filename "psstatus.txt"; content is the output from
-; <code>ps=("apache2" "mysqld" "sshd"); for((i=0;i<${#ps};i++)); do echo ${ps[$i]} "|" `pidof -s ${ps[$i]}` ;done</code>
-;
-; @var string
-;
-ACCESS="command"
-
-; controls which processes are checked if they are running
-;
-; @var string contains a list of process names that are checked, names are seperated by a comma (on WINNT names must end with '.exe')
-;
-PROCESSES="mysqld, sshd, explorer.exe"
-
-
-[quotas]
-; Quotas Plugin configuration
-;
-; define how to access the repquota statistic data
-; - "command" repquota command is run everytime the block gets refreshed or build
-; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "quotas.txt"; content is the output from "repquota -au")
-;
-ACCESS="command"
-
-
-[smart]
-; SMART Plugin configuration
-
-; Smartctl program
-; If the smartctl program is available we can read S.M.A.R.T informations
-; - "command" smartctl command is run everytime the block gets refreshed or build
-; if error: Smartctl open device: /dev/sda failed: Permission denied
-; Not recommended method:
-; execute: chmod 4755 /usr/sbin/smartctl
-; - "data" (a file must be available in the data directory of the
-; phpsysinfo installation with the filename "smart{disk_number}.txt";
-; content is the output from "smartctl --all device")
-;
-ACCESS="command"
-
-; Smartctl devices to monitor
-; If the smartctl support is enabled, those disks information will be displayed
-; - DEVICES="/dev/hda,/dev/hdb" //Will display those two disks informations
-;
-DEVICES="/dev/sda, /dev/sdb"
-
-; Smartctl --device option value
-; If the smartctl support is enabled, enter the --device option value for smartctl command
-; - DEVICE=false //If this option is not needed
-; - DEVICE="marvell" //If marvell
-;
-DEVICE=false
-
-; Smartctl ID# and column name from "Vendor Specific SMART Attributes with Thresholds" table
-; If the smartctl support is enabled, enter the ID#-COLUMN_NAME from "Vendor Specific SMART Attributes with Thresholds" table from smartctl output.
-; or for no SCSI devices: ID#-COLUMN_NAME-REPLACEMENT_ID# where REPLACEMENT_ID# is an alternative ID number.
-; COLUMN_NAME of this ID# will be displayed in the phpsysinfo S.M.A.R.T table. If you want RAW_VALUE to be displayed for the temperature (ID# 194) enter 194-RAW_VALUE
-; - IDS="194-VALUE,4-VALUE,009-RAW_VALUE" //ID#-COLUMN_NAME, ID#-COLUMN_NAME, etc...
-;
-IDS="005-RAW_VALUE,194-RAW_VALUE,4-RAW_VALUE,009-RAW_VALUE,012-RAW_VALUE,193-RAW_VALUE-225,001-RAW_VALUE,007-RAW_VALUE,200-RAW_VALUE,197-RAW_VALUE,198-RAW_VALUE"
-
-
-[snmppinfo]
-; SNMPPInfo Plugin configuration
-
-; define how to access the SNMP Printer Info statistic data
-; - "php-snmp" execute php snmprealwalk function (php-snmp module must be installed)
-; - "command" execute snmpwalk command
-; - "data" a file must be available in the data directory of the
-; phpsysinfo installation with the filename "snmppinfo{printer_number}.txt";
-; content is the output from:
-; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.1.5 > snmppinfo{printer_number}.txt
-; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.43.11.1.1 >> snmppinfo{printer_number}.txt
-;
-ACCESS="php-snmp"
-
-;define the Printer devices
-;
-; @var string contains a list of printer addresses that are checked
-;
-DEVICES="192.168.0.5, 192.168.0.9"
-
-
-[updatenotifier]
-; Update Notifier Plugin configuration
-
-; define the update info file format
-; - true: Ubuntu Landscape format (file: /var/lib/update-notifier/updates-available)
-; - false: universal format (format: A;B)
-; A: total packages to update
-; B: security packages to update
-;
-UBUNTU_LANDSCAPE_FORMAT=true
-
-; define the update info file
-;
-FILE="/var/lib/update-notifier/updates-available"
-
Copied: branches/namiltd-ini/phpsysinfo.ini.new (from rev 671, branches/namiltd-ini/phpsysinfo.ini)
===================================================================
--- branches/namiltd-ini/phpsysinfo.ini.new (rev 0)
+++ branches/namiltd-ini/phpsysinfo.ini.new 2012-09-04 05:52:51 UTC (rev 677)
@@ -0,0 +1,414 @@
+; PSI Config File
+;
+; @category PHP
+; @package PSI
+; @author Michael Cramer <Big...@us...>
+; @copyright 2009 phpSysInfo
+; @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
+; @version SVN: $Id$
+; @link http://phpsysinfo.sourceforge.net
+
+[main]
+; ********************************
+; MAIN PARAMETERS
+; ********************************
+
+; Turn on debugging of some functions and include errors and warnings in xml and provide a popup for displaying errors
+; - false : no debug information are stored in xml or displayed
+; - true : debug information stored in xml and displayed *be careful if set this to true, may include sensitive information from your pc*
+;
+DEBUG=false
+
+; Turn on/off compression for JavaScript file
+; - JS_COMPRESSION=false //no compression (recommended with slow processor)
+; - JS_COMPRESSION="None" //code minimizing
+; - JS_COMPRESSION="Normal" //code packing
+;
+JS_COMPRESSION="Normal"
+
+; Additional paths where to look for installed programs
+; Example : ADD_PATHS="/opt/bin,/opt/sbin"
+;
+ADD_PATHS=false
+
+; Plugins that should be included in xml and output
+; List of plugins should look like "plugin,plugin,plugin". See /plugins directory
+; - PLUGINS="MDStatus,PS" //list of plugins
+; - PLUGINS=false //no plugins
+; included plugins:
+; - MDStatus - show the raid status and whats currently going on
+; - PS - show a process tree of all running processes
+; - PSStatus - show a graphical representation if a process is running or not
+; - Quotas - show a table with all quotas that are active and there current state
+; - SMART - show S.M.A.R.T. information from drives that support it
+; - BAT - show battery state on a laptop
+; - ipmi - show IPMI status
+; - UpdateNotifier - show update notifications (only for Ubuntu server)
+; - SNMPPInfo - show printers info via SNMP
+;
+PLUGINS=false
+
+
+; ********************************
+; DISPLAY PARAMETERS
+; ********************************
+
+
+; Define the default display mode
+; auto: let user browser choose the mode
+; dynamic: use javascript to refresh data
+; static: static page (use metatag to reload page)
+;
+DEFAULT_DISPLAY_MODE="auto"
+
+
+; Define the default language
+;
+DEFAULT_LANG="en"
+
+
+; Define the default template
+;
+DEFAULT_TEMPLATE="phpsysinfo"
+
+
+; Show or hide language picklist
+;
+SHOW_PICKLIST_LANG=true
+
+
+; Show or hide template picklist
+;
+SHOW_PICKLIST_TEMPLATE=true
+
+
+; Define the interval for refreshing data in ms
+; - 0 = disabled
+; - 1000 = 1 second
+; - Default is 60 seconds
+;
+REFRESH=60000
+
+
+; Show a graph for current cpuload
+; - true = displayed, but it's a performance hit (because we have to wait to get a value, 1 second)
+; - false = will not be displayed
+;
+LOAD_BAR=false
+
+
+; Display the virtual host name and address
+; - Default is canonical host name and address
+; - Use USE_VHOST=true to display virtual host name.
+;
+USE_VHOST=false
+
+
+; Controls the units & format for network, memory and filesystem
+; - 1 KiB = 2^10 bytes = 1,024 bytes
+; - 1 KB = 10^3 bytes = 1,000 bytes
+; - "B" everything is in Byte
+; - "PiB" everything is in PeBiByte
+; - "TiB" everything is in TeBiByte
+; - "GiB" everything is in GiBiByte
+; - "MiB" everything is in MeBiByte
+; - "KiB" everything is in KiBiByte
+; - "auto_binary" everything is automatic done if value is to big for, e.g MiB then it will be in GiB
+; - "PB" everything is in PetaByte
+; - "TB" everything is in TeraByte
+; - "GB" everything is in GigaByte
+; - "MB" everything is in MegaByte
+; - "KB" everything is in KiloByte
+; - "auto_decimal" everything is automatic done if value is to big for, e.g MB then it will be in GB
+;
+BYTE_FORMAT="auto_binary"
+
+
+; Format in which temperature is displayed
+; - "c" shown in celsius
+; - "f" shown in fahrenheit
+; - "c-f" both shown first celsius and fahrenheit in braces
+; - "f-c" both shown first fahrenheit and celsius in braces
+;
+TEMP_FORMAT="c"
+
+
+; ********************************
+; SENSORS PARAMETERS
+; ********************************
+
+
+; Define the motherboard monitoring program
+; We support the following programs so far
+; - LMSensors http://www.lm-sensors.org/
+; - Healthd http://healthd.thehousleys.net/
+; - HWSensors http://www.openbsd.org/
+; - MBMon http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html
+; - MBM5 http://mbm.livewiredev.com/
+; - Coretemp
+; - IPMI http://openipmi.sourceforge.net/
+; - K8Temp http://hur.st/k8temp/
+; Example: If you want to use lmsensors : SENSOR_PROGRAM="LMSensors"
+;
+SENSOR_PROGRAM=false
+
+
+; Define how to access the monitor program
+; Available methods for the above list are in the following list
+; default method "command" should be fine for everybody
+; !!! tcp connections are only made local and on the default port !!!
+; - LMSensors command, file
+; - Healthd command
+; - HWSensors command
+; - MBMon command, tcp
+; - MBM5 file
+; - Coretemp command
+; - IPMI command
+; - K8Temp command
+;
+SENSOR_ACCESS="command"
+
+
+; Hddtemp program
+; If the hddtemp program is available we can read the temperature, if hdd is smart capable
+; !!ATTENTION!! hddtemp might be a security issue
+; - HDD_TEMP="tcp" //read data from hddtemp deamon (localhost:7634)
+; - HDD_TEMP="command" //read data from hddtemp programm (must be set suid)
+;
+HDD_TEMP=false
+
+
+; ********************************
+; FILESYSTEM PARAMETERS
+; ********************************
+
+
+; Show mount point
+; - true = show mount point
+; - false = do not show mount point
+;
+SHOW_MOUNT_POINT=true
+
+; Show mount option
+; - true = show mount option
+; - false = do not show mount option
+;
+SHOW_MOUNT_OPTION=true
+
+
+; Show mount credentials
+; - true = show mount credentials
+; - false = do not show mount credentials
+;
+SHOW_MOUNT_CREDENTIALS=false
+
+
+; Show inode usage
+; - true = display used inodes in percent
+; - false = hide them
+;
+SHOW_INODES=true
+
+
+; Hide mounts
+; Example : HIDE_MOUNTS="/home,/usr"
+;
+HIDE_MOUNTS=""
+
+
+; Hide filesystem types
+; Example : HIDE_FS_TYPES="tmpfs,devtmpfs,usbfs"
+;
+HIDE_FS_TYPES=""
+
+
+; Hide partitions
+; Example : HIDE_DISKS="rootfs"
+;
+HIDE_DISKS=""
+
+
+; ********************************
+; NETWORK PARAMETERS
+; ********************************
+
+
+; Hide network interfaces
+; Example : HIDE_NETWORK_INTERFACE="eth0,sit0"
+;
+HIDE_NETWORK_INTERFACE=""
+
+
+; Show network interfaces infos for Linux, FreeBSD, Haiku and WinNT (experimental)
+; Example : SHOW_NETWORK_INFOS=true
+;
+SHOW_NETWORK_INFOS=false
+
+
+; ********************************
+; UPS PARAMETERS
+; ********************************
+
+
+; Define the ups monitoring program
+; We support the following programs so far
+; - 1. Apcupsd http://www.apcupsd.com/
+; - 2. Nut http://www.networkupstools.org/
+; Example: If you want to use Apcupsd : UPS_PROGRAM="Apcupsd"
+;
+UPS_PROGRAM=false
+
+
+; Apcupsd supports multiple UPSes
+; You can specify comma delimited list in the form <hostname>:<port> or <ip>:<port>. The defaults are: 127.0.0.1:3551
+; See the following parameters in apcupsd.conf: NETSERVER, NISIP, NISPORT
+;
+UPS_APCUPSD_LIST="127.0.0.1:3551"
+
+[bat]
+; BAT Plugin configuration
+
+; define how to access the battery statistic data
+; - "command" read /proc/acpi/battery/BAT0/info and read /proc/acpi/battery/BAT0/state
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "bat_info.txt" and "bat_state.txt"; content is the output from "cat /proc/acpi/battery/BAT0/info" and "cat /proc/acpi/battery/BAT0/state")
+;
+ACCESS="command"
+
+; define the battery device
+;
+DEVICE="BAT0"
+
+
+[ipmiinfo]
+; ipmiinfo Plugin configuration
+
+; define how to access the IPMI statistic data
+; - "command" ipmitool command is run everytime the block gets refreshed or build
+; if access error execute first: chmod 666 /dev/ipmi0
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ipmiinfo.txt"; content is the output from "ipmitool sensor")
+;
+ACCESS="command"
+
+
+[mdstatus]
+; MDStatus Plugin configuration
+
+; define how to access the mdstat statistic data
+; - "file" /proc/mdstat is read
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "mdstat.txt"; content is the output from "cat /proc/mdstat")
+;
+ACCESS="file"
+
+
+[ps]
+; PS Plugin configuration
+
+; define how to access the ps statistic data
+; - "command" ps command is run everytime the block gets refreshed or build / on WINNT information is retrieved everytime through WMI
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "ps.txt"; content is the output from "ps -axo pid,ppid,pmem,args")
+;
+ACCESS="command"
+
+
+[psstatus]
+; PSStatus Plugin configuration
+
+; define how to access the psstatus statistic data
+; - "command" pidof command is run everytime the block gets refreshed or build / on WINNT information is retrieved everytime through WMI
+; - "data" a file must be available in the data directory of the phpsysinfo installation with the filename "psstatus.txt"; content is the output from
+; <code>ps=("apache2" "mysqld" "sshd"); for((i=0;i<${#ps};i++)); do echo ${ps[$i]} "|" `pidof -s ${ps[$i]}` ;done</code>
+;
+; @var string
+;
+ACCESS="command"
+
+; controls which processes are checked if they are running
+;
+; @var string contains a list of process names that are checked, names are seperated by a comma (on WINNT names must end with '.exe')
+;
+PROCESSES="mysqld, sshd, explorer.exe"
+
+
+[quotas]
+; Quotas Plugin configuration
+;
+; define how to access the repquota statistic data
+; - "command" repquota command is run everytime the block gets refreshed or build
+; - "data" (a file must be available in the data directory of the phpsysinfo installation with the filename "quotas.txt"; content is the output from "repquota -au")
+;
+ACCESS="command"
+
+
+[smart]
+; SMART Plugin configuration
+
+; Smartctl program
+; If the smartctl program is available we can read S.M.A.R.T informations
+; - "command" smartctl command is run everytime the block gets refreshed or build
+; if error: Smartctl open device: /dev/sda failed: Permission denied
+; Not recommended method:
+; execute: chmod 4755 /usr/sbin/smartctl
+; - "data" (a file must be available in the data directory of the
+; phpsysinfo installation with the filename "smart{disk_number}.txt";
+; content is the output from "smartctl --all device")
+;
+ACCESS="command"
+
+; Smartctl devices to monitor
+; If the smartctl support is enabled, those disks information will be displayed
+; - DEVICES="/dev/hda,/dev/hdb" //Will display those two disks informations
+;
+DEVICES="/dev/sda, /dev/sdb"
+
+; Smartctl --device option value
+; If the smartctl support is enabled, enter the --device option value for smartctl command
+; - DEVICE=false //If this option is not needed
+; - DEVICE="marvell" //If marvell
+;
+DEVICE=false
+
+; Smartctl ID# and column name from "Vendor Specific SMART Attributes with Thresholds" table
+; If the smartctl support is enabled, enter the ID#-COLUMN_NAME from "Vendor Specific SMART Attributes with Thresholds" table from smartctl output.
+; or for no SCSI devices: ID#-COLUMN_NAME-REPLACEMENT_ID# where REPLACEMENT_ID# is an alternative ID number.
+; COLUMN_NAME of this ID# will be displayed in the phpsysinfo S.M.A.R.T table. If you want RAW_VALUE to be displayed for the temperature (ID# 194) enter 194-RAW_VALUE
+; - IDS="194-VALUE,4-VALUE,009-RAW_VALUE" //ID#-COLUMN_NAME, ID#-COLUMN_NAME, etc...
+;
+IDS="005-RAW_VALUE,194-RAW_VALUE,4-RAW_VALUE,009-RAW_VALUE,012-RAW_VALUE,193-RAW_VALUE-225,001-RAW_VALUE,007-RAW_VALUE,200-RAW_VALUE,197-RAW_VALUE,198-RAW_VALUE"
+
+
+[snmppinfo]
+; SNMPPInfo Plugin configuration
+
+; define how to access the SNMP Printer Info statistic data
+; - "php-snmp" execute php snmprealwalk function (php-snmp module must be installed)
+; - "command" execute snmpwalk command
+; - "data" a file must be available in the data directory of the
+; phpsysinfo installation with the filename "snmppinfo{printer_number}.txt";
+; content is the output from:
+; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.1.5 > snmppinfo{printer_number}.txt
+; snmpwalk -On -c public -v 1 {printer_address} 1.3.6.1.2.1.43.11.1.1 >> snmppinfo{printer_number}.txt
+;
+ACCESS="php-snmp"
+
+;define the Printer devices
+;
+; @var string contains a list of printer addresses that are checked
+;
+DEVICES="192.168.0.5, 192.168.0.9"
+
+
+[updatenotifier]
+; Update Notifier Plugin configuration
+
+; define the update info file format
+; - true: Ubuntu Landscape format (file: /var/lib/update-notifier/updates-available)
+; - false: universal format (format: A;B)
+; A: total packages to update
+; B: security packages to update
+;
+UBUNTU_LANDSCAPE_FORMAT=true
+
+; define the update info file
+;
+FILE="/var/lib/update-notifier/updates-available"
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-04 16:34:06
|
Revision: 682
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=682&view=rev
Author: namiltd
Date: 2012-09-04 16:33:56 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
error handler
Modified Paths:
--------------
branches/namiltd-ini/config.php
branches/namiltd-ini/includes/os/class.Linux.inc.php
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-09-04 12:19:07 UTC (rev 681)
+++ branches/namiltd-ini/config.php 2012-09-04 16:33:56 UTC (rev 682)
@@ -13,7 +13,11 @@
if (function_exists('errorHandlerPsi')) {
restore_error_handler();
}
-
+
+ /* fatal errors only */
+ $old_err_rep = error_reporting(report_level);
+ error_reporting(E_ERROR);
+
/* get git revision */
if (file_exists (APP_ROOT.'/.git/HEAD')){
$contents = @file_get_contents(APP_ROOT.'/.git/HEAD');
@@ -84,6 +88,9 @@
define('PSI_SYSTEM_LANGUAGE', null);
}
+ /* restore error level */
+ error_reporting($old_err_rep);
+
/* restore error handler */
if (function_exists('errorHandlerPsi')) {
set_error_handler('errorHandlerPsi');
Modified: branches/namiltd-ini/includes/os/class.Linux.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-09-04 12:19:07 UTC (rev 681)
+++ branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-09-04 16:33:56 UTC (rev 682)
@@ -540,15 +540,18 @@
$this->sys->setDistribution($distro['Description']);
}
} else {
+ /* default error handler */
+ if (function_exists('errorHandlerPsi')) {
+ restore_error_handler();
+ }
+ /* fatal errors only */
+ $old_err_rep = error_reporting(report_level);
+ error_reporting(E_ERROR);
// Fall back in case 'lsb_release' does not exist ;)
foreach ($list as $section=>$distribution) {
if (!isset($distribution["Files"])) {
continue;
} else {
- /* default error handler */
- if (function_exists('errorHandlerPsi')) {
- restore_error_handler();
- }
foreach (preg_split("/;/", $distribution["Files"], -1, PREG_SPLIT_NO_EMPTY) as $filename) {
if (file_exists($filename)) {
CommonFunctions::rfts($filename, $buf);
@@ -604,12 +607,15 @@
return;
}
}
- /* restore error handler */
- if (function_exists('errorHandlerPsi')) {
- set_error_handler('errorHandlerPsi');
- }
}
}
+ /* restore error level */
+ error_reporting($old_err_rep);
+ /* restore error handler */
+ if (function_exists('errorHandlerPsi')) {
+ set_error_handler('errorHandlerPsi');
+ }
+
}
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-04 16:37:32
|
Revision: 683
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=683&view=rev
Author: namiltd
Date: 2012-09-04 16:37:21 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/config.php
branches/namiltd-ini/includes/os/class.Linux.inc.php
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-09-04 16:33:56 UTC (rev 682)
+++ branches/namiltd-ini/config.php 2012-09-04 16:37:21 UTC (rev 683)
@@ -15,7 +15,7 @@
}
/* fatal errors only */
- $old_err_rep = error_reporting(report_level);
+ $old_err_rep = error_reporting();
error_reporting(E_ERROR);
/* get git revision */
Modified: branches/namiltd-ini/includes/os/class.Linux.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-09-04 16:33:56 UTC (rev 682)
+++ branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-09-04 16:37:21 UTC (rev 683)
@@ -545,7 +545,7 @@
restore_error_handler();
}
/* fatal errors only */
- $old_err_rep = error_reporting(report_level);
+ $old_err_rep = error_reporting();
error_reporting(E_ERROR);
// Fall back in case 'lsb_release' does not exist ;)
foreach ($list as $section=>$distribution) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-06 20:54:56
|
Revision: 687
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=687&view=rev
Author: namiltd
Date: 2012-09-06 20:54:49 +0000 (Thu, 06 Sep 2012)
Log Message:
-----------
php.ini checking
Modified Paths:
--------------
branches/namiltd-ini/includes/os/class.Haiku.inc.php
branches/namiltd-ini/includes/os/class.Minix.inc.php
branches/namiltd-ini/includes/os/class.SunOS.inc.php
branches/namiltd-ini/includes/xml/class.XML.inc.php
branches/namiltd-ini/index.php
branches/namiltd-ini/templates/html/error_config.html
Modified: branches/namiltd-ini/includes/os/class.Haiku.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.Haiku.inc.php 2012-09-05 09:02:55 UTC (rev 686)
+++ branches/namiltd-ini/includes/os/class.Haiku.inc.php 2012-09-06 20:54:49 UTC (rev 687)
@@ -39,7 +39,6 @@
public function __construct()
{
parent::__construct();
- $this->error->addError("WARN", "The Haiku version of phpSysInfo is work in progress, some things currently don't work");
}
/**
@@ -98,27 +97,26 @@
$devices = preg_split("/^device /m", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($devices as $device) {
$ar_buf = preg_split("/\n/", $device);
- if (count($ar_buf) >= 3) {
-
- if (preg_match("/^([^\(\[\n]*)/", $device, $ar_buf2)) {
- if (preg_match("/^[^\(]*\((.*)\)/", $device, $ar_buf3)) {
- $ar_buf2[1] = $ar_buf3[1];
- }
- $name = trim($ar_buf2[1]).": ";
+ if (count($ar_buf) >= 3) {
+ if (preg_match("/^([^\(\[\n]*)/", $device, $ar_buf2)) {
+ if (preg_match("/^[^\(]*\((.*)\)/", $device, $ar_buf3)) {
+ $ar_buf2[1] = $ar_buf3[1];
+ }
+ $name = trim($ar_buf2[1]).": ";
- if (preg_match("/^\s+vendor\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[1], $ar_buf3)) {
- $name .=$ar_buf3[1]." ";
- }
- if (preg_match("/^\s+device\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[2], $ar_buf3)) {
- $name .=$ar_buf3[1]." ";
- }
- $dev = new HWDevice();
- $dev->setName(trim($name));
- $this->sys->setPciDevices($dev);
- }
- }
- }
- }
+ if (preg_match("/^\s+vendor\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[1], $ar_buf3)) {
+ $name .=$ar_buf3[1]." ";
+ }
+ if (preg_match("/^\s+device\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[2], $ar_buf3)) {
+ $name .=$ar_buf3[1]." ";
+ }
+ $dev = new HWDevice();
+ $dev->setName(trim($name));
+ $this->sys->setPciDevices($dev);
+ }
+ }
+ }
+ }
}
/**
@@ -130,15 +128,15 @@
protected function _usb()
{
if (CommonFunctions::executeProgram('listusb', '', $bufr, PSI_DEBUG)){
- $devices = preg_split("/\n/", $bufr);
+ $devices = preg_split("/\n/", $bufr);
foreach ($devices as $device) {
if (preg_match("/^\S+\s+\S+\s+\"(.*)\"\s+\"(.*)\"/", $device, $ar_buf)) {
- $dev = new HWDevice();
- $dev->setName(trim($ar_buf[1]." ".$ar_buf[2]));
- $this->sys->setUSBDevices($dev);
- }
+ $dev = new HWDevice();
+ $dev->setName(trim($ar_buf[1]." ".$ar_buf[2]));
+ $this->sys->setUSBDevices($dev);
+ }
}
- }
+ }
}
/**
@@ -206,9 +204,9 @@
if (CommonFunctions::executeProgram('top', '-n 1 -i 1', $buf)) {
if (preg_match("/\s+(\S+)%\s+TOTAL\s+\(\S+%\s+idle time/", $buf, $ar_buf)) {
$this->sys->setLoad($ar_buf[1]);
- if (PSI_LOAD_BAR) {
- $this->sys->setLoadPercent(round($ar_buf[1]));
- }
+ if (PSI_LOAD_BAR) {
+ $this->sys->setLoadPercent(round($ar_buf[1]));
+ }
}
}
}
@@ -278,14 +276,14 @@
if (CommonFunctions::executeProgram('vmstat', '', $bufr, PSI_DEBUG)){
if (preg_match("/max swap space:\s+(.*)\nfree swap space:\s+(.*)\n/", $bufr, $ar_buf)) {
if ($ar_buf[1]>0){
- $dev = new DiskDevice();
- $dev->setMountPoint("/boot/common/var/swap");
- $dev->setName("SWAP");
- $dev->setTotal($ar_buf[1]);
- $dev->setFree($ar_buf[2]);
- $dev->setUSed($ar_buf[1]-$ar_buf[2]);
- $this->sys->setSwapDevices($dev);
- }
+ $dev = new DiskDevice();
+ $dev->setMountPoint("/boot/common/var/swap");
+ $dev->setName("SWAP");
+ $dev->setTotal($ar_buf[1]);
+ $dev->setFree($ar_buf[2]);
+ $dev->setUSed($ar_buf[1]-$ar_buf[2]);
+ $this->sys->setSwapDevices($dev);
+ }
}
}
}
@@ -325,51 +323,51 @@
private function _network()
{
if (CommonFunctions::executeProgram('ifconfig', '', $bufr, PSI_DEBUG)){
- $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
- $notwas = true;
- foreach ($lines as $line) {
- if (preg_match("/^(\S+)/", $line, $ar_buf)) {
- if (!$notwas) {
- $dev->setErrors($errors);
- $dev->setDrops($drops);
- $this->sys->setNetDevices($dev);
- }
+ $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
+ $notwas = true;
+ foreach ($lines as $line) {
+ if (preg_match("/^(\S+)/", $line, $ar_buf)) {
+ if (!$notwas) {
+ $dev->setErrors($errors);
+ $dev->setDrops($drops);
+ $this->sys->setNetDevices($dev);
+ }
$errors = 0;
$drops = 0;
- $dev = new NetDevice();
- $dev->setName($ar_buf[1]);
- $notwas = false;
- } else {
- if (!$notwas) {
+ $dev = new NetDevice();
+ $dev->setName($ar_buf[1]);
+ $notwas = false;
+ } else {
+ if (!$notwas) {
if (preg_match('/\sReceive:\s\d+\spackets,\s(\d+)\serrors,\s(\d+)\sbytes,\s\d+\smcasts,\s(\d+)\sdropped/i', $line, $ar_buf2)){
- $errors +=$ar_buf2[1];
- $drops +=$ar_buf2[3];
- $dev->setRxBytes($ar_buf2[2]);
+ $errors +=$ar_buf2[1];
+ $drops +=$ar_buf2[3];
+ $dev->setRxBytes($ar_buf2[2]);
}
else if (preg_match('/\sTransmit:\s\d+\spackets,\s(\d+)\serrors,\s(\d+)\sbytes,\s\d+\smcasts,\s(\d+)\sdropped/i', $line, $ar_buf2)){
- $errors +=$ar_buf2[1];
- $drops +=$ar_buf2[3];
- $dev->setTxBytes($ar_buf2[2]);
+ $errors +=$ar_buf2[1];
+ $drops +=$ar_buf2[3];
+ $dev->setTxBytes($ar_buf2[2]);
}
- if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS)) {
+ if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS)) {
if (preg_match('/\sEthernet,\s+Address:\s(\S*)/i', $line, $ar_buf2))
- $dev->setInfo(preg_replace('/:/', '-', $ar_buf2[1]));
+ $dev->setInfo(preg_replace('/:/', '-', $ar_buf2[1]));
else if (preg_match('/^\s+inet\saddr:\s(\S*),/i', $line, $ar_buf2))
$dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
else if (preg_match('/^\s+inet6\saddr:\s(\S*),/i', $line, $ar_buf2))
- if (!preg_match('/^fe80::/i',$ar_buf2[1]))
- $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
+ if (!preg_match('/^fe80::/i',$ar_buf2[1]))
+ $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
}
- }
- }
- }
- if (!$notwas) {
- $dev->setErrors($errors);
- $dev->setDrops($drops);
- $this->sys->setNetDevices($dev);
- }
- }
+ }
+ }
+ }
+ if (!$notwas) {
+ $dev->setErrors($errors);
+ $dev->setDrops($drops);
+ $this->sys->setNetDevices($dev);
+ }
+ }
}
/**
@@ -379,6 +377,7 @@
*/
function build()
{
+ $this->error->addError("WARN", "The Haiku version of phpSysInfo is work in progress, some things currently don't work");
$this->_hostname();
$this->_ip();
$this->_distro();
Modified: branches/namiltd-ini/includes/os/class.Minix.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.Minix.inc.php 2012-09-05 09:02:55 UTC (rev 686)
+++ branches/namiltd-ini/includes/os/class.Minix.inc.php 2012-09-06 20:54:49 UTC (rev 687)
@@ -39,7 +39,6 @@
public function __construct()
{
parent::__construct();
- $this->error->addError("WARN", "The Minix version of phpSysInfo is work in progress, some things currently don't work");
}
/**
@@ -315,6 +314,7 @@
*/
function build()
{
+ $this->error->addError("WARN", "The Minix version of phpSysInfo is work in progress, some things currently don't work");
$this->_hostname();
$this->_ip();
$this->_distro();
Modified: branches/namiltd-ini/includes/os/class.SunOS.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.SunOS.inc.php 2012-09-05 09:02:55 UTC (rev 686)
+++ branches/namiltd-ini/includes/os/class.SunOS.inc.php 2012-09-06 20:54:49 UTC (rev 687)
@@ -31,7 +31,6 @@
*/
public function __construct()
{
- $this->error->addError("WARN", "The SunOS version of phpSysInfo is work in progress, some things currently don't work");
}
/**
@@ -265,6 +264,7 @@
*/
function build()
{
+ $this->error->addError("WARN", "The SunOS version of phpSysInfo is work in progress, some things currently don't work");
$this->_hostname();
$this->_ip();
$this->_distro();
Modified: branches/namiltd-ini/includes/xml/class.XML.inc.php
===================================================================
--- branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-09-05 09:02:55 UTC (rev 686)
+++ branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-09-06 20:54:49 UTC (rev 687)
@@ -458,6 +458,24 @@
{
if (!$this->_plugin_request || $this->_complete_request) {
if ($this->_sys === null) {
+ if (PSI_DEBUG === true){
+ // Safe mode check
+ $safe_mode = @ini_get("safe_mode") ? TRUE : FALSE;
+ if ($safe_mode) {
+ $this->_errors->addError("WARN", "PhpSysInfo requires to set off 'safe_mode' in 'php.ini'");
+ }
+ // Include path check
+ $include_path = @ini_get("include_path");
+ if (($include_path)&&($include_path!="")) {
+ $include_path = str_replace(":", "\n", $include_path);
+ if (preg_match("/^\.$/m", $include_path)) {
+ $include_path = ".";
+ }
+ }
+ if ($include_path != "." ) {
+ $this->_errors->addError("WARN", "PhpSysInfo requires '.' inside the 'include_path' in php.ini");
+ }
+ }
$this->_sys = $this->_sysinfo->getSys();
}
$this->_buildVitals();
Modified: branches/namiltd-ini/index.php
===================================================================
--- branches/namiltd-ini/index.php 2012-09-05 09:02:55 UTC (rev 686)
+++ branches/namiltd-ini/index.php 2012-09-06 20:54:49 UTC (rev 687)
@@ -32,41 +32,16 @@
}
require_once APP_ROOT.'/includes/autoloader.inc.php';
-
+
// Load configuration
-if (!is_readable(APP_ROOT.'/config.php')) {
+require_once APP_ROOT.'/config.php';
+
+if (!defined('PSI_CONFIG_FILE')||(!defined('PSI_DEBUG'))){
$tpl = new Template("/templates/html/error_config.html");
echo $tpl->fetch();
die();
}
-else {
- include_once APP_ROOT.'/config.php';
-}
-/*
-if (!defined('PSI_DEBUG')){
- trigger_error("Error: phpSysInfo requires setting 'DEBUG' (true or false) in 'phpsysinfo.ini'", E_USER_ERROR);
-}
-if (PSI_DEBUG === true){
-// Safe mode check
- $safe_mode = @ini_get("safe_mode") ? TRUE : FALSE;
- if ($safe_mode) {
- echo "Warning: phpSysInfo requires you to set off 'safe_mode' in 'php.ini'";
- }
-// Include path check
- $include_path = @ini_get("include_path");
- if (($include_path)&&($include_path!="")) {
- $include_path = str_replace(":", "\n", $include_path);
- if (preg_match("/^\.$/m", $include_path)) {
- $include_path = ".";
- }
- }
- if ($include_path != "." ) {
- echo "Warning: phpSysInfo requires '.' inside the 'include_path' in php.ini";
- }
-}
-*/
-
// redirect to page with and without javascript
$display = isset($_GET['disp']) ? $_GET['disp'] : strtolower(PSI_DEFAULT_DISPLAY_MODE);
switch ($display) {
Modified: branches/namiltd-ini/templates/html/error_config.html
===================================================================
--- branches/namiltd-ini/templates/html/error_config.html 2012-09-05 09:02:55 UTC (rev 686)
+++ branches/namiltd-ini/templates/html/error_config.html 2012-09-06 20:54:49 UTC (rev 687)
@@ -15,7 +15,7 @@
<body onload="doRedirect()">
<h1>phpSysInfo - Error</h1>
<div style="position:absolute;top:150px;text-align:center;width:95%;">
- <p style="margin:12pt;"><strong>config.php</strong> does not exist or is not readable by the webserver in the phpsysinfo directory.</p>
+ <p style="margin:12pt;"><strong>phpsysinfo.ini</strong> does not exist or is not readable by the webserver in the phpsysinfo directory or is misunderstood.</p>
<p style="margin:12pt;">Generated by <a href="http://phpsysinfo.sourceforge.net/">phpSysInfo - <?php echo PSI_VERSION_STRING ?></a></p>
</div>
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-08 17:12:14
|
Revision: 692
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=692&view=rev
Author: namiltd
Date: 2012-09-08 17:12:08 +0000 (Sat, 08 Sep 2012)
Log Message:
-----------
Windows WMI exceptions
Modified Paths:
--------------
branches/namiltd-ini/includes/os/class.WINNT.inc.php
branches/namiltd-ini/plugins/ps/class.ps.inc.php
branches/namiltd-ini/plugins/psstatus/class.psstatus.inc.php
Modified: branches/namiltd-ini/includes/os/class.WINNT.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-08 16:34:21 UTC (rev 691)
+++ branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-08 17:12:08 UTC (rev 692)
@@ -32,7 +32,7 @@
*
* @var Object
*/
- private $_wmi;
+ private $_wmi = null;
/**
* holds all devices, which are in the system
@@ -65,9 +65,9 @@
$strHostname = '';
$strUser = '';
$strPassword = '';
- // initialize the wmi object
- $objLocator = new COM('WbemScripting.SWbemLocator');
try {
+ // initialize the wmi object
+ $objLocator = new COM('WbemScripting.SWbemLocator');
if ($strHostname == "") {
$this->_wmi = $objLocator->ConnectServer();
@@ -76,7 +76,7 @@
}
}
catch(Exception $e) {
- $this->error->addError("WMI connect error", "PhpSysInfo can not connect to the WMI interface for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed in the IIS admin interface.");
+ $this->error->addError("WMI connect error", "PhpSysInfo can not connect to the WMI interface for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed.");
}
$this->_getCodeSet();
}
Modified: branches/namiltd-ini/plugins/ps/class.ps.inc.php
===================================================================
--- branches/namiltd-ini/plugins/ps/class.ps.inc.php 2012-09-08 16:34:21 UTC (rev 691)
+++ branches/namiltd-ini/plugins/ps/class.ps.inc.php 2012-09-08 17:12:08 UTC (rev 692)
@@ -51,8 +51,8 @@
switch (strtolower(PSI_PLUGIN_PS_ACCESS)) {
case 'command':
if (PHP_OS == 'WINNT') {
- $objLocator = new COM("WbemScripting.SWbemLocator");
try {
+ $objLocator = new COM("WbemScripting.SWbemLocator");
$wmi = $objLocator->ConnectServer();
$os_wmi = $wmi->InstancesOf('Win32_OperatingSystem');
foreach ($os_wmi as $os) {
Modified: branches/namiltd-ini/plugins/psstatus/class.psstatus.inc.php
===================================================================
--- branches/namiltd-ini/plugins/psstatus/class.psstatus.inc.php 2012-09-08 16:34:21 UTC (rev 691)
+++ branches/namiltd-ini/plugins/psstatus/class.psstatus.inc.php 2012-09-08 17:12:08 UTC (rev 692)
@@ -54,8 +54,8 @@
switch (strtolower(PSI_PLUGIN_PSSTATUS_ACCESS)) {
case 'command':
if (PHP_OS == 'WINNT') {
- $objLocator = new COM("WbemScripting.SWbemLocator");
try {
+ $objLocator = new COM("WbemScripting.SWbemLocator");
$wmi = $objLocator->ConnectServer();
$process_wmi = $wmi->InstancesOf('Win32_Process');
foreach ($process_wmi as $process) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-09 00:20:18
|
Revision: 693
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=693&view=rev
Author: namiltd
Date: 2012-09-09 00:20:11 +0000 (Sun, 09 Sep 2012)
Log Message:
-----------
ReactOS detection
Modified Paths:
--------------
branches/namiltd-ini/includes/class.CommonFunctions.inc.php
branches/namiltd-ini/includes/os/class.WINNT.inc.php
Added Paths:
-----------
branches/namiltd-ini/gfx/images/ReactOS.png
Added: branches/namiltd-ini/gfx/images/ReactOS.png
===================================================================
(Binary files differ)
Property changes on: branches/namiltd-ini/gfx/images/ReactOS.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified: branches/namiltd-ini/includes/class.CommonFunctions.inc.php
===================================================================
--- branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-09-08 17:12:08 UTC (rev 692)
+++ branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-09-09 00:20:11 UTC (rev 693)
@@ -63,7 +63,11 @@
if ((isset($open_basedir) && !in_array($strPath, $open_basedir)) || !is_dir($strPath)) {
continue;
}
- $strProgrammpath = $strPath."/".$strProgram;
+ if (PHP_OS == 'WINNT') {
+ $strProgrammpath = rtrim($strPath,'\\').'\\'.$strProgram;
+ } else {
+ $strProgrammpath = rtrim($strPath,"/")."/".$strProgram;
+ }
if (is_executable($strProgrammpath)) {
return $strProgrammpath;
}
Modified: branches/namiltd-ini/includes/os/class.WINNT.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-08 17:12:08 UTC (rev 692)
+++ branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-09 00:20:11 UTC (rev 693)
@@ -266,13 +266,14 @@
*/
private function _distro()
{
- $buffer = $this->_getWMI('Win32_OperatingSystem', array('Version', 'ServicePackMajorVersion'));
+ $buffer = $this->_getWMI('Win32_OperatingSystem', array('Version', 'ServicePackMajorVersion', 'Caption'));
if ($buffer) {
$kernel = $buffer[0]['Version'];
if ($buffer[0]['ServicePackMajorVersion'] > 0) {
$kernel .= ' SP'.$buffer[0]['ServicePackMajorVersion'];
}
$this->sys->setKernel($kernel);
+ $this->sys->setDistribution($buffer[0]['Caption']);
if ((($kernel[1] == ".") && ($kernel[0] <5)) || (substr($kernel,0,4) == "5.0."))
$icon = 'Win2000.png';
@@ -283,16 +284,23 @@
else
$icon = 'WinXP.png';
$this->sys->setDistributionIcon($icon);
+ } else if (CommonFunctions::executeProgram("cmd", "/c ver", $ver_value)) {
+ if (preg_match("/ReactOS\nVersion\s+(.+)/", $ver_value, $ar_temp)){
+ $this->sys->setDistribution("ReactOS");
+ $this->sys->setKernel($ar_temp[1]);
+ $this->sys->setDistributionIcon('ReactOS.png');
+ }else if (preg_match("/^(Microsoft [^\[]*)\s*\[(.+)\]/", $ver_value, $ar_temp)){
+ $this->sys->setDistribution($ar_temp[1]);
+ $this->sys->setKernel($ar_temp[2]);
+ $this->sys->setDistributionIcon('Win2000.png');
+ } else {
+ $this->sys->setDistribution("WinNT");
+ $this->sys->setDistributionIcon('Win2000.png');
+ }
} else {
+ $this->sys->setDistribution("WinNT");
$this->sys->setDistributionIcon('Win2000.png');
- }
-
- $buffer = $this->_getWMI('Win32_OperatingSystem', array('Caption'));
- if ($buffer) {
- $this->sys->setDistribution($buffer[0]['Caption']);
- } else {
- $this->sys->setDistribution("WinNT");
- }
+ }
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-10 18:04:04
|
Revision: 697
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=697&view=rev
Author: namiltd
Date: 2012-09-10 18:03:58 +0000 (Mon, 10 Sep 2012)
Log Message:
-----------
ReactOS minor support
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/README
branches/namiltd-ini/includes/os/class.WINNT.inc.php
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-09-09 11:24:04 UTC (rev 696)
+++ branches/namiltd-ini/ChangeLog 2012-09-10 18:03:58 UTC (rev 697)
@@ -4,6 +4,7 @@
- [ADD] Turbolinux to detected distros
- [ADD] Show System Language and Charmap on Linux and WINNT
+ - [ADD] Minor support of ReactOS
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
- [UPD] Plugin ipmi ranamed to IPMIInfo and Update-Notifier to UpdateNotifier (to avoid name conflicts)
Modified: branches/namiltd-ini/README
===================================================================
--- branches/namiltd-ini/README 2012-09-09 11:24:04 UTC (rev 696)
+++ branches/namiltd-ini/README 2012-09-10 18:03:58 UTC (rev 697)
@@ -25,6 +25,7 @@
- Haiku
- Minix
- SunOS
+ - ReactOS
If your platform is not here try checking out the mailing list archives or
the message boards on SourceForge.
Modified: branches/namiltd-ini/includes/os/class.WINNT.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-09 11:24:04 UTC (rev 696)
+++ branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-10 18:03:58 UTC (rev 697)
@@ -180,7 +180,7 @@
private function _hostname()
{
if (PSI_USE_VHOST === true) {
- $this->sys->setHostname(getenv('SERVER_NAME'));
+ if ($hnm = getenv('SERVER_NAME')) $this->sys->setHostname($hnm);
} else {
$buffer = $this->_getWMI('Win32_ComputerSystem', array('Name'));
if ($buffer) {
@@ -189,6 +189,8 @@
if ($ip != $result) {
$this->sys->setHostname(gethostbyaddr($ip));
}
+ } else {
+ if ($hnm = getenv('COMPUTERNAME')) $this->sys->setHostname($hnm);
}
}
}
@@ -201,12 +203,16 @@
private function _ip()
{
if (PSI_USE_VHOST === true) {
- $this->sys->setIp(gethostbyname($this->sys->getHostname()));
+ if ( (($hnm=$this->sys->getHostname()) != 'localhost') &&
+ (($hip=gethostbyname($hnm)) != $hnm) ) $this->sys->setIp($hip);
} else {
$buffer = $this->_getWMI('Win32_ComputerSystem', array('Name'));
if ($buffer) {
$result = $buffer[0]['Name'];
$this->sys->setIp(gethostbyname($result));
+ } else {
+ if ( (($hnm=$this->sys->getHostname()) != 'localhost') &&
+ (($hip=gethostbyname($hnm)) != $hnm) ) $this->sys->setIp($hip);
}
}
}
@@ -284,12 +290,12 @@
else
$icon = 'WinXP.png';
$this->sys->setDistributionIcon($icon);
- } else if (CommonFunctions::executeProgram("cmd", "/c ver", $ver_value)) {
+ } else if (CommonFunctions::executeProgram("cmd", "/c ver 2>nul", $ver_value, false)) {
if (preg_match("/ReactOS\nVersion\s+(.+)/", $ver_value, $ar_temp)){
$this->sys->setDistribution("ReactOS");
$this->sys->setKernel($ar_temp[1]);
$this->sys->setDistributionIcon('ReactOS.png');
- }else if (preg_match("/^(Microsoft [^\[]*)\s*\[(.+)\]/", $ver_value, $ar_temp)){
+ } else if (preg_match("/^(Microsoft [^\[]*)\s*\[\D*\s*(.+)\]/", $ver_value, $ar_temp)){
$this->sys->setDistribution($ar_temp[1]);
$this->sys->setKernel($ar_temp[2]);
$this->sys->setDistributionIcon('Win2000.png');
@@ -494,6 +500,27 @@
}
$this->sys->setDiskDevices($dev);
}
+ if ((!$buffer) && ($this->sys->getDistribution()=="ReactOS")){
+ // test for command 'free' on current disk
+ if (CommonFunctions::executeProgram("cmd", "/c free 2>nul", $out_value, true)) {
+ for ($letter='A'; $letter!='AA'; $letter++) if (CommonFunctions::executeProgram("cmd", "/c free ".$letter.": 2>nul", $out_value, false)){
+ if (preg_match('/\n\s*([\d\.\,]+).*\n\s*([\d\.\,]+).*\n\s*([\d\.\,]+).*$/',$out_value, $out_dig )) {
+ $size = preg_replace('/(\.)|(\,)/', '', $out_dig[1]);
+ $used = preg_replace('/(\.)|(\,)/', '', $out_dig[2]);
+ $free = preg_replace('/(\.)|(\,)/', '', $out_dig[3]);
+ if ($used + $free == $size ) {
+ $dev = new DiskDevice();
+ $dev->setMountPoint($letter.":");
+ $dev->setFsType('Unknown');
+ $dev->setTotal($size);
+ $dev->setFree($free);
+ $dev->setUsed($used);
+ $this->sys->setDiskDevices($dev);
+ }
+ }
+ }
+ }
+ }
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-14 20:34:02
|
Revision: 698
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=698&view=rev
Author: namiltd
Date: 2012-09-14 20:33:53 +0000 (Fri, 14 Sep 2012)
Log Message:
-----------
add Oracle Linux to detected distros
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/data/distros.ini
branches/namiltd-ini/includes/os/class.Linux.inc.php
Added Paths:
-----------
branches/namiltd-ini/gfx/images/Oracle.png
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-09-10 18:03:58 UTC (rev 697)
+++ branches/namiltd-ini/ChangeLog 2012-09-14 20:33:53 UTC (rev 698)
@@ -2,7 +2,7 @@
phpSysInfo 3.1.0
- - [ADD] Turbolinux to detected distros
+ - [ADD] Turbolinux and Oracle Linux to detected distros
- [ADD] Show System Language and Charmap on Linux and WINNT
- [ADD] Minor support of ReactOS
Modified: branches/namiltd-ini/data/distros.ini
===================================================================
--- branches/namiltd-ini/data/distros.ini 2012-09-10 18:03:58 UTC (rev 697)
+++ branches/namiltd-ini/data/distros.ini 2012-09-14 20:33:53 UTC (rev 698)
@@ -32,10 +32,6 @@
Image = "Fedora.png"
Files = "/etc/fedora-release"
-[RedHat]
-Image = "Redhat.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
-
[Slackware]
Image = "Slackware.png"
Files = "/etc/slackware-release;/etc/slackware-version"
@@ -66,7 +62,7 @@
[Ubuntu]
Image = "Ubuntu.png"
-Files = "/etc/lsb-release"
+;Files = "/etc/lsb-release"
[PLD]
Image = "PLD.png"
@@ -74,16 +70,9 @@
[CentOS]
Image = "CentOS.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
+Files = "/etc/centos-release"
+;detected Files = "/etc/redhat-release"
-[RedHatEnterpriseES]
-Image = "Redhat.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
-
-[RedHatEnterpriseAS]
-Image = "Redhat.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
-
[LFS]
Image = "lfs.png"
Files = "/etc/lfs-release;/etc/lfs_version"
@@ -94,7 +83,7 @@
[IYCC]
Image = "iycc.png"
-Files = "/etc/lsb-release"
+;Files = "/etc/lsb-release"
[Synology]
Name = "Synology"
@@ -105,33 +94,33 @@
Image = "Arch.png"
Name = "Arch Linux"
+[Scientific]
+Image = "Scientific.png"
+;detected Files = "/etc/redhat-release"
+
[Scientific Linux]
Image = "Scientific.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
+;detected Files = "/etc/redhat-release"
[ScientificSL]
Image = "Scientific.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
+;detected Files = "/etc/redhat-release"
[ScientificCERNSLC]
Image = "Scientific.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
+;detected Files = "/etc/redhat-release"
[ScientificFermiLTS]
Image = "Scientific.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
+;also Files = "/etc/t-release"
[ScientificSLF]
Image = "Scientific.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
+;detected Files = "/etc/redhat-release"
-[Scientific]
-Image = "Scientific.png"
-Files = "/etc/redhat-release;/etc/redhat_version"
-
[LinuxMint]
Image = "Mint.png"
-Files = "/etc/lsb-release"
+;Files = "/etc/lsb-release"
[Mageia]
Image = "Mageia.png"
@@ -139,26 +128,56 @@
[Chakra]
Image = "Chakra.png"
-Files = "/etc/lsb-release"
+;Files = "/etc/lsb-release"
[Alpine]
Name = "Alpine"
Image = "Alpine.png"
Files = "/etc/alpine-release"
+[Puppy]
+Image = "Puppy.png"
+;Files = "/etc/DISTRO_SPECS"
+
[Lucid]
Name = "Lucid Puppy"
Image = "Puppy.png"
-Files = "/etc/DISTRO_SPECS"
+;Files = "/etc/DISTRO_SPECS"
[Slacko Puppy]
Image = "Puppy.png"
-Files = "/etc/DISTRO_SPECS"
+;Files = "/etc/DISTRO_SPECS"
[Wary Puppy]
Image = "Puppy.png"
-Files = "/etc/DISTRO_SPECS"
+;Files = "/etc/DISTRO_SPECS"
[Turbolinux]
Image = "Turbo.png"
Files = "/etc/turbolinux-release"
+
+[Oracle]
+Image = "Oracle.png"
+Files = "/etc/oracle-release"
+;detected Files = "/etc/redhat-release"
+
+[OracleServer]
+Image = "Oracle.png"
+Files = "/etc/oracle-release"
+;detected Files = "/etc/redhat-release"
+
+; at the end because some distros may also have the same files (like CentOS, Oracle, Scientific etc)
+[RedHat]
+Image = "Redhat.png"
+Files = "/etc/redhat_version"
+;detected Files = "/etc/redhat-release"
+
+[RedHatEnterpriseES]
+Image = "Redhat.png"
+Files = "/etc/redhat_version"
+;detected Files = "/etc/redhat-release"
+
+[RedHatEnterpriseAS]
+Image = "Redhat.png"
+Files = "/etc/redhat_version"
+;detected Files = "/etc/redhat-release"
Added: branches/namiltd-ini/gfx/images/Oracle.png
===================================================================
(Binary files differ)
Property changes on: branches/namiltd-ini/gfx/images/Oracle.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified: branches/namiltd-ini/includes/os/class.Linux.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-09-10 18:03:58 UTC (rev 697)
+++ branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-09-14 20:33:53 UTC (rev 698)
@@ -529,6 +529,7 @@
*/
private function _distro()
{
+ $this->sys->setDistribution("Linux");
$list = @parse_ini_file(APP_ROOT."/data/distros.ini", true);
if (!$list) {
return;
@@ -553,76 +554,123 @@
}
/* fatal errors only */
$old_err_rep = error_reporting();
- error_reporting(E_ERROR);
- // Fall back in case 'lsb_release' does not exist ;)
+ error_reporting(E_ERROR);
+
+ // Fall back in case 'lsb_release' does not exist and file 'lsb-release' and 'DISTRO_SPECS' does not exist
foreach ($list as $section=>$distribution) {
if (!isset($distribution["Files"])) {
continue;
} else {
foreach (preg_split("/;/", $distribution["Files"], -1, PREG_SPLIT_NO_EMPTY) as $filename) {
if (file_exists($filename)) {
- CommonFunctions::rfts($filename, $buf);
-
- // lsb-release file
- if (preg_match('/^DISTRIB_ID=(.*)/m', $buf, $id_buf)) {
- if (preg_match('/^DISTRIB_DESCRIPTION="(.*)"/m', $buf, $desc_buf)) {
- $this->sys->setDistribution(trim($desc_buf[1]));
+ if (!CommonFunctions::rfts($filename, $buf, 1, 4096, false)) {
+ $buf = "";
+ }
+ if (isset($distribution["Image"])) {
+ $this->sys->setDistributionIcon($distribution["Image"]);
+ }
+ if (isset($distribution["Name"])) {
+ if (($distribution["Name"] == 'Synology') || is_null($buf) || (trim($buf) == "")) {
+ $this->sys->setDistribution($distribution["Name"]);
} else {
- if (isset($list[trim($id_buf[1])]['Name'])) {
- $dist = trim($list[trim($id_buf[1])]['Name']);
- } else {
- $dist = trim($id_buf[1]);
- }
- if (preg_match('/^DISTRIB_RELEASE=(.*)/m', $buf, $vers_buf)) {
- $this->sys->setDistribution(trim($dist." ".trim($vers_buf[1])));
- } else {
- $this->sys->setDistribution($dist);
- }
+ $this->sys->setDistribution($distribution["Name"]." ".trim($buf));
}
- if (isset($list[trim($id_buf[1])]['Image'])) {
- $this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
- }
- // DISTRO_SPECS file
- } else if (preg_match('/^DISTRO_NAME=\'(.*)\'/m', $buf, $id_buf)) {
- if (isset($list[trim($id_buf[1])]['Name'])) {
- $dist = trim($list[trim($id_buf[1])]['Name']);
- } else {
- $dist = trim($id_buf[1]);
- }
- if (preg_match('/^DISTRO_VERSION=(.*)/m', $buf, $vers_buf)) {
- $this->sys->setDistribution(trim($dist." ".trim($vers_buf[1])));
- } else {
- $this->sys->setDistribution($dist);
- }
- if (isset($list[trim($id_buf[1])]['Image'])) {
- $this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
- }
} else {
- if (isset($distribution["Image"])) {
- $this->sys->setDistributionIcon($distribution["Image"]);
- }
- if (isset($distribution["Name"])) {
- if ($distribution["Name"] == 'Synology') {
- $this->sys->setDistribution($distribution["Name"]);
- } else {
- $this->sys->setDistribution($distribution["Name"]." ".trim($buf));
- }
+ if ( is_null($buf) || (trim($buf) == "") ) {
+ $this->sys->setDistribution($section);
} else {
$this->sys->setDistribution(trim($buf));
}
}
- return;
+ break 2;
}
}
}
}
+ // Otherwise, if no files found
+ if ($this->sys->getDistribution() == "Linux") {
+ if ( file_exists($filename="/etc/lsb-release")
+ && CommonFunctions::rfts($filename, $buf, 0, 4096, false)
+ && preg_match('/^DISTRIB_ID=(.*)/m', $buf, $id_buf) ) {
+ if (preg_match('/^DISTRIB_DESCRIPTION="(.*)"/m', $buf, $desc_buf)) {
+ $this->sys->setDistribution(trim($desc_buf[1]));
+ } else {
+ if (isset($list[trim($id_buf[1])]['Name'])) {
+ $dist = trim($list[trim($id_buf[1])]['Name']);
+ } else {
+ $dist = trim($id_buf[1]);
+ }
+ if (preg_match('/^DISTRIB_RELEASE=(.*)/m', $buf, $vers_buf)) {
+ $this->sys->setDistribution(trim($dist." ".trim($vers_buf[1])));
+ } else {
+ $this->sys->setDistribution($dist);
+ }
+ }
+ if (isset($list[trim($id_buf[1])]['Image'])) {
+ $this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
+ }
+ } else
+ if ( file_exists($filename="/etc/DISTRO_SPECS")
+ && CommonFunctions::rfts($filename, $buf, 0, 4096, false)
+ && preg_match('/^DISTRO_NAME=\'(.*)\'/m', $buf, $id_buf) ) {
+ if (isset($list[trim($id_buf[1])]['Name'])) {
+ $dist = trim($list[trim($id_buf[1])]['Name']);
+ } else {
+ $dist = trim($id_buf[1]);
+ }
+ if (preg_match('/^DISTRO_VERSION=(.*)/m', $buf, $vers_buf)) {
+ $this->sys->setDistribution(trim($dist." ".trim($vers_buf[1])));
+ } else {
+ $this->sys->setDistribution($dist);
+ }
+ if (isset($list[trim($id_buf[1])]['Image'])) {
+ $this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
+ } else {
+ if (isset($list['Puppy']["Image"])) {
+ $this->sys->setDistributionIcon($list['Puppy']["Image"]);
+ }
+ }
+ } else
+ if ( file_exists($filename="/etc/redhat-release")
+ && CommonFunctions::rfts($filename, $buf, 1, 4096, false) ){
+ if ( (is_null($buf)) || (trim($buf) == "") ) {
+ if (isset($list['RedHat']['Name'])) {
+ $this->sys->setDistribution(trim($list['RedHat']['Name']));
+ } else {
+ $this->sys->setDistribution('RedHat');
+ }
+ if (isset($list['RedHat']["Image"])) {
+ $this->sys->setDistributionIcon($list['RedHat']["Image"]);
+ }
+ } else {
+ $this->sys->setDistribution(trim($buf));
+ if ( preg_match('/^(\S+)\s*/', $buf, $id_buf)
+ && isset($list[trim($id_buf[1])]['Image'])) {
+ $this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
+ } else {
+ if (isset($list['RedHat']["Image"])) {
+ $this->sys->setDistributionIcon($list['RedHat']["Image"]);
+ }
+ }
+ }
+ }
+ }
+ /*if ($this->sys->getDistribution() == "Linux") {
+ if (file_exists($filename="/etc/issue")) {
+ if (CommonFunctions::rfts($filename, $buf, 1, 4096, false)
+ && (!is_null($buf))
+ && ($buf != "")) {
+ $this->sys->setDistribution($buf);
+ }
+ }
+
+ }*/
/* restore error level */
error_reporting($old_err_rep);
/* restore error handler */
if (function_exists('errorHandlerPsi')) {
set_error_handler('errorHandlerPsi');
}
-
}
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-15 11:57:21
|
Revision: 699
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=699&view=rev
Author: namiltd
Date: 2012-09-15 11:57:13 +0000 (Sat, 15 Sep 2012)
Log Message:
-----------
variables renaming
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/config.php
branches/namiltd-ini/includes/class.CommonFunctions.inc.php
branches/namiltd-ini/includes/os/class.OS.inc.php
branches/namiltd-ini/includes/os/class.WINNT.inc.php
branches/namiltd-ini/includes/xml/class.XML.inc.php
branches/namiltd-ini/js/phpSysInfo/phpsysinfo.js
branches/namiltd-ini/language/ast.xml
branches/namiltd-ini/language/bg.xml
branches/namiltd-ini/language/cz.xml
branches/namiltd-ini/language/da.xml
branches/namiltd-ini/language/de.xml
branches/namiltd-ini/language/en.xml
branches/namiltd-ini/language/es.xml
branches/namiltd-ini/language/et.xml
branches/namiltd-ini/language/fi.xml
branches/namiltd-ini/language/fr.xml
branches/namiltd-ini/language/gl.xml
branches/namiltd-ini/language/gr.xml
branches/namiltd-ini/language/hu.xml
branches/namiltd-ini/language/is.xml
branches/namiltd-ini/language/it.xml
branches/namiltd-ini/language/ja.xml
branches/namiltd-ini/language/ko.xml
branches/namiltd-ini/language/nl.xml
branches/namiltd-ini/language/no.xml
branches/namiltd-ini/language/pl.xml
branches/namiltd-ini/language/pt-br.xml
branches/namiltd-ini/language/ro.xml
branches/namiltd-ini/language/ru.xml
branches/namiltd-ini/language/sc.xml
branches/namiltd-ini/language/sk.xml
branches/namiltd-ini/language/sl.xml
branches/namiltd-ini/language/sv.xml
branches/namiltd-ini/language/th.xml
branches/namiltd-ini/language/tr.xml
branches/namiltd-ini/language/tw.xml
branches/namiltd-ini/language/uk.xml
branches/namiltd-ini/phpsysinfo.xslt
branches/namiltd-ini/phpsysinfo3.xsd
branches/namiltd-ini/templates/html/index_dynamic.html
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/ChangeLog 2012-09-15 11:57:13 UTC (rev 699)
@@ -3,7 +3,7 @@
phpSysInfo 3.1.0
- [ADD] Turbolinux and Oracle Linux to detected distros
- - [ADD] Show System Language and Charmap on Linux and WINNT
+ - [ADD] Show System Language and Code Page on Linux and WINNT
- [ADD] Minor support of ReactOS
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/config.php 2012-09-15 11:57:13 UTC (rev 699)
@@ -43,7 +43,7 @@
define('PSI_VERSION_STRING', PSI_VERSION);
}
- /* get Linux charset */
+ /* get Linux code page */
if (PHP_OS == 'Linux'){
if (file_exists ('/etc/sysconfig/i18n')){
$contents = @file_get_contents('/etc/sysconfig/i18n');
@@ -56,7 +56,7 @@
if (@exec($matches[1].' locale -k LC_CTYPE 2>/dev/null', $lines)) {
foreach ($lines as $line) {
if ($contents && preg_match("/^charmap=\"(.*)\"/m", $line, $matches2)) {
- define('PSI_SYSTEM_CHARSET', $matches2[1]);
+ define('PSI_SYSTEM_CODEPAGE', $matches2[1]);
break;
}
}
@@ -73,7 +73,7 @@
if ($lang == ""){
$lang = 'Unknown';
}
- define('PSI_SYSTEM_LANGUAGE', $lang.' ('.$matches2[1].')');
+ define('PSI_SYSTEM_SYSLANG', $lang.' ('.$matches2[1].')');
break;
}
}
@@ -81,11 +81,11 @@
}
}
- if (!defined('PSI_SYSTEM_CHARSET')){
- define('PSI_SYSTEM_CHARSET', null);
+ if (!defined('PSI_SYSTEM_SYSLANG')){
+ define('PSI_SYSTEM_SYSLANG', null);
}
- if (!defined('PSI_SYSTEM_LANGUAGE')){
- define('PSI_SYSTEM_LANGUAGE', null);
+ if (!defined('PSI_SYSTEM_CODEPAGE')){
+ define('PSI_SYSTEM_CODEPAGE', null);
}
/* restore error level */
Modified: branches/namiltd-ini/includes/class.CommonFunctions.inc.php
===================================================================
--- branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/includes/class.CommonFunctions.inc.php 2012-09-15 11:57:13 UTC (rev 699)
@@ -225,7 +225,7 @@
*/
public static function checkForExtensions($arrExt = array())
{
- if ( (PHP_OS == "Minix") || (PSI_SYSTEM_CHARSET == "UTF-8") )
+ if ( (PHP_OS == "Minix") || (PSI_SYSTEM_CODEPAGE == "UTF-8") )
$arrReq = array('simplexml', 'pcre', 'xml', 'dom');
else if (PHP_OS == "WINNT")
$arrReq = array('simplexml', 'pcre', 'xml', 'mbstring', 'dom', 'com_dotnet');
Modified: branches/namiltd-ini/includes/os/class.OS.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.OS.inc.php 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/includes/os/class.OS.inc.php 2012-09-15 11:57:13 UTC (rev 699)
@@ -55,7 +55,7 @@
*/
public function getEncoding()
{
- return PSI_SYSTEM_CHARSET;
+ return PSI_SYSTEM_CODEPAGE;
}
/**
* get os specific language
@@ -66,7 +66,7 @@
*/
public function getLanguage()
{
- return PSI_SYSTEM_LANGUAGE;
+ return PSI_SYSTEM_SYSLANG;
}
/**
Modified: branches/namiltd-ini/includes/os/class.WINNT.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/includes/os/class.WINNT.inc.php 2012-09-15 11:57:13 UTC (rev 699)
@@ -46,14 +46,14 @@
*
* @var string
*/
- private $_charset = null;
+ private $_codepage = null;
/**
* store language of the system
*
* @var string
*/
- private $_language = null;
+ private $_syslang = null;
/**
* build the global Error object and create the WMI connection
@@ -90,7 +90,7 @@
{
$buffer = $this->_getWMI('Win32_OperatingSystem', array('CodeSet','OSLanguage'));
if ($buffer) {
- $this->_charset = 'windows-'.$buffer[0]['CodeSet'];
+ $this->_codepage = 'windows-'.$buffer[0]['CodeSet'];
$lang = "";
if (is_readable(APP_ROOT.'/data/languages.ini') && ($langdata = @parse_ini_file(APP_ROOT.'/data/languages.ini', true))){
if (isset($langdata['WINNT'][$buffer[0]['OSLanguage']])) {
@@ -100,7 +100,7 @@
if ($lang == ""){
$lang = 'Unknown';
}
- $this->_language = $lang.' ('.$buffer[0]['OSLanguage'].')';
+ $this->_syslang = $lang.' ('.$buffer[0]['OSLanguage'].')';
}
}
@@ -532,7 +532,7 @@
*/
function getEncoding()
{
- return $this->_charset;
+ return $this->_codepage;
}
/**
@@ -544,7 +544,7 @@
*/
function getLanguage()
{
- return $this->_language;
+ return $this->_syslang;
}
/**
Modified: branches/namiltd-ini/includes/xml/class.XML.inc.php
===================================================================
--- branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/includes/xml/class.XML.inc.php 2012-09-15 11:57:13 UTC (rev 699)
@@ -131,10 +131,10 @@
$vitals->addAttribute('CPULoad', $this->_sys->getLoadPercent());
}
if ($this->_sysinfo->getLanguage() !== null) {
- $vitals->addAttribute('Language', $this->_sysinfo->getLanguage());
+ $vitals->addAttribute('SysLang', $this->_sysinfo->getLanguage());
}
if ($this->_sysinfo->getEncoding() !== null) {
- $vitals->addAttribute('Charmap', $this->_sysinfo->getEncoding());
+ $vitals->addAttribute('CodePage', $this->_sysinfo->getEncoding());
}
}
Modified: branches/namiltd-ini/js/phpSysInfo/phpsysinfo.js
===================================================================
--- branches/namiltd-ini/js/phpSysInfo/phpsysinfo.js 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/js/phpSysInfo/phpsysinfo.js 2012-09-15 11:57:13 UTC (rev 699)
@@ -567,7 +567,7 @@
*/
function refreshVitals(xml) {
var hostname = "", ip = "", kernel = "", distro = "", icon = "", uptime = "", users = 0, loadavg = "";
- var language = "", charmap = "";
+ var syslang = "", codepage = "";
var lastboot = 0, timestamp = Number(new Date());
$("Vitals", xml).each(function getVitals(id) {
@@ -583,16 +583,16 @@
if ($(this).attr("CPULoad") !== undefined) {
loadavg = loadavg + "<br/>" + createBar(parseInt($(this).attr("CPULoad"), 10));
}
- if ($(this).attr("Language") !== undefined) {
- language = $(this).attr("Language");
- document.getElementById("s_language_tr").style.display='';
+ if ($(this).attr("SysLang") !== undefined) {
+ syslang = $(this).attr("SysLang");
+ document.getElementById("s_syslang_tr").style.display='';
}
- if ($(this).attr("Charmap") !== undefined) {
- charmap = $(this).attr("Charmap");
- if ($(this).attr("Language") !== undefined) {
- document.getElementById("s_charmap_tr1").style.display='';
+ if ($(this).attr("CodePage") !== undefined) {
+ codepage = $(this).attr("CodePage");
+ if ($(this).attr("SysLang") !== undefined) {
+ document.getElementById("s_codepage_tr1").style.display='';
} else {
- document.getElementById("s_charmap_tr2").style.display='';
+ document.getElementById("s_codepage_tr2").style.display='';
}
}
document.title = "System information: " + hostname + " (" + ip + ")";
@@ -606,9 +606,9 @@
$("#s_lastboot").html(lastboot.toGMTString()); //toGMTString() or toLocaleString()
$("#s_users").html(users);
$("#s_loadavg").html(loadavg);
- $("#s_language").html(language);
- $("#s_charmap_1").html(charmap);
- $("#s_charmap_2").html(charmap);
+ $("#s_syslang").html(syslang);
+ $("#s_codepage_1").html(codepage);
+ $("#s_codepage_2").html(codepage);
});
}
Modified: branches/namiltd-ini/language/ast.xml
===================================================================
--- branches/namiltd-ini/language/ast.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/ast.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/bg.xml
===================================================================
--- branches/namiltd-ini/language/bg.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/bg.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/cz.xml
===================================================================
--- branches/namiltd-ini/language/cz.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/cz.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/da.xml
===================================================================
--- branches/namiltd-ini/language/da.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/da.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/de.xml
===================================================================
--- branches/namiltd-ini/language/de.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/de.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/en.xml
===================================================================
--- branches/namiltd-ini/language/en.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/en.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/es.xml
===================================================================
--- branches/namiltd-ini/language/es.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/es.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/et.xml
===================================================================
--- branches/namiltd-ini/language/et.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/et.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/fi.xml
===================================================================
--- branches/namiltd-ini/language/fi.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/fi.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/fr.xml
===================================================================
--- branches/namiltd-ini/language/fr.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/fr.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/gl.xml
===================================================================
--- branches/namiltd-ini/language/gl.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/gl.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/gr.xml
===================================================================
--- branches/namiltd-ini/language/gr.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/gr.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/hu.xml
===================================================================
--- branches/namiltd-ini/language/hu.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/hu.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/is.xml
===================================================================
--- branches/namiltd-ini/language/is.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/is.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/it.xml
===================================================================
--- branches/namiltd-ini/language/it.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/it.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/ja.xml
===================================================================
--- branches/namiltd-ini/language/ja.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/ja.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/ko.xml
===================================================================
--- branches/namiltd-ini/language/ko.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/ko.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/nl.xml
===================================================================
--- branches/namiltd-ini/language/nl.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/nl.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/no.xml
===================================================================
--- branches/namiltd-ini/language/no.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/no.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/pl.xml
===================================================================
--- branches/namiltd-ini/language/pl.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/pl.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>Język systemu</exp>
</expression>
- <expression id="098" name="charmap">
+ <expression id="098" name="codepage">
<exp>Strona kodowa</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/pt-br.xml
===================================================================
--- branches/namiltd-ini/language/pt-br.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/pt-br.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -295,10 +295,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/ro.xml
===================================================================
--- branches/namiltd-ini/language/ro.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/ro.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/ru.xml
===================================================================
--- branches/namiltd-ini/language/ru.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/ru.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -295,10 +295,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/sc.xml
===================================================================
--- branches/namiltd-ini/language/sc.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/sc.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -295,10 +295,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/sk.xml
===================================================================
--- branches/namiltd-ini/language/sk.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/sk.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -295,10 +295,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/sl.xml
===================================================================
--- branches/namiltd-ini/language/sl.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/sl.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/sv.xml
===================================================================
--- branches/namiltd-ini/language/sv.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/sv.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/th.xml
===================================================================
--- branches/namiltd-ini/language/th.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/th.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -292,10 +292,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/tr.xml
===================================================================
--- branches/namiltd-ini/language/tr.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/tr.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -294,10 +294,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</expression>
- <expression id="097" name="language">
+ <expression id="097" name="syslang">
<exp>System Language</exp>
</expression>
- <expression id="098" name="charmap">
- <exp>Charmap</exp>
+ <expression id="098" name="codepage">
+ <exp>Code Page</exp>
</expression>
</tns:translation>
Modified: branches/namiltd-ini/language/tw.xml
===================================================================
--- branches/namiltd-ini/language/tw.xml 2012-09-14 20:33:53 UTC (rev 698)
+++ branches/namiltd-ini/language/tw.xml 2012-09-15 11:57:13 UTC (rev 699)
@@ -295,10 +295,10 @@
<expression id="096" name="bytes">
<exp>B</exp>
</ex...
[truncated message content] |
|
From: <na...@us...> - 2012-09-16 12:08:19
|
Revision: 700
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=700&view=rev
Author: namiltd
Date: 2012-09-16 12:08:13 +0000 (Sun, 16 Sep 2012)
Log Message:
-----------
PCLinuxOS to detected distros
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/config.php
branches/namiltd-ini/data/distros.ini
Added Paths:
-----------
branches/namiltd-ini/gfx/images/PCLinuxOS.png
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-09-15 11:57:13 UTC (rev 699)
+++ branches/namiltd-ini/ChangeLog 2012-09-16 12:08:13 UTC (rev 700)
@@ -2,7 +2,7 @@
phpSysInfo 3.1.0
- - [ADD] Turbolinux and Oracle Linux to detected distros
+ - [ADD] Turbolinux, Oracle Linux and PCLinuxOS to detected distros
- [ADD] Show System Language and Code Page on Linux and WINNT
- [ADD] Minor support of ReactOS
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-09-15 11:57:13 UTC (rev 699)
+++ branches/namiltd-ini/config.php 2012-09-16 12:08:13 UTC (rev 700)
@@ -43,7 +43,7 @@
define('PSI_VERSION_STRING', PSI_VERSION);
}
- /* get Linux code page */
+ /* get Linux charset */
if (PHP_OS == 'Linux'){
if (file_exists ('/etc/sysconfig/i18n')){
$contents = @file_get_contents('/etc/sysconfig/i18n');
@@ -51,12 +51,15 @@
$contents = @file_get_contents('/etc/default/locale');
} else if (file_exists ('/etc/locale.conf')){
$contents = @file_get_contents('/etc/locale.conf');
+ } else if (file_exists ('/etc/sysconfig/language')){
+ $contents = @file_get_contents('/etc/sysconfig/language');
} else $contents = false;
- if ($contents && preg_match("/^(LANG=\".*\")/m", $contents, $matches)) {
+ if ($contents && ( preg_match("/^(LANG=\".*\")/m", $contents, $matches)
+ || preg_match("/^RC_(LANG=\".*\")/m", $contents, $matches))) {
if (@exec($matches[1].' locale -k LC_CTYPE 2>/dev/null', $lines)) {
foreach ($lines as $line) {
if ($contents && preg_match("/^charmap=\"(.*)\"/m", $line, $matches2)) {
- define('PSI_SYSTEM_CODEPAGE', $matches2[1]);
+ define('PSI_SYSTEM_CHARSET', $matches2[1]);
break;
}
}
@@ -73,7 +76,7 @@
if ($lang == ""){
$lang = 'Unknown';
}
- define('PSI_SYSTEM_SYSLANG', $lang.' ('.$matches2[1].')');
+ define('PSI_SYSTEM_LANGUAGE', $lang.' ('.$matches2[1].')');
break;
}
}
@@ -81,11 +84,11 @@
}
}
- if (!defined('PSI_SYSTEM_SYSLANG')){
- define('PSI_SYSTEM_SYSLANG', null);
+ if (!defined('PSI_SYSTEM_CHARSET')){
+ define('PSI_SYSTEM_CHARSET', null);
}
- if (!defined('PSI_SYSTEM_CODEPAGE')){
- define('PSI_SYSTEM_CODEPAGE', null);
+ if (!defined('PSI_SYSTEM_LANGUAGE')){
+ define('PSI_SYSTEM_LANGUAGE', null);
}
/* restore error level */
Modified: branches/namiltd-ini/data/distros.ini
===================================================================
--- branches/namiltd-ini/data/distros.ini 2012-09-15 11:57:13 UTC (rev 699)
+++ branches/namiltd-ini/data/distros.ini 2012-09-16 12:08:13 UTC (rev 700)
@@ -12,14 +12,6 @@
Image = "Suse.png"
Files = "/etc/SuSE-release;/etc/UnitedLinux-release"
-[Mandrake]
-Image = "Mandrake.png"
-Files = "/etc/mandrake-release"
-
-[MandrivaLinux]
-Image = "Mandrake.png"
-Files = "/etc/mandrake-release"
-
[Gentoo]
Image = "Gentoo.png"
Files = "/etc/gentoo-release"
@@ -62,7 +54,7 @@
[Ubuntu]
Image = "Ubuntu.png"
-;Files = "/etc/lsb-release"
+;detected in "/etc/lsb-release"
[PLD]
Image = "PLD.png"
@@ -71,7 +63,7 @@
[CentOS]
Image = "CentOS.png"
Files = "/etc/centos-release"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[LFS]
Image = "lfs.png"
@@ -83,7 +75,7 @@
[IYCC]
Image = "iycc.png"
-;Files = "/etc/lsb-release"
+;detected in "/etc/lsb-release"
[Synology]
Name = "Synology"
@@ -96,31 +88,31 @@
[Scientific]
Image = "Scientific.png"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[Scientific Linux]
Image = "Scientific.png"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[ScientificSL]
Image = "Scientific.png"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[ScientificCERNSLC]
Image = "Scientific.png"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[ScientificFermiLTS]
Image = "Scientific.png"
-;also Files = "/etc/t-release"
+;detected in "/etc/redhat-release"
[ScientificSLF]
Image = "Scientific.png"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[LinuxMint]
Image = "Mint.png"
-;Files = "/etc/lsb-release"
+;detected in "/etc/lsb-release"
[Mageia]
Image = "Mageia.png"
@@ -128,7 +120,7 @@
[Chakra]
Image = "Chakra.png"
-;Files = "/etc/lsb-release"
+;detected in "/etc/lsb-release"
[Alpine]
Name = "Alpine"
@@ -137,20 +129,20 @@
[Puppy]
Image = "Puppy.png"
-;Files = "/etc/DISTRO_SPECS"
+;detected in "/etc/DISTRO_SPECS"
[Lucid]
Name = "Lucid Puppy"
Image = "Puppy.png"
-;Files = "/etc/DISTRO_SPECS"
+;detected in "/etc/DISTRO_SPECS"
[Slacko Puppy]
Image = "Puppy.png"
-;Files = "/etc/DISTRO_SPECS"
+;detected in "/etc/DISTRO_SPECS"
[Wary Puppy]
Image = "Puppy.png"
-;Files = "/etc/DISTRO_SPECS"
+;detected in "/etc/DISTRO_SPECS"
[Turbolinux]
Image = "Turbo.png"
@@ -159,25 +151,39 @@
[Oracle]
Image = "Oracle.png"
Files = "/etc/oracle-release"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[OracleServer]
Image = "Oracle.png"
Files = "/etc/oracle-release"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
-; at the end because some distros may also have the same files (like CentOS, Oracle, Scientific etc)
+[PCLinuxOS]
+Image = "PCLinuxOS.png"
+Files = "/etc/pclinuxos-release"
+
+; at the end because some distros may also have the same files (like PCLinuxOS etc)
+[MandrivaLinux]
+Image = "Mandrake.png"
+Files = "/etc/mandiva-release"
+
+; at the end because some distros may also have the same files (like MandivaLinux, PCLinuxOS etc)
+[Mandrake]
+Image = "Mandrake.png"
+Files = "/etc/mandrake-release;/etc/mandrakelinux-release"
+
+; at the end because some distros may also have the same files (like CentOS, Oracle, Scientific, Mandrake, MandivaLinux, PCLinuxOS etc)
[RedHat]
Image = "Redhat.png"
Files = "/etc/redhat_version"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[RedHatEnterpriseES]
Image = "Redhat.png"
Files = "/etc/redhat_version"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
[RedHatEnterpriseAS]
Image = "Redhat.png"
Files = "/etc/redhat_version"
-;detected Files = "/etc/redhat-release"
+;detected in "/etc/redhat-release"
Added: branches/namiltd-ini/gfx/images/PCLinuxOS.png
===================================================================
(Binary files differ)
Property changes on: branches/namiltd-ini/gfx/images/PCLinuxOS.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-09-21 16:52:44
|
Revision: 702
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=702&view=rev
Author: namiltd
Date: 2012-09-21 16:52:32 +0000 (Fri, 21 Sep 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/js/jQuery/README
branches/namiltd-ini/js/jQuery/jquery.js
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-09-16 12:17:39 UTC (rev 701)
+++ branches/namiltd-ini/ChangeLog 2012-09-21 16:52:32 UTC (rev 702)
@@ -9,7 +9,7 @@
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
- [UPD] Plugin ipmi ranamed to IPMIInfo and Update-Notifier to UpdateNotifier (to avoid name conflicts)
- [UPD] Case-insensitive for most of parameters
- - [UPD] Updated jQuery plugin to 1.8.1
+ - [UPD] Updated jQuery plugin to 1.8.2
- [UPD] Updated jQuery plugin nyroModal to 1.6.2+jquery1.8fix
- [FIX] Fixed Bug [ 3561124 ] Incorrect reading of free mem on Mac OS X (thanks to pbobbenb)
Modified: branches/namiltd-ini/js/jQuery/README
===================================================================
--- branches/namiltd-ini/js/jQuery/README 2012-09-16 12:17:39 UTC (rev 701)
+++ branches/namiltd-ini/js/jQuery/README 2012-09-21 16:52:32 UTC (rev 702)
@@ -3,7 +3,7 @@
jquery.js
---------
-VERSION : 1.8.1
+VERSION : 1.8.2
URL : http://jquery.com/
DESC : jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle
events, perform animations, and add Ajax interactions to your web pages.
Modified: branches/namiltd-ini/js/jQuery/jquery.js
===================================================================
--- branches/namiltd-ini/js/jQuery/jquery.js 2012-09-16 12:17:39 UTC (rev 701)
+++ branches/namiltd-ini/js/jQuery/jquery.js 2012-09-21 16:52:32 UTC (rev 702)
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.8.1
+ * jQuery JavaScript Library v1.8.2
* http://jquery.com/
*
* Includes Sizzle.js
@@ -9,7 +9,7 @@
* Released under the MIT license
* http://jquery.org/license
*
- * Date: Thu Aug 30 2012 17:17:22 GMT-0400 (Eastern Daylight Time)
+ * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
*/
(function( window, undefined ) {
var
@@ -186,7 +186,7 @@
selector: "",
// The current version of jQuery being used
- jquery: "1.8.1",
+ jquery: "1.8.2",
// The default length of a jQuery object is 0
length: 0,
@@ -573,7 +573,7 @@
},
nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
},
// args is for internal usage only
@@ -630,7 +630,7 @@
function( text ) {
return text == null ?
"" :
- text.toString().replace( rtrim, "" );
+ ( text + "" ).replace( rtrim, "" );
},
// results is for internal usage only
@@ -776,7 +776,7 @@
};
// Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
return proxy;
},
@@ -1143,7 +1143,7 @@
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise: function( obj ) {
- return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise;
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
}
},
deferred = {};
@@ -1262,7 +1262,7 @@
a.style.cssText = "top:1px;float:left;opacity:.5";
// Can't get basic test support
- if ( !all || !all.length || !a ) {
+ if ( !all || !all.length ) {
return {};
}
@@ -1513,7 +1513,7 @@
deletedIds: [],
- // Please use with caution
+ // Remove at next major release (1.9/2.0)
uuid: 0,
// Unique for each copy of jQuery on the page
@@ -1565,7 +1565,7 @@
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
- elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid;
+ elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
} else {
id = internalKey;
}
@@ -1739,7 +1739,7 @@
for ( l = attr.length; i < l; i++ ) {
name = attr[i].name;
- if ( name.indexOf( "data-" ) === 0 ) {
+ if ( !name.indexOf( "data-" ) ) {
name = jQuery.camelCase( name.substring(5) );
dataAttr( elem, name, data[ name ] );
@@ -2049,7 +2049,7 @@
setClass = " " + elem.className + " ";
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+ if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
setClass += classNames[ c ] + " ";
}
}
@@ -2082,7 +2082,7 @@
// loop over each item in the removal list
for ( c = 0, cl = removes.length; c < cl; c++ ) {
// Remove until there is nothing to remove,
- while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) {
+ while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
className = className.replace( " " + removes[ c ] + " " , " " );
}
}
@@ -2136,7 +2136,7 @@
i = 0,
l = this.length;
for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
return true;
}
}
@@ -2314,7 +2314,7 @@
return ret;
} else {
- elem.setAttribute( name, "" + value );
+ elem.setAttribute( name, value + "" );
return value;
}
@@ -2578,7 +2578,7 @@
return elem.style.cssText.toLowerCase() || undefined;
},
set: function( elem, value ) {
- return ( elem.style.cssText = "" + value );
+ return ( elem.style.cssText = value + "" );
}
};
}
@@ -2711,6 +2711,7 @@
handler: handler,
guid: handler.guid,
selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
namespace: namespaces.join(".")
}, handleObjIn );
@@ -2946,7 +2947,7 @@
}
// Note that this is a bare JS function and not a jQuery handler
handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
event.preventDefault();
}
}
@@ -2994,7 +2995,7 @@
var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
delegateCount = handlers.delegateCount,
- args = [].slice.call( arguments ),
+ args = core_slice.call( arguments ),
run_all = !event.exclusive && !event.namespace,
special = jQuery.event.special[ event.type ] || {},
handlerQueue = [];
@@ -3023,7 +3024,9 @@
sel = handleObj.selector;
if ( selMatch[ sel ] === undefined ) {
- selMatch[ sel ] = jQuery( sel, this ).index( cur ) >= 0;
+ selMatch[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
}
if ( selMatch[ sel ] ) {
matches.push( handleObj );
@@ -3593,7 +3596,7 @@
},
undelegate: function( selector, types, fn ) {
// ( namespace ) or ( selector, types [, fn] )
- return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
},
trigger: function( type, data ) {
@@ -3664,14 +3667,13 @@
});
/*!
* Sizzle CSS Selector Engine
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license
- * http://sizzlejs.com/
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
*/
(function( window, undefined ) {
-var dirruns,
- cachedruns,
+var cachedruns,
assertGetIdNotName,
Expr,
getText,
@@ -3680,21 +3682,36 @@
compile,
sortOrder,
hasDuplicate,
+ outermostContext,
baseHasDuplicate = true,
strundefined = "undefined",
expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
+ Token = String,
document = window.document,
docElem = document.documentElement,
+ dirruns = 0,
done = 0,
+ pop = [].pop,
+ push = [].push,
slice = [].slice,
- push = [].push,
+ // Use a stripped-down indexOf if a native one is unavailable
+ indexOf = [].indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
// Augment a function for special use by Sizzle
markFunction = function( fn, value ) {
- fn[ expando ] = value || true;
+ fn[ expando ] = value == null || value;
return fn;
},
@@ -3741,7 +3758,8 @@
pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)",
// For matchExpr.POS and matchExpr.needsContext
- pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)",
+ pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
+ "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)",
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
@@ -3769,10 +3787,10 @@
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
"ATTR": new RegExp( "^" + attributes ),
"PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace +
+ "POS": new RegExp( pos, "i" ),
+ "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "POS": new RegExp( pos, "ig" ),
// For use in libraries implementing .is()
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
},
@@ -3854,7 +3872,8 @@
slice.call( docElem.childNodes, 0 )[0].nodeType;
} catch ( e ) {
slice = function( i ) {
- var elem, results = [];
+ var elem,
+ results = [];
for ( ; (elem = this[i]); i++ ) {
results.push( elem );
}
@@ -3868,14 +3887,14 @@
var match, elem, xml, m,
nodeType = context.nodeType;
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
if ( nodeType !== 1 && nodeType !== 9 ) {
return [];
}
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
xml = isXML( context );
if ( !xml && !seed ) {
@@ -3919,7 +3938,7 @@
}
// All others
- return select( selector, context, results, seed, xml );
+ return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
}
Sizzle.matches = function( expr, elements ) {
@@ -3946,6 +3965,25 @@
};
}
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
/**
* Utility function for retrieving the text value of an array of DOM nodes
* @param {Array|Element} elem
@@ -3983,7 +4021,7 @@
return ret;
};
-isXML = Sizzle.isXML = function isXML( elem ) {
+isXML = Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
@@ -4011,23 +4049,23 @@
};
Sizzle.attr = function( elem, name ) {
- var attr,
+ var val,
xml = isXML( elem );
if ( !xml ) {
name = name.toLowerCase();
}
- if ( Expr.attrHandle[ name ] ) {
- return Expr.attrHandle[ name ]( elem );
+ if ( (val = Expr.attrHandle[ name ]) ) {
+ return val( elem );
}
- if ( assertAttributes || xml ) {
+ if ( xml || assertAttributes ) {
return elem.getAttribute( name );
}
- attr = elem.getAttributeNode( name );
- return attr ?
+ val = elem.getAttributeNode( name );
+ return val ?
typeof elem[ name ] === "boolean" ?
elem[ name ] ? name : null :
- attr.specified ? attr.value : null :
+ val.specified ? val.value : null :
null;
};
@@ -4040,11 +4078,6 @@
match: matchExpr,
- order: new RegExp( "ID|TAG" +
- (assertUsableName ? "|NAME" : "") +
- (assertUsableClassName ? "|CLASS" : "")
- ),
-
// IE6/7 return a modified href
attrHandle: assertHrefNotNormalized ?
{} :
@@ -4105,13 +4138,13 @@
return results;
},
- "NAME": function( tag, context ) {
+ "NAME": assertUsableName && function( tag, context ) {
if ( typeof context.getElementsByName !== strundefined ) {
return context.getElementsByName( name );
}
},
- "CLASS": function( className, context, xml ) {
+ "CLASS": assertUsableClassName && function( className, context, xml ) {
if ( typeof context.getElementsByClassName !== strundefined && !xml ) {
return context.getElementsByClassName( className );
}
@@ -4140,7 +4173,7 @@
},
"CHILD": function( match ) {
- /* matches from matchExpr.CHILD
+ /* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
3 xn-component of xn+y argument ([+-]?\d*n|)
@@ -4170,7 +4203,7 @@
return match;
},
- "PSEUDO": function( match, context, xml ) {
+ "PSEUDO": function( match ) {
var unquoted, excess;
if ( matchExpr["CHILD"].test( match[0] ) ) {
return null;
@@ -4182,7 +4215,7 @@
// Only check arguments that contain a pseudo
if ( rpseudo.test(unquoted) &&
// Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, context, xml, true )) &&
+ (excess = tokenize( unquoted, true )) &&
// advance to the next closing parenthesis
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
@@ -4236,76 +4269,55 @@
},
"ATTR": function( name, operator, check ) {
- if ( !operator ) {
- return function( elem ) {
- return Sizzle.attr( elem, name ) != null;
- };
- }
+ return function( elem, context ) {
+ var result = Sizzle.attr( elem, name );
- return function( elem ) {
- var result = Sizzle.attr( elem, name ),
- value = result + "";
-
if ( result == null ) {
return operator === "!=";
}
+ if ( !operator ) {
+ return true;
+ }
- switch ( operator ) {
- case "=":
- return value === check;
- case "!=":
- return value !== check;
- case "^=":
- return check && value.indexOf( check ) === 0;
- case "*=":
- return check && value.indexOf( check ) > -1;
- case "$=":
- return check && value.substr( value.length - check.length ) === check;
- case "~=":
- return ( " " + value + " " ).indexOf( check ) > -1;
- case "|=":
- return value === check || value.substr( 0, check.length + 1 ) === check + "-";
- }
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.substr( result.length - check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
+ false;
};
},
"CHILD": function( type, argument, first, last ) {
if ( type === "nth" ) {
- var doneName = done++;
-
return function( elem ) {
- var parent, diff,
- count = 0,
- node = elem;
+ var node, diff,
+ parent = elem.parentNode;
if ( first === 1 && last === 0 ) {
return true;
}
- parent = elem.parentNode;
-
- if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) {
+ if ( parent ) {
+ diff = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
- node.sizset = ++count;
- if ( node === elem ) {
+ diff++;
+ if ( elem === node ) {
break;
}
}
}
-
- parent[ expando ] = doneName;
}
- diff = elem.sizset - last;
-
- if ( first === 0 ) {
- return diff === 0;
-
- } else {
- return ( diff % first === 0 && diff / first >= 0 );
- }
+ // Incorporate the offset (or cast to NaN), then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
};
}
@@ -4340,45 +4352,85 @@
};
},
- "PSEUDO": function( pseudo, argument, context, xml ) {
+ "PSEUDO": function( pseudo, argument ) {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
var args,
- fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ];
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
- if ( !fn ) {
- Sizzle.error( "unsupported pseudo: " + pseudo );
- }
-
// The user may use createPseudo to indicate that
// arguments are needed to create the filter function
// just as Sizzle does
- if ( !fn[ expando ] ) {
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return function( elem ) {
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
return fn( elem, 0, args );
};
- }
- return fn;
}
- return fn( argument, context, xml );
+ return fn;
}
},
pseudos: {
- "not": markFunction(function( selector, context, xml ) {
+ "not": markFunction(function( selector ) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
- var matcher = compile( selector.replace( rtrim, "$1" ), context, xml );
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
return function( elem ) {
- return !matcher( elem );
+ return Sizzle( selector, elem ).length > 0;
};
}),
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
"enabled": function( elem ) {
return elem.disabled === false;
},
@@ -4425,18 +4477,6 @@
return true;
},
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
"header": function( elem ) {
return rheader.test( elem.nodeName );
},
@@ -4476,51 +4516,48 @@
"active": function( elem ) {
return elem === elem.ownerDocument.activeElement;
- }
- },
-
- setFilters: {
- "first": function( elements, argument, not ) {
- return not ? elements.slice( 1 ) : [ elements[0] ];
},
- "last": function( elements, argument, not ) {
- var elem = elements.pop();
- return not ? elements : [ elem ];
- },
+ // Positional types
+ "first": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ 0 ];
+ }),
- "even": function( elements, argument, not ) {
- var results = [],
- i = not ? 1 : 0,
- len = elements.length;
- for ( ; i < len; i = i + 2 ) {
- results.push( elements[i] );
+ "last": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = 0; i < length; i += 2 ) {
+ matchIndexes.push( i );
}
- return results;
- },
+ return matchIndexes;
+ }),
- "odd": function( elements, argument, not ) {
- var results = [],
- i = not ? 0 : 1,
- len = elements.length;
- for ( ; i < len; i = i + 2 ) {
- results.push( elements[i] );
+ "odd": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = 1; i < length; i += 2 ) {
+ matchIndexes.push( i );
}
- return results;
- },
+ return matchIndexes;
+ }),
- "lt": function( elements, argument, not ) {
- return not ? elements.slice( +argument ) : elements.slice( 0, +argument );
- },
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
- "gt": function( elements, argument, not ) {
- return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 );
- },
-
- "eq": function( elements, argument, not ) {
- var elem = elements.splice( +argument, 1 );
- return not ? elements : elem;
- }
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
}
};
@@ -4642,24 +4679,17 @@
throw new Error( "Syntax error, unrecognized expression: " + msg );
};
-function tokenize( selector, context, xml, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, group, i,
- preFilters, filters,
- checkContext = !xml && context !== document,
- // Token cache should maintain spaces
- key = ( checkContext ? "<s>" : "" ) + selector.replace( rtrim, "$1<s>" ),
- cached = tokenCache[ expando ][ key ];
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type, soFar, groups, preFilters,
+ cached = tokenCache[ expando ][ selector ];
if ( cached ) {
- return parseOnly ? 0 : slice.call( cached, 0 );
+ return parseOnly ? 0 : cached.slice( 0 );
}
soFar = selector;
groups = [];
- i = 0;
preFilters = Expr.preFilter;
- filters = Expr.filter;
while ( soFar ) {
@@ -4667,45 +4697,31 @@
if ( !matched || (match = rcomma.exec( soFar )) ) {
if ( match ) {
soFar = soFar.slice( match[0].length );
- tokens.selector = group;
}
groups.push( tokens = [] );
- group = "";
-
- // Need to make sure we're within a narrower context if necessary
- // Adding a descendant combinator will generate what is needed
- if ( checkContext ) {
- soFar = " " + soFar;
- }
}
matched = false;
// Combinators
if ( (match = rcombinators.exec( soFar )) ) {
- group += match[0];
- soFar = soFar.slice( match[0].length );
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
// Cast descendant combinators to space
- matched = tokens.push({
- part: match.pop().replace( rtrim, " " ),
- string: match[0],
- captures: match
- });
+ matched.type = match[0].replace( rtrim, " " );
}
// Filters
- for ( type in filters ) {
+ for ( type in Expr.filter ) {
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- ( match = preFilters[ type ](match, context, xml) )) ) {
+ // The last two arguments here are (context, xml) for backCompat
+ (match = preFilters[ type ]( match, document, true ))) ) {
- group += match[0];
- soFar = soFar.slice( match[0].length );
- matched = tokens.push({
- part: type,
- string: match.shift(),
- captures: match
- });
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
+ matched.type = type;
+ matched.matches = match;
}
}
@@ -4714,11 +4730,6 @@
}
}
- // Attach the full group as a selector
- if ( group ) {
- tokens.selector = group;
- }
-
// Return the length of the invalid excess
// if we're just parsing
// Otherwise, throw an error or return tokens
@@ -4727,43 +4738,33 @@
soFar ?
Sizzle.error( selector ) :
// Cache the tokens
- slice.call( tokenCache(key, groups), 0 );
+ tokenCache( selector, groups ).slice( 0 );
}
-function addCombinator( matcher, combinator, context, xml ) {
+function addCombinator( matcher, combinator, base ) {
var dir = combinator.dir,
+ checkNonElements = base && combinator.dir === "parentNode",
doneName = done++;
- if ( !matcher ) {
- // If there is no matcher to check, check against the context
- matcher = function( elem ) {
- return elem === context;
- };
- }
return combinator.first ?
- function( elem ) {
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 ) {
- return matcher( elem ) && elem;
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ return matcher( elem, context, xml );
}
}
} :
- xml ?
- function( elem ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 ) {
- if ( matcher( elem ) ) {
- return elem;
- }
- }
- }
- } :
- function( elem ) {
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( !xml ) {
var cache,
- dirkey = doneName + "." + dirruns,
- cachedkey = dirkey + "." + cachedruns;
+ dirkey = dirruns + " " + doneName + " ",
+ cachedkey = dirkey + cachedruns;
while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
if ( (cache = elem[ expando ]) === cachedkey ) {
return elem.sizset;
} else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
@@ -4772,7 +4773,7 @@
}
} else {
elem[ expando ] = cachedkey;
- if ( matcher( elem ) ) {
+ if ( matcher( elem, context, xml ) ) {
elem.sizset = true;
return elem;
}
@@ -4780,254 +4781,382 @@
}
}
}
- };
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ if ( matcher( elem, context, xml ) ) {
+ return elem;
+ }
+ }
+ }
+ }
+ };
}
-function addMatcher( higher, deeper ) {
- return higher ?
- function( elem ) {
- var result = deeper( elem );
- return result && higher( result === true ? elem : result );
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
} :
- deeper;
+ matchers[0];
}
-// ["TAG", ">", "ID", " ", "CLASS"]
-function matcherFromTokens( tokens, context, xml ) {
- var token, matcher,
- i = 0;
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
- for ( ; (token = tokens[i]); i++ ) {
- if ( Expr.relative[ token.part ] ) {
- matcher = addCombinator( matcher, Expr.relative[ token.part ], context, xml );
- } else {
- matcher = addMatcher( matcher, Expr.filter[ token.part ].apply(null, token.captures.concat( context, xml )) );
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
}
}
- return matcher;
+ return newUnmatched;
}
-function matcherFromGroupMatchers( matchers ) {
- return function( elem ) {
- var matcher,
- j = 0;
- for ( ; (matcher = matchers[j]); j++ ) {
- if ( matcher(elem) ) {
- return true;
- }
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ // Positional selectors apply to seed elements, so it is invalid to follow them ...
[truncated message content] |
|
From: <na...@us...> - 2012-11-04 19:40:50
|
Revision: 703
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=703&view=rev
Author: namiltd
Date: 2012-11-04 19:40:42 +0000 (Sun, 04 Nov 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/data/distros.ini
branches/namiltd-ini/includes/os/class.Linux.inc.php
Added Paths:
-----------
branches/namiltd-ini/gfx/images/elementaryOS.png
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-09-21 16:52:32 UTC (rev 702)
+++ branches/namiltd-ini/ChangeLog 2012-11-04 19:40:42 UTC (rev 703)
@@ -2,14 +2,14 @@
phpSysInfo 3.1.0
- - [ADD] Turbolinux, Oracle Linux and PCLinuxOS to detected distros
+ - [ADD] Turbolinux, Oracle Linux, PCLinuxOS and elementary OS to detected distros
- [ADD] Show System Language and Code Page on Linux and WINNT
- [ADD] Minor support of ReactOS
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
- [UPD] Plugin ipmi ranamed to IPMIInfo and Update-Notifier to UpdateNotifier (to avoid name conflicts)
- [UPD] Case-insensitive for most of parameters
- - [UPD] Updated jQuery plugin to 1.8.2
+ - [UPD] Updated jQuery plugin to 1.8.1
- [UPD] Updated jQuery plugin nyroModal to 1.6.2+jquery1.8fix
- [FIX] Fixed Bug [ 3561124 ] Incorrect reading of free mem on Mac OS X (thanks to pbobbenb)
Modified: branches/namiltd-ini/data/distros.ini
===================================================================
--- branches/namiltd-ini/data/distros.ini 2012-09-21 16:52:32 UTC (rev 702)
+++ branches/namiltd-ini/data/distros.ini 2012-11-04 19:40:42 UTC (rev 703)
@@ -3,15 +3,6 @@
; $Id$
;
-[Debian]
-Name = "Debian"
-Image = "Debian.png"
-Files = "/etc/debian_release;/etc/debian_version"
-
-[SUSE LINUX]
-Image = "Suse.png"
-Files = "/etc/SuSE-release;/etc/UnitedLinux-release"
-
[Gentoo]
Image = "Gentoo.png"
Files = "/etc/gentoo-release"
@@ -56,6 +47,10 @@
Image = "Ubuntu.png"
;detected in "/etc/lsb-release"
+[elementary OS]
+Image = "elementaryOS.png"
+;detected in "/etc/lsb-release"
+
[PLD]
Image = "PLD.png"
Files = "/etc/pld-release"
@@ -162,6 +157,16 @@
Image = "PCLinuxOS.png"
Files = "/etc/pclinuxos-release"
+[SUSE LINUX]
+Image = "Suse.png"
+Files = "/etc/SuSE-release;/etc/UnitedLinux-release"
+
+[Debian]
+Name = "Debian"
+Image = "Debian.png"
+Files = "/etc/debian_release"
+;detected in "/etc/debian_version"
+
; at the end because some distros may also have the same files (like PCLinuxOS etc)
[MandrivaLinux]
Image = "Mandrake.png"
Added: branches/namiltd-ini/gfx/images/elementaryOS.png
===================================================================
(Binary files differ)
Property changes on: branches/namiltd-ini/gfx/images/elementaryOS.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified: branches/namiltd-ini/includes/os/class.Linux.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-09-21 16:52:32 UTC (rev 702)
+++ branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-11-04 19:40:42 UTC (rev 703)
@@ -551,29 +551,29 @@
/* default error handler */
if (function_exists('errorHandlerPsi')) {
restore_error_handler();
- }
+ }
/* fatal errors only */
$old_err_rep = error_reporting();
error_reporting(E_ERROR);
-
- // Fall back in case 'lsb_release' does not exist and file 'lsb-release' and 'DISTRO_SPECS' does not exist
+
+ // Fall back in case 'lsb_release' does not exist
foreach ($list as $section=>$distribution) {
- if (!isset($distribution["Files"])) {
+ if (!isset($distribution['Files'])) {
continue;
} else {
- foreach (preg_split("/;/", $distribution["Files"], -1, PREG_SPLIT_NO_EMPTY) as $filename) {
+ foreach (preg_split("/;/", $distribution['Files'], -1, PREG_SPLIT_NO_EMPTY) as $filename) {
if (file_exists($filename)) {
if (!CommonFunctions::rfts($filename, $buf, 1, 4096, false)) {
$buf = "";
}
- if (isset($distribution["Image"])) {
- $this->sys->setDistributionIcon($distribution["Image"]);
+ if (isset($distribution['Image'])) {
+ $this->sys->setDistributionIcon($distribution['Image']);
}
- if (isset($distribution["Name"])) {
- if (($distribution["Name"] == 'Synology') || is_null($buf) || (trim($buf) == "")) {
- $this->sys->setDistribution($distribution["Name"]);
+ if (isset($distribution['Name'])) {
+ if (($distribution['Name'] == 'Synology') || is_null($buf) || (trim($buf) == "")) {
+ $this->sys->setDistribution($distribution['Name']);
} else {
- $this->sys->setDistribution($distribution["Name"]." ".trim($buf));
+ $this->sys->setDistribution($distribution['Name']." ".trim($buf));
}
} else {
if ( is_null($buf) || (trim($buf) == "") ) {
@@ -591,8 +591,8 @@
if ($this->sys->getDistribution() == "Linux") {
if ( file_exists($filename="/etc/lsb-release")
&& CommonFunctions::rfts($filename, $buf, 0, 4096, false)
- && preg_match('/^DISTRIB_ID=(.*)/m', $buf, $id_buf) ) {
- if (preg_match('/^DISTRIB_DESCRIPTION="(.*)"/m', $buf, $desc_buf)) {
+ && preg_match('/^DISTRIB_ID="?([^"\n]*)"?/m', $buf, $id_buf) ) {
+ if (preg_match('/^DISTRIB_DESCRIPTION="?([^"\n]*)"?/m', $buf, $desc_buf)) {
$this->sys->setDistribution(trim($desc_buf[1]));
} else {
if (isset($list[trim($id_buf[1])]['Name'])) {
@@ -600,7 +600,7 @@
} else {
$dist = trim($id_buf[1]);
}
- if (preg_match('/^DISTRIB_RELEASE=(.*)/m', $buf, $vers_buf)) {
+ if (preg_match('/^DISTRIB_RELEASE="?([^"\n]*)"?/m', $buf, $vers_buf)) {
$this->sys->setDistribution(trim($dist." ".trim($vers_buf[1])));
} else {
$this->sys->setDistribution($dist);
@@ -609,7 +609,7 @@
if (isset($list[trim($id_buf[1])]['Image'])) {
$this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
}
- } else
+ } else
if ( file_exists($filename="/etc/DISTRO_SPECS")
&& CommonFunctions::rfts($filename, $buf, 0, 4096, false)
&& preg_match('/^DISTRO_NAME=\'(.*)\'/m', $buf, $id_buf) ) {
@@ -626,21 +626,23 @@
if (isset($list[trim($id_buf[1])]['Image'])) {
$this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
} else {
- if (isset($list['Puppy']["Image"])) {
- $this->sys->setDistributionIcon($list['Puppy']["Image"]);
+ if (isset($list['Puppy']['Image'])) {
+ $this->sys->setDistributionIcon($list['Puppy']['Image']);
}
}
} else
- if ( file_exists($filename="/etc/redhat-release")
- && CommonFunctions::rfts($filename, $buf, 1, 4096, false) ){
- if ( (is_null($buf)) || (trim($buf) == "") ) {
+ if (file_exists($filename="/etc/redhat-release")) {
+ if (!CommonFunctions::rfts($filename, $buf, 1, 4096, false)) {
+ $buf = "";
+ }
+ if ( is_null($buf) || (trim($buf) == "") ) {
if (isset($list['RedHat']['Name'])) {
$this->sys->setDistribution(trim($list['RedHat']['Name']));
} else {
$this->sys->setDistribution('RedHat');
}
- if (isset($list['RedHat']["Image"])) {
- $this->sys->setDistributionIcon($list['RedHat']["Image"]);
+ if (isset($list['RedHat']['Image'])) {
+ $this->sys->setDistributionIcon($list['RedHat']['Image']);
}
} else {
$this->sys->setDistribution(trim($buf));
@@ -648,23 +650,34 @@
&& isset($list[trim($id_buf[1])]['Image'])) {
$this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
} else {
- if (isset($list['RedHat']["Image"])) {
- $this->sys->setDistributionIcon($list['RedHat']["Image"]);
+ if (isset($list['RedHat']['Image'])) {
+ $this->sys->setDistributionIcon($list['RedHat']['Image']);
}
- }
+ }
}
+ } else
+ if (file_exists($filename="/etc/debian_version")){
+ if (!CommonFunctions::rfts($filename, $buf, 1, 4096, false)) {
+ $buf = "";
+ }
+ if (isset($list['Debian']['Image'])) {
+ $this->sys->setDistributionIcon($list['Debian']['Image']);
+ }
+ if (isset($list['Debian']['Name'])) {
+ if ( is_null($buf) || (trim($buf) == "")) {
+ $this->sys->setDistribution($list['Debian']['Name']);
+ } else {
+ $this->sys->setDistribution($list['Debian']['Name']." ".trim($buf));
+ }
+ } else {
+ if ( is_null($buf) || (trim($buf) == "") ) {
+ $this->sys->setDistribution('Debian');
+ } else {
+ $this->sys->setDistribution(trim($buf));
+ }
+ }
}
}
- /*if ($this->sys->getDistribution() == "Linux") {
- if (file_exists($filename="/etc/issue")) {
- if (CommonFunctions::rfts($filename, $buf, 1, 4096, false)
- && (!is_null($buf))
- && ($buf != "")) {
- $this->sys->setDistribution($buf);
- }
- }
-
- }*/
/* restore error level */
error_reporting($old_err_rep);
/* restore error handler */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-11-18 19:29:23
|
Revision: 706
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=706&view=rev
Author: namiltd
Date: 2012-11-18 19:29:16 +0000 (Sun, 18 Nov 2012)
Log Message:
-----------
Updated jQuery plugin to 1.8.3
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/js/jQuery/README
branches/namiltd-ini/js/jQuery/jquery.js
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-11-11 00:33:29 UTC (rev 705)
+++ branches/namiltd-ini/ChangeLog 2012-11-18 19:29:16 UTC (rev 706)
@@ -9,7 +9,7 @@
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
- [UPD] Plugin ipmi ranamed to IPMIInfo and Update-Notifier to UpdateNotifier (to avoid name conflicts)
- [UPD] Case-insensitive for most of parameters
- - [UPD] Updated jQuery plugin to 1.8.2
+ - [UPD] Updated jQuery plugin to 1.8.3
- [UPD] Updated jQuery plugin nyroModal to 1.6.2+jquery1.8fix
- [FIX] Fixed Bug [ 3561124 ] Incorrect reading of free mem on Mac OS X (thanks to pbobbenb)
Modified: branches/namiltd-ini/js/jQuery/README
===================================================================
--- branches/namiltd-ini/js/jQuery/README 2012-11-11 00:33:29 UTC (rev 705)
+++ branches/namiltd-ini/js/jQuery/README 2012-11-18 19:29:16 UTC (rev 706)
@@ -3,7 +3,7 @@
jquery.js
---------
-VERSION : 1.8.2
+VERSION : 1.8.3
URL : http://jquery.com/
DESC : jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle
events, perform animations, and add Ajax interactions to your web pages.
Modified: branches/namiltd-ini/js/jQuery/jquery.js
===================================================================
--- branches/namiltd-ini/js/jQuery/jquery.js 2012-11-11 00:33:29 UTC (rev 705)
+++ branches/namiltd-ini/js/jQuery/jquery.js 2012-11-18 19:29:16 UTC (rev 706)
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.8.2
+ * jQuery JavaScript Library v1.8.3
* http://jquery.com/
*
* Includes Sizzle.js
@@ -9,7 +9,7 @@
* Released under the MIT license
* http://jquery.org/license
*
- * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
*/
(function( window, undefined ) {
var
@@ -186,7 +186,7 @@
selector: "",
// The current version of jQuery being used
- jquery: "1.8.2",
+ jquery: "1.8.3",
// The default length of a jQuery object is 0
length: 0,
@@ -999,8 +999,10 @@
(function add( args ) {
jQuery.each( args, function( _, arg ) {
var type = jQuery.type( arg );
- if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) {
- list.push( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
} else if ( arg && arg.length && type !== "string" ) {
// Inspect recursively
add( arg );
@@ -1253,24 +1255,23 @@
clickFn,
div = document.createElement("div");
- // Preliminary tests
+ // Setup
div.setAttribute( "className", "t" );
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+ // Support tests won't run in some limited or non-browser environments
all = div.getElementsByTagName("*");
a = div.getElementsByTagName("a")[ 0 ];
- a.style.cssText = "top:1px;float:left;opacity:.5";
-
- // Can't get basic test support
- if ( !all || !all.length ) {
+ if ( !all || !a || !all.length ) {
return {};
}
- // First batch of supports tests
+ // First batch of tests
select = document.createElement("select");
opt = select.appendChild( document.createElement("option") );
input = div.getElementsByTagName("input")[ 0 ];
+ a.style.cssText = "top:1px;float:left;opacity:.5";
support = {
// IE strips leading whitespace when .innerHTML is used
leadingWhitespace: ( div.firstChild.nodeType === 3 ),
@@ -1312,7 +1313,7 @@
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
getSetAttribute: div.className !== "t",
- // Tests for enctype support on a form(#6743)
+ // Tests for enctype support on a form (#6743)
enctype: !!document.createElement("form").enctype,
// Makes sure cloning an html5 element does not cause problems
@@ -2217,26 +2218,25 @@
},
select: {
get: function( elem ) {
- var value, i, max, option,
+ var value, option,
+ options = elem.options,
index = elem.selectedIndex,
- values = [],
- options = elem.options,
- one = elem.type === "select-one";
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
- // Nothing was selected
- if ( index < 0 ) {
- return null;
- }
-
// Loop through all the selected options
- i = one ? index : 0;
- max = one ? index + 1 : options.length;
for ( ; i < max; i++ ) {
option = options[ i ];
- // Don't return options that are disabled or in a disabled optgroup
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
// Get the specific value for the option
value = jQuery( option ).val();
@@ -2251,11 +2251,6 @@
}
}
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
- if ( one && !values.length && options.length ) {
- return jQuery( options[ index ] ).val();
- }
-
return values;
},
@@ -3233,7 +3228,7 @@
if ( elem.detachEvent ) {
- // #8545, #7054, preventing memory leaks for custom events in IE6-8 –
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
// detachEvent needed property on element, by name of that event, to properly expose it to GC
if ( typeof elem[ name ] === "undefined" ) {
elem[ name ] = null;
@@ -3725,7 +3720,8 @@
delete cache[ keys.shift() ];
}
- return (cache[ key ] = value);
+ // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157)
+ return (cache[ key + " " ] = value);
}, cache );
},
@@ -4259,13 +4255,13 @@
},
"CLASS": function( className ) {
- var pattern = classCache[ expando ][ className ];
- if ( !pattern ) {
- pattern = classCache( className, new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)") );
- }
- return function( elem ) {
- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
- };
+ var pattern = classCache[ expando ][ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
+ });
},
"ATTR": function( name, operator, check ) {
@@ -4511,7 +4507,7 @@
"focus": function( elem ) {
var doc = elem.ownerDocument;
- return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href);
+ return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},
"active": function( elem ) {
@@ -4519,11 +4515,11 @@
},
// Positional types
- "first": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ "first": createPositionalPseudo(function() {
return [ 0 ];
}),
- "last": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
return [ length - 1 ];
}),
@@ -4531,14 +4527,14 @@
return [ argument < 0 ? argument + length : argument ];
}),
- "even": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
for ( var i = 0; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
- "odd": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
for ( var i = 1; i < length; i += 2 ) {
matchIndexes.push( i );
}
@@ -4659,7 +4655,9 @@
// Document sorting and removing duplicates
Sizzle.uniqueSort = function( results ) {
var elem,
- i = 1;
+ duplicates = [],
+ i = 1,
+ j = 0;
hasDuplicate = baseHasDuplicate;
results.sort( sortOrder );
@@ -4667,9 +4665,12 @@
if ( hasDuplicate ) {
for ( ; (elem = results[i]); i++ ) {
if ( elem === results[ i - 1 ] ) {
- results.splice( i--, 1 );
+ j = duplicates.push( i );
}
}
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
}
return results;
@@ -4680,8 +4681,9 @@
};
function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type, soFar, groups, preFilters,
- cached = tokenCache[ expando ][ selector ];
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ expando ][ selector + " " ];
if ( cached ) {
return parseOnly ? 0 : cached.slice( 0 );
@@ -4696,7 +4698,8 @@
// Comma and first run
if ( !matched || (match = rcomma.exec( soFar )) ) {
if ( match ) {
- soFar = soFar.slice( match[0].length );
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
}
groups.push( tokens = [] );
}
@@ -4715,8 +4718,7 @@
// Filters
for ( type in Expr.filter ) {
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- // The last two arguments here are (context, xml) for backCompat
- (match = preFilters[ type ]( match, document, true ))) ) {
+ (match = preFilters[ type ]( match ))) ) {
tokens.push( matched = new Token( match.shift() ) );
soFar = soFar.slice( matched.length );
@@ -4836,18 +4838,13 @@
postFinder = setMatcher( postFinder, postSelector );
}
return markFunction(function( seed, results, context, xml ) {
- // Positional selectors apply to seed elements, so it is invalid to follow them with relative ones
- if ( seed && postFinder ) {
- return;
- }
-
- var i, elem, postFilterIn,
+ var temp, i, elem,
preMap = [],
postMap = [],
preexisting = results.length,
// Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [], seed ),
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
// Prefilter to get matcher input, preserving a map for seed-results synchronization
matcherIn = preFilter && ( seed || !selector ) ?
@@ -4872,27 +4869,45 @@
// Apply postFilter
if ( postFilter ) {
- postFilterIn = condense( matcherOut, postMap );
- postFilter( postFilterIn, [], context, xml );
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
// Un-match failing elements by moving them back to matcherIn
- i = postFilterIn.length;
+ i = temp.length;
while ( i-- ) {
- if ( (elem = postFilterIn[i]) ) {
+ if ( (elem = temp[i]) ) {
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
}
}
}
- // Keep seed and results synchronized
if ( seed ) {
- // Ignore postFinder because it can't coexist with seed
- i = preFilter && matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- seed[ preMap[i] ] = !(results[ preMap[i] ] = elem);
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
}
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
}
+
+ // Add elements to results, through postFinder if defined
} else {
matcherOut = condense(
matcherOut === results ?
@@ -4933,7 +4948,6 @@
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
} else {
- // The concatenated values are (context, xml) for backCompat
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
// Return special upon seeing a positional matcher
@@ -5062,7 +5076,7 @@
var i,
setMatchers = [],
elementMatchers = [],
- cached = compilerCache[ expando ][ selector ];
+ cached = compilerCache[ expando ][ selector + " " ];
if ( !cached ) {
// Generate a function of recursive functions that can be used to check each element
@@ -5085,11 +5099,11 @@
return cached;
};
-function multipleContexts( selector, contexts, results, seed ) {
+function multipleContexts( selector, contexts, results ) {
var i = 0,
len = contexts.length;
for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results, seed );
+ Sizzle( selector, contexts[i], results );
}
return results;
}
@@ -5167,15 +5181,14 @@
rescape = /'|\\/g,
rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
- // qSa(:focus) reports false when true (Chrome 21),
+ // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA
// A support test would require too much code (would include document ready)
- rbuggyQSA = [":focus"],
+ rbuggyQSA = [ ":focus" ],
- // matchesSelector(:focus) reports false when true (Chrome 21),
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
// A support test would require too much code (would include document ready)
// just skip matchesSelector for :active
- rbuggyMatches = [ ":active", ":focus" ],
+ rbuggyMatches = [ ":active" ],
matches = docElem.matchesSelector ||
docElem.mozMatchesSelector ||
docElem.webkitMatchesSelector ||
@@ -5229,7 +5242,7 @@
// Only use querySelectorAll when not filtering,
// when this is not xml,
// and when no QSA bugs apply
- if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {
var groups, i,
old = true,
nid = expando,
@@ -5298,7 +5311,7 @@
expr = expr.replace( rattributeQuotes, "='$1']" );
// rbuggyMatches always contains :active, so no need for an existence check
- if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) {
+ if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) {
try {
var ret = matches.call( elem, expr );
@@ -6533,7 +6546,7 @@
rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
- elemdisplay = {},
+ elemdisplay = { BODY: "block" },
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssNormalTransform = {
@@ -6814,7 +6827,9 @@
if ( computed ) {
- ret = computed[ name ];
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
ret = jQuery.style( elem, name );
}
@@ -7843,9 +7858,12 @@
// A cross-domain request is in order when we have a protocol:host:port mismatch
if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() ) || false;
- s.crossDomain = parts && ( parts.join(":") + ( parts[ 3 ] ? "" : parts[ 1 ] === "http:" ? 80 : 443 ) ) !==
- ( ajaxLocParts.join(":") + ( ajaxLocParts[ 3 ] ? "" : ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) );
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ );
}
// Convert data if not already a string
@@ -8464,7 +8482,7 @@
// on any attempt to access responseText (#11426)
try {
responses.text = xhr.responseText;
- } catch( _ ) {
+ } catch( e ) {
}
// Firefox throws an exception when accessing
@@ -8617,7 +8635,9 @@
tick = function() {
var currentTime = fxNow || createFxNow(),
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- percent = 1 - ( remaining / animation.duration || 0 ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
index = 0,
length = animation.tweens.length;
@@ -8769,7 +8789,7 @@
});
function defaultPrefilter( elem, props, opts ) {
- var index, prop, value, length, dataShow, tween, hooks, oldfire,
+ var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
anim = this,
style = elem.style,
orig = {},
@@ -8843,6 +8863,7 @@
value = props[ index ];
if ( rfxtypes.exec( value ) ) {
delete props[ index ];
+ toggle = toggle || value === "toggle";
if ( value === ( hidden ? "hide" : "show" ) ) {
continue;
}
@@ -8853,6 +8874,14 @@
length = handled.length;
if ( length ) {
dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+
+ // store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
if ( hidden ) {
jQuery( elem ).show();
} else {
@@ -9149,6 +9178,8 @@
timers = jQuery.timers,
i = 0;
+ fxNow = jQuery.now();
+
for ( ; i < timers.length; i++ ) {
timer = timers[ i ];
// Checks the timer has not already been removed
@@ -9160,6 +9191,7 @@
if ( !timers.length ) {
jQuery.fx.stop();
}
+ fxNow = undefined;
};
jQuery.fx.timer = function( timer ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-11-28 10:20:56
|
Revision: 707
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=707&view=rev
Author: namiltd
Date: 2012-11-28 10:20:49 +0000 (Wed, 28 Nov 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/plugins/smart/class.smart.inc.php
branches/namiltd-ini/plugins/smart/js/smart.js
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-11-18 19:29:16 UTC (rev 706)
+++ branches/namiltd-ini/ChangeLog 2012-11-28 10:20:49 UTC (rev 707)
@@ -14,6 +14,7 @@
- [FIX] Fixed Bug [ 3561124 ] Incorrect reading of free mem on Mac OS X (thanks to pbobbenb)
- [FIX] Fixed UTF8 encoding for Linux
+ - [FIX] SMART plugin doesn't display for some results
phpSysInfo 3.0.19
Modified: branches/namiltd-ini/plugins/smart/class.smart.inc.php
===================================================================
--- branches/namiltd-ini/plugins/smart/class.smart.inc.php 2012-11-18 19:29:16 UTC (rev 706)
+++ branches/namiltd-ini/plugins/smart/class.smart.inc.php 2012-11-28 10:20:49 UTC (rev 707)
@@ -138,8 +138,8 @@
if ( preg_match('/(Vendor Specific SMART Attributes with Thresholds)/', $result, $matches, PREG_OFFSET_CAPTURE) )
$startIndex = $matches[0][1];
- // locate the end string offset for the attributes, this is usually right before string "SMART Error Log Version" (hopefully every output has it!)
- if ( preg_match('/(SMART Error Log Version)/', $result, $matches, PREG_OFFSET_CAPTURE) )
+ // locate the end string offset for the attributes, this is usually right before string "SMART Error Log Version" or "SMART Error Log not supported" (hopefully every output has it!)
+ if ( preg_match('/(SMART Error Log Version)|(SMART Error Log not supported)/', $result, $matches, PREG_OFFSET_CAPTURE) )
$endIndex = $matches[0][1];
if (($startIndex)&&($endIndex)&&($endIndex>$startIndex))
Modified: branches/namiltd-ini/plugins/smart/js/smart.js
===================================================================
--- branches/namiltd-ini/plugins/smart/js/smart.js 2012-11-18 19:29:16 UTC (rev 706)
+++ branches/namiltd-ini/plugins/smart/js/smart.js 2012-11-28 10:20:49 UTC (rev 707)
@@ -93,9 +93,10 @@
$("Plugins Plugin_SMART columns column", xml).each(function smart_find_columns() {
i = parseInt($(this).attr("id"), 10);
if (typeof(values[i])==='undefined') {
- values[i] = "";
+// values[i] = "";
+ display.push("<span style=\"display:none;\"></span>");
}
- if (i === 194) {
+ else if (i === 194) {
display.push("<span style=\"display:none;\">" + values[i] + "</span>" + formatTemp(values[i], xml));
}
else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-12-05 11:20:52
|
Revision: 709
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=709&view=rev
Author: namiltd
Date: 2012-12-05 11:20:40 +0000 (Wed, 05 Dec 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/data/distros.ini
branches/namiltd-ini/includes/os/class.Linux.inc.php
Added Paths:
-----------
branches/namiltd-ini/gfx/images/StartOS.png
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-11-28 18:37:58 UTC (rev 708)
+++ branches/namiltd-ini/ChangeLog 2012-12-05 11:20:40 UTC (rev 709)
@@ -2,7 +2,7 @@
phpSysInfo 3.1.0
- - [ADD] Turbolinux, Oracle Linux, PCLinuxOS and elementary OS to detected distros
+ - [ADD] Turbolinux, Oracle Linux, PCLinuxOS, StartOS and elementary OS to detected distros
- [ADD] Show System Language and Code Page on Linux and WINNT
- [ADD] Minor support of ReactOS
Modified: branches/namiltd-ini/data/distros.ini
===================================================================
--- branches/namiltd-ini/data/distros.ini 2012-11-28 18:37:58 UTC (rev 708)
+++ branches/namiltd-ini/data/distros.ini 2012-12-05 11:20:40 UTC (rev 709)
@@ -143,6 +143,10 @@
Image = "Turbo.png"
Files = "/etc/turbolinux-release"
+[StartOS]
+Image = "StartOS.png"
+Files = "/etc/startos-release"
+
[Oracle]
Image = "Oracle.png"
Files = "/etc/oracle-release"
Added: branches/namiltd-ini/gfx/images/StartOS.png
===================================================================
(Binary files differ)
Property changes on: branches/namiltd-ini/gfx/images/StartOS.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified: branches/namiltd-ini/includes/os/class.Linux.inc.php
===================================================================
--- branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-11-28 18:37:58 UTC (rev 708)
+++ branches/namiltd-ini/includes/os/class.Linux.inc.php 2012-12-05 11:20:40 UTC (rev 709)
@@ -541,12 +541,24 @@
$info_tmp = preg_split('/:/', $info, 2);
$distro[$info_tmp[0]] = trim($info_tmp[1]);
}
- if (isset($distro['Distributor ID']) && isset($list[$distro['Distributor ID']]['Image'])) {
- $this->sys->setDistributionIcon($list[$distro['Distributor ID']]['Image']);
+ if (!isset($distro['Distributor ID']) && !isset($distro['Description'])) {
+ if ( !is_null($distro_tmp[0]) && (trim($distro_tmp[0]) != "") ) {
+ $this->sys->setDistribution(trim($distro_tmp[0]));
+ if ( preg_match('/^(\S+)\s*/', $distro_tmp[0], $id_buf)
+ && isset($list[trim($id_buf[1])]['Image'])) {
+ $this->sys->setDistributionIcon($list[trim($id_buf[1])]['Image']);
+ }
+ }
+ } else {
+ if (isset($distro['Description'])) {
+ $this->sys->setDistribution($distro['Description']);
+ } else if (isset($distro['Distributor ID'])) {
+ $this->sys->setDistribution($distro['Distributor ID']);
+ }
+ if (isset($distro['Distributor ID']) && isset($list[$distro['Distributor ID']]['Image'])) {
+ $this->sys->setDistributionIcon($list[$distro['Distributor ID']]['Image']);
+ }
}
- if (isset($distro['Description'])) {
- $this->sys->setDistribution($distro['Description']);
- }
} else {
/* default error handler */
if (function_exists('errorHandlerPsi')) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <na...@us...> - 2012-12-08 19:09:01
|
Revision: 714
http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=714&view=rev
Author: namiltd
Date: 2012-12-08 19:08:54 +0000 (Sat, 08 Dec 2012)
Log Message:
-----------
Modified Paths:
--------------
branches/namiltd-ini/ChangeLog
branches/namiltd-ini/config.php
Modified: branches/namiltd-ini/ChangeLog
===================================================================
--- branches/namiltd-ini/ChangeLog 2012-12-05 16:26:07 UTC (rev 713)
+++ branches/namiltd-ini/ChangeLog 2012-12-08 19:08:54 UTC (rev 714)
@@ -3,7 +3,7 @@
phpSysInfo 3.1.0
- [ADD] Turbolinux, Oracle Linux, PCLinuxOS, StartOS and elementary OS to detected distros
- - [ADD] Show System Language and Code Page on Linux and WINNT
+ - [ADD] Show System Language and Code Page on Linux, Haiku and WINNT
- [ADD] Minor support of ReactOS
- [UPD] Configuration moved from config.php and subdirs of "plugins" to one file phpsysinfo.ini
Modified: branches/namiltd-ini/config.php
===================================================================
--- branches/namiltd-ini/config.php 2012-12-05 16:26:07 UTC (rev 713)
+++ branches/namiltd-ini/config.php 2012-12-08 19:08:54 UTC (rev 714)
@@ -58,7 +58,7 @@
|| preg_match('/^RC_(LANG="?[^"\n]*"?)/m', $contents, $matches))) {
if (@exec($matches[1].' locale -k LC_CTYPE 2>/dev/null', $lines)) {
foreach ($lines as $line) {
- if ($contents && preg_match('/^charmap="?([^"\n]*)/m', $line, $matches2)) {
+ if (preg_match('/^charmap="?([^"]*)/', $line, $matches2)) {
define('PSI_SYSTEM_CODEPAGE', $matches2[1]);
break;
}
@@ -66,7 +66,7 @@
}
if (@exec($matches[1].' locale 2>/dev/null', $lines)) {
foreach ($lines as $line) {
- if ($contents && preg_match('/^LC_MESSAGES="?([^\."@]*)/m', $line, $matches2)) {
+ if (preg_match('/^LC_MESSAGES="?([^\."@]*)/', $line, $matches2)) {
$lang = "";
if (is_readable(APP_ROOT.'/data/languages.ini') && ($langdata = @parse_ini_file(APP_ROOT.'/data/languages.ini', true))){
if (isset($langdata['Linux']['_'.$matches2[1]])) {
@@ -83,7 +83,31 @@
}
}
+ } else if (PHP_OS == 'Haiku'){
+ if (@exec('locale -m 2>/dev/null', $lines)) {
+ foreach ($lines as $line) {
+ if (preg_match('/^"?([^\."]*)\.?([^"]*)/', $line, $matches2)) {
+
+ if ( isset($matches2[2]) && !is_null($matches2[2]) && (trim($matches2[2]) != "") ){
+ define('PSI_SYSTEM_CODEPAGE', $matches2[2]);
+ }
+
+ $lang = "";
+ if (is_readable(APP_ROOT.'/data/languages.ini') && ($langdata = @parse_ini_file(APP_ROOT.'/data/languages.ini', true))){
+ if (isset($langdata['Linux']['_'.$matches2[1]])) {
+ $lang = $langdata['Linux']['_'.$matches2[1]];
+ }
+ }
+ if ($lang == ""){
+ $lang = 'Unknown';
+ }
+ define('PSI_SYSTEM_SYSLANG', $lang.' ('.$matches2[1].')');
+ break;
+ }
+ }
+ }
}
+
if (!defined('PSI_SYSTEM_SYSLANG')){
define('PSI_SYSTEM_SYSLANG', null);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|