From: Paul L. <pa...@sq...> - 2006-11-16 12:26:42
|
On 11/7/06, Paul Lesniewski <pa...@sq...> wrote: > On 11/7/06, Brian G. Peterson <br...@br...> wrote: > > On Monday 06 November 2006 18:07, Paul Lesniewski wrote: > > > I am considering adding a quick-n-easy on/off switch for plugins to > > > conf.pl and thus config.php (hopefully can be added in the core in a > > > place where its value could also be controlled by a plugin (like the > > > debug/test plugin thread on this mailing list)). Would allow admins > > > to turn off plugins when they see a bug to validate if it is a plugin > > > or a core issue. Only support problem this raises is "why don't my > > > plugins work?" because John No Brain Admin has the switch turned off. > > > > > > Any objections? Overkill? > > > > Seems fine, but your issue of a global change is a real and serious one. > > I hear that. But same goes when an admin manually removes all plugins. > > > What about a way to turn off plugin loading *for a single user* so that a > > production system continues to run as-normal for the majority of > > squirrelmail users? > > With the proposed change, I am hoping it will be controllable by a > plugin, thus a plugin like vlogin could readily control its value for > just one user (or domain or user group, etc). That was the dumbest comment ever. If plugins are turned off, how can any one plugin control this value? Not. However, I managed to implement Brian's idea of limiting the "off switch" to just one user (if no user is named, then it happens for all users). I just committed this to CVS, so testing appreciated. > > I think the thing that might be more useful, triggered by the recent > > discussion of a new debugger plugin, would be a way to list which plugins > > are registered for which hooks. > > A dump of the hooks array? I agree that kind of output can be helpful > in some contexts (although it can be inferred from the plugin list), > but in the general support sense, we usually tell people to go off on > their own and disable all plugins first. > > > When problems manifest themselves, it's usually on a specific screen, so > > the number of plugins/hooks you'd need to disable is directly related to > > that screen/hook. I've often found myself wondering which plugin was > > likely to be active in a particular place. > > So are you looking for some kind of information about what plugins are > active on a certain page request? Or a way to control the plugins > just for that page request? Hmmm, might be able to make all the hook > functions log some kind of info in session, but I'm not sure that > would be very useful given that you can simply grep the files in > question for hooks and also because in 1.5.2 the plugin hooks array is > static and immediately viewable by looking at config/plugin_hooks.php > (although a plugin like vlogin can alter it at run time). > > - paul > |