From 73b0d241a5d862f0c98f1e114b73724c2b45798f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 7 Sep 2022 10:21:26 +0200 Subject: [PATCH] wait #5437 @1 --- app/Models/Traits/FluidbookPlayerBranches.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Models/Traits/FluidbookPlayerBranches.php b/app/Models/Traits/FluidbookPlayerBranches.php index 132abf386..5ae5484ea 100644 --- a/app/Models/Traits/FluidbookPlayerBranches.php +++ b/app/Models/Traits/FluidbookPlayerBranches.php @@ -43,8 +43,9 @@ trait FluidbookPlayerBranches return json_decode(file_get_contents($cacheFile)); } - protected static function reposDirectory(){ - return self::getFluidbookPlayerBaseDirectory().'repos/fluidbook-html5'; + protected static function reposDirectory() + { + return self::getFluidbookPlayerBaseDirectory() . 'repos/fluidbook-html5'; } protected function fluidbookCreateBranch($branch) @@ -92,6 +93,8 @@ trait FluidbookPlayerBranches $git = new Git($repos); $branches = $git->listBranches(); + file_put_contents($playerDir . '/activebranches', json_encode($branches)); + foreach ($branches as $b) { $gitsource = $branchesDir . $b; $local = $localDir . $b; @@ -105,7 +108,5 @@ trait FluidbookPlayerBranches } $this->executeGitCommands($branchesDir . $b, ['reset --hard origin/' . $b, 'pull']); } - file_put_contents($playerDir . '/activebranches', json_encode($branches)); } - } -- 2.39.5