diff options
author | Demian <demianalonso@gmail.com> | 2015-06-09 19:45:22 -0300 |
---|---|---|
committer | Demian <demianalonso@gmail.com> | 2015-06-09 19:45:22 -0300 |
commit | 62048ed5ec8054c9e0205f3308d0954926746866 (patch) | |
tree | 7509b27aa1ea027a8deaca38b373195b723eb824 | |
parent | c4f3d8958caf55f99e383553980d8c2eea968243 (diff) | |
download | trackermap-server-62048ed5ec8054c9e0205f3308d0954926746866.tar.gz trackermap-server-62048ed5ec8054c9e0205f3308d0954926746866.tar.bz2 trackermap-server-62048ed5ec8054c9e0205f3308d0954926746866.zip |
Replaced tabs for spaces
-rw-r--r-- | debug.xml | 26 | ||||
-rw-r--r-- | src/org/traccar/database/DataManager.java | 6 | ||||
-rw-r--r-- | src/org/traccar/model/User.java | 22 |
3 files changed, 27 insertions, 27 deletions
@@ -37,7 +37,7 @@ <entry key='database.user'>sa</entry> <entry key='database.password'></entry> <entry key='database.mock'>true</entry> - + <entry key='database.createSchema'> CREATE TABLE user ( id INT PRIMARY KEY AUTO_INCREMENT, @@ -123,33 +123,33 @@ </entry> <entry key='database.selectServer'> - SELECT * FROM server; + SELECT * FROM server; </entry> <entry key='database.updateServer'> - UPDATE server SET registration = :registration WHERE id = :id; + UPDATE server SET registration = :registration WHERE id = :id; </entry> <entry key='database.loginUser'> - SELECT * - FROM user - WHERE email = :email AND password = :password; + SELECT * + FROM user + WHERE email = :email AND password = :password; </entry> <entry key='database.selectUsersAll'> - SELECT * FROM user; + SELECT * FROM user; </entry> <entry key='database.insertUser'> - INSERT INTO user (name, email, password, admin) + INSERT INTO user (name, email, password, admin) VALUES (:name, :email, :password, :admin); </entry> <entry key='database.updateUser'> UPDATE user SET - name = :name, - email = :email, - admin = :admin + name = :name, + email = :email, + admin = :admin WHERE id = :id; </entry> @@ -190,8 +190,8 @@ </entry> <entry key='database.selectPositions'> - SELECT * FROM position WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to; - </entry> + SELECT * FROM position WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to; + </entry> <entry key='database.insertPosition'> INSERT INTO position (deviceId, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, other) diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 7ded88d15..fdab359f4 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -240,9 +240,9 @@ public class DataManager { .executeUpdate(); if(user.getPassword() != null) { - QueryBuilder.create(dataSource, properties.getProperty("database.updateUserPassword")) - .setObject(user) - .executeUpdate(); + QueryBuilder.create(dataSource, properties.getProperty("database.updateUserPassword")) + .setObject(user) + .executeUpdate(); } } diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java index 70a4498f5..9186e66c5 100644 --- a/src/org/traccar/model/User.java +++ b/src/org/traccar/model/User.java @@ -64,16 +64,16 @@ public class User implements Factory { public static byte[] sha256(String text) { - try { - MessageDigest md = MessageDigest.getInstance("SHA-256"); + try { + MessageDigest md = MessageDigest.getInstance("SHA-256"); - md.update(text.getBytes("UTF-8")); - byte[] digest = md.digest(); - return digest; - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException(e); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - } + md.update(text.getBytes("UTF-8")); + byte[] digest = md.digest(); + return digest; + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + } } |