Skip to content

Commit 4263167

Browse files
committed
Minor fixin update and switching corebug to send through curl
1 parent b2eaccf commit 4263167

File tree

2 files changed

+23
-34
lines changed

2 files changed

+23
-34
lines changed

public/less/master_mixins.less

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,25 @@ h1,h2,h3,h4,h5,h6 {
407407
.list-group-item:hover,
408408
.list-group-item.active {
409409
background: @primaryColor;
410+
h1,h2,h3,h4,h5,h6 {
411+
color: #000;
412+
}
410413
}
411414
.list-group-item:hover a,
412415
.list-group-item.active a {
413416
color: #000;
414417
text-decoration: none;
415418
}
419+
.list-group-item-danger {
420+
background: @darkError;
421+
color: inherit;
422+
.list-group-item-heading {
423+
color: #000;
424+
}
425+
&:hover {
426+
background: @errorColor;
427+
}
428+
}
416429
/*
417430
/////////////////////////////////////////////////////// Inputs /////////////////////////////////////////////////////////
418431
*/

src/services/Control/CoreBug.php

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -60,39 +60,15 @@ public function notifyException($exception)
6060

6161
$date = date('Y-m-d H:i:s');
6262

63-
// Check for existing record
64-
$existingError = \DB::connection('exceptions')->table('site_exceptions')->where('name', $this->name)->where('message', $this->message)->where('siteKeyName', $this->site)->first();
65-
66-
if (count($existingError) == 0) {
67-
\DB::connection('exceptions')->table('site_exceptions')->insert(array(
68-
'name' => $this->name,
69-
'message' => $this->message,
70-
'file' => $this->file,
71-
'line' => $this->line,
72-
'siteKeyName' => $this->site,
73-
'userIp' => $this->userIp,
74-
'fatal' => $this->fatal,
75-
'userId' => $this->userId,
76-
'username' => $this->username,
77-
'count' => 1,
78-
'created_at' => $date,
79-
'updated_at' => null
80-
));
81-
} elseif ($existingError->created_at != $date && $existingError->updated_at != $date) {
82-
\DB::connection('exceptions')->table('site_exceptions')->insert(array(
83-
'name' => $this->name,
84-
'message' => $this->message,
85-
'file' => $this->file,
86-
'line' => $this->line,
87-
'siteKeyName' => $this->site,
88-
'userIp' => $this->userIp,
89-
'fatal' => $this->fatal,
90-
'userId' => $this->userId,
91-
'username' => $this->username,
92-
'count' => 1,
93-
'created_at' => $date,
94-
'updated_at' => null
95-
));
96-
}
63+
$object = $this;
64+
65+
// Send the error to core
66+
\Queue::push(function($job) use ($object) {
67+
$response = \cURL::newRequest('post', 'http://control.stygianvault.com/siteExceptions/'. $object->site, ['post' => (array)$object])
68+
->setHeader('User-Agent', 'Control')
69+
->send();
70+
71+
$job->delete();
72+
});
9773
}
9874
}

0 commit comments

Comments
 (0)