summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-19 00:31:42 -0500
committerEvan Prodromou <evan@status.net>2010-01-19 00:31:42 -0500
commit01dc77c2fd783f8b7ff796ca06013804971c8f5e (patch)
tree4874bddd23ac870d8ea9bfff5c4d0479ef67bbad /lib
parent1f6bbc189012cb3a1d61be92bbc1d4ec6156afac (diff)
parentc7f14cd7774d21e16aa6b020da71f318c648e3f0 (diff)
Merge branch 'master' into 0.9.x
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php56
-rw-r--r--lib/default.php4
2 files changed, 42 insertions, 18 deletions
diff --git a/lib/action.php b/lib/action.php
index a521bcb50..171bea17c 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -791,23 +791,45 @@ class Action extends HTMLOutputter // lawsuit
*/
function showContentLicense()
{
- $this->element('dt', array('id' => 'site_content_license'), _('Site content license'));
- $this->elementStart('dd', array('id' => 'site_content_license_cc'));
- $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');
- $this->elementEnd('dd');
+ if (Event::handle('StartShowContentLicense', array($this))) {
+ $this->element('dt', array('id' => 'site_content_license'), _('Site content license'));
+ $this->elementStart('dd', array('id' => 'site_content_license_cc'));
+
+ switch (common_config('license', 'type')) {
+ case 'private':
+ $this->element('p', null, sprintf(_('Content and data of %1$s are private and confidential.'),
+ common_config('site', 'name')));
+ // fall through
+ case 'allrightsreserved':
+ if (common_config('license', 'owner')) {
+ $this->element('p', null, sprintf(_('Content and data copyright by %1$s. All rights reserved.'),
+ common_config('license', 'owner')));
+ } else {
+ $this->element('p', null, _('Content and data copyright by contributors. All rights reserved.'));
+ }
+ 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');
+ Event::handle('EndShowContentLicense', array($this));
+ }
}
/**
diff --git a/lib/default.php b/lib/default.php
index 82578fea8..1c3c5e7ff 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -83,7 +83,9 @@ $default =
'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
),
'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',
'image' => 'http://i.creativecommons.org/l/by/3.0/80x15.png'),
'mail' =>