Skip to content

Commit 8e2e484

Browse files
authored
Merge pull request #143 from topcoder-platform/ci-test
Ci test
2 parents 9f88d83 + 41981e3 commit 8e2e484

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

config/vanilla/bootstrap.before.php

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<?php if (!defined('APPLICATION')) exit();
1+
<?php
2+
3+
use Vanilla\Formatting\DateTimeFormatter;
4+
5+
if (!defined('APPLICATION')) exit();
26

37
if (!function_exists('formatString')) {
48
/**
@@ -279,6 +283,41 @@ function_exists('topcoderRoleCssStyles')) {
279283
break;
280284
}
281285
}
286+
return $result;
287+
}
288+
}
289+
290+
if (!function_exists('dateUpdated')) {
291+
/**
292+
*
293+
* Fixed issues with date format:
294+
* package/library/core/functions.render.php
295+
*
296+
* @param $row
297+
* @param null $wrap
298+
* @return string
299+
*/
300+
function dateUpdated($row, $wrap = null) {
301+
$result = '';
302+
$dateUpdated = val('DateUpdated', $row);
303+
$updateUserID = val('UpdateUserID', $row);
304+
305+
if ($dateUpdated) {
306+
$updateUser = Gdn::userModel()->getID($updateUserID);
307+
$dateUpdatedFormatted = Gdn::getContainer()->get(DateTimeFormatter::class)->formatDate($dateUpdated, false, DateTimeFormatter::FORCE_FULL_FORMAT);
308+
if ($updateUser) {
309+
$title = sprintf(t('Edited %s by %s.'), $dateUpdatedFormatted, val('Name', $updateUser));
310+
} else {
311+
$title = sprintf(t('Edited %s.'), $dateUpdatedFormatted);
312+
}
313+
314+
$result = ' <span title="'.htmlspecialchars($title).'" class="DateUpdated">'.
315+
sprintf(t('edited %s'), $dateUpdatedFormatted).'</span> ';
316+
if ($wrap) {
317+
$result = $wrap[0].$result.$wrap[1];
318+
}
319+
}
320+
282321
return $result;
283322
}
284323
}

config/vanilla/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
$Configuration['EnabledPlugins']['Groups'] = true;
3434
$Configuration['EnabledPlugins']['Filestack'] = true;
3535
$Configuration['EnabledPlugins']['Sumologic'] = true;
36+
// $Configuration['EnabledPlugins']['ReplyTo'] = true; //Uncomment it after upgrading DB
3637

3738
// Debug
3839
$Configuration['Debug'] = FALSE;

vanilla/applications/vanilla/js/discussion.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ jQuery(document).ready(function($) {
370370
$(this).remove();
371371
});
372372
gdn.processTargets(json.Targets);
373+
// Let listeners know that the comment was deleted.
374+
$(document).trigger('CommentDeleted');
373375
}
374376
}
375377
});

0 commit comments

Comments
 (0)