Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
be8e3e8a
Commit
be8e3e8a
authored
Oct 25, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crash reporter: remember email, helps with feedback
parent
b8bbf070
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
crash_reporter.php
src/www/crash_reporter.php
+11
-1
No files found.
src/www/crash_reporter.php
View file @
be8e3e8a
...
...
@@ -93,6 +93,14 @@ if (isset($_POST['Submit'])) {
$email
=
trim
(
$_POST
[
'Email'
]);
if
(
!
empty
(
$email
))
{
$crash_report_header
.=
"Email
{
$email
}
\n
"
;
if
(
!
isset
(
$config
[
'system'
][
'contact_email'
])
||
$config
[
'system'
][
'contact_email'
]
!==
$email
)
{
$config
[
'system'
][
'contact_email'
]
=
$email
;
write_config
(
'Updated crash reporter contact email.'
);
}
}
elseif
(
isset
(
$config
[
'system'
][
'contact_email'
]))
{
unset
(
$config
[
'system'
][
'contact_email'
]);
write_config
(
'Removed crash reporter contact email.'
);
}
$desc
=
trim
(
$_POST
[
'Desc'
]);
if
(
!
empty
(
$desc
))
{
...
...
@@ -117,6 +125,8 @@ if (isset($_POST['Submit'])) {
$has_crashed
=
get_crash_report
(
true
)
!=
''
;
}
$email
=
isset
(
$config
[
'system'
][
'contact_email'
])
?
$config
[
'system'
][
'contact_email'
]
:
''
;
if
(
$has_crashed
)
{
$crash_files
=
glob
(
"/var/crash/*"
);
$crash_reports
[
'System Information'
]
=
trim
(
$crash_report_header
);
...
...
@@ -158,7 +168,7 @@ if ($has_crashed) {
echo
"<p>"
.
gettext
(
"Would you like to submit this crash report to the developers?"
)
.
"</p>"
;
echo
'<hr><p>'
.
gettext
(
'You can help us further by adding your contact information and a problem description. '
.
'Please note that providing your contact information greatly improves the chances of bugs being fixed.'
)
.
'</p>'
;
echo
sprintf
(
'<p><input type="text" placeholder="%s" name="Email"
></p>'
,
gettext
(
'your@email.com'
)
);
echo
sprintf
(
'<p><input type="text" placeholder="%s" name="Email"
value="%s"></p>'
,
gettext
(
'your@email.com'
),
$email
);
echo
sprintf
(
'<p><textarea rows="5" placeholder="%s" name="Desc"></textarea></p>'
,
gettext
(
'A short problem description or steps to reproduce.'
));
echo
"<hr><p>"
.
gettext
(
"Please double-check the following contents to ensure you are comfortable submitting the following information."
)
.
"</p>"
;
foreach
(
$crash_reports
as
$report
=>
$content
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment