Use empty array as group list in OC_App::enable
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
2e15c0d871
commit
e4077672e1
|
@ -390,8 +390,8 @@ class OC_App {
|
||||||
*
|
*
|
||||||
* This function set an app as enabled in appconfig.
|
* This function set an app as enabled in appconfig.
|
||||||
*/
|
*/
|
||||||
public function enable($appId,
|
public function enable(string $appId,
|
||||||
$groups = null) {
|
array $groups = []) {
|
||||||
self::$enabledAppsCache = []; // flush
|
self::$enabledAppsCache = []; // flush
|
||||||
|
|
||||||
// Check if app is already downloaded
|
// Check if app is already downloaded
|
||||||
|
@ -405,7 +405,7 @@ class OC_App {
|
||||||
$installer->installApp($appId);
|
$installer->installApp($appId);
|
||||||
|
|
||||||
$appManager = \OC::$server->getAppManager();
|
$appManager = \OC::$server->getAppManager();
|
||||||
if (!is_null($groups)) {
|
if ($groups !== []) {
|
||||||
$groupManager = \OC::$server->getGroupManager();
|
$groupManager = \OC::$server->getGroupManager();
|
||||||
$groupsList = [];
|
$groupsList = [];
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ if ($lastConfirm < (time() - 30 * 60 + 15)) { // allow 15 seconds delay
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups = isset($_POST['groups']) ? (array)$_POST['groups'] : null;
|
$groups = isset($_POST['groups']) ? (array)$_POST['groups'] : [];
|
||||||
$appIds = isset($_POST['appIds']) ? (array)$_POST['appIds'] : [];
|
$appIds = isset($_POST['appIds']) ? (array)$_POST['appIds'] : [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue