Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
domainepublic
alternc
Commits
d32f2372
Commit
d32f2372
authored
Feb 21, 2013
by
Steven Mondji-Lerider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixing upgrade script 3.0.0~3.php adding the special phpmyadmin user to dbusers table
parent
922c9be9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
install/upgrades/3.0.0~3.php
install/upgrades/3.0.0~3.php
+7
-2
No files found.
install/upgrades/3.0.0~3.php
View file @
d32f2372
...
...
@@ -7,11 +7,13 @@ if(!function_exists('mysql_connect')) {
exit
(
1
);
}
// we don't check our AlternC session
if
(
!
chdir
(
"/var/alternc/bureau"
))
exit
(
1
);
require
(
"/var/alternc/bureau/class/config_nochk.php"
);
$db2
=
new
DB_System
();
// we go super-admin
$admin
->
enabled
=
1
;
...
...
@@ -37,10 +39,13 @@ $db->query("select distinct uid,login,pass from db;");
//on insere dans dbusers avec enabled = admin
$query
=
array
();
while
(
$db
->
next_record
()){
$query
[]
=
"insert into dbusers values('',"
.
$db
->
f
(
'uid'
)
.
",'"
.
$db
->
f
(
'login'
)
.
"','"
.
$db
->
f
(
'pass'
)
.
"',
\"
ADMIN
\"
);"
;
$db2
->
query
(
"select id from dbusers where name ='"
.
$db
->
f
(
'login'
)
.
"' and password='"
.
$db
->
f
(
'pass'
)
.
"';"
);
if
(
$db2
->
num_rows
()
==
0
){
$query
[]
=
"insert ignore into dbusers values('',"
.
$db
->
f
(
'uid'
)
.
",'"
.
$db
->
f
(
'login'
)
.
"','"
.
$db
->
f
(
'pass'
)
.
"',
\"
ADMIN
\"
);"
;
}
}
foreach
(
$query
as
$q
){
print_r
(
$q
);
$db
->
query
(
$q
);
}
...
...
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