Skip to content

Commit

Permalink
Tweaking Signature code
Browse files Browse the repository at this point in the history
For #1119
  • Loading branch information
eSilverStrike committed Apr 1, 2022
1 parent d188ff6 commit 5d79d3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions public_html/profiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,17 @@ function contactemail($uid, $cc, $author, $authorEmail, $subject, $message)

$sig = '';
$sig_html = '';
if (!COM_isAnonUser()) {
if ($uid > 1 && !empty(trim($A['sig']))) {
// Converts to HTML, fixes links, and executes autotags
$sig_html = GLText::getDisplayText(isset($A['sig']) ? stripslashes($A['sig']) : '', $A['postmode'], GLTEXT_LATEST_VERSION);
$sig_html = GLText::getDisplayText(stripslashes($A['sig']), $A['postmode'], GLTEXT_LATEST_VERSION);
// Convert to plaintext
$sig = GLText::html2Text($sig_html);

if (!empty($sig)) {
$t->set_var('signature', $sig);
$t->set_var('signature_html', $sig_html);

$t->set_var('signature_divider_html', $LANG31['sig_divider_html']);
$t->set_var('signature_divider', $LANG31['sig_divider']);
}
$t->set_var('signature', $sig);
$t->set_var('signature_html', $sig_html);

$t->set_var('signature_divider_html', $LANG31['sig_divider_html']);
$t->set_var('signature_divider', $LANG31['sig_divider']);
}

// Output final content
Expand Down
2 changes: 1 addition & 1 deletion system/lib-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ function CMT_getComment(&$comments, $mode, $type, $order, $delete_option = false

// Check for User Signature and add first
// Get signature of comment owner
if ($A['uid'] > 1 && !empty($A['sig'])) {
if ($A['uid'] > 1 && !empty(trim($A['sig']))) {
$template->set_var('signature_divider_html', $LANG31['sig_divider_html']);

// Converts to HTML, fixes links, and executes autotags
Expand Down

0 comments on commit 5d79d3c

Please sign in to comment.