From: Brion Vibber
Date: Wed, 14 Apr 2004 06:15:46 +0000 (+0000)
Subject: License selector for installation, to activate the metadata & footer info.
X-Git-Tag: 1.3.0beta1~438
X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/%22%24ccApp/ecrire?a=commitdiff_plain;h=020236a408cb22b1b007d4e83cd53e6c7fbcdc3c;p=lhc%2Fweb%2Fwiklou.git
License selector for installation, to activate the metadata & footer info.
Can select no metadata, GNU FDL, or Creative Commons, which sends off
to the CC remote license engine to pick one.
Not fully tested. CC is returning the wrong icon URL except for public
domain right now. Going out to CC and back loses all other options from
the form.
---
diff --git a/config/index.php b/config/index.php
index bd8e62936e..fbc3cba981 100644
--- a/config/index.php
+++ b/config/index.php
@@ -42,7 +42,7 @@ header( "Content-type: text/html; charset=utf-8" );
dl.setup dd {
margin-left: 0;
}
- dl.setup dd label {
+ dl.setup dd label.column {
clear: left;
font-weight: bold;
width: 12em;
@@ -60,6 +60,11 @@ header( "Content-type: text/html; charset=utf-8" );
.error {
color: red;
}
+ ul.plain {
+ list-style: none;
+ clear: both;
+ margin-left: 12em;
+ }
@@ -266,6 +271,21 @@ if( $conf->SysopPass != $conf->SysopPass2 ) {
$errs["SysopPass2"] = "Passwords don't match!";
}
+$conf->License = importPost( "License", "none" );
+if( $conf->License == "gfdl" ) {
+ $conf->RightsUrl = "http://www.gnu.org/copyleft/fdl.html";
+ $conf->RightsText = "GNU Free Documentation License 1.2";
+ $conf->RightsCode = "gfdl";
+ $conf->RightsIcon = "{$conf->ScriptPath}/images/gnu-fdl.png";
+} elseif( $conf->License == "none" ) {
+ $conf->RightsUrl = $conf->RightsText = $conf->RightsCode = $conf->RightsIcon = "";
+} else {
+ $conf->RightsUrl = importPost( "RightsUrl", "" );
+ $conf->RightsText = importPost( "RightsText", "" );
+ $conf->RightsCode = importPost( "RightsCode", "" );
+ $conf->RightsIcon = importPost( "RightsIcon", "" );
+}
+
if( $conf->posted && ( 0 == count( $errs ) ) ) {
do { /* So we can 'continue' to end prematurely */
$conf->Root = ($conf->RootPW != "");
@@ -451,7 +471,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
$f = fopen( "LocalSettings.php", $xt );
if( $f == false ) {
- dieout( "Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...
\n" .
+ dieout( "Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...
\n" .
"Here's the file that would have been written, try to paste it into place manually:
\n" .
"\n" . htmlspecialchars( $localSettings ) . "
\n" );
}
@@ -508,7 +528,7 @@ if( count( $errs ) ) {
-
+