Skip to content

Routes Traveled ranking bugfix - #325

Merged
jteresco merged 2 commits into
TravelMapping:masterfrom
yakra:ranking
Jul 14, 2019
Merged

Routes Traveled ranking bugfix#325
jteresco merged 2 commits into
TravelMapping:masterfrom
yakra:ranking

Conversation

@yakra

@yakrayakra commented Jul 14, 2019

Copy link
Copy Markdown
Contributor

Closes#278.

Web/user/region.php

Lines 255 to 256 in f8c6c79

$row = $activeDrivenRes->fetch_assoc();
while($row['traveler'] != $tmuser && $row = $activeDrivenRes->fetch_assoc());

Web/user/region.php

Lines 291 to 292 in f8c6c79

$row = $activePreviewDrivenRes->fetch_assoc();
while($row['traveler'] != $tmuser && $row = $activePreviewDrivenRes->fetch_assoc());

Web/user/system.php

Lines 233 to 234 in f8c6c79

$row = $res->fetch_assoc();
while($row['traveler'] != $tmuser && $row = $res->fetch_assoc());

These three bits still bother me a little. I'd like a more elegant way to just fetch the one row we need with a single function. If such exists, I haven't learned what it is yet; it seems I have to use a while loop. (?)

Also a little nervous about ending the line with a ; rather than a {}. I'm brand new to PHP, don't know how standard syntax that is, or whether FreeBSD will be OK with it.
We may want to try this out on tmtest before the production site?

@yakrayakra changed the title RankingRoutes Traveled ranking bugfixJul 14, 2019
@yakrayakra added bug Userpages user/{index.php,region.php,system.php,topstats.php} labels Jul 14, 2019
@jteresco

Copy link
Copy Markdown
Contributor

I think if you don't use a while loop and find something that does the search for you, there's probably some similar loop hidden inside, so I wouldn't worry.

The ; syntax shouldn't be a problem.

Ready to try on tmtest?

@yakra

Copy link
Copy Markdown
ContributorAuthor

I think if you don't use a while loop and find something that does the search for you, there's probably some similar loop hidden inside, so I wouldn't worry.

True enough. It just bugged me. I wanted some neat & clean syntax. :)

Ready to try on tmtest?

Ready!

@jteresco
jteresco merged commit 3479fec into TravelMapping:masterJul 14, 2019
@jteresco

Copy link
Copy Markdown
Contributor

Just installed on tmtest.

@jterescojteresco mentioned this pull request Jul 14, 2019
@yakrayakra mentioned this pull request Jun 7, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugUserpagesuser/{index.php,region.php,system.php,topstats.php}

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect rank for routes driven within a region

2 participants

@yakra@jteresco