Closed (won't fix)
Project:
Enabled Modules
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2010 at 15:37 UTC
Updated:
22 Apr 2010 at 12:30 UTC
hi
first of all: this is a very helpfull module. thanks!.
i have got a lot of modules which are not in use anymore.
somewhere i read that its much better for performance if unused modules are deleted (removed ) from the modules folder. do unused modules affect performance???
ok, my idea is to create a link in the view which links to a script which moves the wohle module directory (with subfolders) to another location (/unused_modules).
maybe that helps:
http://php.net/manual/en/function.rename.php
http://www.php.net/manual/en/function.rename.php#97262
http://www.php.net/manual/en/function.rename.php#90535
thanks
Comments
Comment #1
akaserer commentedi changed the view and inserted a link to call remove.php with some parameters.
view is on: admin/reports/enabled_modules/not-installed2
');
$handler->override_option('header_format', '3');
$handler->override_option('header_empty', 1);
$handler->override_option('empty', '
All modules in the system are installed.
');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 1,
'order' => 'asc',
'columns' => array(
'package' => 'package',
'filename' => 'filename',
'name' => 'name',
'description' => 'description',
'code' => 'code',
),
'info' => array(
'package' => array(
'sortable' => 1,
'separator' => '',
),
'filename' => array(
'sortable' => 1,
'separator' => '',
),
'name' => array(
'sortable' => 0,
'separator' => '',
),
'description' => array(
'sortable' => 0,
'separator' => '',
),
'code' => array(
'separator' => '',
),
),
'default' => 'package',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'admin/reports/enabled_modules/not-installed');
$handler->override_option('menu', array(
'type' => 'tab',
'title' => 'Not Installed',
'description' => '',
'weight' => '1',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler = $view->new_display('page', 'Seite', 'page_2');
$handler->override_option('fields', array(
'name_1' => array(
'label' => 'Name',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'name_1',
'table' => 'system',
'field' => 'name',
'override' => array(
'button' => 'Standard verwenden',
),
'relationship' => 'none',
),
'filename' => array(
'label' => 'Filename',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 1,
'id' => 'filename',
'table' => 'system',
'field' => 'filename',
'relationship' => 'none',
),
'name' => array(
'label' => 'Name',
'alter' => array(
'alter_text' => 1,
'text' => '[name]
([filename])',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'name',
'table' => 'enabled_modules_system',
'field' => 'name',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'nothing' => array(
'label' => 'Link',
'alter' => array(
'text' => 'remove ',
'make_link' => 1,
'path' => 'remove.php?p=[filename]',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '_blank',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 0,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'nothing',
'table' => 'views',
'field' => 'nothing',
'override' => array(
'button' => 'Standard verwenden',
),
'relationship' => 'none',
),
));
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 1,
'order' => 'asc',
'columns' => array(
'filename' => 'filename',
'name' => 'name',
),
'info' => array(
'filename' => array(
'sortable' => 1,
'separator' => '',
),
'name' => array(
'sortable' => 0,
'separator' => '',
),
),
'default' => 'name',
));
$handler->override_option('path', 'admin/reports/enabled_modules/not-installed2');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
Comment #2
juliangb commentedModules degrade performance if they are present - but only for the loading of the admin/build/modules page where Drupal recursively searches folders in the /modules, /profiles and sites/all/modules folders for valid .info files.
Firstly, please post code such as above in text attachments / patches rather than directly onto the page. It takes up a lot of space!
Secondly, what is this remove.php file you talk about?
Thirdly, I'd ask Benjamin to put a word in on this issue to say whether this feature is suitable for enabled_modules.
Comment #3
mlncn commentedI don't think it should be part of Enabled Modules itself, this is more Drupal core's Update Manager. We could consider it as, ironically, a separate module that i would recommend stay disabled... but i think overall enabled modules should look, not touch.
@juliangb - are you at DrupalCon? I owe you a cooler of drinks!
Comment #4
juliangb commentedI think I agree.
OK - @akaserer - this is won't fix for this module, meaning that we don't think it quite fits in with the aims of this module. Feel free to move this issue for core, or for a separate contrib module if you wish to see it go further.
Benjamin - Sorry, not at DCSF. Probably wouldn't have made it there this week if I'd tried anyway (thanks, Iceland). Just the live streaming for me.
Comment #5
akaserer commentedhi all
i agree that this feature should not be part of enabled-modules.
i just created my own view which links to a php file. then the directory is renamed with a '_' in front.
after that i can manually remove my folders.
anyway, thanks for your info and thumbs up for this module.
Comment #6
juliangb commentedJust a quick note...
Think about what would happen if a certain contrib project gave you two modules in one folder. Imagine that you have enabled one, and not installed the other... The folder would be renamed, meaning that Drupal would lose the link to the enabled module until all the caches etc were cleared. Think WSOD on any page that the module defines. If you did then delete the folder... it would be permanent.
I think you might be able to use enabled_modules for a better approach - use the not installed view to see what the filenames are of your not installed modules, and then look in the filesystem manually.