forked from GNUsocial/gnu-social
Removed 'bookmarklet' since we have Bookmark plugin
This commit is contained in:
parent
d2881757a4
commit
c075b9f730
@ -1,75 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* StatusNet, the distributed open-source microblogging tool
|
||||
*
|
||||
* Handler for posting new notices
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* LICENCE: This program 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @category Bookmarklet
|
||||
* @package StatusNet
|
||||
* @author Sarven Capadisli <csarven@status.net>
|
||||
* @copyright 2008-2009 StatusNet, Inc.
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR . '/actions/newnotice.php';
|
||||
|
||||
/**
|
||||
* Action for posting a notice
|
||||
*
|
||||
* @category Bookmarklet
|
||||
* @package StatusNet
|
||||
* @author Sarven Capadisli <csarven@status.net>
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
class BookmarkletAction extends NewnoticeAction
|
||||
{
|
||||
function showTitle()
|
||||
{
|
||||
// TRANS: Title for mini-posting window loaded from bookmarklet.
|
||||
// TRANS: %s is the StatusNet site name.
|
||||
$this->element('title', null, sprintf(_('Post to %s'), common_config('site', 'name')));
|
||||
}
|
||||
|
||||
function showHeader()
|
||||
{
|
||||
$this->elementStart('div', array('id' => 'header'));
|
||||
$this->elementStart('address');
|
||||
$this->element('a', array('class' => 'url',
|
||||
'href' => common_local_url('public')),
|
||||
'');
|
||||
$this->elementEnd('address');
|
||||
if (common_logged_in()) {
|
||||
$this->showNoticeForm();
|
||||
}
|
||||
$this->elementEnd('div');
|
||||
}
|
||||
|
||||
function showCore()
|
||||
{
|
||||
}
|
||||
|
||||
function showFooter()
|
||||
{
|
||||
}
|
||||
}
|
@ -308,7 +308,6 @@ var SN = { // StatusNet
|
||||
* @fixme cookieValue is a global variable, but probably shouldn't be
|
||||
* @fixme saving the location cache cookies should be split out
|
||||
* @fixme some error messages are hardcoded english: needs i18n
|
||||
* @fixme special-case for bookmarklet is confusing and uses a global var "self". Is this ok?
|
||||
*
|
||||
* @param {jQuery} form: jQuery object whose first element is a form
|
||||
*
|
||||
@ -394,11 +393,6 @@ var SN = { // StatusNet
|
||||
if (errorResult.length > 0) {
|
||||
showFeedback('error', errorResult.text());
|
||||
} else {
|
||||
if ($('body')[0].id == 'bookmarklet') {
|
||||
// @fixme self is not referenced anywhere?
|
||||
self.close();
|
||||
}
|
||||
|
||||
var commandResult = $('#' + SN.C.S.CommandResult, data);
|
||||
if (commandResult.length > 0) {
|
||||
showFeedback('success', commandResult.text());
|
||||
|
@ -224,7 +224,7 @@ abstract class Installer
|
||||
}
|
||||
// @fixme hardcoded list; should use Nickname::isValid()
|
||||
// if/when it's safe to have loaded the infrastructure here
|
||||
$blacklist = array('main', 'panel', 'twitter', 'settings', 'rsd.xml', 'favorited', 'featured', 'favoritedrss', 'featuredrss', 'rss', 'getfile', 'api', 'groups', 'group', 'peopletag', 'tag', 'user', 'message', 'conversation', 'bookmarklet', 'notice', 'attachment', 'search', 'index.php', 'doc', 'opensearch', 'robots.txt', 'xd_receiver.html', 'facebook');
|
||||
$blacklist = array('main', 'panel', 'twitter', 'settings', 'rsd.xml', 'favorited', 'featured', 'favoritedrss', 'featuredrss', 'rss', 'getfile', 'api', 'groups', 'group', 'peopletag', 'tag', 'user', 'message', 'conversation', 'notice', 'attachment', 'search', 'index.php', 'doc', 'opensearch', 'robots.txt', 'xd_receiver.html', 'facebook');
|
||||
if (in_array($this->adminNick, $blacklist)) {
|
||||
$this->updateStatus('The user nickname "' . htmlspecialchars($this->adminNick) .
|
||||
'" is reserved.', true);
|
||||
|
@ -251,8 +251,6 @@ class Router
|
||||
|
||||
$m->connect('notice/delete', array('action' => 'deletenotice'));
|
||||
|
||||
$m->connect('bookmarklet/new', array('action' => 'bookmarklet'));
|
||||
|
||||
// conversation
|
||||
|
||||
$m->connect('conversation/:id',
|
||||
|
@ -1179,16 +1179,6 @@ display:none;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
#bookmarklet address {
|
||||
display:none;
|
||||
}
|
||||
#bookmarklet .form_notice {
|
||||
width:auto;
|
||||
}
|
||||
#bookmarklet #wrap {
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
button.close,
|
||||
button.minimize {
|
||||
width:16px;
|
||||
|
Loading…
Reference in New Issue
Block a user