diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-07-28 11:36:53 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-07-28 11:36:53 +0200 |
commit | 8af2e4bbb77efbfe391088f7de187db3262874cb (patch) | |
tree | 856fc89f92027b743d06e7aaeac6704d6cea931f /install.php | |
parent | 3545b2e00f01dc8e3b59ba4b2fc937f296b43bb5 (diff) | |
download | rpg-8af2e4bbb77efbfe391088f7de187db3262874cb.tar.gz rpg-8af2e4bbb77efbfe391088f7de187db3262874cb.tar.bz2 |
default policy for installer
darcs-hash:20060728093653-7ad00-fc481b0ae7707516de089bfd88dba3eee0f33f3d.gz
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/install.php b/install.php index cc179f856..46ebf5448 100644 --- a/install.php +++ b/install.php @@ -62,7 +62,7 @@ header('Content-Type: text/html; charset=utf-8'); code { font-size: 110%; color: #008000; } fieldset { border: none } label { display: block;} - input.text { width: 30em; margin: 0 0.5em; } + select.text, input.text { width: 30em; margin: 0 0.5em; } </style> <script type="text/javascript" language="javascript"> function acltoggle(){ @@ -175,6 +175,13 @@ function print_form($d){ <label for="confirm"><?php echo $lang['passchk']?></label> <input class="text" type="password" name="d[confirm]" id="confirm" /> + + <label for="policy"><?php echo $lang['i_policy']?></label> + <select class="text" name="d[policy]" id="policy"> + <option value="0" <?php echo ($d['policy'] == 0)?'selected="selected"':'' ?>><?php echo $lang['i_pol0']?></option> + <option value="1" <?php echo ($d['policy'] == 1)?'selected="selected"':'' ?>><?php echo $lang['i_pol1']?></option> + <option value="2" <?php echo ($d['policy'] == 2)?'selected="selected"':'' ?>><?php echo $lang['i_pol2']?></option> + </select> </fieldset> </fieldset> @@ -234,6 +241,7 @@ function check_data($d){ */ function store_data($d){ $ok = true; + $d['policy'] = (int) $d['policy']; // create changes.log if (!@file_exists(DOKU_INC.'data/changes.log')){ @@ -267,7 +275,27 @@ EOT; $ok = $ok && fileWrite(DOKU_LOCAL.'users.auth.php', $output); // create acl.auth.php - $output = @file_get_contents(DOKU_CONF.'acl.auth.php.dist'); + $output = <<<EOT +# acl.auth.php +# <?php exit()?> +# Don't modify the lines above +# +# Access Control Lists +# +# Auto-generated by install script +# Date: $now + +EOT; + if($d['policy'] == 2){ + $output .= "* @ALL 0\n"; + $output .= "* @users 8\n"; + }elseif($d['policy'] == 2){ + $output .= "* @ALL 1\n"; + $output .= "* @users 8\n"; + }else{ + $output .= "* @ALL 8\n"; + } + $ok = $ok && fileWrite(DOKU_LOCAL.'acl.auth.php', $output); } return $ok; |