Skip to content

Commit 3e928a6

Browse files
authored
Merge pull request #4542 from AllskyTeam/Fix-addMessage.sh-count
Fix add message.sh count
2 parents b3b9e96 + 978ea15 commit 3e928a6

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

html/index.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,10 @@ function DisplayTorProxyConfig() {}
400400
if ($date !== "")
401401
$message .= "   ($date)";
402402
} else {
403-
$message .= "   ($count occurrences, last on $date)";
403+
$message .= "   ($count occurrences";
404+
if ($date !== "")
405+
$message .= ", last on $date";
406+
$message .= ")";
404407
}
405408
} else {
406409
$level = "error"; // badly formed message

scripts/addMessage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ fi
165165
if [[ -f ${ALLSKY_MESSAGES} ]] && M="$( grep "${TAB}${ESCAPED_MESSAGE}${TAB}" "${ALLSKY_MESSAGES}" )" ; then
166166
COUNT=0
167167
# tail -1 in case file is corrupt and has more than one line we want.
168-
PRIOR_COUNT=$( echo -e "${M}" | cut -f3 -d"${TAB}" | tail -1 )
168+
PRIOR_COUNT=$( echo -e "${M}" | cut -f5 -d"${TAB}" | tail -1 )
169169

170170
# If this entry is corrupted don't try to update the counter.
171171
[[ ${PRIOR_COUNT} != "" ]] && ((COUNT = PRIOR_COUNT + 1))

scripts/utilities/getNewestAllskyVersion.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ if [[ ${CURRENT_VERSION} == "${NEWEST_VERSION}" ]]; then
3737
elif [[ ${CURRENT_VERSION} < "${NEWEST_VERSION}" ]]; then
3838
RET="${EXIT_PARTIAL_OK}"
3939
else
40-
RET=0 # Current newer than newest - this should not happen in normal use
40+
# Current newer than newest - this can happen if testing a newer release.
41+
RET=0
4142
fi
4243

4344
echo "${NEWEST_VERSION}"

0 commit comments

Comments
 (0)