Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
74ffda82
Commit
74ffda82
authored
10 years ago
by
Arthur Schiwon
Browse files
Options
Downloads
Patches
Plain Diff
do not output DB information, and do not set header
parent
08205c63
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/private/db/adapter.php
+7
-1
7 additions, 1 deletion
lib/private/db/adapter.php
lib/private/db/adaptersqlite.php
+14
-2
14 additions, 2 deletions
lib/private/db/adaptersqlite.php
lib/private/db/statementwrapper.php
+7
-4
7 additions, 4 deletions
lib/private/db/statementwrapper.php
with
28 additions
and
7 deletions
lib/private/db/adapter.php
+
7
−
1
View file @
74ffda82
...
...
@@ -71,7 +71,13 @@ class Adapter {
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\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
);
}
}
}
This diff is collapsed.
Click to expand it.
lib/private/db/adaptersqlite.php
+
14
−
2
View file @
74ffda82
...
...
@@ -41,7 +41,13 @@ class AdapterSqlite extends Adapter {
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\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'
)
{
...
...
@@ -59,7 +65,13 @@ class AdapterSqlite extends Adapter {
$entry
=
'DB Error: "'
.
$e
->
getMessage
()
.
'"<br />'
;
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\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
;
...
...
This diff is collapsed.
Click to expand it.
lib/private/db/statementwrapper.php
+
7
−
4
View file @
74ffda82
...
...
@@ -158,10 +158,13 @@ class OC_DB_StatementWrapper {
OC_Log
::
write
(
'core'
,
$entry
,
OC_Log
::
FATAL
);
OC_User
::
setUserId
(
null
);
// send http status 503
header
(
'HTTP/1.1 503 Service Temporarily Unavailable'
);
header
(
'Status: 503 Service Temporarily Unavailable'
);
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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment