function quick_list_page in Util 7
The main list function.
1 string reference to 'quick_list_page'
- quick_list_menu in contribs/
quick_list/ quick_list.module - Implements hook_menu().
File
- contribs/
quick_list/ quick_list.module, line 49 - Provides a debugging summary of modules that are enabled.
Code
function quick_list_page() {
$output = '';
$list = array();
$show_core = variable_get('quick_list_show_core', 0);
$help_exists = module_exists('help');
$result = db_select('system', 's')
->fields('s', array(
'name',
'info',
))
->condition('type', 'module', '=')
->condition('status', 0, '>')
->execute();
foreach ($result as $row) {
$row->info = unserialize($row->info);
// Skip hidden and core modules, if desired.
if (!$show_core && isset($row->info['hidden']) && $row->info['hidden']) {
continue;
}
// Build the module line.
if (!$show_core && $row->info['package'] != 'Core' || $show_core) {
$line = $row->name . ' ' . $row->info['version'] . ' ' . (substr($row->info['version'], -4) == '-dev' ? date('Y/m/d', $row->info['datestamp']) : '');
if ($help_exists && function_exists($row->name . '_help')) {
$line .= ' ' . l('<img src="/misc/help.png" />', "admin/help/{$row->name}", array(
'html' => TRUE,
'attributes' => array(
'title' => t('Help'),
),
));
}
if (isset($row->info['configure'])) {
$line .= ' ' . l('<img src="/misc/configure.png" />', $row->info['configure'], array(
'html' => TRUE,
'attributes' => array(
'title' => t('Configure'),
),
));
}
$list[] = $line;
}
}
$output .= theme_list_table(array(
'items' => $list,
'columns' => variable_get('quick_list_columns', 2),
));
$output .= t('!count modules, !not including core.', array(
'!count' => count($list),
'!not' => $show_core ? NULL : 'not',
));
return $output;
}