Skip to content

Commit

Permalink
Merge pull request #191 from uplink42/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
uplink42 authored Jul 2, 2017
2 parents 9eaf4b7 + 8ef5478 commit 1b38c9b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/controllers/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function login() : void
// check if session is already present
$this->load->library('etmsession');
$this->load->model('common/Auth', 'auth');
if ($this->auth->validateSession($_SESSION)) {
if (isset($_SESSION["username"]) && isset($_SESSION["email"]) && $this->auth->validateSession($_SESSION)) {
$data['auth'] = true;
} else {
$data['auth'] = false;
Expand Down
3 changes: 1 addition & 2 deletions application/models/Contracts_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public function __construct()
*/
public function getContracts(string $chars, string $filter = null, string $state, int $new = null) : array
{
$this->db->distinct();
$this->db->select('c.eve_idcontracts as contract_id,
c.issuer_id as issuer_id,
c.acceptor_id as acceptor_id,
Expand Down Expand Up @@ -59,7 +58,7 @@ public function getContracts(string $chars, string $filter = null, string $state
('deleted', 'completed', 'failed', 'completedByIssuer', 'completedByContractor', 'cancelled', 'rejected', 'reversed')");
}

$query = $this->db->get("contracts");
$query = $this->db->get("");
$result = $query->result_array();

// modify the result array to include character names
Expand Down
4 changes: 3 additions & 1 deletion application/models/common/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function createHashedPassword(string $password) : array
*/
public function generateRandomPassword()
{
return $this->getRandomString("abcdefghijklmnopqrstuwxyz1234567890_!#$%&=?", 24);
return $this->getRandomString("abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_!#$%&=?", 24);
}

/**
Expand Down Expand Up @@ -97,6 +97,8 @@ public function validateSession(array $session)
return false;
}



$this->db->where('username', $session['username']);
$this->db->where('email', $session['email']);
$this->db->where('password', $session['password']);
Expand Down
3 changes: 3 additions & 0 deletions bower_components/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
*/
!.gitignore
29 changes: 29 additions & 0 deletions seeders/item_seeder.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29516,5 +29516,34 @@ INSERT INTO `invtypes` (`eve_iditem`, `name`, `volume`, `type`) VALUES
(45582, 'Erebus Ruby Sungrazer SKIN (Permanent)', 0.01, 1979),
(45635, 'Small Skill Injector', 0.002, 2358);

INSERT INTO `items` (`eve_iditem`, `name`, `volume`, `type`) VALUES
(45636, 'Swarm Overmind Tertius', 60, 0),
(45637, 'Swarm Overmind Secundus', 60, 0),
(45638, 'Swarm Overmind Primus', 1010000, 0),
(45640, 'Standup M-Set Thukker Advanced Component Manufacturing Material Efficiency', 10, 2347),
(45641, 'Standup L-Set Thukker Advanced Component Manufacturing Efficiency', 20, 2348),
(45642, 'Standup M-Set Thukker Advanced Component Manufacturing Material Efficiency Blueprint', 0.01, 0),
(45643, 'Standup L-Set Thukker Advanced Component Manufacturing Efficiency Blueprint', 0.01, 0),
(45652, 'Superconducting Magnetometric Amplifier', 5, 1147),
(45653, 'Superconducting Gravimetric Amplifier', 5, 1147),
(45654, 'Superconducting Radar Amplifier', 5, 1147),
(45655, ' Superconducting Ladar Amplifier', 5, 1147),
(45656, 'Superconducting Magnetometric Amplifier Blueprint', 0.01, 1191),
(45657, ' Superconducting Gravimetric Amplifier Blueprint', 0.01, 1191),
(45658, ' Superconducting Radar Amplifier Blueprint', 0.01, 1191),
(45659, ' Superconducting Ladar Amplifier Blueprint', 0.01, 1191),
(45660, 'Scorched Microgravimeter', 0.01, 1862),
(45661, 'Faraday Force Magnetometer', 0.01, 1862),
(45662, 'Ancient Radar Decorrelator', 0.01, 1862),
(45663, 'Synthetic Aperture Ladar Receiver', 0.01, 1862),
(45664, 'Sin Ruby Sungrazer SKIN (Permanent)', 0.01, 2112),
(45665, 'Abaddon Star Captain SKIN (Permanent)', 0.01, 1964),
(45666, 'Apocalypse Star Captain SKIN (Permanent)', 0.01, 1964),
(45667, 'Armageddon Star Captain SKIN (Permanent)', 0.01, 1964),
(45668, 'Machariel Angel\'s Hex SKIN (Permanent)', 0.01, 1963),
(45677, 'Blood Raider Molok Blueprint Armored Cache', 20000, 2317),
(45678, 'Blood Raider Chemosh Blueprint Armored Cache', 20000, 2317),
(45679, 'Blood Raider Dagon Blueprint Armored Cache', 20000, 2317);

COMMIT;
SET FOREIGN_KEY_CHECKS=1;

0 comments on commit 1b38c9b

Please sign in to comment.