X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=blobdiff_plain;f=config%2Findex.php;h=c07a1016b8a183111f162496690ba2ef213b02e1;hb=efebcf9b720147d60f71d480cc817f34e94d508c;hp=f72d4dc83bc3c40981a5fff211a4068f73e6dbda;hpb=c280d5887a30c94e0c1af4b55dce4ba916d1b93b;p=lhc%2Fweb%2Fwiklou.git diff --git a/config/index.php b/config/index.php index f72d4dc83b..c07a1016b8 100644 --- a/config/index.php +++ b/config/index.php @@ -333,7 +333,7 @@ if( $conf->SysopPass != $conf->SysopPass2 ) { $errs["SysopPass2"] = "Passwords don't match!"; } -$conf->License = importPost( "License", "none" ); +$conf->License = importRequest( "License", "none" ); if( $conf->License == "gfdl" ) { $conf->RightsUrl = "http://www.gnu.org/copyleft/fdl.html"; $conf->RightsText = "GNU Free Documentation License 1.2"; @@ -342,10 +342,10 @@ if( $conf->License == "gfdl" ) { } 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", "" ); + $conf->RightsUrl = importRequest( "RightsUrl", "" ); + $conf->RightsText = importRequest( "RightsText", "" ); + $conf->RightsCode = importRequest( "RightsCode", "" ); + $conf->RightsIcon = importRequest( "RightsIcon", "" ); } if( $conf->posted && ( 0 == count( $errs ) ) ) { @@ -644,11 +644,16 @@ if( count( $errs ) ) { $icon = urlencode( "$wgServer$wgUploadPath/wiki.png" ); $ccApp = htmlspecialchars( "http://creativecommons.org/license/?partner=$partner&exit_url=$exit&partner_icon_url=$icon" ); print "choose"; - ?> -
  • RightsUrl, "hidden" ); ?>
  • -
  • RightsText, "hidden" ); ?>
  • -
  • RightsCode, "hidden" ); ?>
  • -
  • RightsIcon, "hidden" ); ?>
  • + ?> (link will wipe out any other data in this form!) + License == "cc" ) { ?> + + +
    @@ -885,9 +890,9 @@ function dieout( $text ) { die( $text . "\n\n\n" ); } -function importPost( $name, $default = "" ) { - if( isset( $_POST[$name] ) ) { - $retval = $_POST[$name]; +function importVar( &$var, $name, $default = "" ) { + if( isset( $var[$name] ) ) { + $retval = $var[$name]; if ( get_magic_quotes_gpc() ) { $retval = stripslashes( $retval ); } @@ -897,6 +902,14 @@ function importPost( $name, $default = "" ) { return $retval; } +function importPost( $name, $default = "" ) { + return importVar( $_POST, $name, $default ); +} + +function importRequest( $name, $default = "" ) { + return importVar( $_REQUEST, $name, $default ); +} + function aField( &$conf, $field, $text, $type = "", $value = "" ) { if( $type != "" ) { $xtype = "type=\"$type\"";