| 910 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 911 |  | # If appropriate, record this link to the log, with clickable URLs when possible | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 912 |  | if [ $STATUS != "OK" ] || [ $RECORD_OK_LINKS -eq 1 ]; then | 
 
 
 
 
 
 
 
 
 
 
 | 913 | < | # Stupid hack since the strings "IW" and "EI" are narrower than "OK", "RD", or "NG" and it takes | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 914 | < | # an extra tab to get to the desired level of indentation in the RTF log | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 915 | < | RTF_TABS="        " | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 913 | > | # Prepare 'curl' result in parentheses to print after status code, unless this is an "IW" or "EI" | 
 
 
 
 
 | 914 | > | # link, in which case showing the status code doesn't make sense. Adjust spacing after string to | 
 
 
 
 
 | 915 | > | # ensure TXT and RTF reports have aligned columns of results. | 
 
 
 
 
 | 916 | > | CURL_STR_H=" ($CURL_RESULT)" | 
 
 
 
 
 | 917 | > | CURL_STR_T="$CURL_STR_H" | 
 
 
 
 
 | 918 | > | CURL_STR_R="$CURL_STR_H   " | 
 
 
 
 
 
 
 
 
 
 
 | 919 |  | if [ $STATUS == "IW" ] || [ $STATUS == "EI" ]; then | 
 
 
 
 
 
 
 
 
 
 
 | 920 | < | RTF_TABS="             " | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 920 | > | CURL_STR_H="" | 
 
 
 
 
 | 921 | > | CURL_STR_T="      " | 
 
 
 
 
 | 922 | > | CURL_STR_R="                   " | 
 
 
 
 
 
 
 
 
 
 
 | 923 |  | fi | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 924 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 925 |  | # Record link and its wiki page in TXT, RTF, and HTML markup | 
 
 
 
 
 
 
 
 
 
 
 | 926 | < | valPrint t "$STATUS ($CURL_RESULT) $STR_TYPE $URL" | 
 
 
 
 
 
 
 
 
 | 926 | > | valPrint t "${STATUS}${CURL_STR_T} $STR_TYPE $URL" | 
 
 
 
 
 
 
 
 
 
 
 | 927 |  | valPrint t "  linked from $FULL_PAGE_PATH" | 
 
 
 
 
 
 
 
 
 
 
 | 928 | < | valPrint r "$STATUS ($CURL_RESULT)$RTF_TABS$STR_TYPE      {\field{\*\fldinst{HYPERLINK \"$URL\"}}{\fldrslt $URL}}" | 
 
 
 
 
 
 
 
 
 | 928 | > | valPrint r "${STATUS}${CURL_STR_R}${RTF_TABS}$STR_TYPE    {\field{\*\fldinst{HYPERLINK \"$URL\"}}{\fldrslt $URL}}" | 
 
 
 
 
 
 
 
 
 
 
 | 929 |  | valPrint r "              linked from     {\field{\*\fldinst{HYPERLINK \"$FULL_PAGE_PATH\"}}{\fldrslt $LOCAL_PAGE_PATH}}" | 
 
 
 
 
 
 
 
 
 
 
 | 930 | < | valPrint hn "<tr><td style=\"white-space:nowrap\">$STATUS ($CURL_RESULT)</td><td align=\"right\">$STR_TYPE</td><td><a href=\"$URL\" target=\"_blank\">$URL</a></td></tr>" | 
 
 
 
 
 
 
 
 
 | 930 | > | valPrint hn "<tr><td style=\"white-space:nowrap\">${STATUS}${CURL_STR_H}</td><td align=\"right\">$STR_TYPE</td><td><a href=\"$URL\" target=\"_blank\">$URL</a></td></tr>" | 
 
 
 
 
 
 
 
 
 
 
 | 931 |  | valPrint hn "<tr><td colspan=\"2\" align=\"right\">linked from</td><td><a href=\"$FULL_PAGE_PATH\" target=\"_blank\">$LOCAL_PAGE_PATH</a></td></tr>" | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 932 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 933 |  | # Place vertical space here since we won't be printing anything more about this link | 
 
 
 
 
 
 
 
 
 
 
 | 934 | < | if [ $STATUS == "OK" ]; then valPrint trh ""; fi | 
 
 
 
 
 
 
 
 
 | 934 | > | if [ $STATUS == "OK" ]; then valPrint tr ""; valPrint hs ""; fi | 
 
 
 
 
 
 
 
 
 
 
 | 935 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 936 |  | # Record redirect URL if one was given by a 3xx response page | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 937 |  | if [ $STATUS == "RD" ]; then |