Skip to content

Commit

Permalink
Update index.php for some plugin specifs
Browse files Browse the repository at this point in the history
  • Loading branch information
uprel committed Aug 12, 2019
1 parent 14871a4 commit db774ec
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions index.php
Expand Up @@ -8,7 +8,7 @@
require_once("admin/class.Login.php");
require_once("admin/settings.php");

function goMobile($lang) {
function goMobile($lang, $scanner) {
?><!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -45,6 +45,11 @@ function goMobile($lang) {
Proj4js = {defs: {}};
</script>

<?php
if($scanner) {
echo '<script src="plugins/editing_code_scanner/js_mobile/instascan.min.js?v=1.0.0"></script>';
}
?>
<!-- OpenLayers 3 -->
<script src="client_mobile/lib/ol3/ol.js?v=4.6.5a"></script>
<!-- <script src="client_mobile/lib/ol3/ol-debug.js?v=4.6.5a"></script>-->
Expand Down Expand Up @@ -214,15 +219,17 @@ function goMobile($lang) {
if ($login_check->isValidUserProj($helpers->getMapFromUrl())) {

$edit = $helpers->checkModulexist("editing") && $helpers->hasPluginAccess("editing");
$scanner = FALSE;
$editVer = 0;
if($edit) {
$helpers->getPluginVersion("editing");
$editVer = $helpers->getPluginVersion("editing");
$scanner = $helpers->checkModulexist("editing_code_scanner");
}
$google = $helpers->loadGoogle();

//OK open application
if($mobile=='on') {
goMobile($def_lang);
goMobile($def_lang, $scanner);
}
else {
?><!DOCTYPE html>
Expand Down

0 comments on commit db774ec

Please sign in to comment.