Mailing List Archive

Small patch Use/CheckCopyright
Hi, just resubmitting the small patch I proposed one week ago
(no comment unless I missed a message).

Laurent

On Sun, 2004-06-13 at 06:52, Laurent GUERBY wrote:
> Zero problem installing it, all issues reported from 1.3.0beta2
> have been solved, thanks!
>
> Here is a small patch that documents the existing $wgUseCopyrightUpload
> and adds a new $wgCheckCopyrightUpload which I believe is useful for
> private installations that would like to track copyright information
> ($wgUseCopyrightUpload = true) but don't want checks that
> the user provided decent values.
>
> Laurent
>
> guerby@pc:~/work/cvs/phase3/includes> diff -u DefaultSettings.php /srv/www/htdocs/wiki/includes/
> --- DefaultSettings.php 2004-06-13 06:36:16.996839568 +0200
> +++ /srv/www/htdocs/wiki/includes/DefaultSettings.php 2004-06-13 06:46:43.936148766 +0200
> @@ -1,5 +1,5 @@
> <?php
> -# $Id: DefaultSettings.php,v 1.118 2004/06/12 02:05:15 vibber Exp $
> +# $Id: DefaultSettings.php,v 1.110.2.2 2004/06/13 01:15:10 vibber Exp $
> # DO NOT EDIT THIS FILE!
> # To customize your installation, edit "LocalSettings.php".
> # Note that since all these string interpolations are expanded
> @@ -343,6 +343,13 @@
> $wgRightsText = NULL;
> $wgRightsIcon = NULL;
>
> +# Set this to true if you want detailed copyright information forms on Upload.
> +$wgUseCopyrightUpload = false;
> +
> +# Set this to false if you want to disable checking that detailed
> +# copyright information values are not empty.
> +$wgCheckCopyrightUpload = true;
> +
> # Set this to false to avoid forcing the first letter of links
> # to capitals. WARNING: may break links! This makes links
> # COMPLETELY case-sensitive. Links appearing with a capital at
> guerby@pc:~/work/cvs/phase3/includes> diff -u /srv/www/htdocs/wiki/includes/SpecialUpload.php .
> --- /srv/www/htdocs/wiki/includes/SpecialUpload.php 2004-06-13 06:38:57.630015379 +0200
> +++ ./SpecialUpload.php 2004-06-13 06:36:17.902693886 +0200
> @@ -73,15 +73,14 @@
> global $wgUser, $wgOut, $wgLang;
> global $wgUploadDirectory;
> global $wgSavedFile, $wgUploadOldVersion;
> - global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
> + global $wgUseCopyrightUpload;
> global $wgCheckFileExtensions, $wgStrictFileExtensions;
> global $wgFileExtensions, $wgFileBlacklist, $wgUploadSizeWarning;
>
> if ( $wgUseCopyrightUpload ) {
> $this->mUploadAffirm = 1;
> - if ($wgCheckCopyrightUpload &&
> - (trim ( $this->mUploadCopyStatus ) == "" || trim ( $this->mUploadSource ) == "" )) {
> - $this->mUploadAffirm = 1;
> + if ( trim ( $this->mUploadCopyStatus ) == "" || trim ( $this->mUploadSource ) == "" ) {
> + $this->mUploadAffirm = 0;
> }
> }
>
Re: Small patch Use/CheckCopyright [ In reply to ]
Laurent GUERBY wrote:
> Hi, just resubmitting the small patch I proposed one week ago
> (no comment unless I missed a message).
>
> Laurent
>
> On Sun, 2004-06-13 at 06:52, Laurent GUERBY wrote:
>
>>Zero problem installing it, all issues reported from 1.3.0beta2
>>have been solved, thanks!
>>
>>Here is a small patch that documents the existing $wgUseCopyrightUpload
>>and adds a new $wgCheckCopyrightUpload which I believe is useful for
>>private installations that would like to track copyright information
>>($wgUseCopyrightUpload = true) but don't want checks that
>>the user provided decent values.
<snip patch>

Hello Laurent,

Sorry for the delay implementing your patch. I tested it and it seems to
work correctly. I just commited it to cvs giving you the credits for it
and it will be disabled by default.


cheers,

--
Ashar Voultoiz