Skip to content

Commit 96ae4c6

Browse files
Merge pull request #257 from CodeForPhilly/develop
Release: v3.1.3
2 parents 50f95f2 + 200f8eb commit 96ae4c6

File tree

7 files changed

+23
-20
lines changed

7 files changed

+23
-20
lines changed

.holo/sources/skeleton-v2.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[holosource]
22
url = "https://github.com/JarvusInnovations/emergence-skeleton-v2"
3-
ref = "refs/tags/v2.10.0"
3+
ref = "refs/tags/v2.11.1"

html-templates/blog/blogPost.tpl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="description" content="{$Post->Summary|default:$Post->Title|escape}" />
77

88
<meta property="og:site_name" content="{Laddr::$siteName|escape}" />
9-
<meta property="og:url" content="http://{Site::getConfig(primary_hostname)}{$Post->getURL()}" />
9+
<meta property="og:url" content="{absolute_url $Post->getURL()}" />
1010
<meta property="og:type" content="article">
1111
<meta property="og:title" content="{$Post->Title|escape}" />
1212

@@ -16,7 +16,10 @@
1616
{/if}
1717

1818
<meta property="article:published_time" content="{date($.const.DATE_W3C, $Post->Published)}" />
19-
<meta property="article:author" content="http://{Site::getConfig(primary_hostname)}{$Post->Author->getURL()}" />
19+
20+
{if $Post->Author}
21+
<meta property="article:author" content="{absolute_url $Post->Author->getURL()}" />
22+
{/if}
2023

2124
<meta name="twitter:card" content="summary" />
2225
<meta name="twitter:title" content="{$Post->Title|escape}" />
@@ -30,7 +33,7 @@
3033
{/if}
3134

3235
<?php
33-
36+
3437
// find best media in post
3538
$imageUrl = null;
3639

@@ -93,7 +96,7 @@
9396
{capture assign=authoredDate}<a href="{$Post->getURL()}">{timestamp $Post->Published}</a>{/capture}
9497

9598
<div class="article-meta">
96-
{sprintf(_("on %s by %s"), $authorData, $authoredDate)}
99+
{sprintf(_("by %1$s on %2$s"), $authorData, $authoredDate)}
97100
</div>
98101

99102
{if $Post->Summary}

html-templates/project-updates/projectUpdates.rss.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
{load_templates subtemplates/personName.tpl}
99

1010

11-
<channel rdf:about="http://{$.server.HTTP_HOST}{$.server.REQUEST_URI|escape}">
11+
<channel rdf:about="{$.server.REQUEST_URI|absolute_url|escape}">
1212
<title>{if $Project}{$Project->Title|escape} &#8212; {/if}{_ 'Project Updates'}</title>
13-
<link>http://{Site::getConfig(primary_hostname)}/project-updates{if $Project}?ProjectID={$Project->ID}{/if}</link>
13+
<link>{escape(absolute_url(tif($Project, "/project-updates?ProjectID=$Project->ID", "/project-updates")))}</link>
1414
{capture assign=projectTitleText}{$Project->Title|escape}{/capture}
1515
{capture assign=siteNameText}{Laddr::$siteName}{/capture}
1616
{if $Project}
@@ -22,16 +22,16 @@
2222
<items>
2323
<rdf:Seq>
2424
{foreach item=Update from=$data}
25-
<rdf:li rdf:resource="http://{Site::getConfig(primary_hostname)}{$Update->getURL()}"/>
25+
<rdf:li rdf:resource="{$Update->getURL()|absolute_url|escape}"/>
2626
{/foreach}
2727
</rdf:Seq>
2828
</items>
2929
</channel>
3030

3131
{foreach item=Update from=$data}
32-
<item rdf:about="http://{Site::getConfig(primary_hostname)}{$Update->getURL()}">
32+
<item rdf:about="{$Update->getURL()|absolute_url|escape}">
3333
<title>{$Update->Project->Title|escape} &#8212; {_("Update #%u")|sprintf:$Update->Number}</title>
34-
<link>http://{Site::getConfig(primary_hostname)}{$Update->getURL()}</link>
34+
<link>{$Update->getURL()|absolute_url|escape}</link>
3535
<description>{$Update->Body|escape|markdown|escape}</description>
3636
<dc:creator>{personName $Update->Creator}</dc:creator>
3737
<dc:date>{date($dwoo.const.DATE_W3C, $Update->Created)}</dc:date>

html-templates/subtemplates/blog.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
{if $showHeader}
1212
<header class="post-header">
1313
<{$headingLevel} class="post-title">
14-
<a class="pull-right" href="{$Post->Author->getURL()}" data-toggle="tooltip" title="{personName $Post->Author}">{avatar $Post->Author size=64}</a>
14+
{if $Post->Author}
15+
<a class="pull-right" href="{$Post->Author->getURL()}" data-toggle="tooltip" title="{personName $Post->Author}">{avatar $Post->Author size=64}</a>
16+
{/if}
1517
<a href="{$Post->getURL()}">{$Post->Title|escape}</a>
1618
</{$headingLevel}>
1719
</header>

html-templates/subtemplates/comments.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
{sprintf(_("You can use %s for formatting."), $markdownTextLink)}
2525
</p>
2626

27-
<button type="submit" class="btn btn-primary">{tif $Comment ? {_ Edit} : {_ Post}} {_ Comment}</button>
27+
<button type="submit" class="btn btn-primary">{tif $Comment ? _('Edit Comment') : _('Post Comment')}</button>
2828
</div>
2929
</fieldset>
3030
</form>
3131
{else}
3232
{capture assign=loginTextLink}<a class="button primary" href="/login?return={$Context->getURL()|escape:url}">{_ "Log in"}</a>{/capture}
33-
<p class="login-hint well">{sprintf(_("$s to post a comment."), $loginTextLink)}</p>
33+
<p class="login-hint well">{sprintf(_("%s to post a comment."), $loginTextLink)}</p>
3434
{/if}
3535
{/template}
3636

php-classes/Laddr/PeopleRequestHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,10 @@ protected static function onBeforeRecordDestroyed(\ActiveRecord $Person)
7575
foreach ($Person->ProjectMemberships as $ProjectMembership) {
7676
$ProjectMembership->destroy();
7777
}
78+
79+
// delete comments
80+
foreach ($Person->Comments as $Comment) {
81+
$Comment->destroy();
82+
}
7883
}
7984
}

php-config/Emergence/People/User.config.d/laddr-profile.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,3 @@
3939
],
4040
];
4141
User::$dynamicFields[] = 'TechTags';
42-
43-
User::$relationships['Comments'] = [
44-
'type' => 'context-children',
45-
'class' => \Comment::class,
46-
'contextClass' => __CLASS__,
47-
'order' => ['ID' => 'DESC'],
48-
];

0 commit comments

Comments
 (0)