diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
commit | bc2b948f1f6e62b1c277a4042200bb6678956f3f (patch) | |
tree | 8586c30e495607eee23f16c0aad40974f0711275 /Zotlabs/Module/Admin | |
parent | 23e3e2c50499fab52769929a448e73012fd915af (diff) | |
parent | ff9442474d07cce24c8f66db39ec34471c3874a2 (diff) | |
download | volse-hubzilla-2.2.tar.gz volse-hubzilla-2.2.tar.bz2 volse-hubzilla-2.2.zip |
Merge branch 2.2RC2.2
Diffstat (limited to 'Zotlabs/Module/Admin')
-rw-r--r-- | Zotlabs/Module/Admin/Plugins.php | 19 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Queue.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Site.php | 10 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Themes.php | 2 |
4 files changed, 22 insertions, 10 deletions
diff --git a/Zotlabs/Module/Admin/Plugins.php b/Zotlabs/Module/Admin/Plugins.php index 9e48b4b86..527e96496 100644 --- a/Zotlabs/Module/Admin/Plugins.php +++ b/Zotlabs/Module/Admin/Plugins.php @@ -36,7 +36,7 @@ class Plugins { json_return_and_die(array('message' => 'Error creating extend folder: ' . $extendDir, 'success' => false)); } else { - if (!symlink('extend/addon', $addonDir)) { + if (!symlink(realpath('extend/addon'), $addonDir)) { logger('Error creating symlink to addon folder: ' . $addonDir); json_return_and_die(array('message' => 'Error creating symlink to addon folder: ' . $addonDir, 'success' => false)); } @@ -57,7 +57,7 @@ class Plugins { $files = array_diff(scandir($repoDir), array('.', '..')); foreach ($files as $file) { if (is_dir($repoDir . '/' . $file) && $file !== '.git') { - $source = 'extend/addon/' . $repoName . '/' . $file; + $source = '../extend/addon/' . $repoName . '/' . $file; $target = realpath('addon/') . '/' . $file; unlink($target); if (!symlink($source, $target)) { @@ -86,7 +86,7 @@ class Plugins { logger('Error creating extend folder: ' . $extendDir); json_return_and_die(array('message' => 'Error creating extend folder: ' . $extendDir, 'success' => false)); } else { - if (!symlink('extend/addon', $addonDir)) { + if (!symlink(realpath('extend/addon'), $addonDir)) { logger('Error creating symlink to addon folder: ' . $addonDir); json_return_and_die(array('message' => 'Error creating symlink to addon folder: ' . $addonDir, 'success' => false)); } @@ -119,7 +119,7 @@ class Plugins { logger('Error creating extend folder: ' . $extendDir); json_return_and_die(array('message' => 'Error creating extend folder: ' . $extendDir, 'success' => false)); } else { - if (!symlink('extend/addon', $addonDir)) { + if (!symlink(realpath('extend/addon'), $addonDir)) { logger('Error creating symlink to addon folder: ' . $addonDir); json_return_and_die(array('message' => 'Error creating symlink to addon folder: ' . $addonDir, 'success' => false)); } @@ -156,7 +156,7 @@ class Plugins { $files = array_diff(scandir($repoDir), array('.', '..')); foreach ($files as $file) { if (is_dir($repoDir . '/' . $file) && $file !== '.git') { - $source = 'extend/addon/' . $repoName . '/' . $file; + $source = '../extend/addon/' . $repoName . '/' . $file; $target = realpath('addon/') . '/' . $file; unlink($target); if (!symlink($source, $target)) { @@ -176,13 +176,13 @@ class Plugins { $repoURL = $_REQUEST['repoURL']; $extendDir = 'store/[data]/git/sys/extend'; $addonDir = $extendDir . '/addon'; - $tempAddonDir = 'store/[data]/git/sys/temp'; + $tempAddonDir = realpath('store/[data]') . '/git/sys/temp'; if (!file_exists($extendDir)) { if (!mkdir($extendDir, 0770, true)) { logger('Error creating extend folder: ' . $extendDir); json_return_and_die(array('message' => 'Error creating extend folder: ' . $extendDir, 'success' => false)); } else { - if (!symlink('extend/addon', $addonDir)) { + if (!symlink(realpath('extend/addon'), $addonDir)) { logger('Error creating symlink to addon folder: ' . $addonDir); json_return_and_die(array('message' => 'Error creating symlink to addon folder: ' . $addonDir, 'success' => false)); } @@ -395,6 +395,10 @@ class Plugins { usort($plugins,'self::plugin_sort'); + $allowManageRepos = false; + if(is_writable('extend/addon') && is_writable('store/[data]')) { + $allowManageRepos = true; + } $admin_plugins_add_repo_form= replace_macros( get_markup_template('admin_plugins_addrepo.tpl'), array( @@ -432,6 +436,7 @@ class Plugins { '$plugins' => $plugins, '$disabled' => t('Disabled - version incompatibility'), '$form_security_token' => get_form_security_token('admin_plugins'), + '$allowManageRepos' => $allowManageRepos, '$managerepos' => t('Manage Repos'), '$installedtitle' => t('Installed Plugin Repositories'), '$addnewrepotitle' => t('Install a New Plugin Repository'), diff --git a/Zotlabs/Module/Admin/Queue.php b/Zotlabs/Module/Admin/Queue.php index 4986de925..5a47413ee 100644 --- a/Zotlabs/Module/Admin/Queue.php +++ b/Zotlabs/Module/Admin/Queue.php @@ -15,7 +15,6 @@ class Queue { $expert = ((array_key_exists('expert',$_REQUEST)) ? intval($_REQUEST['expert']) : 0); if($_REQUEST['drophub']) { - require_once('hubloc.php'); hubloc_mark_as_down($_REQUEST['drophub']); remove_queue_by_posturl($_REQUEST['drophub']); } diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php index 829ca71e4..b71e63030 100644 --- a/Zotlabs/Module/Admin/Site.php +++ b/Zotlabs/Module/Admin/Site.php @@ -163,6 +163,14 @@ class Site { foreach($files as $file) { $vars = ''; $f = basename($file); + + $info = get_theme_info($f); + $compatible = check_plugin_versions($info); + if(!$compatible) { + $theme_choices[$f] = $theme_choices_mobile[$f] = sprintf(t('%s - (Incompatible)'), $f); + continue; + } + if (file_exists($file . '/library')) continue; if (file_exists($file . '/mobile')) @@ -310,4 +318,4 @@ class Site { )); } -}
\ No newline at end of file +} diff --git a/Zotlabs/Module/Admin/Themes.php b/Zotlabs/Module/Admin/Themes.php index 63a9a1670..fc908ec8b 100644 --- a/Zotlabs/Module/Admin/Themes.php +++ b/Zotlabs/Module/Admin/Themes.php @@ -230,4 +230,4 @@ class Themes { -}
\ No newline at end of file +} |