Skip to content

Commit

Permalink
version 1.0.1
Browse files Browse the repository at this point in the history
- bugfix in language switch (always english)
- remove password_compatiblity_library because it is necesarry due to Guzzle to use PHP 5.5
- minor code cleanup
  • Loading branch information
uprel committed Oct 8, 2015
1 parent 9620b1a commit 6a6a37e
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 274 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ languages:
exclude_paths:
- "admin/languages/locale/*"
- "client/site/libs/*"
- "vendor/*"
- "vendor/*"
2 changes: 1 addition & 1 deletion _scripts/_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ UPGRADE
-----------
1. Check your database version: SELECT max(version) FROM settings; (if there is no table settings, version = 1)

2. Run all scripts lower and same than your version.
2. Run all scripts lower and same than your version.
2 changes: 1 addition & 1 deletion admin/class.DbLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ public function getProjectConfigs()
return json_encode(new stdClass); //empty json object
}
}
}
}
12 changes: 7 additions & 5 deletions admin/class.Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

namespace GisApp;

use SimpleXMLElement;

class Helpers
{

Expand Down Expand Up @@ -128,10 +130,10 @@ public static function getQgsProject($map){
* Load a layer instance from the project
*
* @param $layername
* @param $project
* @param SimpleXMLElement $project
* @return array
*/
public static function getLayer($layername, $project){
public static function getLayer($layername, SimpleXMLElement $project){
// Caching
static $layers = array();
if(array_key_exists($layername, $layers)){
Expand All @@ -149,10 +151,10 @@ public static function getLayer($layername, $project){
*
* Get layer connection and geom info
*
* @param $layer
* @param SimpleXMLElement $layer
* @return array
*/
public static function getLayerInfo($layer){
public static function getLayerInfo(SimpleXMLElement $layer){
// Cache
static $pg_layer_infos = array();

Expand Down Expand Up @@ -202,4 +204,4 @@ public static function getMapFromUrl()
return $ret;

}
}
}
14 changes: 5 additions & 9 deletions admin/class.Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,17 @@ public function __construct()

/**
* Performs a check for minimum requirements to run this application.
* Does not run the further application when PHP version is lower than 5.3.7
* Does include the PHP password compatibility library when PHP version lower than 5.5.0
* (this library adds the PHP 5.5 password hashing functions to older versions of PHP)
* Does not run the further application when PHP version is lower than 5.5
* @return bool Success status of minimum requirements check, default is false
*/
private function performMinimumRequirementsCheck()
{
if (version_compare(PHP_VERSION, '5.3.7', '<')) {
echo "Sorry, Simple PHP Login does not run on a PHP version older than 5.3.7 !";
} elseif (version_compare(PHP_VERSION, '5.5.0', '<')) {
require_once("libraries/password_compatibility_library.php");
return true;
} elseif (version_compare(PHP_VERSION, '5.5.0', '>=')) {
if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
return true;
}
else {
echo "Sorry, This app does not run on a PHP version older than 5.5!";
}
// default return
return false;
}
Expand Down
219 changes: 0 additions & 219 deletions admin/libraries/password_compatibility_library.php

This file was deleted.

31 changes: 9 additions & 22 deletions client/site/js/GetUrlParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (serverAndCGI.substr(serverAndCGI.length - 3, 3).toLowerCase() === "cgi") {
//patch ends
if (!norewrite) {
//Get map name from base URL (e.g. http://example.com/maps/mapname)
var urlBaseArray = urlArray[0].split('/')
var urlBaseArray = urlArray[0].split('/');
//Remove host and first element of path. http://example.com/maps/subdir/mapname -> subdir/mapname
var map = urlBaseArray.slice(4).join('/');
//Search for wms directory suffix (maps-protected -> wms-protected)
Expand Down Expand Up @@ -107,27 +107,14 @@ if (urlArray.length > 1) {
//if lang is not defined in GlobalOptions.js we set it to "en"
lang = "en";
}
//if (urlParams.lang) {
// //check if language is available
// if (availableLanguages[urlParams.lang]) {
// lang = urlParams.lang;
// var xhr = new XMLHttpRequest();
// xhr.open('HEAD', "help_"+urlParams.lang+".html", false);
// xhr.send();
// if (xhr.status!="404"){
// helpfile="help_"+urlParams.lang+".html";
// }
// else{
// alert("Help file unavailable for this language!");
// if (typeof helpfile == "undefined") {
// //if helpfile is not defined in GlobalOptions.js we set it to "help_en.html"
// helpfile = "help_en.html";
// }
// }
// } else {
// alert(errMessageInvalidLanguageCodeString1[lang] + "'" + urlParams.lang + "'\n" + errMessageInvalidLanguageCodeString2[lang] + availableLanguages[lang].names[lang] + ".");
// }
//}
if (urlParams.lang) {
//check if language is available
if (availableLanguages[urlParams.lang]) {
lang = urlParams.lang;
} else {
alert(errMessageInvalidLanguageCodeString1[lang] + "'" + urlParams.lang + "'\n" + errMessageInvalidLanguageCodeString2[lang] + availableLanguages[lang].names[lang] + ".");
}
}
if (urlParams.searchtables) {
searchtables = urlParams.searchtables;
}
Expand Down
Loading

0 comments on commit 6a6a37e

Please # to comment.