Set redirect path on install

Bevan - January 6, 2009 - 01:49
Project:Redirect 403 to User Login
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

The module requires that drupal variable site_403 is set to r4032login. However the module does not do this automatically, and it is not clearly or documented in many places. (It would be useful on admin > reports > status and on the project page).

This patch sets drupal variable site_403 to r4032login on install, and restores it to it's previous setting on uninstall. It also removes the documentation in README.txt that is made redundant by these changes.

AttachmentSize
r4032login-install.patch1.78 KB

#1

Mark Theunissen - January 19, 2009 - 10:42

Great idea, took a brief look at the code and it seems fine.

#2

Frank Ralf - March 14, 2009 - 19:21

Great improvement! Took me at least 10 minutes to figure that setting out while scratching my head why the module didn't work... Will try the patch and report here.

Frank

#3

xmoe - April 4, 2009 - 17:24

Great improvement! But I would rather use the functions hook_disable() and hook_enable() instead of hook_install() and hook_uninstall().

#4

xmoe - April 4, 2009 - 18:03

it would probably be even better to alter the system_error_reporting_settings-form and replace the 403-textfield with a message saying that 403 is handled by this module.

#5

webwriter - April 11, 2009 - 21:35

Thank you for this info! I really needed it.

#6

Bevan - May 6, 2009 - 00:57

I made the changes in enable/disable hooks, as recommended.

In order to keep the patch lean and simple, I didn't do the form alter stuff. Though I agree this is a good idea, for another issue/patch.

AttachmentSize
354826.patch 1.95 KB

#7

Bevan - June 12, 2009 - 05:41

Bump. Reviews? Commits?

#8

deekayen - July 13, 2009 - 15:23
Status:needs review» duplicate

#318935: Cannot get module to work

 
 

Drupal is a registered trademark of Dries Buytaert.