From c075b9f73068066897f2d42cdbcf1be1bf812380 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 10 May 2014 02:50:56 +0200 Subject: [PATCH] Removed 'bookmarklet' since we have Bookmark plugin --- actions/bookmarklet.php | 75 -------------------------------------- js/util.js | 6 --- lib/installer.php | 2 +- lib/router.php | 2 - theme/base/css/display.css | 10 ----- 5 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 actions/bookmarklet.php diff --git a/actions/bookmarklet.php b/actions/bookmarklet.php deleted file mode 100644 index 9cf4e58f89..0000000000 --- a/actions/bookmarklet.php +++ /dev/null @@ -1,75 +0,0 @@ -. - * - * @category Bookmarklet - * @package StatusNet - * @author Sarven Capadisli - * @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 - * @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() - { - } -} diff --git a/js/util.js b/js/util.js index 5f95595edd..5cab244bee 100644 --- a/js/util.js +++ b/js/util.js @@ -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()); diff --git a/lib/installer.php b/lib/installer.php index 5e483df82c..43d0507d8f 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -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); diff --git a/lib/router.php b/lib/router.php index 3febbbeff4..888d1f28dd 100644 --- a/lib/router.php +++ b/lib/router.php @@ -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', diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 11956f054b..55d1e8e91a 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -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;