diff options
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php | 6 | ||||
-rw-r--r-- | apps/settings/js/certificates.js | 70 | ||||
-rw-r--r-- | apps/settings/templates/settings/frame.php | 2 |
3 files changed, 4 insertions, 74 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php index 2b19227a354..7eef0f74343 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php @@ -26,11 +26,11 @@ namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; class ExceptionPlugin extends \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin { /** - * @var \Exception[] + * @var \Throwable[] */ protected $exceptions = []; - public function logException(\Exception $ex) { + public function logException(\Throwable $ex) { $exceptionClass = get_class($ex); if (!isset($this->nonFatalExceptions[$exceptionClass])) { $this->exceptions[] = $ex; @@ -38,7 +38,7 @@ class ExceptionPlugin extends \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin { } /** - * @return \Exception[] + * @return \Throwable[] */ public function getExceptions() { return $this->exceptions; diff --git a/apps/settings/js/certificates.js b/apps/settings/js/certificates.js deleted file mode 100644 index f73ceea23f3..00000000000 --- a/apps/settings/js/certificates.js +++ /dev/null @@ -1,70 +0,0 @@ -$(document).ready(function () { - var type = $('#sslCertificate').data('type'); - $('#sslCertificate').on('click', 'td.remove', function () { - var row = $(this).parent(); - $.ajax(OC.generateUrl('settings/' + type + '/certificate/{certificate}', {certificate: row.data('name')}), { - type: 'DELETE' - }); - row.remove(); - - if ($('#sslCertificate > tbody > tr').length === 0) { - $('#sslCertificate').hide(); - } - return true; - }); - - $('#sslCertificate tr > td').tooltip({placement: 'bottom', container: 'body'}); - - $('#rootcert_import').fileupload({ - pasteZone: null, - submit: function (e, data) { - data.formData = _.extend(data.formData || {}, { - requesttoken: OC.requestToken - }); - }, - success: function (data) { - if (typeof data === 'string') { - data = JSON.parse(data); - } else if (data && data.length) { - // fetch response from iframe - data = JSON.parse(data[0].body.innerText); - } - if (!data || typeof(data) === 'string') { - // IE8 iframe workaround comes here instead of fail() - OC.Notification.showTemporary( - t('settings', 'An error occurred. Please upload an ASCII-encoded PEM certificate.')); - return; - } - var issueDate = new Date(data.validFrom * 1000); - var expireDate = new Date(data.validTill * 1000); - var now = new Date(); - var isExpired = !(issueDate <= now && now <= expireDate); - - var row = $('<tr/>'); - row.data('name', data.name); - row.addClass(isExpired ? 'expired' : 'valid'); - row.append($('<td/>').attr('title', data.organization).text(data.commonName)); - row.append($('<td/>').attr('title', t('core,', 'Valid until {date}', {date: data.validTillString})) - .text(data.validTillString)); - row.append($('<td/>').attr('title', data.issuerOrganization).text(data.issuer)); - row.append($('<td/>').addClass('remove').append( - $('<img/>').attr({ - alt: t('core', 'Delete'), - title: t('core', 'Delete'), - src: OC.imagePath('core', 'actions/delete.svg') - }).addClass('action') - )); - - $('#sslCertificate tbody').append(row); - $('#sslCertificate').show(); - }, - fail: function () { - OC.Notification.showTemporary( - t('settings', 'An error occurred. Please upload an ASCII-encoded PEM certificate.')); - } - }); - - if ($('#sslCertificate > tbody > tr').length === 0) { - $('#sslCertificate').hide(); - } -}); diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php index 5f7186559ab..53987bf6074 100644 --- a/apps/settings/templates/settings/frame.php +++ b/apps/settings/templates/settings/frame.php @@ -22,7 +22,7 @@ */ style('settings', 'settings'); -script('settings', [ 'settings', 'admin', 'log', 'certificates']); +script('settings', [ 'settings', 'admin', 'log']); script('core', 'setupchecks'); script('files', 'jquery.fileupload'); |