Migrations: Improve track log of migrations - refs BT#20846

pull/4817/head
christian 1 year ago
parent c8f4d4e82f
commit 15ebfed908
  1. 8
      public/main/install/install.lib.php
  2. 3
      src/CoreBundle/Entity/Listener/ResourceListener.php
  3. 0
      var/upload/.gitkeep

@ -1348,21 +1348,21 @@ function migrate(EntityManager $manager)
$versionCounter = 1;
foreach ($versions as $version => $queries) {
$total = count($queries);
echo '----------------------------------------------<br />';
//echo '----------------------------------------------<br />';
$message = "VERSION: $version";
echo "$message<br/>";
//echo "$message<br/>";
error_log('-------------------------------------');
error_log($message);
$counter = 1;
foreach ($queries as $query) {
$sql = $query->getStatement();
echo "<code>$sql</code><br>";
//echo "<code>$sql</code><br>";
error_log("$counter/$total : $sql");
$counter++;
}
$versionCounter++;
}
echo '<br/>DONE!<br />';
//echo '<br/>DONE!<br />';
error_log('DONE!');
}

@ -183,6 +183,9 @@ class ResourceListener
}
if ($resource instanceof PersonalFile) {
if (null === $currentUser) {
$currentUser = $parentNode->getCreator();
}
$valid = $parentNode->getCreator()->getUsername() === $currentUser->getUsername() ||
$parentNode->getId() === $currentUser->getResourceNode()->getId();

Loading…
Cancel
Save