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
93b0bd0a
Commit
93b0bd0a
authored
11 years ago
by
Andreas Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Use getLastError() everywhere.
parent
904573d0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/setup/oci.php
+10
-10
10 additions, 10 deletions
lib/private/setup/oci.php
with
10 additions
and
10 deletions
lib/private/setup/oci.php
+
10
−
10
View file @
93b0bd0a
...
...
@@ -51,7 +51,7 @@ class OCI extends AbstractDatabase {
.
" WHERE user_role_privs.granted_role = role_sys_privs.role AND privilege = 'CREATE ROLE'"
;
$stmt
=
oci_parse
(
$connection
,
$query
);
if
(
!
$stmt
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
...
...
@@ -118,7 +118,7 @@ class OCI extends AbstractDatabase {
$un
=
$this
->
tableprefix
.
'users'
;
oci_bind_by_name
(
$stmt
,
':un'
,
$un
);
if
(
!
$stmt
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
...
...
@@ -144,14 +144,14 @@ class OCI extends AbstractDatabase {
$query
=
"SELECT * FROM all_users WHERE USERNAME = :un"
;
$stmt
=
oci_parse
(
$connection
,
$query
);
if
(
!
$stmt
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
oci_bind_by_name
(
$stmt
,
':un'
,
$name
);
$result
=
oci_execute
(
$stmt
);
if
(
!
$result
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
...
...
@@ -162,14 +162,14 @@ class OCI extends AbstractDatabase {
$query
=
'CREATE USER '
.
$name
.
' IDENTIFIED BY "'
.
$password
.
'" DEFAULT TABLESPACE '
.
$this
->
dbtablespace
;
$stmt
=
oci_parse
(
$connection
,
$query
);
if
(
!
$stmt
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
//oci_bind_by_name($stmt, ':un', $name);
$result
=
oci_execute
(
$stmt
);
if
(
!
$result
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s", name: %s, password: %s'
,
array
(
$query
,
$name
,
$password
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
...
...
@@ -178,7 +178,7 @@ class OCI extends AbstractDatabase {
$query
=
"ALTER USER :un IDENTIFIED BY :pw"
;
$stmt
=
oci_parse
(
$connection
,
$query
);
if
(
!
$stmt
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
...
...
@@ -186,7 +186,7 @@ class OCI extends AbstractDatabase {
oci_bind_by_name
(
$stmt
,
':pw'
,
$password
);
$result
=
oci_execute
(
$stmt
);
if
(
!
$result
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
...
...
@@ -195,13 +195,13 @@ class OCI extends AbstractDatabase {
$query
=
'GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE TRIGGER, UNLIMITED TABLESPACE TO '
.
$name
;
$stmt
=
oci_parse
(
$connection
,
$query
);
if
(
!
$stmt
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s"'
,
array
(
$query
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
}
$result
=
oci_execute
(
$stmt
);
if
(
!
$result
)
{
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
oci_e
rror
(
$connection
)))
.
'<br />'
;
$entry
=
$this
->
trans
->
t
(
'DB Error: "%s"'
,
array
(
$this
->
getLastE
rror
(
$connection
)))
.
'<br />'
;
$entry
.
=
$this
->
trans
->
t
(
'Offending command was: "%s", name: %s, password: %s'
,
array
(
$query
,
$name
,
$password
))
.
'<br />'
;
\OC_Log
::
write
(
'setup.oci'
,
$entry
,
\OC_Log
::
WARN
);
...
...
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