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
7ed678b0
You need to sign in or sign up before continuing.
Commit
7ed678b0
authored
10 years ago
by
Arthur Schiwon
Browse files
Options
Downloads
Patches
Plain Diff
eliminate OC_Template::printErrorPage in database classes, fixes #12182
parent
0f3c5d85
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/private/db/adapter.php
+2
-1
2 additions, 1 deletion
lib/private/db/adapter.php
lib/private/db/adaptersqlite.php
+2
-2
2 additions, 2 deletions
lib/private/db/adaptersqlite.php
lib/private/db/statementwrapper.php
+3
-4
3 additions, 4 deletions
lib/private/db/statementwrapper.php
with
7 additions
and
7 deletions
lib/private/db/adapter.php
+
2
−
1
View file @
7ed678b0
...
...
@@ -43,6 +43,7 @@ class Adapter {
* insert the @input values when they do not exist yet
* @param string $table name
* @param array $input key->value pair, key has to be sanitized properly
* @throws \OC\HintException
* @return int count of inserted rows
*/
public
function
insertIfNotExist
(
$table
,
$input
)
{
...
...
@@ -71,7 +72,7 @@ class Adapter {
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\OC_Log
::
write
(
'core'
,
$entry
,
\OC_Log
::
FATAL
);
error_log
(
'DB error: '
.
$entry
);
\OC_Template
::
printErrorPage
(
$entry
);
throw
new
\OC\HintException
(
$entry
);
}
}
}
This diff is collapsed.
Click to expand it.
lib/private/db/adaptersqlite.php
+
2
−
2
View file @
7ed678b0
...
...
@@ -42,7 +42,7 @@ class AdapterSqlite extends Adapter {
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\OC_Log
::
write
(
'core'
,
$entry
,
\OC_Log
::
FATAL
);
error_log
(
'DB error: '
.
$entry
);
\OC_Template
::
printErrorPage
(
$entry
);
throw
new
\OC\HintException
(
$entry
);
}
if
(
$stmt
->
fetchColumn
()
===
'0'
)
{
...
...
@@ -61,7 +61,7 @@ class AdapterSqlite extends Adapter {
$entry
.
=
'Offending command was: '
.
$query
.
'<br />'
;
\OC_Log
::
write
(
'core'
,
$entry
,
\OC_Log
::
FATAL
);
error_log
(
'DB error: '
.
$entry
);
\OC_Template
::
printErrorPage
(
$entry
);
throw
new
\OC\HintException
(
$entry
);
}
return
$result
;
...
...
This diff is collapsed.
Click to expand it.
lib/private/db/statementwrapper.php
+
3
−
4
View file @
7ed678b0
...
...
@@ -161,8 +161,7 @@ class OC_DB_StatementWrapper {
// send http status 503
header
(
'HTTP/1.1 503 Service Temporarily Unavailable'
);
header
(
'Status: 503 Service Temporarily Unavailable'
);
OC_Template
::
printErrorPage
(
'Failed to connect to database'
);
die
(
$entry
);
throw
new
\OC\HintException
(
$entry
);
}
}
...
...
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