We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit c7f14cd7 authored by Evan Prodromou's avatar Evan Prodromou

allow all rights reserved, private data

parent 42a47a77
...@@ -1035,6 +1035,12 @@ Creative Commons Attribution 3.0 license, which is probably the right ...@@ -1035,6 +1035,12 @@ Creative Commons Attribution 3.0 license, which is probably the right
choice for any public site. Note that some other servers will not choice for any public site. Note that some other servers will not
accept notices if you apply a stricter license than this. accept notices if you apply a stricter license than this.
type: one of 'cc' (for Creative Commons licenses), 'allrightsreserved'
(default copyright), or 'private' (for private and confidential
information).
owner: for 'allrightsreserved' or 'private', an assigned copyright
holder (for example, an employer for a private site). If
not specified, will be attributed to 'contributors'.
url: URL of the license, used for links. url: URL of the license, used for links.
title: Title for the license, like 'Creative Commons Attribution 3.0'. title: Title for the license, like 'Creative Commons Attribution 3.0'.
image: A button shown on each page for the license. image: A button shown on each page for the license.
......
...@@ -794,20 +794,39 @@ class Action extends HTMLOutputter // lawsuit ...@@ -794,20 +794,39 @@ class Action extends HTMLOutputter // lawsuit
if (Event::handle('StartShowContentLicense', array($this))) { if (Event::handle('StartShowContentLicense', array($this))) {
$this->element('dt', array('id' => 'site_content_license'), _('Site content license')); $this->element('dt', array('id' => 'site_content_license'), _('Site content license'));
$this->elementStart('dd', array('id' => 'site_content_license_cc')); $this->elementStart('dd', array('id' => 'site_content_license_cc'));
$this->elementStart('p');
$this->element('img', array('id' => 'license_cc', switch (common_config('license', 'type')) {
'src' => common_config('license', 'image'), case 'private':
'alt' => common_config('license', 'title'), $this->element('p', null, sprintf(_('Content and data of %1$s are private and confidential.'),
'width' => '80', common_config('site', 'name')));
'height' => '15')); // fall through
//TODO: This is dirty: i18n case 'allrightsreserved':
$this->text(_('All '.common_config('site', 'name').' content and data are available under the ')); if (common_config('license', 'owner')) {
$this->element('a', array('class' => 'license', $this->element('p', null, sprintf(_('Content and data copyright by %1$s. All rights reserved.'),
'rel' => 'external license', common_config('license', 'owner')));
'href' => common_config('license', 'url')), } else {
common_config('license', 'title')); $this->element('p', null, _('Content and data copyright by contributors. All rights reserved.'));
$this->text(_('license.')); }
$this->elementEnd('p'); break;
case 'cc': // fall through
default:
$this->elementStart('p');
$this->element('img', array('id' => 'license_cc',
'src' => common_config('license', 'image'),
'alt' => common_config('license', 'title'),
'width' => '80',
'height' => '15'));
//TODO: This is dirty: i18n
$this->text(_('All '.common_config('site', 'name').' content and data are available under the '));
$this->element('a', array('class' => 'license',
'rel' => 'external license',
'href' => common_config('license', 'url')),
common_config('license', 'title'));
$this->text(_('license.'));
$this->elementEnd('p');
break;
}
$this->elementEnd('dd'); $this->elementEnd('dd');
Event::handle('EndShowContentLicense', array($this)); Event::handle('EndShowContentLicense', array($this));
} }
......
...@@ -83,7 +83,9 @@ $default = ...@@ -83,7 +83,9 @@ $default =
'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully 'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
), ),
'license' => 'license' =>
array('url' => 'http://creativecommons.org/licenses/by/3.0/', array('type' => 'cc', # can be 'cc', 'allrightsreserved', 'private'
'owner' => null, # can be name of content owner e.g. for enterprise
'url' => 'http://creativecommons.org/licenses/by/3.0/',
'title' => 'Creative Commons Attribution 3.0', 'title' => 'Creative Commons Attribution 3.0',
'image' => 'http://i.creativecommons.org/l/by/3.0/80x15.png'), 'image' => 'http://i.creativecommons.org/l/by/3.0/80x15.png'),
'mail' => 'mail' =>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment