Skip to content

Commit

Permalink
Fixed issue 87 of wikijourney_app
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainar committed Mar 21, 2016
1 parent 7cac40d commit 038f474
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@
} else {
$maxPOI = 10;
}

$language = 'en';
if (isset($_GET['lg']) && in_array($_GET['lg'], ['en', 'fr', 'zh'])) {
if (isset($_GET['lg']) && in_array($_GET['lg'], ['en', 'fr', 'zh','de','es'])) {
$language = $_GET['lg'];
}
$table = 'cache_'.$language;
$displayImg = (isset($_GET['displayImg']) && $_GET['displayImg'] === 1) ? 1 : 0;
$wikivoyageSupport = (isset($_GET['wikivoyage']) && $_GET['wikivoyage'] === 1) ? 1 : 0;

if (isset($_GET['thumbnailWidth'])) {
$thumbnailWidth = intval($_GET['thumbnailWidth']);
} else {
Expand Down Expand Up @@ -197,7 +199,7 @@
$dataPOI = $stmt->fetch(PDO::FETCH_ASSOC);

// ==> If we have it we can display it
if (count($dataPOI) != 0) {
if ($stmt->rowCount != 0) {
$poi_array[$i] = $dataPOI;
}

Expand Down

1 comment on commit 038f474

@nymous
Copy link
Member

@nymous nymous commented on 038f474 Apr 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.