123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class VersionAction extends Action
- {
- var $pluginVersions = array();
-
- function isReadOnly($args)
- {
- return true;
- }
-
- function title()
- {
-
- return sprintf(_('%1$s %2$s'), GNUSOCIAL_ENGINE, GNUSOCIAL_VERSION);
- }
-
- protected function prepare(array $args=array())
- {
- parent::prepare($args);
- Event::handle('PluginVersion', array(&$this->pluginVersions));
- return true;
- }
-
- protected function handle()
- {
- parent::handle();
- $this->showPage();
- }
-
- function showContentBlock()
- {
- $this->elementStart('div', array('id' => 'content', 'class' => 'h-entry'));
- $this->showPageTitle();
- $this->showPageNoticeBlock();
- $this->elementStart('div', array('id' => 'content_inner',
- 'class' => 'e-content'));
-
- $this->showContent();
- $this->elementEnd('div');
- $this->elementEnd('div');
- }
-
- function showPageTitle() {
- $this->element('h1', array('class' => 'entry-title'), $this->title());
- }
-
- function showContent()
- {
- $this->elementStart('p');
-
-
- $this->raw(sprintf(_('This site is powered by %1$s version %2$s, '.
- 'Copyright 2008-2013 StatusNet, Inc. '.
- 'and contributors.'),
- XMLStringer::estring('a', array('href' => GNUSOCIAL_ENGINE_URL),
-
- GNUSOCIAL_ENGINE),
- GNUSOCIAL_VERSION));
- $this->elementEnd('p');
-
- $this->element('h2', null, _('Contributors'));
- sort($this->contributors);
- $this->element('p', null, implode(', ', $this->contributors));
-
- $this->element('h2', null, _('License'));
- $this->element('p', null,
-
- sprintf(_('%1$s is free software: you can redistribute it and/or modify '.
- 'it under the terms of the GNU Affero General Public License as published by '.
- 'the Free Software Foundation, either version 3 of the License, or '.
- '(at your option) any later version.'), GNUSOCIAL_ENGINE));
- $this->element('p', null,
-
- _('This program is distributed in the hope that it will be useful, '.
- 'but WITHOUT ANY WARRANTY; without even the implied warranty of '.
- 'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '.
- 'GNU Affero General Public License for more details.'));
- $this->elementStart('p');
-
-
- $this->raw(sprintf(_('You should have received a copy of the GNU Affero General Public License '.
- 'along with this program. If not, see %s.'),
- XMLStringer::estring('a', array('href' => 'http://www.gnu.org/licenses/agpl.html'),
- 'http://www.gnu.org/licenses/agpl.html')));
- $this->elementEnd('p');
-
- if (count($this->pluginVersions)) {
-
- $this->element('h2', null, _('Plugins'));
- $this->elementStart('table', array('id' => 'plugins_enabled'));
- $this->elementStart('thead');
- $this->elementStart('tr');
-
- $this->element('th', array('id' => 'plugin_name'), _m('HEADER','Name'));
-
- $this->element('th', array('id' => 'plugin_version'), _m('HEADER','Version'));
-
- $this->element('th', array('id' => 'plugin_authors'), _m('HEADER','Author(s)'));
-
- $this->element('th', array('id' => 'plugin_description'), _m('HEADER','Description'));
- $this->elementEnd('tr');
- $this->elementEnd('thead');
- $this->elementStart('tbody');
- foreach ($this->pluginVersions as $plugin) {
- $this->elementStart('tr');
- if (array_key_exists('homepage', $plugin)) {
- $this->elementStart('th');
- $this->element('a', array('href' => $plugin['homepage']),
- $plugin['name']);
- $this->elementEnd('th');
- } else {
- $this->element('th', null, $plugin['name']);
- }
- $this->element('td', null, $plugin['version']);
- if (array_key_exists('author', $plugin)) {
- $this->element('td', null, $plugin['author']);
- }
- if (array_key_exists('rawdescription', $plugin)) {
- $this->elementStart('td');
- $this->raw($plugin['rawdescription']);
- $this->elementEnd('td');
- } else if (array_key_exists('description', $plugin)) {
- $this->element('td', null, $plugin['description']);
- }
- $this->elementEnd('tr');
- }
- $this->elementEnd('tbody');
- $this->elementEnd('table');
- }
- }
- var $contributors = array('Evan Prodromou (StatusNet)',
- 'Zach Copley (StatusNet)',
- 'Earle Martin (StatusNet)',
- 'Marie-Claude Doyon (StatusNet)',
- 'Sarven Capadisli (StatusNet)',
- 'Robin Millette (StatusNet)',
- 'Ciaran Gultnieks',
- 'Michael Landers',
- 'Ori Avtalion',
- 'Garret Buell',
- 'Mike Cochrane',
- 'Matthew Gregg',
- 'Florian Biree',
- 'Erik Stambaugh',
- 'drry',
- 'Gina Haeussge',
- 'Tryggvi Björgvinsson',
- 'Adrian Lang',
- 'Meitar Moscovitz',
- 'Sean Murphy',
- 'Leslie Michael Orchard',
- 'Eric Helgeson',
- 'Ken Sedgwick',
- 'Brian Hendrickson',
- 'Tobias Diekershoff',
- 'Dan Moore',
- 'Fil',
- 'Jeff Mitchell',
- 'Brenda Wallace',
- 'Jeffery To',
- 'Federico Marani',
- 'Craig Andrews',
- 'mEDI',
- 'Brett Taylor',
- 'Brigitte Schuster',
- 'Brion Vibber (StatusNet)',
- 'Siebrand Mazeland',
- 'Samantha Doherty (StatusNet)',
- 'Mikael Nordfeldth (FSF)');
- }
|