From f0abc0fe15a54da468cf37e748041bba4f362e53 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 29 Oct 2009 13:18:51 +0100 Subject: Updated bookmarklet. Created its own action --- actions/bookmarklet.php | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 actions/bookmarklet.php (limited to 'actions') diff --git a/actions/bookmarklet.php b/actions/bookmarklet.php new file mode 100644 index 000000000..f253399e4 --- /dev/null +++ b/actions/bookmarklet.php @@ -0,0 +1,75 @@ +. + * + * @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() + { + $this->element('title', null, _('Post to '.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() + { + } +} + -- cgit v1.2.3-54-g00ecf From 968389fb45346c77799d3ba2f787c9bcb3971173 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 29 Oct 2009 13:24:06 +0100 Subject: Don't include site in gettext --- actions/bookmarklet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/bookmarklet.php b/actions/bookmarklet.php index f253399e4..0603a7456 100644 --- a/actions/bookmarklet.php +++ b/actions/bookmarklet.php @@ -47,7 +47,7 @@ class BookmarkletAction extends NewnoticeAction { function showTitle() { - $this->element('title', null, _('Post to '.common_config('site', 'name'))); + $this->element('title', null, _('Post to ').common_config('site', 'name')); } function showHeader() -- cgit v1.2.3-54-g00ecf From 201cbb56b6faa33b814344034954a9efdde65e49 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 29 Oct 2009 14:29:52 -0400 Subject: Don't spew warnings for URL shortener plugins that don't declare if they're free services. --- actions/othersettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/othersettings.php b/actions/othersettings.php index 011b4fc83..d32a2d651 100644 --- a/actions/othersettings.php +++ b/actions/othersettings.php @@ -103,7 +103,7 @@ class OthersettingsAction extends AccountSettingsAction foreach($_shorteners as $name=>$value) { $services[$name]=$name; - if($value['info']['freeService']){ + if(!empty($value['info']['freeService'])){ // I18N $services[$name].=' (free service)'; } -- cgit v1.2.3-54-g00ecf From e88dd2d087bfcd4ae28ceebb833b1f02693dd3f1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 29 Oct 2009 14:34:08 -0400 Subject: fix uninitialized variables in showstream.php --- actions/showstream.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'actions') diff --git a/actions/showstream.php b/actions/showstream.php index b3a9b1f05..de7100b1d 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -348,6 +348,8 @@ class ShowstreamAction extends ProfileAction { if (Event::handle('StartProfilePageActionsSection', array(&$this, $this->profile))) { + $cur = common_current_user(); + $this->elementStart('div', 'entity_actions'); $this->element('h2', null, _('User actions')); $this->elementStart('ul'); @@ -379,21 +381,21 @@ class ShowstreamAction extends ProfileAction } $this->elementEnd('li'); - if ($cur->mutuallySubscribed($user)) { + if ($cur->mutuallySubscribed($this->user)) { // message $this->elementStart('li', 'entity_send-a-message'); - $this->element('a', array('href' => common_local_url('newmessage', array('to' => $user->id)), + $this->element('a', array('href' => common_local_url('newmessage', array('to' => $this->user->id)), 'title' => _('Send a direct message to this user')), _('Message')); $this->elementEnd('li'); // nudge - if ($user->email && $user->emailnotifynudge) { + if ($this->user->email && $this->user->emailnotifynudge) { $this->elementStart('li', 'entity_nudge'); - $nf = new NudgeForm($this, $user); + $nf = new NudgeForm($this, $this->user); $nf->show(); $this->elementEnd('li'); } -- cgit v1.2.3-54-g00ecf