Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix issue of 2.1 compatibility due to nested placeholder issue

  • Loading branch information...
commit 218bb3037ddbfe4eec24127b0436cd5e180e6113 1 parent 051cbe9
Shaun McCormick authored
View
2  _build/build.transport.php
@@ -36,7 +36,7 @@
/* define package */
define('PKG_NAME','Quip');
define('PKG_NAME_LOWER','quip');
-define('PKG_VERSION','2.0.1');
+define('PKG_VERSION','2.0.2');
define('PKG_RELEASE','pl');
/* define sources */
View
14 core/components/quip/elements/snippets/snippet.quip.php
@@ -227,8 +227,8 @@
'Descendants.ancestor:IN' => $ids
));
}
+$c->select($modx->getSelectColumns('quipComment','quipComment'));
$c->select(array(
- 'quipComment.*',
'Thread.resource',
'Thread.idprefix',
'Thread.existing_params',
@@ -249,15 +249,14 @@
$commentList = array();
foreach ($comments as $comment) {
$commentArray = $comment->toArray();
+ $commentArray['children'] = '';
$commentArray['alt'] = $alt ? $altRowCss : '';
$commentArray['createdon'] = strftime($dateFormat,strtotime($comment->get('createdon')));
$commentArray['url'] = $comment->makeUrl();
$commentArray['idx'] = $idx;
$commentArray['threaded'] = $threaded;
$commentArray['depth'] = $comment->get('depth');
- if ($useMargins) {
- $commentArray['depth_margin'] = (int)($threadedPostMargin * $comment->get('depth'))+7;
- }
+ $commentArray['depth_margin'] = $useMargins ? (int)($threadedPostMargin * $comment->get('depth'))+7 : 0;
$commentArray['cls'] = $rowCss.($comment->get('approved') ? '' : ' '.$unapprovedCls);
$commentArray['olCls'] = $olCss;
if ($useGravatar) {
@@ -266,6 +265,8 @@
$commentArray['gravatarSize'] = $gravatarSize;
$urlsep = $modx->getOption('xhtml_urls',$scriptProperties,true) ? '&' : '&';
$commentArray['gravatarUrl'] = $gravatarUrl.$commentArray['md5email'].'?s='.$commentArray['gravatarSize'].$urlsep.'d='.$commentArray['gravatarIcon'];
+ } else {
+ $commentArray['gravatarUrl'] = '';
}
/* check for auth */
@@ -314,6 +315,7 @@
/* get author display name */
$authorTpl = $modx->getOption('authorTpl',$scriptProperties,'quipAuthorTpl');
$nameField = $modx->getOption('nameField',$scriptProperties,'username');
+ $commentArray['authorName'] = '';
if (empty($commentArray[$nameField])) {
$commentArray['authorName'] = $quip->getChunk($authorTpl,array(
'name' => $modx->getOption('showAnonymousName',$scriptProperties,false)
@@ -328,7 +330,7 @@
if ($showWebsite && !empty($commentArray['website'])) {
$commentArray['authorName'] = $quip->getChunk($authorTpl,array(
- 'name' => $commentArray['authorName'],
+ 'name' => $commentArray[$nameField],
'url' => $commentArray['website'],
));
}
@@ -341,6 +343,8 @@
$params['quip_parent'] = $comment->get('id');
$commentArray['replyUrl'] = $modx->makeUrl($replyResourceId,'',$params);
}
+ } else {
+ $commentArray['replyUrl'] = '';
}
$commentList[] = $commentArray;
$alt = !$alt;
Please sign in to comment.
Something went wrong with that request. Please try again.