Skip to content

Commit

Permalink
Merge pull request #164 from uplink42/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
uplink42 authored Apr 24, 2017
2 parents 2533880 + 4892510 commit 118d05d
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 17 deletions.
2 changes: 2 additions & 0 deletions application/controllers/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public function processData(): void
$vcode = $this->input->post('vcode', true);
$reports = $this->input->post('reports', true);

log_message('error', $reports);

$this->load->model('Register_model', 'register');
$result = $this->register->validate($username, $password, $repeatpassword, $email, $apikey, $vcode, $reports);

Expand Down
2 changes: 1 addition & 1 deletion application/controllers/internal/Async_procedure.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function index($iduser)
$this->load->model('Updater_profit_model', 'profits');
$this->profits->beginProfitCalculation($username);
// update totals and history
$this->Updater_model->updateTotals();
$this->Updater_model->updateTotals(true, $username);
// send email
$this->db->where('iduser', $iduser);
$query = $this->db->get('user');
Expand Down
2 changes: 1 addition & 1 deletion application/libraries/Pheal/Core/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private function __construct()
$this->fetcher = new \Pheal\Fetcher\Curl();
$this->rateLimiter = new \Pheal\RateLimiter\NullRateLimiter();

$this->http_user_agent = "( evetrademaster.com - [email protected] )";
$this->http_user_agent = "(evetrademaster - custom install)";
}

/**
Expand Down
1 change: 1 addition & 0 deletions application/models/Dashboard_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function getWeekProfits(string $chars): string
$this->db->select('total_profit');
$this->db->where('characters_eve_idcharacters IN ' . $chars);
$this->db->where("date>= (now() - INTERVAL 7 DAY)");
$this->db->group_by('date');
$this->db->order_by('date', 'asc');
$query = $this->db->get('history');
$result = $query->result_array();
Expand Down
6 changes: 3 additions & 3 deletions application/models/Updater_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function processAPIKeys(array $user_keys, string $username) : bool
} catch (Throwable $e) {
log_message('error', 'process api keys ' . $e->getMessage());
$this->checkCharacterKeys($apikey, $vcode, $char_id);
return false;
//return false;
}

$this->checkCharacterKeys($apikey, $vcode, $char_id);
Expand Down Expand Up @@ -218,7 +218,7 @@ public function validateAPIKey(int $apikey, string $vcode, string $char)
} catch (Throwable $e) {
log_message('error', 'validate api keys ' . $e->getMessage());
//communication error, abort
return false;
//return false;
}

if ($accessMask == "" && $response) {
Expand Down Expand Up @@ -727,7 +727,7 @@ public function setNewInfo() : void
* @param string|null $user username
* @return array result list, only for non global update
*/
public function updateTotals(bool $global = false, string $user = null) : ?array
public function updateTotals(bool $global = false, string $user = null)
{
if (!$global) {
$username = $this->username;
Expand Down
1 change: 1 addition & 0 deletions application/models/common/ValidateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public function validateAPI(int $apikey, string $vcode)

} catch (Throwable $e) {
//communication error, abort
//todo: difference between no reply and expired key
return Msg::INVALID_API_KEY;
}

Expand Down
6 changes: 3 additions & 3 deletions application/views/common/feedback_v.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<p>Here you can suggest new features or improvements for Eve Trade Master. I'm quite receptive to feedback and will usually provide an answer in a day at most. In case of bug reports, try to be specific. <a href="https://www.imgur.com" target="_blank">Consider sending screenshots to highlight any error messages or unwanted behaviour.</a> </p>
<div class="form-group">
<form class="submit-feedback" method="POST">
<input type="hidden" name="email" value="<?=$email?>">
<input type="hidden" name="from_name" value="<?=$username?>">
<input type="hidden" name="email" value="{{email}}">
<input type="hidden" name="from_name" value="{{username}}">
<input type="hidden" name="to" value="[email protected]">
<input type="hidden" name="subject" value="New Message from <?=$username?>">
<input type="hidden" name="subject" value="New Message from {{username}}">
<textarea class="form-control" rows="4" name="message" autofocus></textarea>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion application/views/register/register_v.twig
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<div class="form-group col-lg-4 col-lg-offset-4">
<label>Automated reports</label>
<select class="form-control" id="reports" name="reports">
<option id="none">never</option>
<option id="none">none</option>
<option id="daily">daily</option>
<option id="weekly">weekly</option>
<option id="monthly">monthly</option>
Expand Down
3 changes: 2 additions & 1 deletion assets/js/assets-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ $(document).ready(function() {
{
bSearchable: false,
aTargets: [ 3 ]
}]
}],
autoWidth: false
});

function updateTableTotals() {
Expand Down
3 changes: 2 additions & 1 deletion assets/js/contracts-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ $(document).ready(function() {
aoColumnDefs: [
{
bSearchable: false, "aTargets": [ 6 ]
}]
}],
autoWidth: false
});

var table_inactive = $('#contracts-inactive-table').DataTable({
Expand Down
3 changes: 2 additions & 1 deletion assets/js/dashboard-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ $(document).ready(function() {
} else {
$(nRow).addClass('danger');
}
}
},
autoWidth: false
});


Expand Down
1 change: 1 addition & 0 deletions assets/js/marketorders-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $(document).ready(function() {
[25, 50, 100, -1],
[25, 50, 100, "All"]
],
autoWidth: false,
deferRender: true,
buttons: [{
extend: 'copy',
Expand Down
1 change: 1 addition & 0 deletions assets/js/profits-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $(document).ready(function() {
processing: true,
serverSide: true,
deferRender: true,
autoWidth: false,
ajax : {
type : 'GET',
url : base + 'Profits/getProfitTable/' + charID + '/' + interval + '/' + aggr,
Expand Down
20 changes: 15 additions & 5 deletions assets/js/statistics-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $(document).ready(function() {
let recap = $('#daily').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
deferRender: true,
autoWidth: false,
lengthMenu: [
[25, 50, -1],
[25, 50, "All"]
Expand All @@ -28,6 +29,7 @@ $(document).ready(function() {
let bestraw = $('#bestraw').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
deferRender: true,
autoWidth: false,
lengthMenu: [
[5, 10, -1],
[5, 10, "All"]
Expand Down Expand Up @@ -57,6 +59,7 @@ $(document).ready(function() {
[5, 10, "All"]
],
deferRender: true,
autoWidth: false,
buttons: [{
extend: 'copy',
className: 'btn-sm'
Expand All @@ -78,6 +81,7 @@ $(document).ready(function() {
let bestcus = $('#bestcus').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
deferRender: true,
autoWidth: false,
lengthMenu: [
[5, 10, -1],
[5, 10, "All"]
Expand All @@ -103,6 +107,7 @@ $(document).ready(function() {
let topstations = $('#topstations').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
deferRender: true,
autoWidth: false,
lengthMenu: [
[5, 10, -1],
[5, 10, "All"]
Expand Down Expand Up @@ -148,7 +153,8 @@ $(document).ready(function() {
className: 'btn-sm'
}],
order: [],
deferRender: true
deferRender: true,
autoWidth: false
});
let bestmargin = $('#bestmargin').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
Expand All @@ -173,7 +179,8 @@ $(document).ready(function() {
className: 'btn-sm'
}],
order: [],
deferRender: true
deferRender: true,
autoWidth: false
});
let fastest = $('#fastest').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
Expand All @@ -198,7 +205,8 @@ $(document).ready(function() {
className: 'btn-sm'
}],
order: [],
deferRender: true
deferRender: true,
autoWidth: false
});
let timezones = $('#timezones').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
Expand All @@ -223,7 +231,8 @@ $(document).ready(function() {
className: 'btn-sm'
}],
order: [],
deferRender: true
deferRender: true,
autoWidth: false
});
let problematic = $('#problematic').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4 text-right'f>>tp",
Expand All @@ -248,7 +257,8 @@ $(document).ready(function() {
className: 'btn-sm'
}],
order: [],
deferRender: true
deferRender: true,
autoWidth: false
});

// trade volumes chart
Expand Down
1 change: 1 addition & 0 deletions assets/js/stocklists-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ $(document).ready(function() {
table = $('#stocklist-items').DataTable({
dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4'f>>tp",
deferRender: true,
autoWidth: false,
ajax : {
type: 'GET',
url : base + 'Stocklists/getItems/' + listID,
Expand Down
1 change: 1 addition & 0 deletions assets/js/tradesimulator-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ $(document).ready(function() {
[50, 75, 100, -1],
[50, 75, 100, "All"]
],
autoWidth: false,
buttons: [{
extend: 'copy',
className: 'btn-sm'
Expand Down
4 changes: 4 additions & 0 deletions assets/luna/styles/sass/partials/_tables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.table {
width: 100%;
}

.table > {
thead > tr > th, tbody > tr > th, tfoot > tr > th, thead > tr > td, tbody > tr > td, tfoot > tr > td {
border-top: 1px solid $color-border;
Expand Down

0 comments on commit 118d05d

Please sign in to comment.