From 8fbb8b8a94482a58339845837d42c14d9c9b30a9 Mon Sep 17 00:00:00 2001
From: Chris Alfano
Date: Sat, 15 Oct 2022 10:36:28 -0500
Subject: [PATCH 1/6] fix: correct gettext syntax
---
html-templates/subtemplates/comments.tpl | 4 ++--
php-classes/Laddr/PeopleRequestHandler.php | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/html-templates/subtemplates/comments.tpl b/html-templates/subtemplates/comments.tpl
index a20d1e7b..e35ec93c 100644
--- a/html-templates/subtemplates/comments.tpl
+++ b/html-templates/subtemplates/comments.tpl
@@ -24,13 +24,13 @@
{sprintf(_("You can use %s for formatting."), $markdownTextLink)}
-
+
{else}
{capture assign=loginTextLink}{_ "Log in"}{/capture}
- {sprintf(_("$s to post a comment."), $loginTextLink)}
+ {sprintf(_("%s to post a comment."), $loginTextLink)}
{/if}
{/template}
diff --git a/php-classes/Laddr/PeopleRequestHandler.php b/php-classes/Laddr/PeopleRequestHandler.php
index 02045a43..948772d2 100644
--- a/php-classes/Laddr/PeopleRequestHandler.php
+++ b/php-classes/Laddr/PeopleRequestHandler.php
@@ -75,5 +75,10 @@ protected static function onBeforeRecordDestroyed(\ActiveRecord $Person)
foreach ($Person->ProjectMemberships as $ProjectMembership) {
$ProjectMembership->destroy();
}
+
+ // delete comments
+ foreach ($Person->Comments as $Comment) {
+ $Comment->destroy();
+ }
}
}
From 3eae6fb2bbea52d4dde5b114ddc67df38f020591 Mon Sep 17 00:00:00 2001
From: Chris Alfano
Date: Sat, 15 Oct 2022 11:50:47 -0500
Subject: [PATCH 2/6] fix: delete User->Comments relationship config in favor
of upstream changes
---
.../Emergence/People/User.config.d/laddr-profile.php | 7 -------
1 file changed, 7 deletions(-)
diff --git a/php-config/Emergence/People/User.config.d/laddr-profile.php b/php-config/Emergence/People/User.config.d/laddr-profile.php
index 1310c86b..244e31ee 100644
--- a/php-config/Emergence/People/User.config.d/laddr-profile.php
+++ b/php-config/Emergence/People/User.config.d/laddr-profile.php
@@ -39,10 +39,3 @@
],
];
User::$dynamicFields[] = 'TechTags';
-
-User::$relationships['Comments'] = [
- 'type' => 'context-children',
- 'class' => \Comment::class,
- 'contextClass' => __CLASS__,
- 'order' => ['ID' => 'DESC'],
-];
From 21cb0ece21fc9f2ad5e93053a8d7cf741606bc05 Mon Sep 17 00:00:00 2001
From: Chris Alfano
Date: Sat, 15 Oct 2022 12:01:19 -0500
Subject: [PATCH 3/6] chore(deps): bump skeleton-v2 to v2.11.1
---
.holo/sources/skeleton-v2.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.holo/sources/skeleton-v2.toml b/.holo/sources/skeleton-v2.toml
index 1b2b8449..60315022 100644
--- a/.holo/sources/skeleton-v2.toml
+++ b/.holo/sources/skeleton-v2.toml
@@ -1,3 +1,3 @@
[holosource]
url = "https://github.com/JarvusInnovations/emergence-skeleton-v2"
-ref = "refs/tags/v2.10.0"
+ref = "refs/tags/v2.11.1"
From 7608a4b7a329a0ac88f15a646a80b684b42fab91 Mon Sep 17 00:00:00 2001
From: Chris Alfano
Date: Sat, 15 Oct 2022 12:08:06 -0500
Subject: [PATCH 4/6] fix(blog): flip on/by in post byline
---
html-templates/blog/blogPost.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/html-templates/blog/blogPost.tpl b/html-templates/blog/blogPost.tpl
index ea01ff01..9f26a354 100644
--- a/html-templates/blog/blogPost.tpl
+++ b/html-templates/blog/blogPost.tpl
@@ -93,7 +93,7 @@
{capture assign=authoredDate}{timestamp $Post->Published}{/capture}
- {sprintf(_("on %s by %s"), $authorData, $authoredDate)}
+ {sprintf(_("by %1$s on %2$s"), $authorData, $authoredDate)}
{if $Post->Summary}
From 74351624c316b293be6de5e4f4e3ebfb52028e1a Mon Sep 17 00:00:00 2001
From: Chris Alfano
Date: Sat, 15 Oct 2022 12:12:59 -0500
Subject: [PATCH 5/6] fix: use absolute_url to build external links
---
html-templates/blog/blogPost.tpl | 7 ++++---
html-templates/project-updates/projectUpdates.rss.tpl | 10 +++++-----
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/html-templates/blog/blogPost.tpl b/html-templates/blog/blogPost.tpl
index 9f26a354..59b14531 100644
--- a/html-templates/blog/blogPost.tpl
+++ b/html-templates/blog/blogPost.tpl
@@ -6,7 +6,7 @@
-
+
@@ -16,7 +16,8 @@
{/if}
-
+
+
@@ -30,7 +31,7 @@
{/if}
+
{if $Project}{$Project->Title|escape} — {/if}{_ 'Project Updates'}
- http://{Site::getConfig(primary_hostname)}/project-updates{if $Project}?ProjectID={$Project->ID}{/if}
+ {escape(absolute_url(tif($Project, "/project-updates?ProjectID=$Project->ID", "/project-updates")))}
{capture assign=projectTitleText}{$Project->Title|escape}{/capture}
{capture assign=siteNameText}{Laddr::$siteName}{/capture}
{if $Project}
@@ -22,16 +22,16 @@
{foreach item=Update from=$data}
-
+
{/foreach}
{foreach item=Update from=$data}
- -
+
-
{$Update->Project->Title|escape} — {_("Update #%u")|sprintf:$Update->Number}
- http://{Site::getConfig(primary_hostname)}{$Update->getURL()}
+ {$Update->getURL()|absolute_url|escape}
{$Update->Body|escape|markdown|escape}
{personName $Update->Creator}
{date($dwoo.const.DATE_W3C, $Update->Created)}
From 200f8eb0c644a880a3113e2e1e9c12f5322d7651 Mon Sep 17 00:00:00 2001
From: Chris Alfano
Date: Sat, 15 Oct 2022 12:13:10 -0500
Subject: [PATCH 6/6] fix(blog): guard against deleted authors
---
html-templates/blog/blogPost.tpl | 4 +++-
html-templates/subtemplates/blog.tpl | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/html-templates/blog/blogPost.tpl b/html-templates/blog/blogPost.tpl
index 59b14531..cb4707c9 100644
--- a/html-templates/blog/blogPost.tpl
+++ b/html-templates/blog/blogPost.tpl
@@ -17,7 +17,9 @@
-
+ {if $Post->Author}
+
+ {/if}
diff --git a/html-templates/subtemplates/blog.tpl b/html-templates/subtemplates/blog.tpl
index 31f9c782..77f9f839 100644
--- a/html-templates/subtemplates/blog.tpl
+++ b/html-templates/subtemplates/blog.tpl
@@ -11,7 +11,9 @@
{if $showHeader}