Commit 9d8ec90c authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review

Merge "Bug 1622383: Copying collections to/from groups causes fatal error"

parents e1d5cd78 ae69c7da
......@@ -48,6 +48,7 @@ if ($collection->is_submitted()) {
$urlparams = array();
if (!empty($groupid)) {
require_once('group.php');
define('MENUITEM', 'groups/collections');
define('GROUP', $groupid);
$group = group_current_group();
......
......@@ -26,6 +26,7 @@ $institutionname = param_alphanum('institution', false);
$urlparams = array();
if (!empty($groupid)) {
require_once('group.php');
$group = group_current_group();
// Check if user can edit group collections <-> user can edit group views
$role = group_user_access($group->id);
......
......@@ -32,6 +32,7 @@ if (!empty($groupid)) {
define('MENUITEM', 'groups/collections');
define('GROUP', $groupid);
define('SUBSECTIONHEADING', get_string('Collections', 'collection'));
require_once('group.php');
$group = group_current_group();
// Check if user can edit group collections <-> user can edit group views
$role = group_user_access($group->id);
......
......@@ -5391,6 +5391,7 @@ class View {
* @return string updated description
*/
private function copy_description(View $template, array &$artefactcopies) {
safe_require('artefact', 'file');
$new_description = $template->get('description');
if (!empty($new_description)
&& strpos($new_description, 'artefact/file/download.php?file=') !== false) {
......@@ -6036,6 +6037,7 @@ class View {
*/
public static function get_accesslists($owner=null, $group=null, $institution=null) {
require_once('institution.php');
require_once('group.php');
if (!is_null($owner) && !is_array($owner) && $owner > 0) {
$ownerobj = new User();
......
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