Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 2021 17:33:54 +0000 (UTC)
From:      Michael Gmelin <grembo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r560315 - in head/devel/phabricator: . files
Message-ID:  <202101041733.104HXs5X016671@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grembo
Date: Mon Jan  4 17:33:54 2021
New Revision: 560315
URL: https://svnweb.freebsd.org/changeset/ports/560315

Log:
  Add patch to fix embeded pholio mock image selection.
  
  See:
  https://discourse.phabricator-community.org/t/patch-pholiomockembedview-image-specification-broken/4482

Added:
  head/devel/phabricator/files/patch-src_applications_pholio_remarkup_PholioRemarkupRule.php   (contents, props changed)
  head/devel/phabricator/files/patch-src_applications_pholio_view_PholioMockEmbedView.php   (contents, props changed)
  head/devel/phabricator/files/patch-src_docs_user_userguide_remarkup.diviner   (contents, props changed)
Modified:
  head/devel/phabricator/Makefile

Modified: head/devel/phabricator/Makefile
==============================================================================
--- head/devel/phabricator/Makefile	Mon Jan  4 16:37:18 2021	(r560314)
+++ head/devel/phabricator/Makefile	Mon Jan  4 17:33:54 2021	(r560315)
@@ -2,6 +2,7 @@
 
 PORTNAME=	phabricator
 PORTVERSION=	20201119
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMESUFFIX=	${PHP_PKGNAMESUFFIX}
 

Added: head/devel/phabricator/files/patch-src_applications_pholio_remarkup_PholioRemarkupRule.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/phabricator/files/patch-src_applications_pholio_remarkup_PholioRemarkupRule.php	Mon Jan  4 17:33:54 2021	(r560315)
@@ -0,0 +1,11 @@
+--- src/applications/pholio/remarkup/PholioRemarkupRule.php.orig	2020-11-19 21:48:33 UTC
++++ src/applications/pholio/remarkup/PholioRemarkupRule.php
+@@ -75,6 +75,8 @@ final class PholioRemarkupRule extends PhabricatorObje
+       $opts = $parser->parse(substr($options, 1));
+ 
+       if (isset($opts['image'])) {
++        // PholioMockEmbedView shows only the first image passed.
++        // Keep "&" syntax for backwards compatibility.
+         $images = array_unique(
+           explode('&', preg_replace('/\s+/', '', $opts['image'])));
+ 

Added: head/devel/phabricator/files/patch-src_applications_pholio_view_PholioMockEmbedView.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/phabricator/files/patch-src_applications_pholio_view_PholioMockEmbedView.php	Mon Jan  4 17:33:54 2021	(r560315)
@@ -0,0 +1,12 @@
+--- src/applications/pholio/view/PholioMockEmbedView.php.orig	2020-11-19 21:48:33 UTC
++++ src/applications/pholio/view/PholioMockEmbedView.php
+@@ -25,7 +25,8 @@ final class PholioMockEmbedView extends AphrontView {
+     $thumbnail = null;
+     if (!empty($this->images)) {
+       $images_to_show = array_intersect_key(
+-        $this->mock->getActiveImages(), array_flip($this->images));
++        mpull($mock->getActiveImages(), null, 'getID'),
++        array_flip($this->images));
+     }
+ 
+     $xform = PhabricatorFileTransform::getTransformByKey(

Added: head/devel/phabricator/files/patch-src_docs_user_userguide_remarkup.diviner
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/phabricator/files/patch-src_docs_user_userguide_remarkup.diviner	Mon Jan  4 17:33:54 2021	(r560315)
@@ -0,0 +1,20 @@
+--- src/docs/user/userguide/remarkup.diviner.orig	2020-11-19 21:48:33 UTC
++++ src/docs/user/userguide/remarkup.diviner
+@@ -393,14 +393,13 @@ You can embed a Pholio mock by using braces to refer t
+ 
+   {M123}
+ 
+-By default the first four images from the mock set are displayed. This behavior
++By default the first image from the mock is are displayed. This behavior
+ can be overridden with the **image** option. With the **image** option you can
+-provide one or more image IDs to display.
++provide an image ID to display.
+ 
+-You can set the image (or images) to display like this:
++You can set the image to display like this:
+ 
+   {M123, image=12345}
+-  {M123, image=12345 & 6789}
+ 
+ == Embedding Pastes
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101041733.104HXs5X016671>