Skip to content

Commit eed833a

Browse files
committed
Normalize line endings
1 parent 228887a commit eed833a

File tree

174 files changed

+21419
-21406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+21419
-21406
lines changed

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* text=auto
2+
3+
*.java text
4+
*.txt text
5+
*.xml text
6+
*.gradle text
7+
*.php text
8+
*.properties text
9+
.classpath text
10+
.project text
11+
12+
*.png binary
13+
*.jpg binary
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
<?php
2-
function endsWith( $str, $sub ) {
3-
return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub );
4-
}
5-
6-
$ERRCODE_NONE = 0;
7-
$ERRCODE_FILESIZE_EXCEEDED = 1;
8-
$ERRCODE_FILEENDING_BAD = 2;
9-
$ERRCODE_FILETYPE_DISALLOWED = 3;
10-
$ERRCODE_UPLOAD_ERROR = 4;
11-
12-
$target = "data/";
13-
$filename = basename( $_FILES['gpxfile']['name']);
14-
$target = $target . $filename;
15-
$errorCode = $ERRCODE_NONE;
16-
17-
$xmlHead = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
18-
$baseErrorTag = "<error errorCode=\"%d\" message=\"%s\"/>";
19-
$baseSuccessTag = "<success message=\"%s\"/>";
20-
$errorTag = "";
21-
$successTag = "";
22-
23-
$uploaded_size = $_FILES['gpxfile']['size'];
24-
25-
$maxFilesize = 500000; // In Bytes
26-
27-
//This is our size condition
28-
if ($errorCode == $ERRCODE_NONE && $uploaded_size > $maxFilesize) {
29-
$errorCode = $ERRCODE_FILESIZE_EXCEEDED;
30-
$errorTag = sprintf($baseErrorTag, $errorCode, "Filezise exceeded. File: '" . $uploaded_size . "' Max: '" . $maxFilesize . "'");
31-
}
32-
33-
if ($errorCode == $ERRCODE_NONE && !endsWith($filename, ".gpx")) {
34-
$errorCode = $ERRCODE_FILEENDING_BAD;
35-
$errorTag = sprintf($baseErrorTag, $errorCode, "Bad file-ending.");
36-
}
37-
38-
//This is our limit file type condition
39-
if ($errorCode == $ERRCODE_NONE && $uploaded_type == "text/php") {
40-
$errorCode = $ERRCODE_FILETYPE_DISALLOWED;
41-
$errorTag = sprintf($baseErrorTag, $errorCode, "Disallowed Filetype");
42-
}
43-
44-
if ($errorCode == $ERRCODE_NONE) { //If everything is ok we try to upload it
45-
if(move_uploaded_file($_FILES['gpxfile']['tmp_name'], $target)) {
46-
$successTag = sprintf($baseSuccessTag, "The file '". $filename . "' has been uploaded");
47-
} else {
48-
$errorCode = $ERRCODE_UPLOAD_ERROR;
49-
$errorTag = sprintf($baseErrorTag, $errorCode, "File '" . $filename . "' could not be uploaded.");
50-
}
51-
}
52-
53-
if($errorCode == $ERRCODE_NONE){
54-
echo $xmlHead . $successTag;
55-
} else {
56-
echo $xmlHead . $errorTag;
57-
}
1+
<?php
2+
function endsWith( $str, $sub ) {
3+
return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub );
4+
}
5+
6+
$ERRCODE_NONE = 0;
7+
$ERRCODE_FILESIZE_EXCEEDED = 1;
8+
$ERRCODE_FILEENDING_BAD = 2;
9+
$ERRCODE_FILETYPE_DISALLOWED = 3;
10+
$ERRCODE_UPLOAD_ERROR = 4;
11+
12+
$target = "data/";
13+
$filename = basename( $_FILES['gpxfile']['name']);
14+
$target = $target . $filename;
15+
$errorCode = $ERRCODE_NONE;
16+
17+
$xmlHead = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
18+
$baseErrorTag = "<error errorCode=\"%d\" message=\"%s\"/>";
19+
$baseSuccessTag = "<success message=\"%s\"/>";
20+
$errorTag = "";
21+
$successTag = "";
22+
23+
$uploaded_size = $_FILES['gpxfile']['size'];
24+
25+
$maxFilesize = 500000; // In Bytes
26+
27+
//This is our size condition
28+
if ($errorCode == $ERRCODE_NONE && $uploaded_size > $maxFilesize) {
29+
$errorCode = $ERRCODE_FILESIZE_EXCEEDED;
30+
$errorTag = sprintf($baseErrorTag, $errorCode, "Filezise exceeded. File: '" . $uploaded_size . "' Max: '" . $maxFilesize . "'");
31+
}
32+
33+
if ($errorCode == $ERRCODE_NONE && !endsWith($filename, ".gpx")) {
34+
$errorCode = $ERRCODE_FILEENDING_BAD;
35+
$errorTag = sprintf($baseErrorTag, $errorCode, "Bad file-ending.");
36+
}
37+
38+
//This is our limit file type condition
39+
if ($errorCode == $ERRCODE_NONE && $uploaded_type == "text/php") {
40+
$errorCode = $ERRCODE_FILETYPE_DISALLOWED;
41+
$errorTag = sprintf($baseErrorTag, $errorCode, "Disallowed Filetype");
42+
}
43+
44+
if ($errorCode == $ERRCODE_NONE) { //If everything is ok we try to upload it
45+
if(move_uploaded_file($_FILES['gpxfile']['tmp_name'], $target)) {
46+
$successTag = sprintf($baseSuccessTag, "The file '". $filename . "' has been uploaded");
47+
} else {
48+
$errorCode = $ERRCODE_UPLOAD_ERROR;
49+
$errorTag = sprintf($baseErrorTag, $errorCode, "File '" . $filename . "' could not be uploaded.");
50+
}
51+
}
52+
53+
if($errorCode == $ERRCODE_NONE){
54+
echo $xmlHead . $successTag;
55+
} else {
56+
echo $xmlHead . $errorTag;
57+
}
5858
?>

OpenStreetMapViewer/pom.xml

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
4-
5-
<parent>
6-
<groupId>org.osmdroid</groupId>
7-
<artifactId>osmdroid-parent</artifactId>
8-
<version>4.2-SNAPSHOT</version>
9-
</parent>
10-
11-
<artifactId>OpenStreetMapViewer</artifactId>
12-
<packaging>apk</packaging>
13-
14-
<name>OpenStreetMap viewer</name>
15-
16-
<dependencies>
17-
<!-- Android included libraries -->
18-
<dependency>
19-
<groupId>com.google.android</groupId>
20-
<artifactId>android</artifactId>
21-
</dependency>
22-
<dependency>
23-
<groupId>com.google.android</groupId>
24-
<artifactId>android-test</artifactId>
25-
</dependency>
26-
<dependency>
27-
<groupId>com.google.android</groupId>
28-
<artifactId>support-v4</artifactId>
29-
</dependency>
30-
<dependency>
31-
<groupId>commons-logging</groupId>
32-
<artifactId>commons-logging</artifactId>
33-
</dependency>
34-
35-
<dependency>
36-
<groupId>${project.groupId}</groupId>
37-
<artifactId>osmdroid-android</artifactId>
38-
<version>${project.version}</version>
39-
</dependency>
40-
<dependency>
41-
<groupId>${project.groupId}</groupId>
42-
<artifactId>osmdroid-third-party</artifactId>
43-
<version>${project.version}</version>
44-
</dependency>
45-
<dependency>
46-
<groupId>org.slf4j</groupId>
47-
<artifactId>slf4j-android</artifactId>
48-
</dependency>
49-
</dependencies>
50-
51-
<build>
52-
<sourceDirectory>${basedir}/src</sourceDirectory>
53-
<plugins>
54-
<plugin>
55-
<groupId>org.apache.maven.plugins</groupId>
56-
<artifactId>maven-jarsigner-plugin</artifactId>
57-
</plugin>
58-
<plugin>
59-
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
60-
<artifactId>android-maven-plugin</artifactId>
61-
</plugin>
62-
</plugins>
63-
</build>
64-
65-
</project>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.osmdroid</groupId>
7+
<artifactId>osmdroid-parent</artifactId>
8+
<version>4.2-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>OpenStreetMapViewer</artifactId>
12+
<packaging>apk</packaging>
13+
14+
<name>OpenStreetMap viewer</name>
15+
16+
<dependencies>
17+
<!-- Android included libraries -->
18+
<dependency>
19+
<groupId>com.google.android</groupId>
20+
<artifactId>android</artifactId>
21+
</dependency>
22+
<dependency>
23+
<groupId>com.google.android</groupId>
24+
<artifactId>android-test</artifactId>
25+
</dependency>
26+
<dependency>
27+
<groupId>com.google.android</groupId>
28+
<artifactId>support-v4</artifactId>
29+
</dependency>
30+
<dependency>
31+
<groupId>commons-logging</groupId>
32+
<artifactId>commons-logging</artifactId>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>${project.groupId}</groupId>
37+
<artifactId>osmdroid-android</artifactId>
38+
<version>${project.version}</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>${project.groupId}</groupId>
42+
<artifactId>osmdroid-third-party</artifactId>
43+
<version>${project.version}</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.slf4j</groupId>
47+
<artifactId>slf4j-android</artifactId>
48+
</dependency>
49+
</dependencies>
50+
51+
<build>
52+
<sourceDirectory>${basedir}/src</sourceDirectory>
53+
<plugins>
54+
<plugin>
55+
<groupId>org.apache.maven.plugins</groupId>
56+
<artifactId>maven-jarsigner-plugin</artifactId>
57+
</plugin>
58+
<plugin>
59+
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
60+
<artifactId>android-maven-plugin</artifactId>
61+
</plugin>
62+
</plugins>
63+
</build>
64+
65+
</project>
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# This file is automatically generated by Android Tools.
2-
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3-
#
4-
# This file must be checked in Version Control Systems.
5-
#
6-
# To customize properties used by the Ant build system use,
7-
# "ant.properties", and override values to adapt the script to your
8-
# project structure.
9-
10-
# Project target.
11-
target=android-16
12-
apk-configurations=
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system use,
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
10+
# Project target.
11+
target=android-16
12+
apk-configurations=
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:id="@+id/parent_container"
4-
android:layout_width="match_parent"
5-
android:layout_height="match_parent" >
6-
7-
<FrameLayout
8-
android:id="@+id/map_container"
9-
android:layout_width="match_parent"
10-
android:layout_height="match_parent"
11-
>
12-
13-
</FrameLayout>
14-
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/parent_container"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent" >
6+
7+
<FrameLayout
8+
android:id="@+id/map_container"
9+
android:layout_width="match_parent"
10+
android:layout_height="match_parent"
11+
>
12+
13+
</FrameLayout>
14+
1515
</RelativeLayout>
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:id="@+id/parent_container"
4-
android:layout_width="match_parent"
5-
android:layout_height="match_parent" >
6-
7-
<org.osmdroid.views.MapView
8-
android:id="@+id/mapview"
9-
android:layout_width="match_parent"
10-
android:layout_height="match_parent"
11-
tilesource="Mapnik"
12-
/>
13-
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/parent_container"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent" >
6+
7+
<org.osmdroid.views.MapView
8+
android:id="@+id/mapview"
9+
android:layout_width="match_parent"
10+
android:layout_height="match_parent"
11+
tilesource="Mapnik"
12+
/>
13+
1414
</RelativeLayout>

0 commit comments

Comments
 (0)