Skip to content

Commit

Permalink
36643: Performance problems when editing wiki pages
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Jan 16, 2024
1 parent 74ac955 commit ce2a5b7
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions Services/MediaObjects/classes/class.ilObjMediaObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,32 +355,6 @@ public function update(bool $a_upload = false): bool
protected static function handleQuotaUpdate(
ilObjMediaObject $a_mob
): void {
global $DIC;

$ilSetting = $DIC->settings();

// if neither workspace nor portfolios are activated, we skip
// the quota update here. this due to performance reasons on installations
// that do not use workspace/portfolios, but heavily copy content.
// in extreme cases (media object in pool and personal blog, deactivate workspace, change media object,
// this may lead to incorrect data in the quota calculation)
if ($ilSetting->get("disable_personal_workspace") && !$ilSetting->get('user_portfolios')) {
return;
}

$parent_obj_ids = array();
foreach ($a_mob->getUsages() as $item) {
$parent_obj_id = $a_mob->getParentObjectIdForUsage($item);
if ($parent_obj_id &&
!in_array($parent_obj_id, $parent_obj_ids)) {
$parent_obj_ids[] = $parent_obj_id;
}
}

// we could suppress this if object is present in a (repository) media pool
// but this would lead to "quota-breaches" when the pool item is deleted
// and "suddenly" all workspace owners get filesize added to their
// respective quotas, regardless of current status
}

/**
Expand Down

0 comments on commit ce2a5b7

Please sign in to comment.