Commit 064d794d authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Merge commit 'origin/master' into view-themes

parents c67817a1 a7c2a1dc
......@@ -483,7 +483,13 @@ function edituser_institution_submit(Pieform $form, $values) {
if (isset($values['add']) && $USER->get('admin')
&& (empty($userinstitutions) || get_config('usersallowedmultipleinstitutions'))) {
$user->join_institution($values['addinstitution']);
if ($user->id == $USER->id) {
$USER->join_institution($values['addinstitution']);
$USER->commit();
}
else {
$user->join_institution($values['addinstitution']);
}
}
redirect('/admin/users/edit.php?id='.$user->id);
......
......@@ -13,6 +13,8 @@
<FIELD NAME="artefact" TYPE="int" LENGTH="10" NOTNULL="false"/>
<FIELD NAME="key" TYPE="char" LENGTH="16" NOTNULL="false"/>
<FIELD NAME="expiry" TYPE="datetime" NOTNULL="false"/>
<FIELD NAME="mailssent" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0"/>
<FIELD NAME="mailsbounced" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="owner,email"/>
......
......@@ -1287,14 +1287,14 @@ function xmldb_core_upgrade($oldversion=0) {
if ($oldversion < 2009111200) {
$table = new XMLDBTable('artefact_internal_profile_email');
$field = new XMLDBField('mailssent');
$field->setAttributes(XMLDB_TYPE_INTEGER, 1, null, XMLDB_NOTNULL, null, null, null, 0);
$field->setAttributes(XMLDB_TYPE_INTEGER, 2, null, XMLDB_NOTNULL, null, null, null, 0);
add_field($table, $field);
}
if ($oldversion < 2009111201) {
$table = new XMLDBTable('artefact_internal_profile_email');
$field = new XMLDBField('mailsbounced');
$field->setAttributes(XMLDB_TYPE_INTEGER, 1, null, XMLDB_NOTNULL, null, null, null, 0);
$field->setAttributes(XMLDB_TYPE_INTEGER, 2, null, XMLDB_NOTNULL, null, null, null, 0);
add_field($table, $field);
}
......
......@@ -670,6 +670,7 @@ function core_install_firstcoredata_defaults() {
set_config('showselfsearchsideblock', 0);
set_config('showtagssideblock', 1);
set_config('tagssideblockmaxtags', 20);
set_config('usersallowedmultipleinstitutions', 1);
// install the applications
$app = new StdClass;
......
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