summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-20 22:14:20 +0100
committerGitHub <noreply@github.com>2017-11-20 22:14:20 +0100
commitfe3f094127abb947520fa3464dfa1883043486ee (patch)
treed60eeaa06342dfed179e0f2570a211eb31a8819c
parentc277800ba419a302bde39b2475aee732331bbfa7 (diff)
parent6fd51426bf19817e16f85014ce8f28d33e9f7913 (diff)
downloadnextcloud-server-fe3f094127abb947520fa3464dfa1883043486ee.tar.gz
nextcloud-server-fe3f094127abb947520fa3464dfa1883043486ee.zip
Merge pull request #7230 from nextcloud/fix-autoload-section-failure
Remove wrong entry in admin_settings that causes 500
-rw-r--r--lib/private/Settings/Manager.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php
index 6da499c31c4..cd0af5e7bb2 100644
--- a/lib/private/Settings/Manager.php
+++ b/lib/private/Settings/Manager.php
@@ -32,6 +32,7 @@ namespace OC\Settings;
use OC\Accounts\AccountManager;
use OCP\App\IAppManager;
use OCP\AppFramework\QueryException;
+use OCP\AutoloadNotAllowedException;
use OCP\Encryption\IManager as EncryptionManager;
use OCP\IConfig;
use OCP\IDBConnection;
@@ -471,6 +472,10 @@ class Manager implements IManager {
$settings[$row['priority']][] = $this->query($row['class']);
} catch (QueryException $e) {
// skip
+ } catch (AutoloadNotAllowedException $e) {
+ // skip error and remove remnant of disabled app
+ $this->log->warning('Orphan setting entry will be removed from admin_settings: ' . json_encode($row));
+ $this->mapper->remove(Mapper::TABLE_ADMIN_SETTINGS, $row['class']);
}
}
ckground-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/bash
#
# ownCloud
#
# Run JS tests
#
# @author Vincent Petry
# @copyright 2014 Vincent Petry <pvince81@owncloud.com>
#
NPM="$(which npm 2>/dev/null)"
PREFIX="build"
OUTPUT_DIR="build/jsdocs"

JS_FILES="core/js/*.js apps/*/js/*.js"

if test -z "$NPM"
then
	echo 'Node JS >= 0.8 is required to build the documentation' >&2
	exit 1
fi

# update/install test packages
mkdir -p "$PREFIX" && $NPM install --link --prefix "$PREFIX" jsdoc || exit 3

JSDOC_BIN="$(which jsdoc 2>/dev/null)"

# If not installed globally, try local version
if test -z "$JSDOC_BIN"
then
	JSDOC_BIN="$PREFIX/node_modules/jsdoc/jsdoc.js"
fi

if test -z "$JSDOC_BIN"
then
	echo 'jsdoc executable not found' >&2
	exit 2
fi

mkdir -p "$OUTPUT_DIR"

NODE_PATH="$PREFIX/node_modules" $JSDOC_BIN -d "$OUTPUT_DIR" $JS_FILES