1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 09:20:38 +00:00

Update build number to incorporate development into master. Also:

- Add www.qb64.org/wiki as an alternative server for the help system when .net is down or temporarily unreachable.
This commit is contained in:
FellippeHeitor 2018-02-28 08:47:53 -03:00
parent ce1a4aa8c8
commit 90b3e7c14d
2 changed files with 27 additions and 4 deletions

View file

@ -4,5 +4,5 @@ DIM SHARED AutoBuildMsg AS STRING
Version$ = "1.2"
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
'integer. If you make a change, update the date and increase the id!
BuildNum$ = "20180202/85"
BuildNum$ = "20180228/86"

View file

@ -7,6 +7,7 @@ Back2BackName$ = a$
END FUNCTION
FUNCTION Wiki$ (PageName$)
STATIC AlternativeServer AS _BYTE
Help_PageLoaded$ = PageName$
PageName2$ = PageName$
@ -47,12 +48,35 @@ IF Help_Recaching = 0 THEN
END IF
url$ = "www.qb64.net/wiki/index.php?title=" + PageName2$ + "&action=edit"
s1$ = "readonly=" + CHR$(34) + "readonly" + CHR$(34) + ">"
try:
IF AlternativeServer THEN
url$ = "www.qb64.org/wiki/index.php?title=" + PageName2$ + "&action=edit"
'when fetching from .org, look for name="wpTextbox1">
s1$ = "name=" + CHR$(34) + "wpTextbox1" + CHR$(34) + ">"
END IF
url2$ = url$
x = INSTR(url2$, "/")
IF x THEN url2$ = LEFT$(url$, x - 1)
c = _OPENCLIENT("TCP/IP:80:" + url2$)
IF c = 0 THEN EXIT FUNCTION
IF c = 0 THEN
IF INSTR(url$, ".org") = 0 THEN
AlternativeServer = -1
IF Help_Recaching = 0 THEN
a$ = "Downloading '" + PageName$ + "' page from alternative server..."
IF LEN(a$) > 60 THEN a$ = LEFT$(a$, 57) + STRING$(3, 250)
IF LEN(a$) < 60 THEN a$ = a$ + SPACE$(60 - LEN(a$))
COLOR 0, 3: LOCATE idewy + idesubwindow, 2
PRINT a$;
PCOPY 3, 0
END IF
GOTO try
ELSE
EXIT FUNCTION
END IF
END IF
e$ = CHR$(13) + CHR$(10)
url3$ = RIGHT$(url$, LEN(url$) - x + 1)
x$ = "GET " + url3$ + " HTTP/1.1" + e$
@ -67,7 +91,6 @@ DO
a$ = a$ + a2$
IF INSTR(a$, "</body>") THEN
CLOSE #c
s1$ = "readonly=" + CHR$(34) + "readonly" + CHR$(34) + ">"
s2$ = "</textarea>"
s1 = INSTR(a$, s1$): IF s1 = 0 THEN EXIT FUNCTION
s1 = s1 + LEN(s1$)