From: Mikael Nordfeldth Date: Thu, 1 Oct 2015 19:40:05 +0000 (+0200) Subject: InlineAttachmentListItem put into its own file X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5b7deee0cc90839bbbc133a0c2c8a0019d32aba9;p=quix0rs-gnu-social.git InlineAttachmentListItem put into its own file --- diff --git a/lib/inlineattachmentlist.php b/lib/inlineattachmentlist.php index 410b3b838d..40ec114ad8 100644 --- a/lib/inlineattachmentlist.php +++ b/lib/inlineattachmentlist.php @@ -27,9 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } class InlineAttachmentList extends AttachmentList { @@ -51,35 +49,3 @@ class InlineAttachmentList extends AttachmentList return new InlineAttachmentListItem($attachment, $this->out); } } - -class InlineAttachmentListItem extends AttachmentListItem -{ - function showLink() { - $this->out->element('a', $this->linkAttr(), $this->title()); - $this->showRepresentation(); - } - - /** - * start a single notice. - * - * @return void - */ - function showStart() - { - // XXX: RDFa - // TODO: add notice_type class e.g., notice_video, notice_image - $this->out->elementStart('li', array('class' => 'inline-attachment')); - } - - /** - * finish the notice - * - * Close the last elements in the notice list item - * - * @return void - */ - function showEnd() - { - $this->out->elementEnd('li'); - } -} diff --git a/lib/inlineattachmentlistitem.php b/lib/inlineattachmentlistitem.php new file mode 100644 index 0000000000..10b9db202b --- /dev/null +++ b/lib/inlineattachmentlistitem.php @@ -0,0 +1,62 @@ +. + * + * @category UI + * @package StatusNet + * @author Brion Vibber + * @copyright 2010 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('GNUSOCIAL')) { exit(1); } + +class InlineAttachmentListItem extends AttachmentListItem +{ + function showLink() { + $this->out->element('a', $this->linkAttr(), $this->title()); + $this->showRepresentation(); + } + + /** + * start a single notice. + * + * @return void + */ + function showStart() + { + // XXX: RDFa + // TODO: add notice_type class e.g., notice_video, notice_image + $this->out->elementStart('li', array('class' => 'inline-attachment')); + } + + /** + * finish the notice + * + * Close the last elements in the notice list item + * + * @return void + */ + function showEnd() + { + $this->out->elementEnd('li'); + } +}