/[drupal]/contributions/modules/httpauth/httpauth.install
ViewVC logotype

Contents of /contributions/modules/httpauth/httpauth.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Fri Jun 27 12:51:57 2008 UTC (16 months, 4 weeks ago) by naquah
Branch: MAIN
CVS Tags: DRUPAL-6--1-1, DRUPAL-6--1-2, HEAD
Changes since 1.3: +24 -1 lines
File MIME type: text/x-php
#272029, reported by moshe weitzman: properly save/restore the site_403 variable when enabling/disabling HTTP authentication or when enabling/disabling the module, and inform user about the modification. Additionally, added proper hook_uninstall() implementation.
1 <?php
2 // $Id: httpauth.install,v 1.3 2008/04/20 21:14:03 naquah Exp $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function httpauth_install() {
8 db_query("UPDATE {system} SET bootstrap = %d, weight = %d WHERE name = '%s'", TRUE, -50, "httpauth");
9 }
10
11 /**
12 * Implementation of hook_enable().
13 */
14 function httpauth_enable() {
15 httpauth_set_site_403();
16 }
17
18 /**
19 * Implementation of hook_disable().
20 */
21 function httpauth_disable() {
22 httpauth_set_site_403(TRUE);
23 }
24
25 /**
26 * Implementation of hook_uninstall().
27 */
28 function httpauth_uninstall() {
29 variable_del('httpauth_status');
30 variable_del('httpauth_pages');
31 variable_del('httpauth_site_403');
32 }
33
34 /**
35 * Implementation of hook_update_N().
36 */
37 function httpauth_update_1() {
38 $ret = array();
39 $ret[] = update_sql("UPDATE {system} SET bootstrap = 1, weight = -50 WHERE name = 'httpauth'");
40 return $ret;
41 }

  ViewVC Help
Powered by ViewVC 1.1.2