function _systeminfo_admin_drupal_modules in System Information 7.3
Same name and namespace in other branches
- 6.3 systeminfo.admin.drupal.inc \_systeminfo_admin_drupal_modules()
1 call to _systeminfo_admin_drupal_modules()
- systeminfo_admin_drupal in ./
systeminfo.admin.drupal.inc - Menu callback; displays the Drupal page.
File
- ./
systeminfo.admin.drupal.inc, line 143 - Admin Drupal page callbacks for the systeminfo module.
Code
function _systeminfo_admin_drupal_modules() {
$sort = variable_get('systeminfo_drupal_modules_sort', 'name');
$header = array();
$header[] = t('Name');
$header[] = t('Version');
$header[] = t('Date stamp');
$header[] = t('Filename');
$header[] = t('Schema');
$header[] = t('Weight');
$rows = array();
$install_profile = variable_get('install_profile', 'standard');
foreach (module_list() as $module) {
if ($module != $install_profile) {
$module_system = db_query('SELECT name, filename, schema_version, weight FROM {system} WHERE name = :name', array(
':name' => $module,
))
->fetchObject();
$module_info = system_get_info('module', $module_system->name);
$row = array();
$row[] = $module_info['name'];
$row[] = $module_info['version'];
$row[] = isset($module_info['datestamp']) ? format_date($module_info['datestamp'], 'small') : '';
$row[] = $module_system->filename;
$row[] = $module_system->schema_version;
$row[] = $module_system->weight;
$key = $sort == 'name' ? $module_info['name'] : $module_system->filename;
$rows[$key] = $row;
}
}
if ($sort == 'name' || $sort == 'filename') {
ksort($rows);
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'class' => array(
'systeminfo',
),
),
));
}