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
91a9688d
Commit
91a9688d
authored
13 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
minor changes to mysql setup
parent
6c09d9e0
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/setup.php
+4
-4
4 additions, 4 deletions
lib/setup.php
with
4 additions
and
4 deletions
lib/setup.php
+
4
−
4
View file @
91a9688d
...
...
@@ -160,8 +160,8 @@ class OC_Setup {
//add prefix to the postgresql user name to prevent collissions
$dbusername
=
'oc_'
.
$username
;
//
hash the
password so we don't need to store the admin config in the config file
$dbpassword
=
md5
(
time
()
.
$password
);
//
create a new
password so we don't need to store the admin config in the config file
$dbpassword
=
md5
(
time
());
self
::
pg_createDBUser
(
$dbusername
,
$dbpassword
,
$connection
);
...
...
@@ -221,7 +221,7 @@ class OC_Setup {
}
public
static
function
createDatabase
(
$name
,
$user
,
$connection
)
{
//we cant use
r
OC_BD functions here because we need to connect as the administrative user.
//we cant use OC_BD functions here because we need to connect as the administrative user.
$query
=
"CREATE DATABASE IF NOT EXISTS `
$name
`"
;
$result
=
mysql_query
(
$query
,
$connection
);
if
(
!
$result
)
{
...
...
@@ -243,7 +243,7 @@ class OC_Setup {
}
public
static
function
pg_createDatabase
(
$name
,
$user
,
$connection
)
{
//we cant use
r
OC_BD functions here because we need to connect as the administrative user.
//we cant use OC_BD functions here because we need to connect as the administrative user.
$query
=
"CREATE DATABASE
$name
OWNER
$user
"
;
$result
=
pg_query
(
$connection
,
$query
);
if
(
!
$result
)
{
...
...
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