« Project home page
my little forum
Log in
Register
Search:
Back to the entry by Auge
Post reply
Reply to the message by
Auge
Name:
E-mail:
(optional, won't be displayed directly)
Leave this field empty:
Homepage:
(optional)
Leave this field empty:
Location:
(optional)
Remember me (cookie)
Category:
General
Project organisation
Technics
Design/Themes
Features
Development
Todo
Bugs
German / Deutsch
Spanish / Español
French / Français
Accessibility/UX
Subject:
Formatting help
skip to input
format text bold
[b]bold text[/b]
format text italic
[i]italic text[/i]
insert hyperlink
[link=http://example.com/]link text[/link] / [link]http://example.com/[/link]
set text color
[color=#rgb]colored text[/color]
font size
[size=small]small text[/size]
[size=large]large text[/size]
insert list
[list][*]list item[/list]
insert image
[img]http://example.com/image.jpg[/img]
left: [img=left]http://example.com/image.jpg[/img]
right: [img=right]http://example.com/image.jpg[/img]
thumbnail: [img=thumbnail]http://example.com/image.jpg[/img]
thumbnail left: [img=thumbnail-left]http://example.com/image.jpg[/img]
thumbnail right: [img=thumbnail-right]http://example.com/image.jpg[/img]
upload image
upload image ...
insert TeX code
[tex]TeX code[/tex]
insert code
[inlinecode]code[/inlinecode]
[code]code[/code]
[code=css]code[/code]
[code=html]code[/code]
[code=javascript]code[/code]
[code=perl]code[/code]
[code=php]code[/code]
[code=sql]code[/code]
[code=xml]code[/code]
:-)
;-)
:-P
:-D
:-|
:-(
:yes:
:no:
:ok:
:lol:
:lol2:
:lol3:
:cool:
:surprised:
:angry:
:crying:
:waving:
:confused:
:lookaround:
:clap:
:love:
:tick:
Message:
> Hello > > I will stay off during the next days because of a medicinal issue. Thatswhy my approvements and further thoughts only in short. > > > I analysed the function and I believe, I found the reason of the problem. The critical line is: > > > > [code=php]if ($lastVersion != $currentVersion && $updateDateOfActualVersion > $updateDateOfInstalledVersion) {[/code] > > > > [inlinecode]$currentVersion[/inlinecode] contains the current installed version of the software and [inlinecode]$lastVersion[/inlinecode] contains the last available version on github. If the forum is updated before the daily schedule was run, the if-condition fails (because of [inlinecode]'2.4.9' != '2.4.9'[/inlinecode] --> [inlinecode]false[/inlinecode]). > > If I understand your words, this is the comparision to decide if the new values (version number and date) should be stored in the temp-settings-table? It seems wrong to me if the value get's compared with (only?) the installed version instead with the old value in the temp-settings-table (with the exception of no run of this check and therefore no value in the temp-settings-table). > > > The same problems exists on the condition of [inlinecode]$updateDateOfActualVersion[/inlinecode] and [inlinecode]$updateDateOfInstalledVersion[/inlinecode]. Whereas [inlinecode]$updateDateOfActualVersion[/inlinecode] contains the date of the last available version on github, [inlinecode]$updateDateOfActualVersion[/inlinecode] contains the date of installed version - taken from the feed, too. > > What, if the installed version is not part of the feed? In the actual situation all versions, that are to old to be part of the feed can't check the version, so [i]now[/i] it's not a problem. But in the future one could operate a forum with a 2.4.x-version (version-check-capable) and the feed could be continued to far because of the many meanwhile released versions. It might be an idea to store the date of the last succeeded run of a software update and take this into accout of the comparision. > > > We should remove the condition or using a further function argument, that contains the last version of the 'temp_infos' table (in addition to the installed version number). > > approved > > > If we remove the condition, a sql update runs every day, i.e. the following code is executed > > With an additional check against the last version from temp_infos we have not to do this by default … > > > [code=php]if ($latestRelease !== false) { > > @mysqli_query($connid, "INSERT INTO ".$db_settings['temp_infos_table']." (`name`, `value`, `time`) VALUES ('last_version_check', '" . mysqli_real_escape_string($connid, $latestRelease->version) . "', NOW()) ON DUPLICATE KEY UPDATE `value` = '" . mysqli_real_escape_string($connid, $latestRelease->version) . "', `time` = NOW();"); > > @mysqli_query($connid, "INSERT INTO ".$db_settings['temp_infos_table']." (`name`, `value`) VALUES ('last_version_uri', '" . mysqli_real_escape_string($connid, $latestRelease->uri) . "') ON DUPLICATE KEY UPDATE `value` = '" . mysqli_real_escape_string($connid, $latestRelease->uri) . "';"); > > }[/code] > > > > In my opinion, it is a reasonable change. > > … but the idea to use [inlinecode]INSERT ON DUPLICATE KEY UPDATE[/inlinecode] is in general worth a second and third view. > > Tschö, Auge > > PS: I ran for the second time during the last weeks into the trap of getting the message "No Authorization" (only this one sentence) when I wanted to use the preview-button. The message was not formatted in the forums template so I think, it's a message from the server itself and not from the forum software.
E-mail notification on reply of this posting
OK - Submit
Preview