Commit da3f9fde authored by Nigel McNie's avatar Nigel McNie
Browse files

Merge commit 'origin/master' into importexport_master

Conflicts:

	htdocs/lib/version.php
parents c59e7cf2 346e1911
......@@ -151,6 +151,7 @@
<description>flv</description>
<mimetypes>
<mimetype>application/x-flash-video</mimetype>
<mimetype>video/flv</mimetype>
</mimetypes>
</filetype>
......
......@@ -926,14 +926,12 @@ function xmldb_core_upgrade($oldversion=0) {
execute_sql("ALTER TABLE {artefact_attachment} DROP FOREIGN KEY {arteblogblogfile_blo_fk}");
execute_sql("ALTER TABLE {artefact_attachment} DROP INDEX {arteblogblogfile_blo_ix}");
execute_sql("ALTER TABLE {artefact_attachment} CHANGE blogpost artefact BIGINT(10) DEFAULT NULL");
execute_sql("ALTER TABLE {artefact_attachment} ADD INDEX {artefact_attchment_art_ix} (artefact)");
execute_sql("ALTER TABLE {artefact_attachment} ADD FOREIGN KEY(artefact) REFERENCES {artefact}(id)");
execute_sql("ALTER TABLE {artefact_attachment} ADD CONSTRAINT {arteatta_art_fk} FOREIGN KEY {arteatta_art_ix} (artefact) REFERENCES {artefact}(id)");
execute_sql("ALTER TABLE {artefact_attachment} DROP FOREIGN KEY {arteblogblogfile_fil_fk}");
execute_sql("ALTER TABLE {artefact_attachment} DROP INDEX {arteblogblogfile_fil_ix}");
execute_sql("ALTER TABLE {artefact_attachment} CHANGE file attachment BIGINT(10) DEFAULT NULL");
execute_sql("ALTER TABLE {artefact_attachment} ADD INDEX {artefact_attchment_att_ix} (attachment)");
execute_sql("ALTER TABLE {artefact_attachment} ADD FOREIGN KEY(attachment) REFERENCES {artefact}(id)");
execute_sql("ALTER TABLE {artefact_attachment} ADD CONSTRAINT {arteatta_att_fk} FOREIGN KEY {arteatta_att_ix} (attachment) REFERENCES {artefact}(id)");
}
// Drop the _pending table. From now on files uploaded as attachments will become artefacts
......
......@@ -358,8 +358,17 @@ function is_image_type($type) {
* @return boolean Whether the file is a valid image file for Mahara
*/
function is_image_file($path) {
if (!$type = exif_imagetype($path)) {
return false;
if (function_exists('exif_imagetype')) {
// exif_imagetype is faster
if (!$type = exif_imagetype($path)) {
return false;
}
}
else {
// getimagesize returns the same answer
if (!list ($width, $height, $type) = getimagesize($path)) {
return false;
}
}
return is_image_type($type);
}
......
......@@ -758,7 +758,7 @@ function delete_user($userid) {
// Set authinstance to default internal, otherwise the old authinstance can be blocked from deletion
// by deleted users.
$authinst = get_field('auth_instance', 'id', 'institution', 'mahara', 'instancename', 'internal');
$authinst = get_field('auth_instance', 'id', 'institution', 'mahara', 'authname', 'internal');
if ($authinst) {
$deleterec->authinstance = $deleterec->lastauthinstance = $authinst;
}
......
......@@ -27,8 +27,8 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2009040901;
$config->release = '1.2.0dev';
$config->version = 2009042701;
$config->release = '1.2.0alpha2dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
$config->disablelogin = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment