diff options
author | Andreas Gohr <andi@splitbrain.org> | 2010-06-26 15:59:59 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-06-26 16:02:30 +0200 |
commit | 0636144287f7acf89c633d3d2f5214e1d229e033 (patch) | |
tree | f3445c24579c1f94f085450a29c623f69dea19ff /install.php | |
parent | d43aac1c8c239fb7f4ca8d0cb9bf03dc1d6cd958 (diff) | |
download | rpg-0636144287f7acf89c633d3d2f5214e1d229e033.tar.gz rpg-0636144287f7acf89c633d3d2f5214e1d229e033.tar.bz2 |
Added license chooser to installer FS#1926
This adds a license chooser to the installer. The installer defaults to
the more free CC-BY-SA. CC-NC-BY-SA is still the default in dokuwiki.php
to keep backwards compatibility.
The license array was reordered and Non-Derivative licenses removed
(they don't make much sense for wiki content).
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/install.php b/install.php index a9edbd445..1ec822fd9 100644 --- a/install.php +++ b/install.php @@ -45,7 +45,8 @@ $dokuwiki_hash = array( '2007-06-26' => 'b3ca19c7a654823144119980be73cd77', '2008-05-04' => '1e5c42eac3219d9e21927c39e3240aad', '2009-02-14' => 'ec8c04210732a14fdfce0f7f6eead865', - '2009-12-25' => '993c4b2b385643efe5abf8e7010e11f4', + '2009-12-25' => '993c4b2b385643efe5abf8e7010e11f4', + 'devel' => 'f065247541c4041e5f103b41b393fcb3' ); @@ -68,6 +69,7 @@ header('Content-Type: text/html; charset=utf-8'); fieldset { border: none } label { display: block; margin-top: 0.5em; } select.text, input.text { width: 30em; margin: 0 0.5em; } + a {text-decoration: none} </style> <script type="text/javascript" language="javascript"> function acltoggle(){ @@ -150,6 +152,8 @@ function print_form($d){ global $lang; global $LC; + include(DOKU_CONF.'license.php'); + if(!is_array($d)) $d = array(); $d = array_map('htmlspecialchars',$d); @@ -190,9 +194,26 @@ function print_form($d){ <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> + <fieldset> + <p><?php echo $lang['i_license']?></p> + <?php + array_unshift($license,array('name' => 'None', 'url'=>'')); + if(!isset($d['license'])) $d['license'] = 'cc-by-sa'; + foreach($license as $key => $lic){ + echo '<label for="lic_'.$key.'">'; + echo '<input type="radio" name="d[license]" value="'.htmlspecialchars($key).'" id="lic_'.$key.'"'. + (($d['license'] == $key)?'checked="checked"':'').'>'; + echo htmlspecialchars($lic['name']); + if($lic['url']) echo ' <a href="'.$lic['url'].'" target="_blank"><sup>[?]</sup></a>'; + echo '</label>'; + } + ?> + </fieldset> + </fieldset> <fieldset id="process"> <input class="button" type="submit" name="submit" value="<?php echo $lang['btn_save']?>" /> @@ -281,6 +302,7 @@ function store_data($d){ EOT; $output .= '$conf[\'title\'] = \''.addslashes($d['title'])."';\n"; $output .= '$conf[\'lang\'] = \''.addslashes($LC)."';\n"; + $output .= '$conf[\'license\'] = \''.addslashes($d['license'])."';\n"; if($d['acl']){ $output .= '$conf[\'useacl\'] = 1'.";\n"; $output .= "\$conf['superuser'] = '@admin';\n"; |