diff --git a/actions/all.php b/actions/all.php index 19413076b5..84e4dd5305 100644 --- a/actions/all.php +++ b/actions/all.php @@ -170,12 +170,6 @@ class AllAction extends ShowstreamAction } $ibs->show(); } - // XXX: make this a little more convenient - - if (!common_config('performance', 'high')) { - $pop = new InboxTagCloudSection($this, $this->target); - $pop->show(); - } } } diff --git a/actions/attachment.php b/actions/attachment.php index 3ec837a511..3f2ae5c1ce 100644 --- a/actions/attachment.php +++ b/actions/attachment.php @@ -132,9 +132,5 @@ class AttachmentAction extends ManagedAction function showSections() { $ns = new AttachmentNoticeSection($this); $ns->show(); - if (!common_config('performance', 'high')) { - $atcs = new AttachmentTagCloudSection($this); - $atcs->show(); - } } } diff --git a/actions/groupbyid.php b/actions/groupbyid.php index de87ec5c67..ed4ec979a9 100644 --- a/actions/groupbyid.php +++ b/actions/groupbyid.php @@ -42,7 +42,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -class GroupbyidAction extends ManagedAction +class GroupbyidAction extends ShowgroupAction { /** group we're viewing. */ protected $group = null; @@ -55,10 +55,10 @@ class GroupbyidAction extends ManagedAction protected function doPreparation() { $this->group = User_group::getByID($this->arg('id')); - } + $this->target = $this->group->getProfile(); - public function showPage() - { - common_redirect($this->group->homeUrl(), 303); + if ($this->target->isLocal()) { + common_redirect($this->target->getUrl()); + } } } diff --git a/actions/groupmembers.php b/actions/groupmembers.php index 44c4dd6f99..b4c1ec1cd1 100644 --- a/actions/groupmembers.php +++ b/actions/groupmembers.php @@ -27,12 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -require_once(INSTALLDIR.'/lib/profilelist.php'); -require_once INSTALLDIR.'/lib/publicgroupnav.php'; +if (!defined('GNUSOCIAL)')) { exit(1); } /** * List of group members @@ -52,15 +47,6 @@ class GroupmembersAction extends GroupAction return true; } - protected function prepare(array $args=array()) - { - parent::prepare($args); - - $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; - - return true; - } - function title() { if ($this->page == 1) { diff --git a/actions/public.php b/actions/public.php index 000f82cb93..a2958e8806 100644 --- a/actions/public.php +++ b/actions/public.php @@ -86,12 +86,6 @@ class PublicAction extends SitestreamAction $ibs->show(); } - $p = Profile::current(); - - if (!common_config('performance', 'high')) { - $cloud = new PublicTagCloudSection($this); - $cloud->show(); - } $feat = new FeaturedUsersSection($this); $feat->show(); } diff --git a/actions/showgroup.php b/actions/showgroup.php index 8770e6cc8b..8cc65aa906 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -76,79 +76,15 @@ class ShowgroupAction extends GroupAction } } - /** - * Prepare the action - * - * Reads and validates arguments and instantiates the attributes. - * - * @param array $args $_REQUEST args - * - * @return boolean success flag - */ - protected function prepare(array $args=array()) + public function getStream() { - parent::prepare($args); - - $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; - if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) { $stream = new GroupNoticeStream($this->group, $this->scoped); } else { $stream = new ThreadingGroupNoticeStream($this->group, $this->scoped); } - $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1); - - common_set_returnto($this->selfUrl()); - - return true; - } - - /** - * Handle the request - * - * Shows a profile for the group, some controls, and a list of - * group notices. - * - * @return void - */ - protected function handle() - { - parent::handle(); - $this->showPage(); - } - - /** - * Show the page content - * - * Shows a group profile and a list of group notices - */ - function showContent() - { - $this->showGroupNotices(); - } - - /** - * Show the group notices - * - * @return void - */ - function showGroupNotices() - { - if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) { - $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE)); - } else { - $nl = new ThreadedNoticeList($this->notice, $this, $this->scoped); - } - - $cnt = $nl->show(); - - $this->pagination($this->page > 1, - $cnt > NOTICES_PER_PAGE, - $this->page, - 'showgroup', - array('nickname' => $this->group->nickname)); + return $stream; } /** diff --git a/actions/showstream.php b/actions/showstream.php index 97b21b1286..1e70ecd3ac 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -251,15 +251,6 @@ class ShowstreamAction extends NoticestreamAction $this->elementEnd('div'); } - function showSections() - { - parent::showSections(); - if (!common_config('performance', 'high')) { - $cloud = new PersonalTagCloudSection($this->target, $this); - $cloud->show(); - } - } - function noticeFormOptions() { $options = parent::noticeFormOptions(); diff --git a/actions/tag.php b/actions/tag.php index 751e8dcec5..ccd2c7fbe0 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -34,7 +34,7 @@ class TagAction extends ManagedAction $this->tag = common_canonical_tag($taginput); if (empty($this->tag)) { - common_redirect(common_local_url('publictagcloud'), 301); + throw new ClientException(_('No valid tag data.')); } // after common_canonical_tag we have a lowercase, no-specials tag string diff --git a/classes/Notice.php b/classes/Notice.php index 587ca6a073..d5a0e5f6d2 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -2623,6 +2623,13 @@ class Notice extends Managed_DataObject return !empty($this->repeat_of); } + public function isRepeated() + { + $n = new Notice(); + $n->repeat_of = $this->getID(); + return $n->find() && $n->N > 0; + } + /** * Get the list of hash tags saved with this notice. * diff --git a/lib/attachment.php b/lib/attachment.php index ac0a32aeb5..d001337dd6 100644 --- a/lib/attachment.php +++ b/lib/attachment.php @@ -35,7 +35,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } */ class Attachment extends AttachmentListItem { - function showLink() { + function showNoticeAttachment() { if (Event::handle('StartShowAttachmentLink', array($this->out, $this->attachment))) { $this->out->elementStart('div', array('id' => 'attachment_view', 'class' => 'h-entry')); diff --git a/lib/attachmentlistitem.php b/lib/attachmentlistitem.php index 934c5f74dd..fe11dbe639 100644 --- a/lib/attachmentlistitem.php +++ b/lib/attachmentlistitem.php @@ -86,28 +86,26 @@ class AttachmentListItem extends Widget } function linkAttr() { - return array('class' => 'attachment', + return array( + 'class' => 'u-url', 'href' => $this->attachment->getAttachmentUrl(), - 'id' => 'attachment-' . $this->attachment->getID(), 'title' => $this->linkTitle()); } - function showLink() { - $this->out->elementStart('a', $this->linkAttr()); - $this->out->element('span', null, $this->linkTitle()); - $this->showRepresentation(); - $this->out->elementEnd('a'); - } - function showNoticeAttachment() { - $this->showLink(); + $this->showRepresentation(); } function showRepresentation() { $enclosure = $this->attachment->getEnclosure(); if (Event::handle('StartShowAttachmentRepresentation', array($this->out, $this->attachment))) { + + $this->out->elementStart('label'); + $this->out->element('a', $this->linkAttr(), $this->title()); + $this->out->elementEnd('label'); + if (!empty($enclosure->mimetype)) { // First, prepare a thumbnail if it exists. $thumb = null; diff --git a/lib/dbqueuemanager.php b/lib/dbqueuemanager.php index 4440a4d930..6a2952c28f 100644 --- a/lib/dbqueuemanager.php +++ b/lib/dbqueuemanager.php @@ -95,11 +95,14 @@ class DBQueueManager extends QueueManager } catch (NoQueueHandlerException $e) { $this->noHandlerFound($qi, $rep); return true; + } catch (NoResultException $e) { + $this->_log(LOG_ERR, "[{$qi->transport}:$rep] ".get_class($e).' thrown ('._ve($e->getMessage()).'), ignoring queue_item '._ve($qi->getID())); + $result = true; } catch (AlreadyFulfilledException $e) { - $this->_log(LOG_ERR, "[{$qi->transport}:$rep] AlreadyFulfilledException thrown: {$e->getMessage()}"); + $this->_log(LOG_ERR, "[{$qi->transport}:$rep] ".get_class($e).' thrown ('._ve($e->getMessage()).'), ignoring queue_item '._ve($qi->getID())); $result = true; } catch (Exception $e) { - $this->_log(LOG_ERR, "[{$qi->transport}:$rep] Exception thrown: {$e->getMessage()}"); + $this->_log(LOG_ERR, "[{$qi->transport}:$rep] Exception (".get_class($e).') thrown: '._ve($e->getMessage())); $result = false; } diff --git a/lib/groupaction.php b/lib/groupaction.php index 0886460737..2fcec360bc 100644 --- a/lib/groupaction.php +++ b/lib/groupaction.php @@ -40,25 +40,23 @@ define('MEMBERS_PER_SECTION', 27); * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -class GroupAction extends Action +class GroupAction extends ShowstreamAction { protected $group; - protected function prepare(array $args=array()) + protected function doPreparation() { - parent::prepare($args); - $nickname_arg = $this->arg('nickname'); $nickname = common_canonical_nickname($nickname_arg); // Permanent redirect on non-canonical nickname - if ($nickname_arg != $nickname) { + if ($nickname_arg !== $nickname) { $args = array('nickname' => $nickname); if ($this->page != 1) { $args['page'] = $this->page; } - common_redirect(common_local_url('showgroup', $args), 301); + common_redirect(common_local_url($this->getActionName(), $args), 301); } if (!$nickname) { @@ -79,15 +77,16 @@ class GroupAction extends Action } else { common_log(LOG_NOTICE, "Couldn't find local group for nickname '$nickname'"); // TRANS: Client error displayed if no remote group with a given name was found requesting group page. - $this->clientError(_('No such group.'), 404); + throw new ClientException(_('No such group.'), 404); } } $this->group = User_group::getKV('id', $local->group_id); + $this->target = $this->group->getProfile(); if (!$this->group instanceof User_group) { // TRANS: Client error displayed if no local group with a given name was found requesting group page. - $this->clientError(_('No such group.'), 404); + throw new ClientException(_('No such group.'), 404); } } @@ -105,18 +104,12 @@ class GroupAction extends Action function showSections() { $this->showMembers(); - $cur = common_current_user(); - if ($cur && $cur->isAdmin($this->group)) { + if ($this->scoped instanceof Profile && $this->scoped->isAdmin($this->group)) { $this->showPending(); $this->showBlocked(); } $this->showAdmins(); - - if (!common_config('performance', 'high')) { - $cloud = new GroupTagCloudSection($this, $this->group); - $cloud->show(); - } } /** diff --git a/lib/inlineattachmentlistitem.php b/lib/inlineattachmentlistitem.php index 10b9db202b..5c918bb86e 100644 --- a/lib/inlineattachmentlistitem.php +++ b/lib/inlineattachmentlistitem.php @@ -31,11 +31,6 @@ if (!defined('GNUSOCIAL')) { exit(1); } class InlineAttachmentListItem extends AttachmentListItem { - function showLink() { - $this->out->element('a', $this->linkAttr(), $this->title()); - $this->showRepresentation(); - } - /** * start a single notice. * @@ -45,7 +40,10 @@ class InlineAttachmentListItem extends AttachmentListItem { // XXX: RDFa // TODO: add notice_type class e.g., notice_video, notice_image - $this->out->elementStart('li', array('class' => 'inline-attachment')); + $this->out->elementStart('li', + array('class' => 'inline-attachment', + 'id' => 'attachment-' . $this->attachment->getID(), + )); } /** diff --git a/lib/noticelistitem.php b/lib/noticelistitem.php index 45f39c456d..1a629cf372 100644 --- a/lib/noticelistitem.php +++ b/lib/noticelistitem.php @@ -286,7 +286,7 @@ class NoticeListItem extends Widget $this->out->elementStart('ul', 'addressees'); $first = true; foreach ($pa as $addr) { - $this->out->elementStart('li', 'h-card'); + $this->out->elementStart('li'); $text = $addr['text']; unset($addr['text']); $this->out->element('a', $addr, $text); @@ -304,12 +304,12 @@ class NoticeListItem extends Widget $attentions = $this->getAttentionProfiles(); foreach ($attentions as $attn) { - $class = $attn->isGroup() ? 'group' : 'account'; - $profileurl = $attn->getUri(); - if (common_valid_http_url($profileurl)) { - $class .= ' u-uid'; + if ($attn->isGroup()) { + $class = 'group'; + $profileurl = common_local_url('groupbyid', array('id' => $attn->getGroup()->getID())); } else { - $profileurl = $attn->getUrl(); + $class = 'account'; + $profileurl = common_local_url('userbyid', array('id' => $attn->getID())); } $this->pa[] = array('href' => $profileurl, 'title' => $attn->getNickname(), diff --git a/lib/profileaction.php b/lib/profileaction.php index 22c960406a..64087cf312 100644 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@ -55,7 +55,7 @@ abstract class ProfileAction extends ManagedAction $nickname = common_canonical_nickname($nickname_arg); // Permanent redirect on non-canonical nickname - if ($nickname_arg != $nickname) { + if ($nickname_arg !== $nickname) { $args = array('nickname' => $nickname); if ($this->arg('page') && $this->arg('page') != 1) { $args['page'] = $this->arg['page']; @@ -83,7 +83,7 @@ abstract class ProfileAction extends ManagedAction // this will call ->doPreparation() which child classes use to set $this->target parent::prepare($args); - if ($this->target->hasRole(Profile_role::SILENCED) + if ($this->target->isPerson() && $this->target->hasRole(Profile_role::SILENCED) && (!$this->scoped instanceof Profile || !$this->scoped->hasRight(Right::SILENCEUSER))) { throw new ClientException(_('This profile has been silenced by site moderators'), 403); } diff --git a/lib/publicgroupnav.php b/lib/publicgroupnav.php index 620a61ddd9..ef342839d8 100644 --- a/lib/publicgroupnav.php +++ b/lib/publicgroupnav.php @@ -77,13 +77,6 @@ class PublicGroupNav extends Menu // TRANS: Menu item title in search group navigation panel. _('User groups'), $this->actionName == 'groups', 'nav_groups'); - if (!common_config('performance', 'high')) { - // TRANS: Menu item in search group navigation panel. - $this->out->menuItem(common_local_url('publictagcloud'), _m('MENU','Recent tags'), - // TRANS: Menu item title in search group navigation panel. - _('Recent tags'), $this->actionName == 'publictagcloud', 'nav_recent-tags'); - } - if (count(common_config('nickname', 'featured')) > 0) { // TRANS: Menu item in search group navigation panel. $this->out->menuItem(common_local_url('featured'), _m('MENU','Featured'), diff --git a/lib/router.php b/lib/router.php index b01c9a7677..cd464d841c 100644 --- a/lib/router.php +++ b/lib/router.php @@ -260,12 +260,6 @@ class Router array('action' => 'userbyid'), array('id' => '[0-9]+')); - if (!common_config('performance', 'high')) { - $m->connect('tags/', array('action' => 'publictagcloud')); - $m->connect('tag/', array('action' => 'publictagcloud')); - $m->connect('tags', array('action' => 'publictagcloud')); - $m->connect('tag', array('action' => 'publictagcloud')); - } $m->connect('tag/:tag/rss', array('action' => 'tagrss'), array('tag' => self::REGEX_TAG)); diff --git a/lib/util.php b/lib/util.php index 9815916ad1..aa0d5bfe76 100644 --- a/lib/util.php +++ b/lib/util.php @@ -581,9 +581,6 @@ function common_canonical_email($email) return $email; } -<<<<<<< HEAD -function common_purify($html, array $args=array()) -======= function common_to_alphanumeric($str) { $filtered = preg_replace('/[^A-Za-z0-9]\s*/', '', $str); @@ -593,8 +590,7 @@ function common_to_alphanumeric($str) return $filtered; } -function common_purify($html) ->>>>>>> upstream/master +function common_purify($html, array $args=array()) { require_once INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php'; diff --git a/plugins/Oembed/OembedPlugin.php b/plugins/Oembed/OembedPlugin.php index 187b4b9819..64e3e8940c 100644 --- a/plugins/Oembed/OembedPlugin.php +++ b/plugins/Oembed/OembedPlugin.php @@ -176,7 +176,7 @@ class OembedPlugin extends Plugin } $file->setTitle($oembed_data->title); } catch (Exception $e) { - common_log(LOG_WARN, sprintf(__METHOD__.': %s thrown when getting oEmbed data: %s', get_class($e), _ve($e->getMessage()))); + common_log(LOG_WARNING, sprintf(__METHOD__.': %s thrown when getting oEmbed data: %s', get_class($e), _ve($e->getMessage()))); return true; } diff --git a/plugins/Oembed/css/oembed.css b/plugins/Oembed/css/oembed.css index 68227e5dab..9750f02779 100644 --- a/plugins/Oembed/css/oembed.css +++ b/plugins/Oembed/css/oembed.css @@ -2,7 +2,6 @@ float: left; margin-bottom: 1ex; margin-right: 1em; - padding-bottom: 1ex; } .p-author.oembed { diff --git a/plugins/TagCloud/TagCloudPlugin.php b/plugins/TagCloud/TagCloudPlugin.php new file mode 100644 index 0000000000..c616be75fd --- /dev/null +++ b/plugins/TagCloud/TagCloudPlugin.php @@ -0,0 +1,70 @@ + + * @copyright 2016 Free Software Foundation, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 + * @link http://gnu.io/social/ + */ + +if (!defined('GNUSOCIAL')) { exit(1); } + +class TagCloudPlugin extends Plugin { + + public function onRouterInitialized(URLMapper $m) + { + $m->connect('tags/', array('action' => 'publictagcloud')); + $m->connect('tag/', array('action' => 'publictagcloud')); + $m->connect('tags', array('action' => 'publictagcloud')); + $m->connect('tag', array('action' => 'publictagcloud')); + } + + public function onEndPublicGroupNav(Menu $menu) + { + // TRANS: Menu item in search group navigation panel. + $menu->out->menuItem(common_local_url('publictagcloud'), _m('MENU','Recent tags'), + // TRANS: Menu item title in search group navigation panel. + _('Recent tags'), $menu->actionName === 'publictagcloud', 'nav_recent-tags'); + } + + public function onEndShowSections(Action $action) + { + $cloud = null; + + switch (true) { + case $action instanceof AllAction: + $cloud = new InboxTagCloudSection($action, $action->getTarget()); + break; + case $action instanceof AttachmentAction: + $cloud = new AttachmentTagCloudSection($action); + break; + case $action instanceof PublicAction: + $cloud = new PublicTagCloudSection($action); + break; + case $action instanceof ShowstreamAction: + $cloud = new PersonalTagCloudSection($action, $action->getTarget()); + break; + case $action instanceof GroupAction: + $cloud = new GroupTagCloudSection($action, $action->getGroup()); + } + + if (!is_null($cloud)) { + $cloud->show(); + } + } + + public function onPluginVersion(array &$versions) + { + $versions[] = array('name' => 'TagCloud', + 'version' => GNUSOCIAL_VERSION, + 'author' => 'Mikael Nordfeldth', + 'homepage' => 'https://gnu.io/social', + 'description' => + // TRANS: Plugin description. + _m('Adds tag clouds to stream pages')); + return true; + } +} diff --git a/actions/publictagcloud.php b/plugins/TagCloud/actions/publictagcloud.php similarity index 100% rename from actions/publictagcloud.php rename to plugins/TagCloud/actions/publictagcloud.php diff --git a/lib/attachmenttagcloudsection.php b/plugins/TagCloud/lib/attachmenttagcloudsection.php similarity index 100% rename from lib/attachmenttagcloudsection.php rename to plugins/TagCloud/lib/attachmenttagcloudsection.php diff --git a/lib/grouptagcloudsection.php b/plugins/TagCloud/lib/grouptagcloudsection.php similarity index 100% rename from lib/grouptagcloudsection.php rename to plugins/TagCloud/lib/grouptagcloudsection.php diff --git a/lib/inboxtagcloudsection.php b/plugins/TagCloud/lib/inboxtagcloudsection.php similarity index 100% rename from lib/inboxtagcloudsection.php rename to plugins/TagCloud/lib/inboxtagcloudsection.php diff --git a/lib/personaltagcloudsection.php b/plugins/TagCloud/lib/personaltagcloudsection.php similarity index 97% rename from lib/personaltagcloudsection.php rename to plugins/TagCloud/lib/personaltagcloudsection.php index 46b4661e89..e46aa2d662 100644 --- a/lib/personaltagcloudsection.php +++ b/plugins/TagCloud/lib/personaltagcloudsection.php @@ -42,7 +42,7 @@ class PersonalTagCloudSection extends TagCloudSection { protected $profile = null; - function __construct(Profile $profile, HTMLOutputter $out=null) + function __construct(HTMLOutputter $out, Profile $profile) { parent::__construct($out); $this->profile = $profile; diff --git a/lib/publictagcloudsection.php b/plugins/TagCloud/lib/publictagcloudsection.php similarity index 100% rename from lib/publictagcloudsection.php rename to plugins/TagCloud/lib/publictagcloudsection.php diff --git a/lib/subpeopletagcloudsection.php b/plugins/TagCloud/lib/subpeopletagcloudsection.php similarity index 100% rename from lib/subpeopletagcloudsection.php rename to plugins/TagCloud/lib/subpeopletagcloudsection.php diff --git a/lib/subscriberspeopleselftagcloudsection.php b/plugins/TagCloud/lib/subscriberspeopleselftagcloudsection.php similarity index 100% rename from lib/subscriberspeopleselftagcloudsection.php rename to plugins/TagCloud/lib/subscriberspeopleselftagcloudsection.php diff --git a/lib/subscriberspeopletagcloudsection.php b/plugins/TagCloud/lib/subscriberspeopletagcloudsection.php similarity index 100% rename from lib/subscriberspeopletagcloudsection.php rename to plugins/TagCloud/lib/subscriberspeopletagcloudsection.php diff --git a/lib/subscriptionspeopleselftagcloudsection.php b/plugins/TagCloud/lib/subscriptionspeopleselftagcloudsection.php similarity index 100% rename from lib/subscriptionspeopleselftagcloudsection.php rename to plugins/TagCloud/lib/subscriptionspeopleselftagcloudsection.php diff --git a/lib/subscriptionspeopletagcloudsection.php b/plugins/TagCloud/lib/subscriptionspeopletagcloudsection.php similarity index 100% rename from lib/subscriptionspeopletagcloudsection.php rename to plugins/TagCloud/lib/subscriptionspeopletagcloudsection.php diff --git a/lib/tagcloudsection.php b/plugins/TagCloud/lib/tagcloudsection.php similarity index 100% rename from lib/tagcloudsection.php rename to plugins/TagCloud/lib/tagcloudsection.php diff --git a/plugins/WebFinger/WebFingerPlugin.php b/plugins/WebFinger/WebFingerPlugin.php index 03a8c140b7..d8ddcb1ce2 100644 --- a/plugins/WebFinger/WebFingerPlugin.php +++ b/plugins/WebFinger/WebFingerPlugin.php @@ -35,7 +35,7 @@ class WebFingerPlugin extends Plugin const OAUTH_REQUEST_TOKEN_REL = 'http://apinamespace.org/oauth/request_token'; const OAUTH_AUTHORIZE_REL = 'http://apinamespace.org/oauth/authorize'; - public function onRouterInitialized($m) + public function onRouterInitialized(URLMapper $m) { $m->connect('.well-known/host-meta', array('action' => 'hostmeta')); $m->connect('.well-known/host-meta.:format', diff --git a/theme/base/css/display.css b/theme/base/css/display.css index e87e87fbf8..dd007e6972 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -812,24 +812,34 @@ position:static; .notice.h-entry .attachments { position: relative; margin-bottom: 1em; + list-style-type: none; } -.notice.h-entry .attachments > * { +.notice.h-entry .attachments > li { clear: both; + background-color: #f9f9f9; + border: 1px lightgrey solid; + margin-bottom: 1ex; + padding: 1ex 1ex 0 1ex; + overflow: auto; + text-align: center; + position: relative; +} + +.notice.h-entry .attachments .inline-attachment > article { + text-align: left; } .notice.h-entry .attachments .inline-attachment > * { height: auto; + margin-bottom: 1ex; max-width: 100%; } -.notice.h-entry .attachments .inline-attachment > a { +.notice.h-entry .attachments .inline-attachment > label { font-size: 0.8em; line-height: 16px; height: 16px; } -.notice.h-entry .attachments .inline-attachment > img { - display: block; -} #attachments { clear:both; diff --git a/theme/neo-quitter/css/display.css b/theme/neo-quitter/css/display.css index 0500395514..a5dff1853b 100644 --- a/theme/neo-quitter/css/display.css +++ b/theme/neo-quitter/css/display.css @@ -1193,35 +1193,6 @@ body#outbox #core ul.messages .notice:before { /* notices etc */ -.notice .h-entry { - overflow:visible; -} - -.notice.h-entry .attachments { - clear: both; - margin-top: -16px; - position: relative; - top: 0; - z-index: 1; -} - -.notice .attachments .inline-attachment { - color: transparent; - font-size: 0; - line-height: 0; - list-style: none outside none; - margin-bottom: 0; -} - -.notice .attachments .inline-attachment img { - color: transparent; - font-size: 0; - line-height: 0; - list-style: none outside none; - margin-bottom: 0; - padding-top:20px; -} - #page_notice { clear: both; margin-bottom: 18px;