Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
b1c9124a
Commit
b1c9124a
authored
Jan 06, 2009
by
Richard Mansfield
Browse files
Don't attempt to install on MySQL if InnoDB tables are disabled; warn if db not UTF-8 (bug #650)
parent
3f567eb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/upgrade.php
View file @
b1c9124a
...
...
@@ -59,6 +59,10 @@ $coresuccess = json_encode(get_string('coredatasuccess', 'admin'));
if
(
!
empty
(
$upgrades
[
'core'
]
->
install
))
{
$upgrades
[
'firstcoredata'
]
=
true
;
$upgrades
[
'lastcoredata'
]
=
true
;
if
(
!
db_is_utf8
())
{
global
$SESSION
;
$SESSION
->
add_info_msg
(
get_string
(
'databasenotutf8'
,
'admin'
));
}
$smarty
->
assign
(
'install'
,
true
);
}
...
...
htdocs/lang/en.utf8/admin.php
View file @
b1c9124a
...
...
@@ -37,6 +37,7 @@ $string['component'] = 'Component or plugin';
$string
[
'continue'
]
=
'Continue'
;
$string
[
'coredata'
]
=
'core data'
;
$string
[
'coredatasuccess'
]
=
'Successfully installed core data'
;
$string
[
'databasenotutf8'
]
=
'You are not using a UTF-8 database. UTF-8 is the recommended character encoding for Mahara.'
;
$string
[
'fromversion'
]
=
'From version'
;
$string
[
'information'
]
=
'Information'
;
$string
[
'installsuccess'
]
=
'Successfully installed version '
;
...
...
htdocs/lib/upgrade.php
View file @
b1c9124a
...
...
@@ -61,6 +61,13 @@ function check_upgrades($name=null) {
$coreversion
=
0
;
}
if
(
empty
(
$coreversion
))
{
if
(
is_mysql
())
{
// Show a more informative error message if using mysql with skip-innodb
global
$db
;
$result
=
$db
->
Execute
(
"SHOW VARIABLES LIKE 'have_innodb'"
);
if
(
$result
->
fields
[
'Value'
]
!=
'YES'
)
{
throw
new
ConfigSanityException
(
"Mahara requires InnoDB tables. Please ensure InnoDB tables are enabled in your MySQL server."
);
}
}
$core
=
new
StdClass
;
$core
->
install
=
true
;
$core
->
to
=
$config
->
version
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment