Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
74ffda82
Commit
74ffda82
authored
Nov 14, 2014
by
Arthur Schiwon
Browse files
do not output DB information, and do not set header
parent
08205c63
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/private/db/adapter.php
View file @
74ffda82
...
@@ -71,7 +71,13 @@ class Adapter {
...
@@ -71,7 +71,13 @@ class Adapter {
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\
OC_Log
::
write
(
'core'
,
$entry
,
\
OC_Log
::
FATAL
);
\
OC_Log
::
write
(
'core'
,
$entry
,
\
OC_Log
::
FATAL
);
throw
new
\
OC\HintException
(
$entry
);
$l
=
\
OC
::
$server
->
getL10N
(
'lib'
);
throw
new
\
OC\HintException
(
$l
->
t
(
'Database Error'
),
$l
->
t
(
'Please contact your system administrator.'
),
0
,
$e
);
}
}
}
}
}
}
lib/private/db/adaptersqlite.php
View file @
74ffda82
...
@@ -41,7 +41,13 @@ class AdapterSqlite extends Adapter {
...
@@ -41,7 +41,13 @@ class AdapterSqlite extends Adapter {
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\
OC_Log
::
write
(
'core'
,
$entry
,
\
OC_Log
::
FATAL
);
\
OC_Log
::
write
(
'core'
,
$entry
,
\
OC_Log
::
FATAL
);
throw
new
\
OC\HintException
(
$entry
);
$l
=
\
OC
::
$server
->
getL10N
(
'lib'
);
throw
new
\
OC\HintException
(
$l
->
t
(
'Database Error'
),
$l
->
t
(
'Please contact your system administrator.'
),
0
,
$e
);
}
}
if
(
$stmt
->
fetchColumn
()
===
'0'
)
{
if
(
$stmt
->
fetchColumn
()
===
'0'
)
{
...
@@ -59,7 +65,13 @@ class AdapterSqlite extends Adapter {
...
@@ -59,7 +65,13 @@ class AdapterSqlite extends Adapter {
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\
OC_Log
::
write
(
'core'
,
$entry
,
\
OC_Log
::
FATAL
);
\
OC_Log
::
write
(
'core'
,
$entry
,
\
OC_Log
::
FATAL
);
throw
new
\
OC\HintException
(
$entry
);
$l
=
\
OC
::
$server
->
getL10N
(
'lib'
);
throw
new
\
OC\HintException
(
$l
->
t
(
'Database Error'
),
$l
->
t
(
'Please contact your system administrator.'
),
0
,
$e
);
}
}
return
$result
;
return
$result
;
...
...
lib/private/db/statementwrapper.php
View file @
74ffda82
...
@@ -158,10 +158,13 @@ class OC_DB_StatementWrapper {
...
@@ -158,10 +158,13 @@ class OC_DB_StatementWrapper {
OC_Log
::
write
(
'core'
,
$entry
,
OC_Log
::
FATAL
);
OC_Log
::
write
(
'core'
,
$entry
,
OC_Log
::
FATAL
);
OC_User
::
setUserId
(
null
);
OC_User
::
setUserId
(
null
);
// send http status 503
$l
=
\
OC
::
$server
->
getL10N
(
'lib'
);
header
(
'HTTP/1.1 503 Service Temporarily Unavailable'
);
throw
new
\
OC\HintException
(
header
(
'Status: 503 Service Temporarily Unavailable'
);
$l
->
t
(
'Database Error'
),
throw
new
\
OC\HintException
(
$entry
);
$l
->
t
(
'Please contact your system administrator.'
),
0
,
$e
);
}
}
}
}
...
...
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