Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions src/UserNotes/UserNoteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public function display($notes):void {
$repo = strtolower($LANG);
// Link target to add a note to the current manual page,
// and it's extended form with a [+] image
$addnotelink = '/manual/add-note.php?sect=' . $filename .

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[!NOTE]

'&repo=' . $repo .
'&redirect=' . $_SERVER['BASE_HREF'];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot
nf-subs-1.csv

$addnotelink = '/manual/add-note.php?sect=' . $filename .
'&repo=' . $repo .
'&redirect=' . $_SERVER['BASE_HREF'];
$addnotesnippet = make_link(
$addnotelink,
"+<small>$addNote</small>",
Expand All @@ -71,12 +71,12 @@ public function display($notes):void {

$userContributedNotes = autogen('user_contributed_notes', $LANG);
echo <<<END_USERNOTE_HEADER
<section id="usernotes">
<div class="head">
<span class="action">{$addnotesnippet}</span>
<h3 class="title">$userContributedNotes {$noteCountHtml}</h3>
</div>
END_USERNOTE_HEADER;
<section id="usernotes">
<div class="head">
<span class="action">{$addnotesnippet}</span>
<h3 class="title">$userContributedNotes {$noteCountHtml}</h3>
</div>
END_USERNOTE_HEADER;

// If we have no notes, then inform the user
if ($num_notes === 0) {
Expand Down Expand Up @@ -125,18 +125,18 @@ public function displaySingle(UserNote $note, $voteOption = true): void
}
$rredir_filename = urlencode($redir_filename);
$votediv = <<<VOTEDIV
<div class="votes">
<div id="Vu{$note->id}">
<a href="/manual/vote-note.php?id={$note->id}&amp;page={$rredir_filename}&amp;vote=up" title="Vote up!" class="usernotes-voteu">up</a>
</div>
<div id="Vd{$note->id}">
<a href="/manual/vote-note.php?id={$note->id}&amp;page={$rredir_filename}&amp;vote=down" title="Vote down!" class="usernotes-voted">down</a>
</div>
<div class="tally" id="V{$note->id}" title="{$rate}">
{$vote}
</div>
</div>
VOTEDIV;
<div class="votes">
<div id="Vu{$note->id}">
<a href="/manual/vote-note.php?id={$note->id}&amp;page={$rredir_filename}&amp;vote=up" title="Vote up!" class="usernotes-voteu">up</a>
</div>
<div id="Vd{$note->id}">
<a href="/manual/vote-note.php?id={$note->id}&amp;page={$rredir_filename}&amp;vote=down" title="Vote down!" class="usernotes-voted">down</a>
</div>
<div class="tally" id="V{$note->id}" title="{$rate}">
{$vote}
</div>
</div>
VOTEDIV;
} else {
$votediv = null;
}
Expand Down Expand Up @@ -173,12 +173,12 @@ public function displaySingle(UserNote $note, $voteOption = true): void

echo <<<USER_NOTE_TEXT

<div class="note" id="{$note->id}">{$votediv}{$name}{$admin}<div class="date" title="$fdatestr"><strong>{$datestr}</strong></div>
<div class="text" id="Hcom{$note->id}">
{$text}
</div>
</div>
USER_NOTE_TEXT;
<div class="note" id="{$note->id}">{$votediv}{$name}{$admin}<div class="date" title="$fdatestr"><strong>{$datestr}</strong></div>
<div class="text" id="Hcom{$note->id}">
{$text}
</div>
</div>
USER_NOTE_TEXT;
}

// Clean out the content of one user note for printing to HTML
Expand Down Expand Up @@ -230,7 +230,7 @@ private function makePopupLink(string $url, string $linktext = '', string $targe
($target ?: "_new"),
htmlspecialchars($url, ENT_QUOTES | ENT_IGNORE),
($target ?: "_new"),
$windowprops,
$windowprops,
($linktext ?: $url),
);
}
Expand Down
Loading