[drupal-devel] [feature] Dependency system to solve forum without
comment problem
javanaut
drupal-devel at drupal.org
Sun Mar 6 01:26:41 UTC 2005
Issue status update for http://drupal.org/node/18447
Project: Drupal
Version: cvs
Component: system.module
Category: feature requests
Priority: normal
Assigned to: chx
Reported by: chx
Updated by: javanaut
Status: patch
I think allowing for both required dependencies as well as optional ones
would make it practical for a package management tool to be created. I
like it, though, and I think being able to programatically enforce (or
at least notify users about) dependencies would assist users who refuse
to RTFM.
>From my drupal-devel comment, here's how I would suggest formatting the
hook_depends:
<?php
function filestore2_depends() {
return array('required'=>array('fscache'),
'optional'=>array('taxonomy','comments'));
}
?>
javanaut
Previous comments:
------------------------------------------------------------------------
March 5, 2005 - 18:55 : chx
Attachment: http://drupal.org/files/issues/depend.patch (3.22 KB)
As discussed on the developer list. This was surprisingly easy. There is
still an issue: t('The configuration options have been saved.') is
displayed more than once if there is a dependency forced module switch
on. I have tried something (you'll see) for some reason it does not
work.
Number of page reloads can be decreased if Drupal could be
reinitialized after system_listing_save instead of redirecting but I
doubt this would be feasible.
Although I marked this is feature request, this is more a usability
issue (for the forum-comment dependency) and as a side effect it is a
useful feature, too (for any other module "bundles").
I want criticism! I'd like to get torn apart by wild animals. Heavy!
Eaten by some squirrels.
------------------------------------------------------------------------
March 5, 2005 - 19:22 : clydefrog
Forgive me if I'm mistaken, but shouldn't forum_depends return an array?
More information about the drupal-devel
mailing list