| 1 | <?php |
| 2 | class xorgCopyrightWidget { |
| 3 | public static function behavior_initWidgets($w) { |
| 4 | $w->create('XorgCopyright', __('Copyright'), array('xorgCopyrightWidget', 'widget')); |
| 5 | } |
| 6 | |
| 7 | static public function widget($w) { |
| 8 | global $core; |
| 9 | $copyright = $core->blog->settings->system->get('copyright_notice'); |
| 10 | $editor = $core->blog->settings->system->get('editor'); |
| 11 | |
| 12 | $text = '<div><h2>Mentions légales</h2><ul>'; |
| 13 | if ($editor) { |
| 14 | $text .= '<li>Editeur : ' . $editor . '</li>'; |
| 15 | } |
| 16 | $text .= '<li>Hébergé par <a href="http://xorg.polytechnique.org">Polytechnique.org</a></li>'; |
| 17 | if ($copyright) { |
| 18 | $text .= '<li>' . $copyright . '</li>'; |
| 19 | } |
| 20 | return $text . '</ul></div>'; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | ?> |