mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:15:13 +00:00
commit
ba64b11ac0
1 changed files with 15 additions and 0 deletions
|
@ -1785,6 +1785,21 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||||
$repoDir = $addonDir.'/'.$repoName;
|
$repoDir = $addonDir.'/'.$repoName;
|
||||||
$tempAddonDir = __DIR__ . '/../../store/git/sys/temp/' . $repoName;
|
$tempAddonDir = __DIR__ . '/../../store/git/sys/temp/' . $repoName;
|
||||||
rename($tempAddonDir, $repoDir);
|
rename($tempAddonDir, $repoDir);
|
||||||
|
|
||||||
|
$files = array_diff(scandir($repoDir), array('.', '..'));
|
||||||
|
logger('files: ' . json_encode($files));
|
||||||
|
foreach ($files as $file)
|
||||||
|
{
|
||||||
|
if(is_dir($repoDir.'/'.$file) && $file !== '.git') {
|
||||||
|
$source = '../extend/addon/'.$repoName.'/'.$file;
|
||||||
|
$target = realpath(__DIR__ . '/../../addon/').'/'.$file;
|
||||||
|
unlink($target);
|
||||||
|
if(!symlink($source, $target)) {
|
||||||
|
logger('Error linking addons to /addon');
|
||||||
|
json_return_and_die(array('message' => 'Error linking addons to /addon', 'success' => false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$git = new GitRepo('sys', $repoURL, false, $repoName, $repoDir);
|
$git = new GitRepo('sys', $repoURL, false, $repoName, $repoDir);
|
||||||
$repo = $git->probeRepo();
|
$repo = $git->probeRepo();
|
||||||
json_return_and_die(array('repo'=> $repo, 'message' => '', 'success' => true));
|
json_return_and_die(array('repo'=> $repo, 'message' => '', 'success' => true));
|
||||||
|
|
Loading…
Reference in a new issue