]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add event for showing content license in action
authorEvan Prodromou <evan@status.net>
Tue, 19 Jan 2010 04:25:45 +0000 (23:25 -0500)
committerEvan Prodromou <evan@status.net>
Tue, 19 Jan 2010 04:25:45 +0000 (23:25 -0500)
EVENTS.txt
lib/action.php

index e6400244e41556309a3b59c5588c073410ae71dd..6e6afa070f56442824ee31a091edb8efd7aff3c3 100644 (file)
@@ -687,3 +687,9 @@ StartLeaveGroup: when a user is leaving a group
 EndLeaveGroup: when a user has left a group
 - $group: the group being left
 - $user: the user leaving
+
+StartShowContentLicense: Showing the default license for content
+- $action: the current action
+
+EndShowContentLicense: Showing the default license for content
+- $action: the current action
index a521bcb50745516fc279a8989e606485b9eb6be7..813d089fefb3a3efc371df2ea2dc69bd1e18d960 100644 (file)
@@ -791,23 +791,26 @@ 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'));
+            $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');
+            Event::handle('EndShowContentLicense', array($this));
+        }
     }
 
     /**