summaryrefslogtreecommitdiff
path: root/modules/system/system.admin.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-13 05:26:57 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-13 05:26:57 +0000
commit89d04ea78a1d422b2dc21cd9e6e10344674632a1 (patch)
treee31e54a385b067111c5c5db70c64ca467b488b52 /modules/system/system.admin.inc
parenta0ec577e5b3a55ddf0e4707c953f9fdbbd23b792 (diff)
downloadbrdo-89d04ea78a1d422b2dc21cd9e6e10344674632a1.tar.gz
brdo-89d04ea78a1d422b2dc21cd9e6e10344674632a1.tar.bz2
#561452 by pwolanin and David_Rothstein: Add API function to get module/theme info without rebuilding it.
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r--modules/system/system.admin.inc17
1 files changed, 8 insertions, 9 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index f2c278f77..e21c114ae 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -146,12 +146,11 @@ function system_admin_menu_block_page() {
*/
function system_admin_by_module() {
- $modules = system_get_module_data();
+ $module_info = system_get_info('module');
$menu_items = array();
$help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
- foreach ($modules as $file) {
- $module = $file->name;
+ foreach ($module_info as $module => $info) {
if ($module == 'help') {
continue;
}
@@ -169,7 +168,7 @@ function system_admin_by_module() {
// Sort.
ksort($admin_tasks);
- $menu_items[$file->info['name']] = array($file->info['description'], $admin_tasks);
+ $menu_items[$info['name']] = array($info['description'], $admin_tasks);
}
}
return theme('system_admin_by_module', array('menu_items' => $menu_items));
@@ -200,7 +199,7 @@ function system_settings_overview() {
*/
function system_themes_form() {
// Get current list of themes.
- $themes = system_get_theme_data();
+ $themes = system_rebuild_theme_data();
// Remove hidden themes from the display list.
foreach ($themes as $theme_key => $theme) {
@@ -396,7 +395,7 @@ function system_theme_settings($form, &$form_state, $key = '') {
if ($key) {
$settings = theme_get_settings($key);
$var = str_replace('/', '_', 'theme_' . $key . '_settings');
- $themes = system_get_theme_data();
+ $themes = system_rebuild_theme_data();
$features = $themes[$key]->info['features'];
}
else {
@@ -643,7 +642,7 @@ function _system_is_incompatible(&$incompatible, $files, $file) {
*/
function system_modules($form, $form_state = array()) {
// Get current list of modules.
- $files = system_get_module_data();
+ $files = system_rebuild_module_data();
// Remove hidden modules from display list.
foreach ($files as $filename => $file) {
@@ -834,7 +833,7 @@ function _system_modules_build_row($info, $extra) {
* Display confirmation form for required modules.
*
* @param $modules
- * Array of module file objects as returned from system_get_module_data().
+ * Array of module file objects as returned from system_rebuild_module_data().
* @param $storage
* The contents of $form_state['storage']; an array with two
* elements: the list of required modules and the list of status
@@ -891,7 +890,7 @@ function system_modules_submit($form, &$form_state) {
// Get a list of all modules, it will be used to find which module requires
// which.
- $files = system_get_module_data();
+ $files = system_rebuild_module_data();
// The modules to be enabled.
$modules_to_be_enabled = array();