aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-10 19:42:37 -0700
committerredmatrix <git@macgirvin.com>2016-05-10 19:42:37 -0700
commit9caaa9397e2b7c9b9acde8cbab4bb97a77939d8a (patch)
tree777fdd46a548a55894091ae4044c1fa5836bd107 /Zotlabs/Module
parent915bd2ec7745110919a4d386ae2b433a2c22701a (diff)
parentba64b11ac0f16e5b6c56125ea95f277afb69ce09 (diff)
downloadvolse-hubzilla-9caaa9397e2b7c9b9acde8cbab4bb97a77939d8a.tar.gz
volse-hubzilla-9caaa9397e2b7c9b9acde8cbab4bb97a77939d8a.tar.bz2
volse-hubzilla-9caaa9397e2b7c9b9acde8cbab4bb97a77939d8a.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Admin.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php
index 1b98a2ced..0e3ee68c4 100644
--- a/Zotlabs/Module/Admin.php
+++ b/Zotlabs/Module/Admin.php
@@ -1785,6 +1785,21 @@ class Admin extends \Zotlabs\Web\Controller {
$repoDir = $addonDir.'/'.$repoName;
$tempAddonDir = __DIR__ . '/../../store/git/sys/temp/' . $repoName;
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);
$repo = $git->probeRepo();
json_return_and_die(array('repo'=> $repo, 'message' => '', 'success' => true));