mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Improve server environment display
This commit is contained in:
parent
954d2c7ec6
commit
4ee115e4f3
10 changed files with 186 additions and 210 deletions
|
|
@ -385,126 +385,6 @@ class adminAdminModel extends admin
|
|||
$this->add('list', $list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameter arrange for send to XE collect server
|
||||
* @param string $type 'WORKING', 'INSTALL'
|
||||
* @return string
|
||||
*/
|
||||
function getEnv($type = 'WORKING')
|
||||
{
|
||||
$skip = array(
|
||||
'ext' => array('pcre', 'json', 'hash', 'dom', 'session', 'spl', 'standard', 'date', 'ctype', 'tokenizer', 'apache2handler', 'filter', 'posix', 'reflection', 'pdo')
|
||||
, 'module' => array('addon', 'admin', 'autoinstall', 'comment', 'communication', 'counter', 'document', 'editor', 'file', 'importer', 'install', 'integration_search', 'layout', 'member', 'menu', 'message', 'module', 'opage', 'page', 'point', 'poll', 'rss', 'session', 'spamfilter', 'tag', 'trackback', 'trash', 'widget')
|
||||
, 'addon' => array('autolink', 'blogapi', 'captcha', 'counter', 'member_communication', 'member_extra_info', 'mobile', 'openid_delegation_id', 'point_level_icon', 'resize_image')
|
||||
, 'layout' => array('default')
|
||||
, 'widget' => array('content', 'language_select', 'login_info','mcontent')
|
||||
, 'widgetstyle' => array(),
|
||||
);
|
||||
$info = array();
|
||||
|
||||
$info['type'] = ($type != 'INSTALL' ? 'WORKING' : 'INSTALL');
|
||||
$info['location'] = _XE_LOCATION_;
|
||||
$info['package'] = _XE_PACKAGE_;
|
||||
$info['host'] = $db_type->default_url ? $db_type->default_url : getFullUrl();
|
||||
$info['app'] = $_SERVER['SERVER_SOFTWARE'];
|
||||
$info['xe_version'] = __XE_VERSION__;
|
||||
$info['php'] = phpversion();
|
||||
|
||||
$info['db_type'] = Context::getDBType();
|
||||
$info['use_rewrite'] = config('use_rewrite') ? 'Y' : 'N';
|
||||
$info['use_db_session'] = config('session.use_db') ? 'Y' : 'N';
|
||||
$info['use_ssl'] = config('url.ssl') ?: 'none';
|
||||
|
||||
$info['phpext'] = '';
|
||||
foreach(get_loaded_extensions() as $ext)
|
||||
{
|
||||
$ext = strtolower($ext);
|
||||
if(in_array($ext, $skip['ext']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['phpext'] .= '|' . $ext;
|
||||
}
|
||||
$info['phpext'] = substr($info['phpext'], 1);
|
||||
|
||||
$info['module'] = '';
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
if($module_list) foreach($module_list as $module)
|
||||
{
|
||||
if(in_array($module->module, $skip['module']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['module'] .= '|' . $module->module;
|
||||
}
|
||||
$info['module'] = substr($info['module'], 1);
|
||||
|
||||
$info['addon'] = '';
|
||||
$oAddonAdminModel = getAdminModel('addon');
|
||||
$addon_list = $oAddonAdminModel->getAddonList();
|
||||
if($addon_list) foreach($addon_list as $addon)
|
||||
{
|
||||
if(in_array($addon->addon, $skip['addon']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['addon'] .= '|' . $addon->addon;
|
||||
}
|
||||
$info['addon'] = substr($info['addon'], 1);
|
||||
|
||||
$info['layout'] = "";
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList();
|
||||
if($layout_list) foreach($layout_list as $layout)
|
||||
{
|
||||
if(in_array($layout->layout, $skip['layout']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['layout'] .= '|' . $layout->layout;
|
||||
}
|
||||
$info['layout'] = substr($info['layout'], 1);
|
||||
|
||||
$info['widget'] = "";
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widget_list = $oWidgetModel->getDownloadedWidgetList();
|
||||
if($widget_list) foreach($widget_list as $widget)
|
||||
{
|
||||
if(in_array($widget->widget, $skip['widget']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['widget'] .= '|' . $widget->widget;
|
||||
}
|
||||
$info['widget'] = substr($info['widget'], 1);
|
||||
|
||||
$info['widgetstyle'] = "";
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widgetstyle_list = $oWidgetModel->getDownloadedWidgetStyleList();
|
||||
if($widgetstyle_list) foreach($widgetstyle_list as $widgetstyle)
|
||||
{
|
||||
if(in_array($widgetstyle->widgetStyle, $skip['widgetstyle']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['widgetstyle'] .= '|' . $widgetstyle->widgetStyle;
|
||||
}
|
||||
$info['widgetstyle'] = substr($info['widgetstyle'], 1);
|
||||
|
||||
$param = '';
|
||||
foreach($info as $k => $v)
|
||||
{
|
||||
if($v)
|
||||
{
|
||||
$param .= sprintf('&%s=%s', $k, urlencode($v));
|
||||
}
|
||||
}
|
||||
$param = substr($param, 1);
|
||||
|
||||
return $param;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return theme info list by theme directory list
|
||||
* @return array
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue