diff options
1082 files changed, 5539 insertions, 5481 deletions
diff --git a/apps/accessibility/appinfo/routes.php b/apps/accessibility/appinfo/routes.php index ed8b0f57f08..a5e75fcdcee 100644 --- a/apps/accessibility/appinfo/routes.php +++ b/apps/accessibility/appinfo/routes.php @@ -27,13 +27,13 @@ return [ 'routes' => [ ['name' => 'accessibility#getCss', 'url' => '/css/user-{md5}', 'verb' => 'GET'], ['name' => 'accessibility#getJavascript', 'url' => '/js/accessibility', 'verb' => 'GET'], - ], - 'ocs' => [ + ], + 'ocs' => [ [ 'name' => 'Config#getConfig', 'url' => '/api/v1/config', 'verb' => 'GET', - ], + ], [ 'name' => 'Config#setConfig', 'url' => '/api/v1/config/{key}', @@ -44,5 +44,5 @@ return [ 'url' => '/api/v1/config/{key}', 'verb' => 'DELETE', ], - ] + ] ]; diff --git a/apps/accessibility/lib/AccessibilityProvider.php b/apps/accessibility/lib/AccessibilityProvider.php index 159cde37e3a..ef8571528bb 100644 --- a/apps/accessibility/lib/AccessibilityProvider.php +++ b/apps/accessibility/lib/AccessibilityProvider.php @@ -72,12 +72,12 @@ class AccessibilityProvider { public function getHighContrast() { return [ - 'id' => 'highcontrast', - 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'), - 'title' => $this->l->t('High contrast mode'), - 'enableLabel' => $this->l->t('Enable high contrast mode'), - 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.') - ]; + 'id' => 'highcontrast', + 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'), + 'title' => $this->l->t('High contrast mode'), + 'enableLabel' => $this->l->t('Enable high contrast mode'), + 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.') + ]; } public function getFonts() { diff --git a/apps/accessibility/lib/Controller/AccessibilityController.php b/apps/accessibility/lib/Controller/AccessibilityController.php index 81212ad98d3..25e117c7155 100644 --- a/apps/accessibility/lib/Controller/AccessibilityController.php +++ b/apps/accessibility/lib/Controller/AccessibilityController.php @@ -247,7 +247,7 @@ class AccessibilityController extends Controller { * * @return array */ - private function getUserValues(): array{ + private function getUserValues(): array { $userTheme = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'theme', false); $userFont = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false); $userHighContrast = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'highcontrast', false); diff --git a/apps/accessibility/lib/Controller/ConfigController.php b/apps/accessibility/lib/Controller/ConfigController.php index dd070d291b8..726cca31076 100644 --- a/apps/accessibility/lib/Controller/ConfigController.php +++ b/apps/accessibility/lib/Controller/ConfigController.php @@ -116,7 +116,7 @@ class ConfigController extends OCSController { $highcontrast = [$this->accessibilityProvider->getHighContrast()]; $fonts = $this->accessibilityProvider->getFonts(); - $availableOptions = array_map(function($option) { + $availableOptions = array_map(function ($option) { return $option['id']; }, array_merge($themes, $highcontrast, $fonts)); diff --git a/apps/accessibility/lib/Migration/RepairUserConfig.php b/apps/accessibility/lib/Migration/RepairUserConfig.php index d5940f76509..a479afaf052 100644 --- a/apps/accessibility/lib/Migration/RepairUserConfig.php +++ b/apps/accessibility/lib/Migration/RepairUserConfig.php @@ -73,7 +73,7 @@ class RepairUserConfig implements IRepairStep { */ public function run(IOutput $output) { $output->startProgress(); - $this->userManager->callForSeenUsers(function(IUser $user) use ($output) { + $this->userManager->callForSeenUsers(function (IUser $user) use ($output) { $theme = $this->config->getUserValue($user->getUID(), Application::APP_NAME, 'theme', false); if ($theme === 'themedark') { $this->config->setUserValue($user->getUID(), Application::APP_NAME, 'theme', 'dark'); diff --git a/apps/admin_audit/lib/Actions/Console.php b/apps/admin_audit/lib/Actions/Console.php index 24ef0503422..5b2eb11da38 100644 --- a/apps/admin_audit/lib/Actions/Console.php +++ b/apps/admin_audit/lib/Actions/Console.php @@ -28,7 +28,6 @@ declare(strict_types=1); namespace OCA\AdminAudit\Actions; - class Console extends Action { /** * @param $arguments diff --git a/apps/admin_audit/lib/Actions/GroupManagement.php b/apps/admin_audit/lib/Actions/GroupManagement.php index f6a328b2b66..daef3e5fbb9 100644 --- a/apps/admin_audit/lib/Actions/GroupManagement.php +++ b/apps/admin_audit/lib/Actions/GroupManagement.php @@ -29,7 +29,6 @@ declare(strict_types=1); namespace OCA\AdminAudit\Actions; - use OCP\IGroup; use OCP\IUser; diff --git a/apps/admin_audit/lib/Actions/Security.php b/apps/admin_audit/lib/Actions/Security.php index 03569a38fef..3ac9485fc9c 100644 --- a/apps/admin_audit/lib/Actions/Security.php +++ b/apps/admin_audit/lib/Actions/Security.php @@ -25,6 +25,7 @@ declare(strict_types=1); */ namespace OCA\AdminAudit\Actions; + use OCP\IUser; /** diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php index 917b3442cb2..fef112e77d3 100644 --- a/apps/admin_audit/lib/Actions/Sharing.php +++ b/apps/admin_audit/lib/Actions/Sharing.php @@ -29,7 +29,6 @@ declare(strict_types=1); namespace OCA\AdminAudit\Actions; - use OCP\Share; /** diff --git a/apps/admin_audit/lib/Actions/Trashbin.php b/apps/admin_audit/lib/Actions/Trashbin.php index b0f3c0bb4db..50a3d28a8ad 100644 --- a/apps/admin_audit/lib/Actions/Trashbin.php +++ b/apps/admin_audit/lib/Actions/Trashbin.php @@ -28,7 +28,6 @@ declare(strict_types=1); namespace OCA\AdminAudit\Actions; - class Trashbin extends Action { public function delete(array $params) { diff --git a/apps/admin_audit/lib/Actions/UserManagement.php b/apps/admin_audit/lib/Actions/UserManagement.php index 62eca9e7d65..ab231a796c7 100644 --- a/apps/admin_audit/lib/Actions/UserManagement.php +++ b/apps/admin_audit/lib/Actions/UserManagement.php @@ -30,7 +30,6 @@ declare(strict_types=1); namespace OCA\AdminAudit\Actions; - use OCP\IUser; /** diff --git a/apps/admin_audit/lib/Actions/Versions.php b/apps/admin_audit/lib/Actions/Versions.php index fb89ea26ce1..612e5a8abd2 100644 --- a/apps/admin_audit/lib/Actions/Versions.php +++ b/apps/admin_audit/lib/Actions/Versions.php @@ -28,7 +28,6 @@ declare(strict_types=1); namespace OCA\AdminAudit\Actions; - class Versions extends Action { public function rollback(array $params) { diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index 46dbf35cfc2..7e6c5410f6e 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -120,7 +120,7 @@ class Application extends App { $userSession->listen('\OC\User', 'postUnassignedUserId', [$userActions, 'unassign']); } - protected function groupHooks() { + protected function groupHooks() { $groupActions = new GroupManagement($this->logger); /** @var IGroupManager|Manager $groupManager */ @@ -154,15 +154,15 @@ class Application extends App { protected function appHooks() { $eventDispatcher = $this->getContainer()->getServer()->getEventDispatcher(); - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function(ManagerEvent $event) { + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) { $appActions = new AppManagement($this->logger); $appActions->enableApp($event->getAppID()); }); - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function(ManagerEvent $event) { + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function (ManagerEvent $event) { $appActions = new AppManagement($this->logger); $appActions->enableAppForGroups($event->getAppID(), $event->getGroups()); }); - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function(ManagerEvent $event) { + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function (ManagerEvent $event) { $appActions = new AppManagement($this->logger); $appActions->disableApp($event->getAppID()); }); @@ -171,7 +171,7 @@ class Application extends App { protected function consoleHooks() { $eventDispatcher = $this->getContainer()->getServer()->getEventDispatcher(); - $eventDispatcher->addListener(ConsoleEvent::EVENT_RUN, function(ConsoleEvent $event) { + $eventDispatcher->addListener(ConsoleEvent::EVENT_RUN, function (ConsoleEvent $event) { $appActions = new Console($this->logger); $appActions->runCommand($event->getArguments()); }); @@ -182,7 +182,7 @@ class Application extends App { $eventDispatcher = $this->getContainer()->getServer()->getEventDispatcher(); $eventDispatcher->addListener( IPreview::EVENT, - function(GenericEvent $event) use ($fileActions) { + function (GenericEvent $event) use ($fileActions) { /** @var File $file */ $file = $event->getSubject(); $fileActions->preview([ @@ -253,11 +253,11 @@ class Application extends App { protected function securityHooks() { $eventDispatcher = $this->getContainer()->getServer()->getEventDispatcher(); - $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function(GenericEvent $event) { + $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function (GenericEvent $event) { $security = new Security($this->logger); $security->twofactorSuccess($event->getSubject(), $event->getArguments()); }); - $eventDispatcher->addListener(IProvider::EVENT_FAILED, function(GenericEvent $event) { + $eventDispatcher->addListener(IProvider::EVENT_FAILED, function (GenericEvent $event) { $security = new Security($this->logger); $security->twofactorFailed($event->getSubject(), $event->getArguments()); }); diff --git a/apps/cloud_federation_api/lib/AppInfo/Application.php b/apps/cloud_federation_api/lib/AppInfo/Application.php index 2d99d46da04..0f808a88c04 100644 --- a/apps/cloud_federation_api/lib/AppInfo/Application.php +++ b/apps/cloud_federation_api/lib/AppInfo/Application.php @@ -23,7 +23,6 @@ namespace OCA\CloudFederationAPI\AppInfo; - use OCA\CloudFederationAPI\Capabilities; use OCP\AppFramework\App; diff --git a/apps/cloud_federation_api/lib/Capabilities.php b/apps/cloud_federation_api/lib/Capabilities.php index 010c8a5403c..cd1ce5dd359 100644 --- a/apps/cloud_federation_api/lib/Capabilities.php +++ b/apps/cloud_federation_api/lib/Capabilities.php @@ -23,7 +23,6 @@ namespace OCA\CloudFederationAPI; - use OCP\Capabilities\ICapability; use OCP\IURLGenerator; diff --git a/apps/cloud_federation_api/lib/Config.php b/apps/cloud_federation_api/lib/Config.php index cd2b333c237..6553ae7d9b2 100644 --- a/apps/cloud_federation_api/lib/Config.php +++ b/apps/cloud_federation_api/lib/Config.php @@ -22,6 +22,7 @@ */ namespace OCA\CloudFederationAPI; + use OCP\Federation\ICloudFederationProviderManager; /** diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index d99e6c2d006..3b8b29a49cd 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -133,7 +133,7 @@ class RequestHandlerController extends Controller { $shareType === null || !is_array($protocol) || !isset($protocol['name']) || - !isset ($protocol['options']) || + !isset($protocol['options']) || !is_array($protocol['options']) || !isset($protocol['options']['sharedSecret']) ) { diff --git a/apps/comments/js/comments.js b/apps/comments/js/comments.js index 4babc23ea34..cae9d670873 100644 --- a/apps/comments/js/comments.js +++ b/apps/comments/js/comments.js @@ -1,2 +1,2 @@ -!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/js/",n(n.s=3)}([function(t,e){t.exports=jQuery},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=(r=o,s=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[n].concat(a).concat([i]).join("\n")}var r,s,l;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o=0;o<t.length;o++){var i=[].concat(t[o]);n&&(i[2]?i[2]="".concat(n," and ").concat(i[2]):i[2]=n),e.push(i)}},e}},function(t,e,n){"use strict";function o(t,e){for(var n=[],o={},i=0;i<e.length;i++){var a=e[i],r=a[0],s={id:t+":"+i,css:a[1],media:a[2],sourceMap:a[3]};o[r]?o[r].parts.push(s):n.push(o[r]={id:r,parts:[s]})}return n}n.r(e),n.d(e,"default",(function(){return h}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},r=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,c=!1,m=function(){},u=null,d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,n,i){c=n,u=i||{};var r=o(t,e);return p(r),function(e){for(var n=[],i=0;i<r.length;i++){var s=r[i];(l=a[s.id]).refs--,n.push(l)}e?p(r=o(t,e)):r=[];for(i=0;i<n.length;i++){var l;if(0===(l=n[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete a[l.id]}}}}function p(t){for(var e=0;e<t.length;e++){var n=t[e],o=a[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(g(n.parts[i]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{var r=[];for(i=0;i<n.parts.length;i++)r.push(g(n.parts[i]));a[n.id]={id:n.id,refs:1,parts:r}}}}function f(){var t=document.createElement("style");return t.type="text/css",r.appendChild(t),t}function g(t){var e,n,o=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(o){if(c)return m;o.parentNode.removeChild(o)}if(d){var i=l++;o=s||(s=f()),e=C.bind(null,o,i,!1),n=C.bind(null,o,i,!0)}else o=f(),e=w.bind(null,o),n=function(){o.parentNode.removeChild(o)};return e(t),function(o){if(o){if(o.css===t.css&&o.media===t.media&&o.sourceMap===t.sourceMap)return;e(t=o)}else n()}}var v,y=(v=[],function(t,e){return v[t]=e,v.filter(Boolean).join("\n")});function C(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var a=document.createTextNode(i),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(a,r[e]):t.appendChild(a)}}function w(t,e){var n=e.css,o=e.media,i=e.sourceMap;if(o&&t.setAttribute("media",o),u.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},function(t,e,n){"use strict";n.r(e);n(4),n(5),n(6),n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(18);window.OCA.Comments=OCA.Comments},function(t,e){OCA.Comments||(OCA.Comments={})},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o,i;o=Handlebars.template,(i=OCA.Comments.Templates=OCA.Comments.Templates||{}).comment=o({1:function(t,e,n,o,i){return" unread"},3:function(t,e,n,o,i){return" collapsed"},5:function(t,e,n,o,i){return" currentUser"},7:function(t,e,n,o,i){var a;return'data-username="'+t.escapeExpression("function"==typeof(a=null!=(a=n.actorId||(null!=e?e.actorId:e))?a:n.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"actorId",hash:{},data:i}):a)+'"'},9:function(t,e,n,o,i){return'\t\t\t<a href="#" class="action more icon icon-more has-tooltip"></a>\n\t\t\t<div class="deleteLoading icon-loading-small hidden"></div>\n'},11:function(t,e,n,o,i){return'\t\t<div class="message-overlay"></div>\n'},compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s,l=null!=e?e:t.nullContext||{},c=o.helperMissing,m="function",u=t.escapeExpression;return'<li class="comment'+(null!=(r=o.if.call(l,null!=e?e.isUnread:e,{name:"if",hash:{},fn:t.program(1,a,0),inverse:t.noop,data:a}))?r:"")+(null!=(r=o.if.call(l,null!=e?e.isLong:e,{name:"if",hash:{},fn:t.program(3,a,0),inverse:t.noop,data:a}))?r:"")+'" data-id="'+u(n(s=null!=(s=o.id||(null!=e?e.id:e))?s:c)===m?s.call(l,{name:"id",hash:{},data:a}):s)+'">\n\t<div class="authorRow">\n\t\t<div class="avatar'+(null!=(r=o.if.call(l,null!=e?e.isUserAuthor:e,{name:"if",hash:{},fn:t.program(5,a,0),inverse:t.noop,data:a}))?r:"")+'" '+(null!=(r=o.if.call(l,null!=e?e.actorId:e,{name:"if",hash:{},fn:t.program(7,a,0),inverse:t.noop,data:a}))?r:"")+'> </div>\n\t\t<div class="author'+(null!=(r=o.if.call(l,null!=e?e.isUserAuthor:e,{name:"if",hash:{},fn:t.program(5,a,0),inverse:t.noop,data:a}))?r:"")+'">'+u(n(s=null!=(s=o.actorDisplayName||(null!=e?e.actorDisplayName:e))?s:c)===m?s.call(l,{name:"actorDisplayName",hash:{},data:a}):s)+"</div>\n"+(null!=(r=o.if.call(l,null!=e?e.isUserAuthor:e,{name:"if",hash:{},fn:t.program(9,a,0),inverse:t.noop,data:a}))?r:"")+'\t\t<div class="date has-tooltip live-relative-timestamp" data-timestamp="'+u(n(s=null!=(s=o.timestamp||(null!=e?e.timestamp:e))?s:c)===m?s.call(l,{name:"timestamp",hash:{},data:a}):s)+'" title="'+u(n(s=null!=(s=o.altDate||(null!=e?e.altDate:e))?s:c)===m?s.call(l,{name:"altDate",hash:{},data:a}):s)+'">'+u(n(s=null!=(s=o.date||(null!=e?e.date:e))?s:c)===m?s.call(l,{name:"date",hash:{},data:a}):s)+'</div>\n\t</div>\n\t<div class="message">'+(null!=(r=n(s=null!=(s=o.formattedMessage||(null!=e?e.formattedMessage:e))?s:c)===m?s.call(l,{name:"formattedMessage",hash:{},data:a}):s)?r:"")+"</div>\n"+(null!=(r=o.if.call(l,null!=e?e.isLong:e,{name:"if",hash:{},fn:t.program(11,a,0),inverse:t.noop,data:a}))?r:"")+"</li>\n"},useData:!0}),i.commentsmodifymenu=o({1:function(t,e,o,i,a){var r,s,l=null!=e?e:t.nullContext||{},c=o.helperMissing,m=t.escapeExpression;return'\t\t<li>\n\t\t\t<a href="#" class="menuitem action '+m("function"===n(s=null!=(s=o.name||(null!=e?e.name:e))?s:c)?s.call(l,{name:"name",hash:{},data:a}):s)+' permanent" data-action="'+m("function"===n(s=null!=(s=o.name||(null!=e?e.name:e))?s:c)?s.call(l,{name:"name",hash:{},data:a}):s)+'">\n'+(null!=(r=o.if.call(l,null!=e?e.iconClass:e,{name:"if",hash:{},fn:t.program(2,a,0),inverse:t.program(4,a,0),data:a}))?r:"")+"\t\t\t\t<span>"+m("function"===n(s=null!=(s=o.displayName||(null!=e?e.displayName:e))?s:c)?s.call(l,{name:"displayName",hash:{},data:a}):s)+"</span>\n\t\t\t</a>\n\t\t</li>\n"},2:function(t,e,n,o,i){var a;return'\t\t\t\t\t<span class="icon '+t.escapeExpression("function"==typeof(a=null!=(a=n.iconClass||(null!=e?e.iconClass:e))?a:n.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"iconClass",hash:{},data:i}):a)+'"></span>\n'},4:function(t,e,n,o,i){return'\t\t\t\t\t<span class="no-icon"></span>\n'},compiler:[7,">= 4.0.0"],main:function(t,e,n,o,i){var a;return"<ul>\n"+(null!=(a=n.each.call(null!=e?e:t.nullContext||{},null!=e?e.items:e,{name:"each",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?a:"")+"</ul>\n"},useData:!0}),i.edit_comment=o({1:function(t,e,n,o,i){var a;return'\t\t\t<div class="action-container">\n\t\t\t\t<a href="#" class="action cancel icon icon-close has-tooltip" title="'+t.escapeExpression("function"==typeof(a=null!=(a=n.cancelText||(null!=e?e.cancelText:e))?a:n.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"cancelText",hash:{},data:i}):a)+'"></a>\n\t\t\t</div>\n'},compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s,l=null!=e?e:t.nullContext||{},c=o.helperMissing,m="function",u=t.escapeExpression;return"<"+u(n(s=null!=(s=o.tag||(null!=e?e.tag:e))?s:c)===m?s.call(l,{name:"tag",hash:{},data:a}):s)+' class="newCommentRow comment" data-id="'+u(n(s=null!=(s=o.id||(null!=e?e.id:e))?s:c)===m?s.call(l,{name:"id",hash:{},data:a}):s)+'">\n\t<div class="authorRow">\n\t\t<div class="avatar currentUser" data-username="'+u(n(s=null!=(s=o.actorId||(null!=e?e.actorId:e))?s:c)===m?s.call(l,{name:"actorId",hash:{},data:a}):s)+'"></div>\n\t\t<div class="author currentUser">'+u(n(s=null!=(s=o.actorDisplayName||(null!=e?e.actorDisplayName:e))?s:c)===m?s.call(l,{name:"actorDisplayName",hash:{},data:a}):s)+"</div>\n"+(null!=(r=o.if.call(l,null!=e?e.isEditMode:e,{name:"if",hash:{},fn:t.program(1,a,0),inverse:t.noop,data:a}))?r:"")+'\t</div>\n\t<form class="newCommentForm">\n\t\t<div contentEditable="true" class="message" data-placeholder="'+u(n(s=null!=(s=o.newMessagePlaceholder||(null!=e?e.newMessagePlaceholder:e))?s:c)===m?s.call(l,{name:"newMessagePlaceholder",hash:{},data:a}):s)+'">'+u(n(s=null!=(s=o.message||(null!=e?e.message:e))?s:c)===m?s.call(l,{name:"message",hash:{},data:a}):s)+'</div>\n\t\t<input class="submit icon-confirm has-tooltip" type="submit" value="" title="'+u(n(s=null!=(s=o.submitText||(null!=e?e.submitText:e))?s:c)===m?s.call(l,{name:"submitText",hash:{},data:a}):s)+'"/>\n\t\t<div class="submitLoading icon-loading-small hidden"></div>\n\t</form>\n</'+u(n(s=null!=(s=o.tag||(null!=e?e.tag:e))?s:c)===m?s.call(l,{name:"tag",hash:{},data:a}):s)+">\n"},useData:!0}),i.filesplugin=o({compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s=null!=e?e:t.nullContext||{},l=o.helperMissing,c=t.escapeExpression;return'<a class="action action-comment permanent" title="'+c("function"===n(r=null!=(r=o.countMessage||(null!=e?e.countMessage:e))?r:l)?r.call(s,{name:"countMessage",hash:{},data:a}):r)+'" href="#">\n\t<img class="svg" src="'+c("function"===n(r=null!=(r=o.iconUrl||(null!=e?e.iconUrl:e))?r:l)?r.call(s,{name:"iconUrl",hash:{},data:a}):r)+'"/>\n</a>\n'},useData:!0}),i.view=o({compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s=null!=e?e:t.nullContext||{},l=o.helperMissing,c=t.escapeExpression;return'<ul class="comments">\n</ul>\n<div class="emptycontent hidden"><div class="icon-comment"></div>\n\t<p>'+c("function"===n(r=null!=(r=o.emptyResultLabel||(null!=e?e.emptyResultLabel:e))?r:l)?r.call(s,{name:"emptyResultLabel",hash:{},data:a}):r)+'</p></div>\n<input type="button" class="showMore hidden" value="'+c("function"===n(r=null!=(r=o.moreLabel||(null!=e?e.moreLabel:e))?r:l)?r.call(s,{name:"moreLabel",hash:{},data:a}):r)+'" name="show-more" id="show-more" />\n<div class="loading hidden" style="height: 50px"></div>\n'},useData:!0})},function(t,e){!function(t,e){_.extend(t.Files.Client,{PROPERTY_FILEID:"{"+t.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_MESSAGE:"{"+t.Files.Client.NS_OWNCLOUD+"}message",PROPERTY_ACTORTYPE:"{"+t.Files.Client.NS_OWNCLOUD+"}actorType",PROPERTY_ACTORID:"{"+t.Files.Client.NS_OWNCLOUD+"}actorId",PROPERTY_ISUNREAD:"{"+t.Files.Client.NS_OWNCLOUD+"}isUnread",PROPERTY_OBJECTID:"{"+t.Files.Client.NS_OWNCLOUD+"}objectId",PROPERTY_OBJECTTYPE:"{"+t.Files.Client.NS_OWNCLOUD+"}objectType",PROPERTY_ACTORDISPLAYNAME:"{"+t.Files.Client.NS_OWNCLOUD+"}actorDisplayName",PROPERTY_CREATIONDATETIME:"{"+t.Files.Client.NS_OWNCLOUD+"}creationDateTime",PROPERTY_MENTIONS:"{"+t.Files.Client.NS_OWNCLOUD+"}mentions"});var n=t.Backbone.Model.extend({sync:t.Backbone.davSync,defaults:{actorType:"users",objectType:"files"},davProperties:{id:t.Files.Client.PROPERTY_FILEID,message:t.Files.Client.PROPERTY_MESSAGE,actorType:t.Files.Client.PROPERTY_ACTORTYPE,actorId:t.Files.Client.PROPERTY_ACTORID,actorDisplayName:t.Files.Client.PROPERTY_ACTORDISPLAYNAME,creationDateTime:t.Files.Client.PROPERTY_CREATIONDATETIME,objectType:t.Files.Client.PROPERTY_OBJECTTYPE,objectId:t.Files.Client.PROPERTY_OBJECTID,isUnread:t.Files.Client.PROPERTY_ISUNREAD,mentions:t.Files.Client.PROPERTY_MENTIONS},parse:function(t){return{id:t.id,message:t.message,actorType:t.actorType,actorId:t.actorId,actorDisplayName:t.actorDisplayName,creationDateTime:t.creationDateTime,objectType:t.objectType,objectId:t.objectId,isUnread:"true"===t.isUnread,mentions:this._parseMentions(t.mentions)}},_parseMentions:function(t){if(_.isUndefined(t))return{};var e={};for(var n in t){var o=t[n];if(!_.isUndefined(o.localName)&&"mention"===o.localName){e[n]={};for(var i=o.firstChild;i;i=i.nextSibling)!_.isUndefined(i.localName)&&i.localName.startsWith("mention")&&(e[n][i.localName]=i.textContent)}}return e}});e.Comments.CommentModel=n}(OC,OCA)},function(t,e){!function(t,e){var n=t.Backbone.Collection.extend({sync:t.Backbone.davSync,model:e.Comments.CommentModel,_objectType:"files",_objectId:null,_endReached:!1,_limit:20,initialize:function(t,e){(e=e||{}).objectType&&(this._objectType=e.objectType),e.objectId&&(this._objectId=e.objectId)},url:function(){return t.linkToRemote("dav")+"/comments/"+encodeURIComponent(this._objectType)+"/"+encodeURIComponent(this._objectId)+"/"},setObjectId:function(t){this._objectId=t},hasMoreResults:function(){return!this._endReached},reset:function(){return this._endReached=!1,this._summaryModel=null,t.Backbone.Collection.prototype.reset.apply(this,arguments)},fetchNext:function(t){var e=this;if(!this.hasMoreResults())return null;var o='<?xml version="1.0" encoding="utf-8" ?>\n<oc:filter-comments xmlns:D="DAV:" xmlns:oc="http://owncloud.org/ns">\n <oc:limit>'+(this._limit+1)+"</oc:limit>\n <oc:offset>"+this.length+"</oc:offset>\n</oc:filter-comments>\n",i=(t=t||{}).success;return t=_.extend({remove:!1,parse:!0,data:o,davProperties:n.prototype.model.prototype.davProperties,success:function(n){if(n.length<=e._limit?e._endReached=!0:n=_.initial(n),!e.set(n,t))return!1;i&&i.apply(null,arguments),e.trigger("sync","REPORT",e,t)}},t),this.sync("REPORT",this,t)},getSummaryModel:function(){return this._summaryModel||(this._summaryModel=new e.Comments.CommentSummaryModel({id:this._objectId,objectType:this._objectType})),this._summaryModel},updateReadMarker:function(t,e){return e=e||{},this.getSummaryModel().save({readMarker:(t||new Date).toUTCString()},e)}});e.Comments.CommentCollection=n}(OC,OCA)},function(t,e){!function(t,e){_.extend(t.Files.Client,{PROPERTY_READMARKER:"{"+t.Files.Client.NS_OWNCLOUD+"}readMarker"});var n=t.Backbone.Model.extend({sync:t.Backbone.davSync,_objectType:"files",_objectId:null,davProperties:{readMarker:t.Files.Client.PROPERTY_READMARKER},initialize:function(t,e){(e=e||{}).objectType&&(this._objectType=e.objectType)},url:function(){return t.linkToRemote("dav")+"/comments/"+encodeURIComponent(this._objectType)+"/"+encodeURIComponent(this.id)+"/"}});e.Comments.CommentSummaryModel=n}(OC,OCA)},function(e,n){!function(e,n){var o=n.Files.DetailTabView.extend({id:"commentsTabView",className:"tab commentsTabView",_autoCompleteData:void 0,_commentsModifyMenu:void 0,events:{"submit .newCommentForm":"_onSubmitComment","click .showMore":"_onClickShowMore","click .cancel":"_onClickCloseComment","click .comment":"_onClickComment","keyup div.message":"_onTextChange","change div.message":"_onTextChange","input div.message":"_onTextChange","paste div.message":"_onPaste"},_commentMaxLength:1e3,initialize:function(){n.Files.DetailTabView.prototype.initialize.apply(this,arguments),this.collection=new n.Comments.CommentCollection,this.collection.on("request",this._onRequest,this),this.collection.on("sync",this._onEndRequest,this),this.collection.on("add",this._onAddModel,this),this.collection.on("change:message",this._onChangeModel,this),this._commentMaxThreshold=.9*this._commentMaxLength,_.bindAll(this,"_onTypeComment","_initAutoComplete","_onAutoComplete")},template:function(t){var o=e.getCurrentUser();return n.Comments.Templates.view(_.extend({actorId:o.uid,actorDisplayName:o.displayName},t))},editCommentTemplate:function(o){var i=e.getCurrentUser();return n.Comments.Templates.edit_comment(_.extend({actorId:i.uid,actorDisplayName:i.displayName,newMessagePlaceholder:t("comments","New comment …"),submitText:t("comments","Post"),cancelText:t("comments","Cancel"),tag:"li"},o))},commentTemplate:function(o){return"deleted_users"===(o=_.extend({editTooltip:t("comments","Edit comment"),isUserAuthor:e.getCurrentUser().uid===o.actorId,isLong:this._isLong(o.message)},o)).actorType&&(o.actorId=null,o.actorDisplayName=t("comments","[Deleted user]")),n.Comments.Templates.comment(o)},getLabel:function(){return t("comments","Comments")},getIcon:function(){return"icon-comment"},setFileInfo:function(t){t?(this.model=t,this.render(),this._initAutoComplete($("#commentsTabView").find(".newCommentForm .message")),this.collection.setObjectId(this.model.id),this.collection.reset([],{silent:!0}),this.nextPage()):(this.model=null,this.render(),this.collection.reset())},render:function(){this.$el.html(this.template({emptyResultLabel:t("comments","No comments yet, start the conversation!"),moreLabel:t("comments","More comments …")})),this.$el.find(".comments").before(this.editCommentTemplate({tag:"div"})),this.$el.find(".has-tooltip").tooltip(),this.$container=this.$el.find("ul.comments"),this.$el.find(".avatar").avatar(e.getCurrentUser().uid,32),this.delegateEvents(),this.$el.find(".message").on("keydown input change",this._onTypeComment),autosize(this.$el.find(".newCommentRow .message")),this.$el.find(".newCommentForm .message").focus()},_initAutoComplete:function(t){var n=this,o=10;_.isUndefined(e.appConfig.comments)||(o=e.appConfig.comments.maxAutoCompleteResults),t.atwho({at:"@",limit:o,callbacks:{remoteFilter:n._onAutoComplete,highlighter:function(t){var e=$(t);return e.find(".avatar").avatar(void 0,32),e},sorter:function(t,e){return e}},displayTpl:function(t){return'<li><span class="avatar-name-wrapper"><span class="avatar" data-username="'+escapeHTML(t.id)+'" data-user="'+escapeHTML(t.id)+'" data-user-display-name="'+escapeHTML(t.label)+'"></span><strong>'+escapeHTML(t.label)+"</strong></span></li>"},insertTpl:function(t){return'<span class="avatar-name-wrapper"><span class="avatar" data-username="'+escapeHTML(t.id)+'" data-user="'+escapeHTML(t.id)+'" data-user-display-name="'+escapeHTML(t.label)+'"></span><strong>'+escapeHTML(t.label)+"</strong></span>"},searchKey:"label"}),t.on("inserted.atwho",(function(t,e){n._postRenderItem($(t.target).find('span[data-username="'+e.find("[data-username]").data("username")+'"]').parent(),!0)}))},_onAutoComplete:function(t,n){var o=this;_.isUndefined(this._autoCompleteRequestTimer)||clearTimeout(this._autoCompleteRequestTimer),this._autoCompleteRequestTimer=_.delay((function(){_.isUndefined(this._autoCompleteRequestCall)||this._autoCompleteRequestCall.abort(),this._autoCompleteRequestCall=$.ajax({url:e.linkToOCS("core",2)+"autocomplete/get",data:{search:t,itemType:"files",itemId:o.model.get("id"),sorter:"commenters|share-recipients",limit:e.appConfig.comments.maxAutoCompleteResults},beforeSend:function(t){t.setRequestHeader("Accept","application/json")},success:function(t){n(t.ocs.data)}})}),400)},_formatItem:function(t){var n=new Date(t.get("creationDateTime")).getTime();return _.extend({timestamp:n,date:e.Util.relativeModifiedDate(n),altDate:e.Util.formatDate(n),formattedMessage:this._formatMessage(t.get("message"),t.get("mentions"))},t.attributes)},_toggleLoading:function(t){this._loading=t,this.$el.find(".loading").toggleClass("hidden",!t)},_onRequest:function(t){"REPORT"===t&&(this._toggleLoading(!0),this.$el.find(".showMore").addClass("hidden"))},_onEndRequest:function(t){var e=this.model;(this._toggleLoading(!1),this.$el.find(".emptycontent").toggleClass("hidden",!!this.collection.length),this.$el.find(".showMore").toggleClass("hidden",!this.collection.hasMoreResults()),"REPORT"===t)&&(this.collection.findWhere({isUnread:!0})&&this.collection.updateReadMarker(null,{success:function(){e.set("commentsUnread",0)}}),this.$el.find(".newCommentForm .message").focus())},_onAddModel:function(t,e,n){var o=$(this.commentTemplate(this._formatItem(t)));!_.isUndefined(n.at)&&e.length>1?this.$container.find("li").eq(n.at).before(o):this.$container.append(o),this._postRenderItem(o),$("#commentsTabView").find(".newCommentForm div.message").text("").prop("contenteditable",!0);var i=t.get("mentions"),a=this;t.fetch({success:function(t){if(!_.isEqual(i,t.get("mentions"))){var e=$(a.commentTemplate(a._formatItem(t)));o.html(e.html()),a._postRenderItem(o)}}})},_onChangeModel:function(t){if(t.get("message").trim()!==t.previous("message").trim()){var e=this.$container.find('.comment[data-id="'+t.id+'"] form').closest(".comment"),n=e.data("commentEl");if(!_.isUndefined(n)){var o=this;t.fetch({success:function(t){n.removeClass("hidden"),e.remove();var i=n.find(".message");i.html(o._formatMessage(t.get("message"),t.get("mentions"))).find(".avatar").each((function(){$(this).avatar()})),o._postRenderItem(i)}})}}},_postRenderItem:function(t,o){t.find(".has-tooltip").tooltip();var i=t.find(".message .avatar");$(t.context).hasClass("message")&&(i=t.find(".avatar")),i.each((function(){var t=$(this);t.avatar(t.attr("data-username"),16)})),t.find(".authorRow .avatar").each((function(){var t=$(this);t.avatar(t.attr("data-username"),32)}));var a=t.find(".avatar").data("username");a!==e.getCurrentUser().uid&&t.find(".authorRow .avatar, .authorRow .author").contactsMenu(a,0,t.find(".authorRow"));var r=t.find(".message");if(0===r.length&&(r=t),!o){var s=this,l=new n.Comments.CommentsModifyMenu;t.find(".authorRow").append(l.$el),t.find(".more").on("click",_.bind(l.show,l)),s.listenTo(l,"select:menu-item-clicked",(function(t,e){"edit"===e?s._onClickEditComment(t):"delete"===e&&s._onClickDeleteComment(t)}))}this._postRenderMessage(r,o)},_postRenderMessage:function(t,n){n||t.find(".avatar-name-wrapper").each((function(){var t=$(this),n=t.find(".avatar").data("user");n!==e.getCurrentUser().uid&&t.contactsMenu(n,0,t)}))},_formatMessage:function(t,e,n){for(var o in t=escapeHTML(t).replace(/\n/g,"<br/>"),e){if(!e.hasOwnProperty(o))return;var i="@"+e[o].mentionId;-1!==e[o].mentionId.indexOf(" ")&&(i=_.escape('@"'+e[o].mentionId+'"')),i=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var a=new RegExp("(^|\\s)("+i+")\\b","g");-1!==e[o].mentionId.indexOf(" ")&&(a=new RegExp("(^|\\s)("+i+")","g"));var r=this._composeHTMLMention(e[o].mentionId,e[o].mentionDisplayName);t=t.replace(a,(function(t,e){return e+r}))}return!0!==n&&(t=OCP.Comments.plainToRich(t)),t},_composeHTMLMention:function(t,n){var o='<span class="avatar" data-username="'+_.escape(t)+'" data-user="'+_.escape(t)+'" data-user-display-name="'+_.escape(n)+'"></span>';return'<span class="atwho-inserted" contenteditable="false"><span class="avatar-name-wrapper'+(t===e.getCurrentUser().uid?" currentUser":"")+'">'+o+"<strong>"+_.escape(n)+"</strong></span></span>"},nextPage:function(){!this._loading&&this.collection.hasMoreResults()&&this.collection.fetchNext()},_onClickEditComment:function(e){e.preventDefault();var n=$(e.target).closest(".comment"),o=n.data("id"),i=this.collection.get(o),a=$(this.editCommentTemplate(_.extend({isEditMode:!0,submitText:t("comments","Save")},i.attributes)));n.addClass("hidden").removeClass("collapsed"),n.after(a),a.data("commentEl",n),a.find(".message").on("keydown input change",this._onTypeComment),a.find(".avatar:first").replaceWith(n.find(".avatar:first").clone()),a.find(".has-tooltip").tooltip();var r=a.find(".message");r.html(this._formatMessage(i.get("message"),i.get("mentions"),!0)).find(".avatar").each((function(){$(this).avatar()}));return this._postRenderItem(r,!0),autosize(a.find(".message")),this._initAutoComplete(a.find(".message")),!1},_onTypeComment:function(e){var n=$(e.target),o=n.text().length,i=n.data("submitButtonEl");i||(i=n.closest("form").find(".submit"),n.data("submitButtonEl",i)),n.tooltip("hide"),o>this._commentMaxThreshold&&(n.attr("data-original-title",t("comments","Allowed characters {count} of {max}",{count:o,max:this._commentMaxLength})),n.tooltip({trigger:"manual"}),n.tooltip("show"),n.addClass("error"));var a=o>this._commentMaxLength;n.toggleClass("error",a),i.prop("disabled",a),13!==e.keyCode||e.shiftKey||n.atwho("isSelecting")||(i.click(),e.preventDefault())},_onClickComment:function(t){var e=$(t.target);e.is(".comment")||(e=e.closest(".comment")),e.removeClass("collapsed")},_onClickCloseComment:function(t){t.preventDefault();var e=$(t.target).closest(".comment");return e.data("commentEl").removeClass("hidden"),e.remove(),!1},_onClickDeleteComment:function(n){n.preventDefault();var o=$(n.target).closest(".comment"),i=o.data("id"),a=o.find(".deleteLoading"),r=o.find(".more");return o.addClass("disabled"),a.removeClass("hidden"),r.addClass("hidden"),o.data("commentEl",o),this.collection.get(i).destroy({success:function(){o.data("commentEl").remove(),o.remove()},error:function(){a.addClass("hidden"),r.removeClass("hidden"),o.removeClass("disabled"),e.Notification.showTemporary(t("comments","Error occurred while retrieving comment with ID {id}",{id:i}))}}),!1},_onClickShowMore:function(t){t.preventDefault(),this.nextPage()},_onSubmitSuccess:function(t,e){var n=e.find(".submit"),o=e.find(".submitLoading");n.removeClass("hidden"),o.addClass("hidden")},_commentBodyHTML2Plain:function(t){var e,n=t.clone();n.find(".avatar-name-wrapper").each((function(){var t=$(this),e=t.parent(),n=t.find(".avatar").data("username").toString();-1!==n.indexOf(" ")?e.html('@"'+n+'"'):e.html("@"+n)})),n.html(OCP.Comments.richToPlain(n.html()));var o=n.html();do{o=(e=o).replace("<br>","\n")}while(e!==o);return n.html(o),n.text()},_onSubmitComment:function(t){var n=this,o=$(t.target),i=o.closest(".comment").data("id"),a=e.getCurrentUser(),r=o.find(".submit"),s=o.find(".submitLoading"),l=o.find(".message"),c=l.text().trim();if(t.preventDefault(),c.length&&!(c.length>this._commentMaxLength)){if(l.prop("contenteditable",!1),r.addClass("hidden"),s.removeClass("hidden"),c=this._commentBodyHTML2Plain(l),i)this.collection.get(i).save({message:c},{success:function(t){if(n._onSubmitSuccess(t,o),t.get("message").trim()===t.previous("message").trim()){var e=o.closest(".comment");e.data("commentEl").removeClass("hidden"),e.remove()}},error:function(){n._onSubmitError(o,i)}});else this.collection.create({actorId:a.uid,actorDisplayName:a.displayName,actorType:"users",verb:"comment",message:c,creationDateTime:(new Date).toUTCString()},{at:0,wait:!0,success:function(t){n._onSubmitSuccess(t,o)},error:function(){n._onSubmitError(o,void 0)}});return!1}},_onSubmitError:function(n,o){n.find(".submit").removeClass("hidden"),n.find(".submitLoading").addClass("hidden"),n.find(".message").prop("contenteditable",!0),_.isUndefined(o)?e.Notification.show(t("comments","Error occurred while posting comment"),{type:"error"}):e.Notification.show(t("comments","Error occurred while updating comment with id {id}",{id:o}),{type:"error"})},_onTextChange:function(){var t=$("#commentsTabView").find(".newCommentForm div.message");t.text().trim().length||t.empty()},_onPaste:function(t){t.preventDefault();var e=t.originalEvent.clipboardData.getData("text/plain");document.execCommand("insertText",!1,e)},_isLong:function(t){return t.length>250||(t.match(/\n/g)||[]).length>1}});n.Comments.CommentsTabView=o}(OC,OCA)},function(e,n){var o;OC,OCA,o=OC.Backbone.View.extend({tagName:"div",className:"commentsModifyMenu popovermenu bubble menu",_scopes:[{name:"edit",displayName:t("comments","Edit comment"),iconClass:"icon-rename"},{name:"delete",displayName:t("comments","Delete comment"),iconClass:"icon-delete"}],initialize:function(){},events:{"click a.action":"_onClickAction"},_onClickAction:function(t){var e=$(t.currentTarget);e.hasClass("menuitem")||(e=e.closest(".menuitem")),OC.hideMenus(),this.trigger("select:menu-item-clicked",t,e.data("action"))},render:function(){this.$el.html(OCA.Comments.Templates.commentsmodifymenu({items:this._scopes}))},show:function(t){for(var e in this._context=t,this._scopes)this._scopes[e].active=!1;var n=$(t.target),o=n.offset(),i=n.closest(".authorRow").offset(),a={top:o.top-i.top+48,left:"",right:""};a.left=o.left-i.left,a.left>200?(a.left="",a.right=this.$el.closest(".comment").find(".date").width(),this.$el.removeClass("menu-left").addClass("menu-right")):this.$el.removeClass("menu-right").addClass("menu-left"),this.$el.css(a),this.render(),this.$el.removeClass("hidden"),OC.showMenu(null,this.$el)}}),OCA.Comments=OCA.Comments||{},OCA.Comments.CommentsModifyMenu=o},function(e,o){_.extend(OC.Files.Client,{PROPERTY_COMMENTS_UNREAD:"{"+OC.Files.Client.NS_OWNCLOUD+"}comments-unread"}),OCA.Comments=_.extend({},OCA.Comments),OCA.Comments||(OCA.Comments={}),OCA.Comments.FilesPlugin={ignoreLists:["trashbin","files.public"],_formatCommentCount:function(t){return OCA.Comments.Templates.filesplugin({count:t,countMessage:n("comments","%n unread comment","%n unread comments",t),iconUrl:OC.imagePath("core","actions/comment")})},attach:function(e){var o=this;if(!(this.ignoreLists.indexOf(e.id)>=0)){e.registerTabView(new OCA.Comments.CommentsTabView("commentsTabView"));var i=e._getWebdavProperties;e._getWebdavProperties=function(){var t=i.apply(this,arguments);return t.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD),t},e.filesClient.addFileInfoParser((function(t){var e={},n=t.propStat[0].properties[OC.Files.Client.PROPERTY_COMMENTS_UNREAD];return _.isUndefined(n)||""===n||(e.commentsUnread=parseInt(n,10)),e})),e.$el.addClass("has-comments");var a=e._createRow;e._createRow=function(t){var e=a.apply(this,arguments);return t.commentsUnread&&e.attr("data-comments-unread",t.commentsUnread),e},e.fileActions.registerAction({name:"Comment",displayName:function(e){if(e&&e.$file){var o=parseInt(e.$file.data("comments-unread"),10);if(o>=0)return n("comments","1 new comment","{unread} new comments",o,{unread:o})}return t("comments","Comment")},mime:"all",order:-140,iconClass:"icon-comment",permissions:OC.PERMISSION_READ,type:OCA.Files.FileActions.TYPE_INLINE,render:function(t,e,n){var i=n.$file.data("comments-unread");if(i){var a=$(o._formatCommentCount(i));return n.$file.find("a.name>span.fileactions").append(a),a}return""},actionHandler:function(t,e){e.$file.find(".action-comment").tooltip("hide"),e.fileList.showDetailsView(t,"comments")}});var r=e.elementToFile;e.elementToFile=function(t){var e=r.apply(this,arguments),n=t.data("comments-unread");return n&&(e.commentsUnread=n),e}}}},OC.Plugins.register("OCA.Files.FileList",OCA.Comments.FilesPlugin)},function(t,e){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay:function(t,e,n){if("comments"===t.get("app")&&"comments"===t.get("type")&&"ActivityTabView"===n&&(e.addClass("comment"),t.get("message")&&this._isLong(t.get("message")))){e.addClass("collapsed");var o=$("<div>").addClass("message-overlay");e.find(".activitymessage").after(o),e.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment:function(t){var e=$(t.target);e.is(".comment")||(e=e.closest(".comment")),e.removeClass("collapsed")},_isLong:function(t){return t.length>250||(t.match(/\n/g)||[]).length>1}},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)},function(t,e){!function(t,e,n){"use strict";var o=function(){this.initialize()};o.prototype={fileList:null,initialize:function(){var o=this;this.fileAppLoaded=function(){return!!e.Files&&!!e.Files.App},this.renderCommentResult=function(e,o){var i;(i=n(".nofilterresults")).hasClass("hidden")||i.addClass("hidden"),this.updateLegacyMimetype(o);var a=n("<div>").addClass("path").text(o.path),r=n("<div>");r.addClass("avatar").css("display","inline-block").css("vertical-align","middle").css("margin","0 5px 2px 3px"),o.authorName?r.avatar(o.authorId,21,void 0,!1,void 0,o.authorName):r.avatar(o.authorId,21),e.find("td.info div.name").after(a).text(o.comment).prepend(n("<span>").addClass("path").css("margin-right","5px").text(o.authorName)).prepend(r),e.find("td.result a").attr("href",o.link),e.find("td.icon").css("background-image","url("+t.imagePath("core","actions/comment")+")").css("opacity",".4");var s=t.dirname(o.path);return s===o.path&&(s="/"),e.find("td.info a").attr("href",t.generateUrl("/apps/files/?dir={dir}&scrollto={scrollto}",{dir:s,scrollto:o.fileName})),e},this.handleCommentClick=function(e,n,i){return!o.fileAppLoaded()||"files"!==o.fileList.id||(o.fileList.changeDirectory(t.dirname(n.path)),o.fileList.scrollTo(n.name),!1)},this.updateLegacyMimetype=function(t){!t.mime&&t.mime_type&&(t.mime=t.mime_type)},this.setFileList=function(t){this.fileList=t},t.Plugins.register("OCA.Search.Core",this)},attach:function(t){t.setRenderer("comment",this.renderCommentResult.bind(this)),t.setHandler("comment",this.handleCommentClick.bind(this))}},e.Search.comment=new o}(OC,OCA,$)},function(t,e,n){var o,i,a;a=this,o=[n(0)],void 0===(i=function(t){return a.returnExportsGlobal=function(t){"use strict";var e,n,o,i,a,r,s,l;e=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.setPos=function(){return this.domInputor},e.prototype.getIEPosition=function(){return this.getPosition()},e.prototype.getPosition=function(){var t,e;return e=this.getOffset(),t=this.$inputor.offset(),e.left-=t.left,e.top-=t.top,e},e.prototype.getOldIEPos=function(){var t,e;return e=r.selection.createRange(),(t=r.body.createTextRange()).moveToElementText(this.domInputor),t.setEndPoint("EndToEnd",e),t.text.length},e.prototype.getPos=function(){var t,e,n;return(n=this.range())?((t=n.cloneRange()).selectNodeContents(this.domInputor),t.setEnd(n.endContainer,n.endOffset),e=t.toString().length,t.detach(),e):r.selection?this.getOldIEPos():void 0},e.prototype.getOldIEOffset=function(){var t,e;return(t=r.selection.createRange().duplicate()).moveStart("character",-1),{height:(e=t.getBoundingClientRect()).bottom-e.top,left:e.left,top:e.top}},e.prototype.getOffset=function(){var e,n,o,i,a;return s.getSelection&&(o=this.range())?(o.endOffset-1>0&&o.endContainer===!this.domInputor&&((e=o.cloneRange()).setStart(o.endContainer,o.endOffset-1),e.setEnd(o.endContainer,o.endOffset),n={height:(i=e.getBoundingClientRect()).height,left:i.left+i.width,top:i.top},e.detach()),n&&0!==(null!=n?n.height:void 0)||(e=o.cloneRange(),a=t(r.createTextNode("|")),e.insertNode(a[0]),e.selectNode(a[0]),n={height:(i=e.getBoundingClientRect()).height,left:i.left,top:i.top},a.remove(),e.detach())):r.selection&&(n=this.getOldIEOffset()),n&&(n.top+=t(s).scrollTop(),n.left+=t(s).scrollLeft()),n},e.prototype.range=function(){var t;if(s.getSelection)return(t=s.getSelection()).rangeCount>0?t.getRangeAt(0):null},e}(),n=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.getIEPos=function(){var t,e,n,o,i,a;return e=this.domInputor,o=0,(i=r.selection.createRange())&&i.parentElement()===e&&(n=e.value.replace(/\r\n/g,"\n").length,(a=e.createTextRange()).moveToBookmark(i.getBookmark()),(t=e.createTextRange()).collapse(!1),o=a.compareEndPoints("StartToEnd",t)>-1?n:-a.moveStart("character",-n)),o},e.prototype.getPos=function(){return r.selection?this.getIEPos():this.domInputor.selectionStart},e.prototype.setPos=function(t){var e,n;return e=this.domInputor,r.selection?((n=e.createTextRange()).move("character",t),n.select()):e.setSelectionRange&&e.setSelectionRange(t,t),e},e.prototype.getIEOffset=function(t){var e;return e=this.domInputor.createTextRange(),t||(t=this.getPos()),e.move("character",t),{left:e.boundingLeft,top:e.boundingTop,height:e.boundingHeight}},e.prototype.getOffset=function(e){var n,o,i;return n=this.$inputor,r.selection?((o=this.getIEOffset(e)).top+=t(s).scrollTop()+n.scrollTop(),o.left+=t(s).scrollLeft()+n.scrollLeft(),o):(o=n.offset(),i=this.getPosition(e),o={left:o.left+i.left-n.scrollLeft(),top:o.top+i.top-n.scrollTop(),height:i.height})},e.prototype.getPosition=function(t){var e,n,i,a,r;return e=this.$inputor,i=function(t){return t=t.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>"),/firefox/i.test(navigator.userAgent)&&(t=t.replace(/\s/g," ")),t},void 0===t&&(t=this.getPos()),r=e.val().slice(0,t),n=e.val().slice(t),a="<span style='position: relative; display: inline;'>"+i(r)+"</span>",a+="<span id='caret' style='position: relative; display: inline;'>|</span>",a+="<span style='position: relative; display: inline;'>"+i(n)+"</span>",new o(e).create(a).rect()},e.prototype.getIEPosition=function(t){var e,n;return n=this.getIEOffset(t),e=this.$inputor.offset(),{left:n.left-e.left,top:n.top-e.top,height:n.height}},e}(),o=function(){function e(t){this.$inputor=t}return e.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],e.prototype.mirrorCss=function(){var e,n=this;return e={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),t.each(this.css_attr,(function(t,o){return e[o]=n.$inputor.css(o)})),e},e.prototype.create=function(e){return this.$mirror=t("<div></div>"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(e),this.$inputor.after(this.$mirror),this},e.prototype.rect=function(){var t,e,n;return n={left:(e=(t=this.$mirror.find("#caret")).position()).left,top:e.top,height:t.height()},this.$mirror.remove(),n},e}(),i={contentEditable:function(t){return!(!t[0].contentEditable||"true"!==t[0].contentEditable)}},a={pos:function(t){return t||0===t?this.setPos(t):this.getPos()},position:function(t){return r.selection?this.getIEPosition(t):this.getPosition(t)},offset:function(t){return this.getOffset(t)}},r=null,s=null,l=function(t){var e;return(e=null!=t?t.iframe:void 0)?(s=e.contentWindow,r=e.contentDocument||s.document):(s=window,r=document)},t.fn.caret=function(o,r,s){var c;return a[o]?(t.isPlainObject(r)?(l(r),r=void 0):l(s),c=i.contentEditable(this)?new e(this):new n(this),a[o].apply(c,[r])):t.error("Method "+o+" does not exist on jQuery.caret")},t.fn.caret.EditableCaret=e,t.fn.caret.InputCaret=n,t.fn.caret.Utils=i,t.fn.caret.apis=a}(t)}.apply(e,o))||(t.exports=i)},function(t,e,n){var o,i;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=[n(0)],void 0===(i=function(t){return function(t){var e,n,o;n={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},e={beforeSave:function(t){return i.arrayToDefaultHash(t)},matcher:function(t,e,n,o){var i,a,r;return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n&&(t="(?:^|\\s)"+t),i=decodeURI("%C3%80"),a=decodeURI("%C3%BF"),(r=new RegExp(t+"([A-Za-z"+i+"-"+a+"0-9_"+(o?" ":"")+"'.+-]*)$|"+t+"([^\\x00-\\xff]*)$","gi").exec(e))?r[2]||r[1]:null},filter:function(t,e,n){var o,i,a,r;for(o=[],i=0,r=e.length;r>i;i++)a=e[i],~new String(a[n]).toLowerCase().indexOf(t.toLowerCase())&&o.push(a);return o},remoteFilter:null,sorter:function(t,e,n){var o,i,a,r;if(!t)return e;for(o=[],i=0,r=e.length;r>i;i++)(a=e[i]).atwho_order=new String(a[n]).toLowerCase().indexOf(t.toLowerCase()),a.atwho_order>-1&&o.push(a);return o.sort((function(t,e){return t.atwho_order-e.atwho_order}))},tplEval:function(t,e){var n;n=t;try{return"string"!=typeof t&&(n=t(e)),n.replace(/\$\{([^\}]*)\}/g,(function(t,n,o){return e[n]}))}catch(t){return""}},highlighter:function(t,e){var n;return e?(n=new RegExp(">\\s*([^<]*?)("+e.replace("+","\\+")+")([^<]*)\\s*<","ig"),t.replace(n,(function(t,e,n,o){return"> "+e+"<strong>"+n+"</strong>"+o+" <"}))):t},beforeInsert:function(t,e,n){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}},o=function(){function e(e){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=t(e),this.setupRootElement(),this.listen()}return e.prototype.createContainer=function(e){var n;return null!=(n=this.$el)&&n.remove(),t(e.body).append(this.$el=t("<div class='atwho-container'></div>"))},e.prototype.setupRootElement=function(e,n){var o,i;if(null==n&&(n=!1),e)this.window=e.contentWindow,this.document=e.contentDocument||this.window.document,this.iframe=e;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(i){if(o=i,this.iframe=null,t.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+o)}}return this.createContainer((this.iframeAsRoot=n)?this.document:document)},e.prototype.controller=function(t){var e,n,o,i;if(this.aliasMaps[t])n=this.controllers[this.aliasMaps[t]];else for(o in i=this.controllers)if(e=i[o],o===t){n=e;break}return n||this.controllers[this.currentFlag]},e.prototype.setContextFor=function(t){return this.currentFlag=t,this},e.prototype.reg=function(t,e){var n,o;return o=(n=this.controllers)[t]||(n[t]=this.$inputor.is("[contentEditable]")?new l(this,t):new s(this,t)),e.alias&&(this.aliasMaps[e.alias]=t),o.init(e),this},e.prototype.listen=function(){return this.$inputor.on("compositionstart",function(t){return function(e){var n;return null!=(n=t.controller())&&n.view.hide(),t.isComposing=!0,null}}(this)).on("compositionend",function(t){return function(e){return t.isComposing=!1,setTimeout((function(e){return t.dispatch(e)})),null}}(this)).on("keyup.atwhoInner",function(t){return function(e){return t.onKeyup(e)}}(this)).on("keydown.atwhoInner",function(t){return function(e){return t.onKeydown(e)}}(this)).on("blur.atwhoInner",function(t){return function(e){var n;return(n=t.controller())?(n.expectedQueryCBId=null,n.view.hide(e,n.getOpt("displayTimeout"))):void 0}}(this)).on("click.atwhoInner",function(t){return function(e){return t.dispatch(e)}}(this)).on("scroll.atwhoInner",function(t){return function(){var e;return e=t.$inputor.scrollTop(),function(n){var o,i;return o=n.target.scrollTop,e!==o&&null!=(i=t.controller())&&i.view.hide(n),e=o,!0}}}(this)())},e.prototype.shutdown=function(){var t,e;for(t in e=this.controllers)e[t].destroy(),delete this.controllers[t];return this.$inputor.off(".atwhoInner"),this.$el.remove()},e.prototype.dispatch=function(t){var e,n,o,i;for(e in i=[],o=this.controllers)n=o[e],i.push(n.lookUp(t));return i},e.prototype.onKeyup=function(e){var o;switch(e.keyCode){case n.ESC:e.preventDefault(),null!=(o=this.controller())&&o.view.hide();break;case n.DOWN:case n.UP:case n.CTRL:case n.ENTER:t.noop();break;case n.P:case n.N:e.ctrlKey||this.dispatch(e);break;default:this.dispatch(e)}},e.prototype.onKeydown=function(e){var o,i;if((i=null!=(o=this.controller())?o.view:void 0)&&i.visible())switch(e.keyCode){case n.ESC:e.preventDefault(),i.hide(e);break;case n.UP:e.preventDefault(),i.prev();break;case n.DOWN:e.preventDefault(),i.next();break;case n.P:if(!e.ctrlKey)return;e.preventDefault(),i.prev();break;case n.N:if(!e.ctrlKey)return;e.preventDefault(),i.next();break;case n.TAB:case n.ENTER:case n.SPACE:if(!i.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&e.keyCode===n.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&e.keyCode===n.TAB)return;i.highlighted()?(e.preventDefault(),i.choose(e)):i.hide(e);break;default:t.noop()}},e}();var i,r=[].slice;i=function(){function n(e,n){this.app=e,this.at=n,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=t("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=t("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new c(this),this.view=new m(this)}return n.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},n.prototype.init=function(e){return this.setting=t.extend({},this.setting||t.fn.atwho.default,e),this.view.init(),this.model.reload(this.setting.data)},n.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},n.prototype.callDefault=function(){var n,o,i,a;a=arguments[0],n=2<=arguments.length?r.call(arguments,1):[];try{return e[a].apply(this,n)}catch(i){return o=i,t.error(o+" Or maybe At.js doesn't have function "+a)}},n.prototype.trigger=function(t,e){var n,o;return null==e&&(e=[]),e.push(this),o=(n=this.getOpt("alias"))?t+"-"+n+".atwho":t+".atwho",this.$inputor.trigger(o,e)},n.prototype.callbacks=function(t){return this.getOpt("callbacks")[t]||e[t]},n.prototype.getOpt=function(t,e){try{return this.setting[t]}catch(t){return null}},n.prototype.insertContentFor=function(e){var n,o;return o=this.getOpt("insertTpl"),n=t.extend({},e.data("item-data"),{"atwho-at":this.at}),this.callbacks("tplEval").call(this,o,n,"onInsert")},n.prototype.renderView=function(t){var e;return e=this.getOpt("searchKey"),t=this.callbacks("sorter").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt("limit")))},n.arrayToDefaultHash=function(e){var n,o,i,a;if(!t.isArray(e))return e;for(a=[],n=0,i=e.length;i>n;n++)o=e[n],t.isPlainObject(o)?a.push(o):a.push({name:o});return a},n.prototype.lookUp=function(t){var e,n;if((!t||"click"!==t.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(n=this.getOpt("delay"))?this._delayLookUp(e,n):this._lookUp(e),e):(this.expectedQueryCBId=null,e)},n.prototype._delayLookUp=function(t,e){var n,o;return n=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=n),(o=e-(n-this.previousCallTime))>0&&e>o?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout(function(e){return function(){return e.previousCallTime=0,e.delayedCallTimeout=null,e._lookUp(t)}}(this),e)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(t))},n.prototype._stopDelayedCall=function(){return this.delayedCallTimeout?(clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null):void 0},n.prototype._generateQueryCBId=function(){return{}},n.prototype._lookUp=function(e){var n;return n=function(t,e){return t===this.expectedQueryCBId?e&&e.length>0?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide():void 0},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(e.text,t.proxy(n,this,this.expectedQueryCBId))},n}();var s,l,c,m,u,d=function(t,e){function n(){this.constructor=t}for(var o in e)h.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return d(n,e),n.prototype.catchQuery=function(){var t,e,n,o,i,a,r;return e=this.$inputor.val(),t=this.$inputor.caret("pos",{iframe:this.app.iframe}),r=e.slice(0,t),(o="string"==typeof(i=this.callbacks("matcher").call(this,this.at,r,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))))&&i.length<this.getOpt("minLen",0)?void 0:(o&&i.length<=this.getOpt("maxLen",20)?(n=(a=t-i.length)+i.length,this.pos=a,i={text:i,headPos:a,endPos:n},this.trigger("matched",[this.at,i.text])):(i=null,this.view.hide()),this.query=i)},n.prototype.rect=function(){var e,n,o;if(e=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(n=t(this.app.iframe).offset(),e.left+=n.left,e.top+=n.top),o=this.app.document.selection?0:2,{left:e.left,top:e.top,bottom:e.top+e.height+o}},n.prototype.insert=function(t,e){var n,o,i,a,r;return r=""+(i=(o=(n=this.$inputor).val()).slice(0,Math.max(this.query.headPos-this.at.length,0)))+(t+=a=""===(a=this.getOpt("suffix"))?a:a||" ")+o.slice(this.query.endPos||0),n.val(r),n.caret("pos",i.length+t.length,{iframe:this.app.iframe}),n.is(":focus")||n.focus(),n.change()},n}(i),d=function(t,e){function n(){this.constructor=t}for(var o in e)h.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty,l=function(e){function o(){return o.__super__.constructor.apply(this,arguments)}return d(o,e),o.prototype._getRange=function(){var t;return(t=this.app.window.getSelection()).rangeCount>0?t.getRangeAt(0):void 0},o.prototype._setRange=function(e,n,o){return null==o&&(o=this._getRange()),o&&n?(n=t(n)[0],"after"===e?(o.setEndAfter(n),o.setStartAfter(n)):(o.setEndBefore(n),o.setStartBefore(n)),o.collapse(!1),this._clearRange(o)):void 0},o.prototype._clearRange=function(t){var e;return null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed?(e.removeAllRanges(),e.addRange(t)):void 0},o.prototype._movingEvent=function(t){var e;return"click"===t.type||(e=t.which)===n.RIGHT||e===n.LEFT||e===n.UP||e===n.DOWN},o.prototype._unwrap=function(e){var n;return(n=(e=t(e).unwrap().get(0)).nextSibling)&&n.nodeValue&&(e.nodeValue+=n.nodeValue,t(n).remove()),e},o.prototype.catchQuery=function(e){var o,i,a,r,s,l,c,m,u,d,h,p;if((p=this._getRange())&&p.collapsed){if(e.which===n.ENTER)return(i=t(p.startContainer).closest(".atwho-query")).contents().unwrap(),i.is(":empty")&&i.remove(),(i=t(".atwho-query",this.app.document)).text(i.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(t(p.startContainer).is(this.$inputor))return void this._clearRange();e.which===n.BACKSPACE&&p.startContainer.nodeType===document.ELEMENT_NODE&&(u=p.startOffset-1)>=0?((a=p.cloneRange()).setStart(p.startContainer,u),t(a.cloneContents()).contents().last().is(".atwho-inserted")&&(s=t(p.startContainer).contents().get(u),this._setRange("after",t(s).contents().last()))):e.which===n.LEFT&&p.startContainer.nodeType===document.TEXT_NODE&&(o=t(p.startContainer.previousSibling)).is(".atwho-inserted")&&0===p.startOffset&&this._setRange("after",o.contents().last())}if(t(p.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),(i=t(".atwho-query",this.app.document)).length>0&&i.is(":empty")&&0===i.text().length&&i.remove(),this._movingEvent(e)||i.removeClass("atwho-inserted"),i.length>0)switch(e.which){case n.LEFT:return this._setRange("before",i.get(0),p),void i.removeClass("atwho-query");case n.RIGHT:return this._setRange("after",i.get(0).nextSibling,p),void i.removeClass("atwho-query")}if(i.length>0&&(h=i.attr("data-atwho-at-query"))&&(i.empty().html(h).attr("data-atwho-at-query",null),this._setRange("after",i.get(0),p)),(a=p.cloneRange()).setStart(p.startContainer,0),l="string"==typeof(m=this.callbacks("matcher").call(this,this.at,a.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===i.length&&l&&(r=p.startOffset-this.at.length-m.length)>=0&&(p.setStart(p.startContainer,r),i=t("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),p.surroundContents(i.get(0)),(c=i.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(p.setStart(c,c.length),p.setEnd(c,c.length),this._clearRange(p)):this._setRange("after",c,p))),!(l&&m.length<this.getOpt("minLen",0)))return l&&m.length<=this.getOpt("maxLen",20)?(d={text:m,el:i},this.trigger("matched",[this.at,d.text]),this.query=d):(this.view.hide(),this.query={el:i},i.text().indexOf(this.at)>=0&&(this._movingEvent(e)&&i.hasClass("atwho-inserted")?i.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,i)&&this._setRange("after",this._unwrap(i.text(i.text()).contents().first()))),null)}},o.prototype.rect=function(){var e,n;return(n=this.query.el.offset())&&this.query.el[0].getClientRects().length?(this.app.iframe&&!this.app.iframeAsRoot&&(e=t(this.app.iframe).offset(),n.left+=e.left-this.$inputor.scrollLeft(),n.top+=e.top-this.$inputor.scrollTop()),n.bottom=n.top+this.query.el.height(),n):void 0},o.prototype.insert=function(t,e){var n,o,i,a,r;return this.$inputor.is(":focus")||this.$inputor.focus(),(o=this.getOpt("functionOverrides")).insert?o.insert.call(this,t,e):(a=""===(a=this.getOpt("suffix"))?a:a||" ",n=e.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(t).attr("data-atwho-at-query",""+n["atwho-at"]+this.query.text).attr("contenteditable","false"),(i=this._getRange())&&(this.query.el.length&&i.setEndAfter(this.query.el[0]),i.collapse(!1),i.insertNode(r=this.app.document.createTextNode(""+a)),this._setRange("after",r,i)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},o}(i),c=function(){function e(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}return e.prototype.destroy=function(){return this.storage.data(this.at,null)},e.prototype.saved=function(){return this.fetch()>0},e.prototype.query=function(t,e){var n,o,i;return o=this.fetch(),i=this.context.getOpt("searchKey"),o=this.context.callbacks("filter").call(this.context,t,o,i)||[],n=this.context.callbacks("remoteFilter"),o.length>0||!n&&0===o.length?e(o):n.call(this.context,t,e)},e.prototype.fetch=function(){return this.storage.data(this.at)||[]},e.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,t||[]))},e.prototype.load=function(t){return!this.saved()&&t?this._load(t):void 0},e.prototype.reload=function(t){return this._load(t)},e.prototype._load=function(e){return"string"==typeof e?t.ajax(e,{dataType:"json"}).done(function(t){return function(e){return t.save(e)}}(this)):this.save(e)},e}(),m=function(){function e(e){this.context=e,this.$el=t("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return e.prototype.init=function(){var t,e;return e=this.context.getOpt("alias")||this.context.at.charCodeAt(0),(t=this.context.getOpt("headerTpl"))&&1===this.$el.children().length&&this.$el.prepend(t),this.$el.attr({id:"at-view-"+e})},e.prototype.destroy=function(){return this.$el.remove()},e.prototype.bindEvent=function(){var e,n,o;return e=this.$el.find("ul"),n=0,o=0,e.on("mousemove.atwho-view","li",(function(i){var a;if((n!==i.clientX||o!==i.clientY)&&(n=i.clientX,o=i.clientY,!(a=t(i.currentTarget)).hasClass("cur")))return e.find(".cur").removeClass("cur"),a.addClass("cur")})).on("click.atwho-view","li",function(n){return function(o){return e.find(".cur").removeClass("cur"),t(o.currentTarget).addClass("cur"),n.choose(o),o.preventDefault()}}(this))},e.prototype.visible=function(){return t.expr.filters.visible(this.$el[0])},e.prototype.highlighted=function(){return this.$el.find(".cur").length>0},e.prototype.choose=function(t){var e,n;return(e=this.$el.find(".cur")).length&&(n=this.context.insertContentFor(e),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,n,e,t),e),this.context.trigger("inserted",[e,t]),this.hide(t)),this.context.getOpt("hideWithoutSuffix")?this.stopShowing=!0:void 0},e.prototype.reposition=function(e){var n,o,i,a;return n=this.context.app.iframeAsRoot?this.context.app.window:window,e.bottom+this.$el.height()-t(n).scrollTop()>t(n).height()&&(e.bottom=e.top-this.$el.height()),e.left>(i=t(n).width()-this.$el.width()-5)&&(e.left=i),o={left:e.left,top:e.bottom},null!=(a=this.context.callbacks("beforeReposition"))&&a.call(this.context,o),this.$el.offset(o),this.context.trigger("reposition",[o])},e.prototype.next=function(){var t,e,n;return(t=this.$el.find(".cur").removeClass("cur").next()).length||(t=this.$el.find("li:first")),t.addClass("cur"),n=(e=t[0]).offsetTop+e.offsetHeight+(e.nextSibling?e.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},e.prototype.prev=function(){var t,e,n;return(e=this.$el.find(".cur").removeClass("cur").prev()).length||(e=this.$el.find("li:last")),e.addClass("cur"),t=(n=e[0]).offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,t-this.$el.height()))},e.prototype.scrollTop=function(t){var e;return(e=this.context.getOpt("scrollDuration"))?this.$elUl.animate({scrollTop:t},e):this.$elUl.scrollTop(t)},e.prototype.show=function(){var t;return this.stopShowing?void(this.stopShowing=!1):(this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(t=this.context.rect())?this.reposition(t):void 0)},e.prototype.hide=function(t,e){var n;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger("hidden",[t])):(n=function(t){return function(){return t.hide()}}(this),clearTimeout(this.timeoutID),this.timeoutID=setTimeout(n,e))},e.prototype.render=function(e){var n,o,i,a,r,s,l;if(t.isArray(e)&&e.length>0){for(this.$el.find("ul").empty(),o=this.$el.find("ul"),l=this.context.getOpt("displayTpl"),i=0,r=e.length;r>i;i++)a=e[i],a=t.extend({},a,{"atwho-at":this.context.at}),s=this.context.callbacks("tplEval").call(this.context,l,a,"onDisplay"),(n=t(this.context.callbacks("highlighter").call(this.context,s,this.context.query.text))).data("item-data",a),o.append(n);return this.show(),this.context.getOpt("highlightFirst")?o.find("li:first").addClass("cur"):void 0}this.hide()},e}(),u={load:function(t,e){var n;return(n=this.controller(t))?n.model.load(e):void 0},isSelecting:function(){var t;return!!(null!=(t=this.controller())?t.view.visible():void 0)},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;return(t=this.controller())?t.view.reposition(t.rect()):void 0},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},t.fn.atwho=function(e){var n,i;return n=arguments,i=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each((function(){var r,s;return(s=(r=t(this)).data("atwho"))||r.data("atwho",s=new o(this)),"object"!=a(e)&&e?u[e]&&s?i=u[e].apply(s,Array.prototype.slice.call(n,1)):t.error("Method "+e+" does not exist on jQuery.atwho"):s.reg(e.at,e)})),null!=i?i:this},t.fn.atwho.default={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:e,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},t.fn.atwho.debug=!1}(t)}.apply(e,o))||(t.exports=i)},function(t,e,n){var o=n(17);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n(2).default)("8e87fa8e",o,!0,{})},function(t,e,n){(e=n(1)(!1)).push([t.i,".atwho-view{position:absolute;top:0;left:0;display:none;margin-top:18px;background:var(--color-main-background);color:var(--color-main-text);border:1px solid var(--color-border);border-radius:var(--border-radius);box-shadow:0 0 5px var(--color-box-shadow);min-width:120px;z-index:11110 !important}.atwho-view .atwho-header{padding:5px;margin:5px;cursor:pointer;border-bottom:solid 1px var(--color-border);color:var(--color-main-text);font-size:11px;font-weight:bold}.atwho-view .atwho-header .small{color:var(--color-main-text);float:right;padding-top:2px;margin-right:-5px;font-size:12px;font-weight:normal}.atwho-view .atwho-header:hover{cursor:default}.atwho-view .cur{background:var(--color-primary);color:var(--color-primary-text)}.atwho-view .cur small{color:var(--color-primary-text)}.atwho-view strong{color:var(--color-main-text);font-weight:normal}.atwho-view .cur strong{color:var(--color-primary-text);font-weight:normal}.atwho-view ul{list-style:none;padding:0;margin:auto;max-height:200px;overflow-y:auto}.atwho-view ul li{display:block;padding:5px 10px;border-bottom:1px solid var(--color-border);cursor:pointer}.atwho-view small{font-size:smaller;color:var(--color-main-text);font-weight:normal}\n",""]),t.exports=e},function(t,e,n){var o=n(19);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n(2).default)("477a5c21",o,!0,{})},function(t,e,n){(e=n(1)(!1)).push([t.i,"#commentsTabView .emptycontent{margin-top:0}#commentsTabView .newCommentForm{margin-left:36px;position:relative}#commentsTabView .newCommentForm .message{width:100%;padding:10px;min-height:44px;margin:0;padding-right:30px}#commentsTabView .newCommentForm .submit,#commentsTabView .newCommentForm .submitLoading{width:44px;height:44px;margin:0;padding:13px;background-color:transparent;border:none;opacity:.3;position:absolute;bottom:0;right:0}#commentsTabView .deleteLoading{padding:14px;vertical-align:middle}#commentsTabView .newCommentForm .submit:not(:disabled):hover,#commentsTabView .newCommentForm .submit:not(:disabled):focus{opacity:1}#commentsTabView .newCommentForm div.message{resize:none}#commentsTabView .newCommentForm div.message:empty:before{content:attr(data-placeholder);color:grey}#commentsTabView .comment{position:relative;padding:10px 0 15px}#commentsTabView .comments .comment{border-top:1px solid var(--color-border)}#commentsTabView .comment .avatar,.atwho-view-ul * .avatar{width:32px;height:32px;line-height:32px;margin-right:5px}#commentsTabView .comment .message .avatar,.atwho-view-ul * .avatar{display:inline-block}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{white-space:pre-wrap}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{max-height:70px;overflow:hidden}#activityTabView li.comment .message-overlay,#commentsTabView .comment .message-overlay{display:none}#activityTabView li.comment.collapsed .message-overlay,#commentsTabView .comment.collapsed .message-overlay{display:block;position:absolute;z-index:2;height:50px;pointer-events:none;left:0;right:0;bottom:0;background:-moz-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-webkit-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-o-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-ms-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background-repeat:no-repeat}#commentsTabView .hidden{display:none !important}#commentsTabView .comment .authorRow{min-height:44px}#commentsTabView .comment .authorRow .tooltip{margin-top:5px}.atwho-view-ul * .avatar-name-wrapper,#commentsTabView .comment .authorRow{position:relative;display:inline-flex;align-items:center;width:100%}#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser),#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar,#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar img,#commentsTabView .comment .authorRow .avatar:not(.currentUser),#commentsTabView .comment .authorRow .author:not(.currentUser){cursor:pointer}.atwho-view-ul .avatar-name-wrapper,.atwho-view-ul .avatar-name-wrapper .avatar,.atwho-view-ul .avatar-name-wrapper .avatar img{cursor:pointer}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper{position:relative;display:inline;vertical-align:top;background-color:var(--color-background-dark);border-radius:50vh;padding:1px 7px 1px 1px;white-space:nowrap}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar{height:16px;width:16px;vertical-align:middle;padding:1px;margin-top:-3px;margin-left:0;margin-right:2px}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar img,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar img{vertical-align:top}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper strong,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper strong{font-weight:bold}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper.currentUser,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper.currentUser{background-color:var(--color-primary);color:var(--color-primary-text)}.atwho-view-ul * .avatar-name-wrapper{white-space:nowrap}#commentsTabView .comment .author,#commentsTabView .comment .date{opacity:.5}#commentsTabView .comment .author{max-width:210px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#commentsTabView .comment .date{margin-left:auto;padding:10px 0px}#commentsTabView .comments>li:not(.newCommentRow) .message{padding-left:40px;word-wrap:break-word;overflow-wrap:break-word}#commentsTabView .comment .action{opacity:0.3;padding:14px;display:block}#commentsTabView .comment .action:hover,#commentsTabView .comment .action:focus{opacity:1}#commentsTabView .newCommentRow .action-container{margin-left:auto}#commentsTabView .comment.disabled .message{opacity:0.3}#commentsTabView .comment.disabled .action{display:none}#commentsTabView .message.error{color:#e9322d;border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.app-files .action-comment{padding:16px 14px}#commentsTabView .comment .message .contactsmenu-popover{left:-6px;top:24px}\n",""]),t.exports=e}]); +!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/js/",n(n.s=3)}([function(t,e){t.exports=jQuery},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=(r=o,s=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[n].concat(a).concat([i]).join("\n")}var r,s,l;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o=0;o<t.length;o++){var i=[].concat(t[o]);n&&(i[2]?i[2]="".concat(n," and ").concat(i[2]):i[2]=n),e.push(i)}},e}},function(t,e,n){"use strict";function o(t,e){for(var n=[],o={},i=0;i<e.length;i++){var a=e[i],r=a[0],s={id:t+":"+i,css:a[1],media:a[2],sourceMap:a[3]};o[r]?o[r].parts.push(s):n.push(o[r]={id:r,parts:[s]})}return n}n.r(e),n.d(e,"default",(function(){return h}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},r=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,c=!1,m=function(){},u=null,d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,n,i){c=n,u=i||{};var r=o(t,e);return p(r),function(e){for(var n=[],i=0;i<r.length;i++){var s=r[i];(l=a[s.id]).refs--,n.push(l)}e?p(r=o(t,e)):r=[];for(i=0;i<n.length;i++){var l;if(0===(l=n[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete a[l.id]}}}}function p(t){for(var e=0;e<t.length;e++){var n=t[e],o=a[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(g(n.parts[i]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{var r=[];for(i=0;i<n.parts.length;i++)r.push(g(n.parts[i]));a[n.id]={id:n.id,refs:1,parts:r}}}}function f(){var t=document.createElement("style");return t.type="text/css",r.appendChild(t),t}function g(t){var e,n,o=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(o){if(c)return m;o.parentNode.removeChild(o)}if(d){var i=l++;o=s||(s=f()),e=C.bind(null,o,i,!1),n=C.bind(null,o,i,!0)}else o=f(),e=w.bind(null,o),n=function(){o.parentNode.removeChild(o)};return e(t),function(o){if(o){if(o.css===t.css&&o.media===t.media&&o.sourceMap===t.sourceMap)return;e(t=o)}else n()}}var v,y=(v=[],function(t,e){return v[t]=e,v.filter(Boolean).join("\n")});function C(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var a=document.createTextNode(i),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(a,r[e]):t.appendChild(a)}}function w(t,e){var n=e.css,o=e.media,i=e.sourceMap;if(o&&t.setAttribute("media",o),u.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},function(t,e,n){"use strict";n.r(e);n(4),n(5),n(6),n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(18);window.OCA.Comments=OCA.Comments},function(t,e){OCA.Comments||(OCA.Comments={})},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o,i;o=Handlebars.template,(i=OCA.Comments.Templates=OCA.Comments.Templates||{}).comment=o({1:function(t,e,n,o,i){return" unread"},3:function(t,e,n,o,i){return" collapsed"},5:function(t,e,n,o,i){return" currentUser"},7:function(t,e,n,o,i){var a;return'data-username="'+t.escapeExpression("function"==typeof(a=null!=(a=n.actorId||(null!=e?e.actorId:e))?a:n.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"actorId",hash:{},data:i}):a)+'"'},9:function(t,e,n,o,i){return'\t\t\t<a href="#" class="action more icon icon-more has-tooltip"></a>\n\t\t\t<div class="deleteLoading icon-loading-small hidden"></div>\n'},11:function(t,e,n,o,i){return'\t\t<div class="message-overlay"></div>\n'},compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s,l=null!=e?e:t.nullContext||{},c=o.helperMissing,m="function",u=t.escapeExpression;return'<li class="comment'+(null!=(r=o.if.call(l,null!=e?e.isUnread:e,{name:"if",hash:{},fn:t.program(1,a,0),inverse:t.noop,data:a}))?r:"")+(null!=(r=o.if.call(l,null!=e?e.isLong:e,{name:"if",hash:{},fn:t.program(3,a,0),inverse:t.noop,data:a}))?r:"")+'" data-id="'+u(n(s=null!=(s=o.id||(null!=e?e.id:e))?s:c)===m?s.call(l,{name:"id",hash:{},data:a}):s)+'">\n\t<div class="authorRow">\n\t\t<div class="avatar'+(null!=(r=o.if.call(l,null!=e?e.isUserAuthor:e,{name:"if",hash:{},fn:t.program(5,a,0),inverse:t.noop,data:a}))?r:"")+'" '+(null!=(r=o.if.call(l,null!=e?e.actorId:e,{name:"if",hash:{},fn:t.program(7,a,0),inverse:t.noop,data:a}))?r:"")+'> </div>\n\t\t<div class="author'+(null!=(r=o.if.call(l,null!=e?e.isUserAuthor:e,{name:"if",hash:{},fn:t.program(5,a,0),inverse:t.noop,data:a}))?r:"")+'">'+u(n(s=null!=(s=o.actorDisplayName||(null!=e?e.actorDisplayName:e))?s:c)===m?s.call(l,{name:"actorDisplayName",hash:{},data:a}):s)+"</div>\n"+(null!=(r=o.if.call(l,null!=e?e.isUserAuthor:e,{name:"if",hash:{},fn:t.program(9,a,0),inverse:t.noop,data:a}))?r:"")+'\t\t<div class="date has-tooltip live-relative-timestamp" data-timestamp="'+u(n(s=null!=(s=o.timestamp||(null!=e?e.timestamp:e))?s:c)===m?s.call(l,{name:"timestamp",hash:{},data:a}):s)+'" title="'+u(n(s=null!=(s=o.altDate||(null!=e?e.altDate:e))?s:c)===m?s.call(l,{name:"altDate",hash:{},data:a}):s)+'">'+u(n(s=null!=(s=o.date||(null!=e?e.date:e))?s:c)===m?s.call(l,{name:"date",hash:{},data:a}):s)+'</div>\n\t</div>\n\t<div class="message">'+(null!=(r=n(s=null!=(s=o.formattedMessage||(null!=e?e.formattedMessage:e))?s:c)===m?s.call(l,{name:"formattedMessage",hash:{},data:a}):s)?r:"")+"</div>\n"+(null!=(r=o.if.call(l,null!=e?e.isLong:e,{name:"if",hash:{},fn:t.program(11,a,0),inverse:t.noop,data:a}))?r:"")+"</li>\n"},useData:!0}),i.commentsmodifymenu=o({1:function(t,e,o,i,a){var r,s,l=null!=e?e:t.nullContext||{},c=o.helperMissing,m=t.escapeExpression;return'\t\t<li>\n\t\t\t<a href="#" class="menuitem action '+m("function"===n(s=null!=(s=o.name||(null!=e?e.name:e))?s:c)?s.call(l,{name:"name",hash:{},data:a}):s)+' permanent" data-action="'+m("function"===n(s=null!=(s=o.name||(null!=e?e.name:e))?s:c)?s.call(l,{name:"name",hash:{},data:a}):s)+'">\n'+(null!=(r=o.if.call(l,null!=e?e.iconClass:e,{name:"if",hash:{},fn:t.program(2,a,0),inverse:t.program(4,a,0),data:a}))?r:"")+"\t\t\t\t<span>"+m("function"===n(s=null!=(s=o.displayName||(null!=e?e.displayName:e))?s:c)?s.call(l,{name:"displayName",hash:{},data:a}):s)+"</span>\n\t\t\t</a>\n\t\t</li>\n"},2:function(t,e,n,o,i){var a;return'\t\t\t\t\t<span class="icon '+t.escapeExpression("function"==typeof(a=null!=(a=n.iconClass||(null!=e?e.iconClass:e))?a:n.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"iconClass",hash:{},data:i}):a)+'"></span>\n'},4:function(t,e,n,o,i){return'\t\t\t\t\t<span class="no-icon"></span>\n'},compiler:[7,">= 4.0.0"],main:function(t,e,n,o,i){var a;return"<ul>\n"+(null!=(a=n.each.call(null!=e?e:t.nullContext||{},null!=e?e.items:e,{name:"each",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?a:"")+"</ul>\n"},useData:!0}),i.edit_comment=o({1:function(t,e,n,o,i){var a;return'\t\t\t<div class="action-container">\n\t\t\t\t<a href="#" class="action cancel icon icon-close has-tooltip" title="'+t.escapeExpression("function"==typeof(a=null!=(a=n.cancelText||(null!=e?e.cancelText:e))?a:n.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"cancelText",hash:{},data:i}):a)+'"></a>\n\t\t\t</div>\n'},compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s,l=null!=e?e:t.nullContext||{},c=o.helperMissing,m="function",u=t.escapeExpression;return"<"+u(n(s=null!=(s=o.tag||(null!=e?e.tag:e))?s:c)===m?s.call(l,{name:"tag",hash:{},data:a}):s)+' class="newCommentRow comment" data-id="'+u(n(s=null!=(s=o.id||(null!=e?e.id:e))?s:c)===m?s.call(l,{name:"id",hash:{},data:a}):s)+'">\n\t<div class="authorRow">\n\t\t<div class="avatar currentUser" data-username="'+u(n(s=null!=(s=o.actorId||(null!=e?e.actorId:e))?s:c)===m?s.call(l,{name:"actorId",hash:{},data:a}):s)+'"></div>\n\t\t<div class="author currentUser">'+u(n(s=null!=(s=o.actorDisplayName||(null!=e?e.actorDisplayName:e))?s:c)===m?s.call(l,{name:"actorDisplayName",hash:{},data:a}):s)+"</div>\n"+(null!=(r=o.if.call(l,null!=e?e.isEditMode:e,{name:"if",hash:{},fn:t.program(1,a,0),inverse:t.noop,data:a}))?r:"")+'\t</div>\n\t<form class="newCommentForm">\n\t\t<div contentEditable="true" class="message" data-placeholder="'+u(n(s=null!=(s=o.newMessagePlaceholder||(null!=e?e.newMessagePlaceholder:e))?s:c)===m?s.call(l,{name:"newMessagePlaceholder",hash:{},data:a}):s)+'">'+u(n(s=null!=(s=o.message||(null!=e?e.message:e))?s:c)===m?s.call(l,{name:"message",hash:{},data:a}):s)+'</div>\n\t\t<input class="submit icon-confirm has-tooltip" type="submit" value="" title="'+u(n(s=null!=(s=o.submitText||(null!=e?e.submitText:e))?s:c)===m?s.call(l,{name:"submitText",hash:{},data:a}):s)+'"/>\n\t\t<div class="submitLoading icon-loading-small hidden"></div>\n\t</form>\n</'+u(n(s=null!=(s=o.tag||(null!=e?e.tag:e))?s:c)===m?s.call(l,{name:"tag",hash:{},data:a}):s)+">\n"},useData:!0}),i.filesplugin=o({compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s=null!=e?e:t.nullContext||{},l=o.helperMissing,c=t.escapeExpression;return'<a class="action action-comment permanent" title="'+c("function"===n(r=null!=(r=o.countMessage||(null!=e?e.countMessage:e))?r:l)?r.call(s,{name:"countMessage",hash:{},data:a}):r)+'" href="#">\n\t<img class="svg" src="'+c("function"===n(r=null!=(r=o.iconUrl||(null!=e?e.iconUrl:e))?r:l)?r.call(s,{name:"iconUrl",hash:{},data:a}):r)+'"/>\n</a>\n'},useData:!0}),i.view=o({compiler:[7,">= 4.0.0"],main:function(t,e,o,i,a){var r,s=null!=e?e:t.nullContext||{},l=o.helperMissing,c=t.escapeExpression;return'<ul class="comments">\n</ul>\n<div class="emptycontent hidden"><div class="icon-comment"></div>\n\t<p>'+c("function"===n(r=null!=(r=o.emptyResultLabel||(null!=e?e.emptyResultLabel:e))?r:l)?r.call(s,{name:"emptyResultLabel",hash:{},data:a}):r)+'</p></div>\n<input type="button" class="showMore hidden" value="'+c("function"===n(r=null!=(r=o.moreLabel||(null!=e?e.moreLabel:e))?r:l)?r.call(s,{name:"moreLabel",hash:{},data:a}):r)+'" name="show-more" id="show-more" />\n<div class="loading hidden" style="height: 50px"></div>\n'},useData:!0})},function(t,e){!function(t,e){_.extend(t.Files.Client,{PROPERTY_FILEID:"{"+t.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_MESSAGE:"{"+t.Files.Client.NS_OWNCLOUD+"}message",PROPERTY_ACTORTYPE:"{"+t.Files.Client.NS_OWNCLOUD+"}actorType",PROPERTY_ACTORID:"{"+t.Files.Client.NS_OWNCLOUD+"}actorId",PROPERTY_ISUNREAD:"{"+t.Files.Client.NS_OWNCLOUD+"}isUnread",PROPERTY_OBJECTID:"{"+t.Files.Client.NS_OWNCLOUD+"}objectId",PROPERTY_OBJECTTYPE:"{"+t.Files.Client.NS_OWNCLOUD+"}objectType",PROPERTY_ACTORDISPLAYNAME:"{"+t.Files.Client.NS_OWNCLOUD+"}actorDisplayName",PROPERTY_CREATIONDATETIME:"{"+t.Files.Client.NS_OWNCLOUD+"}creationDateTime",PROPERTY_MENTIONS:"{"+t.Files.Client.NS_OWNCLOUD+"}mentions"});var n=t.Backbone.Model.extend({sync:t.Backbone.davSync,defaults:{actorType:"users",objectType:"files"},davProperties:{id:t.Files.Client.PROPERTY_FILEID,message:t.Files.Client.PROPERTY_MESSAGE,actorType:t.Files.Client.PROPERTY_ACTORTYPE,actorId:t.Files.Client.PROPERTY_ACTORID,actorDisplayName:t.Files.Client.PROPERTY_ACTORDISPLAYNAME,creationDateTime:t.Files.Client.PROPERTY_CREATIONDATETIME,objectType:t.Files.Client.PROPERTY_OBJECTTYPE,objectId:t.Files.Client.PROPERTY_OBJECTID,isUnread:t.Files.Client.PROPERTY_ISUNREAD,mentions:t.Files.Client.PROPERTY_MENTIONS},parse:function(t){return{id:t.id,message:t.message,actorType:t.actorType,actorId:t.actorId,actorDisplayName:t.actorDisplayName,creationDateTime:t.creationDateTime,objectType:t.objectType,objectId:t.objectId,isUnread:"true"===t.isUnread,mentions:this._parseMentions(t.mentions)}},_parseMentions:function(t){if(_.isUndefined(t))return{};var e={};for(var n in t){var o=t[n];if(!_.isUndefined(o.localName)&&"mention"===o.localName){e[n]={};for(var i=o.firstChild;i;i=i.nextSibling)!_.isUndefined(i.localName)&&i.localName.startsWith("mention")&&(e[n][i.localName]=i.textContent)}}return e}});e.Comments.CommentModel=n}(OC,OCA)},function(t,e){!function(t,e){var n=t.Backbone.Collection.extend({sync:t.Backbone.davSync,model:e.Comments.CommentModel,_objectType:"files",_objectId:null,_endReached:!1,_limit:20,initialize:function(t,e){(e=e||{}).objectType&&(this._objectType=e.objectType),e.objectId&&(this._objectId=e.objectId)},url:function(){return t.linkToRemote("dav")+"/comments/"+encodeURIComponent(this._objectType)+"/"+encodeURIComponent(this._objectId)+"/"},setObjectId:function(t){this._objectId=t},hasMoreResults:function(){return!this._endReached},reset:function(){return this._endReached=!1,this._summaryModel=null,t.Backbone.Collection.prototype.reset.apply(this,arguments)},fetchNext:function(t){var e=this;if(!this.hasMoreResults())return null;var o='<?xml version="1.0" encoding="utf-8" ?>\n<oc:filter-comments xmlns:D="DAV:" xmlns:oc="http://owncloud.org/ns">\n <oc:limit>'+(this._limit+1)+"</oc:limit>\n <oc:offset>"+this.length+"</oc:offset>\n</oc:filter-comments>\n",i=(t=t||{}).success;return t=_.extend({remove:!1,parse:!0,data:o,davProperties:n.prototype.model.prototype.davProperties,success:function(n){if(n.length<=e._limit?e._endReached=!0:n=_.initial(n),!e.set(n,t))return!1;i&&i.apply(null,arguments),e.trigger("sync","REPORT",e,t)}},t),this.sync("REPORT",this,t)},getSummaryModel:function(){return this._summaryModel||(this._summaryModel=new e.Comments.CommentSummaryModel({id:this._objectId,objectType:this._objectType})),this._summaryModel},updateReadMarker:function(t,e){return e=e||{},this.getSummaryModel().save({readMarker:(t||new Date).toUTCString()},e)}});e.Comments.CommentCollection=n}(OC,OCA)},function(t,e){!function(t,e){_.extend(t.Files.Client,{PROPERTY_READMARKER:"{"+t.Files.Client.NS_OWNCLOUD+"}readMarker"});var n=t.Backbone.Model.extend({sync:t.Backbone.davSync,_objectType:"files",_objectId:null,davProperties:{readMarker:t.Files.Client.PROPERTY_READMARKER},initialize:function(t,e){(e=e||{}).objectType&&(this._objectType=e.objectType)},url:function(){return t.linkToRemote("dav")+"/comments/"+encodeURIComponent(this._objectType)+"/"+encodeURIComponent(this.id)+"/"}});e.Comments.CommentSummaryModel=n}(OC,OCA)},function(e,n){!function(e,n){var o=n.Files.DetailTabView.extend({id:"commentsTabView",className:"tab commentsTabView",_autoCompleteData:void 0,_commentsModifyMenu:void 0,events:{"submit .newCommentForm":"_onSubmitComment","click .showMore":"_onClickShowMore","click .cancel":"_onClickCloseComment","click .comment":"_onClickComment","keyup div.message":"_onTextChange","change div.message":"_onTextChange","input div.message":"_onTextChange","paste div.message":"_onPaste"},_commentMaxLength:1e3,initialize:function(){n.Files.DetailTabView.prototype.initialize.apply(this,arguments),this.collection=new n.Comments.CommentCollection,this.collection.on("request",this._onRequest,this),this.collection.on("sync",this._onEndRequest,this),this.collection.on("add",this._onAddModel,this),this.collection.on("change:message",this._onChangeModel,this),this._commentMaxThreshold=.9*this._commentMaxLength,_.bindAll(this,"_onTypeComment","_initAutoComplete","_onAutoComplete")},template:function(t){var o=e.getCurrentUser();return n.Comments.Templates.view(_.extend({actorId:o.uid,actorDisplayName:o.displayName},t))},editCommentTemplate:function(o){var i=e.getCurrentUser();return n.Comments.Templates.edit_comment(_.extend({actorId:i.uid,actorDisplayName:i.displayName,newMessagePlaceholder:t("comments","New comment …"),submitText:t("comments","Post"),cancelText:t("comments","Cancel"),tag:"li"},o))},commentTemplate:function(o){return"deleted_users"===(o=_.extend({editTooltip:t("comments","Edit comment"),isUserAuthor:e.getCurrentUser().uid===o.actorId,isLong:this._isLong(o.message)},o)).actorType&&(o.actorId=null,o.actorDisplayName=t("comments","[Deleted user]")),n.Comments.Templates.comment(o)},getLabel:function(){return t("comments","Comments")},getIcon:function(){return"icon-comment"},setFileInfo:function(t){t?(this.model=t,this.render(),this._initAutoComplete($("#commentsTabView").find(".newCommentForm .message")),this.collection.setObjectId(this.model.id),this.collection.reset([],{silent:!0}),this.nextPage()):(this.model=null,this.render(),this.collection.reset())},render:function(){this.$el.html(this.template({emptyResultLabel:t("comments","No comments yet, start the conversation!"),moreLabel:t("comments","More comments …")})),this.$el.find(".comments").before(this.editCommentTemplate({tag:"div"})),this.$el.find(".has-tooltip").tooltip(),this.$container=this.$el.find("ul.comments"),this.$el.find(".avatar").avatar(e.getCurrentUser().uid,32),this.delegateEvents(),this.$el.find(".message").on("keydown input change",this._onTypeComment),autosize(this.$el.find(".newCommentRow .message")),this.$el.find(".newCommentForm .message").focus()},_initAutoComplete:function(t){var n=this,o=10;_.isUndefined(e.appConfig.comments)||(o=e.appConfig.comments.maxAutoCompleteResults),t.atwho({at:"@",limit:o,callbacks:{remoteFilter:n._onAutoComplete,highlighter:function(t){var e=$(t);return e.find(".avatar").avatar(void 0,32),e},sorter:function(t,e){return e}},displayTpl:function(t){return'<li><span class="avatar-name-wrapper"><span class="avatar" data-username="'+escapeHTML(t.id)+'" data-user="'+escapeHTML(t.id)+'" data-user-display-name="'+escapeHTML(t.label)+'"></span><strong>'+escapeHTML(t.label)+"</strong></span></li>"},insertTpl:function(t){return'<span class="avatar-name-wrapper"><span class="avatar" data-username="'+escapeHTML(t.id)+'" data-user="'+escapeHTML(t.id)+'" data-user-display-name="'+escapeHTML(t.label)+'"></span><strong>'+escapeHTML(t.label)+"</strong></span>"},searchKey:"label"}),t.on("inserted.atwho",(function(t,e){n._postRenderItem($(t.target).find('span[data-username="'+e.find("[data-username]").data("username")+'"]').parent(),!0)}))},_onAutoComplete:function(t,n){var o=this;_.isUndefined(this._autoCompleteRequestTimer)||clearTimeout(this._autoCompleteRequestTimer),this._autoCompleteRequestTimer=_.delay((function(){_.isUndefined(this._autoCompleteRequestCall)||this._autoCompleteRequestCall.abort(),this._autoCompleteRequestCall=$.ajax({url:e.linkToOCS("core",2)+"autocomplete/get",data:{search:t,itemType:"files",itemId:o.model.get("id"),sorter:"commenters|share-recipients",limit:e.appConfig.comments.maxAutoCompleteResults},beforeSend:function(t){t.setRequestHeader("Accept","application/json")},success:function(t){n(t.ocs.data)}})}),400)},_formatItem:function(t){var n=new Date(t.get("creationDateTime")).getTime();return _.extend({timestamp:n,date:e.Util.relativeModifiedDate(n),altDate:e.Util.formatDate(n),formattedMessage:this._formatMessage(t.get("message"),t.get("mentions"))},t.attributes)},_toggleLoading:function(t){this._loading=t,this.$el.find(".loading").toggleClass("hidden",!t)},_onRequest:function(t){"REPORT"===t&&(this._toggleLoading(!0),this.$el.find(".showMore").addClass("hidden"))},_onEndRequest:function(t){var e=this.model;(this._toggleLoading(!1),this.$el.find(".emptycontent").toggleClass("hidden",!!this.collection.length),this.$el.find(".showMore").toggleClass("hidden",!this.collection.hasMoreResults()),"REPORT"===t)&&(this.collection.findWhere({isUnread:!0})&&this.collection.updateReadMarker(null,{success:function(){e.set("commentsUnread",0)}}),this.$el.find(".newCommentForm .message").focus())},_onAddModel:function(t,e,n){var o=$(this.commentTemplate(this._formatItem(t)));!_.isUndefined(n.at)&&e.length>1?this.$container.find("li").eq(n.at).before(o):this.$container.append(o),this._postRenderItem(o),$("#commentsTabView").find(".newCommentForm div.message").text("").prop("contenteditable",!0);var i=t.get("mentions"),a=this;t.fetch({success:function(t){if(!_.isEqual(i,t.get("mentions"))){var e=$(a.commentTemplate(a._formatItem(t)));o.html(e.html()),a._postRenderItem(o)}}})},_onChangeModel:function(t){if(t.get("message").trim()!==t.previous("message").trim()){var e=this.$container.find('.comment[data-id="'+t.id+'"] form').closest(".comment"),n=e.data("commentEl");if(!_.isUndefined(n)){var o=this;t.fetch({success:function(t){n.removeClass("hidden"),e.remove();var i=n.find(".message");i.html(o._formatMessage(t.get("message"),t.get("mentions"))).find(".avatar").each((function(){$(this).avatar()})),o._postRenderItem(i)}})}}},_postRenderItem:function(t,o){t.find(".has-tooltip").tooltip();var i=t.find(".message .avatar");$(t.context).hasClass("message")&&(i=t.find(".avatar")),i.each((function(){var t=$(this);t.avatar(t.attr("data-username"),16)})),t.find(".authorRow .avatar").each((function(){var t=$(this);t.avatar(t.attr("data-username"),32)}));var a=t.find(".avatar").data("username");a!==e.getCurrentUser().uid&&t.find(".authorRow .avatar, .authorRow .author").contactsMenu(a,0,t.find(".authorRow"));var r=t.find(".message");if(0===r.length&&(r=t),!o){var s=this,l=new n.Comments.CommentsModifyMenu;t.find(".authorRow").append(l.$el),t.find(".more").on("click",_.bind(l.show,l)),s.listenTo(l,"select:menu-item-clicked",(function(t,e){"edit"===e?s._onClickEditComment(t):"delete"===e&&s._onClickDeleteComment(t)}))}this._postRenderMessage(r,o)},_postRenderMessage:function(t,n){n||t.find(".avatar-name-wrapper").each((function(){var t=$(this),n=t.find(".avatar").data("user");n!==e.getCurrentUser().uid&&t.contactsMenu(n,0,t)}))},_formatMessage:function(t,e,n){for(var o in t=escapeHTML(t).replace(/\n/g,"<br/>"),e){if(!e.hasOwnProperty(o))return;var i="@"+e[o].mentionId;-1!==e[o].mentionId.indexOf(" ")&&(i=_.escape('@"'+e[o].mentionId+'"')),i=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var a=new RegExp("(^|\\s)("+i+")\\b","g");-1!==e[o].mentionId.indexOf(" ")&&(a=new RegExp("(^|\\s)("+i+")","g"));var r=this._composeHTMLMention(e[o].mentionId,e[o].mentionDisplayName);t=t.replace(a,(function(t,e){return e+r}))}return!0!==n&&(t=OCP.Comments.plainToRich(t)),t},_composeHTMLMention:function(t,n){var o='<span class="avatar" data-username="'+_.escape(t)+'" data-user="'+_.escape(t)+'" data-user-display-name="'+_.escape(n)+'"></span>';return'<span class="atwho-inserted" contenteditable="false"><span class="avatar-name-wrapper'+(t===e.getCurrentUser().uid?" currentUser":"")+'">'+o+"<strong>"+_.escape(n)+"</strong></span></span>"},nextPage:function(){!this._loading&&this.collection.hasMoreResults()&&this.collection.fetchNext()},_onClickEditComment:function(e){e.preventDefault();var n=$(e.target).closest(".comment"),o=n.data("id"),i=this.collection.get(o),a=$(this.editCommentTemplate(_.extend({isEditMode:!0,submitText:t("comments","Save")},i.attributes)));n.addClass("hidden").removeClass("collapsed"),n.after(a),a.data("commentEl",n),a.find(".message").on("keydown input change",this._onTypeComment),a.find(".avatar:first").replaceWith(n.find(".avatar:first").clone()),a.find(".has-tooltip").tooltip();var r=a.find(".message");r.html(this._formatMessage(i.get("message"),i.get("mentions"),!0)).find(".avatar").each((function(){$(this).avatar()}));return this._postRenderItem(r,!0),autosize(a.find(".message")),this._initAutoComplete(a.find(".message")),!1},_onTypeComment:function(e){var n=$(e.target),o=n.text().length,i=n.data("submitButtonEl");i||(i=n.closest("form").find(".submit"),n.data("submitButtonEl",i)),n.tooltip("hide"),o>this._commentMaxThreshold&&(n.attr("data-original-title",t("comments","Allowed characters {count} of {max}",{count:o,max:this._commentMaxLength})),n.tooltip({trigger:"manual"}),n.tooltip("show"),n.addClass("error"));var a=o>this._commentMaxLength;n.toggleClass("error",a),i.prop("disabled",a),13!==e.keyCode||e.shiftKey||n.atwho("isSelecting")||(i.click(),e.preventDefault())},_onClickComment:function(t){var e=$(t.target);e.is(".comment")||(e=e.closest(".comment")),e.removeClass("collapsed")},_onClickCloseComment:function(t){t.preventDefault();var e=$(t.target).closest(".comment");return e.data("commentEl").removeClass("hidden"),e.remove(),!1},_onClickDeleteComment:function(n){n.preventDefault();var o=$(n.target).closest(".comment"),i=o.data("id"),a=o.find(".deleteLoading"),r=o.find(".more");return o.addClass("disabled"),a.removeClass("hidden"),r.addClass("hidden"),o.data("commentEl",o),this.collection.get(i).destroy({success:function(){o.data("commentEl").remove(),o.remove()},error:function(){a.addClass("hidden"),r.removeClass("hidden"),o.removeClass("disabled"),e.Notification.showTemporary(t("comments","Error occurred while retrieving comment with ID {id}",{id:i}))}}),!1},_onClickShowMore:function(t){t.preventDefault(),this.nextPage()},_onSubmitSuccess:function(t,e){var n=e.find(".submit"),o=e.find(".submitLoading"),i=e.find(".message");n.removeClass("hidden"),o.addClass("hidden"),i.prop("contenteditable",!0),i.text("")},_commentBodyHTML2Plain:function(t){var e,n=t.clone();n.find(".avatar-name-wrapper").each((function(){var t=$(this),e=t.parent(),n=t.find(".avatar").data("username").toString();-1!==n.indexOf(" ")?e.html('@"'+n+'"'):e.html("@"+n)})),n.html(OCP.Comments.richToPlain(n.html()));var o=n.html();do{o=(e=o).replace("<br>","\n")}while(e!==o);return n.html(o),n.text()},_onSubmitComment:function(t){var n=this,o=$(t.target),i=o.closest(".comment").data("id"),a=e.getCurrentUser(),r=o.find(".submit"),s=o.find(".submitLoading"),l=o.find(".message"),c=l.text().trim();if(t.preventDefault(),c.length&&!(c.length>this._commentMaxLength)){if(l.prop("contenteditable",!1),r.addClass("hidden"),s.removeClass("hidden"),c=this._commentBodyHTML2Plain(l),i)this.collection.get(i).save({message:c},{success:function(t){if(n._onSubmitSuccess(t,o),t.get("message").trim()===t.previous("message").trim()){var e=o.closest(".comment");e.data("commentEl").removeClass("hidden"),e.remove()}},error:function(){n._onSubmitError(o,i)}});else this.collection.create({actorId:a.uid,actorDisplayName:a.displayName,actorType:"users",verb:"comment",message:c,creationDateTime:(new Date).toUTCString()},{at:0,wait:!0,success:function(t){n._onSubmitSuccess(t,o)},error:function(){n._onSubmitError(o,void 0)}});return!1}},_onSubmitError:function(n,o){n.find(".submit").removeClass("hidden"),n.find(".submitLoading").addClass("hidden"),n.find(".message").prop("contenteditable",!0),_.isUndefined(o)?e.Notification.show(t("comments","Error occurred while posting comment"),{type:"error"}):e.Notification.show(t("comments","Error occurred while updating comment with id {id}",{id:o}),{type:"error"})},_onTextChange:function(){var t=$("#commentsTabView").find(".newCommentForm div.message");t.text().trim().length||t.empty()},_onPaste:function(t){t.preventDefault();var e=t.originalEvent.clipboardData.getData("text/plain");document.execCommand("insertText",!1,e)},_isLong:function(t){return t.length>250||(t.match(/\n/g)||[]).length>1}});n.Comments.CommentsTabView=o}(OC,OCA)},function(e,n){var o;OC,OCA,o=OC.Backbone.View.extend({tagName:"div",className:"commentsModifyMenu popovermenu bubble menu",_scopes:[{name:"edit",displayName:t("comments","Edit comment"),iconClass:"icon-rename"},{name:"delete",displayName:t("comments","Delete comment"),iconClass:"icon-delete"}],initialize:function(){},events:{"click a.action":"_onClickAction"},_onClickAction:function(t){var e=$(t.currentTarget);e.hasClass("menuitem")||(e=e.closest(".menuitem")),OC.hideMenus(),this.trigger("select:menu-item-clicked",t,e.data("action"))},render:function(){this.$el.html(OCA.Comments.Templates.commentsmodifymenu({items:this._scopes}))},show:function(t){for(var e in this._context=t,this._scopes)this._scopes[e].active=!1;var n=$(t.target),o=n.offset(),i=n.closest(".authorRow").offset(),a={top:o.top-i.top+48,left:"",right:""};a.left=o.left-i.left,a.left>200?(a.left="",a.right=this.$el.closest(".comment").find(".date").width(),this.$el.removeClass("menu-left").addClass("menu-right")):this.$el.removeClass("menu-right").addClass("menu-left"),this.$el.css(a),this.render(),this.$el.removeClass("hidden"),OC.showMenu(null,this.$el)}}),OCA.Comments=OCA.Comments||{},OCA.Comments.CommentsModifyMenu=o},function(e,o){_.extend(OC.Files.Client,{PROPERTY_COMMENTS_UNREAD:"{"+OC.Files.Client.NS_OWNCLOUD+"}comments-unread"}),OCA.Comments=_.extend({},OCA.Comments),OCA.Comments||(OCA.Comments={}),OCA.Comments.FilesPlugin={ignoreLists:["trashbin","files.public"],_formatCommentCount:function(t){return OCA.Comments.Templates.filesplugin({count:t,countMessage:n("comments","%n unread comment","%n unread comments",t),iconUrl:OC.imagePath("core","actions/comment")})},attach:function(e){var o=this;if(!(this.ignoreLists.indexOf(e.id)>=0)){e.registerTabView(new OCA.Comments.CommentsTabView("commentsTabView"));var i=e._getWebdavProperties;e._getWebdavProperties=function(){var t=i.apply(this,arguments);return t.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD),t},e.filesClient.addFileInfoParser((function(t){var e={},n=t.propStat[0].properties[OC.Files.Client.PROPERTY_COMMENTS_UNREAD];return _.isUndefined(n)||""===n||(e.commentsUnread=parseInt(n,10)),e})),e.$el.addClass("has-comments");var a=e._createRow;e._createRow=function(t){var e=a.apply(this,arguments);return t.commentsUnread&&e.attr("data-comments-unread",t.commentsUnread),e},e.fileActions.registerAction({name:"Comment",displayName:function(e){if(e&&e.$file){var o=parseInt(e.$file.data("comments-unread"),10);if(o>=0)return n("comments","1 new comment","{unread} new comments",o,{unread:o})}return t("comments","Comment")},mime:"all",order:-140,iconClass:"icon-comment",permissions:OC.PERMISSION_READ,type:OCA.Files.FileActions.TYPE_INLINE,render:function(t,e,n){var i=n.$file.data("comments-unread");if(i){var a=$(o._formatCommentCount(i));return n.$file.find("a.name>span.fileactions").append(a),a}return""},actionHandler:function(t,e){e.$file.find(".action-comment").tooltip("hide"),e.fileList.showDetailsView(t,"comments")}});var r=e.elementToFile;e.elementToFile=function(t){var e=r.apply(this,arguments),n=t.data("comments-unread");return n&&(e.commentsUnread=n),e}}}},OC.Plugins.register("OCA.Files.FileList",OCA.Comments.FilesPlugin)},function(t,e){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay:function(t,e,n){if("comments"===t.get("app")&&"comments"===t.get("type")&&"ActivityTabView"===n&&(e.addClass("comment"),t.get("message")&&this._isLong(t.get("message")))){e.addClass("collapsed");var o=$("<div>").addClass("message-overlay");e.find(".activitymessage").after(o),e.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment:function(t){var e=$(t.target);e.is(".comment")||(e=e.closest(".comment")),e.removeClass("collapsed")},_isLong:function(t){return t.length>250||(t.match(/\n/g)||[]).length>1}},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)},function(t,e){!function(t,e,n){"use strict";var o=function(){this.initialize()};o.prototype={fileList:null,initialize:function(){var o=this;this.fileAppLoaded=function(){return!!e.Files&&!!e.Files.App},this.renderCommentResult=function(e,o){var i;(i=n(".nofilterresults")).hasClass("hidden")||i.addClass("hidden"),this.updateLegacyMimetype(o);var a=n("<div>").addClass("path").text(o.path),r=n("<div>");r.addClass("avatar").css("display","inline-block").css("vertical-align","middle").css("margin","0 5px 2px 3px"),o.authorName?r.avatar(o.authorId,21,void 0,!1,void 0,o.authorName):r.avatar(o.authorId,21),e.find("td.info div.name").after(a).text(o.comment).prepend(n("<span>").addClass("path").css("margin-right","5px").text(o.authorName)).prepend(r),e.find("td.result a").attr("href",o.link),e.find("td.icon").css("background-image","url("+t.imagePath("core","actions/comment")+")").css("opacity",".4");var s=t.dirname(o.path);return s===o.path&&(s="/"),e.find("td.info a").attr("href",t.generateUrl("/apps/files/?dir={dir}&scrollto={scrollto}",{dir:s,scrollto:o.fileName})),e},this.handleCommentClick=function(e,n,i){return!o.fileAppLoaded()||"files"!==o.fileList.id||(o.fileList.changeDirectory(t.dirname(n.path)),o.fileList.scrollTo(n.name),!1)},this.updateLegacyMimetype=function(t){!t.mime&&t.mime_type&&(t.mime=t.mime_type)},this.setFileList=function(t){this.fileList=t},t.Plugins.register("OCA.Search.Core",this)},attach:function(t){t.setRenderer("comment",this.renderCommentResult.bind(this)),t.setHandler("comment",this.handleCommentClick.bind(this))}},e.Search.comment=new o}(OC,OCA,$)},function(t,e,n){var o,i,a;a=this,o=[n(0)],void 0===(i=function(t){return a.returnExportsGlobal=function(t){"use strict";var e,n,o,i,a,r,s,l;e=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.setPos=function(){return this.domInputor},e.prototype.getIEPosition=function(){return this.getPosition()},e.prototype.getPosition=function(){var t,e;return e=this.getOffset(),t=this.$inputor.offset(),e.left-=t.left,e.top-=t.top,e},e.prototype.getOldIEPos=function(){var t,e;return e=r.selection.createRange(),(t=r.body.createTextRange()).moveToElementText(this.domInputor),t.setEndPoint("EndToEnd",e),t.text.length},e.prototype.getPos=function(){var t,e,n;return(n=this.range())?((t=n.cloneRange()).selectNodeContents(this.domInputor),t.setEnd(n.endContainer,n.endOffset),e=t.toString().length,t.detach(),e):r.selection?this.getOldIEPos():void 0},e.prototype.getOldIEOffset=function(){var t,e;return(t=r.selection.createRange().duplicate()).moveStart("character",-1),{height:(e=t.getBoundingClientRect()).bottom-e.top,left:e.left,top:e.top}},e.prototype.getOffset=function(){var e,n,o,i,a;return s.getSelection&&(o=this.range())?(o.endOffset-1>0&&o.endContainer===!this.domInputor&&((e=o.cloneRange()).setStart(o.endContainer,o.endOffset-1),e.setEnd(o.endContainer,o.endOffset),n={height:(i=e.getBoundingClientRect()).height,left:i.left+i.width,top:i.top},e.detach()),n&&0!==(null!=n?n.height:void 0)||(e=o.cloneRange(),a=t(r.createTextNode("|")),e.insertNode(a[0]),e.selectNode(a[0]),n={height:(i=e.getBoundingClientRect()).height,left:i.left,top:i.top},a.remove(),e.detach())):r.selection&&(n=this.getOldIEOffset()),n&&(n.top+=t(s).scrollTop(),n.left+=t(s).scrollLeft()),n},e.prototype.range=function(){var t;if(s.getSelection)return(t=s.getSelection()).rangeCount>0?t.getRangeAt(0):null},e}(),n=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.getIEPos=function(){var t,e,n,o,i,a;return e=this.domInputor,o=0,(i=r.selection.createRange())&&i.parentElement()===e&&(n=e.value.replace(/\r\n/g,"\n").length,(a=e.createTextRange()).moveToBookmark(i.getBookmark()),(t=e.createTextRange()).collapse(!1),o=a.compareEndPoints("StartToEnd",t)>-1?n:-a.moveStart("character",-n)),o},e.prototype.getPos=function(){return r.selection?this.getIEPos():this.domInputor.selectionStart},e.prototype.setPos=function(t){var e,n;return e=this.domInputor,r.selection?((n=e.createTextRange()).move("character",t),n.select()):e.setSelectionRange&&e.setSelectionRange(t,t),e},e.prototype.getIEOffset=function(t){var e;return e=this.domInputor.createTextRange(),t||(t=this.getPos()),e.move("character",t),{left:e.boundingLeft,top:e.boundingTop,height:e.boundingHeight}},e.prototype.getOffset=function(e){var n,o,i;return n=this.$inputor,r.selection?((o=this.getIEOffset(e)).top+=t(s).scrollTop()+n.scrollTop(),o.left+=t(s).scrollLeft()+n.scrollLeft(),o):(o=n.offset(),i=this.getPosition(e),o={left:o.left+i.left-n.scrollLeft(),top:o.top+i.top-n.scrollTop(),height:i.height})},e.prototype.getPosition=function(t){var e,n,i,a,r;return e=this.$inputor,i=function(t){return t=t.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>"),/firefox/i.test(navigator.userAgent)&&(t=t.replace(/\s/g," ")),t},void 0===t&&(t=this.getPos()),r=e.val().slice(0,t),n=e.val().slice(t),a="<span style='position: relative; display: inline;'>"+i(r)+"</span>",a+="<span id='caret' style='position: relative; display: inline;'>|</span>",a+="<span style='position: relative; display: inline;'>"+i(n)+"</span>",new o(e).create(a).rect()},e.prototype.getIEPosition=function(t){var e,n;return n=this.getIEOffset(t),e=this.$inputor.offset(),{left:n.left-e.left,top:n.top-e.top,height:n.height}},e}(),o=function(){function e(t){this.$inputor=t}return e.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],e.prototype.mirrorCss=function(){var e,n=this;return e={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),t.each(this.css_attr,(function(t,o){return e[o]=n.$inputor.css(o)})),e},e.prototype.create=function(e){return this.$mirror=t("<div></div>"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(e),this.$inputor.after(this.$mirror),this},e.prototype.rect=function(){var t,e,n;return n={left:(e=(t=this.$mirror.find("#caret")).position()).left,top:e.top,height:t.height()},this.$mirror.remove(),n},e}(),i={contentEditable:function(t){return!(!t[0].contentEditable||"true"!==t[0].contentEditable)}},a={pos:function(t){return t||0===t?this.setPos(t):this.getPos()},position:function(t){return r.selection?this.getIEPosition(t):this.getPosition(t)},offset:function(t){return this.getOffset(t)}},r=null,s=null,l=function(t){var e;return(e=null!=t?t.iframe:void 0)?(s=e.contentWindow,r=e.contentDocument||s.document):(s=window,r=document)},t.fn.caret=function(o,r,s){var c;return a[o]?(t.isPlainObject(r)?(l(r),r=void 0):l(s),c=i.contentEditable(this)?new e(this):new n(this),a[o].apply(c,[r])):t.error("Method "+o+" does not exist on jQuery.caret")},t.fn.caret.EditableCaret=e,t.fn.caret.InputCaret=n,t.fn.caret.Utils=i,t.fn.caret.apis=a}(t)}.apply(e,o))||(t.exports=i)},function(t,e,n){var o,i;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=[n(0)],void 0===(i=function(t){return function(t){var e,n,o;n={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},e={beforeSave:function(t){return i.arrayToDefaultHash(t)},matcher:function(t,e,n,o){var i,a,r;return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n&&(t="(?:^|\\s)"+t),i=decodeURI("%C3%80"),a=decodeURI("%C3%BF"),(r=new RegExp(t+"([A-Za-z"+i+"-"+a+"0-9_"+(o?" ":"")+"'.+-]*)$|"+t+"([^\\x00-\\xff]*)$","gi").exec(e))?r[2]||r[1]:null},filter:function(t,e,n){var o,i,a,r;for(o=[],i=0,r=e.length;r>i;i++)a=e[i],~new String(a[n]).toLowerCase().indexOf(t.toLowerCase())&&o.push(a);return o},remoteFilter:null,sorter:function(t,e,n){var o,i,a,r;if(!t)return e;for(o=[],i=0,r=e.length;r>i;i++)(a=e[i]).atwho_order=new String(a[n]).toLowerCase().indexOf(t.toLowerCase()),a.atwho_order>-1&&o.push(a);return o.sort((function(t,e){return t.atwho_order-e.atwho_order}))},tplEval:function(t,e){var n;n=t;try{return"string"!=typeof t&&(n=t(e)),n.replace(/\$\{([^\}]*)\}/g,(function(t,n,o){return e[n]}))}catch(t){return""}},highlighter:function(t,e){var n;return e?(n=new RegExp(">\\s*([^<]*?)("+e.replace("+","\\+")+")([^<]*)\\s*<","ig"),t.replace(n,(function(t,e,n,o){return"> "+e+"<strong>"+n+"</strong>"+o+" <"}))):t},beforeInsert:function(t,e,n){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}},o=function(){function e(e){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=t(e),this.setupRootElement(),this.listen()}return e.prototype.createContainer=function(e){var n;return null!=(n=this.$el)&&n.remove(),t(e.body).append(this.$el=t("<div class='atwho-container'></div>"))},e.prototype.setupRootElement=function(e,n){var o,i;if(null==n&&(n=!1),e)this.window=e.contentWindow,this.document=e.contentDocument||this.window.document,this.iframe=e;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(i){if(o=i,this.iframe=null,t.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+o)}}return this.createContainer((this.iframeAsRoot=n)?this.document:document)},e.prototype.controller=function(t){var e,n,o,i;if(this.aliasMaps[t])n=this.controllers[this.aliasMaps[t]];else for(o in i=this.controllers)if(e=i[o],o===t){n=e;break}return n||this.controllers[this.currentFlag]},e.prototype.setContextFor=function(t){return this.currentFlag=t,this},e.prototype.reg=function(t,e){var n,o;return o=(n=this.controllers)[t]||(n[t]=this.$inputor.is("[contentEditable]")?new l(this,t):new s(this,t)),e.alias&&(this.aliasMaps[e.alias]=t),o.init(e),this},e.prototype.listen=function(){return this.$inputor.on("compositionstart",function(t){return function(e){var n;return null!=(n=t.controller())&&n.view.hide(),t.isComposing=!0,null}}(this)).on("compositionend",function(t){return function(e){return t.isComposing=!1,setTimeout((function(e){return t.dispatch(e)})),null}}(this)).on("keyup.atwhoInner",function(t){return function(e){return t.onKeyup(e)}}(this)).on("keydown.atwhoInner",function(t){return function(e){return t.onKeydown(e)}}(this)).on("blur.atwhoInner",function(t){return function(e){var n;return(n=t.controller())?(n.expectedQueryCBId=null,n.view.hide(e,n.getOpt("displayTimeout"))):void 0}}(this)).on("click.atwhoInner",function(t){return function(e){return t.dispatch(e)}}(this)).on("scroll.atwhoInner",function(t){return function(){var e;return e=t.$inputor.scrollTop(),function(n){var o,i;return o=n.target.scrollTop,e!==o&&null!=(i=t.controller())&&i.view.hide(n),e=o,!0}}}(this)())},e.prototype.shutdown=function(){var t,e;for(t in e=this.controllers)e[t].destroy(),delete this.controllers[t];return this.$inputor.off(".atwhoInner"),this.$el.remove()},e.prototype.dispatch=function(t){var e,n,o,i;for(e in i=[],o=this.controllers)n=o[e],i.push(n.lookUp(t));return i},e.prototype.onKeyup=function(e){var o;switch(e.keyCode){case n.ESC:e.preventDefault(),null!=(o=this.controller())&&o.view.hide();break;case n.DOWN:case n.UP:case n.CTRL:case n.ENTER:t.noop();break;case n.P:case n.N:e.ctrlKey||this.dispatch(e);break;default:this.dispatch(e)}},e.prototype.onKeydown=function(e){var o,i;if((i=null!=(o=this.controller())?o.view:void 0)&&i.visible())switch(e.keyCode){case n.ESC:e.preventDefault(),i.hide(e);break;case n.UP:e.preventDefault(),i.prev();break;case n.DOWN:e.preventDefault(),i.next();break;case n.P:if(!e.ctrlKey)return;e.preventDefault(),i.prev();break;case n.N:if(!e.ctrlKey)return;e.preventDefault(),i.next();break;case n.TAB:case n.ENTER:case n.SPACE:if(!i.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&e.keyCode===n.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&e.keyCode===n.TAB)return;i.highlighted()?(e.preventDefault(),i.choose(e)):i.hide(e);break;default:t.noop()}},e}();var i,r=[].slice;i=function(){function n(e,n){this.app=e,this.at=n,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=t("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=t("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new c(this),this.view=new m(this)}return n.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},n.prototype.init=function(e){return this.setting=t.extend({},this.setting||t.fn.atwho.default,e),this.view.init(),this.model.reload(this.setting.data)},n.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},n.prototype.callDefault=function(){var n,o,i,a;a=arguments[0],n=2<=arguments.length?r.call(arguments,1):[];try{return e[a].apply(this,n)}catch(i){return o=i,t.error(o+" Or maybe At.js doesn't have function "+a)}},n.prototype.trigger=function(t,e){var n,o;return null==e&&(e=[]),e.push(this),o=(n=this.getOpt("alias"))?t+"-"+n+".atwho":t+".atwho",this.$inputor.trigger(o,e)},n.prototype.callbacks=function(t){return this.getOpt("callbacks")[t]||e[t]},n.prototype.getOpt=function(t,e){try{return this.setting[t]}catch(t){return null}},n.prototype.insertContentFor=function(e){var n,o;return o=this.getOpt("insertTpl"),n=t.extend({},e.data("item-data"),{"atwho-at":this.at}),this.callbacks("tplEval").call(this,o,n,"onInsert")},n.prototype.renderView=function(t){var e;return e=this.getOpt("searchKey"),t=this.callbacks("sorter").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt("limit")))},n.arrayToDefaultHash=function(e){var n,o,i,a;if(!t.isArray(e))return e;for(a=[],n=0,i=e.length;i>n;n++)o=e[n],t.isPlainObject(o)?a.push(o):a.push({name:o});return a},n.prototype.lookUp=function(t){var e,n;if((!t||"click"!==t.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(n=this.getOpt("delay"))?this._delayLookUp(e,n):this._lookUp(e),e):(this.expectedQueryCBId=null,e)},n.prototype._delayLookUp=function(t,e){var n,o;return n=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=n),(o=e-(n-this.previousCallTime))>0&&e>o?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout(function(e){return function(){return e.previousCallTime=0,e.delayedCallTimeout=null,e._lookUp(t)}}(this),e)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(t))},n.prototype._stopDelayedCall=function(){return this.delayedCallTimeout?(clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null):void 0},n.prototype._generateQueryCBId=function(){return{}},n.prototype._lookUp=function(e){var n;return n=function(t,e){return t===this.expectedQueryCBId?e&&e.length>0?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide():void 0},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(e.text,t.proxy(n,this,this.expectedQueryCBId))},n}();var s,l,c,m,u,d=function(t,e){function n(){this.constructor=t}for(var o in e)h.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return d(n,e),n.prototype.catchQuery=function(){var t,e,n,o,i,a,r;return e=this.$inputor.val(),t=this.$inputor.caret("pos",{iframe:this.app.iframe}),r=e.slice(0,t),(o="string"==typeof(i=this.callbacks("matcher").call(this,this.at,r,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))))&&i.length<this.getOpt("minLen",0)?void 0:(o&&i.length<=this.getOpt("maxLen",20)?(n=(a=t-i.length)+i.length,this.pos=a,i={text:i,headPos:a,endPos:n},this.trigger("matched",[this.at,i.text])):(i=null,this.view.hide()),this.query=i)},n.prototype.rect=function(){var e,n,o;if(e=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(n=t(this.app.iframe).offset(),e.left+=n.left,e.top+=n.top),o=this.app.document.selection?0:2,{left:e.left,top:e.top,bottom:e.top+e.height+o}},n.prototype.insert=function(t,e){var n,o,i,a,r;return r=""+(i=(o=(n=this.$inputor).val()).slice(0,Math.max(this.query.headPos-this.at.length,0)))+(t+=a=""===(a=this.getOpt("suffix"))?a:a||" ")+o.slice(this.query.endPos||0),n.val(r),n.caret("pos",i.length+t.length,{iframe:this.app.iframe}),n.is(":focus")||n.focus(),n.change()},n}(i),d=function(t,e){function n(){this.constructor=t}for(var o in e)h.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty,l=function(e){function o(){return o.__super__.constructor.apply(this,arguments)}return d(o,e),o.prototype._getRange=function(){var t;return(t=this.app.window.getSelection()).rangeCount>0?t.getRangeAt(0):void 0},o.prototype._setRange=function(e,n,o){return null==o&&(o=this._getRange()),o&&n?(n=t(n)[0],"after"===e?(o.setEndAfter(n),o.setStartAfter(n)):(o.setEndBefore(n),o.setStartBefore(n)),o.collapse(!1),this._clearRange(o)):void 0},o.prototype._clearRange=function(t){var e;return null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed?(e.removeAllRanges(),e.addRange(t)):void 0},o.prototype._movingEvent=function(t){var e;return"click"===t.type||(e=t.which)===n.RIGHT||e===n.LEFT||e===n.UP||e===n.DOWN},o.prototype._unwrap=function(e){var n;return(n=(e=t(e).unwrap().get(0)).nextSibling)&&n.nodeValue&&(e.nodeValue+=n.nodeValue,t(n).remove()),e},o.prototype.catchQuery=function(e){var o,i,a,r,s,l,c,m,u,d,h,p;if((p=this._getRange())&&p.collapsed){if(e.which===n.ENTER)return(i=t(p.startContainer).closest(".atwho-query")).contents().unwrap(),i.is(":empty")&&i.remove(),(i=t(".atwho-query",this.app.document)).text(i.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(t(p.startContainer).is(this.$inputor))return void this._clearRange();e.which===n.BACKSPACE&&p.startContainer.nodeType===document.ELEMENT_NODE&&(u=p.startOffset-1)>=0?((a=p.cloneRange()).setStart(p.startContainer,u),t(a.cloneContents()).contents().last().is(".atwho-inserted")&&(s=t(p.startContainer).contents().get(u),this._setRange("after",t(s).contents().last()))):e.which===n.LEFT&&p.startContainer.nodeType===document.TEXT_NODE&&(o=t(p.startContainer.previousSibling)).is(".atwho-inserted")&&0===p.startOffset&&this._setRange("after",o.contents().last())}if(t(p.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),(i=t(".atwho-query",this.app.document)).length>0&&i.is(":empty")&&0===i.text().length&&i.remove(),this._movingEvent(e)||i.removeClass("atwho-inserted"),i.length>0)switch(e.which){case n.LEFT:return this._setRange("before",i.get(0),p),void i.removeClass("atwho-query");case n.RIGHT:return this._setRange("after",i.get(0).nextSibling,p),void i.removeClass("atwho-query")}if(i.length>0&&(h=i.attr("data-atwho-at-query"))&&(i.empty().html(h).attr("data-atwho-at-query",null),this._setRange("after",i.get(0),p)),(a=p.cloneRange()).setStart(p.startContainer,0),l="string"==typeof(m=this.callbacks("matcher").call(this,this.at,a.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===i.length&&l&&(r=p.startOffset-this.at.length-m.length)>=0&&(p.setStart(p.startContainer,r),i=t("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),p.surroundContents(i.get(0)),(c=i.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(p.setStart(c,c.length),p.setEnd(c,c.length),this._clearRange(p)):this._setRange("after",c,p))),!(l&&m.length<this.getOpt("minLen",0)))return l&&m.length<=this.getOpt("maxLen",20)?(d={text:m,el:i},this.trigger("matched",[this.at,d.text]),this.query=d):(this.view.hide(),this.query={el:i},i.text().indexOf(this.at)>=0&&(this._movingEvent(e)&&i.hasClass("atwho-inserted")?i.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,i)&&this._setRange("after",this._unwrap(i.text(i.text()).contents().first()))),null)}},o.prototype.rect=function(){var e,n;return(n=this.query.el.offset())&&this.query.el[0].getClientRects().length?(this.app.iframe&&!this.app.iframeAsRoot&&(e=t(this.app.iframe).offset(),n.left+=e.left-this.$inputor.scrollLeft(),n.top+=e.top-this.$inputor.scrollTop()),n.bottom=n.top+this.query.el.height(),n):void 0},o.prototype.insert=function(t,e){var n,o,i,a,r;return this.$inputor.is(":focus")||this.$inputor.focus(),(o=this.getOpt("functionOverrides")).insert?o.insert.call(this,t,e):(a=""===(a=this.getOpt("suffix"))?a:a||" ",n=e.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(t).attr("data-atwho-at-query",""+n["atwho-at"]+this.query.text).attr("contenteditable","false"),(i=this._getRange())&&(this.query.el.length&&i.setEndAfter(this.query.el[0]),i.collapse(!1),i.insertNode(r=this.app.document.createTextNode(""+a)),this._setRange("after",r,i)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},o}(i),c=function(){function e(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}return e.prototype.destroy=function(){return this.storage.data(this.at,null)},e.prototype.saved=function(){return this.fetch()>0},e.prototype.query=function(t,e){var n,o,i;return o=this.fetch(),i=this.context.getOpt("searchKey"),o=this.context.callbacks("filter").call(this.context,t,o,i)||[],n=this.context.callbacks("remoteFilter"),o.length>0||!n&&0===o.length?e(o):n.call(this.context,t,e)},e.prototype.fetch=function(){return this.storage.data(this.at)||[]},e.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,t||[]))},e.prototype.load=function(t){return!this.saved()&&t?this._load(t):void 0},e.prototype.reload=function(t){return this._load(t)},e.prototype._load=function(e){return"string"==typeof e?t.ajax(e,{dataType:"json"}).done(function(t){return function(e){return t.save(e)}}(this)):this.save(e)},e}(),m=function(){function e(e){this.context=e,this.$el=t("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return e.prototype.init=function(){var t,e;return e=this.context.getOpt("alias")||this.context.at.charCodeAt(0),(t=this.context.getOpt("headerTpl"))&&1===this.$el.children().length&&this.$el.prepend(t),this.$el.attr({id:"at-view-"+e})},e.prototype.destroy=function(){return this.$el.remove()},e.prototype.bindEvent=function(){var e,n,o;return e=this.$el.find("ul"),n=0,o=0,e.on("mousemove.atwho-view","li",(function(i){var a;if((n!==i.clientX||o!==i.clientY)&&(n=i.clientX,o=i.clientY,!(a=t(i.currentTarget)).hasClass("cur")))return e.find(".cur").removeClass("cur"),a.addClass("cur")})).on("click.atwho-view","li",function(n){return function(o){return e.find(".cur").removeClass("cur"),t(o.currentTarget).addClass("cur"),n.choose(o),o.preventDefault()}}(this))},e.prototype.visible=function(){return t.expr.filters.visible(this.$el[0])},e.prototype.highlighted=function(){return this.$el.find(".cur").length>0},e.prototype.choose=function(t){var e,n;return(e=this.$el.find(".cur")).length&&(n=this.context.insertContentFor(e),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,n,e,t),e),this.context.trigger("inserted",[e,t]),this.hide(t)),this.context.getOpt("hideWithoutSuffix")?this.stopShowing=!0:void 0},e.prototype.reposition=function(e){var n,o,i,a;return n=this.context.app.iframeAsRoot?this.context.app.window:window,e.bottom+this.$el.height()-t(n).scrollTop()>t(n).height()&&(e.bottom=e.top-this.$el.height()),e.left>(i=t(n).width()-this.$el.width()-5)&&(e.left=i),o={left:e.left,top:e.bottom},null!=(a=this.context.callbacks("beforeReposition"))&&a.call(this.context,o),this.$el.offset(o),this.context.trigger("reposition",[o])},e.prototype.next=function(){var t,e,n;return(t=this.$el.find(".cur").removeClass("cur").next()).length||(t=this.$el.find("li:first")),t.addClass("cur"),n=(e=t[0]).offsetTop+e.offsetHeight+(e.nextSibling?e.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},e.prototype.prev=function(){var t,e,n;return(e=this.$el.find(".cur").removeClass("cur").prev()).length||(e=this.$el.find("li:last")),e.addClass("cur"),t=(n=e[0]).offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,t-this.$el.height()))},e.prototype.scrollTop=function(t){var e;return(e=this.context.getOpt("scrollDuration"))?this.$elUl.animate({scrollTop:t},e):this.$elUl.scrollTop(t)},e.prototype.show=function(){var t;return this.stopShowing?void(this.stopShowing=!1):(this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(t=this.context.rect())?this.reposition(t):void 0)},e.prototype.hide=function(t,e){var n;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger("hidden",[t])):(n=function(t){return function(){return t.hide()}}(this),clearTimeout(this.timeoutID),this.timeoutID=setTimeout(n,e))},e.prototype.render=function(e){var n,o,i,a,r,s,l;if(t.isArray(e)&&e.length>0){for(this.$el.find("ul").empty(),o=this.$el.find("ul"),l=this.context.getOpt("displayTpl"),i=0,r=e.length;r>i;i++)a=e[i],a=t.extend({},a,{"atwho-at":this.context.at}),s=this.context.callbacks("tplEval").call(this.context,l,a,"onDisplay"),(n=t(this.context.callbacks("highlighter").call(this.context,s,this.context.query.text))).data("item-data",a),o.append(n);return this.show(),this.context.getOpt("highlightFirst")?o.find("li:first").addClass("cur"):void 0}this.hide()},e}(),u={load:function(t,e){var n;return(n=this.controller(t))?n.model.load(e):void 0},isSelecting:function(){var t;return!!(null!=(t=this.controller())?t.view.visible():void 0)},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;return(t=this.controller())?t.view.reposition(t.rect()):void 0},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},t.fn.atwho=function(e){var n,i;return n=arguments,i=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each((function(){var r,s;return(s=(r=t(this)).data("atwho"))||r.data("atwho",s=new o(this)),"object"!=a(e)&&e?u[e]&&s?i=u[e].apply(s,Array.prototype.slice.call(n,1)):t.error("Method "+e+" does not exist on jQuery.atwho"):s.reg(e.at,e)})),null!=i?i:this},t.fn.atwho.default={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:e,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},t.fn.atwho.debug=!1}(t)}.apply(e,o))||(t.exports=i)},function(t,e,n){var o=n(17);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n(2).default)("8e87fa8e",o,!0,{})},function(t,e,n){(e=n(1)(!1)).push([t.i,".atwho-view{position:absolute;top:0;left:0;display:none;margin-top:18px;background:var(--color-main-background);color:var(--color-main-text);border:1px solid var(--color-border);border-radius:var(--border-radius);box-shadow:0 0 5px var(--color-box-shadow);min-width:120px;z-index:11110 !important}.atwho-view .atwho-header{padding:5px;margin:5px;cursor:pointer;border-bottom:solid 1px var(--color-border);color:var(--color-main-text);font-size:11px;font-weight:bold}.atwho-view .atwho-header .small{color:var(--color-main-text);float:right;padding-top:2px;margin-right:-5px;font-size:12px;font-weight:normal}.atwho-view .atwho-header:hover{cursor:default}.atwho-view .cur{background:var(--color-primary);color:var(--color-primary-text)}.atwho-view .cur small{color:var(--color-primary-text)}.atwho-view strong{color:var(--color-main-text);font-weight:normal}.atwho-view .cur strong{color:var(--color-primary-text);font-weight:normal}.atwho-view ul{list-style:none;padding:0;margin:auto;max-height:200px;overflow-y:auto}.atwho-view ul li{display:block;padding:5px 10px;border-bottom:1px solid var(--color-border);cursor:pointer}.atwho-view small{font-size:smaller;color:var(--color-main-text);font-weight:normal}\n",""]),t.exports=e},function(t,e,n){var o=n(19);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n(2).default)("477a5c21",o,!0,{})},function(t,e,n){(e=n(1)(!1)).push([t.i,"#commentsTabView .emptycontent{margin-top:0}#commentsTabView .newCommentForm{margin-left:36px;position:relative}#commentsTabView .newCommentForm .message{width:100%;padding:10px;min-height:44px;margin:0;padding-right:30px}#commentsTabView .newCommentForm .submit,#commentsTabView .newCommentForm .submitLoading{width:44px;height:44px;margin:0;padding:13px;background-color:transparent;border:none;opacity:.3;position:absolute;bottom:0;right:0}#commentsTabView .deleteLoading{padding:14px;vertical-align:middle}#commentsTabView .newCommentForm .submit:not(:disabled):hover,#commentsTabView .newCommentForm .submit:not(:disabled):focus{opacity:1}#commentsTabView .newCommentForm div.message{resize:none}#commentsTabView .newCommentForm div.message:empty:before{content:attr(data-placeholder);color:grey}#commentsTabView .comment{position:relative;padding:10px 0 15px}#commentsTabView .comments .comment{border-top:1px solid var(--color-border)}#commentsTabView .comment .avatar,.atwho-view-ul * .avatar{width:32px;height:32px;line-height:32px;margin-right:5px}#commentsTabView .comment .message .avatar,.atwho-view-ul * .avatar{display:inline-block}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{white-space:pre-wrap}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{max-height:70px;overflow:hidden}#activityTabView li.comment .message-overlay,#commentsTabView .comment .message-overlay{display:none}#activityTabView li.comment.collapsed .message-overlay,#commentsTabView .comment.collapsed .message-overlay{display:block;position:absolute;z-index:2;height:50px;pointer-events:none;left:0;right:0;bottom:0;background:-moz-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-webkit-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-o-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-ms-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background-repeat:no-repeat}#commentsTabView .hidden{display:none !important}#commentsTabView .comment .authorRow{min-height:44px}#commentsTabView .comment .authorRow .tooltip{margin-top:5px}.atwho-view-ul * .avatar-name-wrapper,#commentsTabView .comment .authorRow{position:relative;display:inline-flex;align-items:center;width:100%}#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser),#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar,#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar img,#commentsTabView .comment .authorRow .avatar:not(.currentUser),#commentsTabView .comment .authorRow .author:not(.currentUser){cursor:pointer}.atwho-view-ul .avatar-name-wrapper,.atwho-view-ul .avatar-name-wrapper .avatar,.atwho-view-ul .avatar-name-wrapper .avatar img{cursor:pointer}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper{position:relative;display:inline;vertical-align:top;background-color:var(--color-background-dark);border-radius:50vh;padding:1px 7px 1px 1px;white-space:nowrap}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar{height:16px;width:16px;vertical-align:middle;padding:1px;margin-top:-3px;margin-left:0;margin-right:2px}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar img,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar img{vertical-align:top}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper strong,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper strong{font-weight:bold}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper.currentUser,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper.currentUser{background-color:var(--color-primary);color:var(--color-primary-text)}.atwho-view-ul * .avatar-name-wrapper{white-space:nowrap}#commentsTabView .comment .author,#commentsTabView .comment .date{opacity:.5}#commentsTabView .comment .author{max-width:210px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#commentsTabView .comment .date{margin-left:auto;padding:10px 0px}#commentsTabView .comments>li:not(.newCommentRow) .message{padding-left:40px;word-wrap:break-word;overflow-wrap:break-word}#commentsTabView .comment .action{opacity:0.3;padding:14px;display:block}#commentsTabView .comment .action:hover,#commentsTabView .comment .action:focus{opacity:1}#commentsTabView .newCommentRow .action-container{margin-left:auto}#commentsTabView .comment.disabled .message{opacity:0.3}#commentsTabView .comment.disabled .action{display:none}#commentsTabView .message.error{color:#e9322d;border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.app-files .action-comment{padding:16px 14px}#commentsTabView .comment .message .contactsmenu-popover{left:-6px;top:24px}\n",""]),t.exports=e}]); //# sourceMappingURL=comments.js.map
\ No newline at end of file diff --git a/apps/comments/js/comments.js.map b/apps/comments/js/comments.js.map index ead2472455b..ca143b43ff6 100644 --- a/apps/comments/js/comments.js.map +++ b/apps/comments/js/comments.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"jQuery\"","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js","webpack:///./apps/comments/src/comments.js","webpack:///./apps/comments/src/app.js","webpack:///./apps/comments/src/templates.js","webpack:///./apps/comments/src/commentmodel.js","webpack:///./apps/comments/src/commentcollection.js","webpack:///./apps/comments/src/commentsummarymodel.js","webpack:///./apps/comments/src/commentstabview.js","webpack:///./apps/comments/src/commentsmodifymenu.js","webpack:///./apps/comments/src/filesplugin.js","webpack:///./apps/comments/src/activitytabviewplugin.js","webpack:///./apps/comments/src/search.js","webpack:///./apps/comments/src/vendor/Caret.js/dist/jquery.caret.min.js","webpack:///./apps/comments/src/vendor/At.js/dist/js/jquery.atwho.min.js","webpack:///./apps/comments/src/style/autocomplete.scss?75bd","webpack:///./apps/comments/src/style/autocomplete.scss","webpack:///./apps/comments/src/style/comments.scss?fd56","webpack:///./apps/comments/src/style/comments.scss"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","jQuery","useSourceMap","list","toString","this","map","item","content","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","data","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","length","push","listToStyles","parentId","styles","newStyles","id","part","css","media","parts","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","noop","options","isOldIE","navigator","test","userAgent","toLowerCase","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","type","appendChild","obj","update","remove","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","filter","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild","window","OCA","Comments","template","templates","Handlebars","Templates","container","depth0","helpers","partials","helper","escapeExpression","actorId","helperMissing","nullContext","stack1","alias1","alias2","alias3","alias4","isUnread","program","isLong","isUserAuthor","actorDisplayName","timestamp","altDate","date","formattedMessage","iconClass","displayName","each","items","cancelText","tag","isEditMode","newMessagePlaceholder","message","submitText","countMessage","iconUrl","emptyResultLabel","moreLabel","OC","_","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_MESSAGE","PROPERTY_ACTORTYPE","PROPERTY_ACTORID","PROPERTY_ISUNREAD","PROPERTY_OBJECTID","PROPERTY_OBJECTTYPE","PROPERTY_ACTORDISPLAYNAME","PROPERTY_CREATIONDATETIME","PROPERTY_MENTIONS","CommentModel","Backbone","Model","sync","davSync","defaults","actorType","objectType","davProperties","parse","creationDateTime","objectId","mentions","_parseMentions","isUndefined","result","mention","localName","child","nextSibling","startsWith","textContent","CommentCollection","Collection","model","_objectType","_objectId","_endReached","_limit","initialize","models","url","linkToRemote","setObjectId","hasMoreResults","reset","_summaryModel","apply","arguments","fetchNext","self","body","success","resp","initial","set","trigger","getSummaryModel","CommentSummaryModel","updateReadMarker","save","readMarker","Date","toUTCString","PROPERTY_READMARKER","attrs","CommentsTabView","DetailTabView","className","_autoCompleteData","undefined","_commentsModifyMenu","events","_commentMaxLength","collection","on","_onRequest","_onEndRequest","_onAddModel","_onChangeModel","_commentMaxThreshold","bindAll","params","currentUser","getCurrentUser","uid","editCommentTemplate","commentTemplate","editTooltip","_isLong","getLabel","getIcon","setFileInfo","fileInfo","render","_initAutoComplete","$","find","silent","nextPage","$el","html","before","tooltip","$container","avatar","delegateEvents","_onTypeComment","autosize","focus","$target","limit","appConfig","comments","maxAutoCompleteResults","atwho","at","callbacks","remoteFilter","_onAutoComplete","highlighter","li","$li","sorter","q","displayTpl","escapeHTML","label","insertTpl","searchKey","je","_postRenderItem","target","parent","query","callback","_autoCompleteRequestTimer","clearTimeout","delay","_autoCompleteRequestCall","abort","ajax","linkToOCS","search","itemType","itemId","beforeSend","request","setRequestHeader","ocs","_formatItem","commentModel","getTime","Util","relativeModifiedDate","formatDate","_formatMessage","attributes","_toggleLoading","state","_loading","toggleClass","addClass","fileInfoModel","findWhere","$comment","eq","append","text","prop","oldMentions","fetch","isEqual","$updated","trim","previous","$row","closest","removeClass","$message","editionMode","inlineAvatars","context","hasClass","$this","attr","username","contactsMenu","modifyCommentMenu","CommentsModifyMenu","show","listenTo","ev","action","_onClickEditComment","_onClickDeleteComment","_postRenderMessage","user","editMode","replace","mentionId","indexOf","escape","regex","RegExp","_composeHTMLMention","mentionDisplayName","match","p1","OCP","plainToRich","preventDefault","commentId","commentToEdit","$formRow","after","replaceWith","clone","$field","len","$submitButton","count","max","limitExceeded","keyCode","shiftKey","click","_onClickComment","is","_onClickCloseComment","$loading","$moreIcon","destroy","error","Notification","showTemporary","_onClickShowMore","_onSubmitSuccess","$form","$submit","_commentBodyHTML2Plain","oldHtml","$inserted","userId","richToPlain","_onSubmitComment","e","$commentField","_onSubmitError","verb","wait","_onTextChange","empty","_onPaste","originalEvent","clipboardData","getData","execCommand","View","tagName","_scopes","_onClickAction","event","currentTarget","hideMenus","_context","active","offsetIcon","offset","offsetContainer","position","top","left","right","width","showMenu","PROPERTY_COMMENTS_UNREAD","FilesPlugin","ignoreLists","_formatCommentCount","imagePath","attach","fileList","registerTabView","oldGetWebdavProperties","_getWebdavProperties","props","filesClient","addFileInfoParser","response","commentsUnread","propStat","properties","parseInt","oldCreateRow","_createRow","fileData","$tr","fileActions","registerAction","$file","unread","mime","order","permissions","PERMISSION_READ","FileActions","TYPE_INLINE","actionSpec","isDefault","unreadComments","$actionLink","actionHandler","fileName","showDetailsView","oldElementToFile","elementToFile","Plugins","register","ActivityTabViewPlugin","prepareModelForDisplay","view","$overlay","_onClickCollapsedComment","Comment","fileAppLoaded","App","renderCommentResult","$nofilterresults","updateLegacyMimetype","$pathDiv","path","$avatar","authorName","authorId","comment","prepend","link","dir","dirname","generateUrl","scrollto","handleCommentClick","changeDirectory","scrollTo","mime_type","setFileList","setRenderer","setHandler","Search","a","define","returnExportsGlobal","b","g","h","$inputor","domInputor","setPos","getIEPosition","getPosition","getOffset","getOldIEPos","selection","createRange","createTextRange","moveToElementText","setEndPoint","getPos","range","cloneRange","selectNodeContents","setEnd","endContainer","endOffset","detach","getOldIEOffset","duplicate","moveStart","height","getBoundingClientRect","bottom","f","getSelection","setStart","insertNode","selectNode","scrollTop","scrollLeft","rangeCount","getRangeAt","getIEPos","parentElement","moveToBookmark","getBookmark","collapse","compareEndPoints","selectionStart","move","select","setSelectionRange","getIEOffset","boundingLeft","boundingTop","boundingHeight","val","slice","rect","css_attr","mirrorCss","zIndex","$mirror","contentEditable","pos","iframe","contentWindow","contentDocument","fn","caret","isPlainObject","EditableCaret","InputCaret","Utils","apis","ESC","TAB","ENTER","CTRL","A","P","N","LEFT","UP","RIGHT","DOWN","BACKSPACE","SPACE","beforeSave","arrayToDefaultHash","matcher","decodeURI","exec","String","atwho_order","sort","tplEval","beforeInsert","beforeReposition","afterMatchFailed","currentFlag","controllers","aliasMaps","setupRootElement","listen","createContainer","ownerDocument","defaultView","parentWindow","frameElement","debug","iframeAsRoot","controller","setContextFor","reg","alias","init","hide","isComposing","setTimeout","dispatch","onKeyup","onKeydown","expectedQueryCBId","getOpt","shutdown","off","lookUp","ctrlKey","visible","prev","next","highlighted","choose","app","setting","u","Math","random","substr","reload","callDefault","insertContentFor","renderView","isArray","catchQuery","_delayLookUp","_lookUp","now","previousCallTime","_stopDelayedCall","delayedCallTimeout","_generateQueryCBId","constructor","proxy","__super__","headPos","endPos","insert","change","_getRange","_setRange","setEndAfter","setStartAfter","setEndBefore","setStartBefore","_clearRange","ctrl_a_pressed","removeAllRanges","addRange","_movingEvent","which","_unwrap","unwrap","nodeValue","collapsed","startContainer","contents","last","nodeType","ELEMENT_NODE","startOffset","cloneContents","TEXT_NODE","previousSibling","siblings","surroundContents","el","first","getClientRects","storage","saved","load","_load","dataType","done","$elUl","children","timeoutID","bindEvent","charCodeAt","clientX","clientY","expr","filters","stopShowing","reposition","offsetTop","offsetHeight","animate","isNaN","isSelecting","setIframe","run","Array","headerTpl","functionOverrides","suffix","hideWithoutSuffix","startWithSpace","acceptSpaceBar","highlightFirst","maxLen","minLen","displayTimeout","spaceSelectsMatch","tabSelectsMatch","editableAtwhoQueryAttrs","scrollDuration","suspendOnComposing","lookUpOnClick","locals","add","default","___CSS_LOADER_API_IMPORT___"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAE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gBAAe,EAAG3c,MAAM,EAAE4c,OAAO,GAAGC,OAAO,EAAEC,eAAe,IAAInb,MAAM,KAAKob,mBAAkB,EAAGC,iBAAgB,EAAGC,wBAAwB,GAAGC,eAAe,IAAIC,oBAAmB,EAAGC,eAAc,GAAIjuB,EAAE+jB,GAAG9S,MAAMwV,OAAM,EAAx6nBrN,CAAEpZ,IAAjC,4B,gBCG3D,IAAIqB,EAAU,EAAQ,IACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACxC,EAAOC,EAAIuC,EAAS,MAC7DA,EAAQ6sB,SAAQrvB,EAAOD,QAAUyC,EAAQ6sB,SAG/BC,EADH,EAAQ,GAAqEC,SACtE,WAAY/sB,GAAS,EAAM,K,iBCN5CzC,EADkC,EAAQ,EAChCyvB,EAA4B,IAE9B5rB,KAAK,CAAC5D,EAAOC,EAAI,gsCAAisC,KAE1tCD,EAAOD,QAAUA,G,gBCHjB,IAAIyC,EAAU,EAAQ,IACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACxC,EAAOC,EAAIuC,EAAS,MAC7DA,EAAQ6sB,SAAQrvB,EAAOD,QAAUyC,EAAQ6sB,SAG/BC,EADH,EAAQ,GAAqEC,SACtE,WAAY/sB,GAAS,EAAM,K,iBCN5CzC,EADkC,EAAQ,EAChCyvB,EAA4B,IAE9B5rB,KAAK,CAAC5D,EAAOC,EAAI,krKAAmrK,KAE5sKD,EAAOD,QAAUA","file":"comments.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","module.exports = jQuery;","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n for (var i = 0; i < modules.length; i++) {\n var item = [].concat(modules[i]);\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n","import './app'\nimport './templates'\nimport './commentmodel'\nimport './commentcollection'\nimport './commentsummarymodel'\nimport './commentstabview'\nimport './commentsmodifymenu'\nimport './filesplugin'\nimport './activitytabviewplugin'\nimport './search'\n\nimport './vendor/Caret.js/dist/jquery.caret.min'\nimport './vendor/At.js/dist/js/jquery.atwho.min'\n\nimport './style/autocomplete.scss'\nimport './style/comments.scss'\n\nwindow.OCA.Comments = OCA.Comments\n","/*\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n})()\n","(function() {\n var template = Handlebars.template, templates = OCA.Comments.Templates = OCA.Comments.Templates || {};\ntemplates['comment'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" unread\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \" collapsed\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \" currentUser\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"data-username=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.actorId || (depth0 != null ? depth0.actorId : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"actorId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"\";\n},\"9\":function(container,depth0,helpers,partials,data) {\n return \"\t\t\t<a href=\\\"#\\\" class=\\\"action more icon icon-more has-tooltip\\\"></a>\\n\t\t\t<div class=\\\"deleteLoading icon-loading-small hidden\\\"></div>\\n\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n return \"\t\t<div class=\\\"message-overlay\\\"></div>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<li class=\\\"comment\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUnread : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isLong : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t<div class=\\\"authorRow\\\">\\n\t\t<div class=\\\"avatar\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.actorId : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"> </div>\\n\t\t<div class=\\\"author\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"actorDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<div class=\\\"date has-tooltip live-relative-timestamp\\\" data-timestamp=\\\"\"\n + alias4(((helper = (helper = helpers.timestamp || (depth0 != null ? depth0.timestamp : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"timestamp\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.altDate || (depth0 != null ? depth0.altDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"altDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.date || (depth0 != null ? depth0.date : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"date\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\t</div>\\n\t<div class=\\\"message\\\">\"\n + ((stack1 = ((helper = (helper = helpers.formattedMessage || (depth0 != null ? depth0.formattedMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"formattedMessage\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</div>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isLong : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</li>\\n\";\n},\"useData\":true});\ntemplates['commentsmodifymenu'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"menuitem action \"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \" permanent\\\" data-action=\\\"\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.iconClass : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.program(4, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t<span>\"\n + alias4(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"displayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t</a>\\n\t\t</li>\\n\";\n},\"2\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t\t\t\t<span class=\\\"icon \"\n + container.escapeExpression(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"iconClass\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></span>\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n return \"\t\t\t\t\t<span class=\\\"no-icon\\\"></span>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \"<ul>\\n\"\n + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.items : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</ul>\\n\";\n},\"useData\":true});\ntemplates['edit_comment'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t\t<div class=\\\"action-container\\\">\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"action cancel icon icon-close has-tooltip\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.cancelText || (depth0 != null ? depth0.cancelText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"cancelText\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t\t</div>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<\"\n + alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"tag\",\"hash\":{},\"data\":data}) : helper)))\n + \" class=\\\"newCommentRow comment\\\" data-id=\\\"\"\n + alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t<div class=\\\"authorRow\\\">\\n\t\t<div class=\\\"avatar currentUser\\\" data-username=\\\"\"\n + alias4(((helper = (helper = helpers.actorId || (depth0 != null ? depth0.actorId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"actorId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></div>\\n\t\t<div class=\\\"author currentUser\\\">\"\n + alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"actorDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isEditMode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t</div>\\n\t<form class=\\\"newCommentForm\\\">\\n\t\t<div contentEditable=\\\"true\\\" class=\\\"message\\\" data-placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.newMessagePlaceholder || (depth0 != null ? depth0.newMessagePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newMessagePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"message\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\t\t<input class=\\\"submit icon-confirm has-tooltip\\\" type=\\\"submit\\\" value=\\\"\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.submitText || (depth0 != null ? depth0.submitText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"submitText\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t<div class=\\\"submitLoading icon-loading-small hidden\\\"></div>\\n\t</form>\\n</\"\n + alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"tag\",\"hash\":{},\"data\":data}) : helper)))\n + \">\\n\";\n},\"useData\":true});\ntemplates['filesplugin'] = template({\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<a class=\\\"action action-comment permanent\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.countMessage || (depth0 != null ? depth0.countMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"countMessage\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" href=\\\"#\\\">\\n\t<img class=\\\"svg\\\" src=\\\"\"\n + alias4(((helper = (helper = helpers.iconUrl || (depth0 != null ? depth0.iconUrl : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"iconUrl\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n</a>\\n\";\n},\"useData\":true});\ntemplates['view'] = template({\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<ul class=\\\"comments\\\">\\n</ul>\\n<div class=\\\"emptycontent hidden\\\"><div class=\\\"icon-comment\\\"></div>\\n\t<p>\"\n + alias4(((helper = (helper = helpers.emptyResultLabel || (depth0 != null ? depth0.emptyResultLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"emptyResultLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p></div>\\n<input type=\\\"button\\\" class=\\\"showMore hidden\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.moreLabel || (depth0 != null ? depth0.moreLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"moreLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" name=\\\"show-more\\\" id=\\\"show-more\\\" />\\n<div class=\\\"loading hidden\\\" style=\\\"height: 50px\\\"></div>\\n\";\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC, OCA) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_MESSAGE: '{' + OC.Files.Client.NS_OWNCLOUD + '}message',\n\t\tPROPERTY_ACTORTYPE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}actorType',\n\t\tPROPERTY_ACTORID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}actorId',\n\t\tPROPERTY_ISUNREAD:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}isUnread',\n\t\tPROPERTY_OBJECTID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}objectId',\n\t\tPROPERTY_OBJECTTYPE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}objectType',\n\t\tPROPERTY_ACTORDISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}actorDisplayName',\n\t\tPROPERTY_CREATIONDATETIME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}creationDateTime',\n\t\tPROPERTY_MENTIONS: '{' + OC.Files.Client.NS_OWNCLOUD + '}mentions',\n\t})\n\n\t/**\n\t * @class OCA.Comments.CommentModel\n\t * @classdesc\n\t *\n\t * Comment\n\t *\n\t */\n\tconst CommentModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.Comments.CommentModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tactorType: 'users',\n\t\t\t\tobjectType: 'files',\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t\t'message':\tOC.Files.Client.PROPERTY_MESSAGE,\n\t\t\t\t'actorType':\tOC.Files.Client.PROPERTY_ACTORTYPE,\n\t\t\t\t'actorId':\tOC.Files.Client.PROPERTY_ACTORID,\n\t\t\t\t'actorDisplayName':\tOC.Files.Client.PROPERTY_ACTORDISPLAYNAME,\n\t\t\t\t'creationDateTime':\tOC.Files.Client.PROPERTY_CREATIONDATETIME,\n\t\t\t\t'objectType':\tOC.Files.Client.PROPERTY_OBJECTTYPE,\n\t\t\t\t'objectId':\tOC.Files.Client.PROPERTY_OBJECTID,\n\t\t\t\t'isUnread':\tOC.Files.Client.PROPERTY_ISUNREAD,\n\t\t\t\t'mentions': OC.Files.Client.PROPERTY_MENTIONS,\n\t\t\t},\n\n\t\t\tparse: function(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tmessage: data.message,\n\t\t\t\t\tactorType: data.actorType,\n\t\t\t\t\tactorId: data.actorId,\n\t\t\t\t\tactorDisplayName: data.actorDisplayName,\n\t\t\t\t\tcreationDateTime: data.creationDateTime,\n\t\t\t\t\tobjectType: data.objectType,\n\t\t\t\t\tobjectId: data.objectId,\n\t\t\t\t\tisUnread: (data.isUnread === 'true'),\n\t\t\t\t\tmentions: this._parseMentions(data.mentions),\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_parseMentions: function(mentions) {\n\t\t\t\tif (_.isUndefined(mentions)) {\n\t\t\t\t\treturn {}\n\t\t\t\t}\n\t\t\t\tconst result = {}\n\t\t\t\tfor (const i in mentions) {\n\t\t\t\t\tconst mention = mentions[i]\n\t\t\t\t\tif (_.isUndefined(mention.localName) || mention.localName !== 'mention') {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tresult[i] = {}\n\t\t\t\t\tfor (let child = mention.firstChild; child; child = child.nextSibling) {\n\t\t\t\t\t\tif (_.isUndefined(child.localName) || !child.localName.startsWith('mention')) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult[i][child.localName] = child.textContent\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result\n\t\t\t},\n\t\t})\n\n\tOCA.Comments.CommentModel = CommentModel\n})(OC, OCA)\n","/* eslint-disable */\n/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC, OCA) {\n\n\t/**\n\t * @class OCA.Comments.CommentCollection\n\t * @classdesc\n\t *\n\t * Collection of comments assigned to a file\n\t *\n\t */\n\tvar CommentCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OCA.Comments.CommentCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OCA.Comments.CommentModel,\n\n\t\t\t/**\n\t\t * Object type\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\t/**\n\t\t * Object id\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t * True if there are no more page results left to fetch\n\t\t *\n\t\t * @type bool\n\t\t */\n\t\t\t_endReached: false,\n\n\t\t\t/**\n\t\t * Number of comments to fetch per page\n\t\t *\n\t\t * @type int\n\t\t */\n\t\t\t_limit: 20,\n\n\t\t\t/**\n\t\t * Initializes the collection\n\t\t *\n\t\t * @param {string} [options.objectType] object type\n\t\t * @param {string} [options.objectId] object id\n\t\t */\n\t\t\tinitialize: function(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (options.objectType) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t\tif (options.objectId) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t},\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/comments/'\n\t\t\t\t+ encodeURIComponent(this._objectType) + '/'\n\t\t\t\t+ encodeURIComponent(this._objectId) + '/'\n\t\t\t},\n\n\t\t\tsetObjectId: function(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\thasMoreResults: function() {\n\t\t\t\treturn !this._endReached\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis._endReached = false\n\t\t\t\tthis._summaryModel = null\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Fetch the next set of results\n\t\t */\n\t\t\tfetchNext: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\tif (!this.hasMoreResults()) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\n\t\t\t\tvar body = '<?xml version=\"1.0\" encoding=\"utf-8\" ?>\\n'\n\t\t\t\t+ '<oc:filter-comments xmlns:D=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\\n'\n\t\t\t\t// load one more so we know there is more\n\t\t\t\t+ ' <oc:limit>' + (this._limit + 1) + '</oc:limit>\\n'\n\t\t\t\t+ ' <oc:offset>' + this.length + '</oc:offset>\\n'\n\t\t\t\t+ '</oc:filter-comments>\\n'\n\n\t\t\t\toptions = options || {}\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({\n\t\t\t\t\tremove: false,\n\t\t\t\t\tparse: true,\n\t\t\t\t\tdata: body,\n\t\t\t\t\tdavProperties: CommentCollection.prototype.model.prototype.davProperties,\n\t\t\t\t\tsuccess: function(resp) {\n\t\t\t\t\t\tif (resp.length <= self._limit) {\n\t\t\t\t\t\t// no new entries, end reached\n\t\t\t\t\t\t\tself._endReached = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t// remove last entry, for next page load\n\t\t\t\t\t\t\tresp = _.initial(resp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!self.set(resp, options)) {\n\t\t\t\t\t\t\treturn false\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) {\n\t\t\t\t\t\t\tsuccess.apply(null, arguments)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tself.trigger('sync', 'REPORT', self, options)\n\t\t\t\t\t}\n\t\t\t\t}, options)\n\n\t\t\t\treturn this.sync('REPORT', this, options)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Returns the matching summary model\n\t\t *\n\t\t * @returns {OCA.Comments.CommentSummaryModel} summary model\n\t\t */\n\t\t\tgetSummaryModel: function() {\n\t\t\t\tif (!this._summaryModel) {\n\t\t\t\t\tthis._summaryModel = new OCA.Comments.CommentSummaryModel({\n\t\t\t\t\t\tid: this._objectId,\n\t\t\t\t\t\tobjectType: this._objectType\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\treturn this._summaryModel\n\t\t\t},\n\n\t\t\t/**\n\t\t * Updates the read marker for this comment thread\n\t\t *\n\t\t * @param {Date} [date] optional date, defaults to now\n\t\t * @param {Object} [options] backbone options\n\t\t */\n\t\t\tupdateReadMarker: function(date, options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\treturn this.getSummaryModel().save({\n\t\t\t\t\treadMarker: (date || new Date()).toUTCString()\n\t\t\t\t}, options)\n\t\t\t}\n\t\t})\n\n\tOCA.Comments.CommentCollection = CommentCollection\n})(OC, OCA)\n","/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC, OCA) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_READMARKER:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}readMarker',\n\t})\n\n\t/**\n\t * @class OCA.Comments.CommentSummaryModel\n\t * @classdesc\n\t *\n\t * Model containing summary information related to comments\n\t * like the read marker.\n\t *\n\t */\n\tconst CommentSummaryModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.Comments.CommentSummaryModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t * Object type\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\t/**\n\t\t * Object id\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\tdavProperties: {\n\t\t\t\t'readMarker': OC.Files.Client.PROPERTY_READMARKER,\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Initializes the summary model\n\t\t\t *\n\t\t\t * @param {any} [attrs] ignored\n\t\t\t * @param {Object} [options] destructuring object\n\t\t\t * @param {string} [options.objectType] object type\n\t\t\t * @param {string} [options.objectId] object id\n\t\t\t */\n\t\t\tinitialize: function(attrs, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (options.objectType) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/comments/'\n\t\t\t\t+ encodeURIComponent(this._objectType) + '/'\n\t\t\t\t+ encodeURIComponent(this.id) + '/'\n\t\t\t},\n\t\t})\n\n\tOCA.Comments.CommentSummaryModel = CommentSummaryModel\n})(OC, OCA)\n","/* eslint-disable */\n/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars, escapeHTML */\n\n(function(OC, OCA) {\n\n\t/**\n\t * @memberof OCA.Comments\n\t */\n\tvar CommentsTabView = OCA.Files.DetailTabView.extend(\n\t\t/** @lends OCA.Comments.CommentsTabView.prototype */ {\n\t\t\tid: 'commentsTabView',\n\t\t\tclassName: 'tab commentsTabView',\n\t\t\t_autoCompleteData: undefined,\n\t\t\t_commentsModifyMenu: undefined,\n\n\t\t\tevents: {\n\t\t\t\t'submit .newCommentForm': '_onSubmitComment',\n\t\t\t\t'click .showMore': '_onClickShowMore',\n\t\t\t\t'click .cancel': '_onClickCloseComment',\n\t\t\t\t'click .comment': '_onClickComment',\n\t\t\t\t'keyup div.message': '_onTextChange',\n\t\t\t\t'change div.message': '_onTextChange',\n\t\t\t\t'input div.message': '_onTextChange',\n\t\t\t\t'paste div.message': '_onPaste'\n\t\t\t},\n\n\t\t\t_commentMaxLength: 1000,\n\n\t\t\tinitialize: function() {\n\t\t\t\tOCA.Files.DetailTabView.prototype.initialize.apply(this, arguments)\n\t\t\t\tthis.collection = new OCA.Comments.CommentCollection()\n\t\t\t\tthis.collection.on('request', this._onRequest, this)\n\t\t\t\tthis.collection.on('sync', this._onEndRequest, this)\n\t\t\t\tthis.collection.on('add', this._onAddModel, this)\n\t\t\t\tthis.collection.on('change:message', this._onChangeModel, this)\n\n\t\t\t\tthis._commentMaxThreshold = this._commentMaxLength * 0.9\n\n\t\t\t\t// TODO: error handling\n\t\t\t\t_.bindAll(this, '_onTypeComment', '_initAutoComplete', '_onAutoComplete')\n\t\t\t},\n\n\t\t\ttemplate: function(params) {\n\t\t\t\tvar currentUser = OC.getCurrentUser()\n\t\t\t\treturn OCA.Comments.Templates['view'](_.extend({\n\t\t\t\t\tactorId: currentUser.uid,\n\t\t\t\t\tactorDisplayName: currentUser.displayName\n\t\t\t\t}, params))\n\t\t\t},\n\n\t\t\teditCommentTemplate: function(params) {\n\t\t\t\tvar currentUser = OC.getCurrentUser()\n\t\t\t\treturn OCA.Comments.Templates['edit_comment'](_.extend({\n\t\t\t\t\tactorId: currentUser.uid,\n\t\t\t\t\tactorDisplayName: currentUser.displayName,\n\t\t\t\t\tnewMessagePlaceholder: t('comments', 'New comment …'),\n\t\t\t\t\tsubmitText: t('comments', 'Post'),\n\t\t\t\t\tcancelText: t('comments', 'Cancel'),\n\t\t\t\t\ttag: 'li'\n\t\t\t\t}, params))\n\t\t\t},\n\n\t\t\tcommentTemplate: function(params) {\n\t\t\t\tparams = _.extend({\n\t\t\t\t\teditTooltip: t('comments', 'Edit comment'),\n\t\t\t\t\tisUserAuthor: OC.getCurrentUser().uid === params.actorId,\n\t\t\t\t\tisLong: this._isLong(params.message)\n\t\t\t\t}, params)\n\n\t\t\t\tif (params.actorType === 'deleted_users') {\n\t\t\t\t// makes the avatar a X\n\t\t\t\t\tparams.actorId = null\n\t\t\t\t\tparams.actorDisplayName = t('comments', '[Deleted user]')\n\t\t\t\t}\n\n\t\t\t\treturn OCA.Comments.Templates['comment'](params)\n\t\t\t},\n\n\t\t\tgetLabel: function() {\n\t\t\t\treturn t('comments', 'Comments')\n\t\t\t},\n\n\t\t\tgetIcon: function() {\n\t\t\t\treturn 'icon-comment'\n\t\t\t},\n\n\t\t\tsetFileInfo: function(fileInfo) {\n\t\t\t\tif (fileInfo) {\n\t\t\t\t\tthis.model = fileInfo\n\n\t\t\t\t\tthis.render()\n\t\t\t\t\tthis._initAutoComplete($('#commentsTabView').find('.newCommentForm .message'))\n\t\t\t\t\tthis.collection.setObjectId(this.model.id)\n\t\t\t\t\t// reset to first page\n\t\t\t\t\tthis.collection.reset([], { silent: true })\n\t\t\t\t\tthis.nextPage()\n\t\t\t\t} else {\n\t\t\t\t\tthis.model = null\n\t\t\t\t\tthis.render()\n\t\t\t\t\tthis.collection.reset()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\trender: function() {\n\t\t\t\tthis.$el.html(this.template({\n\t\t\t\t\temptyResultLabel: t('comments', 'No comments yet, start the conversation!'),\n\t\t\t\t\tmoreLabel: t('comments', 'More comments …')\n\t\t\t\t}))\n\t\t\t\tthis.$el.find('.comments').before(this.editCommentTemplate({ tag: 'div' }))\n\t\t\t\tthis.$el.find('.has-tooltip').tooltip()\n\t\t\t\tthis.$container = this.$el.find('ul.comments')\n\t\t\t\tthis.$el.find('.avatar').avatar(OC.getCurrentUser().uid, 32)\n\t\t\t\tthis.delegateEvents()\n\t\t\t\tthis.$el.find('.message').on('keydown input change', this._onTypeComment)\n\n\t\t\t\tautosize(this.$el.find('.newCommentRow .message'))\n\t\t\t\tthis.$el.find('.newCommentForm .message').focus()\n\t\t\t},\n\n\t\t\t_initAutoComplete: function($target) {\n\t\t\t\tvar s = this\n\t\t\t\tvar limit = 10\n\t\t\t\tif (!_.isUndefined(OC.appConfig.comments)) {\n\t\t\t\t\tlimit = OC.appConfig.comments.maxAutoCompleteResults\n\t\t\t\t}\n\t\t\t\t$target.atwho({\n\t\t\t\t\tat: '@',\n\t\t\t\t\tlimit: limit,\n\t\t\t\t\tcallbacks: {\n\t\t\t\t\t\tremoteFilter: s._onAutoComplete,\n\t\t\t\t\t\thighlighter: function(li) {\n\t\t\t\t\t\t// misuse the highlighter callback to instead of\n\t\t\t\t\t\t// highlighting loads the avatars.\n\t\t\t\t\t\t\tvar $li = $(li)\n\t\t\t\t\t\t\t$li.find('.avatar').avatar(undefined, 32)\n\t\t\t\t\t\t\treturn $li\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsorter: function(q, items) { return items }\n\t\t\t\t\t},\n\t\t\t\t\tdisplayTpl: function(item) {\n\t\t\t\t\t\treturn '<li>'\n\t\t\t\t\t\t+ '<span class=\"avatar-name-wrapper\">'\n\t\t\t\t\t\t\t+ '<span class=\"avatar\" '\n\t\t\t\t\t\t\t\t\t+ 'data-username=\"' + escapeHTML(item.id) + '\" ' // for avatars\n\t\t\t\t\t\t\t\t\t+ 'data-user=\"' + escapeHTML(item.id) + '\" ' // for contactsmenu\n\t\t\t\t\t\t\t\t\t+ 'data-user-display-name=\"' + escapeHTML(item.label) + '\">'\n\t\t\t\t\t\t\t+ '</span>'\n\t\t\t\t\t\t\t+ '<strong>' + escapeHTML(item.label) + '</strong>'\n\t\t\t\t\t\t+ '</span></li>'\n\t\t\t\t\t},\n\t\t\t\t\tinsertTpl: function(item) {\n\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t+ '<span class=\"avatar-name-wrapper\">'\n\t\t\t\t\t\t\t+ '<span class=\"avatar\" '\n\t\t\t\t\t\t\t\t\t+ 'data-username=\"' + escapeHTML(item.id) + '\" ' // for avatars\n\t\t\t\t\t\t\t\t\t+ 'data-user=\"' + escapeHTML(item.id) + '\" ' // for contactsmenu\n\t\t\t\t\t\t\t\t\t+ 'data-user-display-name=\"' + escapeHTML(item.label) + '\">'\n\t\t\t\t\t\t\t+ '</span>'\n\t\t\t\t\t\t\t+ '<strong>' + escapeHTML(item.label) + '</strong>'\n\t\t\t\t\t\t+ '</span>'\n\t\t\t\t\t},\n\t\t\t\t\tsearchKey: 'label'\n\t\t\t\t})\n\t\t\t\t$target.on('inserted.atwho', function(je, $el) {\n\t\t\t\t\tvar editionMode = true\n\t\t\t\t\ts._postRenderItem(\n\t\t\t\t\t// we need to pass the parent of the inserted element\n\t\t\t\t\t// passing the whole comments form would re-apply and request\n\t\t\t\t\t// avatars from the server\n\t\t\t\t\t\t$(je.target).find(\n\t\t\t\t\t\t\t'span[data-username=\"' + $el.find('[data-username]').data('username') + '\"]'\n\t\t\t\t\t\t).parent(),\n\t\t\t\t\t\teditionMode\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_onAutoComplete: function(query, callback) {\n\t\t\t\tvar s = this\n\t\t\t\tif (!_.isUndefined(this._autoCompleteRequestTimer)) {\n\t\t\t\t\tclearTimeout(this._autoCompleteRequestTimer)\n\t\t\t\t}\n\t\t\t\tthis._autoCompleteRequestTimer = _.delay(function() {\n\t\t\t\t\tif (!_.isUndefined(this._autoCompleteRequestCall)) {\n\t\t\t\t\t\tthis._autoCompleteRequestCall.abort()\n\t\t\t\t\t}\n\t\t\t\t\tthis._autoCompleteRequestCall = $.ajax({\n\t\t\t\t\t\turl: OC.linkToOCS('core', 2) + 'autocomplete/get',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tsearch: query,\n\t\t\t\t\t\t\titemType: 'files',\n\t\t\t\t\t\t\titemId: s.model.get('id'),\n\t\t\t\t\t\t\tsorter: 'commenters|share-recipients',\n\t\t\t\t\t\t\tlimit: OC.appConfig.comments.maxAutoCompleteResults\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbeforeSend: function(request) {\n\t\t\t\t\t\t\trequest.setRequestHeader('Accept', 'application/json')\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function(result) {\n\t\t\t\t\t\t\tcallback(result.ocs.data)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}, 400)\n\t\t\t},\n\n\t\t\t_formatItem: function(commentModel) {\n\t\t\t\tvar timestamp = new Date(commentModel.get('creationDateTime')).getTime()\n\t\t\t\tvar data = _.extend({\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tdate: OC.Util.relativeModifiedDate(timestamp),\n\t\t\t\t\taltDate: OC.Util.formatDate(timestamp),\n\t\t\t\t\tformattedMessage: this._formatMessage(commentModel.get('message'), commentModel.get('mentions'))\n\t\t\t\t}, commentModel.attributes)\n\t\t\t\treturn data\n\t\t\t},\n\n\t\t\t_toggleLoading: function(state) {\n\t\t\t\tthis._loading = state\n\t\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state)\n\t\t\t},\n\n\t\t\t_onRequest: function(type) {\n\t\t\t\tif (type === 'REPORT') {\n\t\t\t\t\tthis._toggleLoading(true)\n\t\t\t\t\tthis.$el.find('.showMore').addClass('hidden')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_onEndRequest: function(type) {\n\t\t\t\tvar fileInfoModel = this.model\n\t\t\t\tthis._toggleLoading(false)\n\t\t\t\tthis.$el.find('.emptycontent').toggleClass('hidden', !!this.collection.length)\n\t\t\t\tthis.$el.find('.showMore').toggleClass('hidden', !this.collection.hasMoreResults())\n\n\t\t\t\tif (type !== 'REPORT') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// find first unread comment\n\t\t\t\tvar firstUnreadComment = this.collection.findWhere({ isUnread: true })\n\t\t\t\tif (firstUnreadComment) {\n\t\t\t\t// update read marker\n\t\t\t\t\tthis.collection.updateReadMarker(\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\t\t\tfileInfoModel.set('commentsUnread', 0)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tthis.$el.find('.newCommentForm .message').focus()\n\n\t\t\t},\n\n\t\t\t/**\n\t\t * takes care of post-rendering after a new comment was added to the\n\t\t * collection\n\t\t *\n\t\t * @param model\n\t\t * @param collection\n\t\t * @param options\n\t\t * @private\n\t\t */\n\t\t\t_onAddModel: function(model, collection, options) {\n\t\t\t// we need to render it immediately, to ensure that the right\n\t\t\t// order of comments is kept on opening comments tab\n\t\t\t\tvar $comment = $(this.commentTemplate(this._formatItem(model)))\n\t\t\t\tif (!_.isUndefined(options.at) && collection.length > 1) {\n\t\t\t\t\tthis.$container.find('li').eq(options.at).before($comment)\n\t\t\t\t} else {\n\t\t\t\t\tthis.$container.append($comment)\n\t\t\t\t}\n\t\t\t\tthis._postRenderItem($comment)\n\t\t\t\t$('#commentsTabView').find('.newCommentForm div.message').text('').prop('contenteditable', true)\n\n\t\t\t\t// we need to update the model, because it consists of client data\n\t\t\t\t// only, but the server might add meta data, e.g. about mentions\n\t\t\t\tvar oldMentions = model.get('mentions')\n\t\t\t\tvar self = this\n\t\t\t\tmodel.fetch({\n\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\tif (_.isEqual(oldMentions, model.get('mentions'))) {\n\t\t\t\t\t\t// don't attempt to render if unnecessary, avoids flickering\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar $updated = $(self.commentTemplate(self._formatItem(model)))\n\t\t\t\t\t\t$comment.html($updated.html())\n\t\t\t\t\t\tself._postRenderItem($comment)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t},\n\n\t\t\t/**\n\t\t * takes care of post-rendering after a new comment was edited\n\t\t *\n\t\t * @param model\n\t\t * @private\n\t\t */\n\t\t\t_onChangeModel: function(model) {\n\t\t\t\tif (model.get('message').trim() === model.previous('message').trim()) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tvar $form = this.$container.find('.comment[data-id=\"' + model.id + '\"] form')\n\t\t\t\tvar $row = $form.closest('.comment')\n\t\t\t\tvar $target = $row.data('commentEl')\n\t\t\t\tif (_.isUndefined($target)) {\n\t\t\t\t// ignore noise – this is only set after editing a comment and hitting post\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tvar self = this\n\n\t\t\t\t// we need to update the model, because it consists of client data\n\t\t\t\t// only, but the server might add meta data, e.g. about mentions\n\t\t\t\tmodel.fetch({\n\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t$target.removeClass('hidden')\n\t\t\t\t\t\t$row.remove()\n\n\t\t\t\t\t\tvar $message = $target.find('.message')\n\t\t\t\t\t\t$message\n\t\t\t\t\t\t\t.html(self._formatMessage(model.get('message'), model.get('mentions')))\n\t\t\t\t\t\t\t.find('.avatar')\n\t\t\t\t\t\t\t.each(function() { $(this).avatar() })\n\t\t\t\t\t\tself._postRenderItem($message)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_postRenderItem: function($el, editionMode) {\n\t\t\t\t$el.find('.has-tooltip').tooltip()\n\t\t\t\tvar inlineAvatars = $el.find('.message .avatar')\n\t\t\t\tif ($($el.context).hasClass('message')) {\n\t\t\t\t\tinlineAvatars = $el.find('.avatar')\n\t\t\t\t}\n\t\t\t\tinlineAvatars.each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\t$this.avatar($this.attr('data-username'), 16)\n\t\t\t\t})\n\t\t\t\t$el.find('.authorRow .avatar').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\t$this.avatar($this.attr('data-username'), 32)\n\t\t\t\t})\n\n\t\t\t\tvar username = $el.find('.avatar').data('username')\n\t\t\t\tif (username !== OC.getCurrentUser().uid) {\n\t\t\t\t\t$el.find('.authorRow .avatar, .authorRow .author').contactsMenu(\n\t\t\t\t\t\tusername, 0, $el.find('.authorRow'))\n\t\t\t\t}\n\n\t\t\t\tvar $message = $el.find('.message')\n\t\t\t\tif ($message.length === 0) {\n\t\t\t\t// it is the case when writing a comment and mentioning a person\n\t\t\t\t\t$message = $el\n\t\t\t\t}\n\n\t\t\t\tif (!editionMode) {\n\t\t\t\t\tvar self = this\n\t\t\t\t\t// add the dropdown menu to display the edit and delete option\n\t\t\t\t\tvar modifyCommentMenu = new OCA.Comments.CommentsModifyMenu()\n\t\t\t\t\t$el.find('.authorRow').append(modifyCommentMenu.$el)\n\t\t\t\t\t$el.find('.more').on('click', _.bind(modifyCommentMenu.show, modifyCommentMenu))\n\n\t\t\t\t\tself.listenTo(modifyCommentMenu, 'select:menu-item-clicked', function(ev, action) {\n\t\t\t\t\t\tif (action === 'edit') {\n\t\t\t\t\t\t\tself._onClickEditComment(ev)\n\t\t\t\t\t\t} else if (action === 'delete') {\n\t\t\t\t\t\t\tself._onClickDeleteComment(ev)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis._postRenderMessage($message, editionMode)\n\t\t\t},\n\n\t\t\t_postRenderMessage: function($el, editionMode) {\n\t\t\t\tif (editionMode) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t$el.find('.avatar-name-wrapper').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\tvar $avatar = $this.find('.avatar')\n\n\t\t\t\t\tvar user = $avatar.data('user')\n\t\t\t\t\tif (user !== OC.getCurrentUser().uid) {\n\t\t\t\t\t\t$this.contactsMenu(user, 0, $this)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Convert a message to be displayed in HTML,\n\t\t * converts newlines to <br> tags.\n\t\t */\n\t\t\t_formatMessage: function(message, mentions, editMode) {\n\t\t\t\tmessage = escapeHTML(message).replace(/\\n/g, '<br/>')\n\n\t\t\t\tfor (var i in mentions) {\n\t\t\t\t\tif (!mentions.hasOwnProperty(i)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tvar mention = '@' + mentions[i].mentionId\n\t\t\t\t\tif (mentions[i].mentionId.indexOf(' ') !== -1) {\n\t\t\t\t\t\tmention = _.escape('@\"' + mentions[i].mentionId + '\"')\n\t\t\t\t\t}\n\n\t\t\t\t\t// escape possible regex characters in the name\n\t\t\t\t\tmention = mention.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\t\t\t\t\tvar regex = new RegExp('(^|\\\\s)(' + mention + ')\\\\b', 'g')\n\t\t\t\t\tif (mentions[i].mentionId.indexOf(' ') !== -1) {\n\t\t\t\t\t\tregex = new RegExp('(^|\\\\s)(' + mention + ')', 'g')\n\t\t\t\t\t}\n\n\t\t\t\t\tvar displayName = this._composeHTMLMention(mentions[i].mentionId, mentions[i].mentionDisplayName)\n\n\t\t\t\t\t// replace every mention either at the start of the input or after a whitespace\n\t\t\t\t\t// followed by a non-word character.\n\t\t\t\t\tmessage = message.replace(regex,\n\t\t\t\t\t\tfunction(match, p1) {\n\t\t\t\t\t\t// to get number of whitespaces (0 vs 1) right\n\t\t\t\t\t\t\treturn p1 + displayName\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tif (editMode !== true) {\n\t\t\t\t\tmessage = OCP.Comments.plainToRich(message)\n\t\t\t\t}\n\t\t\t\treturn message\n\t\t\t},\n\n\t\t\t_composeHTMLMention: function(uid, displayName) {\n\t\t\t\tvar avatar = ''\n\t\t\t\t+ '<span class=\"avatar\" '\n\t\t\t\t\t\t+ 'data-username=\"' + _.escape(uid) + '\" '\n\t\t\t\t\t\t+ 'data-user=\"' + _.escape(uid) + '\" '\n\t\t\t\t\t\t+ 'data-user-display-name=\"' + _.escape(displayName) + '\">'\n\t\t\t\t+ '</span>'\n\n\t\t\t\tvar isCurrentUser = (uid === OC.getCurrentUser().uid)\n\n\t\t\t\treturn ''\n\t\t\t\t+ '<span class=\"atwho-inserted\" contenteditable=\"false\">'\n\t\t\t\t\t+ '<span class=\"avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '\">'\n\t\t\t\t\t\t+ avatar\n\t\t\t\t\t\t+ '<strong>' + _.escape(displayName) + '</strong>'\n\t\t\t\t\t+ '</span>'\n\t\t\t\t+ '</span>'\n\t\t\t},\n\n\t\t\tnextPage: function() {\n\t\t\t\tif (this._loading || !this.collection.hasMoreResults()) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetchNext()\n\t\t\t},\n\n\t\t\t_onClickEditComment: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $comment = $(ev.target).closest('.comment')\n\t\t\t\tvar commentId = $comment.data('id')\n\t\t\t\tvar commentToEdit = this.collection.get(commentId)\n\t\t\t\tvar $formRow = $(this.editCommentTemplate(_.extend({\n\t\t\t\t\tisEditMode: true,\n\t\t\t\t\tsubmitText: t('comments', 'Save')\n\t\t\t\t}, commentToEdit.attributes)))\n\n\t\t\t\t$comment.addClass('hidden').removeClass('collapsed')\n\t\t\t\t// spawn form\n\t\t\t\t$comment.after($formRow)\n\t\t\t\t$formRow.data('commentEl', $comment)\n\t\t\t\t$formRow.find('.message').on('keydown input change', this._onTypeComment)\n\n\t\t\t\t// copy avatar element from original to avoid flickering\n\t\t\t\t$formRow.find('.avatar:first').replaceWith($comment.find('.avatar:first').clone())\n\t\t\t\t$formRow.find('.has-tooltip').tooltip()\n\n\t\t\t\tvar $message = $formRow.find('.message')\n\t\t\t\t$message\n\t\t\t\t\t.html(this._formatMessage(commentToEdit.get('message'), commentToEdit.get('mentions'), true))\n\t\t\t\t\t.find('.avatar')\n\t\t\t\t\t.each(function() { $(this).avatar() })\n\t\t\t\tvar editionMode = true\n\t\t\t\tthis._postRenderItem($message, editionMode)\n\n\t\t\t\t// Enable autosize\n\t\t\t\tautosize($formRow.find('.message'))\n\n\t\t\t\t// enable autocomplete\n\t\t\t\tthis._initAutoComplete($formRow.find('.message'))\n\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_onTypeComment: function(ev) {\n\t\t\t\tvar $field = $(ev.target)\n\t\t\t\tvar len = $field.text().length\n\t\t\t\tvar $submitButton = $field.data('submitButtonEl')\n\t\t\t\tif (!$submitButton) {\n\t\t\t\t\t$submitButton = $field.closest('form').find('.submit')\n\t\t\t\t\t$field.data('submitButtonEl', $submitButton)\n\t\t\t\t}\n\t\t\t\t$field.tooltip('hide')\n\t\t\t\tif (len > this._commentMaxThreshold) {\n\t\t\t\t\t$field.attr('data-original-title', t('comments', 'Allowed characters {count} of {max}', { count: len, max: this._commentMaxLength }))\n\t\t\t\t\t$field.tooltip({ trigger: 'manual' })\n\t\t\t\t\t$field.tooltip('show')\n\t\t\t\t\t$field.addClass('error')\n\t\t\t\t}\n\n\t\t\t\tvar limitExceeded = (len > this._commentMaxLength)\n\t\t\t\t$field.toggleClass('error', limitExceeded)\n\t\t\t\t$submitButton.prop('disabled', limitExceeded)\n\n\t\t\t\t// Submits form with Enter, but Shift+Enter is a new line. If the\n\t\t\t\t// autocomplete popover is being shown Enter does not submit the\n\t\t\t\t// form either; it will be handled by At.js which will add the\n\t\t\t\t// currently selected item to the message.\n\t\t\t\tif (ev.keyCode === 13 && !ev.shiftKey && !$field.atwho('isSelecting')) {\n\t\t\t\t\t$submitButton.click()\n\t\t\t\t\tev.preventDefault()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_onClickComment: function(ev) {\n\t\t\t\tvar $row = $(ev.target)\n\t\t\t\tif (!$row.is('.comment')) {\n\t\t\t\t\t$row = $row.closest('.comment')\n\t\t\t\t}\n\t\t\t\t$row.removeClass('collapsed')\n\t\t\t},\n\n\t\t\t_onClickCloseComment: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $row = $(ev.target).closest('.comment')\n\t\t\t\t$row.data('commentEl').removeClass('hidden')\n\t\t\t\t$row.remove()\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_onClickDeleteComment: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $comment = $(ev.target).closest('.comment')\n\t\t\t\tvar commentId = $comment.data('id')\n\t\t\t\tvar $loading = $comment.find('.deleteLoading')\n\t\t\t\tvar $moreIcon = $comment.find('.more')\n\n\t\t\t\t$comment.addClass('disabled')\n\t\t\t\t$loading.removeClass('hidden')\n\t\t\t\t$moreIcon.addClass('hidden')\n\n\t\t\t\t$comment.data('commentEl', $comment)\n\n\t\t\t\tthis.collection.get(commentId).destroy({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\t$comment.data('commentEl').remove()\n\t\t\t\t\t\t$comment.remove()\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t\t$moreIcon.removeClass('hidden')\n\t\t\t\t\t\t$comment.removeClass('disabled')\n\n\t\t\t\t\t\tOC.Notification.showTemporary(t('comments', 'Error occurred while retrieving comment with ID {id}', { id: commentId }))\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_onClickShowMore: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tthis.nextPage()\n\t\t\t},\n\n\t\t\t/**\n\t\t * takes care of updating comment element states after submit (either new\n\t\t * comment or edit).\n\t\t *\n\t\t * @param {OC.Backbone.Model} model\n\t\t * @param {jQuery} $form\n\t\t * @private\n\t\t */\n\t\t\t_onSubmitSuccess: function(model, $form) {\n\t\t\t\tvar $submit = $form.find('.submit')\n\t\t\t\tvar $loading = $form.find('.submitLoading')\n\n\t\t\t\t$submit.removeClass('hidden')\n\t\t\t\t$loading.addClass('hidden')\n\t\t\t},\n\n\t\t\t_commentBodyHTML2Plain: function($el) {\n\t\t\t\tvar $comment = $el.clone()\n\n\t\t\t\t$comment.find('.avatar-name-wrapper').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\tvar $inserted = $this.parent()\n\t\t\t\t\tvar userId = $this.find('.avatar').data('username').toString()\n\t\t\t\t\tif (userId.indexOf(' ') !== -1) {\n\t\t\t\t\t\t$inserted.html('@\"' + userId + '\"')\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$inserted.html('@' + userId)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$comment.html(OCP.Comments.richToPlain($comment.html()))\n\n\t\t\t\tvar oldHtml\n\t\t\t\tvar html = $comment.html()\n\t\t\t\tdo {\n\t\t\t\t// replace works one by one\n\t\t\t\t\toldHtml = html\n\t\t\t\t\thtml = oldHtml.replace('<br>', '\\n')\t// preserve line breaks\n\t\t\t\t} while (oldHtml !== html)\n\t\t\t\t$comment.html(html)\n\n\t\t\t\treturn $comment.text()\n\t\t\t},\n\n\t\t\t_onSubmitComment: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar $form = $(e.target)\n\t\t\t\tvar commentId = $form.closest('.comment').data('id')\n\t\t\t\tvar currentUser = OC.getCurrentUser()\n\t\t\t\tvar $submit = $form.find('.submit')\n\t\t\t\tvar $loading = $form.find('.submitLoading')\n\t\t\t\tvar $commentField = $form.find('.message')\n\t\t\t\tvar message = $commentField.text().trim()\n\t\t\t\te.preventDefault()\n\n\t\t\t\tif (!message.length || message.length > this._commentMaxLength) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t$commentField.prop('contenteditable', false)\n\t\t\t\t$submit.addClass('hidden')\n\t\t\t\t$loading.removeClass('hidden')\n\n\t\t\t\tmessage = this._commentBodyHTML2Plain($commentField)\n\t\t\t\tif (commentId) {\n\t\t\t\t// edit mode\n\t\t\t\t\tvar comment = this.collection.get(commentId)\n\t\t\t\t\tcomment.save({\n\t\t\t\t\t\tmessage: message\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._onSubmitSuccess(model, $form)\n\t\t\t\t\t\t\tif (model.get('message').trim() === model.previous('message').trim()) {\n\t\t\t\t\t\t\t// model change event doesn't trigger, manually remove the row.\n\t\t\t\t\t\t\t\tvar $row = $form.closest('.comment')\n\t\t\t\t\t\t\t\t$row.data('commentEl').removeClass('hidden')\n\t\t\t\t\t\t\t\t$row.remove()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function() {\n\t\t\t\t\t\t\tself._onSubmitError($form, commentId)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tthis.collection.create({\n\t\t\t\t\t\tactorId: currentUser.uid,\n\t\t\t\t\t\tactorDisplayName: currentUser.displayName,\n\t\t\t\t\t\tactorType: 'users',\n\t\t\t\t\t\tverb: 'comment',\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tcreationDateTime: (new Date()).toUTCString()\n\t\t\t\t\t}, {\n\t\t\t\t\t\tat: 0,\n\t\t\t\t\t\t// wait for real creation before adding\n\t\t\t\t\t\twait: true,\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._onSubmitSuccess(model, $form)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function() {\n\t\t\t\t\t\t\tself._onSubmitError($form, undefined)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * takes care of updating the UI after an error on submit (either new\n\t\t * comment or edit).\n\t\t *\n\t\t * @param {jQuery} $form\n\t\t * @param {string|undefined} commentId\n\t\t * @private\n\t\t */\n\t\t\t_onSubmitError: function($form, commentId) {\n\t\t\t\t$form.find('.submit').removeClass('hidden')\n\t\t\t\t$form.find('.submitLoading').addClass('hidden')\n\t\t\t\t$form.find('.message').prop('contenteditable', true)\n\n\t\t\t\tif (!_.isUndefined(commentId)) {\n\t\t\t\t\tOC.Notification.show(t('comments', 'Error occurred while updating comment with id {id}', { id: commentId }), { type: 'error' })\n\t\t\t\t} else {\n\t\t\t\t\tOC.Notification.show(t('comments', 'Error occurred while posting comment'), { type: 'error' })\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t * ensures the contenteditable div is really empty, when user removed\n\t\t * all input, so that the placeholder will be shown again\n\t\t *\n\t\t * @private\n\t\t */\n\t\t\t_onTextChange: function() {\n\t\t\t\tvar $message = $('#commentsTabView').find('.newCommentForm div.message')\n\t\t\t\tif (!$message.text().trim().length) {\n\t\t\t\t\t$message.empty()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t * Limit pasting to plain text\n\t\t *\n\t\t * @param e\n\t\t * @private\n\t\t */\n\t\t\t_onPaste: function(e) {\n\t\t\t\te.preventDefault()\n\t\t\t\tvar text = e.originalEvent.clipboardData.getData('text/plain')\n\t\t\t\tdocument.execCommand('insertText', false, text)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Returns whether the given message is long and needs\n\t\t * collapsing\n\t\t */\n\t\t\t_isLong: function(message) {\n\t\t\t\treturn message.length > 250 || (message.match(/\\n/g) || []).length > 1\n\t\t\t}\n\t\t})\n\n\tOCA.Comments.CommentsTabView = CommentsTabView\n})(OC, OCA)\n","/*\n * Copyright (c) 2018\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\n\t/**\n\t * Construct a new CommentsModifyMenuinstance\n\t * @constructs CommentsModifyMenu\n\t * @memberof OC.Comments\n\t * @private\n\t */\n\tconst CommentsModifyMenu = OC.Backbone.View.extend({\n\t\ttagName: 'div',\n\t\tclassName: 'commentsModifyMenu popovermenu bubble menu',\n\t\t_scopes: [\n\t\t\t{\n\t\t\t\tname: 'edit',\n\t\t\t\tdisplayName: t('comments', 'Edit comment'),\n\t\t\t\ticonClass: 'icon-rename',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'delete',\n\t\t\t\tdisplayName: t('comments', 'Delete comment'),\n\t\t\t\ticonClass: 'icon-delete',\n\t\t\t},\n\t\t],\n\t\tinitialize: function() {\n\n\t\t},\n\t\tevents: {\n\t\t\t'click a.action': '_onClickAction',\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever an action has been clicked within the menu\n\t\t *\n\t\t * @param {Object} event event object\n\t\t */\n\t\t_onClickAction: function(event) {\n\t\t\tlet $target = $(event.currentTarget)\n\t\t\tif (!$target.hasClass('menuitem')) {\n\t\t\t\t$target = $target.closest('.menuitem')\n\t\t\t}\n\n\t\t\tOC.hideMenus()\n\n\t\t\tthis.trigger('select:menu-item-clicked', event, $target.data('action'))\n\t\t},\n\n\t\t/**\n\t\t * Renders the menu with the currently set items\n\t\t */\n\t\trender: function() {\n\t\t\tthis.$el.html(OCA.Comments.Templates['commentsmodifymenu']({\n\t\t\t\titems: this._scopes,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Displays the menu\n\t\t * @param {Event} context the click event\n\t\t */\n\t\tshow: function(context) {\n\t\t\tthis._context = context\n\n\t\t\tfor (const i in this._scopes) {\n\t\t\t\tthis._scopes[i].active = false\n\t\t\t}\n\n\t\t\tconst $el = $(context.target)\n\t\t\tconst offsetIcon = $el.offset()\n\t\t\tconst offsetContainer = $el.closest('.authorRow').offset()\n\n\t\t\t// adding some extra top offset to push the menu below the button.\n\t\t\tconst position = {\n\t\t\t\ttop: offsetIcon.top - offsetContainer.top + 48,\n\t\t\t\tleft: '',\n\t\t\t\tright: '',\n\t\t\t}\n\n\t\t\tposition.left = offsetIcon.left - offsetContainer.left\n\n\t\t\tif (position.left > 200) {\n\t\t\t\t// we need to position the menu to the right.\n\t\t\t\tposition.left = ''\n\t\t\t\tposition.right = this.$el.closest('.comment').find('.date').width()\n\t\t\t\tthis.$el.removeClass('menu-left').addClass('menu-right')\n\t\t\t} else {\n\t\t\t\tthis.$el.removeClass('menu-right').addClass('menu-left')\n\t\t\t}\n\t\t\tthis.$el.css(position)\n\t\t\tthis.render()\n\t\t\tthis.$el.removeClass('hidden')\n\n\t\t\tOC.showMenu(null, this.$el)\n\t\t},\n\t})\n\n\tOCA.Comments = OCA.Comments || {}\n\tOCA.Comments.CommentsModifyMenu = CommentsModifyMenu\n})(OC, OCA)\n","/*\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_COMMENTS_UNREAD:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread',\n\t})\n\n\tOCA.Comments = _.extend({}, OCA.Comments)\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.Comments.FilesPlugin = {\n\t\tignoreLists: [\n\t\t\t'trashbin',\n\t\t\t'files.public',\n\t\t],\n\n\t\t_formatCommentCount: function(count) {\n\t\t\treturn OCA.Comments.Templates['filesplugin']({\n\t\t\t\tcount: count,\n\t\t\t\tcountMessage: n('comments', '%n unread comment', '%n unread comments', count),\n\t\t\t\ticonUrl: OC.imagePath('core', 'actions/comment'),\n\t\t\t})\n\t\t},\n\n\t\tattach: function(fileList) {\n\t\t\tconst self = this\n\t\t\tif (this.ignoreLists.indexOf(fileList.id) >= 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfileList.registerTabView(new OCA.Comments.CommentsTabView('commentsTabView'))\n\n\t\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\t\tfileList._getWebdavProperties = function() {\n\t\t\t\tconst props = oldGetWebdavProperties.apply(this, arguments)\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD)\n\t\t\t\treturn props\n\t\t\t}\n\n\t\t\tfileList.filesClient.addFileInfoParser(function(response) {\n\t\t\t\tconst data = {}\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD]\n\t\t\t\tif (!_.isUndefined(commentsUnread) && commentsUnread !== '') {\n\t\t\t\t\tdata.commentsUnread = parseInt(commentsUnread, 10)\n\t\t\t\t}\n\t\t\t\treturn data\n\t\t\t})\n\n\t\t\tfileList.$el.addClass('has-comments')\n\t\t\tconst oldCreateRow = fileList._createRow\n\t\t\tfileList._createRow = function(fileData) {\n\t\t\t\tconst $tr = oldCreateRow.apply(this, arguments)\n\t\t\t\tif (fileData.commentsUnread) {\n\t\t\t\t\t$tr.attr('data-comments-unread', fileData.commentsUnread)\n\t\t\t\t}\n\t\t\t\treturn $tr\n\t\t\t}\n\n\t\t\t// register \"comment\" action for reading comments\n\t\t\tfileList.fileActions.registerAction({\n\t\t\t\tname: 'Comment',\n\t\t\t\tdisplayName: function(context) {\n\t\t\t\t\tif (context && context.$file) {\n\t\t\t\t\t\tconst unread = parseInt(context.$file.data('comments-unread'), 10)\n\t\t\t\t\t\tif (unread >= 0) {\n\t\t\t\t\t\t\treturn n('comments', '1 new comment', '{unread} new comments', unread, { unread: unread })\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn t('comments', 'Comment')\n\t\t\t\t},\n\t\t\t\tmime: 'all',\n\t\t\t\torder: -140,\n\t\t\t\ticonClass: 'icon-comment',\n\t\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\t\trender: function(actionSpec, isDefault, context) {\n\t\t\t\t\tconst $file = context.$file\n\t\t\t\t\tconst unreadComments = $file.data('comments-unread')\n\t\t\t\t\tif (unreadComments) {\n\t\t\t\t\t\tconst $actionLink = $(self._formatCommentCount(unreadComments))\n\t\t\t\t\t\tcontext.$file.find('a.name>span.fileactions').append($actionLink)\n\t\t\t\t\t\treturn $actionLink\n\t\t\t\t\t}\n\t\t\t\t\treturn ''\n\t\t\t\t},\n\t\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\t\tcontext.$file.find('.action-comment').tooltip('hide')\n\t\t\t\t\t// open sidebar in comments section\n\t\t\t\t\tcontext.fileList.showDetailsView(fileName, 'comments')\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// add attribute to \"elementToFile\"\n\t\t\tconst oldElementToFile = fileList.elementToFile\n\t\t\tfileList.elementToFile = function($el) {\n\t\t\t\tconst fileInfo = oldElementToFile.apply(this, arguments)\n\t\t\t\tconst commentsUnread = $el.data('comments-unread')\n\t\t\t\tif (commentsUnread) {\n\t\t\t\t\tfileInfo.commentsUnread = commentsUnread\n\t\t\t\t}\n\t\t\t\treturn fileInfo\n\t\t\t}\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Comments.FilesPlugin)\n","/**\n * @author Joas Schilling <coding@schilljs.com>\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n */\n\n(function() {\n\tOCA.Comments.ActivityTabViewPlugin = {\n\n\t\t/**\n\t\t * Prepare activity for display\n\t\t *\n\t\t * @param {OCA.Activity.ActivityModel} model for this activity\n\t\t * @param {jQuery} $el jQuery handle for this activity\n\t\t * @param {string} view The view that displayes this activity\n\t\t */\n\t\tprepareModelForDisplay: function(model, $el, view) {\n\t\t\tif (model.get('app') !== 'comments' || model.get('type') !== 'comments') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (view === 'ActivityTabView') {\n\t\t\t\t$el.addClass('comment')\n\t\t\t\tif (model.get('message') && this._isLong(model.get('message'))) {\n\t\t\t\t\t$el.addClass('collapsed')\n\t\t\t\t\tconst $overlay = $('<div>').addClass('message-overlay')\n\t\t\t\t\t$el.find('.activitymessage').after($overlay)\n\t\t\t\t\t$el.on('click', this._onClickCollapsedComment)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._onClickComment()\n\t\t */\n\t\t_onClickCollapsedComment: function(ev) {\n\t\t\tlet $row = $(ev.target)\n\t\t\tif (!$row.is('.comment')) {\n\t\t\t\t$row = $row.closest('.comment')\n\t\t\t}\n\t\t\t$row.removeClass('collapsed')\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._isLong()\n\t\t */\n\t\t_isLong: function(message) {\n\t\t\treturn message.length > 250 || (message.match(/\\n/g) || []).length > 1\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin)\n","/* eslint-disable */\n/*\n * Copyright (c) 2014\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n(function(OC, OCA, $) {\n\t'use strict'\n\n\t/**\n\t * Construct a new FileActions instance\n\t * @constructs Files\n\t */\n\tvar Comment = function() {\n\t\tthis.initialize()\n\t}\n\n\tComment.prototype = {\n\n\t\tfileList: null,\n\n\t\t/**\n\t\t * Initialize the file search\n\t\t */\n\t\tinitialize: function() {\n\n\t\t\tvar self = this\n\n\t\t\tthis.fileAppLoaded = function() {\n\t\t\t\treturn !!OCA.Files && !!OCA.Files.App\n\t\t\t}\n\t\t\tfunction inFileList($row, result) {\n\t\t\t\treturn false\n\n\t\t\t\tif (!self.fileAppLoaded()) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tvar dir = self.fileList.getCurrentDirectory().replace(/\\/+$/, '')\n\t\t\t\tvar resultDir = OC.dirname(result.path)\n\t\t\t\treturn dir === resultDir && self.fileList.inList(result.name)\n\t\t\t}\n\t\t\tfunction hideNoFilterResults() {\n\t\t\t\tvar $nofilterresults = $('.nofilterresults')\n\t\t\t\tif (!$nofilterresults.hasClass('hidden')) {\n\t\t\t\t\t$nofilterresults.addClass('hidden')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t *\n\t\t\t * @param {jQuery} $row\n\t\t\t * @param {Object} result\n\t\t\t * @param {int} result.id\n\t\t\t * @param {string} result.comment\n\t\t\t * @param {string} result.authorId\n\t\t\t * @param {string} result.authorName\n\t\t\t * @param {string} result.link\n\t\t\t * @param {string} result.fileName\n\t\t\t * @param {string} result.path\n\t\t\t * @returns {*}\n\t\t\t */\n\t\t\tthis.renderCommentResult = function($row, result) {\n\t\t\t\tif (inFileList($row, result)) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\thideNoFilterResults()\n\t\t\t\t/* render preview icon, show path beneath filename,\n\t\t\t\t show size and last modified date on the right */\n\t\t\t\tthis.updateLegacyMimetype(result)\n\n\t\t\t\tvar $pathDiv = $('<div>').addClass('path').text(result.path)\n\n\t\t\t\tvar $avatar = $('<div>')\n\t\t\t\t$avatar.addClass('avatar')\n\t\t\t\t\t.css('display', 'inline-block')\n\t\t\t\t\t.css('vertical-align', 'middle')\n\t\t\t\t\t.css('margin', '0 5px 2px 3px')\n\n\t\t\t\tif (result.authorName) {\n\t\t\t\t\t$avatar.avatar(result.authorId, 21, undefined, false, undefined, result.authorName)\n\t\t\t\t} else {\n\t\t\t\t\t$avatar.avatar(result.authorId, 21)\n\t\t\t\t}\n\n\t\t\t\t$row.find('td.info div.name').after($pathDiv).text(result.comment).prepend($('<span>').addClass('path').css('margin-right', '5px').text(result.authorName)).prepend($avatar)\n\t\t\t\t$row.find('td.result a').attr('href', result.link)\n\n\t\t\t\t$row.find('td.icon')\n\t\t\t\t\t.css('background-image', 'url(' + OC.imagePath('core', 'actions/comment') + ')')\n\t\t\t\t\t.css('opacity', '.4')\n\t\t\t\tvar dir = OC.dirname(result.path)\n\t\t\t\t// \"result.path\" does not include a leading \"/\", so \"OC.dirname\"\n\t\t\t\t// returns the path itself for files or folders in the root.\n\t\t\t\tif (dir === result.path) {\n\t\t\t\t\tdir = '/'\n\t\t\t\t}\n\t\t\t\t$row.find('td.info a').attr('href',\n\t\t\t\t\tOC.generateUrl('/apps/files/?dir={dir}&scrollto={scrollto}', { dir: dir, scrollto: result.fileName })\n\t\t\t\t)\n\n\t\t\t\treturn $row\n\t\t\t}\n\n\t\t\tthis.handleCommentClick = function($row, result, event) {\n\t\t\t\tif (self.fileAppLoaded() && self.fileList.id === 'files') {\n\t\t\t\t\tself.fileList.changeDirectory(OC.dirname(result.path))\n\t\t\t\t\tself.fileList.scrollTo(result.name)\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.updateLegacyMimetype = function(result) {\n\t\t\t\t// backward compatibility:\n\t\t\t\tif (!result.mime && result.mime_type) {\n\t\t\t\t\tresult.mime = result.mime_type\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setFileList = function(fileList) {\n\t\t\t\tthis.fileList = fileList\n\t\t\t}\n\n\t\t\tOC.Plugins.register('OCA.Search.Core', this)\n\t\t},\n\t\tattach: function(search) {\n\t\t\tsearch.setRenderer('comment', this.renderCommentResult.bind(this))\n\t\t\tsearch.setHandler('comment', this.handleCommentClick.bind(this))\n\t\t}\n\t}\n\n\tOCA.Search.comment = new Comment()\n})(OC, OCA, $)\n","/*! jquery.caret 2015-02-01 */\n!function(a,b){\"function\"==typeof define&&define.amd?define([\"jquery\"],function(c){return a.returnExportsGlobal=b(c)}):\"object\"==typeof exports?module.exports=b(require(\"jquery\")):b(jQuery)}(this,function(a){\"use strict\";var b,c,d,e,f,g,h,i,j,k,l;k=\"caret\",b=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.setPos=function(){return this.domInputor},b.prototype.getIEPosition=function(){return this.getPosition()},b.prototype.getPosition=function(){var a,b;return b=this.getOffset(),a=this.$inputor.offset(),b.left-=a.left,b.top-=a.top,b},b.prototype.getOldIEPos=function(){var a,b;return b=h.selection.createRange(),a=h.body.createTextRange(),a.moveToElementText(this.domInputor),a.setEndPoint(\"EndToEnd\",b),a.text.length},b.prototype.getPos=function(){var a,b,c;return(c=this.range())?(a=c.cloneRange(),a.selectNodeContents(this.domInputor),a.setEnd(c.endContainer,c.endOffset),b=a.toString().length,a.detach(),b):h.selection?this.getOldIEPos():void 0},b.prototype.getOldIEOffset=function(){var a,b;return a=h.selection.createRange().duplicate(),a.moveStart(\"character\",-1),b=a.getBoundingClientRect(),{height:b.bottom-b.top,left:b.left,top:b.top}},b.prototype.getOffset=function(){var b,c,d,e,f;return j.getSelection&&(d=this.range())?(d.endOffset-1>0&&d.endContainer===!this.domInputor&&(b=d.cloneRange(),b.setStart(d.endContainer,d.endOffset-1),b.setEnd(d.endContainer,d.endOffset),e=b.getBoundingClientRect(),c={height:e.height,left:e.left+e.width,top:e.top},b.detach()),c&&0!==(null!=c?c.height:void 0)||(b=d.cloneRange(),f=a(h.createTextNode(\"|\")),b.insertNode(f[0]),b.selectNode(f[0]),e=b.getBoundingClientRect(),c={height:e.height,left:e.left,top:e.top},f.remove(),b.detach())):h.selection&&(c=this.getOldIEOffset()),c&&(c.top+=a(j).scrollTop(),c.left+=a(j).scrollLeft()),c},b.prototype.range=function(){var a;if(j.getSelection)return a=j.getSelection(),a.rangeCount>0?a.getRangeAt(0):null},b}(),c=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.getIEPos=function(){var a,b,c,d,e,f,g;return b=this.domInputor,f=h.selection.createRange(),e=0,f&&f.parentElement()===b&&(d=b.value.replace(/\\r\\n/g,\"\\n\"),c=d.length,g=b.createTextRange(),g.moveToBookmark(f.getBookmark()),a=b.createTextRange(),a.collapse(!1),e=g.compareEndPoints(\"StartToEnd\",a)>-1?c:-g.moveStart(\"character\",-c)),e},b.prototype.getPos=function(){return h.selection?this.getIEPos():this.domInputor.selectionStart},b.prototype.setPos=function(a){var b,c;return b=this.domInputor,h.selection?(c=b.createTextRange(),c.move(\"character\",a),c.select()):b.setSelectionRange&&b.setSelectionRange(a,a),b},b.prototype.getIEOffset=function(a){var b,c,d,e;return c=this.domInputor.createTextRange(),a||(a=this.getPos()),c.move(\"character\",a),d=c.boundingLeft,e=c.boundingTop,b=c.boundingHeight,{left:d,top:e,height:b}},b.prototype.getOffset=function(b){var c,d,e;return c=this.$inputor,h.selection?(d=this.getIEOffset(b),d.top+=a(j).scrollTop()+c.scrollTop(),d.left+=a(j).scrollLeft()+c.scrollLeft(),d):(d=c.offset(),e=this.getPosition(b),d={left:d.left+e.left-c.scrollLeft(),top:d.top+e.top-c.scrollTop(),height:e.height})},b.prototype.getPosition=function(a){var b,c,e,f,g,h,i;return b=this.$inputor,f=function(a){return a=a.replace(/<|>|`|\"|&/g,\"?\").replace(/\\r\\n|\\r|\\n/g,\"<br/>\"),/firefox/i.test(navigator.userAgent)&&(a=a.replace(/\\s/g,\" \")),a},void 0===a&&(a=this.getPos()),i=b.val().slice(0,a),e=b.val().slice(a),g=\"<span style='position: relative; display: inline;'>\"+f(i)+\"</span>\",g+=\"<span id='caret' style='position: relative; display: inline;'>|</span>\",g+=\"<span style='position: relative; display: inline;'>\"+f(e)+\"</span>\",h=new d(b),c=h.create(g).rect()},b.prototype.getIEPosition=function(a){var b,c,d,e,f;return d=this.getIEOffset(a),c=this.$inputor.offset(),e=d.left-c.left,f=d.top-c.top,b=d.height,{left:e,top:f,height:b}},b}(),d=function(){function b(a){this.$inputor=a}return b.prototype.css_attr=[\"borderBottomWidth\",\"borderLeftWidth\",\"borderRightWidth\",\"borderTopStyle\",\"borderRightStyle\",\"borderBottomStyle\",\"borderLeftStyle\",\"borderTopWidth\",\"boxSizing\",\"fontFamily\",\"fontSize\",\"fontWeight\",\"height\",\"letterSpacing\",\"lineHeight\",\"marginBottom\",\"marginLeft\",\"marginRight\",\"marginTop\",\"outlineWidth\",\"overflow\",\"overflowX\",\"overflowY\",\"paddingBottom\",\"paddingLeft\",\"paddingRight\",\"paddingTop\",\"textAlign\",\"textOverflow\",\"textTransform\",\"whiteSpace\",\"wordBreak\",\"wordWrap\"],b.prototype.mirrorCss=function(){var b,c=this;return b={position:\"absolute\",left:-9999,top:0,zIndex:-2e4},\"TEXTAREA\"===this.$inputor.prop(\"tagName\")&&this.css_attr.push(\"width\"),a.each(this.css_attr,function(a,d){return b[d]=c.$inputor.css(d)}),b},b.prototype.create=function(b){return this.$mirror=a(\"<div></div>\"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(b),this.$inputor.after(this.$mirror),this},b.prototype.rect=function(){var a,b,c;return a=this.$mirror.find(\"#caret\"),b=a.position(),c={left:b.left,top:b.top,height:a.height()},this.$mirror.remove(),c},b}(),e={contentEditable:function(a){return!(!a[0].contentEditable||\"true\"!==a[0].contentEditable)}},g={pos:function(a){return a||0===a?this.setPos(a):this.getPos()},position:function(a){return h.selection?this.getIEPosition(a):this.getPosition(a)},offset:function(a){var b;return b=this.getOffset(a)}},h=null,j=null,i=null,l=function(a){var b;return(b=null!=a?a.iframe:void 0)?(i=b,j=b.contentWindow,h=b.contentDocument||j.document):(i=void 0,j=window,h=document)},f=function(a){var b;h=a[0].ownerDocument,j=h.defaultView||h.parentWindow;try{return i=j.frameElement}catch(c){b=c}},a.fn.caret=function(d,f,h){var i;return g[d]?(a.isPlainObject(f)?(l(f),f=void 0):l(h),i=e.contentEditable(this)?new b(this):new c(this),g[d].apply(i,[f])):a.error(\"Method \"+d+\" does not exist on jQuery.caret\")},a.fn.caret.EditableCaret=b,a.fn.caret.InputCaret=c,a.fn.caret.Utils=e,a.fn.caret.apis=g});","!function(t,e){\"function\"==typeof define&&define.amd?define([\"jquery\"],function(t){return e(t)}):\"object\"==typeof exports?module.exports=e(require(\"jquery\")):e(jQuery)}(this,function(t){var e,i;i={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},e={beforeSave:function(t){return r.arrayToDefaultHash(t)},matcher:function(t,e,i,n){var r,o,s,a,h;return t=t.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\"\\\\$&\"),i&&(t=\"(?:^|\\\\s)\"+t),r=decodeURI(\"%C3%80\"),o=decodeURI(\"%C3%BF\"),h=n?\" \":\"\",a=new RegExp(t+\"([A-Za-z\"+r+\"-\"+o+\"0-9_\"+h+\"'.+-]*)$|\"+t+\"([^\\\\x00-\\\\xff]*)$\",\"gi\"),s=a.exec(e),s?s[2]||s[1]:null},filter:function(t,e,i){var n,r,o,s;for(n=[],r=0,s=e.length;s>r;r++)o=e[r],~new String(o[i]).toLowerCase().indexOf(t.toLowerCase())&&n.push(o);return n},remoteFilter:null,sorter:function(t,e,i){var n,r,o,s;if(!t)return e;for(n=[],r=0,s=e.length;s>r;r++)o=e[r],o.atwho_order=new String(o[i]).toLowerCase().indexOf(t.toLowerCase()),o.atwho_order>-1&&n.push(o);return n.sort(function(t,e){return t.atwho_order-e.atwho_order})},tplEval:function(t,e){var i,n,r;r=t;try{return\"string\"!=typeof t&&(r=t(e)),r.replace(/\\$\\{([^\\}]*)\\}/g,function(t,i,n){return e[i]})}catch(n){return i=n,\"\"}},highlighter:function(t,e){var i;return e?(i=new RegExp(\">\\\\s*([^<]*?)(\"+e.replace(\"+\",\"\\\\+\")+\")([^<]*)\\\\s*<\",\"ig\"),t.replace(i,function(t,e,i,n){return\"> \"+e+\"<strong>\"+i+\"</strong>\"+n+\" <\"})):t},beforeInsert:function(t,e,i){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}};var n;n=function(){function e(e){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=t(e),this.setupRootElement(),this.listen()}return e.prototype.createContainer=function(e){var i;return null!=(i=this.$el)&&i.remove(),t(e.body).append(this.$el=t(\"<div class='atwho-container'></div>\"))},e.prototype.setupRootElement=function(e,i){var n,r;if(null==i&&(i=!1),e)this.window=e.contentWindow,this.document=e.contentDocument||this.window.document,this.iframe=e;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(r){if(n=r,this.iframe=null,t.fn.atwho.debug)throw new Error(\"iframe auto-discovery is failed.\\nPlease use `setIframe` to set the target iframe manually.\\n\"+n)}}return this.createContainer((this.iframeAsRoot=i)?this.document:document)},e.prototype.controller=function(t){var e,i,n,r;if(this.aliasMaps[t])i=this.controllers[this.aliasMaps[t]];else{r=this.controllers;for(n in r)if(e=r[n],n===t){i=e;break}}return i?i:this.controllers[this.currentFlag]},e.prototype.setContextFor=function(t){return this.currentFlag=t,this},e.prototype.reg=function(t,e){var i,n;return n=(i=this.controllers)[t]||(i[t]=this.$inputor.is(\"[contentEditable]\")?new l(this,t):new s(this,t)),e.alias&&(this.aliasMaps[e.alias]=t),n.init(e),this},e.prototype.listen=function(){return this.$inputor.on(\"compositionstart\",function(t){return function(e){var i;return null!=(i=t.controller())&&i.view.hide(),t.isComposing=!0,null}}(this)).on(\"compositionend\",function(t){return function(e){return t.isComposing=!1,setTimeout(function(e){return t.dispatch(e)}),null}}(this)).on(\"keyup.atwhoInner\",function(t){return function(e){return t.onKeyup(e)}}(this)).on(\"keydown.atwhoInner\",function(t){return function(e){return t.onKeydown(e)}}(this)).on(\"blur.atwhoInner\",function(t){return function(e){var i;return(i=t.controller())?(i.expectedQueryCBId=null,i.view.hide(e,i.getOpt(\"displayTimeout\"))):void 0}}(this)).on(\"click.atwhoInner\",function(t){return function(e){return t.dispatch(e)}}(this)).on(\"scroll.atwhoInner\",function(t){return function(){var e;return e=t.$inputor.scrollTop(),function(i){var n,r;return n=i.target.scrollTop,e!==n&&null!=(r=t.controller())&&r.view.hide(i),e=n,!0}}}(this)())},e.prototype.shutdown=function(){var t,e,i;i=this.controllers;for(t in i)e=i[t],e.destroy(),delete this.controllers[t];return this.$inputor.off(\".atwhoInner\"),this.$el.remove()},e.prototype.dispatch=function(t){var e,i,n,r;n=this.controllers,r=[];for(e in n)i=n[e],r.push(i.lookUp(t));return r},e.prototype.onKeyup=function(e){var n;switch(e.keyCode){case i.ESC:e.preventDefault(),null!=(n=this.controller())&&n.view.hide();break;case i.DOWN:case i.UP:case i.CTRL:case i.ENTER:t.noop();break;case i.P:case i.N:e.ctrlKey||this.dispatch(e);break;default:this.dispatch(e)}},e.prototype.onKeydown=function(e){var n,r;if(r=null!=(n=this.controller())?n.view:void 0,r&&r.visible())switch(e.keyCode){case i.ESC:e.preventDefault(),r.hide(e);break;case i.UP:e.preventDefault(),r.prev();break;case i.DOWN:e.preventDefault(),r.next();break;case i.P:if(!e.ctrlKey)return;e.preventDefault(),r.prev();break;case i.N:if(!e.ctrlKey)return;e.preventDefault(),r.next();break;case i.TAB:case i.ENTER:case i.SPACE:if(!r.visible())return;if(!this.controller().getOpt(\"spaceSelectsMatch\")&&e.keyCode===i.SPACE)return;if(!this.controller().getOpt(\"tabSelectsMatch\")&&e.keyCode===i.TAB)return;r.highlighted()?(e.preventDefault(),r.choose(e)):r.hide(e);break;default:t.noop()}},e}();var r,o=[].slice;r=function(){function i(e,i){this.app=e,this.at=i,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=t(\"#atwho-ground-\"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=t(\"<div id='atwho-ground-\"+this.id+\"'></div>\")),this.model=new u(this),this.view=new c(this)}return i.prototype.uid=function(){return(Math.random().toString(16)+\"000000000\").substr(2,8)+(new Date).getTime()},i.prototype.init=function(e){return this.setting=t.extend({},this.setting||t.fn.atwho[\"default\"],e),this.view.init(),this.model.reload(this.setting.data)},i.prototype.destroy=function(){return this.trigger(\"beforeDestroy\"),this.model.destroy(),this.view.destroy(),this.$el.remove()},i.prototype.callDefault=function(){var i,n,r,s;s=arguments[0],i=2<=arguments.length?o.call(arguments,1):[];try{return e[s].apply(this,i)}catch(r){return n=r,t.error(n+\" Or maybe At.js doesn't have function \"+s)}},i.prototype.trigger=function(t,e){var i,n;return null==e&&(e=[]),e.push(this),i=this.getOpt(\"alias\"),n=i?t+\"-\"+i+\".atwho\":t+\".atwho\",this.$inputor.trigger(n,e)},i.prototype.callbacks=function(t){return this.getOpt(\"callbacks\")[t]||e[t]},i.prototype.getOpt=function(t,e){var i,n;try{return this.setting[t]}catch(n){return i=n,null}},i.prototype.insertContentFor=function(e){var i,n;return n=this.getOpt(\"insertTpl\"),i=t.extend({},e.data(\"item-data\"),{\"atwho-at\":this.at}),this.callbacks(\"tplEval\").call(this,n,i,\"onInsert\")},i.prototype.renderView=function(t){var e;return e=this.getOpt(\"searchKey\"),t=this.callbacks(\"sorter\").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt(\"limit\")))},i.arrayToDefaultHash=function(e){var i,n,r,o;if(!t.isArray(e))return e;for(o=[],i=0,r=e.length;r>i;i++)n=e[i],t.isPlainObject(n)?o.push(n):o.push({name:n});return o},i.prototype.lookUp=function(t){var e,i;if((!t||\"click\"!==t.type||this.getOpt(\"lookUpOnClick\"))&&(!this.getOpt(\"suspendOnComposing\")||!this.app.isComposing))return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(i=this.getOpt(\"delay\"))?this._delayLookUp(e,i):this._lookUp(e),e):(this.expectedQueryCBId=null,e)},i.prototype._delayLookUp=function(t,e){var i,n;return i=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=i),n=e-(i-this.previousCallTime),n>0&&e>n?(this.previousCallTime=i,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout(function(e){return function(){return e.previousCallTime=0,e.delayedCallTimeout=null,e._lookUp(t)}}(this),e)):(this._stopDelayedCall(),this.previousCallTime!==i&&(this.previousCallTime=0),this._lookUp(t))},i.prototype._stopDelayedCall=function(){return this.delayedCallTimeout?(clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null):void 0},i.prototype._generateQueryCBId=function(){return{}},i.prototype._lookUp=function(e){var i;return i=function(t,e){return t===this.expectedQueryCBId?e&&e.length>0?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide():void 0},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(e.text,t.proxy(i,this,this.expectedQueryCBId))},i}();var s,a=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return a(i,e),i.prototype.catchQuery=function(){var t,e,i,n,r,o,s;return e=this.$inputor.val(),t=this.$inputor.caret(\"pos\",{iframe:this.app.iframe}),s=e.slice(0,t),r=this.callbacks(\"matcher\").call(this,this.at,s,this.getOpt(\"startWithSpace\"),this.getOpt(\"acceptSpaceBar\")),n=\"string\"==typeof r,n&&r.length<this.getOpt(\"minLen\",0)?void 0:(n&&r.length<=this.getOpt(\"maxLen\",20)?(o=t-r.length,i=o+r.length,this.pos=o,r={text:r,headPos:o,endPos:i},this.trigger(\"matched\",[this.at,r.text])):(r=null,this.view.hide()),this.query=r)},i.prototype.rect=function(){var e,i,n;if(e=this.$inputor.caret(\"offset\",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(i=t(this.app.iframe).offset(),e.left+=i.left,e.top+=i.top),n=this.app.document.selection?0:2,{left:e.left,top:e.top,bottom:e.top+e.height+n}},i.prototype.insert=function(t,e){var i,n,r,o,s;return i=this.$inputor,n=i.val(),r=n.slice(0,Math.max(this.query.headPos-this.at.length,0)),o=\"\"===(o=this.getOpt(\"suffix\"))?o:o||\" \",t+=o,s=\"\"+r+t+n.slice(this.query.endPos||0),i.val(s),i.caret(\"pos\",r.length+t.length,{iframe:this.app.iframe}),i.is(\":focus\")||i.focus(),i.change()},i}(r);var l,a=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return a(n,e),n.prototype._getRange=function(){var t;return t=this.app.window.getSelection(),t.rangeCount>0?t.getRangeAt(0):void 0},n.prototype._setRange=function(e,i,n){return null==n&&(n=this._getRange()),n&&i?(i=t(i)[0],\"after\"===e?(n.setEndAfter(i),n.setStartAfter(i)):(n.setEndBefore(i),n.setStartBefore(i)),n.collapse(!1),this._clearRange(n)):void 0},n.prototype._clearRange=function(t){var e;return null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed?(e.removeAllRanges(),e.addRange(t)):void 0},n.prototype._movingEvent=function(t){var e;return\"click\"===t.type||(e=t.which)===i.RIGHT||e===i.LEFT||e===i.UP||e===i.DOWN},n.prototype._unwrap=function(e){var i;return e=t(e).unwrap().get(0),(i=e.nextSibling)&&i.nodeValue&&(e.nodeValue+=i.nodeValue,t(i).remove()),e},n.prototype.catchQuery=function(e){var n,r,o,s,a,h,l,u,c,p,f,d;if((d=this._getRange())&&d.collapsed){if(e.which===i.ENTER)return(r=t(d.startContainer).closest(\".atwho-query\")).contents().unwrap(),r.is(\":empty\")&&r.remove(),(r=t(\".atwho-query\",this.app.document)).text(r.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(t(d.startContainer).is(this.$inputor))return void this._clearRange();e.which===i.BACKSPACE&&d.startContainer.nodeType===document.ELEMENT_NODE&&(c=d.startOffset-1)>=0?(o=d.cloneRange(),o.setStart(d.startContainer,c),t(o.cloneContents()).contents().last().is(\".atwho-inserted\")&&(a=t(d.startContainer).contents().get(c),this._setRange(\"after\",t(a).contents().last()))):e.which===i.LEFT&&d.startContainer.nodeType===document.TEXT_NODE&&(n=t(d.startContainer.previousSibling),n.is(\".atwho-inserted\")&&0===d.startOffset&&this._setRange(\"after\",n.contents().last()))}if(t(d.startContainer).closest(\".atwho-inserted\").addClass(\"atwho-query\").siblings().removeClass(\"atwho-query\"),(r=t(\".atwho-query\",this.app.document)).length>0&&r.is(\":empty\")&&0===r.text().length&&r.remove(),this._movingEvent(e)||r.removeClass(\"atwho-inserted\"),r.length>0)switch(e.which){case i.LEFT:return this._setRange(\"before\",r.get(0),d),void r.removeClass(\"atwho-query\");case i.RIGHT:return this._setRange(\"after\",r.get(0).nextSibling,d),void r.removeClass(\"atwho-query\")}if(r.length>0&&(f=r.attr(\"data-atwho-at-query\"))&&(r.empty().html(f).attr(\"data-atwho-at-query\",null),this._setRange(\"after\",r.get(0),d)),o=d.cloneRange(),o.setStart(d.startContainer,0),u=this.callbacks(\"matcher\").call(this,this.at,o.toString(),this.getOpt(\"startWithSpace\"),this.getOpt(\"acceptSpaceBar\")),h=\"string\"==typeof u,0===r.length&&h&&(s=d.startOffset-this.at.length-u.length)>=0&&(d.setStart(d.startContainer,s),r=t(\"<span/>\",this.app.document).attr(this.getOpt(\"editableAtwhoQueryAttrs\")).addClass(\"atwho-query\"),d.surroundContents(r.get(0)),l=r.contents().last().get(0),l&&(/firefox/i.test(navigator.userAgent)?(d.setStart(l,l.length),d.setEnd(l,l.length),this._clearRange(d)):this._setRange(\"after\",l,d))),!(h&&u.length<this.getOpt(\"minLen\",0)))return h&&u.length<=this.getOpt(\"maxLen\",20)?(p={text:u,el:r},this.trigger(\"matched\",[this.at,p.text]),this.query=p):(this.view.hide(),this.query={el:r},r.text().indexOf(this.at)>=0&&(this._movingEvent(e)&&r.hasClass(\"atwho-inserted\")?r.removeClass(\"atwho-query\"):!1!==this.callbacks(\"afterMatchFailed\").call(this,this.at,r)&&this._setRange(\"after\",this._unwrap(r.text(r.text()).contents().first()))),null)}},n.prototype.rect=function(){var e,i,n;return n=this.query.el.offset(),n&&this.query.el[0].getClientRects().length?(this.app.iframe&&!this.app.iframeAsRoot&&(i=(e=t(this.app.iframe)).offset(),n.left+=i.left-this.$inputor.scrollLeft(),n.top+=i.top-this.$inputor.scrollTop()),n.bottom=n.top+this.query.el.height(),n):void 0},n.prototype.insert=function(t,e){var i,n,r,o,s;return this.$inputor.is(\":focus\")||this.$inputor.focus(),n=this.getOpt(\"functionOverrides\"),n.insert?n.insert.call(this,t,e):(o=\"\"===(o=this.getOpt(\"suffix\"))?o:o||\" \",i=e.data(\"item-data\"),this.query.el.removeClass(\"atwho-query\").addClass(\"atwho-inserted\").html(t).attr(\"data-atwho-at-query\",\"\"+i[\"atwho-at\"]+this.query.text).attr(\"contenteditable\",\"false\"),(r=this._getRange())&&(this.query.el.length&&r.setEndAfter(this.query.el[0]),r.collapse(!1),r.insertNode(s=this.app.document.createTextNode(\"\"+o)),this._setRange(\"after\",s,r)),this.$inputor.is(\":focus\")||this.$inputor.focus(),this.$inputor.change())},n}(r);var u;u=function(){function e(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}return e.prototype.destroy=function(){return this.storage.data(this.at,null)},e.prototype.saved=function(){return this.fetch()>0},e.prototype.query=function(t,e){var i,n,r;return n=this.fetch(),r=this.context.getOpt(\"searchKey\"),n=this.context.callbacks(\"filter\").call(this.context,t,n,r)||[],i=this.context.callbacks(\"remoteFilter\"),n.length>0||!i&&0===n.length?e(n):i.call(this.context,t,e)},e.prototype.fetch=function(){return this.storage.data(this.at)||[]},e.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks(\"beforeSave\").call(this.context,t||[]))},e.prototype.load=function(t){return!this.saved()&&t?this._load(t):void 0},e.prototype.reload=function(t){return this._load(t)},e.prototype._load=function(e){return\"string\"==typeof e?t.ajax(e,{dataType:\"json\"}).done(function(t){return function(e){return t.save(e)}}(this)):this.save(e)},e}();var c;c=function(){function e(e){this.context=e,this.$el=t(\"<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>\"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return e.prototype.init=function(){var t,e;return e=this.context.getOpt(\"alias\")||this.context.at.charCodeAt(0),t=this.context.getOpt(\"headerTpl\"),t&&1===this.$el.children().length&&this.$el.prepend(t),this.$el.attr({id:\"at-view-\"+e})},e.prototype.destroy=function(){return this.$el.remove()},e.prototype.bindEvent=function(){var e,i,n;return e=this.$el.find(\"ul\"),i=0,n=0,e.on(\"mousemove.atwho-view\",\"li\",function(r){return function(r){var o;if((i!==r.clientX||n!==r.clientY)&&(i=r.clientX,n=r.clientY,o=t(r.currentTarget),!o.hasClass(\"cur\")))return e.find(\".cur\").removeClass(\"cur\"),o.addClass(\"cur\")}}(this)).on(\"click.atwho-view\",\"li\",function(i){return function(n){return e.find(\".cur\").removeClass(\"cur\"),t(n.currentTarget).addClass(\"cur\"),i.choose(n),n.preventDefault()}}(this))},e.prototype.visible=function(){return t.expr.filters.visible(this.$el[0])},e.prototype.highlighted=function(){return this.$el.find(\".cur\").length>0},e.prototype.choose=function(t){var e,i;return(e=this.$el.find(\".cur\")).length&&(i=this.context.insertContentFor(e),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks(\"beforeInsert\").call(this.context,i,e,t),e),this.context.trigger(\"inserted\",[e,t]),this.hide(t)),this.context.getOpt(\"hideWithoutSuffix\")?this.stopShowing=!0:void 0},e.prototype.reposition=function(e){var i,n,r,o;return i=this.context.app.iframeAsRoot?this.context.app.window:window,e.bottom+this.$el.height()-t(i).scrollTop()>t(i).height()&&(e.bottom=e.top-this.$el.height()),e.left>(r=t(i).width()-this.$el.width()-5)&&(e.left=r),n={left:e.left,top:e.bottom},null!=(o=this.context.callbacks(\"beforeReposition\"))&&o.call(this.context,n),this.$el.offset(n),this.context.trigger(\"reposition\",[n])},e.prototype.next=function(){var t,e,i,n;return t=this.$el.find(\".cur\").removeClass(\"cur\"),e=t.next(),e.length||(e=this.$el.find(\"li:first\")),e.addClass(\"cur\"),i=e[0],n=i.offsetTop+i.offsetHeight+(i.nextSibling?i.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},e.prototype.prev=function(){var t,e,i,n;return t=this.$el.find(\".cur\").removeClass(\"cur\"),i=t.prev(),i.length||(i=this.$el.find(\"li:last\")),i.addClass(\"cur\"),n=i[0],e=n.offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,e-this.$el.height()))},e.prototype.scrollTop=function(t){var e;return e=this.context.getOpt(\"scrollDuration\"),e?this.$elUl.animate({scrollTop:t},e):this.$elUl.scrollTop(t)},e.prototype.show=function(){var t;return this.stopShowing?void(this.stopShowing=!1):(this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger(\"shown\")),(t=this.context.rect())?this.reposition(t):void 0)},e.prototype.hide=function(t,e){var i;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger(\"hidden\",[t])):(i=function(t){return function(){return t.hide()}}(this),clearTimeout(this.timeoutID),this.timeoutID=setTimeout(i,e))},e.prototype.render=function(e){var i,n,r,o,s,a,h;if(!(t.isArray(e)&&e.length>0))return void this.hide();for(this.$el.find(\"ul\").empty(),n=this.$el.find(\"ul\"),h=this.context.getOpt(\"displayTpl\"),r=0,s=e.length;s>r;r++)o=e[r],o=t.extend({},o,{\"atwho-at\":this.context.at}),a=this.context.callbacks(\"tplEval\").call(this.context,h,o,\"onDisplay\"),i=t(this.context.callbacks(\"highlighter\").call(this.context,a,this.context.query.text)),i.data(\"item-data\",o),n.append(i);return this.show(),this.context.getOpt(\"highlightFirst\")?n.find(\"li:first\").addClass(\"cur\"):void 0},e}();var p;p={load:function(t,e){var i;return(i=this.controller(t))?i.model.load(e):void 0},isSelecting:function(){var t;return!!(null!=(t=this.controller())?t.view.visible():void 0)},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;return(t=this.controller())?t.view.reposition(t.rect()):void 0},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data(\"atwho\",null)}},t.fn.atwho=function(e){var i,r;return i=arguments,r=null,this.filter('textarea, input, [contenteditable=\"\"], [contenteditable=true]').each(function(){var o,s;return(s=(o=t(this)).data(\"atwho\"))||o.data(\"atwho\",s=new n(this)),\"object\"!=typeof e&&e?p[e]&&s?r=p[e].apply(s,Array.prototype.slice.call(i,1)):t.error(\"Method \"+e+\" does not exist on jQuery.atwho\"):s.reg(e.at,e)}),null!=r?r:this},t.fn.atwho[\"default\"]={at:void 0,alias:void 0,data:null,displayTpl:\"<li>${name}</li>\",insertTpl:\"${atwho-at}${name}\",headerTpl:null,callbacks:e,functionOverrides:{},searchKey:\"name\",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},t.fn.atwho.debug=!1});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./autocomplete.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"8e87fa8e\", content, true, {});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".atwho-view{position:absolute;top:0;left:0;display:none;margin-top:18px;background:var(--color-main-background);color:var(--color-main-text);border:1px solid var(--color-border);border-radius:var(--border-radius);box-shadow:0 0 5px var(--color-box-shadow);min-width:120px;z-index:11110 !important}.atwho-view .atwho-header{padding:5px;margin:5px;cursor:pointer;border-bottom:solid 1px var(--color-border);color:var(--color-main-text);font-size:11px;font-weight:bold}.atwho-view .atwho-header .small{color:var(--color-main-text);float:right;padding-top:2px;margin-right:-5px;font-size:12px;font-weight:normal}.atwho-view .atwho-header:hover{cursor:default}.atwho-view .cur{background:var(--color-primary);color:var(--color-primary-text)}.atwho-view .cur small{color:var(--color-primary-text)}.atwho-view strong{color:var(--color-main-text);font-weight:normal}.atwho-view .cur strong{color:var(--color-primary-text);font-weight:normal}.atwho-view ul{list-style:none;padding:0;margin:auto;max-height:200px;overflow-y:auto}.atwho-view ul li{display:block;padding:5px 10px;border-bottom:1px solid var(--color-border);cursor:pointer}.atwho-view small{font-size:smaller;color:var(--color-main-text);font-weight:normal}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./comments.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"477a5c21\", content, true, {});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#commentsTabView .emptycontent{margin-top:0}#commentsTabView .newCommentForm{margin-left:36px;position:relative}#commentsTabView .newCommentForm .message{width:100%;padding:10px;min-height:44px;margin:0;padding-right:30px}#commentsTabView .newCommentForm .submit,#commentsTabView .newCommentForm .submitLoading{width:44px;height:44px;margin:0;padding:13px;background-color:transparent;border:none;opacity:.3;position:absolute;bottom:0;right:0}#commentsTabView .deleteLoading{padding:14px;vertical-align:middle}#commentsTabView .newCommentForm .submit:not(:disabled):hover,#commentsTabView .newCommentForm .submit:not(:disabled):focus{opacity:1}#commentsTabView .newCommentForm div.message{resize:none}#commentsTabView .newCommentForm div.message:empty:before{content:attr(data-placeholder);color:grey}#commentsTabView .comment{position:relative;padding:10px 0 15px}#commentsTabView .comments .comment{border-top:1px solid var(--color-border)}#commentsTabView .comment .avatar,.atwho-view-ul * .avatar{width:32px;height:32px;line-height:32px;margin-right:5px}#commentsTabView .comment .message .avatar,.atwho-view-ul * .avatar{display:inline-block}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{white-space:pre-wrap}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{max-height:70px;overflow:hidden}#activityTabView li.comment .message-overlay,#commentsTabView .comment .message-overlay{display:none}#activityTabView li.comment.collapsed .message-overlay,#commentsTabView .comment.collapsed .message-overlay{display:block;position:absolute;z-index:2;height:50px;pointer-events:none;left:0;right:0;bottom:0;background:-moz-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-webkit-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-o-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-ms-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background-repeat:no-repeat}#commentsTabView .hidden{display:none !important}#commentsTabView .comment .authorRow{min-height:44px}#commentsTabView .comment .authorRow .tooltip{margin-top:5px}.atwho-view-ul * .avatar-name-wrapper,#commentsTabView .comment .authorRow{position:relative;display:inline-flex;align-items:center;width:100%}#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser),#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar,#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar img,#commentsTabView .comment .authorRow .avatar:not(.currentUser),#commentsTabView .comment .authorRow .author:not(.currentUser){cursor:pointer}.atwho-view-ul .avatar-name-wrapper,.atwho-view-ul .avatar-name-wrapper .avatar,.atwho-view-ul .avatar-name-wrapper .avatar img{cursor:pointer}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper{position:relative;display:inline;vertical-align:top;background-color:var(--color-background-dark);border-radius:50vh;padding:1px 7px 1px 1px;white-space:nowrap}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar{height:16px;width:16px;vertical-align:middle;padding:1px;margin-top:-3px;margin-left:0;margin-right:2px}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar img,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar img{vertical-align:top}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper strong,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper strong{font-weight:bold}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper.currentUser,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper.currentUser{background-color:var(--color-primary);color:var(--color-primary-text)}.atwho-view-ul * .avatar-name-wrapper{white-space:nowrap}#commentsTabView .comment .author,#commentsTabView .comment .date{opacity:.5}#commentsTabView .comment .author{max-width:210px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#commentsTabView .comment .date{margin-left:auto;padding:10px 0px}#commentsTabView .comments>li:not(.newCommentRow) .message{padding-left:40px;word-wrap:break-word;overflow-wrap:break-word}#commentsTabView .comment .action{opacity:0.3;padding:14px;display:block}#commentsTabView .comment .action:hover,#commentsTabView .comment .action:focus{opacity:1}#commentsTabView .newCommentRow .action-container{margin-left:auto}#commentsTabView .comment.disabled .message{opacity:0.3}#commentsTabView .comment.disabled .action{display:none}#commentsTabView .message.error{color:#e9322d;border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.app-files .action-comment{padding:16px 14px}#commentsTabView .comment .message .contactsmenu-popover{left:-6px;top:24px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"jQuery\"","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js","webpack:///./apps/comments/src/comments.js","webpack:///./apps/comments/src/app.js","webpack:///./apps/comments/src/templates.js","webpack:///./apps/comments/src/commentmodel.js","webpack:///./apps/comments/src/commentcollection.js","webpack:///./apps/comments/src/commentsummarymodel.js","webpack:///./apps/comments/src/commentstabview.js","webpack:///./apps/comments/src/commentsmodifymenu.js","webpack:///./apps/comments/src/filesplugin.js","webpack:///./apps/comments/src/activitytabviewplugin.js","webpack:///./apps/comments/src/search.js","webpack:///./apps/comments/src/vendor/Caret.js/dist/jquery.caret.min.js","webpack:///./apps/comments/src/vendor/At.js/dist/js/jquery.atwho.min.js","webpack:///./apps/comments/src/style/autocomplete.scss?75bd","webpack:///./apps/comments/src/style/autocomplete.scss","webpack:///./apps/comments/src/style/comments.scss?fd56","webpack:///./apps/comments/src/style/comments.scss"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","jQuery","useSourceMap","list","toString","this","map","item","content","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","data","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","length","push","listToStyles","parentId","styles","newStyles","id","part","css","media","parts","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","noop","options","isOldIE","navigator","test","userAgent","toLowerCase","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","type","appendChild","obj","update","remove","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","filter","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild","window","OCA","Comments","template","templates","Handlebars","Templates","container","depth0","helpers","partials","helper","escapeExpression","actorId","helperMissing","nullContext","stack1","alias1","alias2","alias3","alias4","isUnread","program","isLong","isUserAuthor","actorDisplayName","timestamp","altDate","date","formattedMessage","iconClass","displayName","each","items","cancelText","tag","isEditMode","newMessagePlaceholder","message","submitText","countMessage","iconUrl","emptyResultLabel","moreLabel","OC","_","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_MESSAGE","PROPERTY_ACTORTYPE","PROPERTY_ACTORID","PROPERTY_ISUNREAD","PROPERTY_OBJECTID","PROPERTY_OBJECTTYPE","PROPERTY_ACTORDISPLAYNAME","PROPERTY_CREATIONDATETIME","PROPERTY_MENTIONS","CommentModel","Backbone","Model","sync","davSync","defaults","actorType","objectType","davProperties","parse","creationDateTime","objectId","mentions","_parseMentions","isUndefined","result","mention","localName","child","nextSibling","startsWith","textContent","CommentCollection","Collection","model","_objectType","_objectId","_endReached","_limit","initialize","models","url","linkToRemote","setObjectId","hasMoreResults","reset","_summaryModel","apply","arguments","fetchNext","self","body","success","resp","initial","set","trigger","getSummaryModel","CommentSummaryModel","updateReadMarker","save","readMarker","Date","toUTCString","PROPERTY_READMARKER","attrs","CommentsTabView","DetailTabView","className","_autoCompleteData","undefined","_commentsModifyMenu","events","_commentMaxLength","collection","on","_onRequest","_onEndRequest","_onAddModel","_onChangeModel","_commentMaxThreshold","bindAll","params","currentUser","getCurrentUser","uid","editCommentTemplate","commentTemplate","editTooltip","_isLong","getLabel","getIcon","setFileInfo","fileInfo","render","_initAutoComplete","$","find","silent","nextPage","$el","html","before","tooltip","$container","avatar","delegateEvents","_onTypeComment","autosize","focus","$target","limit","appConfig","comments","maxAutoCompleteResults","atwho","at","callbacks","remoteFilter","_onAutoComplete","highlighter","li","$li","sorter","q","displayTpl","escapeHTML","label","insertTpl","searchKey","je","_postRenderItem","target","parent","query","callback","_autoCompleteRequestTimer","clearTimeout","delay","_autoCompleteRequestCall","abort","ajax","linkToOCS","search","itemType","itemId","beforeSend","request","setRequestHeader","ocs","_formatItem","commentModel","getTime","Util","relativeModifiedDate","formatDate","_formatMessage","attributes","_toggleLoading","state","_loading","toggleClass","addClass","fileInfoModel","findWhere","$comment","eq","append","text","prop","oldMentions","fetch","isEqual","$updated","trim","previous","$row","closest","removeClass","$message","editionMode","inlineAvatars","context","hasClass","$this","attr","username","contactsMenu","modifyCommentMenu","CommentsModifyMenu","show","listenTo","ev","action","_onClickEditComment","_onClickDeleteComment","_postRenderMessage","user","editMode","replace","mentionId","indexOf","escape","regex","RegExp","_composeHTMLMention","mentionDisplayName","match","p1","OCP","plainToRich","preventDefault","commentId","commentToEdit","$formRow","after","replaceWith","clone","$field","len","$submitButton","count","max","limitExceeded","keyCode","shiftKey","click","_onClickComment","is","_onClickCloseComment","$loading","$moreIcon","destroy","error","Notification","showTemporary","_onClickShowMore","_onSubmitSuccess","$form","$submit","_commentBodyHTML2Plain","oldHtml","$inserted","userId","richToPlain","_onSubmitComment","e","$commentField","_onSubmitError","verb","wait","_onTextChange","empty","_onPaste","originalEvent","clipboardData","getData","execCommand","View","tagName","_scopes","_onClickAction","event","currentTarget","hideMenus","_context","active","offsetIcon","offset","offsetContainer","position","top","left","right","width","showMenu","PROPERTY_COMMENTS_UNREAD","FilesPlugin","ignoreLists","_formatCommentCount","imagePath","attach","fileList","registerTabView","oldGetWebdavProperties","_getWebdavProperties","props","filesClient","addFileInfoParser","response","commentsUnread","propStat","properties","parseInt","oldCreateRow","_createRow","fileData","$tr","fileActions","registerAction","$file","unread","mime","order","permissions","PERMISSION_READ","FileActions","TYPE_INLINE","actionSpec","isDefault","unreadComments","$actionLink","actionHandler","fileName","showDetailsView","oldElementToFile","elementToFile","Plugins","register","ActivityTabViewPlugin","prepareModelForDisplay","view","$overlay","_onClickCollapsedComment","Comment","fileAppLoaded","App","renderCommentResult","$nofilterresults","updateLegacyMimetype","$pathDiv","path","$avatar","authorName","authorId","comment","prepend","link","dir","dirname","generateUrl","scrollto","handleCommentClick","changeDirectory","scrollTo","mime_type","setFileList","setRenderer","setHandler","Search","a","define","returnExportsGlobal","b","g","h","$inputor","domInputor","setPos","getIEPosition","getPosition","getOffset","getOldIEPos","selection","createRange","createTextRange","moveToElementText","setEndPoint","getPos","range","cloneRange","selectNodeContents","setEnd","endContainer","endOffset","detach","getOldIEOffset","duplicate","moveStart","height","getBoundingClientRect","bottom","f","getSelection","setStart","insertNode","selectNode","scrollTop","scrollLeft","rangeCount","getRangeAt","getIEPos","parentElement","moveToBookmark","getBookmark","collapse","compareEndPoints","selectionStart","move","select","setSelectionRange","getIEOffset","boundingLeft","boundingTop","boundingHeight","val","slice","rect","css_attr","mirrorCss","zIndex","$mirror","contentEditable","pos","iframe","contentWindow","contentDocument","fn","caret","isPlainObject","EditableCaret","InputCaret","Utils","apis","ESC","TAB","ENTER","CTRL","A","P","N","LEFT","UP","RIGHT","DOWN","BACKSPACE","SPACE","beforeSave","arrayToDefaultHash","matcher","decodeURI","exec","String","atwho_order","sort","tplEval","beforeInsert","beforeReposition","afterMatchFailed","currentFlag","controllers","aliasMaps","setupRootElement","listen","createContainer","ownerDocument","defaultView","parentWindow","frameElement","debug","iframeAsRoot","controller","setContextFor","reg","alias","init","hide","isComposing","setTimeout","dispatch","onKeyup","onKeydown","expectedQueryCBId","getOpt","shutdown","off","lookUp","ctrlKey","visible","prev","next","highlighted","choose","app","setting","u","Math","random","substr","reload","callDefault","insertContentFor","renderView","isArray","catchQuery","_delayLookUp","_lookUp","now","previousCallTime","_stopDelayedCall","delayedCallTimeout","_generateQueryCBId","constructor","proxy","__super__","headPos","endPos","insert","change","_getRange","_setRange","setEndAfter","setStartAfter","setEndBefore","setStartBefore","_clearRange","ctrl_a_pressed","removeAllRanges","addRange","_movingEvent","which","_unwrap","unwrap","nodeValue","collapsed","startContainer","contents","last","nodeType","ELEMENT_NODE","startOffset","cloneContents","TEXT_NODE","previousSibling","siblings","surroundContents","el","first","getClientRects","storage","saved","load","_load","dataType","done","$elUl","children","timeoutID","bindEvent","charCodeAt","clientX","clientY","expr","filters","stopShowing","reposition","offsetTop","offsetHeight","animate","isNaN","isSelecting","setIframe","run","Array","headerTpl","functionOverrides","suffix","hideWithoutSuffix","startWithSpace","acceptSpaceBar","highlightFirst","maxLen","minLen","displayTimeout","spaceSelectsMatch","tabSelectsMatch","editableAtwhoQueryAttrs","scrollDuration","suspendOnComposing","lookUpOnClick","locals","add","default","___CSS_LOADER_API_IMPORT___"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,a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AAkB,GAAGpb,UAAU,OAAOqb,YAAO,EAAOC,mBAAkB,EAAGC,gBAAe,EAAGC,gBAAe,EAAGC,gBAAe,EAAG3c,MAAM,EAAE4c,OAAO,GAAGC,OAAO,EAAEC,eAAe,IAAInb,MAAM,KAAKob,mBAAkB,EAAGC,iBAAgB,EAAGC,wBAAwB,GAAGC,eAAe,IAAIC,oBAAmB,EAAGC,eAAc,GAAIjuB,EAAE+jB,GAAG9S,MAAMwV,OAAM,EAAx6nBrN,CAAEpZ,IAAjC,4B,gBCG3D,IAAIqB,EAAU,EAAQ,IACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACxC,EAAOC,EAAIuC,EAAS,MAC7DA,EAAQ6sB,SAAQrvB,EAAOD,QAAUyC,EAAQ6sB,SAG/BC,EADH,EAAQ,GAAqEC,SACtE,WAAY/sB,GAAS,EAAM,K,iBCN5CzC,EADkC,EAAQ,EAChCyvB,EAA4B,IAE9B5rB,KAAK,CAAC5D,EAAOC,EAAI,gsCAAisC,KAE1tCD,EAAOD,QAAUA,G,gBCHjB,IAAIyC,EAAU,EAAQ,IACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACxC,EAAOC,EAAIuC,EAAS,MAC7DA,EAAQ6sB,SAAQrvB,EAAOD,QAAUyC,EAAQ6sB,SAG/BC,EADH,EAAQ,GAAqEC,SACtE,WAAY/sB,GAAS,EAAM,K,iBCN5CzC,EADkC,EAAQ,EAChCyvB,EAA4B,IAE9B5rB,KAAK,CAAC5D,EAAOC,EAAI,krKAAmrK,KAE5sKD,EAAOD,QAAUA","file":"comments.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","module.exports = jQuery;","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n for (var i = 0; i < modules.length; i++) {\n var item = [].concat(modules[i]);\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n","import './app'\nimport './templates'\nimport './commentmodel'\nimport './commentcollection'\nimport './commentsummarymodel'\nimport './commentstabview'\nimport './commentsmodifymenu'\nimport './filesplugin'\nimport './activitytabviewplugin'\nimport './search'\n\nimport './vendor/Caret.js/dist/jquery.caret.min'\nimport './vendor/At.js/dist/js/jquery.atwho.min'\n\nimport './style/autocomplete.scss'\nimport './style/comments.scss'\n\nwindow.OCA.Comments = OCA.Comments\n","/*\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n})()\n","(function() {\n var template = Handlebars.template, templates = OCA.Comments.Templates = OCA.Comments.Templates || {};\ntemplates['comment'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" unread\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \" collapsed\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \" currentUser\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"data-username=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.actorId || (depth0 != null ? depth0.actorId : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"actorId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"\";\n},\"9\":function(container,depth0,helpers,partials,data) {\n return \"\t\t\t<a href=\\\"#\\\" class=\\\"action more icon icon-more has-tooltip\\\"></a>\\n\t\t\t<div class=\\\"deleteLoading icon-loading-small hidden\\\"></div>\\n\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n return \"\t\t<div class=\\\"message-overlay\\\"></div>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<li class=\\\"comment\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUnread : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isLong : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t<div class=\\\"authorRow\\\">\\n\t\t<div class=\\\"avatar\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.actorId : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"> </div>\\n\t\t<div class=\\\"author\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"actorDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<div class=\\\"date has-tooltip live-relative-timestamp\\\" data-timestamp=\\\"\"\n + alias4(((helper = (helper = helpers.timestamp || (depth0 != null ? depth0.timestamp : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"timestamp\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.altDate || (depth0 != null ? depth0.altDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"altDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.date || (depth0 != null ? depth0.date : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"date\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\t</div>\\n\t<div class=\\\"message\\\">\"\n + ((stack1 = ((helper = (helper = helpers.formattedMessage || (depth0 != null ? depth0.formattedMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"formattedMessage\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</div>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isLong : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</li>\\n\";\n},\"useData\":true});\ntemplates['commentsmodifymenu'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"menuitem action \"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \" permanent\\\" data-action=\\\"\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.iconClass : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.program(4, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t<span>\"\n + alias4(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"displayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t</a>\\n\t\t</li>\\n\";\n},\"2\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t\t\t\t<span class=\\\"icon \"\n + container.escapeExpression(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"iconClass\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></span>\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n return \"\t\t\t\t\t<span class=\\\"no-icon\\\"></span>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \"<ul>\\n\"\n + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.items : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</ul>\\n\";\n},\"useData\":true});\ntemplates['edit_comment'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t\t<div class=\\\"action-container\\\">\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"action cancel icon icon-close has-tooltip\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.cancelText || (depth0 != null ? depth0.cancelText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"cancelText\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t\t</div>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<\"\n + alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"tag\",\"hash\":{},\"data\":data}) : helper)))\n + \" class=\\\"newCommentRow comment\\\" data-id=\\\"\"\n + alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t<div class=\\\"authorRow\\\">\\n\t\t<div class=\\\"avatar currentUser\\\" data-username=\\\"\"\n + alias4(((helper = (helper = helpers.actorId || (depth0 != null ? depth0.actorId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"actorId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></div>\\n\t\t<div class=\\\"author currentUser\\\">\"\n + alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"actorDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isEditMode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t</div>\\n\t<form class=\\\"newCommentForm\\\">\\n\t\t<div contentEditable=\\\"true\\\" class=\\\"message\\\" data-placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.newMessagePlaceholder || (depth0 != null ? depth0.newMessagePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newMessagePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"message\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\\n\t\t<input class=\\\"submit icon-confirm has-tooltip\\\" type=\\\"submit\\\" value=\\\"\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.submitText || (depth0 != null ? depth0.submitText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"submitText\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t<div class=\\\"submitLoading icon-loading-small hidden\\\"></div>\\n\t</form>\\n</\"\n + alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"tag\",\"hash\":{},\"data\":data}) : helper)))\n + \">\\n\";\n},\"useData\":true});\ntemplates['filesplugin'] = template({\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<a class=\\\"action action-comment permanent\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.countMessage || (depth0 != null ? depth0.countMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"countMessage\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" href=\\\"#\\\">\\n\t<img class=\\\"svg\\\" src=\\\"\"\n + alias4(((helper = (helper = helpers.iconUrl || (depth0 != null ? depth0.iconUrl : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"iconUrl\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n</a>\\n\";\n},\"useData\":true});\ntemplates['view'] = template({\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<ul class=\\\"comments\\\">\\n</ul>\\n<div class=\\\"emptycontent hidden\\\"><div class=\\\"icon-comment\\\"></div>\\n\t<p>\"\n + alias4(((helper = (helper = helpers.emptyResultLabel || (depth0 != null ? depth0.emptyResultLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"emptyResultLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p></div>\\n<input type=\\\"button\\\" class=\\\"showMore hidden\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.moreLabel || (depth0 != null ? depth0.moreLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"moreLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" name=\\\"show-more\\\" id=\\\"show-more\\\" />\\n<div class=\\\"loading hidden\\\" style=\\\"height: 50px\\\"></div>\\n\";\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC, OCA) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_MESSAGE: '{' + OC.Files.Client.NS_OWNCLOUD + '}message',\n\t\tPROPERTY_ACTORTYPE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}actorType',\n\t\tPROPERTY_ACTORID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}actorId',\n\t\tPROPERTY_ISUNREAD:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}isUnread',\n\t\tPROPERTY_OBJECTID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}objectId',\n\t\tPROPERTY_OBJECTTYPE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}objectType',\n\t\tPROPERTY_ACTORDISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}actorDisplayName',\n\t\tPROPERTY_CREATIONDATETIME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}creationDateTime',\n\t\tPROPERTY_MENTIONS: '{' + OC.Files.Client.NS_OWNCLOUD + '}mentions',\n\t})\n\n\t/**\n\t * @class OCA.Comments.CommentModel\n\t * @classdesc\n\t *\n\t * Comment\n\t *\n\t */\n\tconst CommentModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.Comments.CommentModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tactorType: 'users',\n\t\t\t\tobjectType: 'files',\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t\t'message':\tOC.Files.Client.PROPERTY_MESSAGE,\n\t\t\t\t'actorType':\tOC.Files.Client.PROPERTY_ACTORTYPE,\n\t\t\t\t'actorId':\tOC.Files.Client.PROPERTY_ACTORID,\n\t\t\t\t'actorDisplayName':\tOC.Files.Client.PROPERTY_ACTORDISPLAYNAME,\n\t\t\t\t'creationDateTime':\tOC.Files.Client.PROPERTY_CREATIONDATETIME,\n\t\t\t\t'objectType':\tOC.Files.Client.PROPERTY_OBJECTTYPE,\n\t\t\t\t'objectId':\tOC.Files.Client.PROPERTY_OBJECTID,\n\t\t\t\t'isUnread':\tOC.Files.Client.PROPERTY_ISUNREAD,\n\t\t\t\t'mentions': OC.Files.Client.PROPERTY_MENTIONS,\n\t\t\t},\n\n\t\t\tparse: function(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tmessage: data.message,\n\t\t\t\t\tactorType: data.actorType,\n\t\t\t\t\tactorId: data.actorId,\n\t\t\t\t\tactorDisplayName: data.actorDisplayName,\n\t\t\t\t\tcreationDateTime: data.creationDateTime,\n\t\t\t\t\tobjectType: data.objectType,\n\t\t\t\t\tobjectId: data.objectId,\n\t\t\t\t\tisUnread: (data.isUnread === 'true'),\n\t\t\t\t\tmentions: this._parseMentions(data.mentions),\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_parseMentions: function(mentions) {\n\t\t\t\tif (_.isUndefined(mentions)) {\n\t\t\t\t\treturn {}\n\t\t\t\t}\n\t\t\t\tconst result = {}\n\t\t\t\tfor (const i in mentions) {\n\t\t\t\t\tconst mention = mentions[i]\n\t\t\t\t\tif (_.isUndefined(mention.localName) || mention.localName !== 'mention') {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tresult[i] = {}\n\t\t\t\t\tfor (let child = mention.firstChild; child; child = child.nextSibling) {\n\t\t\t\t\t\tif (_.isUndefined(child.localName) || !child.localName.startsWith('mention')) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult[i][child.localName] = child.textContent\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result\n\t\t\t},\n\t\t})\n\n\tOCA.Comments.CommentModel = CommentModel\n})(OC, OCA)\n","/* eslint-disable */\n/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC, OCA) {\n\n\t/**\n\t * @class OCA.Comments.CommentCollection\n\t * @classdesc\n\t *\n\t * Collection of comments assigned to a file\n\t *\n\t */\n\tvar CommentCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OCA.Comments.CommentCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OCA.Comments.CommentModel,\n\n\t\t\t/**\n\t\t * Object type\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\t/**\n\t\t * Object id\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t * True if there are no more page results left to fetch\n\t\t *\n\t\t * @type bool\n\t\t */\n\t\t\t_endReached: false,\n\n\t\t\t/**\n\t\t * Number of comments to fetch per page\n\t\t *\n\t\t * @type int\n\t\t */\n\t\t\t_limit: 20,\n\n\t\t\t/**\n\t\t * Initializes the collection\n\t\t *\n\t\t * @param {string} [options.objectType] object type\n\t\t * @param {string} [options.objectId] object id\n\t\t */\n\t\t\tinitialize: function(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (options.objectType) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t\tif (options.objectId) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t},\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/comments/'\n\t\t\t\t+ encodeURIComponent(this._objectType) + '/'\n\t\t\t\t+ encodeURIComponent(this._objectId) + '/'\n\t\t\t},\n\n\t\t\tsetObjectId: function(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\thasMoreResults: function() {\n\t\t\t\treturn !this._endReached\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis._endReached = false\n\t\t\t\tthis._summaryModel = null\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Fetch the next set of results\n\t\t */\n\t\t\tfetchNext: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\tif (!this.hasMoreResults()) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\n\t\t\t\tvar body = '<?xml version=\"1.0\" encoding=\"utf-8\" ?>\\n'\n\t\t\t\t+ '<oc:filter-comments xmlns:D=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\\n'\n\t\t\t\t// load one more so we know there is more\n\t\t\t\t+ ' <oc:limit>' + (this._limit + 1) + '</oc:limit>\\n'\n\t\t\t\t+ ' <oc:offset>' + this.length + '</oc:offset>\\n'\n\t\t\t\t+ '</oc:filter-comments>\\n'\n\n\t\t\t\toptions = options || {}\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({\n\t\t\t\t\tremove: false,\n\t\t\t\t\tparse: true,\n\t\t\t\t\tdata: body,\n\t\t\t\t\tdavProperties: CommentCollection.prototype.model.prototype.davProperties,\n\t\t\t\t\tsuccess: function(resp) {\n\t\t\t\t\t\tif (resp.length <= self._limit) {\n\t\t\t\t\t\t// no new entries, end reached\n\t\t\t\t\t\t\tself._endReached = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t// remove last entry, for next page load\n\t\t\t\t\t\t\tresp = _.initial(resp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!self.set(resp, options)) {\n\t\t\t\t\t\t\treturn false\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) {\n\t\t\t\t\t\t\tsuccess.apply(null, arguments)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tself.trigger('sync', 'REPORT', self, options)\n\t\t\t\t\t}\n\t\t\t\t}, options)\n\n\t\t\t\treturn this.sync('REPORT', this, options)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Returns the matching summary model\n\t\t *\n\t\t * @returns {OCA.Comments.CommentSummaryModel} summary model\n\t\t */\n\t\t\tgetSummaryModel: function() {\n\t\t\t\tif (!this._summaryModel) {\n\t\t\t\t\tthis._summaryModel = new OCA.Comments.CommentSummaryModel({\n\t\t\t\t\t\tid: this._objectId,\n\t\t\t\t\t\tobjectType: this._objectType\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\treturn this._summaryModel\n\t\t\t},\n\n\t\t\t/**\n\t\t * Updates the read marker for this comment thread\n\t\t *\n\t\t * @param {Date} [date] optional date, defaults to now\n\t\t * @param {Object} [options] backbone options\n\t\t */\n\t\t\tupdateReadMarker: function(date, options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\treturn this.getSummaryModel().save({\n\t\t\t\t\treadMarker: (date || new Date()).toUTCString()\n\t\t\t\t}, options)\n\t\t\t}\n\t\t})\n\n\tOCA.Comments.CommentCollection = CommentCollection\n})(OC, OCA)\n","/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC, OCA) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_READMARKER:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}readMarker',\n\t})\n\n\t/**\n\t * @class OCA.Comments.CommentSummaryModel\n\t * @classdesc\n\t *\n\t * Model containing summary information related to comments\n\t * like the read marker.\n\t *\n\t */\n\tconst CommentSummaryModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.Comments.CommentSummaryModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t * Object type\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\t/**\n\t\t * Object id\n\t\t *\n\t\t * @type string\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\tdavProperties: {\n\t\t\t\t'readMarker': OC.Files.Client.PROPERTY_READMARKER,\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Initializes the summary model\n\t\t\t *\n\t\t\t * @param {any} [attrs] ignored\n\t\t\t * @param {Object} [options] destructuring object\n\t\t\t * @param {string} [options.objectType] object type\n\t\t\t * @param {string} [options.objectId] object id\n\t\t\t */\n\t\t\tinitialize: function(attrs, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (options.objectType) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/comments/'\n\t\t\t\t+ encodeURIComponent(this._objectType) + '/'\n\t\t\t\t+ encodeURIComponent(this.id) + '/'\n\t\t\t},\n\t\t})\n\n\tOCA.Comments.CommentSummaryModel = CommentSummaryModel\n})(OC, OCA)\n","/* eslint-disable */\n/**\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars, escapeHTML */\n\n(function(OC, OCA) {\n\n\t/**\n\t * @memberof OCA.Comments\n\t */\n\tvar CommentsTabView = OCA.Files.DetailTabView.extend(\n\t\t/** @lends OCA.Comments.CommentsTabView.prototype */ {\n\t\t\tid: 'commentsTabView',\n\t\t\tclassName: 'tab commentsTabView',\n\t\t\t_autoCompleteData: undefined,\n\t\t\t_commentsModifyMenu: undefined,\n\n\t\t\tevents: {\n\t\t\t\t'submit .newCommentForm': '_onSubmitComment',\n\t\t\t\t'click .showMore': '_onClickShowMore',\n\t\t\t\t'click .cancel': '_onClickCloseComment',\n\t\t\t\t'click .comment': '_onClickComment',\n\t\t\t\t'keyup div.message': '_onTextChange',\n\t\t\t\t'change div.message': '_onTextChange',\n\t\t\t\t'input div.message': '_onTextChange',\n\t\t\t\t'paste div.message': '_onPaste'\n\t\t\t},\n\n\t\t\t_commentMaxLength: 1000,\n\n\t\t\tinitialize: function() {\n\t\t\t\tOCA.Files.DetailTabView.prototype.initialize.apply(this, arguments)\n\t\t\t\tthis.collection = new OCA.Comments.CommentCollection()\n\t\t\t\tthis.collection.on('request', this._onRequest, this)\n\t\t\t\tthis.collection.on('sync', this._onEndRequest, this)\n\t\t\t\tthis.collection.on('add', this._onAddModel, this)\n\t\t\t\tthis.collection.on('change:message', this._onChangeModel, this)\n\n\t\t\t\tthis._commentMaxThreshold = this._commentMaxLength * 0.9\n\n\t\t\t\t// TODO: error handling\n\t\t\t\t_.bindAll(this, '_onTypeComment', '_initAutoComplete', '_onAutoComplete')\n\t\t\t},\n\n\t\t\ttemplate: function(params) {\n\t\t\t\tvar currentUser = OC.getCurrentUser()\n\t\t\t\treturn OCA.Comments.Templates['view'](_.extend({\n\t\t\t\t\tactorId: currentUser.uid,\n\t\t\t\t\tactorDisplayName: currentUser.displayName\n\t\t\t\t}, params))\n\t\t\t},\n\n\t\t\teditCommentTemplate: function(params) {\n\t\t\t\tvar currentUser = OC.getCurrentUser()\n\t\t\t\treturn OCA.Comments.Templates['edit_comment'](_.extend({\n\t\t\t\t\tactorId: currentUser.uid,\n\t\t\t\t\tactorDisplayName: currentUser.displayName,\n\t\t\t\t\tnewMessagePlaceholder: t('comments', 'New comment …'),\n\t\t\t\t\tsubmitText: t('comments', 'Post'),\n\t\t\t\t\tcancelText: t('comments', 'Cancel'),\n\t\t\t\t\ttag: 'li'\n\t\t\t\t}, params))\n\t\t\t},\n\n\t\t\tcommentTemplate: function(params) {\n\t\t\t\tparams = _.extend({\n\t\t\t\t\teditTooltip: t('comments', 'Edit comment'),\n\t\t\t\t\tisUserAuthor: OC.getCurrentUser().uid === params.actorId,\n\t\t\t\t\tisLong: this._isLong(params.message)\n\t\t\t\t}, params)\n\n\t\t\t\tif (params.actorType === 'deleted_users') {\n\t\t\t\t// makes the avatar a X\n\t\t\t\t\tparams.actorId = null\n\t\t\t\t\tparams.actorDisplayName = t('comments', '[Deleted user]')\n\t\t\t\t}\n\n\t\t\t\treturn OCA.Comments.Templates['comment'](params)\n\t\t\t},\n\n\t\t\tgetLabel: function() {\n\t\t\t\treturn t('comments', 'Comments')\n\t\t\t},\n\n\t\t\tgetIcon: function() {\n\t\t\t\treturn 'icon-comment'\n\t\t\t},\n\n\t\t\tsetFileInfo: function(fileInfo) {\n\t\t\t\tif (fileInfo) {\n\t\t\t\t\tthis.model = fileInfo\n\n\t\t\t\t\tthis.render()\n\t\t\t\t\tthis._initAutoComplete($('#commentsTabView').find('.newCommentForm .message'))\n\t\t\t\t\tthis.collection.setObjectId(this.model.id)\n\t\t\t\t\t// reset to first page\n\t\t\t\t\tthis.collection.reset([], { silent: true })\n\t\t\t\t\tthis.nextPage()\n\t\t\t\t} else {\n\t\t\t\t\tthis.model = null\n\t\t\t\t\tthis.render()\n\t\t\t\t\tthis.collection.reset()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\trender: function() {\n\t\t\t\tthis.$el.html(this.template({\n\t\t\t\t\temptyResultLabel: t('comments', 'No comments yet, start the conversation!'),\n\t\t\t\t\tmoreLabel: t('comments', 'More comments …')\n\t\t\t\t}))\n\t\t\t\tthis.$el.find('.comments').before(this.editCommentTemplate({ tag: 'div' }))\n\t\t\t\tthis.$el.find('.has-tooltip').tooltip()\n\t\t\t\tthis.$container = this.$el.find('ul.comments')\n\t\t\t\tthis.$el.find('.avatar').avatar(OC.getCurrentUser().uid, 32)\n\t\t\t\tthis.delegateEvents()\n\t\t\t\tthis.$el.find('.message').on('keydown input change', this._onTypeComment)\n\n\t\t\t\tautosize(this.$el.find('.newCommentRow .message'))\n\t\t\t\tthis.$el.find('.newCommentForm .message').focus()\n\t\t\t},\n\n\t\t\t_initAutoComplete: function($target) {\n\t\t\t\tvar s = this\n\t\t\t\tvar limit = 10\n\t\t\t\tif (!_.isUndefined(OC.appConfig.comments)) {\n\t\t\t\t\tlimit = OC.appConfig.comments.maxAutoCompleteResults\n\t\t\t\t}\n\t\t\t\t$target.atwho({\n\t\t\t\t\tat: '@',\n\t\t\t\t\tlimit: limit,\n\t\t\t\t\tcallbacks: {\n\t\t\t\t\t\tremoteFilter: s._onAutoComplete,\n\t\t\t\t\t\thighlighter: function(li) {\n\t\t\t\t\t\t// misuse the highlighter callback to instead of\n\t\t\t\t\t\t// highlighting loads the avatars.\n\t\t\t\t\t\t\tvar $li = $(li)\n\t\t\t\t\t\t\t$li.find('.avatar').avatar(undefined, 32)\n\t\t\t\t\t\t\treturn $li\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsorter: function(q, items) { return items }\n\t\t\t\t\t},\n\t\t\t\t\tdisplayTpl: function(item) {\n\t\t\t\t\t\treturn '<li>'\n\t\t\t\t\t\t+ '<span class=\"avatar-name-wrapper\">'\n\t\t\t\t\t\t\t+ '<span class=\"avatar\" '\n\t\t\t\t\t\t\t\t\t+ 'data-username=\"' + escapeHTML(item.id) + '\" ' // for avatars\n\t\t\t\t\t\t\t\t\t+ 'data-user=\"' + escapeHTML(item.id) + '\" ' // for contactsmenu\n\t\t\t\t\t\t\t\t\t+ 'data-user-display-name=\"' + escapeHTML(item.label) + '\">'\n\t\t\t\t\t\t\t+ '</span>'\n\t\t\t\t\t\t\t+ '<strong>' + escapeHTML(item.label) + '</strong>'\n\t\t\t\t\t\t+ '</span></li>'\n\t\t\t\t\t},\n\t\t\t\t\tinsertTpl: function(item) {\n\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t+ '<span class=\"avatar-name-wrapper\">'\n\t\t\t\t\t\t\t+ '<span class=\"avatar\" '\n\t\t\t\t\t\t\t\t\t+ 'data-username=\"' + escapeHTML(item.id) + '\" ' // for avatars\n\t\t\t\t\t\t\t\t\t+ 'data-user=\"' + escapeHTML(item.id) + '\" ' // for contactsmenu\n\t\t\t\t\t\t\t\t\t+ 'data-user-display-name=\"' + escapeHTML(item.label) + '\">'\n\t\t\t\t\t\t\t+ '</span>'\n\t\t\t\t\t\t\t+ '<strong>' + escapeHTML(item.label) + '</strong>'\n\t\t\t\t\t\t+ '</span>'\n\t\t\t\t\t},\n\t\t\t\t\tsearchKey: 'label'\n\t\t\t\t})\n\t\t\t\t$target.on('inserted.atwho', function(je, $el) {\n\t\t\t\t\tvar editionMode = true\n\t\t\t\t\ts._postRenderItem(\n\t\t\t\t\t// we need to pass the parent of the inserted element\n\t\t\t\t\t// passing the whole comments form would re-apply and request\n\t\t\t\t\t// avatars from the server\n\t\t\t\t\t\t$(je.target).find(\n\t\t\t\t\t\t\t'span[data-username=\"' + $el.find('[data-username]').data('username') + '\"]'\n\t\t\t\t\t\t).parent(),\n\t\t\t\t\t\teditionMode\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_onAutoComplete: function(query, callback) {\n\t\t\t\tvar s = this\n\t\t\t\tif (!_.isUndefined(this._autoCompleteRequestTimer)) {\n\t\t\t\t\tclearTimeout(this._autoCompleteRequestTimer)\n\t\t\t\t}\n\t\t\t\tthis._autoCompleteRequestTimer = _.delay(function() {\n\t\t\t\t\tif (!_.isUndefined(this._autoCompleteRequestCall)) {\n\t\t\t\t\t\tthis._autoCompleteRequestCall.abort()\n\t\t\t\t\t}\n\t\t\t\t\tthis._autoCompleteRequestCall = $.ajax({\n\t\t\t\t\t\turl: OC.linkToOCS('core', 2) + 'autocomplete/get',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tsearch: query,\n\t\t\t\t\t\t\titemType: 'files',\n\t\t\t\t\t\t\titemId: s.model.get('id'),\n\t\t\t\t\t\t\tsorter: 'commenters|share-recipients',\n\t\t\t\t\t\t\tlimit: OC.appConfig.comments.maxAutoCompleteResults\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbeforeSend: function(request) {\n\t\t\t\t\t\t\trequest.setRequestHeader('Accept', 'application/json')\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function(result) {\n\t\t\t\t\t\t\tcallback(result.ocs.data)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}, 400)\n\t\t\t},\n\n\t\t\t_formatItem: function(commentModel) {\n\t\t\t\tvar timestamp = new Date(commentModel.get('creationDateTime')).getTime()\n\t\t\t\tvar data = _.extend({\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tdate: OC.Util.relativeModifiedDate(timestamp),\n\t\t\t\t\taltDate: OC.Util.formatDate(timestamp),\n\t\t\t\t\tformattedMessage: this._formatMessage(commentModel.get('message'), commentModel.get('mentions'))\n\t\t\t\t}, commentModel.attributes)\n\t\t\t\treturn data\n\t\t\t},\n\n\t\t\t_toggleLoading: function(state) {\n\t\t\t\tthis._loading = state\n\t\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state)\n\t\t\t},\n\n\t\t\t_onRequest: function(type) {\n\t\t\t\tif (type === 'REPORT') {\n\t\t\t\t\tthis._toggleLoading(true)\n\t\t\t\t\tthis.$el.find('.showMore').addClass('hidden')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_onEndRequest: function(type) {\n\t\t\t\tvar fileInfoModel = this.model\n\t\t\t\tthis._toggleLoading(false)\n\t\t\t\tthis.$el.find('.emptycontent').toggleClass('hidden', !!this.collection.length)\n\t\t\t\tthis.$el.find('.showMore').toggleClass('hidden', !this.collection.hasMoreResults())\n\n\t\t\t\tif (type !== 'REPORT') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// find first unread comment\n\t\t\t\tvar firstUnreadComment = this.collection.findWhere({ isUnread: true })\n\t\t\t\tif (firstUnreadComment) {\n\t\t\t\t// update read marker\n\t\t\t\t\tthis.collection.updateReadMarker(\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\t\t\tfileInfoModel.set('commentsUnread', 0)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tthis.$el.find('.newCommentForm .message').focus()\n\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * takes care of post-rendering after a new comment was added to the\n\t\t\t * collection\n\t\t\t *\n\t\t\t * @param model\n\t\t\t * @param collection\n\t\t\t * @param options\n\t\t\t * @private\n\t\t\t */\n\t\t\t_onAddModel: function(model, collection, options) {\n\t\t\t// we need to render it immediately, to ensure that the right\n\t\t\t// order of comments is kept on opening comments tab\n\t\t\t\tvar $comment = $(this.commentTemplate(this._formatItem(model)))\n\t\t\t\tif (!_.isUndefined(options.at) && collection.length > 1) {\n\t\t\t\t\tthis.$container.find('li').eq(options.at).before($comment)\n\t\t\t\t} else {\n\t\t\t\t\tthis.$container.append($comment)\n\t\t\t\t}\n\t\t\t\tthis._postRenderItem($comment)\n\t\t\t\t$('#commentsTabView').find('.newCommentForm div.message').text('').prop('contenteditable', true)\n\n\t\t\t\t// we need to update the model, because it consists of client data\n\t\t\t\t// only, but the server might add meta data, e.g. about mentions\n\t\t\t\tvar oldMentions = model.get('mentions')\n\t\t\t\tvar self = this\n\t\t\t\tmodel.fetch({\n\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\tif (_.isEqual(oldMentions, model.get('mentions'))) {\n\t\t\t\t\t\t// don't attempt to render if unnecessary, avoids flickering\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar $updated = $(self.commentTemplate(self._formatItem(model)))\n\t\t\t\t\t\t$comment.html($updated.html())\n\t\t\t\t\t\tself._postRenderItem($comment)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * takes care of post-rendering after a new comment was edited\n\t\t\t *\n\t\t\t * @param model\n\t\t\t * @private\n\t\t\t */\n\t\t\t_onChangeModel: function(model) {\n\t\t\t\tif (model.get('message').trim() === model.previous('message').trim()) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tvar $form = this.$container.find('.comment[data-id=\"' + model.id + '\"] form')\n\t\t\t\tvar $row = $form.closest('.comment')\n\t\t\t\tvar $target = $row.data('commentEl')\n\t\t\t\tif (_.isUndefined($target)) {\n\t\t\t\t// ignore noise – this is only set after editing a comment and hitting post\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tvar self = this\n\n\t\t\t\t// we need to update the model, because it consists of client data\n\t\t\t\t// only, but the server might add meta data, e.g. about mentions\n\t\t\t\tmodel.fetch({\n\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t$target.removeClass('hidden')\n\t\t\t\t\t\t$row.remove()\n\n\t\t\t\t\t\tvar $message = $target.find('.message')\n\t\t\t\t\t\t$message\n\t\t\t\t\t\t\t.html(self._formatMessage(model.get('message'), model.get('mentions')))\n\t\t\t\t\t\t\t.find('.avatar')\n\t\t\t\t\t\t\t.each(function() { $(this).avatar() })\n\t\t\t\t\t\tself._postRenderItem($message)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_postRenderItem: function($el, editionMode) {\n\t\t\t\t$el.find('.has-tooltip').tooltip()\n\t\t\t\tvar inlineAvatars = $el.find('.message .avatar')\n\t\t\t\tif ($($el.context).hasClass('message')) {\n\t\t\t\t\tinlineAvatars = $el.find('.avatar')\n\t\t\t\t}\n\t\t\t\tinlineAvatars.each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\t$this.avatar($this.attr('data-username'), 16)\n\t\t\t\t})\n\t\t\t\t$el.find('.authorRow .avatar').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\t$this.avatar($this.attr('data-username'), 32)\n\t\t\t\t})\n\n\t\t\t\tvar username = $el.find('.avatar').data('username')\n\t\t\t\tif (username !== OC.getCurrentUser().uid) {\n\t\t\t\t\t$el.find('.authorRow .avatar, .authorRow .author').contactsMenu(\n\t\t\t\t\t\tusername, 0, $el.find('.authorRow'))\n\t\t\t\t}\n\n\t\t\t\tvar $message = $el.find('.message')\n\t\t\t\tif ($message.length === 0) {\n\t\t\t\t// it is the case when writing a comment and mentioning a person\n\t\t\t\t\t$message = $el\n\t\t\t\t}\n\n\t\t\t\tif (!editionMode) {\n\t\t\t\t\tvar self = this\n\t\t\t\t\t// add the dropdown menu to display the edit and delete option\n\t\t\t\t\tvar modifyCommentMenu = new OCA.Comments.CommentsModifyMenu()\n\t\t\t\t\t$el.find('.authorRow').append(modifyCommentMenu.$el)\n\t\t\t\t\t$el.find('.more').on('click', _.bind(modifyCommentMenu.show, modifyCommentMenu))\n\n\t\t\t\t\tself.listenTo(modifyCommentMenu, 'select:menu-item-clicked', function(ev, action) {\n\t\t\t\t\t\tif (action === 'edit') {\n\t\t\t\t\t\t\tself._onClickEditComment(ev)\n\t\t\t\t\t\t} else if (action === 'delete') {\n\t\t\t\t\t\t\tself._onClickDeleteComment(ev)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis._postRenderMessage($message, editionMode)\n\t\t\t},\n\n\t\t\t_postRenderMessage: function($el, editionMode) {\n\t\t\t\tif (editionMode) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t$el.find('.avatar-name-wrapper').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\tvar $avatar = $this.find('.avatar')\n\n\t\t\t\t\tvar user = $avatar.data('user')\n\t\t\t\t\tif (user !== OC.getCurrentUser().uid) {\n\t\t\t\t\t\t$this.contactsMenu(user, 0, $this)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Convert a message to be displayed in HTML,\n\t\t\t * converts newlines to <br> tags.\n\t\t\t */\n\t\t\t_formatMessage: function(message, mentions, editMode) {\n\t\t\t\tmessage = escapeHTML(message).replace(/\\n/g, '<br/>')\n\n\t\t\t\tfor (var i in mentions) {\n\t\t\t\t\tif (!mentions.hasOwnProperty(i)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tvar mention = '@' + mentions[i].mentionId\n\t\t\t\t\tif (mentions[i].mentionId.indexOf(' ') !== -1) {\n\t\t\t\t\t\tmention = _.escape('@\"' + mentions[i].mentionId + '\"')\n\t\t\t\t\t}\n\n\t\t\t\t\t// escape possible regex characters in the name\n\t\t\t\t\tmention = mention.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\t\t\t\t\tvar regex = new RegExp('(^|\\\\s)(' + mention + ')\\\\b', 'g')\n\t\t\t\t\tif (mentions[i].mentionId.indexOf(' ') !== -1) {\n\t\t\t\t\t\tregex = new RegExp('(^|\\\\s)(' + mention + ')', 'g')\n\t\t\t\t\t}\n\n\t\t\t\t\tvar displayName = this._composeHTMLMention(mentions[i].mentionId, mentions[i].mentionDisplayName)\n\n\t\t\t\t\t// replace every mention either at the start of the input or after a whitespace\n\t\t\t\t\t// followed by a non-word character.\n\t\t\t\t\tmessage = message.replace(regex,\n\t\t\t\t\t\tfunction(match, p1) {\n\t\t\t\t\t\t// to get number of whitespaces (0 vs 1) right\n\t\t\t\t\t\t\treturn p1 + displayName\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tif (editMode !== true) {\n\t\t\t\t\tmessage = OCP.Comments.plainToRich(message)\n\t\t\t\t}\n\t\t\t\treturn message\n\t\t\t},\n\n\t\t\t_composeHTMLMention: function(uid, displayName) {\n\t\t\t\tvar avatar = ''\n\t\t\t\t+ '<span class=\"avatar\" '\n\t\t\t\t\t\t+ 'data-username=\"' + _.escape(uid) + '\" '\n\t\t\t\t\t\t+ 'data-user=\"' + _.escape(uid) + '\" '\n\t\t\t\t\t\t+ 'data-user-display-name=\"' + _.escape(displayName) + '\">'\n\t\t\t\t+ '</span>'\n\n\t\t\t\tvar isCurrentUser = (uid === OC.getCurrentUser().uid)\n\n\t\t\t\treturn ''\n\t\t\t\t+ '<span class=\"atwho-inserted\" contenteditable=\"false\">'\n\t\t\t\t\t+ '<span class=\"avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '\">'\n\t\t\t\t\t\t+ avatar\n\t\t\t\t\t\t+ '<strong>' + _.escape(displayName) + '</strong>'\n\t\t\t\t\t+ '</span>'\n\t\t\t\t+ '</span>'\n\t\t\t},\n\n\t\t\tnextPage: function() {\n\t\t\t\tif (this._loading || !this.collection.hasMoreResults()) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetchNext()\n\t\t\t},\n\n\t\t\t_onClickEditComment: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $comment = $(ev.target).closest('.comment')\n\t\t\t\tvar commentId = $comment.data('id')\n\t\t\t\tvar commentToEdit = this.collection.get(commentId)\n\t\t\t\tvar $formRow = $(this.editCommentTemplate(_.extend({\n\t\t\t\t\tisEditMode: true,\n\t\t\t\t\tsubmitText: t('comments', 'Save')\n\t\t\t\t}, commentToEdit.attributes)))\n\n\t\t\t\t$comment.addClass('hidden').removeClass('collapsed')\n\t\t\t\t// spawn form\n\t\t\t\t$comment.after($formRow)\n\t\t\t\t$formRow.data('commentEl', $comment)\n\t\t\t\t$formRow.find('.message').on('keydown input change', this._onTypeComment)\n\n\t\t\t\t// copy avatar element from original to avoid flickering\n\t\t\t\t$formRow.find('.avatar:first').replaceWith($comment.find('.avatar:first').clone())\n\t\t\t\t$formRow.find('.has-tooltip').tooltip()\n\n\t\t\t\tvar $message = $formRow.find('.message')\n\t\t\t\t$message\n\t\t\t\t\t.html(this._formatMessage(commentToEdit.get('message'), commentToEdit.get('mentions'), true))\n\t\t\t\t\t.find('.avatar')\n\t\t\t\t\t.each(function() { $(this).avatar() })\n\t\t\t\tvar editionMode = true\n\t\t\t\tthis._postRenderItem($message, editionMode)\n\n\t\t\t\t// Enable autosize\n\t\t\t\tautosize($formRow.find('.message'))\n\n\t\t\t\t// enable autocomplete\n\t\t\t\tthis._initAutoComplete($formRow.find('.message'))\n\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_onTypeComment: function(ev) {\n\t\t\t\tvar $field = $(ev.target)\n\t\t\t\tvar len = $field.text().length\n\t\t\t\tvar $submitButton = $field.data('submitButtonEl')\n\t\t\t\tif (!$submitButton) {\n\t\t\t\t\t$submitButton = $field.closest('form').find('.submit')\n\t\t\t\t\t$field.data('submitButtonEl', $submitButton)\n\t\t\t\t}\n\t\t\t\t$field.tooltip('hide')\n\t\t\t\tif (len > this._commentMaxThreshold) {\n\t\t\t\t\t$field.attr('data-original-title', t('comments', 'Allowed characters {count} of {max}', { count: len, max: this._commentMaxLength }))\n\t\t\t\t\t$field.tooltip({ trigger: 'manual' })\n\t\t\t\t\t$field.tooltip('show')\n\t\t\t\t\t$field.addClass('error')\n\t\t\t\t}\n\n\t\t\t\tvar limitExceeded = (len > this._commentMaxLength)\n\t\t\t\t$field.toggleClass('error', limitExceeded)\n\t\t\t\t$submitButton.prop('disabled', limitExceeded)\n\n\t\t\t\t// Submits form with Enter, but Shift+Enter is a new line. If the\n\t\t\t\t// autocomplete popover is being shown Enter does not submit the\n\t\t\t\t// form either; it will be handled by At.js which will add the\n\t\t\t\t// currently selected item to the message.\n\t\t\t\tif (ev.keyCode === 13 && !ev.shiftKey && !$field.atwho('isSelecting')) {\n\t\t\t\t\t$submitButton.click()\n\t\t\t\t\tev.preventDefault()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_onClickComment: function(ev) {\n\t\t\t\tvar $row = $(ev.target)\n\t\t\t\tif (!$row.is('.comment')) {\n\t\t\t\t\t$row = $row.closest('.comment')\n\t\t\t\t}\n\t\t\t\t$row.removeClass('collapsed')\n\t\t\t},\n\n\t\t\t_onClickCloseComment: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $row = $(ev.target).closest('.comment')\n\t\t\t\t$row.data('commentEl').removeClass('hidden')\n\t\t\t\t$row.remove()\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_onClickDeleteComment: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $comment = $(ev.target).closest('.comment')\n\t\t\t\tvar commentId = $comment.data('id')\n\t\t\t\tvar $loading = $comment.find('.deleteLoading')\n\t\t\t\tvar $moreIcon = $comment.find('.more')\n\n\t\t\t\t$comment.addClass('disabled')\n\t\t\t\t$loading.removeClass('hidden')\n\t\t\t\t$moreIcon.addClass('hidden')\n\n\t\t\t\t$comment.data('commentEl', $comment)\n\n\t\t\t\tthis.collection.get(commentId).destroy({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\t$comment.data('commentEl').remove()\n\t\t\t\t\t\t$comment.remove()\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t\t$moreIcon.removeClass('hidden')\n\t\t\t\t\t\t$comment.removeClass('disabled')\n\n\t\t\t\t\t\tOC.Notification.showTemporary(t('comments', 'Error occurred while retrieving comment with ID {id}', { id: commentId }))\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_onClickShowMore: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tthis.nextPage()\n\t\t\t},\n\n\t\t\t/**\n\t\t * takes care of updating comment element states after submit (either new\n\t\t * comment or edit).\n\t\t *\n\t\t * @param {OC.Backbone.Model} model\n\t\t * @param {jQuery} $form\n\t\t * @private\n\t\t */\n\t\t\t_onSubmitSuccess: function(model, $form) {\n\t\t\t\tvar $submit = $form.find('.submit')\n\t\t\t\tvar $loading = $form.find('.submitLoading')\n\t\t\t\tvar $message = $form.find('.message')\n\n\t\t\t\t$submit.removeClass('hidden')\n\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t$message.prop('contenteditable', true)\n\t\t\t\t$message.text('')\n\t\t\t},\n\n\t\t\t_commentBodyHTML2Plain: function($el) {\n\t\t\t\tvar $comment = $el.clone()\n\n\t\t\t\t$comment.find('.avatar-name-wrapper').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\t\t\t\t\tvar $inserted = $this.parent()\n\t\t\t\t\tvar userId = $this.find('.avatar').data('username').toString()\n\t\t\t\t\tif (userId.indexOf(' ') !== -1) {\n\t\t\t\t\t\t$inserted.html('@\"' + userId + '\"')\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$inserted.html('@' + userId)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$comment.html(OCP.Comments.richToPlain($comment.html()))\n\n\t\t\t\tvar oldHtml\n\t\t\t\tvar html = $comment.html()\n\t\t\t\tdo {\n\t\t\t\t// replace works one by one\n\t\t\t\t\toldHtml = html\n\t\t\t\t\thtml = oldHtml.replace('<br>', '\\n')\t// preserve line breaks\n\t\t\t\t} while (oldHtml !== html)\n\t\t\t\t$comment.html(html)\n\n\t\t\t\treturn $comment.text()\n\t\t\t},\n\n\t\t\t_onSubmitComment: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar $form = $(e.target)\n\t\t\t\tvar commentId = $form.closest('.comment').data('id')\n\t\t\t\tvar currentUser = OC.getCurrentUser()\n\t\t\t\tvar $submit = $form.find('.submit')\n\t\t\t\tvar $loading = $form.find('.submitLoading')\n\t\t\t\tvar $commentField = $form.find('.message')\n\t\t\t\tvar message = $commentField.text().trim()\n\t\t\t\te.preventDefault()\n\n\t\t\t\tif (!message.length || message.length > this._commentMaxLength) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t$commentField.prop('contenteditable', false)\n\t\t\t\t$submit.addClass('hidden')\n\t\t\t\t$loading.removeClass('hidden')\n\n\t\t\t\tmessage = this._commentBodyHTML2Plain($commentField)\n\t\t\t\tif (commentId) {\n\t\t\t\t\t// edit mode\n\t\t\t\t\tvar comment = this.collection.get(commentId)\n\t\t\t\t\tcomment.save({\n\t\t\t\t\t\tmessage: message\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._onSubmitSuccess(model, $form)\n\t\t\t\t\t\t\tif (model.get('message').trim() === model.previous('message').trim()) {\n\t\t\t\t\t\t\t\t// model change event doesn't trigger, manually remove the row.\n\t\t\t\t\t\t\t\tvar $row = $form.closest('.comment')\n\t\t\t\t\t\t\t\t$row.data('commentEl').removeClass('hidden')\n\t\t\t\t\t\t\t\t$row.remove()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function() {\n\t\t\t\t\t\t\tself._onSubmitError($form, commentId)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tthis.collection.create({\n\t\t\t\t\t\tactorId: currentUser.uid,\n\t\t\t\t\t\tactorDisplayName: currentUser.displayName,\n\t\t\t\t\t\tactorType: 'users',\n\t\t\t\t\t\tverb: 'comment',\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tcreationDateTime: (new Date()).toUTCString()\n\t\t\t\t\t}, {\n\t\t\t\t\t\tat: 0,\n\t\t\t\t\t\t// wait for real creation before adding\n\t\t\t\t\t\twait: true,\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._onSubmitSuccess(model, $form)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function() {\n\t\t\t\t\t\t\tself._onSubmitError($form, undefined)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * takes care of updating the UI after an error on submit (either new\n\t\t * comment or edit).\n\t\t *\n\t\t * @param {jQuery} $form\n\t\t * @param {string|undefined} commentId\n\t\t * @private\n\t\t */\n\t\t\t_onSubmitError: function($form, commentId) {\n\t\t\t\t$form.find('.submit').removeClass('hidden')\n\t\t\t\t$form.find('.submitLoading').addClass('hidden')\n\t\t\t\t$form.find('.message').prop('contenteditable', true)\n\n\t\t\t\tif (!_.isUndefined(commentId)) {\n\t\t\t\t\tOC.Notification.show(t('comments', 'Error occurred while updating comment with id {id}', { id: commentId }), { type: 'error' })\n\t\t\t\t} else {\n\t\t\t\t\tOC.Notification.show(t('comments', 'Error occurred while posting comment'), { type: 'error' })\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t * ensures the contenteditable div is really empty, when user removed\n\t\t * all input, so that the placeholder will be shown again\n\t\t *\n\t\t * @private\n\t\t */\n\t\t\t_onTextChange: function() {\n\t\t\t\tvar $message = $('#commentsTabView').find('.newCommentForm div.message')\n\t\t\t\tif (!$message.text().trim().length) {\n\t\t\t\t\t$message.empty()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t * Limit pasting to plain text\n\t\t *\n\t\t * @param e\n\t\t * @private\n\t\t */\n\t\t\t_onPaste: function(e) {\n\t\t\t\te.preventDefault()\n\t\t\t\tvar text = e.originalEvent.clipboardData.getData('text/plain')\n\t\t\t\tdocument.execCommand('insertText', false, text)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Returns whether the given message is long and needs\n\t\t * collapsing\n\t\t */\n\t\t\t_isLong: function(message) {\n\t\t\t\treturn message.length > 250 || (message.match(/\\n/g) || []).length > 1\n\t\t\t}\n\t\t})\n\n\tOCA.Comments.CommentsTabView = CommentsTabView\n})(OC, OCA)\n","/*\n * Copyright (c) 2018\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\n\t/**\n\t * Construct a new CommentsModifyMenuinstance\n\t * @constructs CommentsModifyMenu\n\t * @memberof OC.Comments\n\t * @private\n\t */\n\tconst CommentsModifyMenu = OC.Backbone.View.extend({\n\t\ttagName: 'div',\n\t\tclassName: 'commentsModifyMenu popovermenu bubble menu',\n\t\t_scopes: [\n\t\t\t{\n\t\t\t\tname: 'edit',\n\t\t\t\tdisplayName: t('comments', 'Edit comment'),\n\t\t\t\ticonClass: 'icon-rename',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'delete',\n\t\t\t\tdisplayName: t('comments', 'Delete comment'),\n\t\t\t\ticonClass: 'icon-delete',\n\t\t\t},\n\t\t],\n\t\tinitialize: function() {\n\n\t\t},\n\t\tevents: {\n\t\t\t'click a.action': '_onClickAction',\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever an action has been clicked within the menu\n\t\t *\n\t\t * @param {Object} event event object\n\t\t */\n\t\t_onClickAction: function(event) {\n\t\t\tlet $target = $(event.currentTarget)\n\t\t\tif (!$target.hasClass('menuitem')) {\n\t\t\t\t$target = $target.closest('.menuitem')\n\t\t\t}\n\n\t\t\tOC.hideMenus()\n\n\t\t\tthis.trigger('select:menu-item-clicked', event, $target.data('action'))\n\t\t},\n\n\t\t/**\n\t\t * Renders the menu with the currently set items\n\t\t */\n\t\trender: function() {\n\t\t\tthis.$el.html(OCA.Comments.Templates['commentsmodifymenu']({\n\t\t\t\titems: this._scopes,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Displays the menu\n\t\t * @param {Event} context the click event\n\t\t */\n\t\tshow: function(context) {\n\t\t\tthis._context = context\n\n\t\t\tfor (const i in this._scopes) {\n\t\t\t\tthis._scopes[i].active = false\n\t\t\t}\n\n\t\t\tconst $el = $(context.target)\n\t\t\tconst offsetIcon = $el.offset()\n\t\t\tconst offsetContainer = $el.closest('.authorRow').offset()\n\n\t\t\t// adding some extra top offset to push the menu below the button.\n\t\t\tconst position = {\n\t\t\t\ttop: offsetIcon.top - offsetContainer.top + 48,\n\t\t\t\tleft: '',\n\t\t\t\tright: '',\n\t\t\t}\n\n\t\t\tposition.left = offsetIcon.left - offsetContainer.left\n\n\t\t\tif (position.left > 200) {\n\t\t\t\t// we need to position the menu to the right.\n\t\t\t\tposition.left = ''\n\t\t\t\tposition.right = this.$el.closest('.comment').find('.date').width()\n\t\t\t\tthis.$el.removeClass('menu-left').addClass('menu-right')\n\t\t\t} else {\n\t\t\t\tthis.$el.removeClass('menu-right').addClass('menu-left')\n\t\t\t}\n\t\t\tthis.$el.css(position)\n\t\t\tthis.render()\n\t\t\tthis.$el.removeClass('hidden')\n\n\t\t\tOC.showMenu(null, this.$el)\n\t\t},\n\t})\n\n\tOCA.Comments = OCA.Comments || {}\n\tOCA.Comments.CommentsModifyMenu = CommentsModifyMenu\n})(OC, OCA)\n","/*\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_COMMENTS_UNREAD:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread',\n\t})\n\n\tOCA.Comments = _.extend({}, OCA.Comments)\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.Comments.FilesPlugin = {\n\t\tignoreLists: [\n\t\t\t'trashbin',\n\t\t\t'files.public',\n\t\t],\n\n\t\t_formatCommentCount: function(count) {\n\t\t\treturn OCA.Comments.Templates['filesplugin']({\n\t\t\t\tcount: count,\n\t\t\t\tcountMessage: n('comments', '%n unread comment', '%n unread comments', count),\n\t\t\t\ticonUrl: OC.imagePath('core', 'actions/comment'),\n\t\t\t})\n\t\t},\n\n\t\tattach: function(fileList) {\n\t\t\tconst self = this\n\t\t\tif (this.ignoreLists.indexOf(fileList.id) >= 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfileList.registerTabView(new OCA.Comments.CommentsTabView('commentsTabView'))\n\n\t\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\t\tfileList._getWebdavProperties = function() {\n\t\t\t\tconst props = oldGetWebdavProperties.apply(this, arguments)\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD)\n\t\t\t\treturn props\n\t\t\t}\n\n\t\t\tfileList.filesClient.addFileInfoParser(function(response) {\n\t\t\t\tconst data = {}\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD]\n\t\t\t\tif (!_.isUndefined(commentsUnread) && commentsUnread !== '') {\n\t\t\t\t\tdata.commentsUnread = parseInt(commentsUnread, 10)\n\t\t\t\t}\n\t\t\t\treturn data\n\t\t\t})\n\n\t\t\tfileList.$el.addClass('has-comments')\n\t\t\tconst oldCreateRow = fileList._createRow\n\t\t\tfileList._createRow = function(fileData) {\n\t\t\t\tconst $tr = oldCreateRow.apply(this, arguments)\n\t\t\t\tif (fileData.commentsUnread) {\n\t\t\t\t\t$tr.attr('data-comments-unread', fileData.commentsUnread)\n\t\t\t\t}\n\t\t\t\treturn $tr\n\t\t\t}\n\n\t\t\t// register \"comment\" action for reading comments\n\t\t\tfileList.fileActions.registerAction({\n\t\t\t\tname: 'Comment',\n\t\t\t\tdisplayName: function(context) {\n\t\t\t\t\tif (context && context.$file) {\n\t\t\t\t\t\tconst unread = parseInt(context.$file.data('comments-unread'), 10)\n\t\t\t\t\t\tif (unread >= 0) {\n\t\t\t\t\t\t\treturn n('comments', '1 new comment', '{unread} new comments', unread, { unread: unread })\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn t('comments', 'Comment')\n\t\t\t\t},\n\t\t\t\tmime: 'all',\n\t\t\t\torder: -140,\n\t\t\t\ticonClass: 'icon-comment',\n\t\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\t\trender: function(actionSpec, isDefault, context) {\n\t\t\t\t\tconst $file = context.$file\n\t\t\t\t\tconst unreadComments = $file.data('comments-unread')\n\t\t\t\t\tif (unreadComments) {\n\t\t\t\t\t\tconst $actionLink = $(self._formatCommentCount(unreadComments))\n\t\t\t\t\t\tcontext.$file.find('a.name>span.fileactions').append($actionLink)\n\t\t\t\t\t\treturn $actionLink\n\t\t\t\t\t}\n\t\t\t\t\treturn ''\n\t\t\t\t},\n\t\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\t\tcontext.$file.find('.action-comment').tooltip('hide')\n\t\t\t\t\t// open sidebar in comments section\n\t\t\t\t\tcontext.fileList.showDetailsView(fileName, 'comments')\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// add attribute to \"elementToFile\"\n\t\t\tconst oldElementToFile = fileList.elementToFile\n\t\t\tfileList.elementToFile = function($el) {\n\t\t\t\tconst fileInfo = oldElementToFile.apply(this, arguments)\n\t\t\t\tconst commentsUnread = $el.data('comments-unread')\n\t\t\t\tif (commentsUnread) {\n\t\t\t\t\tfileInfo.commentsUnread = commentsUnread\n\t\t\t\t}\n\t\t\t\treturn fileInfo\n\t\t\t}\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Comments.FilesPlugin)\n","/**\n * @author Joas Schilling <coding@schilljs.com>\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n */\n\n(function() {\n\tOCA.Comments.ActivityTabViewPlugin = {\n\n\t\t/**\n\t\t * Prepare activity for display\n\t\t *\n\t\t * @param {OCA.Activity.ActivityModel} model for this activity\n\t\t * @param {jQuery} $el jQuery handle for this activity\n\t\t * @param {string} view The view that displayes this activity\n\t\t */\n\t\tprepareModelForDisplay: function(model, $el, view) {\n\t\t\tif (model.get('app') !== 'comments' || model.get('type') !== 'comments') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (view === 'ActivityTabView') {\n\t\t\t\t$el.addClass('comment')\n\t\t\t\tif (model.get('message') && this._isLong(model.get('message'))) {\n\t\t\t\t\t$el.addClass('collapsed')\n\t\t\t\t\tconst $overlay = $('<div>').addClass('message-overlay')\n\t\t\t\t\t$el.find('.activitymessage').after($overlay)\n\t\t\t\t\t$el.on('click', this._onClickCollapsedComment)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._onClickComment()\n\t\t */\n\t\t_onClickCollapsedComment: function(ev) {\n\t\t\tlet $row = $(ev.target)\n\t\t\tif (!$row.is('.comment')) {\n\t\t\t\t$row = $row.closest('.comment')\n\t\t\t}\n\t\t\t$row.removeClass('collapsed')\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._isLong()\n\t\t */\n\t\t_isLong: function(message) {\n\t\t\treturn message.length > 250 || (message.match(/\\n/g) || []).length > 1\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin)\n","/* eslint-disable */\n/*\n * Copyright (c) 2014\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n(function(OC, OCA, $) {\n\t'use strict'\n\n\t/**\n\t * Construct a new FileActions instance\n\t * @constructs Files\n\t */\n\tvar Comment = function() {\n\t\tthis.initialize()\n\t}\n\n\tComment.prototype = {\n\n\t\tfileList: null,\n\n\t\t/**\n\t\t * Initialize the file search\n\t\t */\n\t\tinitialize: function() {\n\n\t\t\tvar self = this\n\n\t\t\tthis.fileAppLoaded = function() {\n\t\t\t\treturn !!OCA.Files && !!OCA.Files.App\n\t\t\t}\n\t\t\tfunction inFileList($row, result) {\n\t\t\t\treturn false\n\n\t\t\t\tif (!self.fileAppLoaded()) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tvar dir = self.fileList.getCurrentDirectory().replace(/\\/+$/, '')\n\t\t\t\tvar resultDir = OC.dirname(result.path)\n\t\t\t\treturn dir === resultDir && self.fileList.inList(result.name)\n\t\t\t}\n\t\t\tfunction hideNoFilterResults() {\n\t\t\t\tvar $nofilterresults = $('.nofilterresults')\n\t\t\t\tif (!$nofilterresults.hasClass('hidden')) {\n\t\t\t\t\t$nofilterresults.addClass('hidden')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t *\n\t\t\t * @param {jQuery} $row\n\t\t\t * @param {Object} result\n\t\t\t * @param {int} result.id\n\t\t\t * @param {string} result.comment\n\t\t\t * @param {string} result.authorId\n\t\t\t * @param {string} result.authorName\n\t\t\t * @param {string} result.link\n\t\t\t * @param {string} result.fileName\n\t\t\t * @param {string} result.path\n\t\t\t * @returns {*}\n\t\t\t */\n\t\t\tthis.renderCommentResult = function($row, result) {\n\t\t\t\tif (inFileList($row, result)) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\thideNoFilterResults()\n\t\t\t\t/* render preview icon, show path beneath filename,\n\t\t\t\t show size and last modified date on the right */\n\t\t\t\tthis.updateLegacyMimetype(result)\n\n\t\t\t\tvar $pathDiv = $('<div>').addClass('path').text(result.path)\n\n\t\t\t\tvar $avatar = $('<div>')\n\t\t\t\t$avatar.addClass('avatar')\n\t\t\t\t\t.css('display', 'inline-block')\n\t\t\t\t\t.css('vertical-align', 'middle')\n\t\t\t\t\t.css('margin', '0 5px 2px 3px')\n\n\t\t\t\tif (result.authorName) {\n\t\t\t\t\t$avatar.avatar(result.authorId, 21, undefined, false, undefined, result.authorName)\n\t\t\t\t} else {\n\t\t\t\t\t$avatar.avatar(result.authorId, 21)\n\t\t\t\t}\n\n\t\t\t\t$row.find('td.info div.name').after($pathDiv).text(result.comment).prepend($('<span>').addClass('path').css('margin-right', '5px').text(result.authorName)).prepend($avatar)\n\t\t\t\t$row.find('td.result a').attr('href', result.link)\n\n\t\t\t\t$row.find('td.icon')\n\t\t\t\t\t.css('background-image', 'url(' + OC.imagePath('core', 'actions/comment') + ')')\n\t\t\t\t\t.css('opacity', '.4')\n\t\t\t\tvar dir = OC.dirname(result.path)\n\t\t\t\t// \"result.path\" does not include a leading \"/\", so \"OC.dirname\"\n\t\t\t\t// returns the path itself for files or folders in the root.\n\t\t\t\tif (dir === result.path) {\n\t\t\t\t\tdir = '/'\n\t\t\t\t}\n\t\t\t\t$row.find('td.info a').attr('href',\n\t\t\t\t\tOC.generateUrl('/apps/files/?dir={dir}&scrollto={scrollto}', { dir: dir, scrollto: result.fileName })\n\t\t\t\t)\n\n\t\t\t\treturn $row\n\t\t\t}\n\n\t\t\tthis.handleCommentClick = function($row, result, event) {\n\t\t\t\tif (self.fileAppLoaded() && self.fileList.id === 'files') {\n\t\t\t\t\tself.fileList.changeDirectory(OC.dirname(result.path))\n\t\t\t\t\tself.fileList.scrollTo(result.name)\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.updateLegacyMimetype = function(result) {\n\t\t\t\t// backward compatibility:\n\t\t\t\tif (!result.mime && result.mime_type) {\n\t\t\t\t\tresult.mime = result.mime_type\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setFileList = function(fileList) {\n\t\t\t\tthis.fileList = fileList\n\t\t\t}\n\n\t\t\tOC.Plugins.register('OCA.Search.Core', this)\n\t\t},\n\t\tattach: function(search) {\n\t\t\tsearch.setRenderer('comment', this.renderCommentResult.bind(this))\n\t\t\tsearch.setHandler('comment', this.handleCommentClick.bind(this))\n\t\t}\n\t}\n\n\tOCA.Search.comment = new Comment()\n})(OC, OCA, $)\n","/*! jquery.caret 2015-02-01 */\n!function(a,b){\"function\"==typeof define&&define.amd?define([\"jquery\"],function(c){return a.returnExportsGlobal=b(c)}):\"object\"==typeof exports?module.exports=b(require(\"jquery\")):b(jQuery)}(this,function(a){\"use strict\";var b,c,d,e,f,g,h,i,j,k,l;k=\"caret\",b=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.setPos=function(){return this.domInputor},b.prototype.getIEPosition=function(){return this.getPosition()},b.prototype.getPosition=function(){var a,b;return b=this.getOffset(),a=this.$inputor.offset(),b.left-=a.left,b.top-=a.top,b},b.prototype.getOldIEPos=function(){var a,b;return b=h.selection.createRange(),a=h.body.createTextRange(),a.moveToElementText(this.domInputor),a.setEndPoint(\"EndToEnd\",b),a.text.length},b.prototype.getPos=function(){var a,b,c;return(c=this.range())?(a=c.cloneRange(),a.selectNodeContents(this.domInputor),a.setEnd(c.endContainer,c.endOffset),b=a.toString().length,a.detach(),b):h.selection?this.getOldIEPos():void 0},b.prototype.getOldIEOffset=function(){var a,b;return a=h.selection.createRange().duplicate(),a.moveStart(\"character\",-1),b=a.getBoundingClientRect(),{height:b.bottom-b.top,left:b.left,top:b.top}},b.prototype.getOffset=function(){var b,c,d,e,f;return j.getSelection&&(d=this.range())?(d.endOffset-1>0&&d.endContainer===!this.domInputor&&(b=d.cloneRange(),b.setStart(d.endContainer,d.endOffset-1),b.setEnd(d.endContainer,d.endOffset),e=b.getBoundingClientRect(),c={height:e.height,left:e.left+e.width,top:e.top},b.detach()),c&&0!==(null!=c?c.height:void 0)||(b=d.cloneRange(),f=a(h.createTextNode(\"|\")),b.insertNode(f[0]),b.selectNode(f[0]),e=b.getBoundingClientRect(),c={height:e.height,left:e.left,top:e.top},f.remove(),b.detach())):h.selection&&(c=this.getOldIEOffset()),c&&(c.top+=a(j).scrollTop(),c.left+=a(j).scrollLeft()),c},b.prototype.range=function(){var a;if(j.getSelection)return a=j.getSelection(),a.rangeCount>0?a.getRangeAt(0):null},b}(),c=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.getIEPos=function(){var a,b,c,d,e,f,g;return b=this.domInputor,f=h.selection.createRange(),e=0,f&&f.parentElement()===b&&(d=b.value.replace(/\\r\\n/g,\"\\n\"),c=d.length,g=b.createTextRange(),g.moveToBookmark(f.getBookmark()),a=b.createTextRange(),a.collapse(!1),e=g.compareEndPoints(\"StartToEnd\",a)>-1?c:-g.moveStart(\"character\",-c)),e},b.prototype.getPos=function(){return h.selection?this.getIEPos():this.domInputor.selectionStart},b.prototype.setPos=function(a){var b,c;return b=this.domInputor,h.selection?(c=b.createTextRange(),c.move(\"character\",a),c.select()):b.setSelectionRange&&b.setSelectionRange(a,a),b},b.prototype.getIEOffset=function(a){var b,c,d,e;return c=this.domInputor.createTextRange(),a||(a=this.getPos()),c.move(\"character\",a),d=c.boundingLeft,e=c.boundingTop,b=c.boundingHeight,{left:d,top:e,height:b}},b.prototype.getOffset=function(b){var c,d,e;return c=this.$inputor,h.selection?(d=this.getIEOffset(b),d.top+=a(j).scrollTop()+c.scrollTop(),d.left+=a(j).scrollLeft()+c.scrollLeft(),d):(d=c.offset(),e=this.getPosition(b),d={left:d.left+e.left-c.scrollLeft(),top:d.top+e.top-c.scrollTop(),height:e.height})},b.prototype.getPosition=function(a){var b,c,e,f,g,h,i;return b=this.$inputor,f=function(a){return a=a.replace(/<|>|`|\"|&/g,\"?\").replace(/\\r\\n|\\r|\\n/g,\"<br/>\"),/firefox/i.test(navigator.userAgent)&&(a=a.replace(/\\s/g,\" \")),a},void 0===a&&(a=this.getPos()),i=b.val().slice(0,a),e=b.val().slice(a),g=\"<span style='position: relative; display: inline;'>\"+f(i)+\"</span>\",g+=\"<span id='caret' style='position: relative; display: inline;'>|</span>\",g+=\"<span style='position: relative; display: inline;'>\"+f(e)+\"</span>\",h=new d(b),c=h.create(g).rect()},b.prototype.getIEPosition=function(a){var b,c,d,e,f;return d=this.getIEOffset(a),c=this.$inputor.offset(),e=d.left-c.left,f=d.top-c.top,b=d.height,{left:e,top:f,height:b}},b}(),d=function(){function b(a){this.$inputor=a}return b.prototype.css_attr=[\"borderBottomWidth\",\"borderLeftWidth\",\"borderRightWidth\",\"borderTopStyle\",\"borderRightStyle\",\"borderBottomStyle\",\"borderLeftStyle\",\"borderTopWidth\",\"boxSizing\",\"fontFamily\",\"fontSize\",\"fontWeight\",\"height\",\"letterSpacing\",\"lineHeight\",\"marginBottom\",\"marginLeft\",\"marginRight\",\"marginTop\",\"outlineWidth\",\"overflow\",\"overflowX\",\"overflowY\",\"paddingBottom\",\"paddingLeft\",\"paddingRight\",\"paddingTop\",\"textAlign\",\"textOverflow\",\"textTransform\",\"whiteSpace\",\"wordBreak\",\"wordWrap\"],b.prototype.mirrorCss=function(){var b,c=this;return b={position:\"absolute\",left:-9999,top:0,zIndex:-2e4},\"TEXTAREA\"===this.$inputor.prop(\"tagName\")&&this.css_attr.push(\"width\"),a.each(this.css_attr,function(a,d){return b[d]=c.$inputor.css(d)}),b},b.prototype.create=function(b){return this.$mirror=a(\"<div></div>\"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(b),this.$inputor.after(this.$mirror),this},b.prototype.rect=function(){var a,b,c;return a=this.$mirror.find(\"#caret\"),b=a.position(),c={left:b.left,top:b.top,height:a.height()},this.$mirror.remove(),c},b}(),e={contentEditable:function(a){return!(!a[0].contentEditable||\"true\"!==a[0].contentEditable)}},g={pos:function(a){return a||0===a?this.setPos(a):this.getPos()},position:function(a){return h.selection?this.getIEPosition(a):this.getPosition(a)},offset:function(a){var b;return b=this.getOffset(a)}},h=null,j=null,i=null,l=function(a){var b;return(b=null!=a?a.iframe:void 0)?(i=b,j=b.contentWindow,h=b.contentDocument||j.document):(i=void 0,j=window,h=document)},f=function(a){var b;h=a[0].ownerDocument,j=h.defaultView||h.parentWindow;try{return i=j.frameElement}catch(c){b=c}},a.fn.caret=function(d,f,h){var i;return g[d]?(a.isPlainObject(f)?(l(f),f=void 0):l(h),i=e.contentEditable(this)?new b(this):new c(this),g[d].apply(i,[f])):a.error(\"Method \"+d+\" does not exist on jQuery.caret\")},a.fn.caret.EditableCaret=b,a.fn.caret.InputCaret=c,a.fn.caret.Utils=e,a.fn.caret.apis=g});","!function(t,e){\"function\"==typeof define&&define.amd?define([\"jquery\"],function(t){return e(t)}):\"object\"==typeof exports?module.exports=e(require(\"jquery\")):e(jQuery)}(this,function(t){var e,i;i={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},e={beforeSave:function(t){return r.arrayToDefaultHash(t)},matcher:function(t,e,i,n){var r,o,s,a,h;return t=t.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\"\\\\$&\"),i&&(t=\"(?:^|\\\\s)\"+t),r=decodeURI(\"%C3%80\"),o=decodeURI(\"%C3%BF\"),h=n?\" \":\"\",a=new RegExp(t+\"([A-Za-z\"+r+\"-\"+o+\"0-9_\"+h+\"'.+-]*)$|\"+t+\"([^\\\\x00-\\\\xff]*)$\",\"gi\"),s=a.exec(e),s?s[2]||s[1]:null},filter:function(t,e,i){var n,r,o,s;for(n=[],r=0,s=e.length;s>r;r++)o=e[r],~new String(o[i]).toLowerCase().indexOf(t.toLowerCase())&&n.push(o);return n},remoteFilter:null,sorter:function(t,e,i){var n,r,o,s;if(!t)return e;for(n=[],r=0,s=e.length;s>r;r++)o=e[r],o.atwho_order=new String(o[i]).toLowerCase().indexOf(t.toLowerCase()),o.atwho_order>-1&&n.push(o);return n.sort(function(t,e){return t.atwho_order-e.atwho_order})},tplEval:function(t,e){var i,n,r;r=t;try{return\"string\"!=typeof t&&(r=t(e)),r.replace(/\\$\\{([^\\}]*)\\}/g,function(t,i,n){return e[i]})}catch(n){return i=n,\"\"}},highlighter:function(t,e){var i;return e?(i=new RegExp(\">\\\\s*([^<]*?)(\"+e.replace(\"+\",\"\\\\+\")+\")([^<]*)\\\\s*<\",\"ig\"),t.replace(i,function(t,e,i,n){return\"> \"+e+\"<strong>\"+i+\"</strong>\"+n+\" <\"})):t},beforeInsert:function(t,e,i){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}};var n;n=function(){function e(e){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=t(e),this.setupRootElement(),this.listen()}return e.prototype.createContainer=function(e){var i;return null!=(i=this.$el)&&i.remove(),t(e.body).append(this.$el=t(\"<div class='atwho-container'></div>\"))},e.prototype.setupRootElement=function(e,i){var n,r;if(null==i&&(i=!1),e)this.window=e.contentWindow,this.document=e.contentDocument||this.window.document,this.iframe=e;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(r){if(n=r,this.iframe=null,t.fn.atwho.debug)throw new Error(\"iframe auto-discovery is failed.\\nPlease use `setIframe` to set the target iframe manually.\\n\"+n)}}return this.createContainer((this.iframeAsRoot=i)?this.document:document)},e.prototype.controller=function(t){var e,i,n,r;if(this.aliasMaps[t])i=this.controllers[this.aliasMaps[t]];else{r=this.controllers;for(n in r)if(e=r[n],n===t){i=e;break}}return i?i:this.controllers[this.currentFlag]},e.prototype.setContextFor=function(t){return this.currentFlag=t,this},e.prototype.reg=function(t,e){var i,n;return n=(i=this.controllers)[t]||(i[t]=this.$inputor.is(\"[contentEditable]\")?new l(this,t):new s(this,t)),e.alias&&(this.aliasMaps[e.alias]=t),n.init(e),this},e.prototype.listen=function(){return this.$inputor.on(\"compositionstart\",function(t){return function(e){var i;return null!=(i=t.controller())&&i.view.hide(),t.isComposing=!0,null}}(this)).on(\"compositionend\",function(t){return function(e){return t.isComposing=!1,setTimeout(function(e){return t.dispatch(e)}),null}}(this)).on(\"keyup.atwhoInner\",function(t){return function(e){return t.onKeyup(e)}}(this)).on(\"keydown.atwhoInner\",function(t){return function(e){return t.onKeydown(e)}}(this)).on(\"blur.atwhoInner\",function(t){return function(e){var i;return(i=t.controller())?(i.expectedQueryCBId=null,i.view.hide(e,i.getOpt(\"displayTimeout\"))):void 0}}(this)).on(\"click.atwhoInner\",function(t){return function(e){return t.dispatch(e)}}(this)).on(\"scroll.atwhoInner\",function(t){return function(){var e;return e=t.$inputor.scrollTop(),function(i){var n,r;return n=i.target.scrollTop,e!==n&&null!=(r=t.controller())&&r.view.hide(i),e=n,!0}}}(this)())},e.prototype.shutdown=function(){var t,e,i;i=this.controllers;for(t in i)e=i[t],e.destroy(),delete this.controllers[t];return this.$inputor.off(\".atwhoInner\"),this.$el.remove()},e.prototype.dispatch=function(t){var e,i,n,r;n=this.controllers,r=[];for(e in n)i=n[e],r.push(i.lookUp(t));return r},e.prototype.onKeyup=function(e){var n;switch(e.keyCode){case i.ESC:e.preventDefault(),null!=(n=this.controller())&&n.view.hide();break;case i.DOWN:case i.UP:case i.CTRL:case i.ENTER:t.noop();break;case i.P:case i.N:e.ctrlKey||this.dispatch(e);break;default:this.dispatch(e)}},e.prototype.onKeydown=function(e){var n,r;if(r=null!=(n=this.controller())?n.view:void 0,r&&r.visible())switch(e.keyCode){case i.ESC:e.preventDefault(),r.hide(e);break;case i.UP:e.preventDefault(),r.prev();break;case i.DOWN:e.preventDefault(),r.next();break;case i.P:if(!e.ctrlKey)return;e.preventDefault(),r.prev();break;case i.N:if(!e.ctrlKey)return;e.preventDefault(),r.next();break;case i.TAB:case i.ENTER:case i.SPACE:if(!r.visible())return;if(!this.controller().getOpt(\"spaceSelectsMatch\")&&e.keyCode===i.SPACE)return;if(!this.controller().getOpt(\"tabSelectsMatch\")&&e.keyCode===i.TAB)return;r.highlighted()?(e.preventDefault(),r.choose(e)):r.hide(e);break;default:t.noop()}},e}();var r,o=[].slice;r=function(){function i(e,i){this.app=e,this.at=i,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=t(\"#atwho-ground-\"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=t(\"<div id='atwho-ground-\"+this.id+\"'></div>\")),this.model=new u(this),this.view=new c(this)}return i.prototype.uid=function(){return(Math.random().toString(16)+\"000000000\").substr(2,8)+(new Date).getTime()},i.prototype.init=function(e){return this.setting=t.extend({},this.setting||t.fn.atwho[\"default\"],e),this.view.init(),this.model.reload(this.setting.data)},i.prototype.destroy=function(){return this.trigger(\"beforeDestroy\"),this.model.destroy(),this.view.destroy(),this.$el.remove()},i.prototype.callDefault=function(){var i,n,r,s;s=arguments[0],i=2<=arguments.length?o.call(arguments,1):[];try{return e[s].apply(this,i)}catch(r){return n=r,t.error(n+\" Or maybe At.js doesn't have function \"+s)}},i.prototype.trigger=function(t,e){var i,n;return null==e&&(e=[]),e.push(this),i=this.getOpt(\"alias\"),n=i?t+\"-\"+i+\".atwho\":t+\".atwho\",this.$inputor.trigger(n,e)},i.prototype.callbacks=function(t){return this.getOpt(\"callbacks\")[t]||e[t]},i.prototype.getOpt=function(t,e){var i,n;try{return this.setting[t]}catch(n){return i=n,null}},i.prototype.insertContentFor=function(e){var i,n;return n=this.getOpt(\"insertTpl\"),i=t.extend({},e.data(\"item-data\"),{\"atwho-at\":this.at}),this.callbacks(\"tplEval\").call(this,n,i,\"onInsert\")},i.prototype.renderView=function(t){var e;return e=this.getOpt(\"searchKey\"),t=this.callbacks(\"sorter\").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt(\"limit\")))},i.arrayToDefaultHash=function(e){var i,n,r,o;if(!t.isArray(e))return e;for(o=[],i=0,r=e.length;r>i;i++)n=e[i],t.isPlainObject(n)?o.push(n):o.push({name:n});return o},i.prototype.lookUp=function(t){var e,i;if((!t||\"click\"!==t.type||this.getOpt(\"lookUpOnClick\"))&&(!this.getOpt(\"suspendOnComposing\")||!this.app.isComposing))return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(i=this.getOpt(\"delay\"))?this._delayLookUp(e,i):this._lookUp(e),e):(this.expectedQueryCBId=null,e)},i.prototype._delayLookUp=function(t,e){var i,n;return i=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=i),n=e-(i-this.previousCallTime),n>0&&e>n?(this.previousCallTime=i,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout(function(e){return function(){return e.previousCallTime=0,e.delayedCallTimeout=null,e._lookUp(t)}}(this),e)):(this._stopDelayedCall(),this.previousCallTime!==i&&(this.previousCallTime=0),this._lookUp(t))},i.prototype._stopDelayedCall=function(){return this.delayedCallTimeout?(clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null):void 0},i.prototype._generateQueryCBId=function(){return{}},i.prototype._lookUp=function(e){var i;return i=function(t,e){return t===this.expectedQueryCBId?e&&e.length>0?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide():void 0},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(e.text,t.proxy(i,this,this.expectedQueryCBId))},i}();var s,a=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return a(i,e),i.prototype.catchQuery=function(){var t,e,i,n,r,o,s;return e=this.$inputor.val(),t=this.$inputor.caret(\"pos\",{iframe:this.app.iframe}),s=e.slice(0,t),r=this.callbacks(\"matcher\").call(this,this.at,s,this.getOpt(\"startWithSpace\"),this.getOpt(\"acceptSpaceBar\")),n=\"string\"==typeof r,n&&r.length<this.getOpt(\"minLen\",0)?void 0:(n&&r.length<=this.getOpt(\"maxLen\",20)?(o=t-r.length,i=o+r.length,this.pos=o,r={text:r,headPos:o,endPos:i},this.trigger(\"matched\",[this.at,r.text])):(r=null,this.view.hide()),this.query=r)},i.prototype.rect=function(){var e,i,n;if(e=this.$inputor.caret(\"offset\",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(i=t(this.app.iframe).offset(),e.left+=i.left,e.top+=i.top),n=this.app.document.selection?0:2,{left:e.left,top:e.top,bottom:e.top+e.height+n}},i.prototype.insert=function(t,e){var i,n,r,o,s;return i=this.$inputor,n=i.val(),r=n.slice(0,Math.max(this.query.headPos-this.at.length,0)),o=\"\"===(o=this.getOpt(\"suffix\"))?o:o||\" \",t+=o,s=\"\"+r+t+n.slice(this.query.endPos||0),i.val(s),i.caret(\"pos\",r.length+t.length,{iframe:this.app.iframe}),i.is(\":focus\")||i.focus(),i.change()},i}(r);var l,a=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return a(n,e),n.prototype._getRange=function(){var t;return t=this.app.window.getSelection(),t.rangeCount>0?t.getRangeAt(0):void 0},n.prototype._setRange=function(e,i,n){return null==n&&(n=this._getRange()),n&&i?(i=t(i)[0],\"after\"===e?(n.setEndAfter(i),n.setStartAfter(i)):(n.setEndBefore(i),n.setStartBefore(i)),n.collapse(!1),this._clearRange(n)):void 0},n.prototype._clearRange=function(t){var e;return null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed?(e.removeAllRanges(),e.addRange(t)):void 0},n.prototype._movingEvent=function(t){var e;return\"click\"===t.type||(e=t.which)===i.RIGHT||e===i.LEFT||e===i.UP||e===i.DOWN},n.prototype._unwrap=function(e){var i;return e=t(e).unwrap().get(0),(i=e.nextSibling)&&i.nodeValue&&(e.nodeValue+=i.nodeValue,t(i).remove()),e},n.prototype.catchQuery=function(e){var n,r,o,s,a,h,l,u,c,p,f,d;if((d=this._getRange())&&d.collapsed){if(e.which===i.ENTER)return(r=t(d.startContainer).closest(\".atwho-query\")).contents().unwrap(),r.is(\":empty\")&&r.remove(),(r=t(\".atwho-query\",this.app.document)).text(r.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(t(d.startContainer).is(this.$inputor))return void this._clearRange();e.which===i.BACKSPACE&&d.startContainer.nodeType===document.ELEMENT_NODE&&(c=d.startOffset-1)>=0?(o=d.cloneRange(),o.setStart(d.startContainer,c),t(o.cloneContents()).contents().last().is(\".atwho-inserted\")&&(a=t(d.startContainer).contents().get(c),this._setRange(\"after\",t(a).contents().last()))):e.which===i.LEFT&&d.startContainer.nodeType===document.TEXT_NODE&&(n=t(d.startContainer.previousSibling),n.is(\".atwho-inserted\")&&0===d.startOffset&&this._setRange(\"after\",n.contents().last()))}if(t(d.startContainer).closest(\".atwho-inserted\").addClass(\"atwho-query\").siblings().removeClass(\"atwho-query\"),(r=t(\".atwho-query\",this.app.document)).length>0&&r.is(\":empty\")&&0===r.text().length&&r.remove(),this._movingEvent(e)||r.removeClass(\"atwho-inserted\"),r.length>0)switch(e.which){case i.LEFT:return this._setRange(\"before\",r.get(0),d),void r.removeClass(\"atwho-query\");case i.RIGHT:return this._setRange(\"after\",r.get(0).nextSibling,d),void r.removeClass(\"atwho-query\")}if(r.length>0&&(f=r.attr(\"data-atwho-at-query\"))&&(r.empty().html(f).attr(\"data-atwho-at-query\",null),this._setRange(\"after\",r.get(0),d)),o=d.cloneRange(),o.setStart(d.startContainer,0),u=this.callbacks(\"matcher\").call(this,this.at,o.toString(),this.getOpt(\"startWithSpace\"),this.getOpt(\"acceptSpaceBar\")),h=\"string\"==typeof u,0===r.length&&h&&(s=d.startOffset-this.at.length-u.length)>=0&&(d.setStart(d.startContainer,s),r=t(\"<span/>\",this.app.document).attr(this.getOpt(\"editableAtwhoQueryAttrs\")).addClass(\"atwho-query\"),d.surroundContents(r.get(0)),l=r.contents().last().get(0),l&&(/firefox/i.test(navigator.userAgent)?(d.setStart(l,l.length),d.setEnd(l,l.length),this._clearRange(d)):this._setRange(\"after\",l,d))),!(h&&u.length<this.getOpt(\"minLen\",0)))return h&&u.length<=this.getOpt(\"maxLen\",20)?(p={text:u,el:r},this.trigger(\"matched\",[this.at,p.text]),this.query=p):(this.view.hide(),this.query={el:r},r.text().indexOf(this.at)>=0&&(this._movingEvent(e)&&r.hasClass(\"atwho-inserted\")?r.removeClass(\"atwho-query\"):!1!==this.callbacks(\"afterMatchFailed\").call(this,this.at,r)&&this._setRange(\"after\",this._unwrap(r.text(r.text()).contents().first()))),null)}},n.prototype.rect=function(){var e,i,n;return n=this.query.el.offset(),n&&this.query.el[0].getClientRects().length?(this.app.iframe&&!this.app.iframeAsRoot&&(i=(e=t(this.app.iframe)).offset(),n.left+=i.left-this.$inputor.scrollLeft(),n.top+=i.top-this.$inputor.scrollTop()),n.bottom=n.top+this.query.el.height(),n):void 0},n.prototype.insert=function(t,e){var i,n,r,o,s;return this.$inputor.is(\":focus\")||this.$inputor.focus(),n=this.getOpt(\"functionOverrides\"),n.insert?n.insert.call(this,t,e):(o=\"\"===(o=this.getOpt(\"suffix\"))?o:o||\" \",i=e.data(\"item-data\"),this.query.el.removeClass(\"atwho-query\").addClass(\"atwho-inserted\").html(t).attr(\"data-atwho-at-query\",\"\"+i[\"atwho-at\"]+this.query.text).attr(\"contenteditable\",\"false\"),(r=this._getRange())&&(this.query.el.length&&r.setEndAfter(this.query.el[0]),r.collapse(!1),r.insertNode(s=this.app.document.createTextNode(\"\"+o)),this._setRange(\"after\",s,r)),this.$inputor.is(\":focus\")||this.$inputor.focus(),this.$inputor.change())},n}(r);var u;u=function(){function e(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}return e.prototype.destroy=function(){return this.storage.data(this.at,null)},e.prototype.saved=function(){return this.fetch()>0},e.prototype.query=function(t,e){var i,n,r;return n=this.fetch(),r=this.context.getOpt(\"searchKey\"),n=this.context.callbacks(\"filter\").call(this.context,t,n,r)||[],i=this.context.callbacks(\"remoteFilter\"),n.length>0||!i&&0===n.length?e(n):i.call(this.context,t,e)},e.prototype.fetch=function(){return this.storage.data(this.at)||[]},e.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks(\"beforeSave\").call(this.context,t||[]))},e.prototype.load=function(t){return!this.saved()&&t?this._load(t):void 0},e.prototype.reload=function(t){return this._load(t)},e.prototype._load=function(e){return\"string\"==typeof e?t.ajax(e,{dataType:\"json\"}).done(function(t){return function(e){return t.save(e)}}(this)):this.save(e)},e}();var c;c=function(){function e(e){this.context=e,this.$el=t(\"<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>\"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return e.prototype.init=function(){var t,e;return e=this.context.getOpt(\"alias\")||this.context.at.charCodeAt(0),t=this.context.getOpt(\"headerTpl\"),t&&1===this.$el.children().length&&this.$el.prepend(t),this.$el.attr({id:\"at-view-\"+e})},e.prototype.destroy=function(){return this.$el.remove()},e.prototype.bindEvent=function(){var e,i,n;return e=this.$el.find(\"ul\"),i=0,n=0,e.on(\"mousemove.atwho-view\",\"li\",function(r){return function(r){var o;if((i!==r.clientX||n!==r.clientY)&&(i=r.clientX,n=r.clientY,o=t(r.currentTarget),!o.hasClass(\"cur\")))return e.find(\".cur\").removeClass(\"cur\"),o.addClass(\"cur\")}}(this)).on(\"click.atwho-view\",\"li\",function(i){return function(n){return e.find(\".cur\").removeClass(\"cur\"),t(n.currentTarget).addClass(\"cur\"),i.choose(n),n.preventDefault()}}(this))},e.prototype.visible=function(){return t.expr.filters.visible(this.$el[0])},e.prototype.highlighted=function(){return this.$el.find(\".cur\").length>0},e.prototype.choose=function(t){var e,i;return(e=this.$el.find(\".cur\")).length&&(i=this.context.insertContentFor(e),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks(\"beforeInsert\").call(this.context,i,e,t),e),this.context.trigger(\"inserted\",[e,t]),this.hide(t)),this.context.getOpt(\"hideWithoutSuffix\")?this.stopShowing=!0:void 0},e.prototype.reposition=function(e){var i,n,r,o;return i=this.context.app.iframeAsRoot?this.context.app.window:window,e.bottom+this.$el.height()-t(i).scrollTop()>t(i).height()&&(e.bottom=e.top-this.$el.height()),e.left>(r=t(i).width()-this.$el.width()-5)&&(e.left=r),n={left:e.left,top:e.bottom},null!=(o=this.context.callbacks(\"beforeReposition\"))&&o.call(this.context,n),this.$el.offset(n),this.context.trigger(\"reposition\",[n])},e.prototype.next=function(){var t,e,i,n;return t=this.$el.find(\".cur\").removeClass(\"cur\"),e=t.next(),e.length||(e=this.$el.find(\"li:first\")),e.addClass(\"cur\"),i=e[0],n=i.offsetTop+i.offsetHeight+(i.nextSibling?i.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},e.prototype.prev=function(){var t,e,i,n;return t=this.$el.find(\".cur\").removeClass(\"cur\"),i=t.prev(),i.length||(i=this.$el.find(\"li:last\")),i.addClass(\"cur\"),n=i[0],e=n.offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,e-this.$el.height()))},e.prototype.scrollTop=function(t){var e;return e=this.context.getOpt(\"scrollDuration\"),e?this.$elUl.animate({scrollTop:t},e):this.$elUl.scrollTop(t)},e.prototype.show=function(){var t;return this.stopShowing?void(this.stopShowing=!1):(this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger(\"shown\")),(t=this.context.rect())?this.reposition(t):void 0)},e.prototype.hide=function(t,e){var i;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger(\"hidden\",[t])):(i=function(t){return function(){return t.hide()}}(this),clearTimeout(this.timeoutID),this.timeoutID=setTimeout(i,e))},e.prototype.render=function(e){var i,n,r,o,s,a,h;if(!(t.isArray(e)&&e.length>0))return void this.hide();for(this.$el.find(\"ul\").empty(),n=this.$el.find(\"ul\"),h=this.context.getOpt(\"displayTpl\"),r=0,s=e.length;s>r;r++)o=e[r],o=t.extend({},o,{\"atwho-at\":this.context.at}),a=this.context.callbacks(\"tplEval\").call(this.context,h,o,\"onDisplay\"),i=t(this.context.callbacks(\"highlighter\").call(this.context,a,this.context.query.text)),i.data(\"item-data\",o),n.append(i);return this.show(),this.context.getOpt(\"highlightFirst\")?n.find(\"li:first\").addClass(\"cur\"):void 0},e}();var p;p={load:function(t,e){var i;return(i=this.controller(t))?i.model.load(e):void 0},isSelecting:function(){var t;return!!(null!=(t=this.controller())?t.view.visible():void 0)},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;return(t=this.controller())?t.view.reposition(t.rect()):void 0},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data(\"atwho\",null)}},t.fn.atwho=function(e){var i,r;return i=arguments,r=null,this.filter('textarea, input, [contenteditable=\"\"], [contenteditable=true]').each(function(){var o,s;return(s=(o=t(this)).data(\"atwho\"))||o.data(\"atwho\",s=new n(this)),\"object\"!=typeof e&&e?p[e]&&s?r=p[e].apply(s,Array.prototype.slice.call(i,1)):t.error(\"Method \"+e+\" does not exist on jQuery.atwho\"):s.reg(e.at,e)}),null!=r?r:this},t.fn.atwho[\"default\"]={at:void 0,alias:void 0,data:null,displayTpl:\"<li>${name}</li>\",insertTpl:\"${atwho-at}${name}\",headerTpl:null,callbacks:e,functionOverrides:{},searchKey:\"name\",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},t.fn.atwho.debug=!1});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./autocomplete.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"8e87fa8e\", content, true, {});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".atwho-view{position:absolute;top:0;left:0;display:none;margin-top:18px;background:var(--color-main-background);color:var(--color-main-text);border:1px solid var(--color-border);border-radius:var(--border-radius);box-shadow:0 0 5px var(--color-box-shadow);min-width:120px;z-index:11110 !important}.atwho-view .atwho-header{padding:5px;margin:5px;cursor:pointer;border-bottom:solid 1px var(--color-border);color:var(--color-main-text);font-size:11px;font-weight:bold}.atwho-view .atwho-header .small{color:var(--color-main-text);float:right;padding-top:2px;margin-right:-5px;font-size:12px;font-weight:normal}.atwho-view .atwho-header:hover{cursor:default}.atwho-view .cur{background:var(--color-primary);color:var(--color-primary-text)}.atwho-view .cur small{color:var(--color-primary-text)}.atwho-view strong{color:var(--color-main-text);font-weight:normal}.atwho-view .cur strong{color:var(--color-primary-text);font-weight:normal}.atwho-view ul{list-style:none;padding:0;margin:auto;max-height:200px;overflow-y:auto}.atwho-view ul li{display:block;padding:5px 10px;border-bottom:1px solid var(--color-border);cursor:pointer}.atwho-view small{font-size:smaller;color:var(--color-main-text);font-weight:normal}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./comments.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"477a5c21\", content, true, {});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#commentsTabView .emptycontent{margin-top:0}#commentsTabView .newCommentForm{margin-left:36px;position:relative}#commentsTabView .newCommentForm .message{width:100%;padding:10px;min-height:44px;margin:0;padding-right:30px}#commentsTabView .newCommentForm .submit,#commentsTabView .newCommentForm .submitLoading{width:44px;height:44px;margin:0;padding:13px;background-color:transparent;border:none;opacity:.3;position:absolute;bottom:0;right:0}#commentsTabView .deleteLoading{padding:14px;vertical-align:middle}#commentsTabView .newCommentForm .submit:not(:disabled):hover,#commentsTabView .newCommentForm .submit:not(:disabled):focus{opacity:1}#commentsTabView .newCommentForm div.message{resize:none}#commentsTabView .newCommentForm div.message:empty:before{content:attr(data-placeholder);color:grey}#commentsTabView .comment{position:relative;padding:10px 0 15px}#commentsTabView .comments .comment{border-top:1px solid var(--color-border)}#commentsTabView .comment .avatar,.atwho-view-ul * .avatar{width:32px;height:32px;line-height:32px;margin-right:5px}#commentsTabView .comment .message .avatar,.atwho-view-ul * .avatar{display:inline-block}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{white-space:pre-wrap}#activityTabView li.comment.collapsed .activitymessage,#commentsTabView .comment.collapsed .message{max-height:70px;overflow:hidden}#activityTabView li.comment .message-overlay,#commentsTabView .comment .message-overlay{display:none}#activityTabView li.comment.collapsed .message-overlay,#commentsTabView .comment.collapsed .message-overlay{display:block;position:absolute;z-index:2;height:50px;pointer-events:none;left:0;right:0;bottom:0;background:-moz-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-webkit-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-o-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:-ms-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background:linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));background-repeat:no-repeat}#commentsTabView .hidden{display:none !important}#commentsTabView .comment .authorRow{min-height:44px}#commentsTabView .comment .authorRow .tooltip{margin-top:5px}.atwho-view-ul * .avatar-name-wrapper,#commentsTabView .comment .authorRow{position:relative;display:inline-flex;align-items:center;width:100%}#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser),#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar,#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar img,#commentsTabView .comment .authorRow .avatar:not(.currentUser),#commentsTabView .comment .authorRow .author:not(.currentUser){cursor:pointer}.atwho-view-ul .avatar-name-wrapper,.atwho-view-ul .avatar-name-wrapper .avatar,.atwho-view-ul .avatar-name-wrapper .avatar img{cursor:pointer}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper{position:relative;display:inline;vertical-align:top;background-color:var(--color-background-dark);border-radius:50vh;padding:1px 7px 1px 1px;white-space:nowrap}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar{height:16px;width:16px;vertical-align:middle;padding:1px;margin-top:-3px;margin-left:0;margin-right:2px}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper .avatar img,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper .avatar img{vertical-align:top}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper strong,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper strong{font-weight:bold}#commentsTabView .comments li .message .atwho-inserted .avatar-name-wrapper.currentUser,#commentsTabView .newCommentForm .atwho-inserted .avatar-name-wrapper.currentUser{background-color:var(--color-primary);color:var(--color-primary-text)}.atwho-view-ul * .avatar-name-wrapper{white-space:nowrap}#commentsTabView .comment .author,#commentsTabView .comment .date{opacity:.5}#commentsTabView .comment .author{max-width:210px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#commentsTabView .comment .date{margin-left:auto;padding:10px 0px}#commentsTabView .comments>li:not(.newCommentRow) .message{padding-left:40px;word-wrap:break-word;overflow-wrap:break-word}#commentsTabView .comment .action{opacity:0.3;padding:14px;display:block}#commentsTabView .comment .action:hover,#commentsTabView .comment .action:focus{opacity:1}#commentsTabView .newCommentRow .action-container{margin-left:auto}#commentsTabView .comment.disabled .message{opacity:0.3}#commentsTabView .comment.disabled .action{display:none}#commentsTabView .message.error{color:#e9322d;border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.app-files .action-comment{padding:16px 14px}#commentsTabView .comment .message .contactsmenu-popover{left:-6px;top:24px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/apps/comments/lib/Activity/Filter.php b/apps/comments/lib/Activity/Filter.php index 8044ed4efb6..0ad6d9bf4ac 100644 --- a/apps/comments/lib/Activity/Filter.php +++ b/apps/comments/lib/Activity/Filter.php @@ -23,7 +23,6 @@ namespace OCA\Comments\Activity; - use OCP\Activity\IFilter; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php index 763e2d036d4..a637d4ca6b3 100644 --- a/apps/comments/lib/Activity/Provider.php +++ b/apps/comments/lib/Activity/Provider.php @@ -146,17 +146,17 @@ class Provider implements IProvider { if ($event->getSubject() === 'add_comment_subject') { if ($subjectParameters['actor'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You commented on %1$s', [ - $subjectParameters['filePath'], - ])) + $subjectParameters['filePath'], + ])) ->setRichSubject($this->l->t('You commented on {file}'), [ 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), ]); } else { $author = $this->generateUserParameter($subjectParameters['actor']); $event->setParsedSubject($this->l->t('%1$s commented on %2$s', [ - $author['name'], - $subjectParameters['filePath'], - ])) + $author['name'], + $subjectParameters['filePath'], + ])) ->setRichSubject($this->l->t('{author} commented on {file}'), [ 'author' => $author, 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), diff --git a/apps/comments/lib/Activity/Setting.php b/apps/comments/lib/Activity/Setting.php index a1ff20d1d4c..fefee1ca876 100644 --- a/apps/comments/lib/Activity/Setting.php +++ b/apps/comments/lib/Activity/Setting.php @@ -23,7 +23,6 @@ namespace OCA\Comments\Activity; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/comments/lib/AppInfo/Application.php b/apps/comments/lib/AppInfo/Application.php index 811f91475ec..a4c01f3f620 100644 --- a/apps/comments/lib/AppInfo/Application.php +++ b/apps/comments/lib/AppInfo/Application.php @@ -45,7 +45,7 @@ class Application extends App { const APP_ID = 'comments'; - public function __construct (array $urlParams = []) { + public function __construct(array $urlParams = []) { parent::__construct(self::APP_ID, $urlParams); $container = $this->getContainer(); @@ -77,8 +77,8 @@ class Application extends App { } protected function registerDavEntity(IEventDispatcher $dispatcher) { - $dispatcher->addListener(CommentsEntityEvent::EVENT_ENTITY, function(CommentsEntityEvent $event) { - $event->addEntityCollection('files', function($name) { + $dispatcher->addListener(CommentsEntityEvent::EVENT_ENTITY, function (CommentsEntityEvent $event) { + $event->addEntityCollection('files', function ($name) { $nodes = \OC::$server->getUserFolder()->getById((int)$name); return !empty($nodes); }); diff --git a/apps/comments/lib/Collaboration/CommentersSorter.php b/apps/comments/lib/Collaboration/CommentersSorter.php index 1789f735973..0db043f918b 100644 --- a/apps/comments/lib/Collaboration/CommentersSorter.php +++ b/apps/comments/lib/Collaboration/CommentersSorter.php @@ -23,7 +23,6 @@ namespace OCA\Comments\Collaboration; - use OCP\Collaboration\AutoComplete\ISorter; use OCP\Comments\ICommentsManager; @@ -61,7 +60,7 @@ class CommentersSorter implements ISorter { // at least on PHP 5.6 usort turned out to be not stable. So we add // the current index to the value and compare it on a draw $i = 0; - $workArray = array_map(function($element) use (&$i) { + $workArray = array_map(function ($element) use (&$i) { return [$i++, $element]; }, $byType); diff --git a/apps/comments/lib/EventHandler.php b/apps/comments/lib/EventHandler.php index 62202cc8501..4364550a222 100644 --- a/apps/comments/lib/EventHandler.php +++ b/apps/comments/lib/EventHandler.php @@ -55,7 +55,7 @@ class EventHandler implements ICommentsEventHandler { } $eventType = $event->getEvent(); - if( $eventType === CommentsEvent::EVENT_ADD + if($eventType === CommentsEvent::EVENT_ADD ) { $this->notificationHandler($event); $this->activityHandler($event); diff --git a/apps/comments/lib/JSSettingsHelper.php b/apps/comments/lib/JSSettingsHelper.php index ce052d783f1..4c54bb07c1c 100644 --- a/apps/comments/lib/JSSettingsHelper.php +++ b/apps/comments/lib/JSSettingsHelper.php @@ -23,7 +23,6 @@ namespace OCA\Comments; - use OCP\IServerContainer; class JSSettingsHelper { diff --git a/apps/comments/lib/Listener/LoadAdditionalScripts.php b/apps/comments/lib/Listener/LoadAdditionalScripts.php index 764e48c582a..ddaf288394b 100644 --- a/apps/comments/lib/Listener/LoadAdditionalScripts.php +++ b/apps/comments/lib/Listener/LoadAdditionalScripts.php @@ -39,7 +39,7 @@ class LoadAdditionalScripts implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'comments'); } diff --git a/apps/comments/lib/Listener/LoadSidebarScripts.php b/apps/comments/lib/Listener/LoadSidebarScripts.php index b27da57a16e..209c62dc406 100644 --- a/apps/comments/lib/Listener/LoadSidebarScripts.php +++ b/apps/comments/lib/Listener/LoadSidebarScripts.php @@ -38,7 +38,7 @@ class LoadSidebarScripts implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'comments'); } diff --git a/apps/comments/lib/Notification/Listener.php b/apps/comments/lib/Notification/Listener.php index 3acdce4e473..ba645ac5779 100644 --- a/apps/comments/lib/Notification/Listener.php +++ b/apps/comments/lib/Notification/Listener.php @@ -65,7 +65,7 @@ class Listener { $notification = $this->instantiateNotification($comment); foreach($mentions as $uid) { - if( ($comment->getActorType() === 'users' && $uid === $comment->getActorId()) + if(($comment->getActorType() === 'users' && $uid === $comment->getActorId()) || !$this->userManager->userExists($uid) ) { // do not notify unknown users or yourself @@ -73,7 +73,7 @@ class Listener { } $notification->setUser($uid); - if( $event->getEvent() === CommentsEvent::EVENT_DELETE + if($event->getEvent() === CommentsEvent::EVENT_DELETE || $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE) { $this->notificationManager->markProcessed($notification); diff --git a/apps/comments/src/commentstabview.js b/apps/comments/src/commentstabview.js index e7dbc0abba7..89fc65dc7c5 100644 --- a/apps/comments/src/commentstabview.js +++ b/apps/comments/src/commentstabview.js @@ -1,5 +1,5 @@ /* eslint-disable */ -/* +/** * Copyright (c) 2016 * * This file is licensed under the Affero General Public License version 3 @@ -264,14 +264,14 @@ }, /** - * takes care of post-rendering after a new comment was added to the - * collection - * - * @param model - * @param collection - * @param options - * @private - */ + * takes care of post-rendering after a new comment was added to the + * collection + * + * @param model + * @param collection + * @param options + * @private + */ _onAddModel: function(model, collection, options) { // we need to render it immediately, to ensure that the right // order of comments is kept on opening comments tab @@ -303,11 +303,11 @@ }, /** - * takes care of post-rendering after a new comment was edited - * - * @param model - * @private - */ + * takes care of post-rendering after a new comment was edited + * + * @param model + * @private + */ _onChangeModel: function(model) { if (model.get('message').trim() === model.previous('message').trim()) { return @@ -402,9 +402,9 @@ }, /** - * Convert a message to be displayed in HTML, - * converts newlines to <br> tags. - */ + * Convert a message to be displayed in HTML, + * converts newlines to <br> tags. + */ _formatMessage: function(message, mentions, editMode) { message = escapeHTML(message).replace(/\n/g, '<br/>') @@ -597,9 +597,12 @@ _onSubmitSuccess: function(model, $form) { var $submit = $form.find('.submit') var $loading = $form.find('.submitLoading') + var $message = $form.find('.message') $submit.removeClass('hidden') $loading.addClass('hidden') + $message.prop('contenteditable', true) + $message.text('') }, _commentBodyHTML2Plain: function($el) { @@ -651,7 +654,7 @@ message = this._commentBodyHTML2Plain($commentField) if (commentId) { - // edit mode + // edit mode var comment = this.collection.get(commentId) comment.save({ message: message @@ -659,7 +662,7 @@ success: function(model) { self._onSubmitSuccess(model, $form) if (model.get('message').trim() === model.previous('message').trim()) { - // model change event doesn't trigger, manually remove the row. + // model change event doesn't trigger, manually remove the row. var $row = $form.closest('.comment') $row.data('commentEl').removeClass('hidden') $row.remove() diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php index 7223019b96a..82df3dce5e0 100644 --- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php +++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php @@ -24,7 +24,6 @@ namespace OCA\Comments\Tests\Unit\Collaboration; - use OCA\Comments\Collaboration\CommentersSorter; use OCP\Comments\IComment; use OCP\Comments\ICommentsManager; diff --git a/apps/dav/appinfo/app.php b/apps/dav/appinfo/app.php index 4127877f5aa..ff5a324946b 100644 --- a/apps/dav/appinfo/app.php +++ b/apps/dav/appinfo/app.php @@ -39,14 +39,14 @@ use Symfony\Component\EventDispatcher\GenericEvent; $app = \OC::$server->query(Application::class); $app->registerHooks(); -\OC::$server->registerService('CardDAVSyncService', function() use ($app) { +\OC::$server->registerService('CardDAVSyncService', function () use ($app) { return $app->getSyncService(); }); $eventDispatcher = \OC::$server->getEventDispatcher(); $eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove', - function(GenericEvent $event) use ($app) { + function (GenericEvent $event) use ($app) { /** @var CardDavBackend $cardDavBackend */ $cardDavBackend = $app->getContainer()->query(CardDavBackend::class); $addressBookUri = $event->getSubject(); @@ -58,7 +58,7 @@ $eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove', ); $eventDispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::createSubscription', - function(GenericEvent $event) use ($app) { + function (GenericEvent $event) use ($app) { $jobList = $app->getContainer()->getServer()->getJobList(); $subscriptionData = $event->getArgument('subscriptionData'); @@ -77,7 +77,7 @@ $eventDispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::createSubscription ); $eventDispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::deleteSubscription', - function(GenericEvent $event) use ($app) { + function (GenericEvent $event) use ($app) { $jobList = $app->getContainer()->getServer()->getJobList(); $subscriptionData = $event->getArgument('subscriptionData'); @@ -92,7 +92,7 @@ $eventDispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::deleteSubscription } ); -$eventHandler = function() use ($app) { +$eventHandler = function () use ($app) { try { $job = $app->getContainer()->query(\OCA\DAV\BackgroundJob\UpdateCalendarResourcesRoomsBackgroundJob::class); $job->run([]); @@ -106,7 +106,7 @@ $eventDispatcher->addListener('\OCP\Calendar\Resource\ForceRefreshEvent', $event $eventDispatcher->addListener('\OCP\Calendar\Room\ForceRefreshEvent', $eventHandler); $cm = \OC::$server->getContactsManager(); -$cm->register(function() use ($cm, $app) { +$cm->register(function () use ($cm, $app) { $user = \OC::$server->getUserSession()->getUser(); if (!is_null($user)) { $app->setupContactsProvider($cm, $user->getUID()); @@ -116,7 +116,7 @@ $cm->register(function() use ($cm, $app) { }); $calendarManager = \OC::$server->getCalendarManager(); -$calendarManager->register(function() use ($calendarManager, $app) { +$calendarManager->register(function () use ($calendarManager, $app) { $user = \OC::$server->getUserSession()->getUser(); if ($user !== null) { $app->setupCalendarProvider($calendarManager, $user->getUID()); diff --git a/apps/dav/appinfo/v1/webdav.php b/apps/dav/appinfo/v1/webdav.php index e270a6b7d9b..6a6a60b3f09 100644 --- a/apps/dav/appinfo/v1/webdav.php +++ b/apps/dav/appinfo/v1/webdav.php @@ -68,7 +68,7 @@ $authPlugin->addBackend($bearerAuthPlugin); $requestUri = \OC::$server->getRequest()->getRequestUri(); -$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function() { +$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function () { // use the view for the logged in user return \OC\Files\Filesystem::getView(); }); diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 7cee070c6d1..64a1f738a70 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -65,7 +65,7 @@ class Application extends App { $container = $this->getContainer(); $server = $container->getServer(); - $container->registerService(PhotoCache::class, function(SimpleContainer $s) use ($server) { + $container->registerService(PhotoCache::class, function (SimpleContainer $s) use ($server) { return new PhotoCache( $server->getAppDataDir('dav-photocache'), $server->getLogger() @@ -147,7 +147,7 @@ class Application extends App { } }); - $clearPhotoCache = function($event) { + $clearPhotoCache = function ($event) { if ($event instanceof GenericEvent) { /** @var PhotoCache $p */ $p = $this->getContainer()->query(PhotoCache::class); @@ -160,20 +160,20 @@ class Application extends App { $dispatcher->addListener('\OCA\DAV\CardDAV\CardDavBackend::updateCard', $clearPhotoCache); $dispatcher->addListener('\OCA\DAV\CardDAV\CardDavBackend::deleteCard', $clearPhotoCache); - $dispatcher->addListener('OC\AccountManager::userUpdated', function(GenericEvent $event) { + $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) { $user = $event->getSubject(); $syncService = $this->getContainer()->query(SyncService::class); $syncService->updateUser($user); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::createCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::createCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarAdd( $event->getArgument('calendarData') ); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarUpdate( @@ -182,7 +182,7 @@ class Application extends App { $event->getArgument('propertyMutations') ); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::deleteCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::deleteCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarDelete( @@ -195,7 +195,7 @@ class Application extends App { $event->getArgument('calendarId') ); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateShares', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateShares', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarUpdateShares( @@ -208,7 +208,7 @@ class Application extends App { // Here we should recalculate if reminders should be sent to new or old sharees }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::publishCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::publishCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarPublication( @@ -217,7 +217,7 @@ class Application extends App { ); }); - $listener = function(GenericEvent $event, $eventName) { + $listener = function (GenericEvent $event, $eventName) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); diff --git a/apps/dav/lib/AppInfo/PluginManager.php b/apps/dav/lib/AppInfo/PluginManager.php index db54e057498..21ff40ba6b8 100644 --- a/apps/dav/lib/AppInfo/PluginManager.php +++ b/apps/dav/lib/AppInfo/PluginManager.php @@ -272,7 +272,7 @@ class PluginManager { * @param string[] $plugin */ private function loadSabreAddressBookPluginsFromInfoXml(array $plugins): void { - $providers = array_map(function(string $className): IAddressBookProvider { + $providers = array_map(function (string $className): IAddressBookProvider { $instance = $this->createPluginInstance($className); if (!($instance instanceof IAddressBookProvider)) { throw new \Exception("Sabre address book plugin class '$className' does not implement the \OCA\DAV\CardDAV\Integration\IAddressBookProvider interface"); diff --git a/apps/dav/lib/Avatars/AvatarHome.php b/apps/dav/lib/Avatars/AvatarHome.php index d2fbd3a9c2c..8ee43281b62 100644 --- a/apps/dav/lib/Avatars/AvatarHome.php +++ b/apps/dav/lib/Avatars/AvatarHome.php @@ -24,7 +24,6 @@ namespace OCA\DAV\Avatars; - use OCP\IAvatarManager; use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\Exception\MethodNotAllowed; diff --git a/apps/dav/lib/Avatars/AvatarNode.php b/apps/dav/lib/Avatars/AvatarNode.php index ff5bc6212c7..af3486c4368 100644 --- a/apps/dav/lib/Avatars/AvatarNode.php +++ b/apps/dav/lib/Avatars/AvatarNode.php @@ -23,7 +23,6 @@ namespace OCA\DAV\Avatars; - use OCP\IAvatar; use Sabre\DAV\File; diff --git a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php index 93d3091042f..8396bfb9a5a 100644 --- a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php +++ b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php @@ -57,7 +57,7 @@ class RegisterRegenerateBirthdayCalendars extends QueuedJob { * @inheritDoc */ public function run($argument) { - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ 'userId' => $user->getUID(), 'purgeBeforeGenerating' => true diff --git a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php index 75a36823620..7fe107e0004 100644 --- a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php @@ -398,7 +398,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { ->where($query->expr()->eq('backend_id', $query->createNamedParameter($backendId))); $stmt = $query->execute(); - return array_map(function($row) { + return array_map(function ($row) { return $row['resource_id']; }, $stmt->fetchAll(\PDO::FETCH_NAMED)); } diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index cd88ed4ab1e..f5863ddeafe 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -77,7 +77,7 @@ class UploadCleanup extends TimedJob { // The folder has to be more than a day old $initial = $uploadFolder->getMTime() < $time; - $expire = array_reduce($files, function(bool $carry, File $file) use ($time) { + $expire = array_reduce($files, function (bool $carry, File $file) use ($time) { return $carry && $file->getMTime() < $time; }, $initial); diff --git a/apps/dav/lib/CalDAV/Activity/Backend.php b/apps/dav/lib/CalDAV/Activity/Backend.php index cb9c546b82d..d0232cde1b1 100644 --- a/apps/dav/lib/CalDAV/Activity/Backend.php +++ b/apps/dav/lib/CalDAV/Activity/Backend.php @@ -25,7 +25,6 @@ namespace OCA\DAV\CalDAV\Activity; - use OCA\DAV\CalDAV\Activity\Provider\Calendar; use OCA\DAV\CalDAV\Activity\Provider\Event; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php b/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php index cb040281a3b..c2c7ec5d34a 100644 --- a/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php +++ b/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php @@ -24,7 +24,6 @@ namespace OCA\DAV\CalDAV\Activity\Filter; - use OCP\Activity\IFilter; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/apps/dav/lib/CalDAV/Activity/Filter/Todo.php b/apps/dav/lib/CalDAV/Activity/Filter/Todo.php index 9694509cc62..d361ff389c4 100644 --- a/apps/dav/lib/CalDAV/Activity/Filter/Todo.php +++ b/apps/dav/lib/CalDAV/Activity/Filter/Todo.php @@ -23,7 +23,6 @@ namespace OCA\DAV\CalDAV\Activity\Filter; - use OCP\Activity\IFilter; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php b/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php index 15c47c5471f..b9475535e4d 100644 --- a/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php +++ b/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php @@ -23,7 +23,6 @@ namespace OCA\DAV\CalDAV\Activity\Setting; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Event.php b/apps/dav/lib/CalDAV/Activity/Setting/Event.php index bcb04f8e64a..1cd3fc3a051 100644 --- a/apps/dav/lib/CalDAV/Activity/Setting/Event.php +++ b/apps/dav/lib/CalDAV/Activity/Setting/Event.php @@ -23,7 +23,6 @@ namespace OCA\DAV\CalDAV\Activity\Setting; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Todo.php b/apps/dav/lib/CalDAV/Activity/Setting/Todo.php index fb6be4a9e38..2dfc85957c6 100644 --- a/apps/dav/lib/CalDAV/Activity/Setting/Todo.php +++ b/apps/dav/lib/CalDAV/Activity/Setting/Todo.php @@ -23,7 +23,6 @@ namespace OCA\DAV\CalDAV\Activity\Setting; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php index 0e6436a7b09..a1ebd409f0e 100644 --- a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php +++ b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php @@ -87,7 +87,7 @@ class EnablePlugin extends ServerPlugin { * * @return string */ - public function getPluginName() { + public function getPluginName() { return 'nc-enable-birthday-calendar'; } diff --git a/apps/dav/lib/CalDAV/CachedSubscription.php b/apps/dav/lib/CalDAV/CachedSubscription.php index baba0727f21..093a86dcad0 100644 --- a/apps/dav/lib/CalDAV/CachedSubscription.php +++ b/apps/dav/lib/CalDAV/CachedSubscription.php @@ -135,7 +135,7 @@ class CachedSubscription extends \Sabre\CalDAV\Calendar { } $obj['acl'] = $this->getChildACL(); - return new CachedSubscriptionObject ($this->caldavBackend, $this->calendarInfo, $obj); + return new CachedSubscriptionObject($this->caldavBackend, $this->calendarInfo, $obj); } diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index bef0a9e7194..a6f1cef7095 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -308,7 +308,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); $principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal)); - $principals = array_map(function($principal) { + $principals = array_map(function ($principal) { return urldecode($principal); }, $principals); $principals[]= $principalUri; @@ -772,7 +772,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription [ 'calendarId' => $calendarId, 'calendarData' => $this->getCalendarById($calendarId), - ])); + ])); return $calendarId; } @@ -800,16 +800,16 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($calendarId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) { $newValues = []; foreach ($mutations as $propertyName => $propertyValue) { switch ($propertyName) { - case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' : + case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp': $fieldName = 'transparent'; $newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent'); break; - default : + default: $fieldName = $this->propertyMap[$propertyName]; $newValues[$fieldName] = $propertyValue; break; @@ -833,7 +833,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'calendarData' => $this->getCalendarById($calendarId), 'shares' => $this->getShares($calendarId), 'propertyMutations' => $mutations, - ])); + ])); return true; }); @@ -852,7 +852,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'calendarId' => $calendarId, 'calendarData' => $this->getCalendarById($calendarId), 'shares' => $this->getShares($calendarId), - ])); + ])); $stmt = $this->db->prepare('DELETE FROM `*PREFIX*calendarobjects` WHERE `calendarid` = ? AND `calendartype` = ?'); $stmt->execute([$calendarId, self::CALENDAR_TYPE_CALENDAR]); @@ -1587,7 +1587,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $result = $outerQuery->execute(); $calendarObjects = $result->fetchAll(); - return array_map(function($o) { + return array_map(function ($o) { $calendarData = Reader::read($o['calendardata']); $comps = $calendarData->getComponents(); $objects = []; @@ -1605,10 +1605,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'type' => $o['componenttype'], 'uid' => $o['uid'], 'uri' => $o['uri'], - 'objects' => array_map(function($c) { + 'objects' => array_map(function ($c) { return $this->transformSearchData($c); }, $objects), - 'timezones' => array_map(function($c) { + 'timezones' => array_map(function ($c) { return $this->transformSearchData($c); }, $timezones), ]; @@ -1624,7 +1624,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** @var Component[] $subComponents */ $subComponents = $comp->getComponents(); /** @var Property[] $properties */ - $properties = array_filter($comp->children(), function($c) { + $properties = array_filter($comp->children(), function ($c) { return $c instanceof Property; }); $validationRules = $comp->getValidationRules(); @@ -1812,13 +1812,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription foreach($changes as $uri => $operation) { switch($operation) { - case 1 : + case 1: $result['added'][] = $uri; break; - case 2 : + case 2: $result['modified'][] = $uri; break; - case 3 : + case 3: $result['deleted'][] = $uri; break; } @@ -1993,7 +1993,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($subscriptionId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) { $newValues = []; @@ -2095,11 +2095,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } return [ - 'uri' => $row['uri'], - 'calendardata' => $row['calendardata'], - 'lastmodified' => $row['lastmodified'], - 'etag' => '"' . $row['etag'] . '"', - 'size' => (int)$row['size'], + 'uri' => $row['uri'], + 'calendardata' => $row['calendardata'], + 'lastmodified' => $row['lastmodified'], + 'etag' => '"' . $row['etag'] . '"', + 'size' => (int)$row['size'], ]; } @@ -2124,11 +2124,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $result = []; foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { $result[] = [ - 'calendardata' => $row['calendardata'], - 'uri' => $row['uri'], - 'lastmodified' => $row['lastmodified'], - 'etag' => '"' . $row['etag'] . '"', - 'size' => (int)$row['size'], + 'calendardata' => $row['calendardata'], + 'uri' => $row['uri'], + 'lastmodified' => $row['lastmodified'], + 'etag' => '"' . $row['etag'] . '"', + 'size' => (int)$row['size'], ]; } diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index ca8534a76b8..1c7e0106fb6 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -191,10 +191,10 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { if ($this->getOwner() !== parent::getOwner()) { $acl[] = [ - 'privilege' => '{DAV:}read', - 'principal' => parent::getOwner(), - 'protected' => true, - ]; + 'privilege' => '{DAV:}read', + 'principal' => parent::getOwner(), + 'protected' => true, + ]; if ($this->canWrite()) { $acl[] = [ 'privilege' => '{DAV:}write', @@ -225,7 +225,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { parent::getOwner(), 'principals/system/public' ]; - return array_filter($acl, function($rule) use ($allowedPrincipals) { + return array_filter($acl, function ($rule) use ($allowedPrincipals) { return \in_array($rule['principal'], $allowedPrincipals, true); }); } @@ -246,7 +246,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { $this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) { $principal = 'principal:' . parent::getOwner(); $shares = $this->caldavBackend->getShares($this->getResourceId()); - $shares = array_filter($shares, function($share) use ($principal){ + $shares = array_filter($shares, function ($share) use ($principal) { return $share['href'] === $principal; }); if (empty($shares)) { diff --git a/apps/dav/lib/CalDAV/CalendarObject.php b/apps/dav/lib/CalDAV/CalendarObject.php index 6aee57809fa..9a402d3bf2c 100644 --- a/apps/dav/lib/CalDAV/CalendarObject.php +++ b/apps/dav/lib/CalDAV/CalendarObject.php @@ -26,7 +26,6 @@ namespace OCA\DAV\CalDAV; - use OCP\IL10N; use Sabre\VObject\Component; use Sabre\VObject\Property; diff --git a/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php b/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php index 806d0f13a03..b15468e460d 100644 --- a/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php +++ b/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php @@ -22,7 +22,6 @@ */ namespace OCA\DAV\CalDAV\Integration; - /** * Interface ICalendarProvider * diff --git a/apps/dav/lib/CalDAV/Principal/Collection.php b/apps/dav/lib/CalDAV/Principal/Collection.php index 80090def6a5..fe345d24801 100644 --- a/apps/dav/lib/CalDAV/Principal/Collection.php +++ b/apps/dav/lib/CalDAV/Principal/Collection.php @@ -23,7 +23,6 @@ namespace OCA\DAV\CalDAV\Principal; - /** * Class Collection * diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 28e96e9b1d5..214fb79464e 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -95,7 +95,7 @@ class PublishPlugin extends ServerPlugin { * * @return string */ - public function getPluginName() { + public function getPluginName() { return 'oc-calendar-publishing'; } @@ -128,7 +128,7 @@ class PublishPlugin extends ServerPlugin { } }); - $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function() use ($node) { + $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function () use ($node) { $canShare = (!$node->isSubscription() && $node->canWrite()); $canPublish = (!$node->isSubscription() && $node->canWrite()); @@ -176,7 +176,7 @@ class PublishPlugin extends ServerPlugin { switch ($documentType) { - case '{'.self::NS_CALENDARSERVER.'}publish-calendar' : + case '{'.self::NS_CALENDARSERVER.'}publish-calendar': // We can only deal with IShareableCalendar objects if (!$node instanceof Calendar) { @@ -204,7 +204,7 @@ class PublishPlugin extends ServerPlugin { // Breaking the event chain return false; - case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar' : + case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar': // We can only deal with IShareableCalendar objects if (!$node instanceof Calendar) { diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php index fe4153fccf0..39fe4b248cb 100644 --- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php +++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php @@ -727,7 +727,7 @@ class ReminderService { * @return VObject\Component\VEvent[] */ private function getRecurrenceExceptionFromListOfVEvents(array $vevents):array { - return array_values(array_filter($vevents, function(VEvent $vevent) { + return array_values(array_filter($vevents, function (VEvent $vevent) { return $vevent->{'RECURRENCE-ID'} !== null; })); } @@ -737,7 +737,7 @@ class ReminderService { * @return VEvent|null */ private function getMasterItemFromListOfVEvents(array $vevents):?VEvent { - $elements = array_values(array_filter($vevents, function(VEvent $vevent) { + $elements = array_values(array_filter($vevents, function (VEvent $vevent) { return $vevent->{'RECURRENCE-ID'} === null; })); diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index 5a25fbaa22e..96b4371bd7c 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -305,11 +305,11 @@ abstract class AbstractPrincipalBackend implements BackendInterface { default: $rowsByMetadata = $this->searchPrincipalsByMetadataKey($prop, $value); - $filteredRows = array_filter($rowsByMetadata, function($row) use ($usersGroups) { + $filteredRows = array_filter($rowsByMetadata, function ($row) use ($usersGroups) { return $this->isAllowedToAccessResource($row, $usersGroups); }); - $results[] = array_map(function($row) { + $results[] = array_map(function ($row) { return $row['uri']; }, $filteredRows); diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 55a7b3ee691..7ad4a3904ed 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -261,7 +261,7 @@ EOF; */ function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) { if ($node instanceof IPrincipal) { - $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function() use ($node) { + $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function () use ($node) { /** @var \OCA\DAV\CalDAV\Plugin $caldavPlugin */ $caldavPlugin = $this->server->getPlugin('caldav'); $principalUrl = $node->getPrincipalUrl(); diff --git a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php index d25018c1298..d00e0886b61 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php @@ -166,7 +166,7 @@ class RefreshWebcalService { public function getSubscription(string $principalUri, string $uri) { $subscriptions = array_values(array_filter( $this->calDavBackend->getSubscriptionsForUser($principalUri), - function($sub) use ($uri) { + function ($sub) use ($uri) { return $sub['uri'] === $uri; } )); @@ -197,7 +197,7 @@ class RefreshWebcalService { ->withHeader('Accept', 'text/calendar, application/calendar+json, application/calendar+xml') ->withHeader('User-Agent', 'Nextcloud Webcal Crawler'); })); - $handlerStack->push(Middleware::mapResponse(function(ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { + $handlerStack->push(Middleware::mapResponse(function (ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { if (!$didBreak301Chain) { if ($response->getStatusCode() !== 301) { $didBreak301Chain = true; diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index 56aa328be3e..010e98d18e7 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -130,10 +130,10 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { if ($this->getOwner() !== parent::getOwner()) { $acl[] = [ - 'privilege' => '{DAV:}read', - 'principal' => parent::getOwner(), - 'protected' => true, - ]; + 'privilege' => '{DAV:}read', + 'principal' => parent::getOwner(), + 'protected' => true, + ]; if ($this->canWrite()) { $acl[] = [ 'privilege' => '{DAV:}write', @@ -145,7 +145,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { $acl = $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl); $allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/system']; - return array_filter($acl, function($rule) use ($allowedPrincipals) { + return array_filter($acl, function ($rule) use ($allowedPrincipals) { return \in_array($rule['principal'], $allowedPrincipals, true); }); } @@ -183,7 +183,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) { $principal = 'principal:' . parent::getOwner(); $shares = $this->carddavBackend->getShares($this->getResourceId()); - $shares = array_filter($shares, function($share) use ($principal){ + $shares = array_filter($shares, function ($share) use ($principal) { return $share['href'] === $principal; }); if (empty($shares)) { diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php index 7ced2e90561..fd1cd8827aa 100644 --- a/apps/dav/lib/CardDAV/AddressBookImpl.php +++ b/apps/dav/lib/CardDAV/AddressBookImpl.php @@ -284,7 +284,7 @@ class AddressBookImpl implements IAddressBook { $result[$property->name][] = [ 'type' => $type, 'value' => $property->getValue() - ]; + ]; } else { $result[$property->name][] = $property->getValue(); } diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 8925fcdbd0c..54427404db5 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -76,8 +76,8 @@ class CardDavBackend implements BackendInterface, SyncSupport { /** @var array properties to index */ public static $indexProperties = [ - 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME', - 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD']; + 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME', + 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD']; /** * @var string[] Map of uid => display name @@ -174,7 +174,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); $principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal)); - $principals = array_map(function($principal) { + $principals = array_map(function ($principal) { return urldecode($principal); }, $principals); $principals[]= $principalUri; @@ -363,16 +363,16 @@ class CardDavBackend implements BackendInterface, SyncSupport { /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($addressBookId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) { $updates = []; foreach($mutations as $property=>$newValue) { switch($property) { - case '{DAV:}displayname' : + case '{DAV:}displayname': $updates['displayname'] = $newValue; break; - case '{' . Plugin::NS_CARDDAV . '}addressbook-description' : + case '{' . Plugin::NS_CARDDAV . '}addressbook-description': $updates['description'] = $newValue; break; } @@ -414,13 +414,13 @@ class CardDavBackend implements BackendInterface, SyncSupport { foreach($properties as $property=>$newValue) { switch($property) { - case '{DAV:}displayname' : + case '{DAV:}displayname': $values['displayname'] = $newValue; break; - case '{' . Plugin::NS_CARDDAV . '}addressbook-description' : + case '{' . Plugin::NS_CARDDAV . '}addressbook-description': $values['description'] = $newValue; break; - default : + default: throw new BadRequest('Unknown property: ' . $property); } @@ -939,7 +939,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $result->closeCursor(); - return array_map(function($array) { + return array_map(function ($array) { $array['carddata'] = $this->readBlob($array['carddata']); return $array; }, $cards); diff --git a/apps/dav/lib/CardDAV/ImageExportPlugin.php b/apps/dav/lib/CardDAV/ImageExportPlugin.php index 396d847d883..74faa5d7df9 100644 --- a/apps/dav/lib/CardDAV/ImageExportPlugin.php +++ b/apps/dav/lib/CardDAV/ImageExportPlugin.php @@ -97,7 +97,7 @@ class ImageExportPlugin extends ServerPlugin { $addressbook = $this->server->tree->getNodeForPath($addressbookpath); $response->setHeader('Cache-Control', 'private, max-age=3600, must-revalidate'); - $response->setHeader('Etag', $node->getETag() ); + $response->setHeader('Etag', $node->getETag()); $response->setHeader('Pragma', 'public'); try { diff --git a/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php b/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php index b999cc71688..6542db23650 100644 --- a/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php +++ b/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php @@ -25,7 +25,6 @@ declare(strict_types=1); */ namespace OCA\DAV\CardDAV\Integration; - /** * @since 19.0.0 */ diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 53067978749..c0241de2076 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -202,7 +202,7 @@ class SyncService { $body = $this->buildSyncCollectionRequestBody($syncToken); $response = $client->request('REPORT', $addressBookUrl, $body, [ - 'Content-Type' => 'application/xml' + 'Content-Type' => 'application/xml' ]); return $this->parseMultiStatus($response['body']); @@ -322,7 +322,7 @@ class SyncService { public function syncInstance(\Closure $progressCallback = null) { $systemAddressBook = $this->getLocalSystemAddressBook(); - $this->userManager->callForSeenUsers(function($user) use ($systemAddressBook, $progressCallback) { + $this->userManager->callForSeenUsers(function ($user) use ($systemAddressBook, $progressCallback) { $this->updateUser($user); if (!is_null($progressCallback)) { $progressCallback(); diff --git a/apps/dav/lib/CardDAV/UserAddressBooks.php b/apps/dav/lib/CardDAV/UserAddressBooks.php index 4b4ec4e12e9..7ebe3b03d11 100644 --- a/apps/dav/lib/CardDAV/UserAddressBooks.php +++ b/apps/dav/lib/CardDAV/UserAddressBooks.php @@ -72,7 +72,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome { $addressBooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri); /** @var IAddressBook[] $objects */ - $objects = array_map(function(array $addressBook) { + $objects = array_map(function (array $addressBook) { if ($addressBook['principaluri'] === 'principals/system/system') { return new SystemAddressbook($this->carddavBackend, $addressBook, $this->l10n, $this->config); } @@ -80,7 +80,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome { return new AddressBook($this->carddavBackend, $addressBook, $this->l10n); }, $addressBooks); /** @var IAddressBook[][] $objectsFromPlugins */ - $objectsFromPlugins = array_map(function(IAddressBookProvider $plugin): array { + $objectsFromPlugins = array_map(function (IAddressBookProvider $plugin): array { return $plugin->fetchAllForAddressBookHome($this->principalUri); }, $this->pluginManager->getAddressBookPlugins()); diff --git a/apps/dav/lib/Command/MoveCalendar.php b/apps/dav/lib/Command/MoveCalendar.php index 9efd63722df..8399fb5ed32 100644 --- a/apps/dav/lib/Command/MoveCalendar.php +++ b/apps/dav/lib/Command/MoveCalendar.php @@ -180,7 +180,7 @@ class MoveCalendar extends Command { */ if (count($shares) > 0) { $this->io->note([ - "Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.", + "Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.", "Sharees will need to change \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userOrigin\" to \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userDestination\"" ]); } diff --git a/apps/dav/lib/Command/SyncBirthdayCalendar.php b/apps/dav/lib/Command/SyncBirthdayCalendar.php index f11c5784d55..211df745e41 100644 --- a/apps/dav/lib/Command/SyncBirthdayCalendar.php +++ b/apps/dav/lib/Command/SyncBirthdayCalendar.php @@ -96,7 +96,7 @@ class SyncBirthdayCalendar extends Command { $output->writeln("Start birthday calendar sync for all users ..."); $p = new ProgressBar($output); $p->start(); - $this->userManager->callForSeenUsers(function($user) use ($p) { + $this->userManager->callForSeenUsers(function ($user) use ($p) { $p->advance(); $userId = $user->getUID(); @@ -113,7 +113,7 @@ class SyncBirthdayCalendar extends Command { $output->writeln(''); } - protected function verifyEnabled () { + protected function verifyEnabled() { $isEnabled = $this->config->getAppValue('dav', 'generateBirthdayCalendar', 'yes'); if ($isEnabled !== 'yes') { diff --git a/apps/dav/lib/Command/SyncSystemAddressBook.php b/apps/dav/lib/Command/SyncSystemAddressBook.php index 1729ab8f382..f707e733add 100644 --- a/apps/dav/lib/Command/SyncSystemAddressBook.php +++ b/apps/dav/lib/Command/SyncSystemAddressBook.php @@ -56,7 +56,7 @@ class SyncSystemAddressBook extends Command { $output->writeln('Syncing users ...'); $progress = new ProgressBar($output); $progress->start(); - $this->syncService->syncInstance(function() use ($progress) { + $this->syncService->syncInstance(function () use ($progress) { $progress->advance(); }); diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php index 0d42062951b..d24c41409ba 100644 --- a/apps/dav/lib/Comments/CommentNode.php +++ b/apps/dav/lib/Comments/CommentNode.php @@ -23,7 +23,6 @@ namespace OCA\DAV\Comments; - use OCP\Comments\IComment; use OCP\Comments\ICommentsManager; use OCP\Comments\MessageTooLongException; @@ -86,7 +85,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { $this->logger = $logger; $methods = get_class_methods($this->comment); - $methods = array_filter($methods, function($name){ + $methods = array_filter($methods, function ($name) { return strpos($name, 'get') === 0; }); foreach($methods as $getter) { @@ -132,7 +131,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { protected function checkWriteAccessOnComment() { $user = $this->userSession->getUser(); - if( $this->comment->getActorType() !== 'users' + if($this->comment->getActorType() !== 'users' || is_null($user) || $this->comment->getActorId() !== $user->getUID() ) { @@ -284,7 +283,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @return array */ protected function composeMentionsPropertyValue() { - return array_map(function($mention) { + return array_map(function ($mention) { try { $displayName = $this->commentsManager->resolveDisplayName($mention['type'], $mention['id']); } catch (\OutOfBoundsException $e) { diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php index 5fc8666de05..55b0bdd4b40 100644 --- a/apps/dav/lib/Comments/CommentsPlugin.php +++ b/apps/dav/lib/Comments/CommentsPlugin.php @@ -91,7 +91,7 @@ class CommentsPlugin extends ServerPlugin { $this->server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc'; - $this->server->xml->classMap['DateTime'] = function(Writer $writer, \DateTime $value) { + $this->server->xml->classMap['DateTime'] = function (Writer $writer, \DateTime $value) { $writer->write(\Sabre\HTTP\toDate($value)); }; diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php index a479d0ff965..51d453e3f2a 100644 --- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php @@ -99,15 +99,15 @@ class CommentPropertiesPlugin extends ServerPlugin { } } - $propFind->handle(self::PROPERTY_NAME_COUNT, function() use ($node) { + $propFind->handle(self::PROPERTY_NAME_COUNT, function () use ($node) { return $this->commentsManager->getNumberOfCommentsForObject('files', (string)$node->getId()); }); - $propFind->handle(self::PROPERTY_NAME_HREF, function() use ($node) { + $propFind->handle(self::PROPERTY_NAME_HREF, function () use ($node) { return $this->getCommentsLink($node); }); - $propFind->handle(self::PROPERTY_NAME_UNREAD, function() use ($node) { + $propFind->handle(self::PROPERTY_NAME_UNREAD, function () use ($node) { if (isset($this->cachedUnreadCount[$node->getId()])) { return $this->cachedUnreadCount[$node->getId()]; } else { diff --git a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php index f068b62d5dd..9c68b065dbb 100644 --- a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php +++ b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php @@ -25,6 +25,7 @@ */ namespace OCA\DAV\Connector\Sabre; + use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php index 2812eba9797..62c9915cc4e 100644 --- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php @@ -89,10 +89,10 @@ class FakeLockerPlugin extends ServerPlugin { * @return void */ function propFind(PropFind $propFind, INode $node) { - $propFind->handle('{DAV:}supportedlock', function() { + $propFind->handle('{DAV:}supportedlock', function () { return new SupportedLock(true); }); - $propFind->handle('{DAV:}lockdiscovery', function() use ($propFind) { + $propFind->handle('{DAV:}lockdiscovery', function () use ($propFind) { return new LockDiscovery([]); }); } @@ -134,8 +134,8 @@ class FakeLockerPlugin extends ServerPlugin { $lockInfo->timeout = 1800; $body = $this->server->xml->write('{DAV:}prop', [ - '{DAV:}lockdiscovery' => - new LockDiscovery([$lockInfo]) + '{DAV:}lockdiscovery' => + new LockDiscovery([$lockInfo]) ]); $response->setStatus(200); diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 40075f68a73..125935fce5e 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -512,7 +512,7 @@ class File extends Node implements IFile { $bytesWritten = $chunk_handler->store($info['index'], $data); //detect aborted upload - if (isset ($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { + if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { if (isset($_SERVER['CONTENT_LENGTH'])) { $expected = (int)$_SERVER['CONTENT_LENGTH']; if ($bytesWritten !== $expected) { diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index fd432a21377..890e65a7fa5 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -180,7 +180,7 @@ class FilesPlugin extends ServerPlugin { $this->server->on('afterWriteContent', [$this, 'sendFileIdHeader']); $this->server->on('afterMethod:GET', [$this,'httpGet']); $this->server->on('afterMethod:GET', [$this, 'handleDownloadToken']); - $this->server->on('afterResponse', function($request, ResponseInterface $response) { + $this->server->on('afterResponse', function ($request, ResponseInterface $response) { $body = $response->getBody(); if (is_resource($body)) { fclose($body); @@ -209,7 +209,7 @@ class FilesPlugin extends ServerPlugin { $sourceNodeFileInfo = $sourceNode->getFileInfo(); if ($sourceNodeFileInfo === null) { throw new NotFound($source . ' does not exist'); - } + } if (!$sourceNodeFileInfo->isDeletable()) { throw new Forbidden($source . " cannot be deleted"); @@ -299,21 +299,21 @@ class FilesPlugin extends ServerPlugin { * so users were unable to navigate into folders where one subitem * is blocked by the files_accesscontrol app, see: * https://github.com/nextcloud/files_accesscontrol/issues/65 - if (!$node->getFileInfo()->isReadable()) { - // avoid detecting files through this means - throw new NotFound(); - } + * if (!$node->getFileInfo()->isReadable()) { + * // avoid detecting files through this means + * throw new NotFound(); + * } */ - $propFind->handle(self::FILEID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::FILEID_PROPERTYNAME, function () use ($node) { return $node->getFileId(); }); - $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function () use ($node) { return $node->getInternalFileId(); }); - $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function () use ($node) { $perms = $node->getDavPermissions(); if ($this->isPublic) { // remove mount information @@ -322,13 +322,13 @@ class FilesPlugin extends ServerPlugin { return $perms; }); - $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) { + $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function () use ($node, $httpRequest) { return $node->getSharePermissions( $httpRequest->getRawServerValue('PHP_AUTH_USER') ); }); - $propFind->handle(self::OCM_SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) { + $propFind->handle(self::OCM_SHARE_PERMISSIONS_PROPERTYNAME, function () use ($node, $httpRequest) { $ncPermissions = $node->getSharePermissions( $httpRequest->getRawServerValue('PHP_AUTH_USER') ); @@ -336,11 +336,11 @@ class FilesPlugin extends ServerPlugin { return json_encode($ocmPermissions); }); - $propFind->handle(self::GETETAG_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::GETETAG_PROPERTYNAME, function () use ($node) { return $node->getETag(); }); - $propFind->handle(self::OWNER_ID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::OWNER_ID_PROPERTYNAME, function () use ($node) { $owner = $node->getOwner(); if (!$owner) { return null; @@ -348,7 +348,7 @@ class FilesPlugin extends ServerPlugin { return $owner->getUID(); } }); - $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function () use ($node) { $owner = $node->getOwner(); if (!$owner) { return null; @@ -360,14 +360,14 @@ class FilesPlugin extends ServerPlugin { $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { return json_encode($this->previewManager->isAvailable($node->getFileInfo())); }); - $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node) { return $node->getSize(); }); $propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->getMountPoint()->getMountType(); }); - $propFind->handle(self::SHARE_NOTE, function() use ($node, $httpRequest) { + $propFind->handle(self::SHARE_NOTE, function () use ($node, $httpRequest) { return $node->getNoteFromShare( $httpRequest->getRawServerValue('PHP_AUTH_USER') ); @@ -375,13 +375,13 @@ class FilesPlugin extends ServerPlugin { } if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { - $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function () use ($node) { return $this->config->getSystemValue('data-fingerprint', ''); }); } if ($node instanceof \OCA\DAV\Connector\Sabre\File) { - $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function () use ($node) { /** @var $node \OCA\DAV\Connector\Sabre\File */ try { $directDownloadUrl = $node->getDirectDownload(); @@ -396,7 +396,7 @@ class FilesPlugin extends ServerPlugin { return false; }); - $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function () use ($node) { $checksum = $node->getChecksum(); if ($checksum === null || $checksum === '') { return null; @@ -405,22 +405,22 @@ class FilesPlugin extends ServerPlugin { return new ChecksumList($checksum); }); - $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->getCreationTime(); }); - $propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->getUploadTime(); }); } if ($node instanceof \OCA\DAV\Connector\Sabre\Directory) { - $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node) { return $node->getSize(); }); - $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->isEncrypted() ? '1' : '0'; }); } @@ -467,14 +467,14 @@ class FilesPlugin extends ServerPlugin { return; } - $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($node) { + $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function ($time) use ($node) { if (empty($time)) { return false; } $node->touch($time); return true; }); - $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($node) { + $propPatch->handle(self::GETETAG_PROPERTYNAME, function ($etag) use ($node) { if (empty($etag)) { return false; } @@ -483,7 +483,7 @@ class FilesPlugin extends ServerPlugin { } return false; }); - $propPatch->handle(self::CREATION_TIME_PROPERTYNAME, function($time) use ($node) { + $propPatch->handle(self::CREATION_TIME_PROPERTYNAME, function ($time) use ($node) { if (empty($time)) { return false; } diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 4b068dafda2..73ebabdc48f 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -273,7 +273,7 @@ class Principal implements BackendInterface { $users = $this->userManager->getByEmail($value); if (!$allowEnumeration) { - $users = \array_filter($users, static function(IUser $user) use ($value) { + $users = \array_filter($users, static function (IUser $user) use ($value) { return $user->getEMailAddress() === $value; }); } @@ -287,7 +287,7 @@ class Principal implements BackendInterface { }); } - $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { + $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { // is sharing restricted to groups only? if ($restrictGroups !== false) { $userGroups = $this->groupManager->getUserGroupIds($user); @@ -305,7 +305,7 @@ class Principal implements BackendInterface { $users = $this->userManager->searchDisplayName($value); if (!$allowEnumeration) { - $users = \array_filter($users, static function(IUser $user) use ($value) { + $users = \array_filter($users, static function (IUser $user) use ($value) { return $user->getDisplayName() === $value; }); } @@ -319,7 +319,7 @@ class Principal implements BackendInterface { }); } - $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { + $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { // is sharing restricted to groups only? if ($restrictGroups !== false) { $userGroups = $this->groupManager->getUserGroupIds($user); @@ -446,9 +446,9 @@ class Principal implements BackendInterface { $userId = $user->getUID(); $displayName = $user->getDisplayName(); $principal = [ - 'uri' => $this->principalPrefix . '/' . $userId, - '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, - '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', + 'uri' => $this->principalPrefix . '/' . $userId, + '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, + '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', ]; $email = $user->getEMailAddress(); @@ -518,7 +518,7 @@ class Principal implements BackendInterface { $circles = \OCA\Circles\Api\v1\Circles::joinedCircles($name, true); - $circles = array_map(function($circle) { + $circles = array_map(function ($circle) { /** @var \OCA\Circles\Model\Circle $circle */ return 'principals/circles/' . urlencode($circle->getUniqueId()); }, $circles); diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php index 39bee3a6656..f6da755aaf7 100644 --- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php +++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php @@ -27,6 +27,7 @@ */ namespace OCA\DAV\Connector\Sabre; + use OCA\DAV\Upload\FutureFile; use OCP\Files\StorageNotAvailableException; use Sabre\DAV\Exception\InsufficientStorage; diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php index 7f5bc6baea7..f740284f271 100644 --- a/apps/dav/lib/Connector/Sabre/ServerFactory.php +++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php @@ -129,9 +129,9 @@ class ServerFactory { // Some WebDAV clients do require Class 2 WebDAV support (locking), since // we do not provide locking we emulate it using a fake locking plugin. if($this->request->isUserAgent([ - '/WebDAVFS/', - '/OneNote/', - '/Microsoft-WebDAV-MiniRedir/', + '/WebDAVFS/', + '/OneNote/', + '/Microsoft-WebDAV-MiniRedir/', ])) { $server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin()); } diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index 8b811226734..ef1e7236c9b 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -200,14 +200,14 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { $propFind->handle(self::SHARETYPES_PROPERTYNAME, function () use ($sabreNode) { $shares = $this->getShares($sabreNode); - $shareTypes = array_unique(array_map(function(IShare $share) { + $shareTypes = array_unique(array_map(function (IShare $share) { return $share->getShareType(); }, $shares)); return new ShareTypeList($shareTypes); }); - $propFind->handle(self::SHAREES_PROPERTYNAME, function() use ($sabreNode) { + $propFind->handle(self::SHAREES_PROPERTYNAME, function () use ($sabreNode) { $shares = $this->getShares($sabreNode); return new ShareeList($shares); diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php index 9cefe682de9..83995a31e57 100644 --- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php @@ -246,12 +246,12 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin $isFav = null; - $propFind->handle(self::TAGS_PROPERTYNAME, function() use (&$isFav, $node) { + $propFind->handle(self::TAGS_PROPERTYNAME, function () use (&$isFav, $node) { list($tags, $isFav) = $this->getTagsAndFav($node->getId()); return new TagList($tags); }); - $propFind->handle(self::FAVORITE_PROPERTYNAME, function() use ($isFav, $node) { + $propFind->handle(self::FAVORITE_PROPERTYNAME, function () use ($isFav, $node) { if (is_null($isFav)) { list(, $isFav) = $this->getTagsAndFav($node->getId()); } @@ -277,12 +277,12 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin return; } - $propPatch->handle(self::TAGS_PROPERTYNAME, function($tagList) use ($node) { + $propPatch->handle(self::TAGS_PROPERTYNAME, function ($tagList) use ($node) { $this->updateTags($node->getId(), $tagList->getTags()); return true; }); - $propPatch->handle(self::FAVORITE_PROPERTYNAME, function($favState) use ($node) { + $propPatch->handle(self::FAVORITE_PROPERTYNAME, function ($favState) use ($node) { if ((int)$favState === 1 || $favState === 'true') { $this->getTagger()->tagAs($node->getId(), self::TAG_FAVORITE); } else { diff --git a/apps/dav/lib/Controller/BirthdayCalendarController.php b/apps/dav/lib/Controller/BirthdayCalendarController.php index 6eb014985d5..3be7b28c51b 100644 --- a/apps/dav/lib/Controller/BirthdayCalendarController.php +++ b/apps/dav/lib/Controller/BirthdayCalendarController.php @@ -78,7 +78,7 @@ class BirthdayCalendarController extends Controller { IDBConnection $db, IConfig $config, IJobList $jobList, IUserManager $userManager, - CalDavBackend $calDavBackend){ + CalDavBackend $calDavBackend) { parent::__construct($appName, $request); $this->db = $db; $this->config = $config; @@ -94,7 +94,7 @@ class BirthdayCalendarController extends Controller { $this->config->setAppValue($this->appName, 'generateBirthdayCalendar', 'yes'); // add background job for each user - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ 'userId' => $user->getUID(), ]); diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index b610420faae..04fe0223607 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -134,7 +134,7 @@ class GroupPrincipalBackend implements BackendInterface { return []; } - return array_map(function($user) { + return array_map(function ($user) { return $this->userToPrincipal($user); }, $group->getUsers()); } @@ -210,7 +210,7 @@ class GroupPrincipalBackend implements BackendInterface { case '{DAV:}displayname': $groups = $this->groupManager->search($value); - $results[] = array_reduce($groups, function(array $carry, IGroup $group) use ($restrictGroups) { + $results[] = array_reduce($groups, function (array $carry, IGroup $group) use ($restrictGroups) { $gid = $group->getGID(); // is sharing restricted to groups only? if ($restrictGroups !== false) { diff --git a/apps/dav/lib/DAV/Sharing/IShareable.php b/apps/dav/lib/DAV/Sharing/IShareable.php index 8c40147e26c..7da6549ee4f 100644 --- a/apps/dav/lib/DAV/Sharing/IShareable.php +++ b/apps/dav/lib/DAV/Sharing/IShareable.php @@ -22,6 +22,7 @@ */ namespace OCA\DAV\DAV\Sharing; + use Sabre\DAV\INode; /** diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php index 2723dcf8bf7..f0c2b82ccbf 100644 --- a/apps/dav/lib/DAV/Sharing/Plugin.php +++ b/apps/dav/lib/DAV/Sharing/Plugin.php @@ -149,7 +149,7 @@ class Plugin extends ServerPlugin { // Dealing with the 'share' document, which modified invitees on a // calendar. - case '{' . self::NS_OWNCLOUD . '}share' : + case '{' . self::NS_OWNCLOUD . '}share': // We can only deal with IShareableCalendar objects if (!$node instanceof IShareable) { @@ -192,7 +192,7 @@ class Plugin extends ServerPlugin { function propFind(PropFind $propFind, INode $node) { if ($node instanceof IShareable) { - $propFind->handle('{' . Plugin::NS_OWNCLOUD . '}invite', function() use ($node) { + $propFind->handle('{' . Plugin::NS_OWNCLOUD . '}invite', function () use ($node) { return new Invite( $node->getShares() ); diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php index c1a4337b36b..c63bb4fe1d1 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php +++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php @@ -29,59 +29,59 @@ use Sabre\Xml\XmlDeserializable; class ShareRequest implements XmlDeserializable { - public $set = []; + public $set = []; - public $remove = []; + public $remove = []; - /** - * Constructor - * - * @param array $set - * @param array $remove - */ - function __construct(array $set, array $remove) { + /** + * Constructor + * + * @param array $set + * @param array $remove + */ + function __construct(array $set, array $remove) { - $this->set = $set; - $this->remove = $remove; + $this->set = $set; + $this->remove = $remove; - } + } - static function xmlDeserialize(Reader $reader) { + static function xmlDeserialize(Reader $reader) { - $elements = $reader->parseInnerTree([ - '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', - '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', - ]); + $elements = $reader->parseInnerTree([ + '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', + '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', + ]); - $set = []; - $remove = []; + $set = []; + $remove = []; - foreach ($elements as $elem) { - switch ($elem['name']) { + foreach ($elements as $elem) { + switch ($elem['name']) { - case '{' . Plugin::NS_OWNCLOUD . '}set' : - $sharee = $elem['value']; + case '{' . Plugin::NS_OWNCLOUD . '}set': + $sharee = $elem['value']; - $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; - $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; + $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; + $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; - $set[] = [ - 'href' => $sharee['{DAV:}href'], - 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, - 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, - 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), - ]; - break; + $set[] = [ + 'href' => $sharee['{DAV:}href'], + 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, + 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, + 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), + ]; + break; - case '{' . Plugin::NS_OWNCLOUD . '}remove' : - $remove[] = $elem['value']['{DAV:}href']; - break; + case '{' . Plugin::NS_OWNCLOUD . '}remove': + $remove[] = $elem['value']['{DAV:}href']; + break; - } - } + } + } - return new self($set, $remove); + return new self($set, $remove); - } + } } diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php index 57c81ba15f6..6dbdeaa6fd9 100644 --- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php +++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php @@ -66,7 +66,7 @@ class FilesDropPlugin extends ServerPlugin { $this->enabled = false; } - public function beforeMethod(RequestInterface $request, ResponseInterface $response){ + public function beforeMethod(RequestInterface $request, ResponseInterface $response) { if (!$this->enabled) { return; diff --git a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php index eaa3d78b66d..60e11884765 100644 --- a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php +++ b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php @@ -56,7 +56,7 @@ class PublicLinkCheckPlugin extends ServerPlugin { $server->on('beforeMethod:*', [$this, 'beforeMethod']); } - public function beforeMethod(RequestInterface $request, ResponseInterface $response){ + public function beforeMethod(RequestInterface $request, ResponseInterface $response) { // verify that the owner didn't have his share permissions revoked if ($this->fileInfo && !$this->fileInfo->isShareable()) { throw new NotFound(); diff --git a/apps/dav/lib/Migration/Version1008Date20181105104826.php b/apps/dav/lib/Migration/Version1008Date20181105104826.php index 305497ea1ec..cc80c6552c4 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105104826.php +++ b/apps/dav/lib/Migration/Version1008Date20181105104826.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCA\DAV\Migration; - use Closure; use Doctrine\DBAL\Types\Type; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php index 99f45640560..e4feaf5d42f 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php @@ -156,7 +156,7 @@ class AppleProvisioningPlugin extends ServerPlugin { $filename = $userId . '-' . AppleProvisioningNode::FILENAME; $xmlSkeleton = $this->getTemplate(); - $body = vsprintf($xmlSkeleton, array_map(function($v) { + $body = vsprintf($xmlSkeleton, array_map(function ($v) { return \htmlspecialchars($v, ENT_XML1, 'UTF-8'); }, [ $description, diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php index 271b7f6c866..e50c2a882ca 100644 --- a/apps/dav/lib/RootCollection.php +++ b/apps/dav/lib/RootCollection.php @@ -148,30 +148,30 @@ class RootCollection extends SimpleCollection { \OC::$server->query(ITimeFactory::class)); $children = [ - new SimpleCollection('principals', [ - $userPrincipals, - $groupPrincipals, - $systemPrincipals, - $calendarResourcePrincipals, - $calendarRoomPrincipals]), - $filesCollection, - $userCalendarRoot, - new SimpleCollection('system-calendars', [ - $resourceCalendarRoot, - $roomCalendarRoot, - ]), - $publicCalendarRoot, - new SimpleCollection('addressbooks', [ - $usersAddressBookRoot, - $systemAddressBookRoot]), - $systemTagCollection, - $systemTagRelationsCollection, - $commentsCollection, - $uploadCollection, - $avatarCollection, - new SimpleCollection('provisioning', [ - $appleProvisioning - ]) + new SimpleCollection('principals', [ + $userPrincipals, + $groupPrincipals, + $systemPrincipals, + $calendarResourcePrincipals, + $calendarRoomPrincipals]), + $filesCollection, + $userCalendarRoot, + new SimpleCollection('system-calendars', [ + $resourceCalendarRoot, + $roomCalendarRoot, + ]), + $publicCalendarRoot, + new SimpleCollection('addressbooks', [ + $usersAddressBookRoot, + $systemAddressBookRoot]), + $systemTagCollection, + $systemTagRelationsCollection, + $commentsCollection, + $uploadCollection, + $avatarCollection, + new SimpleCollection('provisioning', [ + $appleProvisioning + ]) ]; parent::__construct('root', $children); diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 230e72fd277..1a432008a3a 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -295,7 +295,7 @@ class Server { \OC::$server->getThemingDefaults(), \OC::$server->getRequest(), \OC::$server->getL10N('dav'), - function() { + function () { return UUIDUtil::getUUID(); } )); diff --git a/apps/dav/lib/SystemTag/SystemTagPlugin.php b/apps/dav/lib/SystemTag/SystemTagPlugin.php index 6d1668acf06..4ca7b041884 100644 --- a/apps/dav/lib/SystemTag/SystemTagPlugin.php +++ b/apps/dav/lib/SystemTag/SystemTagPlugin.php @@ -226,29 +226,29 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin { return; } - $propFind->handle(self::ID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::ID_PROPERTYNAME, function () use ($node) { return $node->getSystemTag()->getId(); }); - $propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function () use ($node) { return $node->getSystemTag()->getName(); }); - $propFind->handle(self::USERVISIBLE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::USERVISIBLE_PROPERTYNAME, function () use ($node) { return $node->getSystemTag()->isUserVisible() ? 'true' : 'false'; }); - $propFind->handle(self::USERASSIGNABLE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::USERASSIGNABLE_PROPERTYNAME, function () use ($node) { // this is the tag's inherent property "is user assignable" return $node->getSystemTag()->isUserAssignable() ? 'true' : 'false'; }); - $propFind->handle(self::CANASSIGN_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::CANASSIGN_PROPERTYNAME, function () use ($node) { // this is the effective permission for the current user return $this->tagManager->canUserAssignTag($node->getSystemTag(), $this->userSession->getUser()) ? 'true' : 'false'; }); - $propFind->handle(self::GROUPS_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::GROUPS_PROPERTYNAME, function () use ($node) { if (!$this->groupManager->isAdmin($this->userSession->getUser()->getUID())) { // property only available for admins throw new Forbidden(); @@ -281,7 +281,7 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin { self::USERVISIBLE_PROPERTYNAME, self::USERASSIGNABLE_PROPERTYNAME, self::GROUPS_PROPERTYNAME, - ], function($props) use ($node) { + ], function ($props) use ($node) { $tag = $node->getSystemTag(); $name = $tag->getName(); $userVisible = $tag->isUserVisible(); diff --git a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php index c033b1ce139..e44150aaabe 100644 --- a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php @@ -122,7 +122,7 @@ class SystemTagsByIdCollection implements ICollection { } $tags = $this->tagManager->getAllTags($visibilityFilter); - return array_map(function($tag) { + return array_map(function ($tag) { return $this->makeNode($tag); }, $tags); } diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php index 88c6f5a4648..bb74884419a 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php @@ -138,11 +138,11 @@ class SystemTagsObjectMappingCollection implements ICollection { $tags = $this->tagManager->getTagsByIds($tagIds); // filter out non-visible tags - $tags = array_filter($tags, function($tag) { + $tags = array_filter($tags, function ($tag) { return $this->tagManager->canUserSeeTag($tag, $this->user); }); - return array_values(array_map(function($tag) { + return array_values(array_map(function ($tag) { return $this->makeNode($tag); }, $tags)); } @@ -189,7 +189,7 @@ class SystemTagsObjectMappingCollection implements ICollection { } /** - * Create a sabre node for the mapping of the + * Create a sabre node for the mapping of the * given system tag to the collection's object * * @param ISystemTag $tag diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php index ca9a72b6a90..ff0409c7ea0 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php @@ -80,7 +80,7 @@ class SystemTagsObjectTypeCollection implements ICollection { * @param \Closure $childExistsFunction */ public function __construct( - $objectType, + $objectType, ISystemTagManager $tagManager, ISystemTagObjectMapper $tagMapper, IUserSession $userSession, diff --git a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php index 45fc3c14291..e85480d4a2f 100644 --- a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php @@ -60,7 +60,7 @@ class SystemTagsRelationsCollection extends SimpleCollection { $tagMapper, $userSession, $groupManager, - function($name) { + function ($name) { $nodes = \OC::$server->getUserFolder()->getById((int)$name); return !empty($nodes); } diff --git a/apps/dav/lib/Traits/PrincipalProxyTrait.php b/apps/dav/lib/Traits/PrincipalProxyTrait.php index d8f06a69f8e..ee8ac58e3c6 100644 --- a/apps/dav/lib/Traits/PrincipalProxyTrait.php +++ b/apps/dav/lib/Traits/PrincipalProxyTrait.php @@ -150,7 +150,7 @@ trait PrincipalProxyTrait { $proxy->setPermissions($proxy->getPermissions() | $permission); $this->proxyMapper->update($proxy); - $proxies = array_filter($proxies, function(Proxy $p) use ($proxy) { + $proxies = array_filter($proxies, function (Proxy $p) use ($proxy) { return $p->getId() !== $proxy->getId(); }); break; diff --git a/apps/dav/lib/Upload/FutureFile.php b/apps/dav/lib/Upload/FutureFile.php index 923376c8eab..34a5981bda2 100644 --- a/apps/dav/lib/Upload/FutureFile.php +++ b/apps/dav/lib/Upload/FutureFile.php @@ -86,7 +86,7 @@ class FutureFile implements \Sabre\DAV\IFile { */ function getSize() { $children = $this->root->getChildren(); - $sizes = array_map(function($node) { + $sizes = array_map(function ($node) { /** @var IFile $node */ return $node->getSize(); }, $children); diff --git a/apps/dav/lib/Upload/UploadHome.php b/apps/dav/lib/Upload/UploadHome.php index 77a5043b3a4..8bc96d8cf1f 100644 --- a/apps/dav/lib/Upload/UploadHome.php +++ b/apps/dav/lib/Upload/UploadHome.php @@ -59,7 +59,7 @@ class UploadHome implements ICollection { } public function getChildren(): array { - return array_map(function($node) { + return array_map(function ($node) { return new UploadFolder($node, $this->cleanupService); }, $this->impl()->getChildren()); } diff --git a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php index 38be58f8bee..59edfed267e 100644 --- a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php @@ -24,7 +24,6 @@ namespace OCA\DAV\Tests\Unit\Avatars; - use OCA\DAV\Avatars\AvatarHome; use OCA\DAV\Avatars\AvatarNode; use OCP\IAvatar; diff --git a/apps/dav/tests/unit/Avatars/AvatarNodeTest.php b/apps/dav/tests/unit/Avatars/AvatarNodeTest.php index b8524a96470..d93e8422884 100644 --- a/apps/dav/tests/unit/Avatars/AvatarNodeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarNodeTest.php @@ -22,7 +22,6 @@ namespace OCA\DAV\Tests\Unit\Avatars; - use OCA\DAV\Avatars\AvatarNode; use OCP\IAvatar; use Test\TestCase; diff --git a/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php b/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php index e4db329393a..b7d907e5ce5 100644 --- a/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php +++ b/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php @@ -66,7 +66,7 @@ class RegisterRegenerateBirthdayCalendarsTest extends TestCase { public function testRun() { $this->userManager->expects($this->once()) ->method('callForSeenUsers') - ->willReturnCallback(function($closure) { + ->willReturnCallback(function ($closure) { $user1 = $this->createMock(IUser::class); $user1->method('getUID')->willReturn('uid1'); $user2 = $this->createMock(IUser::class); diff --git a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php index 002a3fd94b0..d260ed352e6 100644 --- a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php @@ -146,7 +146,7 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase { $res6->method('getBackend')->willReturn($backend3); $res6->method('getAllAvailableMetadataKeys')->willReturn(['meta99', 'meta123']); - $res6->method('getMetadataForKey')->willReturnCallback(function($key) { + $res6->method('getMetadataForKey')->willReturnCallback(function ($key) { switch($key) { case 'meta99': return 'value99-new'; @@ -165,7 +165,7 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase { $res7->method('getEMail')->willReturn('res7@foo.bar'); $res7->method('getBackend')->willReturn($backend3); $res7->method('getAllAvailableMetadataKeys')->willReturn(['meta1']); - $res7->method('getMetadataForKey')->willReturnCallback(function($key) { + $res7->method('getMetadataForKey')->willReturnCallback(function ($key) { switch($key) { case 'meta1': return 'value1'; @@ -181,7 +181,7 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase { $res8->method('getEMail')->willReturn('res8@foo.bar'); $res8->method('getBackend')->willReturn($backend4); $res8->method('getAllAvailableMetadataKeys')->willReturn(['meta2']); - $res8->method('getMetadataForKey')->willReturnCallback(function($key) { + $res8->method('getMetadataForKey')->willReturnCallback(function ($key) { switch($key) { case 'meta2': return 'value2'; diff --git a/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php b/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php index 9e09cda936c..f4179c60665 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php @@ -97,7 +97,7 @@ class BackendTest extends TestCase { $backend = $this->getBackend(['triggerCalendarActivity']); $backend->expects($this->once()) ->method('triggerCalendarActivity') - ->willReturnCallback(function() use($expectedPayload, $expectedSubject) { + ->willReturnCallback(function () use ($expectedPayload, $expectedSubject) { $arguments = func_get_args(); $this->assertSame($expectedSubject, array_shift($arguments)); $this->assertEquals($expectedPayload, $arguments); diff --git a/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php b/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php index 018c0540be3..04ed3a47e05 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php @@ -45,7 +45,7 @@ class CalendarTest extends TestCase { $l = $this->createMock(IL10N::class); $l->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return vsprintf($string, $args); }); diff --git a/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php b/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php index d013845345d..cc450283d9e 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php @@ -44,7 +44,7 @@ class TodoTest extends TestCase { $l = $this->createMock(IL10N::class); $l->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return vsprintf($string, $args); }); diff --git a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php index d2a9cd5e536..eb0ac34c15a 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php @@ -141,7 +141,7 @@ class BaseTest extends TestCase { $l = $this->createMock(IL10N::class); $l->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return 't(' . vsprintf($string, $args) . ')'; }); diff --git a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php index 345fd9cbe11..645eaa8b2f8 100644 --- a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php +++ b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php @@ -129,7 +129,7 @@ class EnablePluginTest extends TestCase { $this->server->xml->expects($this->once()) ->method('parse') - ->willReturnCallback(function($requestBody, $url, &$documentType) { + ->willReturnCallback(function ($requestBody, $url, &$documentType) { $documentType = '{http://nextcloud.com/ns}disable-birthday-calendar'; }); @@ -167,7 +167,7 @@ class EnablePluginTest extends TestCase { $this->server->xml->expects($this->once()) ->method('parse') - ->willReturnCallback(function($requestBody, $url, &$documentType) { + ->willReturnCallback(function ($requestBody, $url, &$documentType) { $documentType = '{http://nextcloud.com/ns}enable-birthday-calendar'; }); diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index fb48e5fac4b..8cb6b9fbf10 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -401,7 +401,7 @@ EOD; $this->assertArrayHasKey('classification', $card); } - usort($calendarObjects, function($a, $b) { + usort($calendarObjects, function ($a, $b) { return $a['id'] - $b['id']; }); @@ -442,7 +442,7 @@ EOD; 'comp-filters' => $compFilter ]); - $expectedEventsInResult = array_map(function($index) use($events) { + $expectedEventsInResult = array_map(function ($index) use ($events) { return $events[$index]; }, $expectedEventsInResult); $this->assertEquals($expectedEventsInResult, $result, '', 0.0, 10, true); @@ -548,8 +548,8 @@ EOD; $this->assertEquals($id, $subscriptions[0]['id']); $patch = new PropPatch([ - '{DAV:}displayname' => 'Unit test', - '{http://apple.com/ns/ical/}calendar-color' => '#ac0606', + '{DAV:}displayname' => 'Unit test', + '{http://apple.com/ns/ical/}calendar-color' => '#ac0606', ]); $this->backend->updateSubscription($id, $patch); $patch->commit(); diff --git a/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php b/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php index 94cb169648b..b4095990e50 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php @@ -70,7 +70,7 @@ class CalendarManagerTest extends \Test\TestCase { $calendarManager = $this->createMock(Manager::class); $calendarManager->expects($this->at(0)) ->method('registerCalendar') - ->willReturnCallback(function() { + ->willReturnCallback(function () { $parameter = func_get_arg(0); $this->assertInstanceOf(CalendarImpl::class, $parameter); $this->assertEquals(123, $parameter->getKey()); @@ -78,7 +78,7 @@ class CalendarManagerTest extends \Test\TestCase { $calendarManager->expects($this->at(1)) ->method('registerCalendar') - ->willReturnCallback(function() { + ->willReturnCallback(function () { $parameter = func_get_arg(0); $this->assertInstanceOf(CalendarImpl::class, $parameter); $this->assertEquals(456, $parameter->getKey()); diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index 80ab0ff5af1..534661af6c6 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -569,7 +569,7 @@ EOD; $backend->expects($this->any()) ->method('getCalendarObject') - ->willReturnCallback(function($cId, $uri) use($publicObject, $confidentialObject) { + ->willReturnCallback(function ($cId, $uri) use ($publicObject, $confidentialObject) { switch($uri) { case 'event-0': return $publicObject; diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php index 76a8b5befdf..69c34d76b09 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php @@ -42,46 +42,46 @@ use OCP\Notification\INotification; class PushProviderTest extends AbstractNotificationProviderTest { - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ - protected $logger; + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + protected $logger; - /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $l10nFactory; + /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */ + protected $l10nFactory; - /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ - protected $l10n; + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ + protected $l10n; - /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected $urlGenerator; + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ + protected $urlGenerator; - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ - protected $config; + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ + protected $config; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ - private $manager; + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ + private $manager; - /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ - private $timeFactory; + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ + private $timeFactory; - protected function setUp(): void { - parent::setUp(); + protected function setUp(): void { + parent::setUp(); - $this->config = $this->createMock(IConfig::class); - $this->manager = $this->createMock(IManager::class); - $this->timeFactory = $this->createMock(ITimeFactory::class); + $this->config = $this->createMock(IConfig::class); + $this->manager = $this->createMock(IManager::class); + $this->timeFactory = $this->createMock(ITimeFactory::class); - $this->provider = new PushProvider( - $this->config, - $this->manager, - $this->logger, - $this->l10nFactory, - $this->urlGenerator, - $this->timeFactory - ); - } + $this->provider = new PushProvider( + $this->config, + $this->manager, + $this->logger, + $this->l10nFactory, + $this->urlGenerator, + $this->timeFactory + ); + } - public function testNotificationType():void { - $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY'); + public function testNotificationType():void { + $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY'); } public function testNotSend(): void { @@ -110,19 +110,19 @@ class PushProviderTest extends AbstractNotificationProviderTest { $this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users); } - public function testSend(): void { - $this->config->expects($this->once()) + public function testSend(): void { + $this->config->expects($this->once()) ->method('getAppValue') ->with('dav', 'sendEventRemindersPush', 'no') ->willReturn('yes'); - $user1 = $this->createMock(IUser::class); - $user1->method('getUID') + $user1 = $this->createMock(IUser::class); + $user1->method('getUID') ->willReturn('uid1'); - $user2 = $this->createMock(IUser::class); + $user2 = $this->createMock(IUser::class); $user2->method('getUID') ->willReturn('uid2'); - $user3 = $this->createMock(IUser::class); + $user3 = $this->createMock(IUser::class); $user3->method('getUID') ->willReturn('uid3'); @@ -161,13 +161,13 @@ class PushProviderTest extends AbstractNotificationProviderTest { ->with($notification3); $this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users); - } + } /** * @param string $uid * @param \DateTime $dt */ - private function createNotificationMock(string $uid, \DateTime $dt):INotification { + private function createNotificationMock(string $uid, \DateTime $dt):INotification { $notification = $this->createMock(INotification::class); $notification ->expects($this->once()) diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php index f0bd91bf002..2900e24119c 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php @@ -56,7 +56,7 @@ class NotificationProviderManagerTest extends TestCase { * @throws ProviderNotAvailableException * @throws NotificationTypeDoesNotExistException */ - public function testGetProviderForUnknownType(): void{ + public function testGetProviderForUnknownType(): void { $this->expectException(\OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException::class); $this->expectExceptionMessage('Type NOT EXISTENT is not an accepted type of notification'); @@ -67,19 +67,19 @@ class NotificationProviderManagerTest extends TestCase { * @throws NotificationTypeDoesNotExistException * @throws ProviderNotAvailableException */ - public function testGetProviderForUnRegisteredType(): void{ + public function testGetProviderForUnRegisteredType(): void { $this->expectException(\OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException::class); $this->expectExceptionMessage('No notification provider for type AUDIO available'); $this->providerManager->getProvider('AUDIO'); } - public function testGetProvider(): void{ + public function testGetProvider(): void { $provider = $this->providerManager->getProvider('EMAIL'); $this->assertInstanceOf(EmailProvider::class, $provider); } - public function testRegisterProvider(): void{ + public function testRegisterProvider(): void { $this->providerManager->registerProvider(PushProvider::class); $provider = $this->providerManager->getProvider('DISPLAY'); $this->assertInstanceOf(PushProvider::class, $provider); @@ -88,7 +88,7 @@ class NotificationProviderManagerTest extends TestCase { /** * @throws \OCP\AppFramework\QueryException */ - public function testRegisterBadProvider(): void{ + public function testRegisterBadProvider(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid notification provider registered'); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php index 38240182275..568a65b77d3 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php @@ -61,18 +61,18 @@ class NotifierTest extends TestCase { $this->l10n = $this->createMock(IL10N::class); $this->l10n->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return vsprintf($string, $args); }); $this->l10n->expects($this->any()) ->method('l') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { /** \DateTime $args */ return $args->format(\DateTime::ATOM); }); $this->l10n->expects($this->any()) ->method('n') - ->willReturnCallback(function($textSingular, $textPlural, $count, $args) { + ->willReturnCallback(function ($textSingular, $textPlural, $count, $args) { $text = $count === 1 ? $textSingular : $textPlural; $text = str_replace('%n', (string)$count, $text); return vsprintf($text, $args); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php index 76ff0a6a330..03e953f5c27 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php @@ -42,11 +42,11 @@ use Test\TestCase; class ReminderServiceTest extends TestCase { - /** @var Backend|\PHPUnit\Framework\MockObject\MockObject */ - private $backend; + /** @var Backend|\PHPUnit\Framework\MockObject\MockObject */ + private $backend; - /** @var NotificationProviderManager|\PHPUnit\Framework\MockObject\MockObject */ - private $notificationProviderManager; + /** @var NotificationProviderManager|\PHPUnit\Framework\MockObject\MockObject */ + private $notificationProviderManager; /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; @@ -185,12 +185,12 @@ END:VEVENT END:VCALENDAR EOD; - protected function setUp(): void { + protected function setUp(): void { parent::setUp(); - $this->backend = $this->createMock(Backend::class); - $this->notificationProviderManager = $this->createMock(NotificationProviderManager::class); - $this->userManager = $this->createMock(IUserManager::class); + $this->backend = $this->createMock(Backend::class); + $this->notificationProviderManager = $this->createMock(NotificationProviderManager::class); + $this->userManager = $this->createMock(IUserManager::class); $this->groupManager = $this->createMock(IGroupManager::class); $this->caldavBackend = $this->createMock(CalDavBackend::class); $this->timeFactory = $this->createMock(ITimeFactory::class); @@ -203,14 +203,14 @@ EOD; $this->groupManager, $this->caldavBackend, $this->timeFactory); - } + } public function testOnCalendarObjectDelete():void { - $this->backend->expects($this->once()) + $this->backend->expects($this->once()) ->method('cleanRemindersForEvent') ->with(44); - $action = '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject'; + $action = '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject'; $objectData = [ 'id' => '44', 'component' => 'vevent', @@ -221,14 +221,14 @@ EOD; public function testOnCalendarObjectCreateSingleEntry():void { $action = '\OCA\DAV\CalDAV\CalDavBackend::createCalendarObject'; - $objectData = [ - 'calendardata' => self::CALENDAR_DATA, + $objectData = [ + 'calendardata' => self::CALENDAR_DATA, 'id' => '42', 'calendarid' => '1337', 'component' => 'vevent', ]; - $this->backend->expects($this->exactly(2)) + $this->backend->expects($this->exactly(2)) ->method('insertReminder') ->withConsecutive( [1337, 42, 'wej2z68l9h', false, 1465430400, false, '5c70531aab15c92b52518ae10a2f78a4', 'de919af7429d3b5c11e8b9d289b411a6', 'EMAIL', true, 1465429500, false], @@ -236,12 +236,12 @@ EOD; ) ->willReturn(1); - $this->timeFactory->expects($this->once()) + $this->timeFactory->expects($this->once()) ->method('getDateTime') ->with() ->willReturn(\DateTime::createFromFormat(\DateTime::ATOM, '2016-06-08T00:00:00+00:00')); - $this->reminderService->onTouchCalendarObject($action, $objectData); + $this->reminderService->onTouchCalendarObject($action, $objectData); } public function testOnCalendarObjectCreateSingleEntryWithRepeat(): void { @@ -501,7 +501,7 @@ EOD; $provider1->expects($this->once()) ->method('send') - ->with($this->callback(function($vevent) { + ->with($this->callback(function ($vevent) { if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') { return false; } @@ -509,7 +509,7 @@ EOD; }, 'Displayname 123', $user)); $provider2->expects($this->once()) ->method('send') - ->with($this->callback(function($vevent) { + ->with($this->callback(function ($vevent) { if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') { return false; } @@ -517,7 +517,7 @@ EOD; }, 'Displayname 123', $user)); $provider3->expects($this->once()) ->method('send') - ->with($this->callback(function($vevent) { + ->with($this->callback(function ($vevent) { if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') { return false; } @@ -525,7 +525,7 @@ EOD; }, 'Displayname 123', $user)); $provider4->expects($this->once()) ->method('send') - ->with($this->callback(function($vevent) { + ->with($this->callback(function ($vevent) { if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-30T00:00:00+00:00') { return false; } @@ -533,7 +533,7 @@ EOD; }, 'Displayname 123', $user)); $provider5->expects($this->once()) ->method('send') - ->with($this->callback(function($vevent) { + ->with($this->callback(function ($vevent) { if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-07-07T00:00:00+00:00') { return false; } diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php index b2fdc7f0a81..1dbd45ea4ca 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php @@ -236,7 +236,7 @@ abstract class AbstractPrincipalBackendTest extends TestCase { $this->proxyMapper->expects($this->at(1)) ->method('insert') - ->with($this->callback(function($proxy) { + ->with($this->callback(function ($proxy) { /** @var Proxy $proxy */ if ($proxy->getOwnerId() !== $this->principalPrefix . '/backend1-res1') { return false; @@ -252,7 +252,7 @@ abstract class AbstractPrincipalBackendTest extends TestCase { })); $this->proxyMapper->expects($this->at(2)) ->method('insert') - ->with($this->callback(function($proxy) { + ->with($this->callback(function ($proxy) { /** @var Proxy $proxy */ if ($proxy->getOwnerId() !== $this->principalPrefix . '/backend1-res1') { return false; diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php index 9a877bc3483..a92fdb8eb8c 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php @@ -26,7 +26,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend; -Class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest { +class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest { protected function setUp(): void { parent::setUp(); diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php index 7a7ebad20cb..575dac2bed7 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php @@ -26,7 +26,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\ResourceBooking\RoomPrincipalBackend; -Class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest { +class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest { protected function setUp(): void { parent::setUp(); diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php index 0f990cd8ca6..a666aec95a7 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php @@ -107,7 +107,7 @@ class IMipPluginTest extends TestCase { $l10n = $this->createMock(IL10N::class); $l10n->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $l10nFactory = $this->createMock(IFactory::class); @@ -192,7 +192,7 @@ class IMipPluginTest extends TestCase { ->with('dav', 'invitation_link_recipients', 'yes') ->willReturn('yes'); - $message = $this->_testMessage( $veventParams ); + $message = $this->_testMessage($veventParams); $this->_expectSend('frodo@hobb.it', $expectsMail, $expectsMail); @@ -221,9 +221,9 @@ class IMipPluginTest extends TestCase { } /** - * @dataProvider dataIncludeResponseButtons - */ - public function testIncludeResponseButtons(string $config_setting, string $recipient, bool $has_buttons ) { + * @dataProvider dataIncludeResponseButtons + */ + public function testIncludeResponseButtons(string $config_setting, string $recipient, bool $has_buttons) { $message = $this->_testMessage([],$recipient); $this->_expectSend($recipient, true, $has_buttons); @@ -264,7 +264,7 @@ class IMipPluginTest extends TestCase { $this->assertEquals('1.1', $message->getScheduleStatus()); } - private function _testMessage(array $attrs = [], string $recipient = 'frodo@hobb.it' ) { + private function _testMessage(array $attrs = [], string $recipient = 'frodo@hobb.it') { $message = new Message(); $message->method = 'REQUEST'; $message->message = new VCalendar(); @@ -274,8 +274,8 @@ class IMipPluginTest extends TestCase { 'SUMMARY' => 'Fellowship meeting', 'DTSTART' => new \DateTime('2018-01-01 00:00:00') ], $attrs)); - $message->message->VEVENT->add( 'ORGANIZER', 'mailto:gandalf@wiz.ard' ); - $message->message->VEVENT->add( 'ATTENDEE', 'mailto:'.$recipient, [ 'RSVP' => 'TRUE' ] ); + $message->message->VEVENT->add('ORGANIZER', 'mailto:gandalf@wiz.ard'); + $message->message->VEVENT->add('ATTENDEE', 'mailto:'.$recipient, [ 'RSVP' => 'TRUE' ]); $message->sender = 'mailto:gandalf@wiz.ard'; $message->senderName = 'Mr. Wizard'; $message->recipient = 'mailto:'.$recipient; diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php index c5af8952b99..8de32ad8c35 100644 --- a/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php @@ -116,7 +116,7 @@ class RefreshWebcalServiceTest extends TestCase { $client->expects($this->once()) ->method('get') - ->with('https://foo.bar/bla2', $this->callback(function($obj) { + ->with('https://foo.bar/bla2', $this->callback(function ($obj) { return $obj['allow_redirects']['redirects'] === 10 && $obj['handler'] instanceof HandlerStack; })) ->willReturn($response); diff --git a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php index 67c96259c60..326e77a58be 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php @@ -26,7 +26,6 @@ namespace OCA\DAV\Tests\unit\CardDAV; - use OCA\DAV\CardDAV\AddressBook; use OCA\DAV\CardDAV\AddressBookImpl; use OCA\DAV\CardDAV\CardDavBackend; @@ -281,7 +280,7 @@ class AddressBookImplTest extends TestCase { // simulate that 'uid0' already exists, so the second uid will be returned $this->backend->expects($this->exactly(2))->method('getContact') ->willReturnCallback( - function($id, $uid) { + function ($id, $uid) { return ($uid === 'uid0.vcf'); } ); diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php index 3d36b76e6ee..e6ba0f5ef02 100644 --- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php @@ -66,7 +66,7 @@ class BirthdayServiceTest extends TestCase { $this->l10n->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return vsprintf($string, $args); }); @@ -157,14 +157,14 @@ class BirthdayServiceTest extends TestCase { $this->cardDav->expects($this->once())->method('getAddressBookById') ->with(666) ->willReturn([ - 'principaluri' => 'principals/users/user01', - 'uri' => 'default' - ]); + 'principaluri' => 'principals/users/user01', + 'uri' => 'default' + ]); $this->calDav->expects($this->once())->method('getCalendarByUri') ->with('principals/users/user01', 'contact_birthdays') ->willReturn([ - 'id' => 1234 - ]); + 'id' => 1234 + ]); $this->calDav->expects($this->at(1))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf.ics'); $this->calDav->expects($this->at(2))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf-death.ics'); $this->calDav->expects($this->at(3))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf-anniversary.ics'); @@ -392,7 +392,7 @@ class BirthdayServiceTest extends TestCase { ]; } - public function providesCardChanges(){ + public function providesCardChanges() { return[ ['delete'], ['create'], diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php index 9298edb53ad..9d23280f607 100644 --- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php +++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php @@ -135,7 +135,7 @@ class CardDavBackendTest extends TestCase { $this->createMock(IAppManager::class), $this->createMock(ProxyMapper::class), $this->createMock(IConfig::class), - ]) + ]) ->setMethods(['getPrincipalByPath', 'getGroupMembership']) ->getMock(); $this->principal->method('getPrincipalByPath') @@ -258,7 +258,7 @@ class CardDavBackendTest extends TestCase { // Expect event $this->dispatcher->expects($this->at(0)) ->method('dispatch') - ->with('\OCA\DAV\CardDAV\CardDavBackend::createCard', $this->callback(function(GenericEvent $e) use ($bookId, $uri) { + ->with('\OCA\DAV\CardDAV\CardDavBackend::createCard', $this->callback(function (GenericEvent $e) use ($bookId, $uri) { return $e->getArgument('addressBookId') === $bookId && $e->getArgument('cardUri') === $uri && $e->getArgument('cardData') === $this->vcardTest0; @@ -285,7 +285,7 @@ class CardDavBackendTest extends TestCase { // Expect event $this->dispatcher->expects($this->at(0)) ->method('dispatch') - ->with('\OCA\DAV\CardDAV\CardDavBackend::updateCard', $this->callback(function(GenericEvent $e) use ($bookId, $uri) { + ->with('\OCA\DAV\CardDAV\CardDavBackend::updateCard', $this->callback(function (GenericEvent $e) use ($bookId, $uri) { return $e->getArgument('addressBookId') === $bookId && $e->getArgument('cardUri') === $uri && $e->getArgument('cardData') === $this->vcardTest0; @@ -299,7 +299,7 @@ class CardDavBackendTest extends TestCase { // Expect event $this->dispatcher->expects($this->at(0)) ->method('dispatch') - ->with('\OCA\DAV\CardDAV\CardDavBackend::deleteCard', $this->callback(function(GenericEvent $e) use ($bookId, $uri) { + ->with('\OCA\DAV\CardDAV\CardDavBackend::deleteCard', $this->callback(function (GenericEvent $e) use ($bookId, $uri) { return $e->getArgument('addressBookId') === $bookId && $e->getArgument('cardUri') === $uri; })); @@ -668,12 +668,12 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsTable) ->values( [ - 'addressbookid' => $query->createNamedParameter(0), - 'carddata' => $query->createNamedParameter($vCards[$i]->serialize(), IQueryBuilder::PARAM_LOB), - 'uri' => $query->createNamedParameter('uri' . $i), - 'lastmodified' => $query->createNamedParameter(time()), - 'etag' => $query->createNamedParameter('etag' . $i), - 'size' => $query->createNamedParameter(120), + 'addressbookid' => $query->createNamedParameter(0), + 'carddata' => $query->createNamedParameter($vCards[$i]->serialize(), IQueryBuilder::PARAM_LOB), + 'uri' => $query->createNamedParameter('uri' . $i), + 'lastmodified' => $query->createNamedParameter(time()), + 'etag' => $query->createNamedParameter('etag' . $i), + 'size' => $query->createNamedParameter(120), ] ); $query->execute(); @@ -694,11 +694,11 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsPropertiesTable) ->values( [ - 'addressbookid' => $query->createNamedParameter(0), - 'cardid' => $query->createNamedParameter($vCardIds[0]), - 'name' => $query->createNamedParameter('CLOUD'), - 'value' => $query->createNamedParameter('John@nextcloud.com'), - 'preferred' => $query->createNamedParameter(0) + 'addressbookid' => $query->createNamedParameter(0), + 'cardid' => $query->createNamedParameter($vCardIds[0]), + 'name' => $query->createNamedParameter('CLOUD'), + 'value' => $query->createNamedParameter('John@nextcloud.com'), + 'preferred' => $query->createNamedParameter(0) ] ); $query->execute(); @@ -755,13 +755,13 @@ class CardDavBackendTest extends TestCase { public function dataTestSearch() { return [ - ['John', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - ['M. Doe', ['FN'], [], [['uri1', 'John M. Doe']]], - ['Do', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - 'check if duplicates are handled correctly' => ['John', ['FN', 'CLOUD'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - 'case insensitive' => ['john', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - 'find "_" escaped' => ['_', ['CLOUD'], [], [['uri2', 'find without options']]], - 'find not empty ClOUD' => ['%_%', ['CLOUD'], ['escape_like_param'=>false], [['uri0', 'John Doe'], ['uri2', 'find without options']]], + ['John', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + ['M. Doe', ['FN'], [], [['uri1', 'John M. Doe']]], + ['Do', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + 'check if duplicates are handled correctly' => ['John', ['FN', 'CLOUD'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + 'case insensitive' => ['john', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + 'find "_" escaped' => ['_', ['CLOUD'], [], [['uri2', 'find without options']]], + 'find not empty ClOUD' => ['%_%', ['CLOUD'], ['escape_like_param'=>false], [['uri0', 'John Doe'], ['uri2', 'find without options']]], ]; } @@ -770,12 +770,12 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsTable) ->values( [ - 'addressbookid' => $query->createNamedParameter(1), - 'carddata' => $query->createNamedParameter('carddata', IQueryBuilder::PARAM_LOB), - 'uri' => $query->createNamedParameter('uri'), - 'lastmodified' => $query->createNamedParameter(5489543), - 'etag' => $query->createNamedParameter('etag'), - 'size' => $query->createNamedParameter(120), + 'addressbookid' => $query->createNamedParameter(1), + 'carddata' => $query->createNamedParameter('carddata', IQueryBuilder::PARAM_LOB), + 'uri' => $query->createNamedParameter('uri'), + 'lastmodified' => $query->createNamedParameter(5489543), + 'etag' => $query->createNamedParameter('etag'), + 'size' => $query->createNamedParameter(120), ] ); $query->execute(); @@ -798,12 +798,12 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsTable) ->values( [ - 'addressbookid' => $query->createNamedParameter($i), - 'carddata' => $query->createNamedParameter('carddata' . $i, IQueryBuilder::PARAM_LOB), - 'uri' => $query->createNamedParameter('uri' . $i), - 'lastmodified' => $query->createNamedParameter(5489543), - 'etag' => $query->createNamedParameter('etag' . $i), - 'size' => $query->createNamedParameter(120), + 'addressbookid' => $query->createNamedParameter($i), + 'carddata' => $query->createNamedParameter('carddata' . $i, IQueryBuilder::PARAM_LOB), + 'uri' => $query->createNamedParameter('uri' . $i), + 'lastmodified' => $query->createNamedParameter(5489543), + 'etag' => $query->createNamedParameter('etag' . $i), + 'size' => $query->createNamedParameter(120), ] ); $query->execute(); diff --git a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php index 1f9a6c50844..12ce1bca5c3 100644 --- a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php +++ b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php @@ -41,8 +41,8 @@ class ContactsManagerTest extends TestCase { /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backEnd */ $backEnd = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock(); $backEnd->method('getAddressBooksForUser')->willReturn([ - ['{DAV:}displayname' => 'Test address book', 'uri' => 'default'], - ]); + ['{DAV:}displayname' => 'Test address book', 'uri' => 'default'], + ]); $l = $this->createMock(IL10N::class); $app = new ContactsManager($backEnd, $l); diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php index 0c129b0de7d..7e93c05a3fc 100644 --- a/apps/dav/tests/unit/CardDAV/ConverterTest.php +++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php @@ -192,9 +192,9 @@ class ConverterTest extends TestCase { public function providesNames() { return [ - ['Sauron;;;;', 'Sauron'], - ['Baggins;Bilbo;;;', 'Bilbo Baggins'], - ['Tolkien;John;Ronald Reuel;;', 'John Ronald Reuel Tolkien'], + ['Sauron;;;;', 'Sauron'], + ['Baggins;Bilbo;;;', 'Bilbo Baggins'], + ['Tolkien;John;Ronald Reuel;;', 'John Ronald Reuel Tolkien'], ]; } diff --git a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php index a48f7100313..4ef1f1bdda1 100644 --- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php +++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php @@ -24,7 +24,6 @@ namespace OCA\DAV\Tests\unit\CardDAV; - use OCA\DAV\CardDAV\AddressBook; use OCA\DAV\CardDAV\ImageExportPlugin; use OCA\DAV\CardDAV\PhotoCache; @@ -141,7 +140,7 @@ class ImageExportPluginTest extends TestCase { ->willReturn(1); $this->tree->method('getNodeForPath') - ->willReturnCallback(function($path) use ($card, $book) { + ->willReturnCallback(function ($path) use ($card, $book) { if ($path === 'user/book/card') { return $card; } else if ($path === 'user/book') { diff --git a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php index d5ad784d70d..e0abbf7857d 100644 --- a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php @@ -26,7 +26,6 @@ namespace OCA\DAV\Tests\unit\CardDAV\Sharing; - use OCA\DAV\Connector\Sabre\Auth; use OCA\DAV\DAV\Sharing\IShareable; use OCA\DAV\DAV\Sharing\Plugin; @@ -69,10 +68,10 @@ class PluginTest extends TestCase { public function testSharing() { $this->book->expects($this->once())->method('updateShares')->with([[ - 'href' => 'principal:principals/admin', - 'commonName' => null, - 'summary' => null, - 'readOnly' => false + 'href' => 'principal:principals/admin', + 'commonName' => null, + 'summary' => null, + 'readOnly' => false ]], ['mailto:wilfredo@example.com']); // setup request diff --git a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php index 40243020e9b..9015528763f 100644 --- a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php @@ -131,41 +131,41 @@ class SyncServiceTest extends TestCase { $accountManager = $this->getMockBuilder(AccountManager::class)->disableOriginalConstructor()->getMock(); $accountManager->expects($this->any())->method('getUser') ->willReturn([ - AccountManager::PROPERTY_DISPLAYNAME => - [ - 'value' => $user->getDisplayName(), - 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, - ], - AccountManager::PROPERTY_ADDRESS => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - AccountManager::PROPERTY_WEBSITE => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - AccountManager::PROPERTY_EMAIL => - [ - 'value' => $user->getEMailAddress(), - 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, - ], - AccountManager::PROPERTY_AVATAR => - [ - 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY - ], - AccountManager::PROPERTY_PHONE => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - AccountManager::PROPERTY_TWITTER => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - ] + AccountManager::PROPERTY_DISPLAYNAME => + [ + 'value' => $user->getDisplayName(), + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, + ], + AccountManager::PROPERTY_ADDRESS => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + AccountManager::PROPERTY_WEBSITE => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + AccountManager::PROPERTY_EMAIL => + [ + 'value' => $user->getEMailAddress(), + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, + ], + AccountManager::PROPERTY_AVATAR => + [ + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY + ], + AccountManager::PROPERTY_PHONE => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + AccountManager::PROPERTY_TWITTER => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + ] ); $ss = new SyncService($backend, $userManager, $logger, $accountManager); diff --git a/apps/dav/tests/unit/Command/MoveCalendarTest.php b/apps/dav/tests/unit/Command/MoveCalendarTest.php index ff6cdbd0335..36553ff65a2 100644 --- a/apps/dav/tests/unit/Command/MoveCalendarTest.php +++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php @@ -262,7 +262,7 @@ class MoveCalendarTest extends TestCase { ->with(1234) ->willReturn([ ['href' => 'principal:principals/groups/nextclouders'] - ]); + ]); if ($shareWithGroupMembersOnly === true) { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage("User <user2> is not part of the group <nextclouders> with whom the calendar <personal> was shared. You may use -f to move the calendar while deleting this share."); @@ -412,7 +412,7 @@ class MoveCalendarTest extends TestCase { 'href' => 'principal:principals/users/user2', '{DAV:}displayname' => 'Personal' ] - ]); + ]); if ($force === false) { $this->expectException(InvalidArgumentException::class); diff --git a/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php b/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php index c9b02ff8694..ce830e3f699 100644 --- a/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php +++ b/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php @@ -22,7 +22,6 @@ namespace OCA\DAV\Tests\Unit\Command; - use OCA\DAV\Command\RemoveInvalidShares; use OCA\DAV\Connector\Sabre\Principal; use OCP\Migration\IOutput; diff --git a/apps/dav/tests/unit/Comments/CommentsPluginTest.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php index 4844aab6b1b..7210e96b122 100644 --- a/apps/dav/tests/unit/Comments/CommentsPluginTest.php +++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php @@ -182,11 +182,11 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '666', - 'actorType' => 'users', - 'actorId' => 'alice' - ] + $commentData); + 'objectType' => 'files', + 'objectId' => '666', + 'actorType' => 'users', + 'actorId' => 'alice' + ] + $commentData); $comment->setId('23'); $path = 'comments/files/666'; @@ -264,11 +264,11 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice' - ] + $commentData); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice' + ] + $commentData); $comment->setId('23'); $path = 'comments/files/42'; @@ -352,11 +352,11 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice' - ] + $commentData); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice' + ] + $commentData); $comment->setId('23'); $path = 'comments/files/42'; @@ -440,13 +440,13 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice', - 'message' => 'dummy', - 'verb' => 'dummy' - ]); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice', + 'message' => 'dummy', + 'verb' => 'dummy' + ]); $comment->setId('23'); $path = 'comments/files/42'; @@ -535,12 +535,12 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice', - 'verb' => 'comment', - ]); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice', + 'verb' => 'comment', + ]); $comment->setId('23'); $path = 'comments/files/42'; diff --git a/apps/dav/tests/unit/Comments/RootCollectionTest.php b/apps/dav/tests/unit/Comments/RootCollectionTest.php index 5191c735a67..f039c0d6ea3 100644 --- a/apps/dav/tests/unit/Comments/RootCollectionTest.php +++ b/apps/dav/tests/unit/Comments/RootCollectionTest.php @@ -100,8 +100,8 @@ class RootCollectionTest extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); - $this->dispatcher->addListener(CommentsEntityEvent::EVENT_ENTITY, function(CommentsEntityEvent $event) { - $event->addEntityCollection('files', function() { + $this->dispatcher->addListener(CommentsEntityEvent::EVENT_ENTITY, function (CommentsEntityEvent $event) { + $event->addEntityCollection('files', function () { return true; }); }); diff --git a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php index 95bab8cad5b..ff9fac3ff18 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php @@ -62,7 +62,7 @@ class ExceptionLoggerPluginTest extends TestCase { $config = $this->createMock(SystemConfig::class); $config->expects($this->any()) ->method('getValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { switch ($key) { case 'loglevel': return 0; diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 4c87351116c..d366726e919 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -350,52 +350,52 @@ class FileTest extends TestCase { public function legalMtimeProvider() { return [ "string" => [ - 'HTTP_X_OC_MTIME' => "string", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "string", + 'expected result' => null ], "castable string (int)" => [ - 'HTTP_X_OC_MTIME' => "34", - 'expected result' => 34 + 'HTTP_X_OC_MTIME' => "34", + 'expected result' => 34 ], "castable string (float)" => [ - 'HTTP_X_OC_MTIME' => "34.56", - 'expected result' => 34 + 'HTTP_X_OC_MTIME' => "34.56", + 'expected result' => 34 ], "float" => [ - 'HTTP_X_OC_MTIME' => 34.56, - 'expected result' => 34 + 'HTTP_X_OC_MTIME' => 34.56, + 'expected result' => 34 ], "zero" => [ - 'HTTP_X_OC_MTIME' => 0, - 'expected result' => 0 + 'HTTP_X_OC_MTIME' => 0, + 'expected result' => 0 ], "zero string" => [ - 'HTTP_X_OC_MTIME' => "0", - 'expected result' => 0 + 'HTTP_X_OC_MTIME' => "0", + 'expected result' => 0 ], "negative zero string" => [ - 'HTTP_X_OC_MTIME' => "-0", - 'expected result' => 0 + 'HTTP_X_OC_MTIME' => "-0", + 'expected result' => 0 ], "string starting with number following by char" => [ - 'HTTP_X_OC_MTIME' => "2345asdf", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "2345asdf", + 'expected result' => null ], "string castable hex int" => [ - 'HTTP_X_OC_MTIME' => "0x45adf", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "0x45adf", + 'expected result' => null ], "string that looks like invalid hex int" => [ - 'HTTP_X_OC_MTIME' => "0x123g", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "0x123g", + 'expected result' => null ], "negative int" => [ - 'HTTP_X_OC_MTIME' => -34, - 'expected result' => -34 + 'HTTP_X_OC_MTIME' => -34, + 'expected result' => -34 ], "negative float" => [ - 'HTTP_X_OC_MTIME' => -34.43, - 'expected result' => -34 + 'HTTP_X_OC_MTIME' => -34.43, + 'expected result' => -34 ], ]; } @@ -406,9 +406,9 @@ class FileTest extends TestCase { */ public function testPutSingleFileLegalMtime($requestMtime, $resultMtime) { $request = new \OC\AppFramework\Http\Request([ - 'server' => [ - 'HTTP_X_OC_MTIME' => $requestMtime, - ] + 'server' => [ + 'HTTP_X_OC_MTIME' => $requestMtime, + ] ], null, $this->config, null); $file = 'foo.txt'; @@ -430,9 +430,9 @@ class FileTest extends TestCase { */ public function testChunkedPutLegalMtime($requestMtime, $resultMtime) { $request = new \OC\AppFramework\Http\Request([ - 'server' => [ - 'HTTP_X_OC_MTIME' => $requestMtime, - ] + 'server' => [ + 'HTTP_X_OC_MTIME' => $requestMtime, + ] ], null, $this->config, null); $_SERVER['HTTP_OC_CHUNKED'] = true; @@ -1105,10 +1105,10 @@ class FileTest extends TestCase { $userView = Filesystem::getView(); } return [ - "filesize" => $userView->filesize($path), - "mtime" => $userView->filemtime($path), - "filetype" => $userView->filetype($path), - "mimetype" => $userView->getMimeType($path) + "filesize" => $userView->filesize($path), + "mtime" => $userView->filemtime($path), + "filetype" => $userView->filetype($path), + "mimetype" => $userView->getMimeType($path) ]; } diff --git a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php index 00d2ff8245e..4244792c46a 100644 --- a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php @@ -27,6 +27,7 @@ */ namespace OCA\DAV\Tests\unit\Connector\Sabre; + use OC\Files\FileInfo; use OC\Files\View; use OCP\Files\Mount\IMountPoint; diff --git a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php index c047c727627..bc49fb442a2 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php @@ -28,7 +28,6 @@ namespace OCA\DAV\Tests\unit\Connector\Sabre; - use OC\Files\FileInfo; use OC\Files\Filesystem; use OC\Files\Mount\Manager; @@ -284,7 +283,7 @@ class ObjectTreeTest extends \Test\TestCase { ->getMock(); $view->expects($this->once()) ->method('resolvePath') - ->willReturnCallback(function($path) use ($storage){ + ->willReturnCallback(function ($path) use ($storage) { return [$storage, ltrim($path, '/')]; }); diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php index 8f2ee2b6643..93cae17d539 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php @@ -335,7 +335,7 @@ class PrincipalTest extends TestCase { 'principals/groups/group1', 'principals/groups/foo%2Fbar', 'proxyId1/calendar-proxy-read', - 'proxyId2/calendar-proxy-write', + 'proxyId2/calendar-proxy-write', ]; $response = $this->connector->getGroupMembership('principals/users/foo'); $this->assertSame($expectedResponse, $response); @@ -392,7 +392,7 @@ class PrincipalTest extends TestCase { $this->proxyMapper->expects($this->at(1)) ->method('insert') - ->with($this->callback(function($proxy) { + ->with($this->callback(function ($proxy) { /** @var Proxy $proxy */ if ($proxy->getOwnerId() !== 'principals/users/foo') { return false; @@ -545,9 +545,9 @@ class PrincipalTest extends TestCase { ->willReturn([$user2, $user3]); $this->assertEquals([ - 'principals/users/user2', - 'principals/users/user3', - ], $this->connector->searchPrincipals('principals/users', + 'principals/users/user2', + 'principals/users/user3', + ], $this->connector->searchPrincipals('principals/users', ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => 'user@example.com'])); } diff --git a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php index 6d1763dc87a..194f9375f68 100644 --- a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php @@ -28,6 +28,7 @@ */ namespace OCA\DAV\Tests\unit\Connector\Sabre; + use OC\Files\View; use OCA\DAV\Connector\Sabre\QuotaPlugin; use OCP\Files\FileInfo; diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php index e7a1d5073ed..e83aec4d198 100644 --- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php @@ -125,7 +125,7 @@ class SharesPluginTest extends \Test\TestCase { $this->equalTo(false), $this->equalTo(-1) ) - ->willReturnCallback(function($userId, $requestedShareType, $node, $flag, $limit) use ($shareTypes){ + ->willReturnCallback(function ($userId, $requestedShareType, $node, $flag, $limit) use ($shareTypes) { if (in_array($requestedShareType, $shareTypes)) { $share = $this->createMock(IShare::class); $share->method('getShareType') @@ -191,7 +191,7 @@ class SharesPluginTest extends \Test\TestCase { ->with('/subdir') ->willReturn($node); - $dummyShares = array_map(function($type) { + $dummyShares = array_map(function ($type) { $share = $this->getMockBuilder(IShare::class)->getMock(); $share->expects($this->any()) ->method('getShareType') @@ -208,7 +208,7 @@ class SharesPluginTest extends \Test\TestCase { $this->equalTo(false), $this->equalTo(-1) ) - ->willReturnCallback(function($userId, $requestedShareType, $node, $flag, $limit) use ($shareTypes, $dummyShares){ + ->willReturnCallback(function ($userId, $requestedShareType, $node, $flag, $limit) use ($shareTypes, $dummyShares) { if ($node->getId() === 111 && in_array($requestedShareType, $shareTypes)) { foreach ($dummyShares as $dummyShare) { if ($dummyShare->getShareType() === $requestedShareType) { diff --git a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php index b3b21d2f32a..18f73d9685e 100644 --- a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php +++ b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php @@ -82,7 +82,7 @@ class BirthdayCalendarControllerTest extends TestCase { $this->userManager->expects($this->once()) ->method('callForSeenUsers') - ->willReturnCallback(function($closure) { + ->willReturnCallback(function ($closure) { $user1 = $this->createMock(IUser::class); $user1->method('getUID')->willReturn('uid1'); $user2 = $this->createMock(IUser::class); diff --git a/apps/dav/tests/unit/Controller/DirectControllerTest.php b/apps/dav/tests/unit/Controller/DirectControllerTest.php index c24243e81e3..20e5888dfb0 100644 --- a/apps/dav/tests/unit/Controller/DirectControllerTest.php +++ b/apps/dav/tests/unit/Controller/DirectControllerTest.php @@ -143,7 +143,7 @@ class DirectControllerTest extends TestCase { }); $this->urlGenerator->method('getAbsoluteURL') - ->willReturnCallback(function(string $url) { + ->willReturnCallback(function (string $url) { return 'https://my.nextcloud/'.$url; }); diff --git a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php index b703ef930e2..6e3a562e801 100644 --- a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php +++ b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php @@ -108,7 +108,7 @@ EOF; $called = false; $this->responseServer->expects($this->once()) ->method('handleITipMessage') - ->willReturnCallback(function(Message $iTipMessage) use (&$called, $expected) { + ->willReturnCallback(function (Message $iTipMessage) use (&$called, $expected) { $called = true; $this->assertEquals('this-is-the-events-uid', $iTipMessage->uid); $this->assertEquals('VEVENT', $iTipMessage->component); @@ -164,7 +164,7 @@ EOF; $called = false; $this->responseServer->expects($this->once()) ->method('handleITipMessage') - ->willReturnCallback(function(Message $iTipMessage) use (&$called, $expected) { + ->willReturnCallback(function (Message $iTipMessage) use (&$called, $expected) { $called = true; $this->assertEquals('this-is-the-events-uid', $iTipMessage->uid); $this->assertEquals('VEVENT', $iTipMessage->component); @@ -221,7 +221,7 @@ EOF; $called = false; $this->responseServer->expects($this->once()) ->method('handleITipMessage') - ->willReturnCallback(function(Message $iTipMessage) use (&$called, $expected) { + ->willReturnCallback(function (Message $iTipMessage) use (&$called, $expected) { $called = true; $this->assertEquals('this-is-the-events-uid', $iTipMessage->uid); $this->assertEquals('VEVENT', $iTipMessage->component); @@ -304,7 +304,7 @@ EOF; $called = false; $this->responseServer->expects($this->once()) ->method('handleITipMessage') - ->willReturnCallback(function(Message $iTipMessage) use (&$called, $expected) { + ->willReturnCallback(function (Message $iTipMessage) use (&$called, $expected) { $called = true; $this->assertEquals('this-is-the-events-uid', $iTipMessage->uid); $this->assertEquals('VEVENT', $iTipMessage->component); @@ -382,7 +382,7 @@ EOF; $called = false; $this->responseServer->expects($this->once()) ->method('handleITipMessage') - ->willReturnCallback(function(Message $iTipMessage) use (&$called, $expected) { + ->willReturnCallback(function (Message $iTipMessage) use (&$called, $expected) { $called = true; $this->assertEquals('this-is-the-events-uid', $iTipMessage->uid); $this->assertEquals('VEVENT', $iTipMessage->component); diff --git a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php index 9dcf39d70f3..721c2c4b074 100644 --- a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php +++ b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php @@ -37,7 +37,7 @@ class AnonymousOptionsTest extends TestCase { private function sendRequest($method, $path, $userAgent = '') { $server = new Server(); $server->addPlugin(new AnonymousOptionsPlugin()); - $server->addPlugin(new Plugin(new BasicCallBack(function() { + $server->addPlugin(new Plugin(new BasicCallBack(function () { return false; }))); diff --git a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php index 4063aac5f0d..07a9e2ce9f5 100644 --- a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php @@ -26,7 +26,6 @@ namespace OCA\DAV\Tests\unit\DAV\Sharing; - use OCA\DAV\Connector\Sabre\Auth; use OCA\DAV\DAV\Sharing\IShareable; use OCA\DAV\DAV\Sharing\Plugin; @@ -71,10 +70,10 @@ class PluginTest extends TestCase { public function testSharing() { $this->book->expects($this->once())->method('updateShares')->with([[ - 'href' => 'principal:principals/admin', - 'commonName' => null, - 'summary' => null, - 'readOnly' => false + 'href' => 'principal:principals/admin', + 'commonName' => null, + 'summary' => null, + 'readOnly' => false ]], ['mailto:wilfredo@example.com']); // setup request diff --git a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php index eec2558ee9d..698e39a5218 100644 --- a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php +++ b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php @@ -48,10 +48,10 @@ class SystemPrincipalBackendTest extends TestCase { 'uri' => 'principals/system/system', '{DAV:}displayname' => 'system', ], - [ - 'uri' => 'principals/system/public', - '{DAV:}displayname' => 'public', - ] + [ + 'uri' => 'principals/system/public', + '{DAV:}displayname' => 'public', + ] ], 'principals/system'], ]; } @@ -125,7 +125,7 @@ class SystemPrincipalBackendTest extends TestCase { public function providesPrincipalForGetGroupMembership() { return [ - ['principals/system/a'], + ['principals/system/a'], ]; } diff --git a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php index ef2634403e5..1143fd8192d 100644 --- a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php +++ b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php @@ -124,7 +124,7 @@ class FilesDropPluginTest extends TestCase { ->willReturn('https://example.com'); $this->view->method('file_exists') - ->willReturnCallback(function($path) { + ->willReturnCallback(function ($path) { if ($path === 'file.txt' || $path === '/file.txt') { return true; } else { @@ -165,7 +165,7 @@ class FilesDropPluginTest extends TestCase { ->willReturn('https://example.com'); $this->view->method('file_exists') - ->willReturnCallback(function($path) { + ->willReturnCallback(function ($path) { if ($path === 'file.txt' || $path === '/file.txt') { return true; } else { diff --git a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php index 8d1b36f46cc..1b09c96c940 100644 --- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php +++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php @@ -78,7 +78,7 @@ class AppleProvisioningPluginTest extends TestCase { $this->themingDefaults, $this->request, $this->l10n, - function() { + function () { return 'generated-uuid'; } ); @@ -92,7 +92,7 @@ class AppleProvisioningPluginTest extends TestCase { $plugin = new AppleProvisioningPlugin($this->userSession, $this->urlGenerator, $this->themingDefaults, $this->request, $this->l10n, - function() {}); + function () {}); $server->expects($this->at(0)) ->method('on') diff --git a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php index efdf15dac34..c0b8c92964f 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php @@ -26,7 +26,6 @@ namespace OCA\DAV\Tests\unit\SystemTag; - use OC\SystemTag\SystemTag; use OCP\IUser; use OCP\SystemTag\ISystemTag; diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php index 24fc561cd9a..ec80d916b58 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php @@ -573,7 +573,7 @@ class SystemTagPluginTest extends \Test\TestCase { $request->expects($this->once()) ->method('getHeader') ->with('Content-Type') - ->willReturn('application/json'); + ->willReturn('application/json'); $request->expects($this->once()) ->method('getUrl') @@ -647,7 +647,7 @@ class SystemTagPluginTest extends \Test\TestCase { $request->expects($this->once()) ->method('getHeader') ->with('Content-Type') - ->willReturn('application/json'); + ->willReturn('application/json'); $request->expects($this->once()) ->method('getBaseUrl') @@ -744,7 +744,7 @@ class SystemTagPluginTest extends \Test\TestCase { $request->expects($this->once()) ->method('getHeader') ->with('Content-Type') - ->willReturn('application/json'); + ->willReturn('application/json'); $this->plugin->httpPost($request, $response); } diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php index 938549c6646..faae3626fb3 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php @@ -26,7 +26,6 @@ namespace OCA\DAV\Tests\unit\SystemTag; - use OC\SystemTag\SystemTag; use OCP\IGroupManager; use OCP\IUser; diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php index d0023dbe91c..c8482ffe77a 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php @@ -26,7 +26,6 @@ namespace OCA\DAV\Tests\unit\SystemTag; - use OC\SystemTag\SystemTag; use OCP\IUser; use OCP\SystemTag\ISystemTagManager; @@ -63,7 +62,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase { } public function getNode() { - return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection ( + return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection( 111, 'files', $this->user, @@ -252,7 +251,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase { $this->tagManager->expects($this->exactly(3)) ->method('canUserSeeTag') - ->willReturnCallback(function($tag) { + ->willReturnCallback(function ($tag) { return $tag->isUserVisible(); }); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php index b2af8024084..4e4612001d6 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php @@ -84,7 +84,7 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase { ->getMock(); $userFolder = $this->userFolder; - $closure = function($name) use ($userFolder) { + $closure = function ($name) use ($userFolder) { $nodes = $userFolder->getById(intval($name)); return !empty($nodes); }; diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php index f513a68f068..2a4c832c71c 100644 --- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php +++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php @@ -87,41 +87,41 @@ class AssemblyStreamTest extends \Test\TestCase { return[ 'one node zero bytes' => [ '', [ - $this->buildNode('0', '') - ]], + $this->buildNode('0', '') + ]], 'one node only' => [ '1234567890', [ - $this->buildNode('0', '1234567890') - ]], + $this->buildNode('0', '1234567890') + ]], 'one node buffer boundary' => [ $data8k, [ - $this->buildNode('0', $data8k) - ]], + $this->buildNode('0', $data8k) + ]], 'two nodes' => [ '1234567890', [ - $this->buildNode('1', '67890'), - $this->buildNode('0', '12345') - ]], + $this->buildNode('1', '67890'), + $this->buildNode('0', '12345') + ]], 'two nodes end on buffer boundary' => [ $data8k . $data8k, [ - $this->buildNode('1', $data8k), - $this->buildNode('0', $data8k) - ]], + $this->buildNode('1', $data8k), + $this->buildNode('0', $data8k) + ]], 'two nodes with one on buffer boundary' => [ $data8k . $dataLess8k, [ - $this->buildNode('1', $dataLess8k), - $this->buildNode('0', $data8k) - ]], + $this->buildNode('1', $dataLess8k), + $this->buildNode('0', $data8k) + ]], 'two nodes on buffer boundary plus one byte' => [ $data8k . 'X' . $data8k, [ - $this->buildNode('1', $data8k), - $this->buildNode('0', $data8k . 'X') - ]], + $this->buildNode('1', $data8k), + $this->buildNode('0', $data8k . 'X') + ]], 'two nodes on buffer boundary plus one byte at the end' => [ $data8k . $data8k . 'X', [ - $this->buildNode('1', $data8k . 'X'), - $this->buildNode('0', $data8k) - ]], + $this->buildNode('1', $data8k . 'X'), + $this->buildNode('0', $data8k) + ]], 'a ton of nodes' => [ $tonofdata, $tonofnodes ] diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php index 98337bbfa65..f4f91c0e760 100644 --- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php +++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php @@ -24,7 +24,6 @@ namespace OCA\DAV\Tests\unit\Upload; - use OCA\DAV\Connector\Sabre\Directory; use OCA\DAV\Upload\ChunkingPlugin; use OCA\DAV\Upload\FutureFile; diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php index 6c75a1912a8..fcd7ef569b9 100644 --- a/apps/encryption/lib/AppInfo/Application.php +++ b/apps/encryption/lib/AppInfo/Application.php @@ -28,7 +28,6 @@ namespace OCA\Encryption\AppInfo; - use OC\Files\View; use OCA\Encryption\Controller\RecoveryController; use OCA\Encryption\Controller\SettingsController; @@ -112,7 +111,7 @@ class Application extends \OCP\AppFramework\App { $this->encryptionManager->registerEncryptionModule( Encryption::ID, Encryption::DISPLAY_NAME, - function() use ($container) { + function () use ($container) { return new Encryption( $container->query('Crypt'), diff --git a/apps/encryption/lib/Command/DisableMasterKey.php b/apps/encryption/lib/Command/DisableMasterKey.php index 2054cf953f7..18bf0b3903d 100644 --- a/apps/encryption/lib/Command/DisableMasterKey.php +++ b/apps/encryption/lib/Command/DisableMasterKey.php @@ -23,7 +23,6 @@ namespace OCA\Encryption\Command; - use OCA\Encryption\Util; use OCP\IConfig; use Symfony\Component\Console\Command\Command; diff --git a/apps/encryption/lib/Command/EnableMasterKey.php b/apps/encryption/lib/Command/EnableMasterKey.php index fe011abe138..d1148c88ccd 100644 --- a/apps/encryption/lib/Command/EnableMasterKey.php +++ b/apps/encryption/lib/Command/EnableMasterKey.php @@ -22,7 +22,6 @@ namespace OCA\Encryption\Command; - use OCA\Encryption\Util; use OCP\IConfig; use Symfony\Component\Console\Command\Command; diff --git a/apps/encryption/lib/Command/RecoverUser.php b/apps/encryption/lib/Command/RecoverUser.php index fee9195cf1e..9d98b38de47 100644 --- a/apps/encryption/lib/Command/RecoverUser.php +++ b/apps/encryption/lib/Command/RecoverUser.php @@ -23,7 +23,6 @@ namespace OCA\Encryption\Command; - use OCA\Encryption\Util; use OCP\IConfig; use OCP\IUserManager; diff --git a/apps/encryption/lib/Controller/RecoveryController.php b/apps/encryption/lib/Controller/RecoveryController.php index 3d96214bdc9..534e00e1b2e 100644 --- a/apps/encryption/lib/Controller/RecoveryController.php +++ b/apps/encryption/lib/Controller/RecoveryController.php @@ -25,7 +25,6 @@ namespace OCA\Encryption\Controller; - use OCA\Encryption\Recovery; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; @@ -122,7 +121,7 @@ class RecoveryController extends Controller { if (empty($newPassword)) { $errorMessage = (string)$this->l->t('Please provide a new recovery password'); - return new DataResponse (['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST); + return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST); } if (empty($confirmPassword)) { diff --git a/apps/encryption/lib/Controller/StatusController.php b/apps/encryption/lib/Controller/StatusController.php index d5a60460229..d3925e4482a 100644 --- a/apps/encryption/lib/Controller/StatusController.php +++ b/apps/encryption/lib/Controller/StatusController.php @@ -25,7 +25,6 @@ namespace OCA\Encryption\Controller; - use OCA\Encryption\Session; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; @@ -71,7 +70,7 @@ class StatusController extends Controller { $status = 'error'; $message = 'no valid init status'; - switch( $this->session->getStatus()) { + switch($this->session->getStatus()) { case Session::INIT_EXECUTED: $status = 'interactionNeeded'; $message = (string)$this->l->t( diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php index 45319302bbf..acf19f5eb26 100644 --- a/apps/encryption/lib/Crypto/Crypt.php +++ b/apps/encryption/lib/Crypto/Crypt.php @@ -29,7 +29,6 @@ namespace OCA\Encryption\Crypto; - use OC\Encryption\Exceptions\DecryptionFailedException; use OC\Encryption\Exceptions\EncryptionFailedException; use OCA\Encryption\Exceptions\MultiKeyDecryptException; diff --git a/apps/encryption/lib/Crypto/DecryptAll.php b/apps/encryption/lib/Crypto/DecryptAll.php index 564f1d49888..1bb0dd0bc42 100644 --- a/apps/encryption/lib/Crypto/DecryptAll.php +++ b/apps/encryption/lib/Crypto/DecryptAll.php @@ -22,7 +22,6 @@ namespace OCA\Encryption\Crypto; - use OCA\Encryption\KeyManager; use OCA\Encryption\Session; use OCA\Encryption\Util; diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php index 5c90631e85f..d0aaafd0617 100644 --- a/apps/encryption/lib/Crypto/EncryptAll.php +++ b/apps/encryption/lib/Crypto/EncryptAll.php @@ -473,11 +473,11 @@ class EncryptAll { protected function createMailBody($password) { $html = new \OC_Template("encryption", "mail", ""); - $html->assign ('password', $password); + $html->assign('password', $password); $htmlMail = $html->fetchPage(); $plainText = new \OC_Template("encryption", "altmail", ""); - $plainText->assign ('password', $password); + $plainText->assign('password', $password); $plainTextMail = $plainText->fetchPage(); return [$htmlMail, $plainTextMail]; diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 421e5f02ee6..f976a0815db 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -31,7 +31,6 @@ namespace OCA\Encryption\Crypto; - use OC\Encryption\Exceptions\DecryptionFailedException; use OC\Files\Cache\Scanner; use OC\Files\View; diff --git a/apps/encryption/lib/HookManager.php b/apps/encryption/lib/HookManager.php index 261247f336e..a40f56fa373 100644 --- a/apps/encryption/lib/HookManager.php +++ b/apps/encryption/lib/HookManager.php @@ -23,7 +23,6 @@ namespace OCA\Encryption; - use OCA\Encryption\Hooks\Contracts\IHook; class HookManager { diff --git a/apps/encryption/lib/Hooks/Contracts/IHook.php b/apps/encryption/lib/Hooks/Contracts/IHook.php index 573a6b10595..02d26c4dea2 100644 --- a/apps/encryption/lib/Hooks/Contracts/IHook.php +++ b/apps/encryption/lib/Hooks/Contracts/IHook.php @@ -22,7 +22,6 @@ namespace OCA\Encryption\Hooks\Contracts; - interface IHook { /** * Connects Hooks diff --git a/apps/encryption/lib/Hooks/UserHooks.php b/apps/encryption/lib/Hooks/UserHooks.php index 209909dd097..16655dfe689 100644 --- a/apps/encryption/lib/Hooks/UserHooks.php +++ b/apps/encryption/lib/Hooks/UserHooks.php @@ -28,7 +28,6 @@ namespace OCA\Encryption\Hooks; - use OC\Files\Filesystem; use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\Hooks\Contracts\IHook; diff --git a/apps/encryption/lib/Migration/SetMasterKeyStatus.php b/apps/encryption/lib/Migration/SetMasterKeyStatus.php index 49384be3328..ade393cede1 100644 --- a/apps/encryption/lib/Migration/SetMasterKeyStatus.php +++ b/apps/encryption/lib/Migration/SetMasterKeyStatus.php @@ -23,7 +23,6 @@ namespace OCA\Encryption\Migration; - use OCP\IConfig; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php index 1feb5759586..657d41b61dd 100644 --- a/apps/encryption/lib/Recovery.php +++ b/apps/encryption/lib/Recovery.php @@ -27,7 +27,6 @@ namespace OCA\Encryption; - use OC\Files\View; use OCA\Encryption\Crypto\Crypt; use OCP\Encryption\IFile; diff --git a/apps/encryption/lib/Settings/Personal.php b/apps/encryption/lib/Settings/Personal.php index 90d54155c27..7ecf457e641 100644 --- a/apps/encryption/lib/Settings/Personal.php +++ b/apps/encryption/lib/Settings/Personal.php @@ -23,7 +23,6 @@ namespace OCA\Encryption\Settings; - use OCA\Encryption\Session; use OCA\Encryption\Util; use OCP\AppFramework\Http\TemplateResponse; diff --git a/apps/encryption/lib/Users/Setup.php b/apps/encryption/lib/Users/Setup.php index 0ff488ae582..549c7222d2e 100644 --- a/apps/encryption/lib/Users/Setup.php +++ b/apps/encryption/lib/Users/Setup.php @@ -25,7 +25,6 @@ namespace OCA\Encryption\Users; - use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\KeyManager; use OCP\ILogger; @@ -64,7 +63,7 @@ class Setup { $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false; $this->crypt = $crypt; $this->keyManager = $keyManager; - } + } /** * @param string $uid user id diff --git a/apps/encryption/lib/Util.php b/apps/encryption/lib/Util.php index 6b3ba80481b..681f025417b 100644 --- a/apps/encryption/lib/Util.php +++ b/apps/encryption/lib/Util.php @@ -26,7 +26,6 @@ namespace OCA\Encryption; - use OC\Files\View; use OCA\Encryption\Crypto\Crypt; use OCP\IConfig; diff --git a/apps/encryption/templates/altmail.php b/apps/encryption/templates/altmail.php index dde85e0af14..bea416f05fd 100644 --- a/apps/encryption/templates/altmail.php +++ b/apps/encryption/templates/altmail.php @@ -3,7 +3,7 @@ /** @var array $_ */ print_unescaped($l->t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", [$_['password']])); -if ( isset($_['expiration']) ) { +if (isset($_['expiration'])) { print_unescaped($l->t("The share will expire on %s.", [$_['expiration']])); print_unescaped("\n\n"); } diff --git a/apps/encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php index 39d10490c44..48cc4d40da8 100644 --- a/apps/encryption/templates/settings-admin.php +++ b/apps/encryption/templates/settings-admin.php @@ -13,7 +13,7 @@ style('encryption', 'settings-admin'); <input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage" value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> /> <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br> - <em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em> + <em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em> </p> <br /> <?php if($_['masterKeyEnabled'] === false): ?> diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php index 41dacc534e6..23886b7c824 100644 --- a/apps/encryption/templates/settings-personal.php +++ b/apps/encryption/templates/settings-personal.php @@ -6,49 +6,49 @@ script('encryption', 'settings-personal'); <form id="ocDefaultEncryptionModule" class="section"> <h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2> - <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?> + <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED): ?> <?php p($l->t("Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.")); ?> - <?php elseif ( $_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED ): ?> + <?php elseif ($_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED): ?> <p> <a name="changePKPasswd" /> <label for="changePrivateKeyPasswd"> - <em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em> + <em><?php p($l->t("Your private key password no longer matches your log-in password.")); ?></em> </label> <br /> - <?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?> - <?php if ( $_["recoveryEnabledForUser"] ): - p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) ); + <?php p($l->t("Set your old private key password to your current log-in password:")); ?> + <?php if ($_["recoveryEnabledForUser"]): + p($l->t(" If you don't remember your old password you can ask your administrator to recover your files.")); endif; ?> <br /> <input type="password" name="changePrivateKeyPassword" id="oldPrivateKeyPassword" /> - <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label> + <label for="oldPrivateKeyPassword"><?php p($l->t("Old log-in password")); ?></label> <br /> <input type="password" name="changePrivateKeyPassword" id="newPrivateKeyPassword" /> - <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label> + <label for="newRecoveryPassword"><?php p($l->t("Current log-in password")); ?></label> <br /> <button type="button" name="submitChangePrivateKeyPassword" - disabled><?php p($l->t( "Update Private Key Password" )); ?> + disabled><?php p($l->t("Update Private Key Password")); ?> </button> <span class="msg"></span> </p> - <?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL ): ?> + <?php elseif ($_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL): ?> <br /> <p id="userEnableRecovery"> - <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label> + <label for="userEnableRecovery"><?php p($l->t("Enable password recovery:")); ?></label> <span class="msg"></span> <br /> - <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em> + <em><?php p($l->t("Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")); ?></em> <br /> <input type="radio" @@ -56,8 +56,8 @@ script('encryption', 'settings-personal'); id="userEnableRecoveryCheckbox" name="userEnableRecovery" value="1" - <?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> /> - <label for="userEnableRecoveryCheckbox"><?php p( $l->t( "Enabled" ) ); ?></label> + <?php echo($_["recoveryEnabledForUser"] ? 'checked="checked"' : ''); ?> /> + <label for="userEnableRecoveryCheckbox"><?php p($l->t("Enabled")); ?></label> <br /> <input @@ -66,8 +66,8 @@ script('encryption', 'settings-personal'); id="userDisableRecoveryCheckbox" name="userEnableRecovery" value="0" - <?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> /> - <label for="userDisableRecoveryCheckbox"><?php p( $l->t( "Disabled" ) ); ?></label> + <?php echo($_["recoveryEnabledForUser"] === false ? 'checked="checked"' : ''); ?> /> + <label for="userDisableRecoveryCheckbox"><?php p($l->t("Disabled")); ?></label> </p> <?php endif; ?> </form> diff --git a/apps/encryption/tests/Command/TestEnableMasterKey.php b/apps/encryption/tests/Command/TestEnableMasterKey.php index 3d8831bd7fb..f8cbd790adb 100644 --- a/apps/encryption/tests/Command/TestEnableMasterKey.php +++ b/apps/encryption/tests/Command/TestEnableMasterKey.php @@ -25,7 +25,6 @@ namespace OCA\Encryption\Tests\Command; - use OCA\Encryption\Command\EnableMasterKey; use OCA\Encryption\Util; use OCP\IConfig; diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php index 3c8b239631e..5f69f11d2f7 100644 --- a/apps/encryption/tests/Controller/RecoveryControllerTest.php +++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php @@ -26,7 +26,6 @@ namespace OCA\Encryption\Tests\Controller; - use OCA\Encryption\Controller\RecoveryController; use OCA\Encryption\Recovery; use OCP\AppFramework\Http; diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php index 4ac26cde64c..160c9794613 100644 --- a/apps/encryption/tests/Controller/SettingsControllerTest.php +++ b/apps/encryption/tests/Controller/SettingsControllerTest.php @@ -86,7 +86,7 @@ class SettingsControllerTest extends TestCase { $this->l10nMock->expects($this->any()) ->method('t') - ->willReturnCallback(function($message) { + ->willReturnCallback(function ($message) { return $message; }); diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php index d9db99989d5..fe2616f9c54 100644 --- a/apps/encryption/tests/Controller/StatusControllerTest.php +++ b/apps/encryption/tests/Controller/StatusControllerTest.php @@ -27,7 +27,6 @@ namespace OCA\Encryption\Tests\Controller; - use OCA\Encryption\Controller\StatusController; use OCA\Encryption\Session; use OCP\Encryption\IManager; @@ -64,7 +63,7 @@ class StatusControllerTest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->l10nMock->expects($this->any()) ->method('t') - ->willReturnCallback(function($message) { + ->willReturnCallback(function ($message) { return $message; }); $this->encryptionManagerMock = $this->createMock(IManager::class); diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php index 43704c95d55..dd892616d0f 100644 --- a/apps/encryption/tests/Crypto/CryptTest.php +++ b/apps/encryption/tests/Crypto/CryptTest.php @@ -27,7 +27,6 @@ namespace OCA\Encryption\Tests\Crypto; - use OCA\Encryption\Crypto\Crypt; use OCP\IConfig; use OCP\IL10N; @@ -295,7 +294,7 @@ class CryptTest extends TestCase { * * @return array */ - public function dataProviderRemovePadding() { + public function dataProviderRemovePadding() { return [ ['dataxx', 'data'], ['data', false] diff --git a/apps/encryption/tests/Crypto/DecryptAllTest.php b/apps/encryption/tests/Crypto/DecryptAllTest.php index f84892a7c91..be980149145 100644 --- a/apps/encryption/tests/Crypto/DecryptAllTest.php +++ b/apps/encryption/tests/Crypto/DecryptAllTest.php @@ -25,7 +25,6 @@ namespace OCA\Encryption\Tests\Crypto; - use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\Crypto\DecryptAll; use OCA\Encryption\KeyManager; diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php index 1a409e6508e..f5fd3d2287f 100644 --- a/apps/encryption/tests/Crypto/EncryptAllTest.php +++ b/apps/encryption/tests/Crypto/EncryptAllTest.php @@ -27,7 +27,6 @@ namespace OCA\Encryption\Tests\Crypto; - use OC\Files\View; use OCA\Encryption\Crypto\EncryptAll; use OCA\Encryption\KeyManager; @@ -323,7 +322,7 @@ class EncryptAllTest extends TestCase { $this->view->expects($this->any())->method('is_dir') ->willReturnCallback( - function($path) { + function ($path) { if ($path === '/user1/files/foo') { return true; } diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 26e32c3a182..1e4cfad5e30 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -323,7 +323,7 @@ class EncryptionTest extends TestCase { $this->keyManagerMock->expects($this->any()) ->method('addSystemKeys') - ->willReturnCallback(function($accessList, $publicKeys) { + ->willReturnCallback(function ($accessList, $publicKeys) { return $publicKeys; }); @@ -350,7 +350,7 @@ class EncryptionTest extends TestCase { $this->keyManagerMock->expects($this->never())->method('getPublicKey'); $this->keyManagerMock->expects($this->never())->method('addSystemKeys'); $this->keyManagerMock->expects($this->once())->method('setVersion') - ->willReturnCallback(function($path, $version, $view) { + ->willReturnCallback(function ($path, $version, $view) { $this->assertSame('path', $path); $this->assertSame(2, $version); $this->assertTrue($view instanceof \OC\Files\View); @@ -368,20 +368,20 @@ class EncryptionTest extends TestCase { $this->keyManagerMock->expects($this->any()) ->method('getPublicKey')->willReturnCallback( - function($user) { + function ($user) { throw new PublicKeyMissingException($user); } ); $this->keyManagerMock->expects($this->any()) ->method('addSystemKeys') - ->willReturnCallback(function($accessList, $publicKeys) { + ->willReturnCallback(function ($accessList, $publicKeys) { return $publicKeys; }); $this->cryptMock->expects($this->once())->method('multiKeyEncrypt') ->willReturnCallback( - function($fileKey, $publicKeys) { + function ($fileKey, $publicKeys) { $this->assertEmpty($publicKeys); $this->assertSame('fileKey', $fileKey); } diff --git a/apps/encryption/tests/HookManagerTest.php b/apps/encryption/tests/HookManagerTest.php index b41cdf1720c..c49938f4f3f 100644 --- a/apps/encryption/tests/HookManagerTest.php +++ b/apps/encryption/tests/HookManagerTest.php @@ -25,7 +25,6 @@ namespace OCA\Encryption\Tests; - use OCA\Encryption\HookManager; use OCA\Encryption\Hooks\Contracts\IHook; use OCP\IConfig; diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php index 3cfeb2362ac..c676acb1e90 100644 --- a/apps/encryption/tests/Hooks/UserHooksTest.php +++ b/apps/encryption/tests/Hooks/UserHooksTest.php @@ -28,7 +28,6 @@ namespace OCA\Encryption\Tests\Hooks; - use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\Hooks\UserHooks; use OCA\Encryption\KeyManager; diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index 2696698eabc..2e2fce2b349 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -31,7 +31,6 @@ namespace OCA\Encryption\Tests; - use OC\Files\FileInfo; use OC\Files\View; use OCA\Encryption\Crypto\Crypt; @@ -243,7 +242,7 @@ class KeyManagerTest extends TestCase { $this->keyStorageMock->expects($this->exactly(2)) ->method('getUserKey') - ->willReturnCallback(function ($uid, $keyID, $encryptionModuleId){ + ->willReturnCallback(function ($uid, $keyID, $encryptionModuleId) { if ($keyID === 'publicKey') { return ''; } @@ -474,13 +473,13 @@ class KeyManagerTest extends TestCase { $this->keyStorageMock->expects($this->any()) ->method('getSystemUserKey') - ->willReturnCallback(function($keyId, $encryptionModuleId) { + ->willReturnCallback(function ($keyId, $encryptionModuleId) { return $keyId; }); $this->utilMock->expects($this->any()) ->method('isRecoveryEnabledForUser') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { if ($uid === 'user1') { return true; } diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php index a41c2ff9fea..5139e492f26 100644 --- a/apps/encryption/tests/RecoveryTest.php +++ b/apps/encryption/tests/RecoveryTest.php @@ -28,7 +28,6 @@ namespace OCA\Encryption\Tests; - use OC\Files\View; use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\KeyManager; @@ -110,8 +109,8 @@ class RecoveryTest extends TestCase { $this->cryptMock->expects($this->once()) ->method('createKeyPair') ->willReturn([ - 'publicKey' => 'privateKey', - 'privateKey' => 'publicKey', + 'publicKey' => 'privateKey', + 'privateKey' => 'publicKey', ]); $this->keyManagerMock->expects($this->once()) diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php index 4b5cd9f0cb5..279111e3c3b 100644 --- a/apps/encryption/tests/SessionTest.php +++ b/apps/encryption/tests/SessionTest.php @@ -27,7 +27,6 @@ namespace OCA\Encryption\Tests; - use OCA\Encryption\Session; use OCP\ISession; use Test\TestCase; diff --git a/apps/encryption/tests/Users/SetupTest.php b/apps/encryption/tests/Users/SetupTest.php index 44fb1b40bda..a580ca68e05 100644 --- a/apps/encryption/tests/Users/SetupTest.php +++ b/apps/encryption/tests/Users/SetupTest.php @@ -26,7 +26,6 @@ namespace OCA\Encryption\Tests\Users; - use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\KeyManager; use OCA\Encryption\Users\Setup; diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php index 6f3aea38a9b..d433826cb76 100644 --- a/apps/encryption/tests/UtilTest.php +++ b/apps/encryption/tests/UtilTest.php @@ -28,7 +28,6 @@ namespace OCA\Encryption\Tests; - use OC\Files\View; use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\Util; diff --git a/apps/federatedfilesharing/lib/AddressHandler.php b/apps/federatedfilesharing/lib/AddressHandler.php index 2999ade6ab1..384a1e8c315 100644 --- a/apps/federatedfilesharing/lib/AddressHandler.php +++ b/apps/federatedfilesharing/lib/AddressHandler.php @@ -25,6 +25,7 @@ */ namespace OCA\FederatedFileSharing; + use OC\HintException; use OCP\Federation\ICloudIdManager; use OCP\IL10N; diff --git a/apps/federatedfilesharing/lib/AppInfo/Application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php index dc1b8541f07..34666a62027 100644 --- a/apps/federatedfilesharing/lib/AppInfo/Application.php +++ b/apps/federatedfilesharing/lib/AppInfo/Application.php @@ -28,7 +28,6 @@ namespace OCA\FederatedFileSharing\AppInfo; - use OC\AppFramework\Utility\SimpleContainer; use OCA\FederatedFileSharing\AddressHandler; use OCA\FederatedFileSharing\Controller\RequestHandlerController; @@ -53,7 +52,7 @@ class Application extends App { $cloudFederationManager = $server->getCloudFederationProviderManager(); $cloudFederationManager->addCloudFederationProvider('file', 'Federated Files Sharing', - function() use ($container) { + function () use ($container) { $server = $container->getServer(); return new CloudFederationProviderFiles( $server->getAppManager(), @@ -73,7 +72,7 @@ class Application extends App { ); }); - $container->registerService('RequestHandlerController', function(SimpleContainer $c) use ($server) { + $container->registerService('RequestHandlerController', function (SimpleContainer $c) use ($server) { $addressHandler = new AddressHandler( $server->getURLGenerator(), $server->getL10N('federatedfilesharing'), @@ -112,7 +111,7 @@ class Application extends App { $eventDispatcher->addListener( 'OCA\Files::loadAdditionalScripts', - function() use ($federatedShareProvider) { + function () use ($federatedShareProvider) { if ($federatedShareProvider->isIncomingServer2serverShareEnabled()) { \OCP\Util::addScript('federatedfilesharing', 'external'); } diff --git a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php index 0299efcb83e..ebbff7b9c34 100644 --- a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php +++ b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php @@ -27,7 +27,6 @@ namespace OCA\FederatedFileSharing\BackgroundJob; - use OC\BackgroundJob\Job; use OC\BackgroundJob\JobList; use OCA\FederatedFileSharing\AddressHandler; diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php index bf2948b0f64..b46fab19449 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -146,7 +146,7 @@ class MountPublicLinkController extends Controller { $storedPassword = $share->getPassword(); $authenticated = $this->session->get('public_link_authenticated') === $share->getId() || $this->shareManager->checkPassword($share, $password); - if (!empty($storedPassword) && !$authenticated ) { + if (!empty($storedPassword) && !$authenticated) { $response = new JSONResponse( ['message' => 'No permission to access the share'], Http::STATUS_BAD_REQUEST diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php index ae0c2d524a1..a70e947e3c1 100644 --- a/apps/federatedfilesharing/lib/Notifications.php +++ b/apps/federatedfilesharing/lib/Notifications.php @@ -255,7 +255,7 @@ class Notifications { $fields = [ 'token' => $token, 'remoteId' => $remoteId - ]; + ]; foreach ($data as $key => $value) { $fields[$key] = $value; } diff --git a/apps/federatedfilesharing/lib/Notifier.php b/apps/federatedfilesharing/lib/Notifier.php index f66482b1383..348b7ef839e 100644 --- a/apps/federatedfilesharing/lib/Notifier.php +++ b/apps/federatedfilesharing/lib/Notifier.php @@ -25,7 +25,6 @@ namespace OCA\FederatedFileSharing; - use OC\HintException; use OCP\Contacts\IManager; use OCP\Federation\ICloudId; diff --git a/apps/federatedfilesharing/lib/Settings/Personal.php b/apps/federatedfilesharing/lib/Settings/Personal.php index d7c52aba380..5416dbf8b17 100644 --- a/apps/federatedfilesharing/lib/Settings/Personal.php +++ b/apps/federatedfilesharing/lib/Settings/Personal.php @@ -26,7 +26,6 @@ namespace OCA\FederatedFileSharing\Settings; - use OCA\FederatedFileSharing\FederatedShareProvider; use OCP\AppFramework\Http\TemplateResponse; use OCP\IL10N; diff --git a/apps/federatedfilesharing/lib/Settings/PersonalSection.php b/apps/federatedfilesharing/lib/Settings/PersonalSection.php index c555f17e07a..102d4eb889f 100644 --- a/apps/federatedfilesharing/lib/Settings/PersonalSection.php +++ b/apps/federatedfilesharing/lib/Settings/PersonalSection.php @@ -23,7 +23,6 @@ namespace OCA\FederatedFileSharing\Settings; - use OCP\IL10N; use OCP\IURLGenerator; use OCP\Settings\IIconSection; diff --git a/apps/federatedfilesharing/lib/TokenHandler.php b/apps/federatedfilesharing/lib/TokenHandler.php index 2487a331fa7..0e3fe7a049d 100644 --- a/apps/federatedfilesharing/lib/TokenHandler.php +++ b/apps/federatedfilesharing/lib/TokenHandler.php @@ -22,7 +22,6 @@ namespace OCA\FederatedFileSharing; - use OCP\Security\ISecureRandom; /** diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 22466fbc480..300622f1c00 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -27,7 +27,6 @@ namespace OCA\FederatedFileSharing\Tests; - use OC\Federation\CloudIdManager; use OCA\FederatedFileSharing\AddressHandler; use OCP\IL10N; diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index 88d2c68d479..123f669e74e 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -143,7 +143,7 @@ class MountPublicLinkControllerTest extends \Test\TestCase { $this->addressHandler->expects($this->any())->method('splitUserRemote') ->with($shareWith) ->willReturnCallback( - function($shareWith) use ($validShareWith, $expectedReturnData) { + function ($shareWith) use ($validShareWith, $expectedReturnData) { if ($validShareWith) { return ['user', 'server']; } diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index 227f816c825..1c82c310c1f 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -30,7 +30,6 @@ namespace OCA\FederatedFileSharing\Tests; - use OC\Federation\CloudIdManager; use OCA\FederatedFileSharing\AddressHandler; use OCA\FederatedFileSharing\FederatedShareProvider; @@ -99,7 +98,7 @@ class FederatedShareProviderTest extends \Test\TestCase { ->getMock(); $this->l = $this->getMockBuilder(IL10N::class)->getMock(); $this->l->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index f05573b87f9..a835709c978 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -24,7 +24,6 @@ namespace OCA\FederatedFileSharing\Tests; - use OCA\FederatedFileSharing\AddressHandler; use OCA\FederatedFileSharing\Notifications; use OCP\BackgroundJob\IJobList; diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php index 50be53bd1c1..8ddc4bc039b 100644 --- a/apps/federatedfilesharing/tests/TokenHandlerTest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php @@ -24,7 +24,6 @@ namespace OCA\FederatedFileSharing\Tests; - use OCA\FederatedFileSharing\TokenHandler; use OCP\Security\ISecureRandom; diff --git a/apps/federation/lib/AppInfo/Application.php b/apps/federation/lib/AppInfo/Application.php index 7ea2f000029..119756b16e4 100644 --- a/apps/federation/lib/AppInfo/Application.php +++ b/apps/federation/lib/AppInfo/Application.php @@ -69,7 +69,7 @@ class Application extends App { ); $dispatcher = $container->getServer()->getEventDispatcher(); - $dispatcher->addListener('OCA\DAV\Connector\Sabre::authInit', function($event) use($container) { + $dispatcher->addListener('OCA\DAV\Connector\Sabre::authInit', function ($event) use ($container) { if ($event instanceof SabrePluginEvent) { $server = $event->getServer(); if ($server instanceof Server) { diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php index e74fc74cace..4eaa94a53d5 100644 --- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php @@ -28,7 +28,6 @@ namespace OCA\Federation\BackgroundJob; - use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Ring\Exception\RingException; diff --git a/apps/federation/lib/Command/SyncFederationAddressBooks.php b/apps/federation/lib/Command/SyncFederationAddressBooks.php index 3080d469995..cad000cf71f 100644 --- a/apps/federation/lib/Command/SyncFederationAddressBooks.php +++ b/apps/federation/lib/Command/SyncFederationAddressBooks.php @@ -60,7 +60,7 @@ class SyncFederationAddressBooks extends Command { $progress = new ProgressBar($output); $progress->start(); - $this->syncService->syncThemAll(function($url, $ex) use ($progress, $output) { + $this->syncService->syncThemAll(function ($url, $ex) use ($progress, $output) { if ($ex instanceof \Exception) { $output->writeln("Error while syncing $url : " . $ex->getMessage()); diff --git a/apps/federation/lib/DbHandler.php b/apps/federation/lib/DbHandler.php index 24bbe91c7b8..b7d53d378d0 100644 --- a/apps/federation/lib/DbHandler.php +++ b/apps/federation/lib/DbHandler.php @@ -26,7 +26,6 @@ namespace OCA\Federation; - use OC\Files\Filesystem; use OC\HintException; use OCP\IDBConnection; diff --git a/apps/federation/lib/Hooks.php b/apps/federation/lib/Hooks.php index 2a1bce2b303..3f6a45422a7 100644 --- a/apps/federation/lib/Hooks.php +++ b/apps/federation/lib/Hooks.php @@ -22,8 +22,6 @@ namespace OCA\Federation; - - class Hooks { /** @var TrustedServers */ diff --git a/apps/federation/lib/SyncFederationAddressBooks.php b/apps/federation/lib/SyncFederationAddressBooks.php index 094d2c0cb0b..f0e3d2ba38b 100644 --- a/apps/federation/lib/SyncFederationAddressBooks.php +++ b/apps/federation/lib/SyncFederationAddressBooks.php @@ -78,7 +78,7 @@ class SyncFederationAddressBooks { $targetBookId = $trustedServer['url_hash']; $targetPrincipal = "principals/system/system"; $targetBookProperties = [ - '{DAV:}displayname' => $url + '{DAV:}displayname' => $url ]; try { $newToken = $this->syncService->syncRemoteAddressBook($url, $cardDavUser, $addressBookUrl, $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetBookProperties); diff --git a/apps/federation/lib/SyncJob.php b/apps/federation/lib/SyncJob.php index b98e159585c..24e4cc21497 100644 --- a/apps/federation/lib/SyncJob.php +++ b/apps/federation/lib/SyncJob.php @@ -48,7 +48,7 @@ class SyncJob extends TimedJob { } protected function run($argument) { - $this->syncService->syncThemAll(function($url, $ex) { + $this->syncService->syncThemAll(function ($url, $ex) { if ($ex instanceof \Exception) { $this->logger->logException($ex, [ 'message' => "Error while syncing $url.", diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php index d833b6ec607..ba84d718df6 100644 --- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php @@ -26,7 +26,6 @@ namespace OCA\Federation\Tests\BackgroundJob; - use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Ring\Exception\RingException; use OCA\Federation\BackgroundJob\GetSharedSecret; diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php index 25518cb6cdb..f35654b0895 100644 --- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php @@ -25,7 +25,6 @@ namespace OCA\Federation\Tests\BackgroundJob; - use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Ring\Exception\RingException; use OCA\Federation\BackgroundJob\RequestSharedSecret; diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php index 88cc9c617af..c8a79748534 100644 --- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php +++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php @@ -25,7 +25,6 @@ namespace OCA\Federation\Tests\Controller; - use OC\BackgroundJob\JobList; use OCA\Federation\Controller\OCSAuthAPIController; use OCA\Federation\DbHandler; diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index 16549ff16a6..48c9b91268a 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -23,7 +23,6 @@ namespace OCA\Federation\Tests\Controller; - use OCA\Federation\Controller\SettingsController; use OCA\Federation\TrustedServers; use OCP\AppFramework\Http\DataResponse; diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index 121e6b3cce6..9b747a772f4 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -25,7 +25,6 @@ namespace OCA\Federation\Tests; - use OCA\Federation\DbHandler; use OCA\Federation\TrustedServers; use OCP\IDBConnection; @@ -92,9 +91,9 @@ class DbHandlerTest extends TestCase { public function dataTestAddServer() { return [ - ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')], - ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')], - ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')], + ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')], + ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')], + ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')], ]; } diff --git a/apps/federation/tests/HooksTest.php b/apps/federation/tests/HooksTest.php index cb792391cbf..0bbf2bfb7ac 100644 --- a/apps/federation/tests/HooksTest.php +++ b/apps/federation/tests/HooksTest.php @@ -24,7 +24,6 @@ namespace OCA\Federation\Tests; - use OCA\Federation\Hooks; use OCA\Federation\TrustedServers; use Test\TestCase; diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php index 9d019794d25..a43ad557dae 100644 --- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php +++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php @@ -26,7 +26,6 @@ namespace OCA\Federation\Tests\Middleware; - use OC\HintException; use OCA\Federation\Controller\SettingsController; use OCA\Federation\Middleware\AddServerMiddleware; @@ -76,7 +75,7 @@ class AddServerMiddlewareTest extends TestCase { $this->l10n->expects($this->any())->method('t') ->willReturnCallback( - function($message) { + function ($message) { return $message; } ); diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php index 8cf02fce7d8..7e339d0f9f5 100644 --- a/apps/federation/tests/SyncFederationAddressbooksTest.php +++ b/apps/federation/tests/SyncFederationAddressbooksTest.php @@ -54,13 +54,13 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { getMock(); $dbHandler->method('getAllServer')-> willReturn([ - [ - 'url' => 'https://cloud.drop.box', - 'url_hash' => 'sha1', - 'shared_secret' => 'iloveowncloud', - 'sync_token' => '0' - ] - ]); + [ + 'url' => 'https://cloud.drop.box', + 'url_hash' => 'sha1', + 'shared_secret' => 'iloveowncloud', + 'sync_token' => '0' + ] + ]); $dbHandler->expects($this->once())->method('setServerStatus')-> with('https://cloud.drop.box', 1, '1'); $syncService = $this->getMockBuilder('OCA\DAV\CardDAV\SyncService') @@ -71,7 +71,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { /** @var \OCA\DAV\CardDAV\SyncService $syncService */ $s = new SyncFederationAddressBooks($dbHandler, $syncService, $this->discoveryService); - $s->syncThemAll(function($url, $ex) { + $s->syncThemAll(function ($url, $ex) { $this->callBacks[] = [$url, $ex]; }); $this->assertEquals(1, count($this->callBacks)); @@ -99,7 +99,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { /** @var \OCA\DAV\CardDAV\SyncService $syncService */ $s = new SyncFederationAddressBooks($dbHandler, $syncService, $this->discoveryService); - $s->syncThemAll(function($url, $ex) { + $s->syncThemAll(function ($url, $ex) { $this->callBacks[] = [$url, $ex]; }); $this->assertEquals(2, count($this->callBacks)); diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index 5c7dd772c86..59b1c577e75 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -26,7 +26,6 @@ namespace OCA\Federation\Tests; - use OCA\Federation\DbHandler; use OCA\Federation\TrustedServers; use OCP\AppFramework\Utility\ITimeFactory; @@ -217,7 +216,7 @@ class TrustedServersTest extends TestCase { ->willReturn($server); $this->dispatcher->expects($this->once())->method('dispatch') ->willReturnCallback( - function($eventId, $event) { + function ($eventId, $event) { $this->assertSame($eventId, 'OCP\Federation\TrustedServerEvent::remove'); $this->assertInstanceOf('Symfony\Component\EventDispatcher\GenericEvent', $event); /** @var \Symfony\Component\EventDispatcher\GenericEvent $event */ diff --git a/apps/files/l10n/pt_BR.js b/apps/files/l10n/pt_BR.js index cdddfc59ff7..c8b3ff75288 100644 --- a/apps/files/l10n/pt_BR.js +++ b/apps/files/l10n/pt_BR.js @@ -164,7 +164,7 @@ OC.L10N.register( "Unable to change the favourite state of the file" : "Não foi possível alterar o estado favorito do arquivo", "%s used" : "%s usado", "%s%% of %s used" : "%s%% usados de %s", - "%1$s of %2$s used" : "%1$s usado de %2$s", + "%1$s of %2$s used" : "%1$s usados de %2$s", "Settings" : "Configurações", "Show hidden files" : "Exibir arquivos ocultos", "WebDAV" : "WebDAV", diff --git a/apps/files/l10n/pt_BR.json b/apps/files/l10n/pt_BR.json index e8f61f5bdf9..ce7d107017c 100644 --- a/apps/files/l10n/pt_BR.json +++ b/apps/files/l10n/pt_BR.json @@ -162,7 +162,7 @@ "Unable to change the favourite state of the file" : "Não foi possível alterar o estado favorito do arquivo", "%s used" : "%s usado", "%s%% of %s used" : "%s%% usados de %s", - "%1$s of %2$s used" : "%1$s usado de %2$s", + "%1$s of %2$s used" : "%1$s usados de %2$s", "Settings" : "Configurações", "Show hidden files" : "Exibir arquivos ocultos", "WebDAV" : "WebDAV", diff --git a/apps/files/l10n/tr.js b/apps/files/l10n/tr.js index dc76ed9d455..389b7939f3b 100644 --- a/apps/files/l10n/tr.js +++ b/apps/files/l10n/tr.js @@ -168,6 +168,7 @@ OC.L10N.register( "Settings" : "Ayarlar", "Show hidden files" : "Gizli dosyaları görüntüle", "WebDAV" : "WebDAV", + "Use this address to access your Files via WebDAV" : "Dosyalarınıza WebDAV üzerinden erişmek için bu adresi kullanın", "Toggle grid view" : "Tablo görünümünü değiştir", "No files in here" : "Burada herhangi bir dosya yok", "Upload some content or sync with your devices!" : "Bir şeyler yükleyin ya da aygıtlarınızla eşitleyin!", diff --git a/apps/files/l10n/tr.json b/apps/files/l10n/tr.json index 43359118448..15182ef5ca4 100644 --- a/apps/files/l10n/tr.json +++ b/apps/files/l10n/tr.json @@ -166,6 +166,7 @@ "Settings" : "Ayarlar", "Show hidden files" : "Gizli dosyaları görüntüle", "WebDAV" : "WebDAV", + "Use this address to access your Files via WebDAV" : "Dosyalarınıza WebDAV üzerinden erişmek için bu adresi kullanın", "Toggle grid view" : "Tablo görünümünü değiştir", "No files in here" : "Burada herhangi bir dosya yok", "Upload some content or sync with your devices!" : "Bir şeyler yükleyin ya da aygıtlarınızla eşitleyin!", diff --git a/apps/files/lib/Activity/Filter/Favorites.php b/apps/files/lib/Activity/Filter/Favorites.php index 2e8192341a1..e33c404b6de 100644 --- a/apps/files/lib/Activity/Filter/Favorites.php +++ b/apps/files/lib/Activity/Filter/Favorites.php @@ -23,7 +23,6 @@ namespace OCA\Files\Activity\Filter; - use OCA\Files\Activity\Helper; use OCP\Activity\IFilter; use OCP\Activity\IManager; diff --git a/apps/files/lib/Activity/Filter/FileChanges.php b/apps/files/lib/Activity/Filter/FileChanges.php index f995b42a15a..14c98094a2c 100644 --- a/apps/files/lib/Activity/Filter/FileChanges.php +++ b/apps/files/lib/Activity/Filter/FileChanges.php @@ -24,7 +24,6 @@ namespace OCA\Files\Activity\Filter; - use OCP\Activity\IFilter; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/apps/files/lib/Activity/Settings/FavoriteAction.php b/apps/files/lib/Activity/Settings/FavoriteAction.php index fe1a8e707cc..9db53eada8e 100644 --- a/apps/files/lib/Activity/Settings/FavoriteAction.php +++ b/apps/files/lib/Activity/Settings/FavoriteAction.php @@ -23,7 +23,6 @@ namespace OCA\Files\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files/lib/Activity/Settings/FileChanged.php b/apps/files/lib/Activity/Settings/FileChanged.php index 77e1109eb36..503201bd129 100644 --- a/apps/files/lib/Activity/Settings/FileChanged.php +++ b/apps/files/lib/Activity/Settings/FileChanged.php @@ -23,7 +23,6 @@ namespace OCA\Files\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files/lib/Activity/Settings/FileCreated.php b/apps/files/lib/Activity/Settings/FileCreated.php index c726ff670fa..481c719d024 100644 --- a/apps/files/lib/Activity/Settings/FileCreated.php +++ b/apps/files/lib/Activity/Settings/FileCreated.php @@ -23,7 +23,6 @@ namespace OCA\Files\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files/lib/Activity/Settings/FileDeleted.php b/apps/files/lib/Activity/Settings/FileDeleted.php index 6e05ce9e00b..d4e56b6c717 100644 --- a/apps/files/lib/Activity/Settings/FileDeleted.php +++ b/apps/files/lib/Activity/Settings/FileDeleted.php @@ -23,7 +23,6 @@ namespace OCA\Files\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files/lib/Activity/Settings/FileFavorite.php b/apps/files/lib/Activity/Settings/FileFavorite.php index cc51d8d0961..ac62242f703 100644 --- a/apps/files/lib/Activity/Settings/FileFavorite.php +++ b/apps/files/lib/Activity/Settings/FileFavorite.php @@ -23,7 +23,6 @@ namespace OCA\Files\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files/lib/Activity/Settings/FileRestored.php b/apps/files/lib/Activity/Settings/FileRestored.php index 54d0600c6ce..59b722ddf85 100644 --- a/apps/files/lib/Activity/Settings/FileRestored.php +++ b/apps/files/lib/Activity/Settings/FileRestored.php @@ -23,7 +23,6 @@ namespace OCA\Files\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php index b043cfeb6ac..dd7ea19ba4a 100644 --- a/apps/files/lib/AppInfo/Application.php +++ b/apps/files/lib/AppInfo/Application.php @@ -74,7 +74,7 @@ class Application extends App { /** * Services */ - $container->registerService('TagService', function(IContainer $c) use ($server) { + $container->registerService('TagService', function (IContainer $c) use ($server) { $homeFolder = $c->query('ServerContainer')->getUserFolder(); return new TagService( $c->query('ServerContainer')->getUserSession(), diff --git a/apps/files/lib/Collaboration/Resources/Listener.php b/apps/files/lib/Collaboration/Resources/Listener.php index 8bc45996e20..6133504bf5d 100644 --- a/apps/files/lib/Collaboration/Resources/Listener.php +++ b/apps/files/lib/Collaboration/Resources/Listener.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCA\Files\Collaboration\Resources; - use OCP\Collaboration\Resources\IManager; use Symfony\Component\EventDispatcher\EventDispatcherInterface; diff --git a/apps/files/lib/Collaboration/Resources/ResourceProvider.php b/apps/files/lib/Collaboration/Resources/ResourceProvider.php index 409361acb30..d747253f8ff 100644 --- a/apps/files/lib/Collaboration/Resources/ResourceProvider.php +++ b/apps/files/lib/Collaboration/Resources/ResourceProvider.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCA\Files\Collaboration\Resources; - use OCP\Collaboration\Resources\IProvider; use OCP\Collaboration\Resources\IResource; use OCP\Collaboration\Resources\ResourceException; diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index 38d4b1cc979..f628ed2e0e0 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -173,7 +173,7 @@ class Scan extends Base { $inputPath = $input->getOption('path'); if ($inputPath) { $inputPath = '/' . trim($inputPath, '/'); - list (, $user,) = explode('/', $inputPath, 3); + list(, $user,) = explode('/', $inputPath, 3); $users = [$user]; } else if ($input->getOption('all')) { $users = $this->userManager->search(''); diff --git a/apps/files/lib/Controller/DirectEditingController.php b/apps/files/lib/Controller/DirectEditingController.php index ccef73b6a06..b29316aff32 100644 --- a/apps/files/lib/Controller/DirectEditingController.php +++ b/apps/files/lib/Controller/DirectEditingController.php @@ -23,7 +23,6 @@ namespace OCA\Files\Controller; - use Exception; use OCA\Files\Service\DirectEditingService; use OCP\AppFramework\Http; diff --git a/apps/files/lib/Controller/DirectEditingViewController.php b/apps/files/lib/Controller/DirectEditingViewController.php index af7c3cde035..75b6dfe7395 100644 --- a/apps/files/lib/Controller/DirectEditingViewController.php +++ b/apps/files/lib/Controller/DirectEditingViewController.php @@ -23,7 +23,6 @@ namespace OCA\Files\Controller; - use Exception; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\NotFoundResponse; diff --git a/apps/files/lib/Notification/Notifier.php b/apps/files/lib/Notification/Notifier.php index 529eb7cbc77..0ce5287b110 100644 --- a/apps/files/lib/Notification/Notifier.php +++ b/apps/files/lib/Notification/Notifier.php @@ -32,6 +32,8 @@ use OCA\Files\Db\TransferOwnershipMapper; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IURLGenerator; +use OCP\IUser; +use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\Notification\IAction; use OCP\Notification\IDismissableNotifier; @@ -50,22 +52,22 @@ class Notifier implements INotifier, IDismissableNotifier { private $mapper; /** @var IManager */ private $notificationManager; + /** @var IUserManager */ + private $userManager; /** @var ITimeFactory */ private $timeFactory; - /** - * @param IFactory $l10nFactory - * @param IURLGenerator $urlGenerator - */ public function __construct(IFactory $l10nFactory, IURLGenerator $urlGenerator, TransferOwnershipMapper $mapper, IManager $notificationManager, + IUserManager $userManager, ITimeFactory $timeFactory) { $this->l10nFactory = $l10nFactory; $this->urlGenerator = $urlGenerator; $this->mapper = $mapper; $this->notificationManager = $notificationManager; + $this->userManager = $userManager; $this->timeFactory = $timeFactory; } @@ -138,6 +140,7 @@ class Notifier implements INotifier, IDismissableNotifier { IAction::TYPE_DELETE ); + $sourceUser = $this->getUser($param['sourceUser']); $notification->addParsedAction($approveAction) ->addParsedAction($disapproveAction) ->setRichSubject( @@ -145,11 +148,11 @@ class Notifier implements INotifier, IDismissableNotifier { [ 'user' => [ 'type' => 'user', - 'id' => $param['sourceUser'], - 'name' => $param['sourceUser'], + 'id' => $sourceUser->getUID(), + 'name' => $sourceUser->getDisplayName(), ], ]) - ->setParsedSubject(str_replace('{user}', $param['sourceUser'], $l->t('Incoming ownership transfer from {user}'))) + ->setParsedSubject(str_replace('{user}', $sourceUser->getDisplayName(), $l->t('Incoming ownership transfer from {user}'))) ->setRichMessage( $l->t("Do you want to accept {path}?\n\nNote: The transfer process after accepting may take up to 1 hour."), [ @@ -168,6 +171,7 @@ class Notifier implements INotifier, IDismissableNotifier { $l = $this->l10nFactory->get('files', $languageCode); $param = $notification->getSubjectParameters(); + $targetUser = $this->getUser($param['targetUser']); $notification->setRichSubject($l->t('Ownership transfer failed')) ->setParsedSubject($l->t('Ownership transfer failed')) @@ -181,11 +185,11 @@ class Notifier implements INotifier, IDismissableNotifier { ], 'user' => [ 'type' => 'user', - 'id' => $param['targetUser'], - 'name' => $param['targetUser'], + 'id' => $targetUser->getUID(), + 'name' => $targetUser->getDisplayName(), ], ]) - ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['targetUser']], $l->t('Your ownership transfer of {path} to {user} failed.'))); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $targetUser->getDisplayName()], $l->t('Your ownership transfer of {path} to {user} failed.'))); return $notification; } @@ -193,6 +197,7 @@ class Notifier implements INotifier, IDismissableNotifier { $l = $this->l10nFactory->get('files', $languageCode); $param = $notification->getSubjectParameters(); + $sourceUser = $this->getUser($param['sourceUser']); $notification->setRichSubject($l->t('Ownership transfer failed')) ->setParsedSubject($l->t('Ownership transfer failed')) @@ -206,11 +211,11 @@ class Notifier implements INotifier, IDismissableNotifier { ], 'user' => [ 'type' => 'user', - 'id' => $param['sourceUser'], - 'name' => $param['sourceUser'], + 'id' => $sourceUser->getUID(), + 'name' => $sourceUser->getDisplayName(), ], ]) - ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['sourceUser']], $l->t('The ownership transfer of {path} from {user} failed.'))); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $sourceUser->getDisplayName()], $l->t('The ownership transfer of {path} from {user} failed.'))); return $notification; } @@ -219,6 +224,7 @@ class Notifier implements INotifier, IDismissableNotifier { $l = $this->l10nFactory->get('files', $languageCode); $param = $notification->getSubjectParameters(); + $targetUser = $this->getUser($param['targetUser']); $notification->setRichSubject($l->t('Ownership transfer done')) ->setParsedSubject($l->t('Ownership transfer done')) @@ -232,11 +238,11 @@ class Notifier implements INotifier, IDismissableNotifier { ], 'user' => [ 'type' => 'user', - 'id' => $param['targetUser'], - 'name' => $param['targetUser'], + 'id' => $targetUser->getUID(), + 'name' => $targetUser->getDisplayName(), ], ]) - ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['targetUser']], $l->t('Your ownership transfer of {path} to {user} has completed.'))); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $targetUser->getDisplayName()], $l->t('Your ownership transfer of {path} to {user} has completed.'))); return $notification; } @@ -245,6 +251,7 @@ class Notifier implements INotifier, IDismissableNotifier { $l = $this->l10nFactory->get('files', $languageCode); $param = $notification->getSubjectParameters(); + $sourceUser = $this->getUser($param['sourceUser']); $notification->setRichSubject($l->t('Ownership transfer done')) ->setParsedSubject($l->t('Ownership transfer done')) @@ -258,11 +265,11 @@ class Notifier implements INotifier, IDismissableNotifier { ], 'user' => [ 'type' => 'user', - 'id' => $param['sourceUser'], - 'name' => $param['sourceUser'], + 'id' => $sourceUser->getUID(), + 'name' => $sourceUser->getDisplayName(), ], ]) - ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['sourceUser']], $l->t('The ownership transfer of {path} from {user} has completed.'))); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $sourceUser->getDisplayName()], $l->t('The ownership transfer of {path} from {user} has completed.'))); return $notification; } @@ -293,4 +300,12 @@ class Notifier implements INotifier, IDismissableNotifier { $this->mapper->delete($transferOwnership); } + + protected function getUser(string $userId): IUser { + $user = $this->userManager->get($userId); + if ($user instanceof IUser) { + return $user; + } + throw new \InvalidArgumentException('User not found'); + } } diff --git a/apps/files/lib/Service/DirectEditingService.php b/apps/files/lib/Service/DirectEditingService.php index e375f3c9b0a..c33fbe5d883 100644 --- a/apps/files/lib/Service/DirectEditingService.php +++ b/apps/files/lib/Service/DirectEditingService.php @@ -24,7 +24,6 @@ namespace OCA\Files\Service; - use OCP\DirectEditing\ACreateEmpty; use OCP\DirectEditing\ACreateFromTemplate; use OCP\DirectEditing\IEditor; diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index e1b26c6449e..3415a2fd9e7 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -36,6 +36,7 @@ use OCA\Files\Exception\TransferOwnershipException; use OCP\Encryption\IManager as IEncryptionManager; use OCP\Files\FileInfo; use OCP\Files\IHomeStorage; +use OCP\Files\InvalidPathException; use OCP\Files\Mount\IMountManager; use OCP\IUser; use OCP\Share\IManager as IShareManager; @@ -94,18 +95,31 @@ class OwnershipTransferService { throw new TransferOwnershipException("The target user is not ready to accept files. The user has at least to have logged in once.", 2); } + // setup filesystem + Filesystem::initMountPoints($sourceUid); + Filesystem::initMountPoints($destinationUid); + + $view = new View(); + if ($move) { $finalTarget = "$destinationUid/files/"; } else { $date = date('Y-m-d H-i-s'); - $finalTarget = "$destinationUid/files/transferred from $sourceUid on $date"; - } - // setup filesystem - Filesystem::initMountPoints($sourceUid); - Filesystem::initMountPoints($destinationUid); + // Remove some characters which are prone to cause errors + $cleanUserName = str_replace(['\\', '/', ':', '.', '?', '#', '\'', '"'], '-', $sourceUser->getDisplayName()); + // Replace multiple dashes with one dash + $cleanUserName = preg_replace('/-{2,}/s', '-', $cleanUserName); + $cleanUserName = $cleanUserName ?: $sourceUid; + + $finalTarget = "$destinationUid/files/transferred from $cleanUserName on $date"; + try { + $view->verifyPath(dirname($finalTarget), basename($finalTarget)); + } catch (InvalidPathException $e) { + $finalTarget = "$destinationUid/files/transferred from $sourceUid on $date"; + } + } - $view = new View(); if (!($view->is_dir($sourcePath) || $view->is_file($sourcePath))) { throw new TransferOwnershipException("Unknown path provided: $path", 1); } diff --git a/apps/files/list.php b/apps/files/list.php index 7d7fc7f105e..e4713ae2960 100644 --- a/apps/files/list.php +++ b/apps/files/list.php @@ -37,4 +37,3 @@ $tmpl = new OCP\Template('files', 'list', ''); $tmpl->assign('showgridview', $showgridview && !$isIE); $tmpl->assign('publicUploadEnabled', $publicUploadEnabled); $tmpl->printPage(); - diff --git a/apps/files/simplelist.php b/apps/files/simplelist.php index 7bb6fb34558..eebb5beb51f 100644 --- a/apps/files/simplelist.php +++ b/apps/files/simplelist.php @@ -35,4 +35,3 @@ $tmpl = new OCP\Template('files', 'simplelist', ''); // gridview not available for ie $tmpl->assign('showgridview', $showgridview && !$isIE); $tmpl->printPage(); - diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 697a0a9cf44..ff23c1aee95 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -44,7 +44,7 @@ <th id='headerName' class="hidden column-name"> <div id="headerName-container"> <a class="name sort columntitle" data-sort="name"> - <span><?php p($l->t( 'Name' )); ?></span> + <span><?php p($l->t('Name')); ?></span> <span class="sort-indicator"></span> </a> @@ -60,7 +60,7 @@ <a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> </th> </tr> </thead> diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php index 9fd9c49c9c3..ee07cd0955c 100644 --- a/apps/files/templates/simplelist.php +++ b/apps/files/templates/simplelist.php @@ -18,14 +18,14 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerSize" class="hidden column-size"> <a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> <span class="selectedActions"> <a href="" class="delete-selected"> <img class="svg" alt="" diff --git a/apps/files/tests/Activity/Filter/GenericTest.php b/apps/files/tests/Activity/Filter/GenericTest.php index 46b977bb27f..89169a0e85c 100644 --- a/apps/files/tests/Activity/Filter/GenericTest.php +++ b/apps/files/tests/Activity/Filter/GenericTest.php @@ -24,7 +24,6 @@ namespace OCA\Files\Tests\Activity\Filter; - use OCA\Files\Activity\Filter\Favorites; use OCA\Files\Activity\Filter\FileChanges; use OCP\Activity\IFilter; diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php index 5e4b18c0bb1..4521dea33ce 100644 --- a/apps/files/tests/Activity/ProviderTest.php +++ b/apps/files/tests/Activity/ProviderTest.php @@ -24,7 +24,6 @@ namespace OCA\Files\Tests\Activity; - use OCA\Files\Activity\Provider; use OCP\Activity\IEvent; use OCP\Activity\IEventMerger; diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index f2220e6276d..b236f753adb 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -52,8 +52,8 @@ class ScanFilesTest extends TestCase { $this->scanFiles = $this->getMockBuilder('\OCA\Files\BackgroundJob\ScanFiles') ->setConstructorArgs([ - $this->config, - $this->userManager, + $this->config, + $this->userManager, ]) ->setMethods(['runScanner']) ->getMock(); @@ -105,7 +105,7 @@ class ScanFilesTest extends TestCase { ->method('search') ->with('', 500, 50) ->willReturn([ - $fakeUser + $fakeUser ]); $this->config ->expects($this->at(2)) diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index 8f2f8fe9ec1..c00f30c890a 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -99,17 +99,17 @@ class ViewControllerTest extends TestCase { $this->activityHelper = $this->createMock(Helper::class); $this->viewController = $this->getMockBuilder('\OCA\Files\Controller\ViewController') ->setConstructorArgs([ - 'files', - $this->request, - $this->urlGenerator, - $this->l10n, - $this->config, - $this->eventDispatcher, - $this->userSession, - $this->appManager, - $this->rootFolder, - $this->activityHelper, - ]) + 'files', + $this->request, + $this->urlGenerator, + $this->l10n, + $this->config, + $this->eventDispatcher, + $this->userSession, + $this->appManager, + $this->rootFolder, + $this->activityHelper, + ]) ->setMethods([ 'getStorageInfo', 'renderScript' @@ -262,14 +262,14 @@ class ViewControllerTest extends TestCase { 'classes' => 'collapsible', 'sublist' => [ [ - 'id' => 'sharingout', + 'id' => 'sharingout', 'appname' => 'files_sharing', 'script' => 'list.php', 'order' => 16, 'name' => \OC::$server->getL10N('files_sharing')->t('Shared with others'), ], [ - 'id' => 'sharingin', + 'id' => 'sharingin', 'appname' => 'files_sharing', 'script' => 'list.php', 'order' => 15, diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json index 9cf429eb5c2..0ee0c268bb0 100644 --- a/apps/files_external/3rdparty/composer.json +++ b/apps/files_external/3rdparty/composer.json @@ -9,6 +9,6 @@ }, "require": { "icewind/streams": "0.7.1", - "icewind/smb": "3.2.1" + "icewind/smb": "3.2.3" } } diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock index c486854d6a9..e0716141c5f 100644 --- a/apps/files_external/3rdparty/composer.lock +++ b/apps/files_external/3rdparty/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "adc3b3531ee8503b485092e60c569b42", + "content-hash": "ef0d9929f5f25696e010d5733eb51fbb", "packages": [ { "name": "icewind/smb", - "version": "v3.2.1", + "version": "v3.2.3", "source": { "type": "git", "url": "https://github.com/icewind1991/SMB.git", - "reference": "5330edcc579a2dcc4759b8e5779eb5aa3385a878" + "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/5330edcc579a2dcc4759b8e5779eb5aa3385a878", - "reference": "5330edcc579a2dcc4759b8e5779eb5aa3385a878", + "url": "https://api.github.com/repos/icewind1991/SMB/zipball/db50bb51bd0a0e55506e82cf439a9ecd232f64d4", + "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4", "shasum": "" }, "require": { @@ -46,7 +46,7 @@ } ], "description": "php wrapper for smbclient and libsmbclient-php", - "time": "2020-03-24T18:19:18+00:00" + "time": "2020-04-08T15:20:22+00:00" }, { "name": "icewind/streams", diff --git a/apps/files_external/3rdparty/composer/autoload_classmap.php b/apps/files_external/3rdparty/composer/autoload_classmap.php index 5b0c682cbce..a563765eb9b 100644 --- a/apps/files_external/3rdparty/composer/autoload_classmap.php +++ b/apps/files_external/3rdparty/composer/autoload_classmap.php @@ -16,8 +16,10 @@ return array( 'Icewind\\SMB\\Exception\\AlreadyExistsException' => $vendorDir . '/icewind/smb/src/Exception/AlreadyExistsException.php', 'Icewind\\SMB\\Exception\\AuthenticationException' => $vendorDir . '/icewind/smb/src/Exception/AuthenticationException.php', 'Icewind\\SMB\\Exception\\ConnectException' => $vendorDir . '/icewind/smb/src/Exception/ConnectException.php', + 'Icewind\\SMB\\Exception\\ConnectionAbortedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionAbortedException.php', 'Icewind\\SMB\\Exception\\ConnectionException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionException.php', 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionRefusedException.php', + 'Icewind\\SMB\\Exception\\ConnectionResetException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionResetException.php', 'Icewind\\SMB\\Exception\\DependencyException' => $vendorDir . '/icewind/smb/src/Exception/DependencyException.php', 'Icewind\\SMB\\Exception\\Exception' => $vendorDir . '/icewind/smb/src/Exception/Exception.php', 'Icewind\\SMB\\Exception\\FileInUseException' => $vendorDir . '/icewind/smb/src/Exception/FileInUseException.php', diff --git a/apps/files_external/3rdparty/composer/autoload_static.php b/apps/files_external/3rdparty/composer/autoload_static.php index b8eb6ebbfe8..fc6e68f8be4 100644 --- a/apps/files_external/3rdparty/composer/autoload_static.php +++ b/apps/files_external/3rdparty/composer/autoload_static.php @@ -46,8 +46,10 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3 'Icewind\\SMB\\Exception\\AlreadyExistsException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AlreadyExistsException.php', 'Icewind\\SMB\\Exception\\AuthenticationException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AuthenticationException.php', 'Icewind\\SMB\\Exception\\ConnectException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectException.php', + 'Icewind\\SMB\\Exception\\ConnectionAbortedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionAbortedException.php', 'Icewind\\SMB\\Exception\\ConnectionException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionException.php', 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionRefusedException.php', + 'Icewind\\SMB\\Exception\\ConnectionResetException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionResetException.php', 'Icewind\\SMB\\Exception\\DependencyException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/DependencyException.php', 'Icewind\\SMB\\Exception\\Exception' => __DIR__ . '/..' . '/icewind/smb/src/Exception/Exception.php', 'Icewind\\SMB\\Exception\\FileInUseException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/FileInUseException.php', diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json index e3609f5af4e..e2b841f206a 100644 --- a/apps/files_external/3rdparty/composer/installed.json +++ b/apps/files_external/3rdparty/composer/installed.json @@ -1,17 +1,17 @@ [ { "name": "icewind/smb", - "version": "v3.2.1", - "version_normalized": "3.2.1.0", + "version": "v3.2.3", + "version_normalized": "3.2.3.0", "source": { "type": "git", "url": "https://github.com/icewind1991/SMB.git", - "reference": "5330edcc579a2dcc4759b8e5779eb5aa3385a878" + "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/5330edcc579a2dcc4759b8e5779eb5aa3385a878", - "reference": "5330edcc579a2dcc4759b8e5779eb5aa3385a878", + "url": "https://api.github.com/repos/icewind1991/SMB/zipball/db50bb51bd0a0e55506e82cf439a9ecd232f64d4", + "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4", "shasum": "" }, "require": { @@ -22,7 +22,7 @@ "friendsofphp/php-cs-fixer": "^2.13", "phpunit/phpunit": "^7.0" }, - "time": "2020-03-24T18:19:18+00:00", + "time": "2020-04-08T15:20:22+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionAbortedException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionAbortedException.php new file mode 100644 index 00000000000..59363ca7ba9 --- /dev/null +++ b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionAbortedException.php @@ -0,0 +1,11 @@ +<?php +/** + * Copyright (c) 2020 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Licensed under the MIT license: + * http://opensource.org/licenses/MIT + */ + +namespace Icewind\SMB\Exception; + +class ConnectionAbortedException extends ConnectException { +} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionResetException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionResetException.php new file mode 100644 index 00000000000..d5ac10d32dc --- /dev/null +++ b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionResetException.php @@ -0,0 +1,11 @@ +<?php +/** + * Copyright (c) 2020 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Licensed under the MIT license: + * http://opensource.org/licenses/MIT + */ + +namespace Icewind\SMB\Exception; + +class ConnectionResetException extends ConnectException { +} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php index 26e7adb019d..e829be28bf0 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php @@ -197,12 +197,14 @@ class NativeShare extends AbstractShare { */ public function put($source, $target) { $sourceHandle = fopen($source, 'rb'); - $targetHandle = $this->getState()->create($this->buildUrl($target)); + $targetUrl = $this->buildUrl($target); + + $targetHandle = $this->getState()->create($targetUrl); while ($data = fread($sourceHandle, NativeReadStream::CHUNK_SIZE)) { - $this->getState()->write($targetHandle, $data); + $this->getState()->write($targetHandle, $data, $targetUrl); } - $this->getState()->close($targetHandle); + $this->getState()->close($targetHandle, $targetUrl); return true; } @@ -236,14 +238,14 @@ class NativeShare extends AbstractShare { } else { $reason = 'Unknown error'; } - $this->getState()->close($sourceHandle); + $this->getState()->close($sourceHandle, $this->buildUrl($source)); throw new InvalidResourceException('Failed opening local file "' . $target . '" for writing: ' . $reason); } while ($data = $this->getState()->read($sourceHandle, NativeReadStream::CHUNK_SIZE)) { fwrite($targetHandle, $data); } - $this->getState()->close($sourceHandle); + $this->getState()->close($sourceHandle, $this->buildUrl($source)); return true; } diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php index 0792b2f9d7f..3bfb1c3da24 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php @@ -16,6 +16,7 @@ use Icewind\SMB\Exception\ForbiddenException; use Icewind\SMB\Exception\HostDownException; use Icewind\SMB\Exception\InvalidArgumentException; use Icewind\SMB\Exception\InvalidTypeException; +use Icewind\SMB\Exception\ConnectionAbortedException; use Icewind\SMB\Exception\NoRouteToHostException; use Icewind\SMB\Exception\NotEmptyException; use Icewind\SMB\Exception\NotFoundException; @@ -49,6 +50,7 @@ class NativeState { 22 => InvalidArgumentException::class, 28 => OutOfSpaceException::class, 39 => NotEmptyException::class, + 103 => ConnectionAbortedException::class, 104 => ConnectionResetException::class, 110 => TimedOutException::class, 111 => ConnectionRefusedException::class, @@ -238,13 +240,14 @@ class NativeState { /** * @param resource $file * @param string $data + * @param string $path * @param int $length * @return int */ - public function write($file, $data, $length = null) { + public function write($file, $data, $path, $length = null) { $result = @smbclient_write($this->state, $file, $data, $length); - $this->testResult($result, $file); + $this->testResult($result, $path); return $result; } @@ -273,10 +276,10 @@ class NativeState { return $result; } - public function close($file) { + public function close($file, $path) { $result = @smbclient_close($this->state, $file); - $this->testResult($result, $file); + $this->testResult($result, $path); return $result; } diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php index dd92edcbf5e..c75afaa5f1d 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php @@ -61,7 +61,11 @@ class NativeStream implements File { } public function stream_close() { - return $this->state->close($this->handle); + try { + return $this->state->close($this->handle, $this->url); + } catch (\Exception $e) { + return false; + } } public function stream_eof() { @@ -110,7 +114,7 @@ class NativeStream implements File { } public function stream_write($data) { - return $this->state->write($this->handle, $data); + return $this->state->write($this->handle, $data, $this->url); } public function stream_truncate($size) { diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php index 39eca8175a9..4e90e5a655d 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php @@ -61,7 +61,7 @@ class NativeWriteStream extends NativeStream { private function flushWrite() { rewind($this->writeBuffer); - $this->state->write($this->handle, stream_get_contents($this->writeBuffer)); + $this->state->write($this->handle, stream_get_contents($this->writeBuffer), $this->url); $this->writeBuffer = fopen('php://memory', 'r+'); $this->bufferSize = 0; } @@ -79,8 +79,13 @@ class NativeWriteStream extends NativeStream { } public function stream_close() { - $this->flushWrite(); - return parent::stream_close(); + try { + $this->flushWrite(); + $flushResult = true; + } catch (\Exception $e) { + $flushResult = false; + } + return parent::stream_close() && $flushResult; } public function stream_tell() { diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php index 18ee5c1db97..e0df1f60326 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php @@ -14,11 +14,14 @@ use Icewind\SMB\Exception\DependencyException; use Icewind\SMB\Exception\FileInUseException; use Icewind\SMB\Exception\InvalidTypeException; use Icewind\SMB\Exception\NotFoundException; +use Icewind\SMB\Exception\InvalidRequestException; use Icewind\SMB\IFileInfo; use Icewind\SMB\INotifyHandler; use Icewind\SMB\IServer; use Icewind\SMB\ISystem; use Icewind\Streams\CallbackWrapper; +use Icewind\SMB\Native\NativeShare; +use Icewind\SMB\Native\NativeServer; class Share extends AbstractShare { /** diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index 18b459b28e6..b48f6891947 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -84,7 +84,7 @@ OC.L10N.register( "Amazon S3" : "Amazon S3", "Bucket" : "Cesta", "Hostname" : "Nome do Host", - "Port" : "Porto", + "Port" : "Porta", "Region" : "Região", "Enable SSL" : "Ativar SSL", "Enable Path Style" : "Ativar Estilo do Caminho", diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index 65503896f35..6386eab75d8 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -82,7 +82,7 @@ "Amazon S3" : "Amazon S3", "Bucket" : "Cesta", "Hostname" : "Nome do Host", - "Port" : "Porto", + "Port" : "Porta", "Region" : "Região", "Enable SSL" : "Ativar SSL", "Enable Path Style" : "Ativar Estilo do Caminho", diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php index 47f52fbcb87..cc587dcd80f 100644 --- a/apps/files_external/lib/AppInfo/Application.php +++ b/apps/files_external/lib/AppInfo/Application.php @@ -85,7 +85,7 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide $backendService = $container->query(BackendService::class); $backendService->registerBackendProvider($this); $backendService->registerAuthMechanismProvider($this); - $backendService->registerConfigHandler('user', function() use ($container) { + $backendService->registerConfigHandler('user', function () use ($container) { return $container->query(UserPlaceholderHandler::class); }); diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index c7fd63c5e43..f58b1561e68 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -93,8 +93,8 @@ class Config extends Base { $value = $mount->getBackendOption($key); } if (!is_string($value) && json_decode(json_encode($value)) === $value) { // show bools and objects correctly - $value = json_encode($value); - } + $value = json_encode($value); + } $output->writeln($value); } @@ -106,9 +106,9 @@ class Config extends Base { */ protected function setOption(StorageConfig $mount, $key, $value, OutputInterface $output) { $decoded = json_decode($value, true); - if (!is_null($decoded) && json_encode($decoded) === $value) { - $value = $decoded; - } + if (!is_null($decoded) && json_encode($decoded) === $value) { + $value = $decoded; + } if ($key === 'mountpoint' || $key === 'mount_point') { $mount->setMountPoint($value); } else { diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index 8c0ed41005a..84966b4ee7b 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -208,7 +208,7 @@ class Notify extends Base { /** * @param int $mountId * @return array - */ + */ private function getStorageIds($mountId) { $qb = $this->connection->getQueryBuilder(); return $qb @@ -223,7 +223,7 @@ class Notify extends Base { * @param array $storageIds * @param string $parent * @return int - */ + */ private function updateParent($storageIds, $parent) { $pathHash = md5(trim(\OC_Util::normalizeUnicode($parent), '/')); $qb = $this->connection->getQueryBuilder(); @@ -237,7 +237,7 @@ class Notify extends Base { /** * @return \OCP\IDBConnection - */ + */ private function reconnectToDatabase(IDBConnection $connection, OutputInterface $output) { try { $connection->close(); diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php index 0d11fbb02ee..8f1cac49c69 100644 --- a/apps/files_external/lib/Config/ConfigAdapter.php +++ b/apps/files_external/lib/Config/ConfigAdapter.php @@ -127,7 +127,7 @@ class ConfigAdapter implements IMountProvider { $storageConfigs = $this->userGlobalStoragesService->getAllStoragesForUser(); - $storages = array_map(function(StorageConfig $storageConfig) use ($user) { + $storages = array_map(function (StorageConfig $storageConfig) use ($user) { try { $this->prepareStorageConfig($storageConfig, $user); return $this->constructStorage($storageConfig); @@ -138,7 +138,7 @@ class ConfigAdapter implements IMountProvider { }, $storageConfigs); - \OC\Files\Cache\Storage::getGlobalCache()->loadForStorageIds(array_map(function(Storage\IStorage $storage) { + \OC\Files\Cache\Storage::getGlobalCache()->loadForStorageIds(array_map(function (Storage\IStorage $storage) { return $storage->getId(); }, $storages)); @@ -157,7 +157,7 @@ class ConfigAdapter implements IMountProvider { return $storage; }, $storages, $storageConfigs); - $mounts = array_map(function(StorageConfig $storageConfig, Storage\IStorage $storage) use ($user, $loader) { + $mounts = array_map(function (StorageConfig $storageConfig, Storage\IStorage $storage) use ($user, $loader) { if ($storageConfig->getType() === StorageConfig::MOUNT_TYPE_PERSONAl) { return new PersonalMount( $this->userStoragesService, diff --git a/apps/files_external/lib/Controller/AjaxController.php b/apps/files_external/lib/Controller/AjaxController.php index b864ff451b6..a200b581c39 100644 --- a/apps/files_external/lib/Controller/AjaxController.php +++ b/apps/files_external/lib/Controller/AjaxController.php @@ -93,8 +93,8 @@ class AjaxController extends Controller { 'private_key' => $key['privatekey'], 'public_key' => $key['publickey'] ], - 'status' => 'success' - ]); + 'status' => 'success' + ]); } /** diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php index 4f4b42e96b9..398399d820d 100644 --- a/apps/files_external/lib/Controller/GlobalStoragesController.php +++ b/apps/files_external/lib/Controller/GlobalStoragesController.php @@ -28,7 +28,6 @@ namespace OCA\Files_External\Controller; - use OCA\Files_External\NotFoundException; use OCA\Files_External\Service\GlobalStoragesService; use OCP\AppFramework\Http; diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index 8b1b0cb7a6c..d087a5e3900 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -28,7 +28,6 @@ namespace OCA\Files_External\Controller; - use OCA\Files_External\Lib\Auth\AuthMechanism; use OCA\Files_External\Lib\Backend\Backend; use OCA\Files_External\Lib\DefinitionParameter; diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php index 87c6d7ef6d8..787e7affaf5 100644 --- a/apps/files_external/lib/Controller/UserStoragesController.php +++ b/apps/files_external/lib/Controller/UserStoragesController.php @@ -28,7 +28,6 @@ namespace OCA\Files_External\Controller; - use OCA\Files_External\Lib\Auth\AuthMechanism; use OCA\Files_External\Lib\Backend\Backend; use OCA\Files_External\Lib\StorageConfig; @@ -136,7 +135,7 @@ class UserStoragesController extends StoragesController { $backendOptions, $mountOptions ); - if ($newStorage instanceOf DataResponse) { + if ($newStorage instanceof DataResponse) { return $newStorage; } @@ -185,7 +184,7 @@ class UserStoragesController extends StoragesController { $backendOptions, $mountOptions ); - if ($storage instanceOf DataResponse) { + if ($storage instanceof DataResponse) { return $storage; } $storage->setId($id); diff --git a/apps/files_external/lib/Lib/Backend/Swift.php b/apps/files_external/lib/Lib/Backend/Swift.php index 86238b542b1..5d4d5ec1408 100644 --- a/apps/files_external/lib/Lib/Backend/Swift.php +++ b/apps/files_external/lib/Lib/Backend/Swift.php @@ -52,7 +52,7 @@ class Swift extends Backend { ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) ->addAuthScheme(AuthMechanism::SCHEME_OPENSTACK) - ->setLegacyAuthMechanismCallback(function(array $params) use ($openstackAuth, $rackspaceAuth) { + ->setLegacyAuthMechanismCallback(function (array $params) use ($openstackAuth, $rackspaceAuth) { if (isset($params['options']['key']) && $params['options']['key']) { return $rackspaceAuth; } diff --git a/apps/files_external/lib/Lib/FrontendDefinitionTrait.php b/apps/files_external/lib/Lib/FrontendDefinitionTrait.php index 58e2d5ffdcf..30e0f593621 100644 --- a/apps/files_external/lib/Lib/FrontendDefinitionTrait.php +++ b/apps/files_external/lib/Lib/FrontendDefinitionTrait.php @@ -24,7 +24,6 @@ namespace OCA\Files_External\Lib; - /** * Trait for objects that have a frontend representation */ diff --git a/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php b/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php index d8d4e1dce1b..cf720b35a5b 100644 --- a/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php +++ b/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php @@ -22,7 +22,6 @@ namespace OCA\Files_External\Lib; - /** * Polyfill for checking dependencies using legacy Storage::checkDependencies() */ diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index 96e557f48ff..0015f3008ef 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -56,7 +56,7 @@ class FTP extends StreamWrapper{ $this->secure = false; } $this->root=isset($params['root'])?$params['root']:'/'; - if ( ! $this->root || $this->root[0]!=='/') { + if (! $this->root || $this->root[0]!=='/') { $this->root='/'.$this->root; } if (substr($this->root, -1) !== '/') { @@ -68,7 +68,7 @@ class FTP extends StreamWrapper{ } - public function getId(){ + public function getId() { return 'ftp::' . $this->user . '@' . $this->host . '/' . $this->root; } diff --git a/apps/files_external/lib/Lib/Storage/OwnCloud.php b/apps/files_external/lib/Lib/Storage/OwnCloud.php index a55918cedb7..966874e947a 100644 --- a/apps/files_external/lib/Lib/Storage/OwnCloud.php +++ b/apps/files_external/lib/Lib/Storage/OwnCloud.php @@ -27,6 +27,7 @@ */ namespace OCA\Files_External\Lib\Storage; + use OCP\Files\Storage\IDisableEncryptionStorage; use Sabre\DAV\Client; diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 180458b2b33..ee848889c39 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -36,14 +36,15 @@ */ namespace OCA\Files_External\Lib\Storage; + use Icewind\Streams\IteratorDirectory; use Icewind\Streams\RetryWrapper; use phpseclib\Net\SFTP\Stream; /** -* Uses phpseclib's Net\SFTP class and the Net\SFTP\Stream stream wrapper to -* provide access to SFTP servers. -*/ + * Uses phpseclib's Net\SFTP class and the Net\SFTP\Stream stream wrapper to + * provide access to SFTP servers. + */ class SFTP extends \OC\Files\Storage\Common { private $host; private $user; @@ -168,7 +169,7 @@ class SFTP extends \OC\Files\Storage\Common { /** * {@inheritdoc} */ - public function getId(){ + public function getId() { $id = 'sftp::' . $this->user . '@' . $this->host; if ($this->port !== 22) { $id .= ':' . $this->port; @@ -370,7 +371,7 @@ class SFTP extends \OC\Files\Storage\Common { switch($mode) { case 'r': case 'rb': - if ( !$this->file_exists($path)) { + if (!$this->file_exists($path)) { return false; } SFTPReadStream::register(); diff --git a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php index cb693f82f71..b5bc3ab667d 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php @@ -180,4 +180,3 @@ class SFTPWriteStream implements File { } } - diff --git a/apps/files_external/lib/Service/BackendService.php b/apps/files_external/lib/Service/BackendService.php index b3a2bb8241a..6c2ea72b840 100644 --- a/apps/files_external/lib/Service/BackendService.php +++ b/apps/files_external/lib/Service/BackendService.php @@ -216,7 +216,7 @@ class BackendService { * @return Backend[] */ public function getAvailableBackends() { - return array_filter($this->getBackends(), function($backend) { + return array_filter($this->getBackends(), function ($backend) { return !$backend->checkDependencies(); }); } @@ -255,7 +255,7 @@ class BackendService { * @return AuthMechanism[] */ public function getAuthMechanismsByScheme(array $schemes) { - return array_filter($this->getAuthMechanisms(), function($authMech) use ($schemes) { + return array_filter($this->getAuthMechanisms(), function ($authMech) use ($schemes) { return in_array($authMech->getScheme(), $schemes, true); }); } diff --git a/apps/files_external/lib/Service/GlobalStoragesService.php b/apps/files_external/lib/Service/GlobalStoragesService.php index ad148b19209..95a7c47665d 100644 --- a/apps/files_external/lib/Service/GlobalStoragesService.php +++ b/apps/files_external/lib/Service/GlobalStoragesService.php @@ -28,7 +28,6 @@ namespace OCA\Files_External\Service; - use OC\Files\Filesystem; use OCA\Files_External\Lib\StorageConfig; diff --git a/apps/files_external/lib/Settings/PersonalSection.php b/apps/files_external/lib/Settings/PersonalSection.php index 72435349e59..da66b61eee9 100644 --- a/apps/files_external/lib/Settings/PersonalSection.php +++ b/apps/files_external/lib/Settings/PersonalSection.php @@ -24,7 +24,6 @@ namespace OCA\Files_External\Settings; - use OCA\Files_External\Service\BackendService; use OCA\Files_External\Service\UserGlobalStoragesService; use OCP\IL10N; diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 432bb6702fd..c02d9d71566 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -322,7 +322,7 @@ class OC_Mount_Config { } foreach ($dependencyGroups as $module => $dependants) { - $backends = implode(', ', array_map(function($backend) { + $backends = implode(', ', array_map(function ($backend) { return '"' . $backend->getText() . '"'; }, $dependants)); $message .= '<p>' . OC_Mount_Config::getSingleDependencyMessage($l, $module, $backends) . '</p>'; diff --git a/apps/files_external/templates/list.php b/apps/files_external/templates/list.php index 04b7159cfe1..e1b666c14c1 100644 --- a/apps/files_external/templates/list.php +++ b/apps/files_external/templates/list.php @@ -16,7 +16,7 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerBackend" class="hidden column-backend"> diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 45d4ac8406c..0142b206b3e 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -1,10 +1,10 @@ <?php use \OCA\Files_External\Lib\Backend\Backend; - use \OCA\Files_External\Lib\Auth\AuthMechanism; - use \OCA\Files_External\Lib\DefinitionParameter; - use \OCA\Files_External\Service\BackendService; +use \OCA\Files_External\Lib\Auth\AuthMechanism; +use \OCA\Files_External\Lib\DefinitionParameter; +use \OCA\Files_External\Service\BackendService; - $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting']; +$canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting']; $l->t("Enable encryption"); $l->t("Enable previews"); @@ -134,15 +134,15 @@ <?php p($l->t('Add storage')); ?> </option> <?php - $sortedBackends = array_filter($_['backends'], function($backend) use ($_) { + $sortedBackends = array_filter($_['backends'], function ($backend) use ($_) { return $backend->isVisibleFor($_['visibilityType']); }); - uasort($sortedBackends, function($a, $b) { + uasort($sortedBackends, function ($a, $b) { return strcasecmp($a->getText(), $b->getText()); }); ?> <?php foreach ($sortedBackends as $backend): ?> - <?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?> + <?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends?> <option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option> <?php endforeach; ?> </select> @@ -172,7 +172,7 @@ <p id="userMountingBackends"<?php if (!$_['allowUserMounting']): ?> class="hidden"<?php endif; ?>> <?php - $userBackends = array_filter($_['backends'], function($backend) { + $userBackends = array_filter($_['backends'], function ($backend) { return $backend->isAllowedVisibleFor(BackendService::VISIBILITY_PERSONAL); }); ?> diff --git a/apps/files_external/tests/Backend/BackendTest.php b/apps/files_external/tests/Backend/BackendTest.php index b15ff00d21a..10853d9197c 100644 --- a/apps/files_external/tests/Backend/BackendTest.php +++ b/apps/files_external/tests/Backend/BackendTest.php @@ -78,7 +78,7 @@ class BackendTest extends \Test\TestCase { public function testLegacyAuthMechanismCallback() { $backend = new Backend(); - $backend->setLegacyAuthMechanismCallback(function(array $params) { + $backend->setLegacyAuthMechanismCallback(function (array $params) { if (isset($params['ping'])) { return 'pong'; } diff --git a/apps/files_external/tests/FrontendDefinitionTraitTest.php b/apps/files_external/tests/FrontendDefinitionTraitTest.php index 9b61a32c3cc..ad5cb903214 100644 --- a/apps/files_external/tests/FrontendDefinitionTraitTest.php +++ b/apps/files_external/tests/FrontendDefinitionTraitTest.php @@ -102,7 +102,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { ->willReturn('param'); $param->expects($this->once()) ->method('validateValue') - ->willReturnCallback(function(&$value) { + ->willReturnCallback(function (&$value) { $value = 'foobar'; return true; }); diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php index 6d6ae7d36b5..e3615f2edcd 100644 --- a/apps/files_external/tests/Service/DBConfigServiceTest.php +++ b/apps/files_external/tests/Service/DBConfigServiceTest.php @@ -24,7 +24,6 @@ namespace OCA\Files_External\Tests\Service; - use OCA\Files_External\Service\DBConfigService; use OCP\IDBConnection; use Test\TestCase; diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index 947e1fd60ee..bc831b1e95c 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -267,7 +267,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ], ], ], - // mixed groups and users + // mixed groups and users [ ['user1', 'user2'], ['group1', 'group2'], diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index 9fb7b2a62a9..633399197f2 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -227,7 +227,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { public function testDeleteUnexistingStorage() { $this->expectException(\DomainException::class); - $this->actualDeletedUnexistingStorageTest(); + $this->actualDeletedUnexistingStorageTest(); } public function getUniqueStoragesProvider() { diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php index 0137ff919f2..0e9ec3dbaa6 100644 --- a/apps/files_external/tests/Storage/Amazons3Test.php +++ b/apps/files_external/tests/Storage/Amazons3Test.php @@ -45,7 +45,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage { parent::setUp(); $this->config = include('files_external/tests/config.amazons3.php'); - if ( ! is_array($this->config) or ! $this->config['run']) { + if (! is_array($this->config) or ! $this->config['run']) { $this->markTestSkipped('AmazonS3 backend not configured'); } $this->instance = new AmazonS3($this->config); diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index db57b5e6bf3..904b46c283a 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -47,7 +47,7 @@ class FtpTest extends \Test\Files\Storage\Storage { $id = $this->getUniqueID(); $this->config = include('files_external/tests/config.ftp.php'); - if ( ! is_array($this->config) or ! $this->config['run']) { + if (! is_array($this->config) or ! $this->config['run']) { $this->markTestSkipped('FTP backend not configured'); } $this->config['root'] .= '/' . $id; //make sure we have an new empty folder to work in @@ -63,12 +63,12 @@ class FtpTest extends \Test\Files\Storage\Storage { parent::tearDown(); } - public function testConstructUrl(){ + public function testConstructUrl() { $config = [ 'host' => 'localhost', - 'user' => 'ftp', - 'password' => 'ftp', - 'root' => '/', - 'secure' => false ]; + 'user' => 'ftp', + 'password' => 'ftp', + 'root' => '/', + 'secure' => false ]; $instance = new FTP($config); $this->assertEquals('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); diff --git a/apps/files_external/tests/Storage/OwncloudTest.php b/apps/files_external/tests/Storage/OwncloudTest.php index 80c5425dd35..0f63709614d 100644 --- a/apps/files_external/tests/Storage/OwncloudTest.php +++ b/apps/files_external/tests/Storage/OwncloudTest.php @@ -45,7 +45,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage { $id = $this->getUniqueID(); $this->config = include('files_external/tests/config.php'); - if ( ! is_array($this->config) or ! isset($this->config['owncloud']) or ! $this->config['owncloud']['run']) { + if (! is_array($this->config) or ! isset($this->config['owncloud']) or ! $this->config['owncloud']['run']) { $this->markTestSkipped('Nextcloud backend not configured'); } $this->config['owncloud']['root'] .= '/' . $id; //make sure we have an new empty folder to work in diff --git a/apps/files_external/tests/Storage/SFTP_KeyTest.php b/apps/files_external/tests/Storage/SFTP_KeyTest.php index b1ae0fc2a8e..b60e0f8ec59 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -44,7 +44,7 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { $id = $this->getUniqueID(); $this->config = include('files_external/tests/config.php'); - if ( ! is_array($this->config) or ! isset($this->config['sftp_key']) or ! $this->config['sftp_key']['run']) { + if (! is_array($this->config) or ! isset($this->config['sftp_key']) or ! $this->config['sftp_key']['run']) { $this->markTestSkipped('SFTP with key backend not configured'); } // Make sure we have an new empty folder to work in diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php index fbf4304d826..21e6536acd5 100644 --- a/apps/files_external/tests/config.php +++ b/apps/files_external/tests/config.php @@ -100,11 +100,11 @@ return [ 'root'=>'/test' ], 'sftp_key' => [ - 'run'=>false, - 'host'=>'localhost', - 'user'=>'test', - 'public_key'=>'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJPTvz3OLonF2KSGEKP/nd4CPmRYvemG2T4rIiNYjDj0U5y+2sKEWbjiUlQl2bsqYuVoJ+/UNJlGQbbZ08kQirFeo1GoWBzqioaTjUJfbLN6TzVVKXxR9YIVmH7Ajg2iEeGCndGgbmnPfj+kF9TR9IH8vMVvtubQwf7uEwB0ALhw== phpseclib-generated-key', + 'run'=>false, + 'host'=>'localhost', + 'user'=>'test', + 'public_key'=>'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJPTvz3OLonF2KSGEKP/nd4CPmRYvemG2T4rIiNYjDj0U5y+2sKEWbjiUlQl2bsqYuVoJ+/UNJlGQbbZ08kQirFeo1GoWBzqioaTjUJfbLN6TzVVKXxR9YIVmH7Ajg2iEeGCndGgbmnPfj+kF9TR9IH8vMVvtubQwf7uEwB0ALhw== phpseclib-generated-key', 'private_key'=>'test', - 'root'=>'/test' - ], + 'root'=>'/test' + ], ]; diff --git a/apps/files_sharing/l10n/el.js b/apps/files_sharing/l10n/el.js index 07a7952c6dc..6ddf5f76049 100644 --- a/apps/files_sharing/l10n/el.js +++ b/apps/files_sharing/l10n/el.js @@ -26,6 +26,7 @@ OC.L10N.register( "Something happened. Unable to accept the share." : "Κάτι συνέβη. Δεν μπορεί να γίνει η αποδοχή.", "Reject share" : "Απόρριψη κοινόχρηστου", "Something happened. Unable to reject the share." : "Κάτι συνέβη. Δεν μπορεί να απορριφθεί το κοινόχρηστο", + "Waiting…" : "Αναμονή...", "error" : "σφάλμα ", "finished" : "ολοκληρώθηκε", "This will stop your current uploads." : "Αυτό θα σταματήσει τις τρέχουσες μεταφορτώσεις.", diff --git a/apps/files_sharing/l10n/el.json b/apps/files_sharing/l10n/el.json index 9675f3443fc..9b77f12889f 100644 --- a/apps/files_sharing/l10n/el.json +++ b/apps/files_sharing/l10n/el.json @@ -24,6 +24,7 @@ "Something happened. Unable to accept the share." : "Κάτι συνέβη. Δεν μπορεί να γίνει η αποδοχή.", "Reject share" : "Απόρριψη κοινόχρηστου", "Something happened. Unable to reject the share." : "Κάτι συνέβη. Δεν μπορεί να απορριφθεί το κοινόχρηστο", + "Waiting…" : "Αναμονή...", "error" : "σφάλμα ", "finished" : "ολοκληρώθηκε", "This will stop your current uploads." : "Αυτό θα σταματήσει τις τρέχουσες μεταφορτώσεις.", diff --git a/apps/files_sharing/l10n/nl.js b/apps/files_sharing/l10n/nl.js index 710af86ef2d..e35c7118935 100644 --- a/apps/files_sharing/l10n/nl.js +++ b/apps/files_sharing/l10n/nl.js @@ -27,6 +27,7 @@ OC.L10N.register( "Reject share" : "Weiger deellink", "Something happened. Unable to reject the share." : "Er is iets gebeurd. Kan de deellink niet weigeren.", "error" : "fout", + "finished" : "klaar", "This will stop your current uploads." : "Dit beëindigt onderhanden uploads", "Move or copy" : "Verplaatsen of kopiëren", "Download" : "Downloaden", @@ -223,6 +224,7 @@ OC.L10N.register( "Upload files to %s" : "Upload bestanden naar %s", "Note" : "Notitie", "Select or drop files" : "Selecteer bestanden of sleep ze naar dit venster", + "Uploading files" : "Uploaden bestanden", "Uploaded files:" : "Geüploade bestanden", "By uploading files, you agree to the %1$sterms of service%2$s." : "Door het uploaden van bestanden stem je in met de %1$sgebruiksvoorwaarden%2$s.", "could not delete share" : "Kan gedeelde folder niet verwijderen", diff --git a/apps/files_sharing/l10n/nl.json b/apps/files_sharing/l10n/nl.json index 1d75fd11b92..3e384aa2a08 100644 --- a/apps/files_sharing/l10n/nl.json +++ b/apps/files_sharing/l10n/nl.json @@ -25,6 +25,7 @@ "Reject share" : "Weiger deellink", "Something happened. Unable to reject the share." : "Er is iets gebeurd. Kan de deellink niet weigeren.", "error" : "fout", + "finished" : "klaar", "This will stop your current uploads." : "Dit beëindigt onderhanden uploads", "Move or copy" : "Verplaatsen of kopiëren", "Download" : "Downloaden", @@ -221,6 +222,7 @@ "Upload files to %s" : "Upload bestanden naar %s", "Note" : "Notitie", "Select or drop files" : "Selecteer bestanden of sleep ze naar dit venster", + "Uploading files" : "Uploaden bestanden", "Uploaded files:" : "Geüploade bestanden", "By uploading files, you agree to the %1$sterms of service%2$s." : "Door het uploaden van bestanden stem je in met de %1$sgebruiksvoorwaarden%2$s.", "could not delete share" : "Kan gedeelde folder niet verwijderen", diff --git a/apps/files_sharing/l10n/tr.js b/apps/files_sharing/l10n/tr.js index 86e2ee1ccce..15d83c57487 100644 --- a/apps/files_sharing/l10n/tr.js +++ b/apps/files_sharing/l10n/tr.js @@ -26,7 +26,9 @@ OC.L10N.register( "Something happened. Unable to accept the share." : "Bir sorun çıktı. Paylaşım kabul edilemedi.", "Reject share" : "Paylaşımı reddet", "Something happened. Unable to reject the share." : "Bir sorun çıktı. Paylaşım reddedilemedi.", + "Waiting…" : "Bekleniyor…", "error" : "sorun", + "finished" : "tamamlandı", "This will stop your current uploads." : "Bu işlem geçerli yüklemeleri durduracak.", "Move or copy" : "Taşı ya da kopyala", "Download" : "İndir", @@ -223,6 +225,7 @@ OC.L10N.register( "Upload files to %s" : "Dosyaları %s konumuna yükle", "Note" : "Not", "Select or drop files" : "Dosyaları seçin ya da sürükleyip bırakın", + "Uploading files" : "Dosyalar yükleniyor", "Uploaded files:" : "Yüklenmiş dosyalar:", "By uploading files, you agree to the %1$sterms of service%2$s." : "Dosya yükleyerek %1$shizmet koşullarını%2$s kabul etmiş olursunuz.", "could not delete share" : "paylaşım kaldırılamadı", diff --git a/apps/files_sharing/l10n/tr.json b/apps/files_sharing/l10n/tr.json index 5121b6ff773..5829cab5adb 100644 --- a/apps/files_sharing/l10n/tr.json +++ b/apps/files_sharing/l10n/tr.json @@ -24,7 +24,9 @@ "Something happened. Unable to accept the share." : "Bir sorun çıktı. Paylaşım kabul edilemedi.", "Reject share" : "Paylaşımı reddet", "Something happened. Unable to reject the share." : "Bir sorun çıktı. Paylaşım reddedilemedi.", + "Waiting…" : "Bekleniyor…", "error" : "sorun", + "finished" : "tamamlandı", "This will stop your current uploads." : "Bu işlem geçerli yüklemeleri durduracak.", "Move or copy" : "Taşı ya da kopyala", "Download" : "İndir", @@ -221,6 +223,7 @@ "Upload files to %s" : "Dosyaları %s konumuna yükle", "Note" : "Not", "Select or drop files" : "Dosyaları seçin ya da sürükleyip bırakın", + "Uploading files" : "Dosyalar yükleniyor", "Uploaded files:" : "Yüklenmiş dosyalar:", "By uploading files, you agree to the %1$sterms of service%2$s." : "Dosya yükleyerek %1$shizmet koşullarını%2$s kabul etmiş olursunuz.", "could not delete share" : "paylaşım kaldırılamadı", diff --git a/apps/files_sharing/lib/Activity/Filter.php b/apps/files_sharing/lib/Activity/Filter.php index b27b0d3993f..4df53745c7b 100644 --- a/apps/files_sharing/lib/Activity/Filter.php +++ b/apps/files_sharing/lib/Activity/Filter.php @@ -23,7 +23,6 @@ namespace OCA\Files_Sharing\Activity; - use OCP\Activity\IFilter; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/apps/files_sharing/lib/Activity/Settings/PublicLinks.php b/apps/files_sharing/lib/Activity/Settings/PublicLinks.php index 9b882cee6c5..60094b656e1 100644 --- a/apps/files_sharing/lib/Activity/Settings/PublicLinks.php +++ b/apps/files_sharing/lib/Activity/Settings/PublicLinks.php @@ -23,7 +23,6 @@ namespace OCA\Files_Sharing\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files_sharing/lib/Activity/Settings/RemoteShare.php b/apps/files_sharing/lib/Activity/Settings/RemoteShare.php index 41054afd318..319b4ebfef3 100644 --- a/apps/files_sharing/lib/Activity/Settings/RemoteShare.php +++ b/apps/files_sharing/lib/Activity/Settings/RemoteShare.php @@ -24,7 +24,6 @@ namespace OCA\Files_Sharing\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files_sharing/lib/Activity/Settings/Shared.php b/apps/files_sharing/lib/Activity/Settings/Shared.php index 1889e7c6f03..1eb6270af3d 100644 --- a/apps/files_sharing/lib/Activity/Settings/Shared.php +++ b/apps/files_sharing/lib/Activity/Settings/Shared.php @@ -24,7 +24,6 @@ namespace OCA\Files_Sharing\Activity\Settings; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 14bbe68b446..2539b436592 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -181,7 +181,7 @@ class Application extends App { $server = $c->query('ServerContainer'); return new \OCA\Files_Sharing\External\MountProvider( $server->getDatabaseConnection(), - function() use ($c) { + function () use ($c) { return $c->query('ExternalManager'); }, $server->getCloudIdManager() @@ -215,19 +215,19 @@ class Application extends App { $dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class); $dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class); $dispatcher->addServiceListener(ShareCreatedEvent::class, ShareInteractionListener::class); - $dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() { + $dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () { \OCP\Util::addScript('files_sharing', 'dist/collaboration'); }); $dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class); $dispatcher->addServiceListener(UserAddedEvent::class, UserAddedToGroupListener::class); // notifications api to accept incoming user shares - $dispatcher->addListener('OCP\Share::postShare', function(GenericEvent $event) { + $dispatcher->addListener('OCP\Share::postShare', function (GenericEvent $event) { /** @var Listener $listener */ $listener = $this->getContainer()->query(Listener::class); $listener->shareNotification($event); }); - $dispatcher->addListener(IGroup::class . '::postAddUser', function(GenericEvent $event) { + $dispatcher->addListener(IGroup::class . '::postAddUser', function (GenericEvent $event) { /** @var Listener $listener */ $listener = $this->getContainer()->query(Listener::class); $listener->userAddedToGroup($event); diff --git a/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php b/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php index 1d81e468c67..6dc0e06d6c6 100644 --- a/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php +++ b/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php @@ -23,7 +23,6 @@ namespace OCA\Files_Sharing\Collaboration; - use OCP\Collaboration\AutoComplete\ISorter; use OCP\Files\Folder; use OCP\Files\IRootFolder; @@ -75,7 +74,7 @@ class ShareRecipientSorter implements ISorter { // at least on PHP 5.6 usort turned out to be not stable. So we add // the current index to the value and compare it on a draw $i = 0; - $workArray = array_map(function($element) use (&$i) { + $workArray = array_map(function ($element) use (&$i) { return [$i++, $element]; }, $byType); diff --git a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php index 5f31459384e..b109a6282fa 100644 --- a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php +++ b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php @@ -121,7 +121,7 @@ class DeletedShareAPIController extends OCSController { } $result['path'] = $userFolder->getRelativePath($node->getPath()); - if ($node instanceOf \OCP\Files\Folder) { + if ($node instanceof \OCP\Files\Folder) { $result['item_type'] = 'folder'; } else { $result['item_type'] = 'file'; diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 68729db6de8..833bc788687 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -602,7 +602,7 @@ class ShareAPIController extends OCSController { $shares = array_merge($userShares, $groupShares, $circleShares, $roomShares); - $shares = array_filter($shares, function(IShare $share) { + $shares = array_filter($shares, function (IShare $share) { return $share->getShareOwner() !== $this->currentUser; }); @@ -639,7 +639,7 @@ class ShareAPIController extends OCSController { $nodes = $folder->getDirectoryListing(); /** @var \OCP\Share\IShare[] $shares */ - $shares = array_reduce($nodes, function($carry, $node) { + $shares = array_reduce($nodes, function ($carry, $node) { $carry = array_merge($carry, $this->getAllShares($node, true)); return $carry; }, []); diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 616b9754634..48914e27771 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -300,7 +300,7 @@ class ShareController extends AuthPublicShareController { * @PublicPage * @NoCSRFRequired * - + * * @param string $path * @return TemplateResponse * @throws NotFoundException @@ -425,7 +425,7 @@ class ShareController extends AuthPublicShareController { $shareTmpl['previewURL'] = $shareTmpl['downloadURL']; if ($shareTmpl['previewSupported']) { - $shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute( 'files_sharing.PublicPreview.getPreview', + $shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.PublicPreview.getPreview', ['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 'token' => $shareTmpl['dirToken']]); $ogPreview = $shareTmpl['previewImage']; diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 63c96151ebc..898e57c1591 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -257,7 +257,7 @@ class ShareesAPIController extends OCSController { } private function sortShareesByFrequency(array $sharees): array { - usort($sharees, function(array $s1, array $s2) { + usort($sharees, function (array $s1, array $s2) { return $s2['count'] - $s1['count']; }); return $sharees; diff --git a/apps/files_sharing/lib/DeleteOrphanedSharesJob.php b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php index 548da79b9e1..33267a94c4e 100644 --- a/apps/files_sharing/lib/DeleteOrphanedSharesJob.php +++ b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php @@ -41,7 +41,7 @@ class DeleteOrphanedSharesJob extends TimedJob { /** * sets the correct interval for this timed job */ - public function __construct(){ + public function __construct() { $this->interval = $this->defaultIntervalMin * 60; } diff --git a/apps/files_sharing/lib/Exceptions/BrokenPath.php b/apps/files_sharing/lib/Exceptions/BrokenPath.php index 33fb242a36a..37db10bcb31 100644 --- a/apps/files_sharing/lib/Exceptions/BrokenPath.php +++ b/apps/files_sharing/lib/Exceptions/BrokenPath.php @@ -27,7 +27,7 @@ namespace OCA\Files_Sharing\Exceptions; * Expected path with a different root * Possible Error Codes: * 10 - Path not relative to data/ and point to the users file directory - + * */ class BrokenPath extends \Exception { } diff --git a/apps/files_sharing/lib/Exceptions/SharingRightsException.php b/apps/files_sharing/lib/Exceptions/SharingRightsException.php index 868ead81e7f..02d197d4034 100644 --- a/apps/files_sharing/lib/Exceptions/SharingRightsException.php +++ b/apps/files_sharing/lib/Exceptions/SharingRightsException.php @@ -25,7 +25,6 @@ namespace OCA\Files_Sharing\Exceptions; use Exception; - /** * Sharing and Resharing rights. * @@ -36,4 +35,3 @@ use Exception; class SharingRightsException extends Exception { } - diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php index 4f0b547e433..63a67bb5b48 100644 --- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php +++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php @@ -136,7 +136,7 @@ class SharingCheckMiddleware extends Middleware { } if (!$this->reflector->hasAnnotation('NoOutgoingFederatedSharingRequired') && - $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') !== 'yes') { + $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') !== 'yes') { return false; } diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 9845611b180..dd880d13306 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -155,7 +155,7 @@ class MountProvider implements IMountProvider { $result = []; // sort by stime, the super share will be based on the least recent share foreach ($tmp as &$tmp2) { - @usort($tmp2, function($a, $b) { + @usort($tmp2, function ($a, $b) { if ($a->getShareTime() <= $b->getShareTime()) { return -1; } diff --git a/apps/files_sharing/lib/ShareBackend/Folder.php b/apps/files_sharing/lib/ShareBackend/Folder.php index f2f1e24cc05..7713c8b6b11 100644 --- a/apps/files_sharing/lib/ShareBackend/Folder.php +++ b/apps/files_sharing/lib/ShareBackend/Folder.php @@ -112,7 +112,7 @@ class Folder extends File implements \OCP\Share_Backend_Collection { $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); - $parents = array_map(function($parent) use ($qb) { + $parents = array_map(function ($parent) use ($qb) { return $qb->createNamedParameter($parent); }, $parents); diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php index 95ba9160a9f..03c097725a1 100644 --- a/apps/files_sharing/templates/list.php +++ b/apps/files_sharing/templates/list.php @@ -15,14 +15,14 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Share time' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Share time')); ?></span><span class="sort-indicator"></span></a> </th> <th class="hidden column-expiration"> - <a class="columntitle"><span><?php p($l->t( 'Expiration date' )); ?></span></a> + <a class="columntitle"><span><?php p($l->t('Expiration date')); ?></span></a> </th> </tr> </thead> diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 6e9bad0a9d2..5c462b51aa6 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -112,7 +112,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size); <div> <?php echo $l->t('By uploading files, you agree to the %1$sterms of service%2$s.', [ - '<span id="show-terms-dialog">', '</span>' + '<span id="show-terms-dialog">', '</span>' ]); ?> </div> diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 789902bdcd6..b8d5a21a739 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -108,7 +108,7 @@ class ApiTest extends TestCase { private function createOCS($userId) { $l = $this->getMockBuilder(IL10N::class)->getMock(); $l->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $config = $this->createMock(IConfig::class); @@ -305,7 +305,7 @@ class ApiTest extends TestCase { /** * @medium - */ + */ function testSharePermissions() { // sharing file to a user should work if shareapi_exclude_groups is set // to no diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index c5ce0107f80..94e5504aece 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -227,19 +227,19 @@ class CacheTest extends TestCase { function testSearchByMime() { $results = $this->sharedStorage->getCache()->searchByMime('text'); $check = [ - [ - 'name' => 'bar.txt', - 'path' => 'bar.txt' - ], - [ - 'name' => 'another too.txt', - 'path' => 'subdir/another too.txt' - ], - [ - 'name' => 'another.txt', - 'path' => 'subdir/another.txt' - ], - ]; + [ + 'name' => 'bar.txt', + 'path' => 'bar.txt' + ], + [ + 'name' => 'another too.txt', + 'path' => 'subdir/another too.txt' + ], + [ + 'name' => 'another.txt', + 'path' => 'subdir/another.txt' + ], + ]; $this->verifyFiles($check, $results); } diff --git a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php index fe12fb034c0..1efd99706c2 100644 --- a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php +++ b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php @@ -24,7 +24,6 @@ namespace OCA\Files_Sharing\Tests\Collaboration; - use OCA\Files_Sharing\Collaboration\ShareRecipientSorter; use OCP\Files\Folder; use OCP\Files\IRootFolder; diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index c2d4c7641e4..577f574f8ed 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -123,7 +123,7 @@ class ShareAPIControllerTest extends TestCase { $this->l = $this->createMock(IL10N::class); $this->l->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $this->config = $this->createMock(IConfig::class); @@ -180,7 +180,7 @@ class ShareAPIControllerTest extends TestCase { $this->shareManager ->expects($this->exactly(5)) ->method('getShareById') - ->willReturnCallback(function($id) { + ->willReturnCallback(function ($id) { if ($id === 'ocinternal:42' || $id === 'ocRoomShare:42' || $id === 'ocFederatedSharing:42' || $id === 'ocCircleShare:42' || $id === 'ocMailShare:42') { throw new \OCP\Share\Exceptions\ShareNotFound(); } else { @@ -1341,7 +1341,7 @@ class ShareAPIControllerTest extends TestCase { $ocs->method('formatShare') ->willReturnCallback( - function($share) { + function ($share) { return [ 'id' => $share->getId(), 'share_type' => $share->getShareType() @@ -1361,7 +1361,7 @@ class ShareAPIControllerTest extends TestCase { $this->shareManager ->method('getSharesBy') ->willReturnCallback( - function($user, $shareType, $node) use ($shares) { + function ($user, $shareType, $node) use ($shares) { if (!isset($shares[$node->getName()]) || !isset($shares[$node->getName()][$shareType])) { return []; } @@ -1380,7 +1380,7 @@ class ShareAPIControllerTest extends TestCase { $this->groupManager ->method('isInGroup') ->willReturnCallback( - function($user, $group) { + function ($user, $group) { return $group === 'currentUserGroup'; } ); @@ -4085,7 +4085,7 @@ class ShareAPIControllerTest extends TestCase { $recipientGroup = $this->createMock('\OCP\IGroup'); $recipientGroup->method('getDisplayName')->willReturn('recipientGroupDisplayName'); $this->groupManager->method('get')->willReturnMap([ - ['recipientGroup', $recipientGroup], + ['recipientGroup', $recipientGroup], ]); $this->urlGenerator->method('linkToRouteAbsolute') diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 240a0c7faad..a43c050634b 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -284,7 +284,7 @@ class ShareControllerTest extends \Test\TestCase { ->with('core', 'shareapi_public_link_disclaimertext', null) ->willReturn('My disclaimer text'); - $this->userManager->method('get')->willReturnCallback(function(string $uid) use ($owner, $initiator) { + $this->userManager->method('get')->willReturnCallback(function (string $uid) use ($owner, $initiator) { if ($uid === 'ownerUID') { return $owner; } @@ -298,14 +298,14 @@ class ShareControllerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCA\Files_Sharing::loadAdditionalScripts', - $this->callback(function($event) use ($share) { + $this->callback(function ($event) use ($share) { return $event->getArgument('share') === $share; }) ); $this->l10n->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters) { + ->willReturnCallback(function ($text, $parameters) { return vsprintf($text, $parameters); }); @@ -432,7 +432,7 @@ class ShareControllerTest extends \Test\TestCase { ->with('core', 'shareapi_public_link_disclaimertext', null) ->willReturn('My disclaimer text'); - $this->userManager->method('get')->willReturnCallback(function(string $uid) use ($owner, $initiator) { + $this->userManager->method('get')->willReturnCallback(function (string $uid) use ($owner, $initiator) { if ($uid === 'ownerUID') { return $owner; } @@ -446,14 +446,14 @@ class ShareControllerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCA\Files_Sharing::loadAdditionalScripts', - $this->callback(function($event) use ($share) { + $this->callback(function ($event) use ($share) { return $event->getArgument('share') === $share; }) ); $this->l10n->expects($this->any()) ->method('t') - ->will($this->returnCallback(function($text, $parameters) { + ->will($this->returnCallback(function ($text, $parameters) { return vsprintf($text, $parameters); })); @@ -583,7 +583,7 @@ class ShareControllerTest extends \Test\TestCase { ->with('core', 'shareapi_public_link_disclaimertext', null) ->willReturn('My disclaimer text'); - $this->userManager->method('get')->willReturnCallback(function(string $uid) use ($owner, $initiator) { + $this->userManager->method('get')->willReturnCallback(function (string $uid) use ($owner, $initiator) { if ($uid === 'ownerUID') { return $owner; } @@ -597,14 +597,14 @@ class ShareControllerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCA\Files_Sharing::loadAdditionalScripts', - $this->callback(function($event) use ($share) { + $this->callback(function ($event) use ($share) { return $event->getArgument('share') === $share; }) ); $this->l10n->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters) { + ->willReturnCallback(function ($text, $parameters) { return vsprintf($text, $parameters); }); @@ -712,7 +712,7 @@ class ShareControllerTest extends \Test\TestCase { ->with('token') ->willReturn($share); - $this->userManager->method('get')->willReturnCallback(function(string $uid) use ($owner, $initiator) { + $this->userManager->method('get')->willReturnCallback(function (string $uid) use ($owner, $initiator) { if ($uid === 'ownerUID') { return $owner; } @@ -724,7 +724,7 @@ class ShareControllerTest extends \Test\TestCase { $this->l10n->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters) { + ->willReturnCallback(function ($text, $parameters) { return vsprintf($text, $parameters); }); @@ -869,7 +869,7 @@ class ShareControllerTest extends \Test\TestCase { ->with('token') ->willReturn($share); - $this->userManager->method('get')->willReturnCallback(function(string $uid) use ($owner, $initiator) { + $this->userManager->method('get')->willReturnCallback(function (string $uid) use ($owner, $initiator) { if ($uid === 'ownerUID') { return $owner; } @@ -910,7 +910,7 @@ class ShareControllerTest extends \Test\TestCase { ->with('token') ->willReturn($share); - $this->userManager->method('get')->willReturnCallback(function(string $uid) use ($owner, $initiator) { + $this->userManager->method('get')->willReturnCallback(function (string $uid) use ($owner, $initiator) { if ($uid === 'ownerUID') { return $owner; } diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index 0f3f53a26f6..7beb4058c4f 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -292,7 +292,7 @@ class ShareesAPIControllerTest extends TestCase { $this->shareManager->expects($this->any()) ->method('shareProviderExists') - ->willReturnCallback(function($shareType) use ($emailSharingEnabled) { + ->willReturnCallback(function ($shareType) use ($emailSharingEnabled) { if ($shareType === \OCP\Share::SHARE_TYPE_EMAIL) { return $emailSharingEnabled; } else { diff --git a/apps/files_sharing/tests/EtagPropagationTest.php b/apps/files_sharing/tests/EtagPropagationTest.php index bcab1a92bb8..cb078fdf832 100644 --- a/apps/files_sharing/tests/EtagPropagationTest.php +++ b/apps/files_sharing/tests/EtagPropagationTest.php @@ -456,7 +456,7 @@ class EtagPropagationTest extends PropagationTestCase { $shares = $this->shareManager->getSharesBy(self::TEST_FILES_SHARING_API_USER1, \OCP\Share::SHARE_TYPE_USER, $node); /** @var \OCP\Share\IShare[] $shares */ - $shares = array_filter($shares, function(\OCP\Share\IShare $share) { + $shares = array_filter($shares, function (\OCP\Share\IShare $share) { return $share->getSharedWith() === self::TEST_FILES_SHARING_API_USER2; }); $this->assertCount(1, $shares); diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php index 5065c88afc7..5a1e8ad14e1 100644 --- a/apps/files_sharing/tests/External/ManagerTest.php +++ b/apps/files_sharing/tests/External/ManagerTest.php @@ -110,7 +110,7 @@ class ManagerTest extends TestCase { ] )->setMethods(['tryOCMEndPoint'])->getMock(); - $this->testMountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function() { + $this->testMountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function () { return $this->manager; }, new CloudIdManager()); } diff --git a/apps/files_sharing/tests/ExternalStorageTest.php b/apps/files_sharing/tests/ExternalStorageTest.php index bec6d5e5460..f2bf5738f36 100644 --- a/apps/files_sharing/tests/ExternalStorageTest.php +++ b/apps/files_sharing/tests/ExternalStorageTest.php @@ -27,6 +27,7 @@ */ namespace OCA\Files_Sharing\Tests; + use OC\Federation\CloudId; use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; diff --git a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index b978658b428..29dafb5762d 100644 --- a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php @@ -26,6 +26,7 @@ */ namespace OCA\Files_Sharing\Middleware; + use OCA\Files_Sharing\Controller\ExternalSharesController; use OCA\Files_Sharing\Controller\ShareController; use OCA\Files_Sharing\Exceptions\S2SException; diff --git a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php index 4658cbdf021..b2f5fd7c851 100644 --- a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php +++ b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php @@ -23,7 +23,6 @@ namespace OCA\Files_Sharing\Tests\Migration; - use OCA\Files_Sharing\Migration\SetPasswordColumn; use OCA\Files_Sharing\Tests\TestCase; use OCP\IConfig; @@ -110,7 +109,7 @@ class SetPasswordColumnTest extends TestCase { foreach ($allShares as $share) { if ((int)$share['share_type'] === Share::SHARE_TYPE_LINK) { - $this->assertNull( $share['share_with']); + $this->assertNull($share['share_with']); $this->assertSame('shareWith', $share['password']); } else { $this->assertSame('shareWith', $share['share_with']); diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index 66df03101ac..ec52db8542e 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -112,9 +112,9 @@ class MountProviderTest extends \Test\TestCase { $this->makeMockShare(2, 100, 'user2', '/share2', 31), ]; $groupShares = [ - $this->makeMockShare(3, 100, 'user2', '/share2', 0), - $this->makeMockShare(4, 101, 'user2', '/share4', 31), - $this->makeMockShare(5, 100, 'user1', '/share4', 31), + $this->makeMockShare(3, 100, 'user2', '/share2', 0), + $this->makeMockShare(4, 101, 'user2', '/share4', 31), + $this->makeMockShare(5, 100, 'user1', '/share4', 31), ]; $roomShares = [ $this->makeMockShare(6, 102, 'user2', '/share6', 0), @@ -145,7 +145,7 @@ class MountProviderTest extends \Test\TestCase { ->willReturn($roomShares); $this->shareManager->expects($this->any()) ->method('newShare') - ->willReturnCallback(function() use ($rootFolder, $userManager) { + ->willReturnCallback(function () use ($rootFolder, $userManager) { return new \OC\Share20\Share($rootFolder, $userManager); }); $mounts = $this->provider->getMountsForUser($this->user, $this->loader); @@ -180,10 +180,10 @@ class MountProviderTest extends \Test\TestCase { // #0: share as outsider with "group1" and "user1" with same permissions [ [ - [1, 100, 'user2', '/share2', 31], + [1, 100, 'user2', '/share2', 31], ], [ - [2, 100, 'user2', '/share2', 31], + [2, 100, 'user2', '/share2', 31], ], [ // combined, user share has higher priority @@ -193,10 +193,10 @@ class MountProviderTest extends \Test\TestCase { // #1: share as outsider with "group1" and "user1" with different permissions [ [ - [1, 100, 'user2', '/share', 31], + [1, 100, 'user2', '/share', 31], ], [ - [2, 100, 'user2', '/share', 15], + [2, 100, 'user2', '/share', 15], ], [ // use highest permissions @@ -208,8 +208,8 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user2', '/share', 31], - [2, 100, 'user2', '/share', 31], + [1, 100, 'user2', '/share', 31], + [2, 100, 'user2', '/share', 31], ], [ // combined, first group share has higher priority @@ -221,8 +221,8 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user2', '/share', 31], - [2, 100, 'user2', '/share', 15], + [1, 100, 'user2', '/share', 31], + [2, 100, 'user2', '/share', 15], ], [ // use higher permissions @@ -234,7 +234,7 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user1', '/share', 31], + [1, 100, 'user1', '/share', 31], ], [ // no received share since "user1" is the sharer/owner @@ -245,8 +245,8 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user1', '/share', 31], - [2, 100, 'user1', '/share', 15], + [1, 100, 'user1', '/share', 31], + [2, 100, 'user1', '/share', 15], ], [ // no received share since "user1" is the sharer/owner @@ -257,7 +257,7 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user2', '/share', 0], + [1, 100, 'user2', '/share', 0], ], [ // no received share since "user1" opted out @@ -266,10 +266,10 @@ class MountProviderTest extends \Test\TestCase { // #7: share as outsider with "group1" and "user1" where recipient renamed in between [ [ - [1, 100, 'user2', '/share2-renamed', 31], + [1, 100, 'user2', '/share2-renamed', 31], ], [ - [2, 100, 'user2', '/share2', 31], + [2, 100, 'user2', '/share2', 31], ], [ // use target of least recent share @@ -279,10 +279,10 @@ class MountProviderTest extends \Test\TestCase { // #8: share as outsider with "group1" and "user1" where recipient renamed in between [ [ - [2, 100, 'user2', '/share2', 31], + [2, 100, 'user2', '/share2', 31], ], [ - [1, 100, 'user2', '/share2-renamed', 31], + [1, 100, 'user2', '/share2-renamed', 31], ], [ // use target of least recent share @@ -322,10 +322,10 @@ class MountProviderTest extends \Test\TestCase { $rootFolder = $this->createMock(IRootFolder::class); $userManager = $this->createMock(IUserManager::class); - $userShares = array_map(function($shareSpec) { + $userShares = array_map(function ($shareSpec) { return $this->makeMockShare($shareSpec[0], $shareSpec[1], $shareSpec[2], $shareSpec[3], $shareSpec[4]); }, $userShares); - $groupShares = array_map(function($shareSpec) { + $groupShares = array_map(function ($shareSpec) { return $this->makeMockShare($shareSpec[0], $shareSpec[1], $shareSpec[2], $shareSpec[3], $shareSpec[4]); }, $groupShares); @@ -354,7 +354,7 @@ class MountProviderTest extends \Test\TestCase { ->willReturn($roomShares); $this->shareManager->expects($this->any()) ->method('newShare') - ->willReturnCallback(function() use ($rootFolder, $userManager) { + ->willReturnCallback(function () use ($rootFolder, $userManager) { return new \OC\Share20\Share($rootFolder, $userManager); }); diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php index e70ac84f66d..cda01aacba2 100644 --- a/apps/files_sharing/tests/SharedMountTest.php +++ b/apps/files_sharing/tests/SharedMountTest.php @@ -29,6 +29,7 @@ */ namespace OCA\Files_Sharing\Tests; + use OCP\IGroupManager; use OCP\IUserManager; @@ -185,7 +186,7 @@ class SharedMountTest extends TestCase { * share file with a group if a user renames the file the filename should not change * for the other users */ - public function testMoveGroupShare () { + public function testMoveGroupShare() { $testGroup = $this->groupManager->createGroup('testGroup'); $user1 = $this->userManager->get(self::TEST_FILES_SHARING_API_USER1); $user2 = $this->userManager->get(self::TEST_FILES_SHARING_API_USER2); @@ -265,7 +266,7 @@ class SharedMountTest extends TestCase { public function dataPermissionMovedGroupShare() { $data = []; - $powerset = function($permissions) { + $powerset = function ($permissions) { $results = [\OCP\Constants::PERMISSION_READ]; foreach ($permissions as $permission) { @@ -459,7 +460,7 @@ class SharedMountTest extends TestCase { } class DummyTestClassSharedMount extends \OCA\Files_Sharing\SharedMount { - public function __construct($storage, $mountpoint, $arguments = null, $loader = null){ + public function __construct($storage, $mountpoint, $arguments = null, $loader = null) { // noop } diff --git a/apps/files_trashbin/lib/AppInfo/Application.php b/apps/files_trashbin/lib/AppInfo/Application.php index 59f1b1d8c56..6a810e9218e 100644 --- a/apps/files_trashbin/lib/AppInfo/Application.php +++ b/apps/files_trashbin/lib/AppInfo/Application.php @@ -36,7 +36,7 @@ use OCP\AppFramework\App; use OCP\AppFramework\IAppContainer; class Application extends App { - public function __construct (array $urlParams = []) { + public function __construct(array $urlParams = []) { parent::__construct('files_trashbin', $urlParams); $container = $this->getContainer(); @@ -65,7 +65,7 @@ class Application extends App { ); }); - $container->registerService(ITrashManager::class, function(IAppContainer $c) { + $container->registerService(ITrashManager::class, function (IAppContainer $c) { return new TrashManager(); }); diff --git a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php index 2e9395980a9..3de365bd849 100644 --- a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php +++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php @@ -80,7 +80,7 @@ class ExpireTrash extends \OC\BackgroundJob\TimedJob { return; } - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $uid = $user->getUID(); if (!$this->setupFS($uid)) { return; diff --git a/apps/files_trashbin/lib/Command/ExpireTrash.php b/apps/files_trashbin/lib/Command/ExpireTrash.php index 6b35f781a56..46d2de46e36 100644 --- a/apps/files_trashbin/lib/Command/ExpireTrash.php +++ b/apps/files_trashbin/lib/Command/ExpireTrash.php @@ -92,7 +92,7 @@ class ExpireTrash extends Command { } else { $p = new ProgressBar($output); $p->start(); - $this->userManager->callForSeenUsers(function(IUser $user) use ($p) { + $this->userManager->callForSeenUsers(function (IUser $user) use ($p) { $p->advance(); $this->expireTrashForUser($user); }); diff --git a/apps/files_trashbin/lib/Events/MoveToTrashEvent.php b/apps/files_trashbin/lib/Events/MoveToTrashEvent.php index 31f67974d30..7d0b18fb0d8 100644 --- a/apps/files_trashbin/lib/Events/MoveToTrashEvent.php +++ b/apps/files_trashbin/lib/Events/MoveToTrashEvent.php @@ -25,7 +25,6 @@ namespace OCA\Files_Trashbin\Events; - use OCP\EventDispatcher\Event; use OCP\Files\Node; diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php index 03c45ad4a6d..9a660f9e942 100644 --- a/apps/files_trashbin/lib/Expiration.php +++ b/apps/files_trashbin/lib/Expiration.php @@ -50,7 +50,7 @@ class Expiration { /** @var bool */ private $canPurgeToSaveSpace; - public function __construct(IConfig $config,ITimeFactory $timeFactory){ + public function __construct(IConfig $config,ITimeFactory $timeFactory) { $this->timeFactory = $timeFactory; $this->setRetentionObligation($config->getSystemValue('trashbin_retention_obligation', 'auto')); } @@ -67,7 +67,7 @@ class Expiration { * Is trashbin expiration enabled * @return bool */ - public function isEnabled(){ + public function isEnabled() { return $this->retentionObligation !== 'disabled'; } @@ -77,7 +77,7 @@ class Expiration { * @param bool $quotaExceeded * @return bool */ - public function isExpired($timestamp, $quotaExceeded = false){ + public function isExpired($timestamp, $quotaExceeded = false) { // No expiration if disabled if (!$this->isEnabled()) { return false; @@ -126,7 +126,7 @@ class Expiration { return $maxAge; } - private function parseRetentionObligation(){ + private function parseRetentionObligation() { $splitValues = explode(',', $this->retentionObligation); if (!isset($splitValues[0])) { $minValue = self::DEFAULT_RETENTION_OBLIGATION; diff --git a/apps/files_trashbin/lib/Sabre/TrashFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolder.php index f811d6e4119..ae654b7daed 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolder.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCA\Files_Trashbin\Sabre; - class TrashFolder extends AbstractTrashFolder { public function getName(): string { return $this->data->getName() . '.d' . $this->getLastModified(); diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php index 0edd2ea9c74..63a032c8682 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCA\Files_Trashbin\Sabre; - class TrashFolderFile extends AbstractTrashFile { public function get() { return $this->data->getStorage()->fopen($this->data->getInternalPath(), 'rb'); diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index 0f1787223a2..24d49a4c8c5 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -549,7 +549,7 @@ class Trashbin { * wrapper function to emit the 'preDelete' hook of \OCP\Trashbin before a file is deleted * @param string $path */ - protected static function emitTrashbinPreDelete($path){ + protected static function emitTrashbinPreDelete($path) { \OC_Hook::emit('\OCP\Trashbin', 'preDelete', ['path' => $path]); } @@ -557,7 +557,7 @@ class Trashbin { * wrapper function to emit the 'delete' hook of \OCP\Trashbin after a file has been deleted * @param string $path */ - protected static function emitTrashbinPostDelete($path){ + protected static function emitTrashbinPostDelete($path) { \OC_Hook::emit('\OCP\Trashbin', 'delete', ['path' => $path]); } diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php index e503e364af9..2bf4be54f6a 100644 --- a/apps/files_trashbin/templates/index.php +++ b/apps/files_trashbin/templates/index.php @@ -29,7 +29,7 @@ </th> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> <span id="selectedActionsList" class='selectedActions'> <a href="" class="actions-selected"> <span class="icon icon-more"></span> @@ -39,7 +39,7 @@ </div> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Deleted' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Deleted')); ?></span><span class="sort-indicator"></span></a> </th> </tr> </thead> diff --git a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php index dcd7d4fa35e..ae0076a5b0b 100644 --- a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php +++ b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php @@ -23,7 +23,7 @@ */ namespace OCA\Files_Trashbin\Tests\BackgroundJob; - + use OCA\Files_Trashbin\BackgroundJob\ExpireTrash; use OCP\BackgroundJob\IJobList; use OCP\IUserManager; diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php index 4fa4287aae1..71391f5288d 100644 --- a/apps/files_trashbin/tests/Command/CleanUpTest.php +++ b/apps/files_trashbin/tests/Command/CleanUpTest.php @@ -26,7 +26,6 @@ namespace OCA\Files_Trashbin\Tests\Command; - use OC\User\Manager; use OCA\Files_Trashbin\Command\CleanUp; use OCP\Files\IRootFolder; diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php index 5a21889e457..581ef247ac7 100644 --- a/apps/files_trashbin/tests/ExpirationTest.php +++ b/apps/files_trashbin/tests/ExpirationTest.php @@ -32,7 +32,7 @@ class ExpirationTest extends \Test\TestCase { const FAKE_TIME_NOW = 1000000; - public function expirationData(){ + public function expirationData() { $today = 100*self::SECONDS_PER_DAY; $back10Days = (100-10)*self::SECONDS_PER_DAY; $back20Days = (100-20)*self::SECONDS_PER_DAY; @@ -105,7 +105,7 @@ class ExpirationTest extends \Test\TestCase { * @param bool $quotaExceeded * @param string $expectedResult */ - public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult){ + public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult) { $mockedConfig = $this->getMockedConfig($retentionObligation); $mockedTimeFactory = $this->getMockedTimeFactory($timeNow); @@ -116,7 +116,7 @@ class ExpirationTest extends \Test\TestCase { } - public function configData(){ + public function configData() { return [ [ 'disabled', null, null, null], [ 'auto', Expiration::DEFAULT_RETENTION_OBLIGATION, Expiration::NO_OBLIGATION, true ], @@ -138,7 +138,7 @@ class ExpirationTest extends \Test\TestCase { * @param int $expectedMaxAge * @param bool $expectedCanPurgeToSaveSpace */ - public function testParseRetentionObligation($configValue, $expectedMinAge, $expectedMaxAge, $expectedCanPurgeToSaveSpace){ + public function testParseRetentionObligation($configValue, $expectedMinAge, $expectedMaxAge, $expectedCanPurgeToSaveSpace) { $mockedConfig = $this->getMockedConfig($configValue); $mockedTimeFactory = $this->getMockedTimeFactory( time() @@ -151,7 +151,7 @@ class ExpirationTest extends \Test\TestCase { } - public function timestampTestData(){ + public function timestampTestData() { return [ [ 'disabled', false], [ 'auto', false ], @@ -171,7 +171,7 @@ class ExpirationTest extends \Test\TestCase { * @param string $configValue * @param int $expectedMaxAgeTimestamp */ - public function testGetMaxAgeAsTimestamp($configValue, $expectedMaxAgeTimestamp){ + public function testGetMaxAgeAsTimestamp($configValue, $expectedMaxAgeTimestamp) { $mockedConfig = $this->getMockedConfig($configValue); $mockedTimeFactory = $this->getMockedTimeFactory( self::FAKE_TIME_NOW @@ -186,7 +186,7 @@ class ExpirationTest extends \Test\TestCase { * @param int $time * @return ITimeFactory|MockObject */ - private function getMockedTimeFactory($time){ + private function getMockedTimeFactory($time) { $mockedTimeFactory = $this->createMock(ITimeFactory::class); $mockedTimeFactory->expects($this->any()) ->method('getTime') @@ -199,7 +199,7 @@ class ExpirationTest extends \Test\TestCase { * @param string $returnValue * @return IConfig|MockObject */ - private function getMockedConfig($returnValue){ + private function getMockedConfig($returnValue) { $mockedConfig = $this->createMock(IConfig::class); $mockedConfig->expects($this->any()) ->method('getSystemValue') diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 09650858392..917b8831c06 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -22,4 +22,3 @@ */ \OC::$server->query(\OCA\Files_Versions\AppInfo\Application::class); - diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php index 0149c0d3b0e..7252ddcd22b 100644 --- a/apps/files_versions/appinfo/routes.php +++ b/apps/files_versions/appinfo/routes.php @@ -46,4 +46,3 @@ $this->create('files_versions_ajax_getVersions', 'ajax/getVersions.php') ->actionInclude('files_versions/ajax/getVersions.php'); $this->create('files_versions_ajax_rollbackVersion', 'ajax/rollbackVersion.php') ->actionInclude('files_versions/ajax/rollbackVersion.php'); - diff --git a/apps/files_versions/lib/AppInfo/Application.php b/apps/files_versions/lib/AppInfo/Application.php index 32ba9d40505..040b72a8f0a 100644 --- a/apps/files_versions/lib/AppInfo/Application.php +++ b/apps/files_versions/lib/AppInfo/Application.php @@ -75,7 +75,7 @@ class Application extends App { ); }); - $container->registerService(IVersionManager::class, function(IAppContainer $c) { + $container->registerService(IVersionManager::class, function (IAppContainer $c) { return new VersionManager(); }); diff --git a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php index cb2e0abb0c4..eb4287376e9 100644 --- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php +++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php @@ -58,7 +58,7 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob { return; } - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $uid = $user->getUID(); if (!$this->setupFS($uid)) { return; diff --git a/apps/files_versions/lib/Capabilities.php b/apps/files_versions/lib/Capabilities.php index b1e7ec468d3..4761fdb477c 100644 --- a/apps/files_versions/lib/Capabilities.php +++ b/apps/files_versions/lib/Capabilities.php @@ -23,7 +23,7 @@ * */ -namespace OCA\Files_Versions; +namespace OCA\Files_Versions; use OCP\Capabilities\ICapability; diff --git a/apps/files_versions/lib/Command/CleanUp.php b/apps/files_versions/lib/Command/CleanUp.php index 6abf5bdb3c8..b5b8f3dcfdb 100644 --- a/apps/files_versions/lib/Command/CleanUp.php +++ b/apps/files_versions/lib/Command/CleanUp.php @@ -22,7 +22,6 @@ namespace OCA\Files_Versions\Command; - use OCP\Files\IRootFolder; use OCP\IUserBackend; use OCP\IUserManager; diff --git a/apps/files_versions/lib/Command/ExpireVersions.php b/apps/files_versions/lib/Command/ExpireVersions.php index ba12ce2a496..d67542db259 100644 --- a/apps/files_versions/lib/Command/ExpireVersions.php +++ b/apps/files_versions/lib/Command/ExpireVersions.php @@ -91,7 +91,7 @@ class ExpireVersions extends Command { } else { $p = new ProgressBar($output); $p->start(); - $this->userManager->callForSeenUsers(function(IUser $user) use ($p) { + $this->userManager->callForSeenUsers(function (IUser $user) use ($p) { $p->advance(); $this->expireVersionsForUser($user); }); diff --git a/apps/files_versions/lib/Expiration.php b/apps/files_versions/lib/Expiration.php index 9f3f524ec12..a56042e76b8 100644 --- a/apps/files_versions/lib/Expiration.php +++ b/apps/files_versions/lib/Expiration.php @@ -47,7 +47,7 @@ class Expiration { /** @var bool */ private $canPurgeToSaveSpace; - public function __construct(IConfig $config,ITimeFactory $timeFactory){ + public function __construct(IConfig $config,ITimeFactory $timeFactory) { $this->timeFactory = $timeFactory; $this->retentionObligation = $config->getSystemValue('versions_retention_obligation', 'auto'); @@ -60,14 +60,14 @@ class Expiration { * Is versions expiration enabled * @return bool */ - public function isEnabled(){ + public function isEnabled() { return $this->retentionObligation !== 'disabled'; } /** * Is default expiration active */ - public function shouldAutoExpire(){ + public function shouldAutoExpire() { return $this->minAge === self::NO_OBLIGATION || $this->maxAge === self::NO_OBLIGATION; } @@ -78,7 +78,7 @@ class Expiration { * @param bool $quotaExceeded * @return bool */ - public function isExpired($timestamp, $quotaExceeded = false){ + public function isExpired($timestamp, $quotaExceeded = false) { // No expiration if disabled if (!$this->isEnabled()) { return false; @@ -119,7 +119,7 @@ class Expiration { * Get maximal retention obligation as a timestamp * @return int */ - public function getMaxAgeAsTimestamp(){ + public function getMaxAgeAsTimestamp() { $maxAge = false; if ($this->isEnabled() && $this->maxAge !== self::NO_OBLIGATION) { $time = $this->timeFactory->getTime(); @@ -129,10 +129,10 @@ class Expiration { } /** - * Read versions_retention_obligation, validate it - * and set private members accordingly - */ - private function parseRetentionObligation(){ + * Read versions_retention_obligation, validate it + * and set private members accordingly + */ + private function parseRetentionObligation() { $splitValues = explode(',', $this->retentionObligation); if (!isset($splitValues[0])) { $minValue = 'auto'; diff --git a/apps/files_versions/lib/Hooks.php b/apps/files_versions/lib/Hooks.php index b45b082865d..179a404ed9a 100644 --- a/apps/files_versions/lib/Hooks.php +++ b/apps/files_versions/lib/Hooks.php @@ -56,7 +56,7 @@ class Hooks { /** * listen to write event. */ - public static function write_hook( $params ) { + public static function write_hook($params) { $path = $params[Filesystem::signal_param_path]; if($path !== '') { Storage::store($path); diff --git a/apps/files_versions/lib/Listener/LoadAdditionalListener.php b/apps/files_versions/lib/Listener/LoadAdditionalListener.php index 0d8c380915c..f6d67341074 100644 --- a/apps/files_versions/lib/Listener/LoadAdditionalListener.php +++ b/apps/files_versions/lib/Listener/LoadAdditionalListener.php @@ -39,7 +39,7 @@ class LoadAdditionalListener implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'files_versions'); } diff --git a/apps/files_versions/lib/Listener/LoadSidebarListener.php b/apps/files_versions/lib/Listener/LoadSidebarListener.php index ac877620e71..875fe8b3fc5 100644 --- a/apps/files_versions/lib/Listener/LoadSidebarListener.php +++ b/apps/files_versions/lib/Listener/LoadSidebarListener.php @@ -39,7 +39,7 @@ class LoadSidebarListener implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'files_versions'); } diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index b1d6c689c61..8150089c078 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -107,7 +107,7 @@ class Storage { $uid = User::getUser(); } Filesystem::initMountPoints($uid); - if ( $uid !== User::getUser() ) { + if ($uid !== User::getUser()) { $info = Filesystem::getFileInfo($filename); $ownerView = new View('/'.$uid.'/files'); try { @@ -497,7 +497,7 @@ class Storage { * Expire versions that older than max version retention time * @param string $uid */ - public static function expireOlderThanMaxForUser($uid){ + public static function expireOlderThanMaxForUser($uid) { $expiration = self::getExpiration(); $threshold = $expiration->getMaxAgeAsTimestamp(); $versions = self::getAllVersions($uid); @@ -735,7 +735,7 @@ class Storage { $softQuota = true; $quota = $user->getQuota(); - if ( $quota === null || $quota === 'none' ) { + if ($quota === null || $quota === 'none') { $quota = Filesystem::free_space('/'); $softQuota = false; } else { @@ -848,7 +848,7 @@ class Storage { * Static workaround * @return Expiration */ - protected static function getExpiration(){ + protected static function getExpiration() { if (self::$application === null) { self::$application = \OC::$server->query(Application::class); } diff --git a/apps/files_versions/tests/Command/CleanupTest.php b/apps/files_versions/tests/Command/CleanupTest.php index 125985a2f92..1fad960f952 100644 --- a/apps/files_versions/tests/Command/CleanupTest.php +++ b/apps/files_versions/tests/Command/CleanupTest.php @@ -25,7 +25,6 @@ namespace OCA\Files_Versions\Tests\Command; - use OC\User\Manager; use OCA\Files_Versions\Command\CleanUp; use OCP\Files\IRootFolder; diff --git a/apps/files_versions/tests/ExpirationTest.php b/apps/files_versions/tests/ExpirationTest.php index 1153d53bbaa..426d07e4b42 100644 --- a/apps/files_versions/tests/ExpirationTest.php +++ b/apps/files_versions/tests/ExpirationTest.php @@ -33,7 +33,7 @@ use PHPUnit\Framework\MockObject\MockObject; class ExpirationTest extends \Test\TestCase { const SECONDS_PER_DAY = 86400; //60*60*24 - public function expirationData(){ + public function expirationData() { $today = 100*self::SECONDS_PER_DAY; $back10Days = (100-10)*self::SECONDS_PER_DAY; $back20Days = (100-20)*self::SECONDS_PER_DAY; @@ -106,7 +106,7 @@ class ExpirationTest extends \Test\TestCase { * @param bool $quotaExceeded * @param string $expectedResult */ - public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult){ + public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult) { $mockedConfig = $this->getMockedConfig($retentionObligation); $mockedTimeFactory = $this->getMockedTimeFactory($timeNow); @@ -117,7 +117,7 @@ class ExpirationTest extends \Test\TestCase { } - public function configData(){ + public function configData() { return [ [ 'disabled', null, null, null], [ 'auto', Expiration::NO_OBLIGATION, Expiration::NO_OBLIGATION, true ], @@ -141,7 +141,7 @@ class ExpirationTest extends \Test\TestCase { * @param int $expectedMaxAge * @param bool $expectedCanPurgeToSaveSpace */ - public function testParseRetentionObligation($configValue, $expectedMinAge, $expectedMaxAge, $expectedCanPurgeToSaveSpace){ + public function testParseRetentionObligation($configValue, $expectedMinAge, $expectedMaxAge, $expectedCanPurgeToSaveSpace) { $mockedConfig = $this->getMockedConfig($configValue); $mockedTimeFactory = $this->getMockedTimeFactory( time() @@ -157,7 +157,7 @@ class ExpirationTest extends \Test\TestCase { * @param int $time * @return ITimeFactory|MockObject */ - private function getMockedTimeFactory($time){ + private function getMockedTimeFactory($time) { $mockedTimeFactory = $this->createMock(ITimeFactory::class); $mockedTimeFactory->expects($this->any()) ->method('getTime') @@ -170,7 +170,7 @@ class ExpirationTest extends \Test\TestCase { * @param string $returnValue * @return IConfig|MockObject */ - private function getMockedConfig($returnValue){ + private function getMockedConfig($returnValue) { $mockedConfig = $this->createMock(IConfig::class); $mockedConfig->expects($this->any()) ->method('getSystemValue') diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index aa572a36ea9..ae052335a95 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -746,7 +746,7 @@ class VersioningTest extends \Test\TestCase { $eventHandler->expects($this->any()) ->method('callback') ->willReturnCallback( - function($p) use (&$params) { + function ($p) use (&$params) { $params = $p; } ); diff --git a/apps/lookup_server_connector/lib/AppInfo/Application.php b/apps/lookup_server_connector/lib/AppInfo/Application.php index c4ae3e6a97a..aad11c4eff4 100644 --- a/apps/lookup_server_connector/lib/AppInfo/Application.php +++ b/apps/lookup_server_connector/lib/AppInfo/Application.php @@ -33,7 +33,7 @@ use OCP\IUser; use Symfony\Component\EventDispatcher\GenericEvent; class Application extends App { - public function __construct () { + public function __construct() { parent::__construct('lookup_server_connector'); } @@ -49,7 +49,7 @@ class Application extends App { */ public function registerHooksAndEvents(): void { $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); - $dispatcher->addListener('OC\AccountManager::userUpdated', static function(GenericEvent $event) { + $dispatcher->addListener('OC\AccountManager::userUpdated', static function (GenericEvent $event) { /** @var IUser $user */ $user = $event->getSubject(); diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php index 7c54bfda395..b57d1a00acc 100644 --- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php +++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php @@ -32,7 +32,6 @@ declare(strict_types=1); namespace OCA\LookupServerConnector\BackgroundJobs; - use OC\Security\IdentityProof\Signer; use OCP\Accounts\IAccountManager; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/oauth2/lib/Controller/OauthApiController.php b/apps/oauth2/lib/Controller/OauthApiController.php index 6e12132ed0f..91dd1b948cf 100644 --- a/apps/oauth2/lib/Controller/OauthApiController.php +++ b/apps/oauth2/lib/Controller/OauthApiController.php @@ -99,7 +99,7 @@ class OauthApiController extends Controller { } // We handle the initial and refresh tokens the same way - if ($grant_type === 'refresh_token' ) { + if ($grant_type === 'refresh_token') { $code = $refresh_token; } diff --git a/apps/provisioning_api/lib/AppInfo/Application.php b/apps/provisioning_api/lib/AppInfo/Application.php index 96ec5242ee0..6d99c48be5d 100644 --- a/apps/provisioning_api/lib/AppInfo/Application.php +++ b/apps/provisioning_api/lib/AppInfo/Application.php @@ -43,7 +43,7 @@ class Application extends App { $container = $this->getContainer(); $server = $container->getServer(); - $container->registerService(NewUserMailHelper::class, function(SimpleContainer $c) use ($server) { + $container->registerService(NewUserMailHelper::class, function (SimpleContainer $c) use ($server) { return new NewUserMailHelper( $server->query(Defaults::class), $server->getURLGenerator(), @@ -56,7 +56,7 @@ class Application extends App { Util::getDefaultEmailAddress('no-reply') ); }); - $container->registerService('ProvisioningApiMiddleware', function(SimpleContainer $c) use ($server) { + $container->registerService('ProvisioningApiMiddleware', function (SimpleContainer $c) use ($server) { $user = $server->getUserManager()->get($c['UserId']); $isAdmin = $user !== null ? $server->getGroupManager()->isAdmin($user->getUID()) : false; $isSubAdmin = $user !== null ? $server->getGroupManager()->getSubAdmin()->isSubAdmin($user) : false; diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 2bc81e9dcf9..3579202b36f 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -155,7 +155,7 @@ abstract class AUserData extends OCSController { ]; return $data; - } + } /** * Get the groups a user is a subadmin of diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php index fa5a695bd0f..b8a8cb4109f 100644 --- a/apps/provisioning_api/lib/Controller/AppConfigController.php +++ b/apps/provisioning_api/lib/Controller/AppConfigController.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCA\Provisioning_API\Controller; - use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index 6d02dcc0cd6..aa774506853 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -93,7 +93,7 @@ class GroupsController extends AUserData { */ public function getGroups(string $search = '', int $limit = null, int $offset = 0): DataResponse { $groups = $this->groupManager->search($search, $limit, $offset); - $groups = array_map(function($group) { + $groups = array_map(function ($group) { /** @var IGroup $group */ return $group->getGID(); }, $groups); @@ -113,7 +113,7 @@ class GroupsController extends AUserData { */ public function getGroupsDetails(string $search = '', int $limit = null, int $offset = 0): DataResponse { $groups = $this->groupManager->search($search, $limit, $offset); - $groups = array_map(function($group) { + $groups = array_map(function ($group) { /** @var IGroup $group */ return [ 'id' => $group->getGID(), @@ -166,7 +166,7 @@ class GroupsController extends AUserData { if($this->groupManager->isAdmin($user->getUID()) || $isSubadminOfGroup) { $users = $this->groupManager->get($groupId)->getUsers(); - $users = array_map(function($user) { + $users = array_map(function ($user) { /** @var IUser $user */ return $user->getUID(); }, $users); diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 8905f1348a8..6ed5a1217c5 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -105,7 +105,7 @@ class UsersController extends AUserData { NewUserMailHelper $newUserMailHelper, FederatedFileSharingFactory $federatedFileSharingFactory, ISecureRandom $secureRandom, - RemoteWipe $remoteWipe) { + RemoteWipe $remoteWipe) { parent::__construct($appName, $request, $userManager, diff --git a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php index 79935b35df5..eb5ed1900b7 100644 --- a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php @@ -24,7 +24,6 @@ namespace OCA\Provisioning_API\Tests\Controller; - use OCA\Provisioning_API\Controller\AppConfigController; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; diff --git a/apps/provisioning_api/tests/Controller/AppsControllerTest.php b/apps/provisioning_api/tests/Controller/AppsControllerTest.php index 5a4a1e5b156..bfc7a2f623a 100644 --- a/apps/provisioning_api/tests/Controller/AppsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppsControllerTest.php @@ -28,7 +28,6 @@ namespace OCA\Provisioning_API\Tests\Controller; - use OCA\Provisioning_API\Controller\AppsController; use OCP\App\IAppManager; use OCP\IRequest; diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index f512502df48..70a920b743e 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -168,7 +168,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->subAdminManager ->method('isSubAdminOfGroup') - ->willReturnCallback(function($_user, $_group) use ($user, $group) { + ->willReturnCallback(function ($_user, $_group) use ($user, $group) { if ($_user === $user && $_group === $group) { return true; } @@ -179,7 +179,7 @@ class GroupsControllerTest extends \Test\TestCase { private function useAccountManager() { $this->accountManager->expects($this->any()) ->method('getUser') - ->willReturnCallback(function(IUser $user) { + ->willReturnCallback(function (IUser $user) { return [ AccountManager::PROPERTY_PHONE => ['value' => '0800-call-' . $user->getUID()], AccountManager::PROPERTY_ADDRESS => ['value' => 'Holzweg 99, 0601 Herrera, Panama'], @@ -249,7 +249,7 @@ class GroupsControllerTest extends \Test\TestCase { 'disabled' => 11, 'canAdd' => true, 'canRemove' => true - ], + ], [ 'id' => 'group2', 'displayname' => 'group2-name', @@ -258,7 +258,7 @@ class GroupsControllerTest extends \Test\TestCase { 'canAdd' => true, 'canRemove' => true - ] + ] ]], $result->getData()); } @@ -496,7 +496,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function(string $uid) use ($users) { + ->willReturnCallback(function (string $uid) use ($users) { return isset($users[$uid]) ? $users[$uid] : null; }); diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 0a02378cba0..aff12547ec0 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -157,10 +157,10 @@ class UsersControllerTest extends TestCase { ->willReturn(['Admin' => [], 'Foo' => [], 'Bar' => []]); $expected = ['users' => [ - 'Admin', - 'Foo', - 'Bar', - ], + 'Admin', + 'Foo', + 'Bar', + ], ]; $this->assertEquals($expected, $this->api->getUsers('MyCustomSearch')->getData()); } @@ -439,7 +439,7 @@ class UsersControllerTest extends TestCase { $this->config ->expects($this->any()) ->method('getAppValue') - ->willReturnCallback(function($appid, $key, $default) { + ->willReturnCallback(function ($appid, $key, $default) { if($key === 'newUser.generateUserID') { return 'yes'; } @@ -477,7 +477,7 @@ class UsersControllerTest extends TestCase { $this->secureRandom->expects($this->any()) ->method('generate') ->with(10) - ->willReturnCallback(function() { return (string)rand(1000000000, 9999999999); }); + ->willReturnCallback(function () { return (string)rand(1000000000, 9999999999); }); $this->assertTrue(key_exists( 'id', @@ -494,7 +494,7 @@ class UsersControllerTest extends TestCase { $this->config ->expects($this->any()) ->method('getAppValue') - ->willReturnCallback(function($appid, $key, $default) { + ->willReturnCallback(function ($appid, $key, $default) { if($key === 'newUser.generateUserID') { return 'yes'; } @@ -537,7 +537,7 @@ class UsersControllerTest extends TestCase { $this->config ->expects($this->any()) ->method('getAppValue') - ->willReturnCallback(function($appid, $key, $default) { + ->willReturnCallback(function ($appid, $key, $default) { if($key === 'newUser.requireEmail') { return 'yes'; } diff --git a/apps/settings/l10n/el.js b/apps/settings/l10n/el.js index 987e20fce5c..79445c67f0e 100644 --- a/apps/settings/l10n/el.js +++ b/apps/settings/l10n/el.js @@ -243,15 +243,19 @@ OC.L10N.register( "All languages" : "Όλες οι γλώσσες", "Password change is disabled because the master key is disabled" : "Η αλλαγή κωδικού είναι απενεργοποιημένη επειδή το κεντρικό κλειδί είναι απενεργοποιημένο", "Passwordless authentication requires a secure connection." : "Η σύνδεση χωρίς κωδικό πρόσβασης απαιτεί ασφαλή σύνδεση.", + "Add WebAuthn device" : "Προσθήκη συσκευής WebAuthn ", "Please authorize your WebAuthn device." : "Παρακαλώ εξουσιοδοτήστε την συσκευή σας WebAuthn.", "Name your device" : "Ονομάστε την συσκευή σας", "Add" : "Προσθήκη", "Adding your device …" : "Πρόσθεση της συσκευής σας ...", + "Server error while trying to add WebAuthn device" : "Σφάλμα διακομιστή κατά την προσθήκη συσκευής webAuthn", + "Server error while trying to complete WebAuthn device registration" : "Σφάλμα διακομιστή κατά την εγγραφή συσκευής WebAuthn", "Unnamed device" : "Ανώνυμη συσκευή", "Passwordless Authentication" : "Πιστοποίηση χωρίς Κωδικό Πρόσβασης", "Set up your account for passwordless authentication following the FIDO2 standard." : "Ρυθμίστε τον λογαριασμό σας για πιστοποίηση χωρίς κωδικό ακολουθώντας τα πρότυπα του FIDO2.", "No devices configured." : "Καμιά συσκευή δεν ρυθμίστηκε.", "The following devices are configured for your account:" : "Οι ακόλουθες συσκευές ρυθμίστηκαν για τον λογαριασμό σας:", + "Your browser does not support WebAuthn." : "Ο περιηγητής σας δεν υποστηρίζει το WebAuthn.", "Your apps" : "Οι εφαρμογές σας", "Active apps" : "Ενεργές εφαρμογές", "Disabled apps" : "Απενεργοποιημένες εφαρμογές", diff --git a/apps/settings/l10n/el.json b/apps/settings/l10n/el.json index 717d03cf6dc..5640cd0a7ca 100644 --- a/apps/settings/l10n/el.json +++ b/apps/settings/l10n/el.json @@ -241,15 +241,19 @@ "All languages" : "Όλες οι γλώσσες", "Password change is disabled because the master key is disabled" : "Η αλλαγή κωδικού είναι απενεργοποιημένη επειδή το κεντρικό κλειδί είναι απενεργοποιημένο", "Passwordless authentication requires a secure connection." : "Η σύνδεση χωρίς κωδικό πρόσβασης απαιτεί ασφαλή σύνδεση.", + "Add WebAuthn device" : "Προσθήκη συσκευής WebAuthn ", "Please authorize your WebAuthn device." : "Παρακαλώ εξουσιοδοτήστε την συσκευή σας WebAuthn.", "Name your device" : "Ονομάστε την συσκευή σας", "Add" : "Προσθήκη", "Adding your device …" : "Πρόσθεση της συσκευής σας ...", + "Server error while trying to add WebAuthn device" : "Σφάλμα διακομιστή κατά την προσθήκη συσκευής webAuthn", + "Server error while trying to complete WebAuthn device registration" : "Σφάλμα διακομιστή κατά την εγγραφή συσκευής WebAuthn", "Unnamed device" : "Ανώνυμη συσκευή", "Passwordless Authentication" : "Πιστοποίηση χωρίς Κωδικό Πρόσβασης", "Set up your account for passwordless authentication following the FIDO2 standard." : "Ρυθμίστε τον λογαριασμό σας για πιστοποίηση χωρίς κωδικό ακολουθώντας τα πρότυπα του FIDO2.", "No devices configured." : "Καμιά συσκευή δεν ρυθμίστηκε.", "The following devices are configured for your account:" : "Οι ακόλουθες συσκευές ρυθμίστηκαν για τον λογαριασμό σας:", + "Your browser does not support WebAuthn." : "Ο περιηγητής σας δεν υποστηρίζει το WebAuthn.", "Your apps" : "Οι εφαρμογές σας", "Active apps" : "Ενεργές εφαρμογές", "Disabled apps" : "Απενεργοποιημένες εφαρμογές", diff --git a/apps/settings/l10n/nl.js b/apps/settings/l10n/nl.js index 6a9a7fb328a..9abbcf901be 100644 --- a/apps/settings/l10n/nl.js +++ b/apps/settings/l10n/nl.js @@ -242,10 +242,16 @@ OC.L10N.register( "Common languages" : "Gebruikelijke talen", "All languages" : "Alle talen", "Password change is disabled because the master key is disabled" : "Wachtwoordwijziging is uitgeschakeld omdat de hoofdsleutel is uitgeschakeld", + "Passwordless authentication requires a secure connection." : "Inloggen zonder wachtwoord vereist een beveiligde verbinding.", + "Please authorize your WebAuthn device." : "Autoriseer je WebAuthn toestel.", "Name your device" : "Geef je toestel een naam", "Add" : "Toevoegen", "Adding your device …" : "Je toestel toevoegen...", "Unnamed device" : "Naamloos apparaat", + "Passwordless Authentication" : "Inloggen zonder wachtwoord", + "Set up your account for passwordless authentication following the FIDO2 standard." : "Stel voor je account wachtwoordloze authenticatie in volgens de FIDO2 standaard.", + "No devices configured." : "Geen toestellen geconfigureerd.", + "The following devices are configured for your account:" : "De volgende toestellen zijn ingesteld voor je account:", "Your apps" : "Je apps", "Active apps" : "Ingeschakelde apps", "Disabled apps" : "Uitgeschakelde apps", diff --git a/apps/settings/l10n/nl.json b/apps/settings/l10n/nl.json index 94663d0506f..d8503290ada 100644 --- a/apps/settings/l10n/nl.json +++ b/apps/settings/l10n/nl.json @@ -240,10 +240,16 @@ "Common languages" : "Gebruikelijke talen", "All languages" : "Alle talen", "Password change is disabled because the master key is disabled" : "Wachtwoordwijziging is uitgeschakeld omdat de hoofdsleutel is uitgeschakeld", + "Passwordless authentication requires a secure connection." : "Inloggen zonder wachtwoord vereist een beveiligde verbinding.", + "Please authorize your WebAuthn device." : "Autoriseer je WebAuthn toestel.", "Name your device" : "Geef je toestel een naam", "Add" : "Toevoegen", "Adding your device …" : "Je toestel toevoegen...", "Unnamed device" : "Naamloos apparaat", + "Passwordless Authentication" : "Inloggen zonder wachtwoord", + "Set up your account for passwordless authentication following the FIDO2 standard." : "Stel voor je account wachtwoordloze authenticatie in volgens de FIDO2 standaard.", + "No devices configured." : "Geen toestellen geconfigureerd.", + "The following devices are configured for your account:" : "De volgende toestellen zijn ingesteld voor je account:", "Your apps" : "Je apps", "Active apps" : "Ingeschakelde apps", "Disabled apps" : "Uitgeschakelde apps", diff --git a/apps/settings/l10n/pt_BR.js b/apps/settings/l10n/pt_BR.js index 3a0818e901c..7fc97e1adca 100644 --- a/apps/settings/l10n/pt_BR.js +++ b/apps/settings/l10n/pt_BR.js @@ -310,7 +310,7 @@ OC.L10N.register( "Authentication method" : "Método de autenticação", "Authentication required" : "Autenticação é requerida", "Server address" : "Endereço do servidor", - "Port" : "Porto", + "Port" : "Porta", "Credentials" : "Credenciais", "SMTP Username" : "Nome do Usuário SMTP", "SMTP Password" : "Senha SMTP", diff --git a/apps/settings/l10n/pt_BR.json b/apps/settings/l10n/pt_BR.json index 98c564c2973..c3f358ca2b9 100644 --- a/apps/settings/l10n/pt_BR.json +++ b/apps/settings/l10n/pt_BR.json @@ -308,7 +308,7 @@ "Authentication method" : "Método de autenticação", "Authentication required" : "Autenticação é requerida", "Server address" : "Endereço do servidor", - "Port" : "Porto", + "Port" : "Porta", "Credentials" : "Credenciais", "SMTP Username" : "Nome do Usuário SMTP", "SMTP Password" : "Senha SMTP", diff --git a/apps/settings/l10n/tr.js b/apps/settings/l10n/tr.js index 85aaad5abec..b55bffc4485 100644 --- a/apps/settings/l10n/tr.js +++ b/apps/settings/l10n/tr.js @@ -242,10 +242,20 @@ OC.L10N.register( "Common languages" : "Sık kullanılan diller", "All languages" : "Tüm diller", "Password change is disabled because the master key is disabled" : "Ana anahtar devre dışı bırakıldığından parola değişikliği devre dışı bırakıldı.", + "Passwordless authentication requires a secure connection." : "Parolasız kimlik doğrulama özelliği güvenli bir bağlantı üzerinden kullanılabilir.", + "Add WebAuthn device" : "WebAuthn aygıtı ekle", + "Please authorize your WebAuthn device." : "Lütfen WebAuthn aygıtınızın kimliğini doğrulayın.", "Name your device" : "Aygıtınıza bir ad verin", "Add" : "Ekle", "Adding your device …" : "Aygıtınız ekleniyor …", + "Server error while trying to add WebAuthn device" : "WebAuthn aygıtı eklenirken sunucu sorunu çıktı", + "Server error while trying to complete WebAuthn device registration" : "WebAuthn aygıtı kaydedilirken sunucu sorunu çıktı", "Unnamed device" : "Adsız aygıt", + "Passwordless Authentication" : "Parolasız Kimlik Doğrulaması", + "Set up your account for passwordless authentication following the FIDO2 standard." : "Hesabınız için FIDO2 standardına uygun parolasız kimlik doğrulamasını kurun.", + "No devices configured." : "Herhangi bir aygıt yapılandırılmamış.", + "The following devices are configured for your account:" : "Hesabınız için şu aygıtlar yapılandırılmış:", + "Your browser does not support WebAuthn." : "Web tarayıcınız WebAuthn desteklemiyor.", "Your apps" : "Uygulamalarınız", "Active apps" : "Etkin uygulamalar", "Disabled apps" : "Devre Dışı Uygulamalar", @@ -362,6 +372,7 @@ OC.L10N.register( "Exclude groups from sharing" : "Gruplar paylaşıma katılmasın", "These groups will still be able to receive shares, but not to initiate them." : "Bu gruplar paylaşımları alabilir ancak başlatamaz.", "Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered." : "Bu seçenek etkinleştirildiğinde, paylaşma penceresindeki kullanıcı adı otomatik olarak tamamlanır. Devre dışı bırakıldığında tam kullanıcı adının ya da e-posta adresinin yazılması gerekir.", + "Restrict username autocompletion to users within the same groups" : "Aynı gruplardaki kullanıcıların kullanıcı adlarının otomatik tamamlanması kısıtlansın", "Show disclaimer text on the public link upload page. (Only shown when the file list is hidden.)" : "Herkese açık bağlantı yükleme sayfasındaki sorumluluk reddi bildirim metni (yalnız dosya listesi gizli iken görüntülenir).", "This text will be shown on the public link upload page when the file list is hidden." : "Dosya listesi gizli iken herkese açık bağlantı yükleme sayfasında görüntülenecek sorumluluk reddi bildirimi metni.", "Default share permissions" : "Varsayılan paylaşım izinleri", diff --git a/apps/settings/l10n/tr.json b/apps/settings/l10n/tr.json index 963528b68bc..852dc6b9e88 100644 --- a/apps/settings/l10n/tr.json +++ b/apps/settings/l10n/tr.json @@ -240,10 +240,20 @@ "Common languages" : "Sık kullanılan diller", "All languages" : "Tüm diller", "Password change is disabled because the master key is disabled" : "Ana anahtar devre dışı bırakıldığından parola değişikliği devre dışı bırakıldı.", + "Passwordless authentication requires a secure connection." : "Parolasız kimlik doğrulama özelliği güvenli bir bağlantı üzerinden kullanılabilir.", + "Add WebAuthn device" : "WebAuthn aygıtı ekle", + "Please authorize your WebAuthn device." : "Lütfen WebAuthn aygıtınızın kimliğini doğrulayın.", "Name your device" : "Aygıtınıza bir ad verin", "Add" : "Ekle", "Adding your device …" : "Aygıtınız ekleniyor …", + "Server error while trying to add WebAuthn device" : "WebAuthn aygıtı eklenirken sunucu sorunu çıktı", + "Server error while trying to complete WebAuthn device registration" : "WebAuthn aygıtı kaydedilirken sunucu sorunu çıktı", "Unnamed device" : "Adsız aygıt", + "Passwordless Authentication" : "Parolasız Kimlik Doğrulaması", + "Set up your account for passwordless authentication following the FIDO2 standard." : "Hesabınız için FIDO2 standardına uygun parolasız kimlik doğrulamasını kurun.", + "No devices configured." : "Herhangi bir aygıt yapılandırılmamış.", + "The following devices are configured for your account:" : "Hesabınız için şu aygıtlar yapılandırılmış:", + "Your browser does not support WebAuthn." : "Web tarayıcınız WebAuthn desteklemiyor.", "Your apps" : "Uygulamalarınız", "Active apps" : "Etkin uygulamalar", "Disabled apps" : "Devre Dışı Uygulamalar", @@ -360,6 +370,7 @@ "Exclude groups from sharing" : "Gruplar paylaşıma katılmasın", "These groups will still be able to receive shares, but not to initiate them." : "Bu gruplar paylaşımları alabilir ancak başlatamaz.", "Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered." : "Bu seçenek etkinleştirildiğinde, paylaşma penceresindeki kullanıcı adı otomatik olarak tamamlanır. Devre dışı bırakıldığında tam kullanıcı adının ya da e-posta adresinin yazılması gerekir.", + "Restrict username autocompletion to users within the same groups" : "Aynı gruplardaki kullanıcıların kullanıcı adlarının otomatik tamamlanması kısıtlansın", "Show disclaimer text on the public link upload page. (Only shown when the file list is hidden.)" : "Herkese açık bağlantı yükleme sayfasındaki sorumluluk reddi bildirim metni (yalnız dosya listesi gizli iken görüntülenir).", "This text will be shown on the public link upload page when the file list is hidden." : "Dosya listesi gizli iken herkese açık bağlantı yükleme sayfasında görüntülenecek sorumluluk reddi bildirimi metni.", "Default share permissions" : "Varsayılan paylaşım izinleri", diff --git a/apps/settings/lib/Activity/SecurityProvider.php b/apps/settings/lib/Activity/SecurityProvider.php index 962fa63d792..568006d03cc 100644 --- a/apps/settings/lib/Activity/SecurityProvider.php +++ b/apps/settings/lib/Activity/SecurityProvider.php @@ -63,8 +63,8 @@ class SecurityProvider implements IProvider { case 'twofactor_success': $params = $event->getSubjectParameters(); $event->setParsedSubject($l->t('You successfully logged in using two-factor authentication (%1$s)', [ - $params['provider'], - ])); + $params['provider'], + ])); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/password.png'))); } else { @@ -74,8 +74,8 @@ class SecurityProvider implements IProvider { case 'twofactor_failed': $params = $event->getSubjectParameters(); $event->setParsedSubject($l->t('A login attempt using two-factor authentication failed (%1$s)', [ - $params['provider'], - ])); + $params['provider'], + ])); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/password.png'))); } else { diff --git a/apps/settings/lib/AppInfo/Application.php b/apps/settings/lib/AppInfo/Application.php index 230b2377cda..f53a5ddcf51 100644 --- a/apps/settings/lib/AppInfo/Application.php +++ b/apps/settings/lib/AppInfo/Application.php @@ -60,7 +60,7 @@ class Application extends App { /** * @param array $urlParams */ - public function __construct(array $urlParams=[]){ + public function __construct(array $urlParams=[]) { parent::__construct(self::APP_ID, $urlParams); $container = $this->getContainer(); @@ -73,11 +73,11 @@ class Application extends App { * Core class wrappers */ /** FIXME: Remove once OC_User is non-static and mockable */ - $container->registerService('isAdmin', function() { + $container->registerService('isAdmin', function () { return \OC_User::isAdminUser(\OC_User::getUser()); }); /** FIXME: Remove once OC_SubAdmin is non-static and mockable */ - $container->registerService('isSubAdmin', function(IContainer $c) { + $container->registerService('isSubAdmin', function (IContainer $c) { $userObject = \OC::$server->getUserSession()->getUser(); $isSubAdmin = false; if($userObject !== null) { @@ -85,7 +85,7 @@ class Application extends App { } return $isSubAdmin; }); - $container->registerService('userCertificateManager', function(IContainer $c) { + $container->registerService('userCertificateManager', function (IContainer $c) { return $c->query('ServerContainer')->getCertificateManager(); }, false); $container->registerService('systemCertificateManager', function (IContainer $c) { diff --git a/apps/settings/lib/BackgroundJobs/VerifyUserData.php b/apps/settings/lib/BackgroundJobs/VerifyUserData.php index e43f1e0e347..a5c46c603bf 100644 --- a/apps/settings/lib/BackgroundJobs/VerifyUserData.php +++ b/apps/settings/lib/BackgroundJobs/VerifyUserData.php @@ -29,7 +29,6 @@ namespace OCA\Settings\BackgroundJobs; - use OC\Accounts\AccountManager; use OC\BackgroundJob\Job; use OC\BackgroundJob\JobList; diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index e822436702f..f40a8024b6d 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -247,7 +247,7 @@ class AppSettingsController extends Controller { $dependencyAnalyzer = new DependencyAnalyzer(new Platform($this->config), $this->l10n); // Extend existing app details - $apps = array_map(function($appData) use ($dependencyAnalyzer) { + $apps = array_map(function ($appData) use ($dependencyAnalyzer) { if (isset($appData['appstoreData'])) { $appstoreData = $appData['appstoreData']; $appData['screenshot'] = isset($appstoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($appstoreData['screenshots'][0]['url']) : ''; diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index 6f3bb539eff..e386f29a94e 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -146,9 +146,9 @@ class CheckSetupController extends Controller { } /** - * Checks if the Nextcloud server can connect to a specific URL using both HTTPS and HTTP - * @return bool - */ + * Checks if the Nextcloud server can connect to a specific URL using both HTTPS and HTTP + * @return bool + */ private function isSiteReachable($sitename) { $httpSiteName = 'http://' . $sitename . '/'; $httpsSiteName = 'https://' . $sitename . '/'; diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 395412cbb6f..5a4ebd122f8 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -184,7 +184,7 @@ class UsersController extends Controller { if(!$isLDAPUsed) { if ($this->isAdmin) { $disabledUsers = $this->userManager->countDisabledUsers(); - $userCount = array_reduce($this->userManager->countUsers(), function($v, $w) { + $userCount = array_reduce($this->userManager->countUsers(), function ($v, $w) { return $v + (int)$w; }, 0); } else { diff --git a/apps/settings/lib/Controller/WebAuthnController.php b/apps/settings/lib/Controller/WebAuthnController.php index e9b45105a81..cbc396b675f 100644 --- a/apps/settings/lib/Controller/WebAuthnController.php +++ b/apps/settings/lib/Controller/WebAuthnController.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/apps/settings/lib/Settings/Personal/Additional.php b/apps/settings/lib/Settings/Personal/Additional.php index 93c5df2dc1e..5fff714b245 100644 --- a/apps/settings/lib/Settings/Personal/Additional.php +++ b/apps/settings/lib/Settings/Personal/Additional.php @@ -24,7 +24,6 @@ namespace OCA\Settings\Settings\Personal; - use OCP\AppFramework\Http\TemplateResponse; use OCP\Settings\ISettings; diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php index 3bf1f23d752..e6bc4388359 100644 --- a/apps/settings/lib/Settings/Personal/PersonalInfo.php +++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php @@ -175,7 +175,7 @@ class PersonalInfo implements ISettings { */ private function getGroups(IUser $user) { $groups = array_map( - function(IGroup $group) { + function (IGroup $group) { return $group->getDisplayName(); }, $this->groupManager->getUserGroups($user) @@ -239,7 +239,7 @@ class PersonalInfo implements ISettings { $localeCodes = $this->l10nFactory->findAvailableLocales(); - $userLocale = array_filter($localeCodes, function($value) use ($userLocaleString) { + $userLocale = array_filter($localeCodes, function ($value) use ($userLocaleString) { return $userLocaleString === $value['code']; }); @@ -248,7 +248,7 @@ class PersonalInfo implements ISettings { $userLocale = reset($userLocale); } - $localesForLanguage = array_filter($localeCodes, function($localeCode) use ($userLang) { + $localesForLanguage = array_filter($localeCodes, function ($localeCode) use ($userLang) { return 0 === strpos($localeCode['code'], $userLang); }); diff --git a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php index e4e2b3fe935..4608e472ff4 100644 --- a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php +++ b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php index 02e84052ff4..0eccf78cc90 100644 --- a/apps/settings/templates/help.php +++ b/apps/settings/templates/help.php @@ -1,5 +1,5 @@ <?php -\OC_Util::addStyle( 'settings', "settings" ); +\OC_Util::addStyle('settings', "settings"); ?> <div id="app-navigation"> <ul> diff --git a/apps/settings/templates/settings/admin/overview.php b/apps/settings/templates/settings/admin/overview.php index 5b36f840ad0..9eb6fc1c1f5 100644 --- a/apps/settings/templates/settings/admin/overview.php +++ b/apps/settings/templates/settings/admin/overview.php @@ -51,7 +51,7 @@ <ul class="info hidden"></ul> </div> <p id="postsetupchecks-hint" class="hidden"> - <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])] )); ?> + <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])])); ?> </p> <p class="extra-top-margin"> diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php index c7f3ff16b70..0cfbb3e8492 100644 --- a/apps/settings/templates/settings/admin/sharing.php +++ b/apps/settings/templates/settings/admin/sharing.php @@ -44,10 +44,10 @@ <label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/> </p> <p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>"> - <?php p($l->t( 'Expire after ' )); ?> + <?php p($l->t('Expire after ')); ?> <input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>" value='<?php p($_['shareInternalExpireAfterNDays']) ?>' /> - <?php p($l->t( 'days' )); ?> + <?php p($l->t('days')); ?> <input type="checkbox" name="shareapi_internal_enforce_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox" value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> /> <label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> @@ -76,10 +76,10 @@ </p> <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>"> - <?php p($l->t( 'Expire after ' )); ?> + <?php p($l->t('Expire after ')); ?> <input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>" value='<?php p($_['shareExpireAfterNDays']) ?>' /> - <?php p($l->t( 'days' )); ?> + <?php p($l->t('days')); ?> <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox" value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> /> <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> diff --git a/apps/settings/templates/settings/empty.php b/apps/settings/templates/settings/empty.php index 0ed8a873d3c..e8999f5f07e 100644 --- a/apps/settings/templates/settings/empty.php +++ b/apps/settings/templates/settings/empty.php @@ -21,5 +21,4 @@ * */ - # used for Personal/Additional settings as fallback for legacy settings -?> + # used for Personal/Additional settings as fallback for legacy settings
\ No newline at end of file diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php index e32c4ed2fc9..d6658e9c631 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', 'certificates']); script('core', 'setupchecks'); script('files', 'jquery.fileupload'); diff --git a/apps/settings/tests/AppInfo/ApplicationTest.php b/apps/settings/tests/AppInfo/ApplicationTest.php index f7d71635a67..794adc25d7f 100644 --- a/apps/settings/tests/AppInfo/ApplicationTest.php +++ b/apps/settings/tests/AppInfo/ApplicationTest.php @@ -25,7 +25,6 @@ namespace OCA\Settings\Tests\AppInfo; - use OC\User\Session; use OCA\Settings\AppInfo\Application; use OCA\Settings\Controller\AdminSettingsController; diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index c15f3b8f23a..86acf8acced 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -116,7 +116,7 @@ class CheckSetupControllerTest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->l10n->expects($this->any()) ->method('t') - ->willReturnCallback(function($message, array $replace) { + ->willReturnCallback(function ($message, array $replace) { return vsprintf($message, $replace); }); $this->dispatcher = $this->getMockBuilder(EventDispatcherInterface::class) @@ -148,7 +148,7 @@ class CheckSetupControllerTest extends TestCase { $this->dateTimeFormatter, $this->memoryInfo, $this->secureRandom, - ]) + ]) ->setMethods([ 'isReadOnlyConfig', 'hasValidTransactionIsolationLevel', @@ -203,7 +203,7 @@ class CheckSetupControllerTest extends TestCase { $this->config->expects($this->at(0)) ->method('getSystemValue') ->with('has_internet_connection', true) - ->willReturn(true); + ->willReturn(true); $this->config->expects($this->at(1)) ->method('getSystemValue') @@ -232,7 +232,7 @@ class CheckSetupControllerTest extends TestCase { $this->config->expects($this->at(0)) ->method('getSystemValue') ->with('has_internet_connection', true) - ->willReturn(true); + ->willReturn(true); $this->config->expects($this->at(1)) ->method('getSystemValue') @@ -513,7 +513,7 @@ class CheckSetupControllerTest extends TestCase { ->willReturn(true); $this->urlGenerator->method('linkToDocs') - ->willReturnCallback(function(string $key): string { + ->willReturnCallback(function (string $key): string { if ($key === 'admin-performance') { return 'http://docs.example.org/server/go.php?to=admin-performance'; } @@ -536,7 +536,7 @@ class CheckSetupControllerTest extends TestCase { }); $this->urlGenerator->method('getAbsoluteURL') - ->willReturnCallback(function(string $url): string { + ->willReturnCallback(function (string $url): string { if ($url === 'index.php/settings/admin') { return 'https://server/index.php/settings/admin'; } @@ -956,7 +956,7 @@ class CheckSetupControllerTest extends TestCase { 'No errors have been found.', Http::STATUS_OK, [ - 'Content-Type' => 'text/plain', + 'Content-Type' => 'text/plain', ] ); $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles()); @@ -970,7 +970,7 @@ class CheckSetupControllerTest extends TestCase { $this->checker ->expects($this->once()) ->method('getResults') - ->willReturn( [ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]); + ->willReturn([ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]); $expected = new DataDisplayResponse( 'Technical information @@ -1367,7 +1367,7 @@ Array ', Http::STATUS_OK, [ - 'Content-Type' => 'text/plain', + 'Content-Type' => 'text/plain', ] ); $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles()); @@ -1391,7 +1391,7 @@ Array */ public function testIsMysqlUsedWithoutUTF8MB4(string $db, bool $useUTF8MB4, bool $expected) { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) use ($db, $useUTF8MB4) { + ->willReturnCallback(function ($key, $default) use ($db, $useUTF8MB4) { if ($key === 'dbtype') { return $db; } @@ -1439,7 +1439,7 @@ Array */ public function testIsEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(string $mode, string $className, bool $expected) { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) use ($mode, $className) { + ->willReturnCallback(function ($key, $default) use ($mode, $className) { if ($key === 'objectstore' && $mode === 'singlebucket') { return ['class' => $className]; } diff --git a/apps/settings/tests/Controller/MailSettingsControllerTest.php b/apps/settings/tests/Controller/MailSettingsControllerTest.php index f0996045006..7d17ac80407 100644 --- a/apps/settings/tests/Controller/MailSettingsControllerTest.php +++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php @@ -160,7 +160,7 @@ class MailSettingsControllerTest extends \Test\TestCase { $this->l->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $this->userSession diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index 9253c9d7d2e..65258252016 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -113,7 +113,7 @@ class UsersControllerTest extends \Test\TestCase { $this->encryptionModule = $this->createMock(IEncryptionModule::class); $this->encryptionManager->expects($this->any())->method('getEncryptionModules') - ->willReturn(['encryptionModule' => ['callback' => function() { return $this->encryptionModule;}]]); + ->willReturn(['encryptionModule' => ['callback' => function () { return $this->encryptionModule;}]]); } @@ -540,7 +540,7 @@ class UsersControllerTest extends \Test\TestCase { ->willReturn($encryptionEnabled); $this->encryptionManager->expects($this->any()) ->method('getEncryptionModule') - ->willReturnCallback(function() use ($encryptionModuleLoaded) { + ->willReturnCallback(function () use ($encryptionModuleLoaded) { if ($encryptionModuleLoaded) return $this->encryptionModule; else throw new ModuleDoesNotExistsException(); }); diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index 0c6d26151b1..c32bb601f31 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -90,7 +90,7 @@ class NewUserMailHelperTest extends TestCase { $this->config ->expects($this->any()) ->method('getSystemValue') - ->willReturnCallback(function($arg) { + ->willReturnCallback(function ($arg) { switch ($arg) { case 'secret': return 'MyInstanceWideSecret'; diff --git a/apps/settings/tests/Settings/Admin/ServerTest.php b/apps/settings/tests/Settings/Admin/ServerTest.php index 3758d8635de..d066f5c2f49 100644 --- a/apps/settings/tests/Settings/Admin/ServerTest.php +++ b/apps/settings/tests/Settings/Admin/ServerTest.php @@ -40,7 +40,6 @@ use OCP\IDBConnection; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; - /** * @group DB */ diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php index c1c6ac629f9..a588ee3b6ca 100644 --- a/apps/sharebymail/lib/Activity.php +++ b/apps/sharebymail/lib/Activity.php @@ -119,8 +119,8 @@ class Activity implements IProvider { if ($event->getSubject() === self::SUBJECT_SHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('Shared with %1$s', [ - $parsedParameters['email']['name'], - ])) + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('Shared with {email}'), [ 'email' => $parsedParameters['email'], ]); @@ -145,8 +145,8 @@ class Activity implements IProvider { } } else if ($event->getSubject() === self::SUBJECT_UNSHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('Unshared from %1$s', [ - $parsedParameters['email']['name'], - ])) + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('Unshared from {email}'), [ 'email' => $parsedParameters['email'], ]); @@ -207,9 +207,9 @@ class Activity implements IProvider { if ($event->getSubject() === self::SUBJECT_SHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('You shared %1$s with %2$s by mail', [ - $parsedParameters['file']['path'], - $parsedParameters['email']['name'], - ])) + $parsedParameters['file']['path'], + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('You shared {file} with {email} by mail'), $parsedParameters); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/share.png'))); @@ -230,9 +230,9 @@ class Activity implements IProvider { } } else if ($event->getSubject() === self::SUBJECT_UNSHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('You unshared %1$s from %2$s by mail', [ - $parsedParameters['file']['path'], - $parsedParameters['email']['name'], - ])) + $parsedParameters['file']['path'], + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('You unshared {file} from {email} by mail'), $parsedParameters); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/share.png'))); diff --git a/apps/sharebymail/lib/AppInfo/Application.php b/apps/sharebymail/lib/AppInfo/Application.php index 8e5cd4b35c7..d294f9716ea 100644 --- a/apps/sharebymail/lib/AppInfo/Application.php +++ b/apps/sharebymail/lib/AppInfo/Application.php @@ -26,7 +26,6 @@ namespace OCA\ShareByMail\AppInfo; - use OCA\ShareByMail\Capabilities; use OCA\ShareByMail\Settings; use OCP\AppFramework\App; diff --git a/apps/sharebymail/lib/Capabilities.php b/apps/sharebymail/lib/Capabilities.php index 2687c2f4506..e703b9b1e5f 100644 --- a/apps/sharebymail/lib/Capabilities.php +++ b/apps/sharebymail/lib/Capabilities.php @@ -23,7 +23,6 @@ namespace OCA\ShareByMail; - use OCP\Capabilities\ICapability; class Capabilities implements ICapability { diff --git a/apps/sharebymail/lib/Settings.php b/apps/sharebymail/lib/Settings.php index 8a0761055c5..721050c83c4 100644 --- a/apps/sharebymail/lib/Settings.php +++ b/apps/sharebymail/lib/Settings.php @@ -23,7 +23,6 @@ namespace OCA\ShareByMail; - use OCA\ShareByMail\Settings\SettingsManager; class Settings { diff --git a/apps/sharebymail/lib/Settings/SettingsManager.php b/apps/sharebymail/lib/Settings/SettingsManager.php index 348e8536f95..8e784e80237 100644 --- a/apps/sharebymail/lib/Settings/SettingsManager.php +++ b/apps/sharebymail/lib/Settings/SettingsManager.php @@ -23,7 +23,6 @@ namespace OCA\ShareByMail\Settings; - use OCP\IConfig; class SettingsManager { diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php index 56e22f94691..5799e7e9ccb 100644 --- a/apps/sharebymail/tests/CapabilitiesTest.php +++ b/apps/sharebymail/tests/CapabilitiesTest.php @@ -39,9 +39,9 @@ class CapabilitiesTest extends TestCase { public function testGetCapabilities() { $capabilities = [ - 'files_sharing' => + 'files_sharing' => [ - 'sharebymail' => + 'sharebymail' => [ 'enabled' => true, 'upload_files_drop' => ['enabled' => true], diff --git a/apps/sharebymail/tests/SettingsTest.php b/apps/sharebymail/tests/SettingsTest.php index 91457dd7153..220f455a26a 100644 --- a/apps/sharebymail/tests/SettingsTest.php +++ b/apps/sharebymail/tests/SettingsTest.php @@ -24,7 +24,6 @@ namespace OCA\ShareByMail\Tests; - use OCA\ShareByMail\Settings; use OCA\ShareByMail\Settings\SettingsManager; use Test\TestCase; @@ -56,13 +55,13 @@ class SettingsTest extends TestCase { ]; $after = [ - 'oc_appconfig' => - json_encode([ - 'key1' => 'value1', - 'key2' => 'value2', - 'shareByMailEnabled' => true - ]), - 'oc_foo' => 'oc_bar' + 'oc_appconfig' => + json_encode([ + 'key1' => 'value1', + 'key2' => 'value2', + 'shareByMailEnabled' => true + ]), + 'oc_foo' => 'oc_bar' ]; $this->instance->announceShareProvider(['array' => &$before]); diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 7bdadd79c2b..f340fbfa35d 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -30,7 +30,6 @@ namespace OCA\ShareByMail\Tests; - use OC\CapabilitiesManager; use OC\Mail\Message; use OCA\ShareByMail\Settings\SettingsManager; @@ -114,7 +113,7 @@ class ShareByMailProviderTest extends TestCase { $this->l = $this->getMockBuilder(IL10N::class)->getMock(); $this->l->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); @@ -376,7 +375,7 @@ class ShareByMailProviderTest extends TestCase { ->with('files_sharing.sharecontroller.showShare', ['token' => 'token']); $instance->expects($this->once())->method('sendMailNotification') ->willReturnCallback( - function() { + function () { throw new \Exception('should be converted to a hint exception'); } ); diff --git a/apps/systemtags/appinfo/app.php b/apps/systemtags/appinfo/app.php index 5bd5c42d482..e4bf9b91fa4 100644 --- a/apps/systemtags/appinfo/app.php +++ b/apps/systemtags/appinfo/app.php @@ -32,14 +32,14 @@ use OCA\SystemTags\Activity\Listener; $eventDispatcher = \OC::$server->getEventDispatcher(); $eventDispatcher->addListener( 'OCA\Files::loadAdditionalScripts', - function() { + function () { // FIXME: no public API for these ? \OCP\Util::addScript('dist/systemtags'); \OCP\Util::addScript('systemtags', 'systemtags'); } ); -$managerListener = function(ManagerEvent $event) { +$managerListener = function (ManagerEvent $event) { /** @var \OCA\SystemTags\Activity\Listener $listener */ $listener = \OC::$server->query(Listener::class); $listener->event($event); @@ -49,7 +49,7 @@ $eventDispatcher->addListener(ManagerEvent::EVENT_CREATE, $managerListener); $eventDispatcher->addListener(ManagerEvent::EVENT_DELETE, $managerListener); $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener); -$mapperListener = function(MapperEvent $event) { +$mapperListener = function (MapperEvent $event) { $application = new \OCP\AppFramework\App('systemtags'); /** @var \OCA\SystemTags\Activity\Listener $listener */ $listener = \OC::$server->query(Listener::class); @@ -69,4 +69,3 @@ $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); 'name' => $l->t('Tags'), ]; }); - diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php index fcf37d93d6b..862846a712a 100644 --- a/apps/systemtags/lib/Activity/Provider.php +++ b/apps/systemtags/lib/Activity/Provider.php @@ -116,23 +116,23 @@ class Provider implements IProvider { if ($event->getSubject() === self::ASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { $event->setParsedSubject($this->l->t('System tag %1$s added by the system', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Added system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('Added system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Added system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else { $event->setParsedSubject($this->l->t('%1$s added system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} added system tag {systemtag}'), [ 'actor' => $parsedParameters['actor'], 'systemtag' => $parsedParameters['systemtag'], @@ -141,23 +141,23 @@ class Provider implements IProvider { } else if ($event->getSubject() === self::UNASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { $event->setParsedSubject($this->l->t('System tag %1$s removed by the system', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Removed system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('Removed system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Removed system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else { $event->setParsedSubject($this->l->t('%1$s removed system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} removed system tag {systemtag}'), [ 'actor' => $parsedParameters['actor'], 'systemtag' => $parsedParameters['systemtag'], @@ -188,86 +188,86 @@ class Provider implements IProvider { if ($event->getSubject() === self::CREATE_TAG) { if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You created system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You created system tag {systemtag}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s created system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} created system tag {systemtag}'), $parsedParameters); } } else if ($event->getSubject() === self::DELETE_TAG) { if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You deleted system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You deleted system tag {systemtag}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s deleted system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} deleted system tag {systemtag}'), $parsedParameters); } } else if ($event->getSubject() === self::UPDATE_TAG) { if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You updated system tag %2$s to %1$s', [ - $this->generatePlainSystemTag($parsedParameters['newsystemtag']), - $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['newsystemtag']), + $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), + ])) ->setRichSubject($this->l->t('You updated system tag {oldsystemtag} to {newsystemtag}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s updated system tag %3$s to %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['newsystemtag']), - $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['newsystemtag']), + $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), + ])) ->setRichSubject($this->l->t('{actor} updated system tag {oldsystemtag} to {newsystemtag}'), $parsedParameters); } } else if ($event->getSubject() === self::ASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { unset($parsedParameters['actor']); $event->setParsedSubject($this->l->t('System tag %2$s was added to %1$s by the system', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('System tag {systemtag} was added to {file} by the system'), $parsedParameters); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You added system tag %2$s to %1$s', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You added system tag {systemtag} to {file}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s added system tag %3$s to %2$s', [ - $parsedParameters['actor']['name'], - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} added system tag {systemtag} to {file}'), $parsedParameters); } } else if ($event->getSubject() === self::UNASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { unset($parsedParameters['actor']); $event->setParsedSubject($this->l->t('System tag %2$s was removed from %1$s by the system', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('System tag {systemtag} was removed from {file} by the system'), $parsedParameters); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You removed system tag %2$s from %1$s', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You removed system tag {systemtag} from {file}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s removed system tag %3$s from %2$s', [ - $parsedParameters['actor']['name'], - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} removed system tag {systemtag} from {file}'), $parsedParameters); } } else { diff --git a/apps/systemtags/lib/Activity/Setting.php b/apps/systemtags/lib/Activity/Setting.php index 09c3bdc8fa1..65e35a004ca 100644 --- a/apps/systemtags/lib/Activity/Setting.php +++ b/apps/systemtags/lib/Activity/Setting.php @@ -23,7 +23,6 @@ namespace OCA\SystemTags\Activity; - use OCP\Activity\ISetting; use OCP\IL10N; diff --git a/apps/systemtags/lib/Controller/LastUsedController.php b/apps/systemtags/lib/Controller/LastUsedController.php index adf0c257eef..10707463d48 100644 --- a/apps/systemtags/lib/Controller/LastUsedController.php +++ b/apps/systemtags/lib/Controller/LastUsedController.php @@ -23,7 +23,6 @@ namespace OCA\SystemTags\Controller; - use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; use OCP\IConfig; @@ -56,6 +55,6 @@ class LastUsedController extends Controller { public function getLastUsedTagIds() { $lastUsed = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'systemtags', 'last_used', '[]'); $tagIds = json_decode($lastUsed, true); - return new DataResponse(array_map(function($id) { return (string) $id; }, $tagIds)); + return new DataResponse(array_map(function ($id) { return (string) $id; }, $tagIds)); } } diff --git a/apps/systemtags/templates/list.php b/apps/systemtags/templates/list.php index 252199d2fc4..80c20e24eda 100644 --- a/apps/systemtags/templates/list.php +++ b/apps/systemtags/templates/list.php @@ -18,14 +18,14 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerSize" class="hidden column-size"> <a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> </th> </tr> </thead> diff --git a/apps/systemtags/tests/Activity/SettingTest.php b/apps/systemtags/tests/Activity/SettingTest.php index 73d75a3d632..170695a0661 100644 --- a/apps/systemtags/tests/Activity/SettingTest.php +++ b/apps/systemtags/tests/Activity/SettingTest.php @@ -61,17 +61,17 @@ class SettingTest extends TestCase { public function testCanChangeStream() { $this->assertSame(true, $this->setting->canChangeStream()); - } - - public function testIsDefaultEnabledStream() { + } + + public function testIsDefaultEnabledStream() { $this->assertSame(true, $this->setting->isDefaultEnabledStream()); - } - - public function testCanChangeMail() { + } + + public function testCanChangeMail() { $this->assertSame(true, $this->setting->canChangeMail()); - } - - public function testIsDefaultEnabledMail() { + } + + public function testIsDefaultEnabledMail() { $this->assertSame(false, $this->setting->isDefaultEnabledMail()); } } diff --git a/apps/testing/appinfo/app.php b/apps/testing/appinfo/app.php index ae8f9841b43..48d8da8c20b 100644 --- a/apps/testing/appinfo/app.php +++ b/apps/testing/appinfo/app.php @@ -22,4 +22,3 @@ */ $app = new \OCA\Testing\AppInfo\Application(); - diff --git a/apps/testing/lib/AppInfo/Application.php b/apps/testing/lib/AppInfo/Application.php index e57531a8d2a..f5eb2ef9b30 100644 --- a/apps/testing/lib/AppInfo/Application.php +++ b/apps/testing/lib/AppInfo/Application.php @@ -28,7 +28,7 @@ use OCA\Testing\AlternativeHomeUserBackend; use OCP\AppFramework\App; class Application extends App { - public function __construct (array $urlParams = []) { + public function __construct(array $urlParams = []) { $appName = 'testing'; parent::__construct($appName, $urlParams); diff --git a/apps/theming/appinfo/app.php b/apps/theming/appinfo/app.php index 114ff60ba53..c942a85bc75 100644 --- a/apps/theming/appinfo/app.php +++ b/apps/theming/appinfo/app.php @@ -57,4 +57,4 @@ $linkToJs = \OC::$server->getURLGenerator()->linkToRoute( 'src' => $linkToJs, 'nonce' => \OC::$server->getContentSecurityPolicyNonceManager()->getNonce() ], '' -);
\ No newline at end of file +); diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php index fe7a5a94659..13196662eb0 100644 --- a/apps/theming/appinfo/routes.php +++ b/apps/theming/appinfo/routes.php @@ -84,4 +84,3 @@ return ['routes' => [ 'requirements' => ['image' => '.+'] ], ]]; - diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index fc07ac6619d..413e2a9e64f 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -180,7 +180,7 @@ class ThemingDefaults extends \OC_Defaults { ]; $navigation = $this->navigationManager->getAll(INavigationManager::TYPE_GUEST); - $guestNavigation = array_map(function($nav) { + $guestNavigation = array_map(function ($nav) { return [ 'text' => $nav['name'], 'url' => $nav['href'] @@ -198,7 +198,7 @@ class ThemingDefaults extends \OC_Defaults { $divider = ' · '; } } - if($legalLinks !== '' ) { + if($legalLinks !== '') { $footer .= '<br/>' . $legalLinks; } @@ -353,7 +353,7 @@ class ThemingDefaults extends \OC_Defaults { } catch (AppPathNotFoundException $e) {} $route = $this->urlGenerator->linkToRoute('theming.Theming.getManifest'); } - if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image )) { + if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image)) { $route = $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]); } diff --git a/apps/theming/templates/settings-admin.php b/apps/theming/templates/settings-admin.php index d7de5b75053..d6bbd77dc3b 100644 --- a/apps/theming/templates/settings-admin.php +++ b/apps/theming/templates/settings-admin.php @@ -1,6 +1,6 @@ <?php /** - + * * * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Jan-Christoph Borchardt <hey@jancborchardt.net> diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php index d70a03923ff..1f871d101d8 100644 --- a/apps/theming/tests/CapabilitiesTest.php +++ b/apps/theming/tests/CapabilitiesTest.php @@ -181,13 +181,13 @@ class CapabilitiesTest extends TestCase { ->willReturn($background); $this->url->expects($this->exactly(4)) ->method('getAbsoluteURL') - ->willReturnCallback(function($url) use($baseUrl) { + ->willReturnCallback(function ($url) use ($baseUrl) { return $baseUrl . $url; }); } else { $this->url->expects($this->exactly(3)) ->method('getAbsoluteURL') - ->willReturnCallback(function($url) use($baseUrl) { + ->willReturnCallback(function ($url) use ($baseUrl) { return $baseUrl . $url; }); } diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index c159c7237ea..59608f41a68 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -27,7 +27,6 @@ namespace OCA\Theming\Tests\Controller; - use OC\Files\SimpleFS\SimpleFile; use OC\IntegrityCheck\Helpers\FileAccessHelper; use OCA\Theming\Controller\IconController; diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index 240cca776c0..d1890f7df5c 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -151,7 +151,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->once()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); $this->scssCacher @@ -210,7 +210,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -241,7 +241,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -289,7 +289,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -333,7 +333,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -394,7 +394,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -470,7 +470,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -544,7 +544,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -602,7 +602,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); @@ -641,7 +641,7 @@ class ThemingControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($str) { + ->willReturnCallback(function ($str) { return $str; }); diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index fbdadf697e1..19896be21a2 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -304,7 +304,7 @@ class ImageManagerTest extends TestCase { $this->createMock(ISimpleFolder::class), $this->createMock(ISimpleFolder::class), $this->createMock(ISimpleFolder::class) - ]; + ]; foreach ($folders as $index=>$folder) { $folder->expects($this->any()) ->method('getName') diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php index a2e9a154d9f..61dbffb3214 100644 --- a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php +++ b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php @@ -57,7 +57,7 @@ class CheckBackupCodes extends QueuedJob { } protected function run($argument) { - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $providers = $this->registry->getProviderStates($user); $isTwoFactorAuthenticated = $this->twofactorManager->isTwoFactorAuthenticated($user); diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php index 7182ad561aa..4877be9fa37 100644 --- a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php +++ b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php @@ -72,7 +72,7 @@ class RememberBackupCodesJob extends TimedJob { } $providers = $this->registry->getProviderStates($user); - $state2fa = array_reduce($providers, function(bool $carry, bool $state) { + $state2fa = array_reduce($providers, function (bool $carry, bool $state) { return $carry || $state; }, false); diff --git a/apps/twofactor_backupcodes/lib/Db/BackupCode.php b/apps/twofactor_backupcodes/lib/Db/BackupCode.php index 54fbfef2bc2..bbd40bf3643 100644 --- a/apps/twofactor_backupcodes/lib/Db/BackupCode.php +++ b/apps/twofactor_backupcodes/lib/Db/BackupCode.php @@ -24,7 +24,6 @@ namespace OCA\TwoFactorBackupCodes\Db; - use OCP\AppFramework\Db\Entity; /** diff --git a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php index b742f606c61..6d60f589e52 100644 --- a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php +++ b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php @@ -143,7 +143,7 @@ class BackupCodesProvider implements IProvider, IProvidesPersonalSettings { * @return boolean */ public function isActive(IUser $user): bool { - $appIds = array_filter($this->appManager->getEnabledAppsForUser($user), function($appId) { + $appIds = array_filter($this->appManager->getEnabledAppsForUser($user), function ($appId) { return $appId !== $this->appName; }); foreach ($appIds as $appId) { diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php index 21e8f853823..3b443c9fe6b 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php @@ -69,7 +69,7 @@ class CheckBackupCodeTest extends TestCase { $this->user = $this->createMock(IUser::class); $this->userManager->method('callForSeenUsers') - ->willReturnCallback(function(\Closure $e) { + ->willReturnCallback(function (\Closure $e) { $e($this->user); }); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php index 33f9de858a4..99d11504710 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php @@ -68,7 +68,7 @@ class ClearNotificationsTest extends TestCase { $this->notificationManager->expects($this->once()) ->method('markProcessed') - ->with($this->callback(function(INotification $n) { + ->with($this->callback(function (INotification $n) { return $n->getUser() === 'fritz' && $n->getApp() === 'twofactor_backupcodes' && $n->getObjectType() === 'create' && diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php index e0cfa80b29a..996dba1a9b6 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php @@ -53,7 +53,7 @@ class NotifierTest extends TestCase { $this->l = $this->createMock(IL10N::class); $this->l->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return vsprintf($string, $args); }); $this->factory = $this->createMock(IFactory::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php index 2ade2046e75..69df82a43fd 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php @@ -125,13 +125,13 @@ class BackupCodesProviderTest extends TestCase { ->willReturn([ 'twofactor_backupcodes', 'mail', - ]); + ]); $this->appManager->expects($this->once()) ->method('getAppInfo') ->with('mail') ->willReturn([ 'two-factor-providers' => [], - ]); + ]); $this->assertFalse($this->provider->isActive($user)); } @@ -145,7 +145,7 @@ class BackupCodesProviderTest extends TestCase { ->willReturn([ 'twofactor_backupcodes', 'twofactor_u2f', - ]); + ]); $this->appManager->expects($this->once()) ->method('getAppInfo') ->with('twofactor_u2f') @@ -153,7 +153,7 @@ class BackupCodesProviderTest extends TestCase { 'two-factor-providers' => [ 'OCA\TwoFactorU2F\Provider\U2FProvider', ], - ]); + ]); $this->assertTrue($this->provider->isActive($user)); } diff --git a/apps/updatenotification/l10n/zh_TW.js b/apps/updatenotification/l10n/zh_TW.js index 6bf1387c363..f9cb310d65b 100644 --- a/apps/updatenotification/l10n/zh_TW.js +++ b/apps/updatenotification/l10n/zh_TW.js @@ -24,6 +24,7 @@ OC.L10N.register( "The selected update channel does not support updates of the server." : "所選的更新頻道不提供伺服器軟體的更新", "Please make sure your config.php does not set <samp>appstoreenabled</samp> to false." : "請確定您的 config.php 設定檔中並沒有將<samp>appstoreenabled</samp>的值設定為 false", "Could not connect to the appstore or the appstore returned no updates at all. Search manually for updates or make sure your server has access to the internet and can connect to the appstore." : "無法連線至應用程式商店,或者應用程式商店回應無任何更新,請您手動搜尋更新,或者修復您伺服器的網際網路連線,讓它可以連線至應用程式商店。", - "View changelog" : "檢視版本更新紀錄" + "View changelog" : "檢視版本更新紀錄", + "Beta" : "Beta 測試版" }, "nplurals=1; plural=0;"); diff --git a/apps/updatenotification/l10n/zh_TW.json b/apps/updatenotification/l10n/zh_TW.json index 12496029f5b..9e65aadf9ef 100644 --- a/apps/updatenotification/l10n/zh_TW.json +++ b/apps/updatenotification/l10n/zh_TW.json @@ -22,6 +22,7 @@ "The selected update channel does not support updates of the server." : "所選的更新頻道不提供伺服器軟體的更新", "Please make sure your config.php does not set <samp>appstoreenabled</samp> to false." : "請確定您的 config.php 設定檔中並沒有將<samp>appstoreenabled</samp>的值設定為 false", "Could not connect to the appstore or the appstore returned no updates at all. Search manually for updates or make sure your server has access to the internet and can connect to the appstore." : "無法連線至應用程式商店,或者應用程式商店回應無任何更新,請您手動搜尋更新,或者修復您伺服器的網際網路連線,讓它可以連線至應用程式商店。", - "View changelog" : "檢視版本更新紀錄" + "View changelog" : "檢視版本更新紀錄", + "Beta" : "Beta 測試版" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/updatenotification/lib/Controller/APIController.php b/apps/updatenotification/lib/Controller/APIController.php index 2f3505b5047..255a56e1e9a 100644 --- a/apps/updatenotification/lib/Controller/APIController.php +++ b/apps/updatenotification/lib/Controller/APIController.php @@ -78,7 +78,7 @@ class APIController extends OCSController { // Get list of installed custom apps $installedApps = $this->appManager->getInstalledApps(); - $installedApps = array_filter($installedApps, function($app) { + $installedApps = array_filter($installedApps, function ($app) { try { $this->appManager->getAppPath($app); } catch (AppPathNotFoundException $e) { @@ -97,7 +97,7 @@ class APIController extends OCSController { $this->appFetcher->setVersion($newVersion, 'future-apps.json', false); // Apps available on the app store for that version - $availableApps = array_map(function(array $app) { + $availableApps = array_map(function (array $app) { return $app['id']; }, $this->appFetcher->get()); diff --git a/apps/updatenotification/lib/Notification/Notifier.php b/apps/updatenotification/lib/Notification/Notifier.php index 00d7993891d..c7963a04ea6 100644 --- a/apps/updatenotification/lib/Notification/Notifier.php +++ b/apps/updatenotification/lib/Notification/Notifier.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCA\UpdateNotification\Notification; - use OCP\IConfig; use OCP\IGroupManager; use OCP\IURLGenerator; diff --git a/apps/updatenotification/tests/Notification/BackgroundJobTest.php b/apps/updatenotification/tests/Notification/BackgroundJobTest.php index 966ac1e2949..d52867e5c93 100644 --- a/apps/updatenotification/tests/Notification/BackgroundJobTest.php +++ b/apps/updatenotification/tests/Notification/BackgroundJobTest.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCA\UpdateNotification\Tests\Notification; - use OC\Installer; use OC\Updater\VersionCheck; use OCA\UpdateNotification\Notification\BackgroundJob; diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php index d744b7a97fd..6c36a8a74aa 100644 --- a/apps/updatenotification/tests/Notification/NotifierTest.php +++ b/apps/updatenotification/tests/Notification/NotifierTest.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCA\UpdateNotification\Tests\Notification; - use OCA\UpdateNotification\Notification\Notifier; use OCP\IConfig; use OCP\IGroupManager; diff --git a/apps/user_ldap/ajax/setConfiguration.php b/apps/user_ldap/ajax/setConfiguration.php index f696c107a49..2f6c318fa25 100644 --- a/apps/user_ldap/ajax/setConfiguration.php +++ b/apps/user_ldap/ajax/setConfiguration.php @@ -36,7 +36,7 @@ $prefix = (string)$_POST['ldap_serverconfig_chooser']; // only legacy checkboxes (Advanced and Expert tab) need to be handled here, // the Wizard-like tabs handle it on their own $chkboxes = ['ldap_configuration_active', 'ldap_override_main_server', - 'ldap_turn_off_cert_check']; + 'ldap_turn_off_cert_check']; foreach($chkboxes as $boxid) { if(!isset($_POST[$boxid])) { $_POST[$boxid] = 0; diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 2971bcfc3f8..3cbae3f4743 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -27,10 +27,10 @@ * */ -\OC::$server->registerService('LDAPUserPluginManager', function() { +\OC::$server->registerService('LDAPUserPluginManager', function () { return new OCA\User_LDAP\UserPluginManager(); }); -\OC::$server->registerService('LDAPGroupPluginManager', function() { +\OC::$server->registerService('LDAPGroupPluginManager', function () { return new OCA\User_LDAP\GroupPluginManager(); }); diff --git a/apps/user_ldap/l10n/pt_BR.js b/apps/user_ldap/l10n/pt_BR.js index 4632d408bd8..2728fffd6b6 100644 --- a/apps/user_ldap/l10n/pt_BR.js +++ b/apps/user_ldap/l10n/pt_BR.js @@ -26,8 +26,8 @@ OC.L10N.register( "Select groups" : "Selecionar grupos", "Select object classes" : "Selecionar classes de objetos", "Please check the credentials, they seem to be wrong." : "Por favor verifique as credenciais, elas parecem erradas.", - "Please specify the port, it could not be auto-detected." : "Por favor especifique um porto, pois ela não pôde ser detectada automaticamente.", - "Base DN could not be auto-detected, please revise credentials, host and port." : "A Base DN não pôde ser detectada automaticamente, por favor revise as credenciais, host e o porto.", + "Please specify the port, it could not be auto-detected." : "Especifique a porta, pois ela não pôde ser detectada automaticamente.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "A Base DN não pôde ser detectada automaticamente, revise as credenciais, host e a porta.", "Could not detect Base DN, please enter it manually." : "Não foi possível detectar a Base DN, por favor entre manualmente.", "{nthServer}. Server" : "{nthServer}. Servidor", "No object found in the given Base DN. Please revise." : "Nenhum objeto encontrado na Base DN informada. Por favor revise.", @@ -135,7 +135,7 @@ OC.L10N.register( "When unchecked, this configuration will be skipped." : "Quando desmarcada, esta configuração será ignorada.", "Backup (Replica) Host" : "Host de backup (Réplica)", "Give an optional backup host. It must be a replica of the main LDAP/AD server." : "Defina um servidor de backup opcional. Ele deverá ser uma réplica do servidor LDAP/AD principal.", - "Backup (Replica) Port" : "Porto do backup (Réplica)", + "Backup (Replica) Port" : "Porta de backup (Réplica)", "Disable Main Server" : "Desativar Servidor Principal", "Only connect to the replica server." : "Conectar-se somente ao servidor Réplica.", "Turn off SSL certificate validation." : "Desligar validação de certificado SSL.", @@ -183,7 +183,7 @@ OC.L10N.register( "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Por padrão, um nome de usuário interno será criado a partir de um atributo UUID. Isso garante que o nome de usuário seja único e estes caracteres não precisam ser convertidos. um nome de usuário interno possui a restrição que somente estes caracteres são permitdos: [ a-zA-Z0-9_.@- ]. Outros caracteres serão substituidos por seus correspondentes ASCII ou simplesmente omitidos. Em caso de coincidências, um número será adicionado/incrementado. O nome de usuário interno é utilizado para identificar o usuário internamente. Também é o nome padrão da pasta principal do usuário. Também é uma parte das URL's remotas, por exemplo, para todos os serviços *DAV. Com esta configuração, o comportamento padrão pode ser alterado. Deixe em branco para que assuma o comportamento padrão. Alterações terão efeito apenas em novos usuários LDAP mapeados (adicionados).", "Internal Username Attribute:" : "Atributo Interno de Nome de Usuário:", "Override UUID detection" : "Substituir detecção UUID", - "By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Por padrão, o atributo UUID é detectado automaticamente. O atributo UUID é usado para identificar, sem dúvidas, os usuários e grupos LDAP. Além disso, o nome de usuário interno será criado com base no UUID, se não especificado acima. Você pode substituir a configuração e passar um atributo de sua escolha. Você deve certificar-se de que o atributo de sua escolha pode ser lido tanto para usuários como para grupos, e que seja único. Deixe-o vazio para o comportamento padrão. As alterações terão efeito apenas para usuários e grupos LDAP recém mapeados (adicionados).", + "By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Por padrão, o atributo UUID é detectado automaticamente. O atributo UUID é usado para identificar corretamente os usuários e grupos LDAP. Além disso, o nome de usuário interno será criado com base no UUID, se não especificado acima. Você pode substituir a configuração e passar um atributo de sua escolha. Você deve certificar-se de que o atributo de sua escolha pode ser lido tanto por usuários quanto por grupos, e que seja único. Deixe-o em branco para o comportamento padrão. As alterações terão efeito apenas para usuários e grupos LDAP recém mapeados (adicionados).", "UUID Attribute for Users:" : "Atributos UUID para Usuários:", "UUID Attribute for Groups:" : "Atributos UUID para Grupos:", "Username-LDAP User Mapping" : "Mapeamento de Usuário Username-LDAP", diff --git a/apps/user_ldap/l10n/pt_BR.json b/apps/user_ldap/l10n/pt_BR.json index 3f7e49c3160..1741a64b888 100644 --- a/apps/user_ldap/l10n/pt_BR.json +++ b/apps/user_ldap/l10n/pt_BR.json @@ -24,8 +24,8 @@ "Select groups" : "Selecionar grupos", "Select object classes" : "Selecionar classes de objetos", "Please check the credentials, they seem to be wrong." : "Por favor verifique as credenciais, elas parecem erradas.", - "Please specify the port, it could not be auto-detected." : "Por favor especifique um porto, pois ela não pôde ser detectada automaticamente.", - "Base DN could not be auto-detected, please revise credentials, host and port." : "A Base DN não pôde ser detectada automaticamente, por favor revise as credenciais, host e o porto.", + "Please specify the port, it could not be auto-detected." : "Especifique a porta, pois ela não pôde ser detectada automaticamente.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "A Base DN não pôde ser detectada automaticamente, revise as credenciais, host e a porta.", "Could not detect Base DN, please enter it manually." : "Não foi possível detectar a Base DN, por favor entre manualmente.", "{nthServer}. Server" : "{nthServer}. Servidor", "No object found in the given Base DN. Please revise." : "Nenhum objeto encontrado na Base DN informada. Por favor revise.", @@ -133,7 +133,7 @@ "When unchecked, this configuration will be skipped." : "Quando desmarcada, esta configuração será ignorada.", "Backup (Replica) Host" : "Host de backup (Réplica)", "Give an optional backup host. It must be a replica of the main LDAP/AD server." : "Defina um servidor de backup opcional. Ele deverá ser uma réplica do servidor LDAP/AD principal.", - "Backup (Replica) Port" : "Porto do backup (Réplica)", + "Backup (Replica) Port" : "Porta de backup (Réplica)", "Disable Main Server" : "Desativar Servidor Principal", "Only connect to the replica server." : "Conectar-se somente ao servidor Réplica.", "Turn off SSL certificate validation." : "Desligar validação de certificado SSL.", @@ -181,7 +181,7 @@ "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Por padrão, um nome de usuário interno será criado a partir de um atributo UUID. Isso garante que o nome de usuário seja único e estes caracteres não precisam ser convertidos. um nome de usuário interno possui a restrição que somente estes caracteres são permitdos: [ a-zA-Z0-9_.@- ]. Outros caracteres serão substituidos por seus correspondentes ASCII ou simplesmente omitidos. Em caso de coincidências, um número será adicionado/incrementado. O nome de usuário interno é utilizado para identificar o usuário internamente. Também é o nome padrão da pasta principal do usuário. Também é uma parte das URL's remotas, por exemplo, para todos os serviços *DAV. Com esta configuração, o comportamento padrão pode ser alterado. Deixe em branco para que assuma o comportamento padrão. Alterações terão efeito apenas em novos usuários LDAP mapeados (adicionados).", "Internal Username Attribute:" : "Atributo Interno de Nome de Usuário:", "Override UUID detection" : "Substituir detecção UUID", - "By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Por padrão, o atributo UUID é detectado automaticamente. O atributo UUID é usado para identificar, sem dúvidas, os usuários e grupos LDAP. Além disso, o nome de usuário interno será criado com base no UUID, se não especificado acima. Você pode substituir a configuração e passar um atributo de sua escolha. Você deve certificar-se de que o atributo de sua escolha pode ser lido tanto para usuários como para grupos, e que seja único. Deixe-o vazio para o comportamento padrão. As alterações terão efeito apenas para usuários e grupos LDAP recém mapeados (adicionados).", + "By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Por padrão, o atributo UUID é detectado automaticamente. O atributo UUID é usado para identificar corretamente os usuários e grupos LDAP. Além disso, o nome de usuário interno será criado com base no UUID, se não especificado acima. Você pode substituir a configuração e passar um atributo de sua escolha. Você deve certificar-se de que o atributo de sua escolha pode ser lido tanto por usuários quanto por grupos, e que seja único. Deixe-o em branco para o comportamento padrão. As alterações terão efeito apenas para usuários e grupos LDAP recém mapeados (adicionados).", "UUID Attribute for Users:" : "Atributos UUID para Usuários:", "UUID Attribute for Groups:" : "Atributos UUID para Grupos:", "Username-LDAP User Mapping" : "Mapeamento de Usuário Username-LDAP", diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index fecc3b4d4de..836e1fddb85 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -90,8 +90,8 @@ class Access extends LDAPUtility { protected $userMapper; /** - * @var AbstractMapping $userMapper - */ + * @var AbstractMapping $userMapper + */ protected $groupMapper; /** @@ -620,7 +620,7 @@ class Access extends LDAPUtility { // outside of core user management will still cache the user as non-existing. $originalTTL = $this->connection->ldapCacheTTL; $this->connection->setConfiguration(['ldapCacheTTL' => 0]); - if( $intName !== '' + if($intName !== '' && (($isUser && !$this->ncUserManager->userExists($intName)) || (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName)) ) @@ -708,7 +708,7 @@ class Access extends LDAPUtility { foreach($ldapObjects as $ldapObject) { $nameByLDAP = null; - if( isset($ldapObject[$nameAttribute]) + if(isset($ldapObject[$nameAttribute]) && is_array($ldapObject[$nameAttribute]) && isset($ldapObject[$nameAttribute][0]) ) { @@ -919,7 +919,7 @@ class Access extends LDAPUtility { if(!$forceApplyAttributes) { $isBackgroundJobModeAjax = $this->config ->getAppValue('core', 'backgroundjobs_mode', 'ajax') === 'ajax'; - $recordsToUpdate = array_filter($ldapRecords, function($record) use ($isBackgroundJobModeAjax) { + $recordsToUpdate = array_filter($ldapRecords, function ($record) use ($isBackgroundJobModeAjax) { $newlyMapped = false; $uid = $this->dn2ocname($record['dn'][0], null, true, $newlyMapped, $record); if(is_string($uid)) { @@ -940,7 +940,7 @@ class Access extends LDAPUtility { * @param array $ldapRecords * @throws \Exception */ - public function batchApplyUserAttributes(array $ldapRecords){ + public function batchApplyUserAttributes(array $ldapRecords) { $displayNameAttribute = strtolower($this->connection->ldapUserDisplayName); foreach($ldapRecords as $userRecord) { if(!isset($userRecord[$displayNameAttribute])) { @@ -973,7 +973,7 @@ class Access extends LDAPUtility { */ public function fetchListOfGroups($filter, $attr, $limit = null, $offset = null) { $groupRecords = $this->searchGroups($filter, $attr, $limit, $offset); - array_walk($groupRecords, function($record) { + array_walk($groupRecords, function ($record) { $newlyMapped = false; $gid = $this->dn2ocname($record['dn'][0], null, false, $newlyMapped, $record); if(!$newlyMapped && is_string($gid)) { @@ -993,7 +993,7 @@ class Access extends LDAPUtility { if($manyAttributes) { return $list; } else { - $list = array_reduce($list, function($carry, $item) { + $list = array_reduce($list, function ($carry, $item) { $attribute = array_keys($item)[0]; $carry[] = $item[$attribute][0]; return $carry; @@ -1453,11 +1453,11 @@ class Access extends LDAPUtility { } /** - * escapes (user provided) parts for LDAP filter - * @param string $input, the provided value - * @param bool $allowAsterisk whether in * at the beginning should be preserved - * @return string the escaped string - */ + * escapes (user provided) parts for LDAP filter + * @param string $input, the provided value + * @param bool $allowAsterisk whether in * at the beginning should be preserved + * @return string the escaped string + */ public function escapeFilterPart($input, $allowAsterisk = false) { $asterisk = ''; if($allowAsterisk && strlen($input) > 0 && $input[0] === '*') { @@ -1777,7 +1777,7 @@ class Access extends LDAPUtility { if($this->detectUuidAttribute($dn, $isUser, false, $ldapRecord)) { $attr = $this->connection->$uuidAttr; $uuid = isset($ldapRecord[$attr]) ? $ldapRecord[$attr] : $this->readAttribute($dn, $attr); - if( !is_array($uuid) + if(!is_array($uuid) && $uuidOverride !== '' && $this->detectUuidAttribute($dn, $isUser, true, $ldapRecord)) { diff --git a/apps/user_ldap/lib/AccessFactory.php b/apps/user_ldap/lib/AccessFactory.php index aa344893f03..04d72a16f29 100644 --- a/apps/user_ldap/lib/AccessFactory.php +++ b/apps/user_ldap/lib/AccessFactory.php @@ -23,7 +23,6 @@ namespace OCA\User_LDAP; - use OCA\User_LDAP\User\Manager; use OCP\IConfig; use OCP\IUserManager; diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php index 8e2ed30c396..ae8114d1705 100644 --- a/apps/user_ldap/lib/AppInfo/Application.php +++ b/apps/user_ldap/lib/AppInfo/Application.php @@ -35,14 +35,14 @@ use OCP\AppFramework\IAppContainer; use OCP\IL10N; class Application extends App { - public function __construct () { + public function __construct() { parent::__construct('user_ldap'); $container = $this->getContainer(); /** * Controller */ - $container->registerService('RenewPasswordController', function(IAppContainer $c) { + $container->registerService('RenewPasswordController', function (IAppContainer $c) { /** @var \OC\Server $server */ $server = $c->query('ServerContainer'); @@ -67,7 +67,7 @@ class Application extends App { $container->getServer()->getEventDispatcher()->addListener( 'OCA\\Files_External::loadAdditionalBackends', - function() use ($container) { + function () use ($container) { $storagesBackendService = $container->query(BackendService::class); $storagesBackendService->registerConfigHandler('home', function () use ($container) { return $container->query(ExtStorageConfigHandler::class); diff --git a/apps/user_ldap/lib/BackendUtility.php b/apps/user_ldap/lib/BackendUtility.php index 8922f6e8cfe..a4eb739ab66 100644 --- a/apps/user_ldap/lib/BackendUtility.php +++ b/apps/user_ldap/lib/BackendUtility.php @@ -25,7 +25,6 @@ namespace OCA\User_LDAP; - abstract class BackendUtility { protected $access; diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php index 5ec7c15e76a..5b837e47b8e 100644 --- a/apps/user_ldap/lib/Command/CheckUser.php +++ b/apps/user_ldap/lib/Command/CheckUser.php @@ -70,13 +70,13 @@ class CheckUser extends Command { 'ocName', InputArgument::REQUIRED, 'the user name as used in Nextcloud' - ) + ) ->addOption( 'force', null, InputOption::VALUE_NONE, 'ignores disabled LDAP configuration' - ) + ) ->addOption( 'update', null, diff --git a/apps/user_ldap/lib/Command/DeleteConfig.php b/apps/user_ldap/lib/Command/DeleteConfig.php index d53435ce7c5..f62caf2902a 100644 --- a/apps/user_ldap/lib/Command/DeleteConfig.php +++ b/apps/user_ldap/lib/Command/DeleteConfig.php @@ -25,7 +25,6 @@ namespace OCA\User_LDAP\Command; - use OCA\User_LDAP\Helper; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; @@ -52,7 +51,7 @@ class DeleteConfig extends Command { 'configID', InputArgument::REQUIRED, 'the configuration ID' - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php index c061948fedd..edd4fa71ba0 100644 --- a/apps/user_ldap/lib/Command/Search.php +++ b/apps/user_ldap/lib/Command/Search.php @@ -59,27 +59,27 @@ class Search extends Command { 'search', InputArgument::REQUIRED, 'the search string (can be empty)' - ) + ) ->addOption( 'group', null, InputOption::VALUE_NONE, 'searches groups instead of users' - ) + ) ->addOption( 'offset', null, InputOption::VALUE_REQUIRED, 'The offset of the result set. Needs to be a multiple of limit. defaults to 0.', 0 - ) + ) ->addOption( 'limit', null, InputOption::VALUE_REQUIRED, 'limit the results. 0 means no limit, defaults to 15', 15 - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php index e74e9e33c18..a1ddf3a591a 100644 --- a/apps/user_ldap/lib/Command/SetConfig.php +++ b/apps/user_ldap/lib/Command/SetConfig.php @@ -45,17 +45,17 @@ class SetConfig extends Command { 'configID', InputArgument::REQUIRED, 'the configuration ID' - ) + ) ->addArgument( 'configKey', InputArgument::REQUIRED, 'the configuration key' - ) + ) ->addArgument( 'configValue', InputArgument::REQUIRED, 'the new configuration value' - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php index 005798c7a05..f4af798d433 100644 --- a/apps/user_ldap/lib/Command/ShowConfig.php +++ b/apps/user_ldap/lib/Command/ShowConfig.php @@ -56,13 +56,13 @@ class ShowConfig extends Command { 'configID', InputArgument::OPTIONAL, 'will show the configuration of the specified id' - ) + ) ->addOption( 'show-password', null, InputOption::VALUE_NONE, 'show ldap bind password' - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/TestConfig.php b/apps/user_ldap/lib/Command/TestConfig.php index 98dd25a1087..abab07d92f1 100644 --- a/apps/user_ldap/lib/Command/TestConfig.php +++ b/apps/user_ldap/lib/Command/TestConfig.php @@ -44,7 +44,7 @@ class TestConfig extends Command { 'configID', InputArgument::REQUIRED, 'the configuration ID' - ) + ) ; } diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index a04ea638d09..3c6693b151e 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -311,7 +311,7 @@ class Configuration { /** * Sets multi-line values as arrays - * + * * @param string $varName name of config-key * @param array|string $value to set */ @@ -387,7 +387,7 @@ class Configuration { /** * Sets a scalar value. - * + * * @param string $varName name of config key * @param mixed $value to set */ diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 58afcf96726..14a0e19989a 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -365,7 +365,7 @@ class Connection extends LDAPUtility { } foreach(['ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute', - 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute'] + 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute'] as $expertSetting => $effectiveSetting) { $uuidOverride = $this->configuration->$expertSetting; if(!empty($uuidOverride)) { @@ -394,7 +394,7 @@ class Connection extends LDAPUtility { //make sure empty search attributes are saved as simple, empty array $saKeys = ['ldapAttributesForUserSearch', - 'ldapAttributesForGroupSearch']; + 'ldapAttributesForGroupSearch']; foreach($saKeys as $key) { $val = $this->configuration->$key; if(is_array($val) && count($val) === 1 && empty($val[0])) { @@ -423,7 +423,7 @@ class Connection extends LDAPUtility { //options that shall not be empty $options = ['ldapHost', 'ldapPort', 'ldapUserDisplayName', - 'ldapGroupDisplayName', 'ldapLoginFilter']; + 'ldapGroupDisplayName', 'ldapLoginFilter']; foreach($options as $key) { $val = $this->configuration->$key; if(empty($val)) { diff --git a/apps/user_ldap/lib/ConnectionFactory.php b/apps/user_ldap/lib/ConnectionFactory.php index fceed8b2532..48275ff8c3c 100644 --- a/apps/user_ldap/lib/ConnectionFactory.php +++ b/apps/user_ldap/lib/ConnectionFactory.php @@ -23,7 +23,6 @@ namespace OCA\User_LDAP; - class ConnectionFactory { /** @var ILDAPWrapper */ private $ldap; diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php index ff60cd3b2f1..cc58f79cbd0 100644 --- a/apps/user_ldap/lib/Controller/RenewPasswordController.php +++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php @@ -54,7 +54,7 @@ class RenewPasswordController extends Controller { * @param IConfig $config * @param IURLGenerator $urlGenerator */ - function __construct($appName, IRequest $request, IUserManager $userManager, + function __construct($appName, IRequest $request, IUserManager $userManager, IConfig $config, IL10N $l10n, ISession $session, IURLGenerator $urlGenerator) { parent::__construct($appName, $request); $this->userManager = $userManager; diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index f119780f2c6..c166ad5ebef 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -236,7 +236,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD $seen[$dnGroup] = 1; $members = $this->access->readAttribute($dnGroup, $this->access->connection->ldapGroupMemberAssocAttr); if (is_array($members)) { - $fetcher = function($memberDN, &$seen) { + $fetcher = function ($memberDN, &$seen) { return $this->_groupMembers($memberDN, $seen); }; $allMembers = $this->walkNestedGroups($dnGroup, $fetcher, $members); @@ -260,7 +260,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD return []; } - $fetcher = function($groupDN) { + $fetcher = function ($groupDN) { if (isset($this->cachedNestedGroups[$groupDN])) { $nestedGroups = $this->cachedNestedGroups[$groupDN]; } else { @@ -707,8 +707,8 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD // memberof doesn't support memberuid, so skip it here. if((int)$this->access->connection->hasMemberOfFilterSupport === 1 && (int)$this->access->connection->useMemberOfToDetectMembership === 1 - && strtolower($this->access->connection->ldapGroupMemberAssocAttr) !== 'memberuid' - ) { + && strtolower($this->access->connection->ldapGroupMemberAssocAttr) !== 'memberuid' + ) { $groupDNs = $this->_getGroupDNsFromMemberOf($userDN); if (is_array($groupDNs)) { foreach ($groupDNs as $dn) { @@ -1129,13 +1129,13 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD } /** - * Check if backend implements actions - * @param int $actions bitwise-or'ed actions - * @return boolean - * - * Returns the supported actions as int to be - * compared with GroupInterface::CREATE_GROUP etc. - */ + * Check if backend implements actions + * @param int $actions bitwise-or'ed actions + * @return boolean + * + * Returns the supported actions as int to be + * compared with GroupInterface::CREATE_GROUP etc. + */ public function implementsActions($actions) { return (bool)((GroupInterface::COUNT_USERS | $this->groupPluginManager->getImplementedActions()) & $actions); diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php index 93dc92f334d..595e3c92ec8 100644 --- a/apps/user_ldap/lib/Helper.php +++ b/apps/user_ldap/lib/Helper.php @@ -305,7 +305,7 @@ class Helper { $userBackend = new User_Proxy( $configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager ); - $uid = $userBackend->loginName2UserName($param['uid'] ); + $uid = $userBackend->loginName2UserName($param['uid']); if($uid !== false) { $param['uid'] = $uid; } diff --git a/apps/user_ldap/lib/ILDAPGroupPlugin.php b/apps/user_ldap/lib/ILDAPGroupPlugin.php index 78dc39ad299..3a5accece26 100644 --- a/apps/user_ldap/lib/ILDAPGroupPlugin.php +++ b/apps/user_ldap/lib/ILDAPGroupPlugin.php @@ -23,7 +23,6 @@ namespace OCA\User_LDAP; - interface ILDAPGroupPlugin { /** diff --git a/apps/user_ldap/lib/ILDAPUserPlugin.php b/apps/user_ldap/lib/ILDAPUserPlugin.php index 26dbffb3806..29397b6c205 100644 --- a/apps/user_ldap/lib/ILDAPUserPlugin.php +++ b/apps/user_ldap/lib/ILDAPUserPlugin.php @@ -24,7 +24,6 @@ namespace OCA\User_LDAP; - interface ILDAPUserPlugin { /** diff --git a/apps/user_ldap/lib/Jobs/Sync.php b/apps/user_ldap/lib/Jobs/Sync.php index 02b50c83a66..e095ba41bef 100644 --- a/apps/user_ldap/lib/Jobs/Sync.php +++ b/apps/user_ldap/lib/Jobs/Sync.php @@ -103,7 +103,7 @@ class Sync extends TimedJob { */ protected function getMinPagingSize() { $configKeys = $this->config->getAppKeys('user_ldap'); - $configKeys = array_filter($configKeys, function($key) { + $configKeys = array_filter($configKeys, function ($key) { return strpos($key, 'ldap_paging_size') !== false; }); $minPagingSize = null; diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php index 35edaccc6a0..71a2ea8c69e 100644 --- a/apps/user_ldap/lib/Jobs/UpdateGroups.php +++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php @@ -50,14 +50,14 @@ class UpdateGroups extends \OC\BackgroundJob\TimedJob { static private $groupBE; - public function __construct(){ + public function __construct() { $this->interval = self::getRefreshInterval(); } /** * @param mixed $argument */ - public function run($argument){ + public function run($argument) { self::updateGroups(); } diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 7b6b5206202..f346272a18b 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -194,7 +194,7 @@ class LDAP implements ILDAPWrapper { * @throws \Exception */ public function search($link, $baseDN, $filter, $attr, $attrsOnly = 0, $limit = 0) { - $oldHandler = set_error_handler(function($no, $message, $file, $line) use (&$oldHandler) { + $oldHandler = set_error_handler(function ($no, $message, $file, $line) use (&$oldHandler) { if(strpos($message, 'Partial search results returned: Sizelimit exceeded') !== false) { return true; } diff --git a/apps/user_ldap/lib/LDAPProvider.php b/apps/user_ldap/lib/LDAPProvider.php index 0547ffcffb6..75267165cdf 100644 --- a/apps/user_ldap/lib/LDAPProvider.php +++ b/apps/user_ldap/lib/LDAPProvider.php @@ -28,7 +28,6 @@ namespace OCA\User_LDAP; - use OCA\User_LDAP\User\DeletedUsersIndex; use OCP\IServerContainer; use OCP\LDAP\IDeletionFlagSupport; @@ -65,7 +64,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { $userBackendFound = true; break; } - } + } foreach ($serverContainer->getGroupManager()->getBackends() as $backend){ $this->logger->debug('instance '.get_class($backend).' group backend.', ['app' => 'user_ldap']); if ($backend instanceof IGroupLDAP) { @@ -75,7 +74,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { } } - if (!$userBackendFound or !$groupBackendFound) { + if (!$userBackendFound or !$groupBackendFound) { throw new \Exception('To use the LDAPProvider, user_ldap app must be enabled'); } } @@ -111,11 +110,11 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { if(!$result){ throw new \Exception('Translation to LDAP DN unsuccessful'); } - return $result; + return $result; } /** - * Translate a LDAP DN to an internal user name. If there is no mapping between + * Translate a LDAP DN to an internal user name. If there is no mapping between * the DN and the user name, a new one will be created. * @param string $dn LDAP DN * @return string with the internal user name @@ -148,7 +147,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { } /** - * Return a new LDAP connection resource for the specified user. + * Return a new LDAP connection resource for the specified user. * The connection must be closed manually. * @param string $uid user id * @return resource of the LDAP connection diff --git a/apps/user_ldap/lib/LDAPProviderFactory.php b/apps/user_ldap/lib/LDAPProviderFactory.php index 637b2d4e67b..ec8d0e3254e 100644 --- a/apps/user_ldap/lib/LDAPProviderFactory.php +++ b/apps/user_ldap/lib/LDAPProviderFactory.php @@ -56,7 +56,7 @@ class LDAPProviderFactory implements ILDAPProviderFactory { $dbConnection = $this->serverContainer->getDatabaseConnection(); $userMapping = new UserMapping($dbConnection); return new LDAPProvider($this->serverContainer, new Helper($this->serverContainer->getConfig()), - new DeletedUsersIndex($this->serverContainer->getConfig(), + new DeletedUsersIndex($this->serverContainer->getConfig(), $dbConnection, $userMapping)); } } diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php index e16829e09d9..5d445af6b7e 100644 --- a/apps/user_ldap/lib/Mapping/AbstractMapping.php +++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php @@ -27,9 +27,9 @@ namespace OCA\User_LDAP\Mapping; /** -* Class AbstractMapping -* @package OCA\User_LDAP\Mapping -*/ + * Class AbstractMapping + * @package OCA\User_LDAP\Mapping + */ abstract class AbstractMapping { /** * @var \OCP\IDBConnection $dbc @@ -289,7 +289,7 @@ abstract class AbstractMapping { * @return bool true on success, false when at least one row was not * deleted */ - public function clearCb(Callable $preCallback, Callable $postCallback): bool { + public function clearCb(callable $preCallback, callable $postCallback): bool { $picker = $this->dbc->getQueryBuilder(); $picker->select('owncloud_name') ->from($this->getTableName()); diff --git a/apps/user_ldap/lib/Mapping/GroupMapping.php b/apps/user_ldap/lib/Mapping/GroupMapping.php index 6922a010533..cc779817f1a 100644 --- a/apps/user_ldap/lib/Mapping/GroupMapping.php +++ b/apps/user_ldap/lib/Mapping/GroupMapping.php @@ -24,15 +24,15 @@ namespace OCA\User_LDAP\Mapping; /** -* Class UserMapping -* @package OCA\User_LDAP\Mapping -*/ + * Class UserMapping + * @package OCA\User_LDAP\Mapping + */ class GroupMapping extends AbstractMapping { /** - * returns the DB table name which holds the mappings - * @return string - */ + * returns the DB table name which holds the mappings + * @return string + */ protected function getTableName() { return '*PREFIX*ldap_group_mapping'; } diff --git a/apps/user_ldap/lib/Mapping/UserMapping.php b/apps/user_ldap/lib/Mapping/UserMapping.php index 9fde960959f..31ac8a05326 100644 --- a/apps/user_ldap/lib/Mapping/UserMapping.php +++ b/apps/user_ldap/lib/Mapping/UserMapping.php @@ -24,9 +24,9 @@ namespace OCA\User_LDAP\Mapping; /** -* Class UserMapping -* @package OCA\User_LDAP\Mapping -*/ + * Class UserMapping + * @package OCA\User_LDAP\Mapping + */ class UserMapping extends AbstractMapping { /** diff --git a/apps/user_ldap/lib/Migration/UUIDFix.php b/apps/user_ldap/lib/Migration/UUIDFix.php index c241a8a28a0..f6359c2e882 100644 --- a/apps/user_ldap/lib/Migration/UUIDFix.php +++ b/apps/user_ldap/lib/Migration/UUIDFix.php @@ -23,7 +23,6 @@ namespace OCA\User_LDAP\Migration; - use OC\BackgroundJob\QueuedJob; use OCA\User_LDAP\Mapping\AbstractMapping; use OCA\User_LDAP\Proxy; diff --git a/apps/user_ldap/lib/Migration/UUIDFixGroup.php b/apps/user_ldap/lib/Migration/UUIDFixGroup.php index 618e5c519e7..a101a97a82f 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixGroup.php +++ b/apps/user_ldap/lib/Migration/UUIDFixGroup.php @@ -34,7 +34,7 @@ use OCP\IConfig; class UUIDFixGroup extends UUIDFix { public function __construct(GroupMapping $mapper, LDAP $ldap, IConfig $config, Helper $helper) { $this->mapper = $mapper; - $this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config, + $this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config, \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager')); } diff --git a/apps/user_ldap/lib/Notification/Notifier.php b/apps/user_ldap/lib/Notification/Notifier.php index eb4a8296548..773242a635b 100644 --- a/apps/user_ldap/lib/Notification/Notifier.php +++ b/apps/user_ldap/lib/Notification/Notifier.php @@ -25,7 +25,6 @@ namespace OCA\User_LDAP\Notification; - use OCP\L10N\IFactory; use OCP\Notification\INotification; use OCP\Notification\INotifier; diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php index d4d389ff760..c7660a40ba6 100644 --- a/apps/user_ldap/lib/User/Manager.php +++ b/apps/user_ldap/lib/User/Manager.php @@ -130,7 +130,7 @@ class Manager { $this->checkAccess(); $user = new User($uid, $dn, $this->access, $this->ocConfig, $this->ocFilesystem, clone $this->image, $this->ocLog, - $this->avatarManager, $this->userManager, + $this->avatarManager, $this->userManager, $this->notificationManager); $this->usersByDN[$dn] = $user; $this->usersByUid[$uid] = $user; @@ -195,7 +195,7 @@ class Manager { } $attributes = array_reduce($attributes, - function($list, $attribute) { + function ($list, $attribute) { $attribute = strtolower(trim((string)$attribute)); if(!empty($attribute) && !in_array($attribute, $list)) { $list[] = $attribute; @@ -264,7 +264,7 @@ class Manager { return $this->usersByUid[$id]; } - if($this->access->stringResemblesDN($id) ) { + if($this->access->stringResemblesDN($id)) { $uid = $this->access->dn2username($id); if($uid !== false) { return $this->createAndCache($id, $uid); diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index f092f44e041..2c038e43285 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -327,12 +327,12 @@ class User { if ($path !== '') { //if attribute's value is an absolute path take this, otherwise append it to data dir //check for / at the beginning or pattern c:\ resp. c:/ - if( '/' !== $path[0] + if('/' !== $path[0] && !(3 < strlen($path) && ctype_alpha($path[0]) - && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2])) + && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2])) ) { $path = $this->config->getSystemValue('datadirectory', - \OC::$SERVERROOT.'/data' ) . '/' . $path; + \OC::$SERVERROOT.'/data') . '/' . $path; } //we need it to store it in the DB as well in case a user gets //deleted so we can clean up afterwards @@ -342,7 +342,7 @@ class User { return $path; } - if( !is_null($attr) + if(!is_null($attr) && $this->config->getAppValue('user_ldap', 'enforce_home_folder_naming_rule', true) ) { // a naming rule attribute is defined, but it doesn't exist for that LDAP user diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index b4ceb8f1f40..08b0464cc50 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -365,11 +365,11 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn } /** - * returns whether a user was deleted in LDAP - * - * @param string $uid The username of the user to delete - * @return bool - */ + * returns whether a user was deleted in LDAP + * + * @param string $uid The username of the user to delete + * @return bool + */ public function deleteUser($uid) { if ($this->userPluginManager->canDeleteUser()) { $status = $this->userPluginManager->deleteUser($uid); @@ -522,13 +522,13 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn } /** - * Check if backend implements actions - * @param int $actions bitwise-or'ed actions - * @return boolean - * - * Returns the supported actions as int to be - * compared with \OC\User\Backend::CREATE_USER etc. - */ + * Check if backend implements actions + * @param int $actions bitwise-or'ed actions + * @return boolean + * + * Returns the supported actions as int to be + * compared with \OC\User\Backend::CREATE_USER etc. + */ public function implementsActions($actions) { return (bool)((Backend::CHECK_PASSWORD | Backend::GET_HOME @@ -571,7 +571,7 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn * Backend name to be shown in user management * @return string the name of the backend to be shown */ - public function getBackendName(){ + public function getBackendName() { return 'LDAP'; } diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 181a58c11bf..839578cd606 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -79,7 +79,7 @@ class Wizard extends LDAPUtility { $this->result = new WizardResult(); } - public function __destruct() { + public function __destruct() { if($this->result->hasChanges()) { $this->configuration->saveConfiguration(); } @@ -201,10 +201,10 @@ class Wizard extends LDAPUtility { */ public function countUsersWithAttribute($attr, $existsCheck = false) { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -226,10 +226,10 @@ class Wizard extends LDAPUtility { */ public function detectUserDisplayNameAttribute() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -268,10 +268,10 @@ class Wizard extends LDAPUtility { */ public function detectEmailAttribute() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -315,10 +315,10 @@ class Wizard extends LDAPUtility { */ public function determineAttributes() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -344,10 +344,10 @@ class Wizard extends LDAPUtility { */ private function getUserAttributes() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } $cr = $this->getConnection(); @@ -400,9 +400,9 @@ class Wizard extends LDAPUtility { */ private function determineGroups($dbKey, $confKey, $testMemberOf = true) { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } $cr = $this->getConnection(); @@ -480,9 +480,9 @@ class Wizard extends LDAPUtility { public function determineGroupMemberAssoc() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapGroupFilter', - ])) { + 'ldapPort', + 'ldapGroupFilter', + ])) { return false; } $attribute = $this->detectGroupMemberAssoc(); @@ -502,9 +502,9 @@ class Wizard extends LDAPUtility { */ public function determineGroupObjectClasses() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } $cr = $this->getConnection(); @@ -529,9 +529,9 @@ class Wizard extends LDAPUtility { */ public function determineUserObjectClasses() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } $cr = $this->getConnection(); @@ -540,7 +540,7 @@ class Wizard extends LDAPUtility { } $obclasses = ['inetOrgPerson', 'person', 'organizationalPerson', - 'user', 'posixAccount', '*']; + 'user', 'posixAccount', '*']; $filter = $this->configuration->ldapUserFilter; //if filter is empty, it is probably the first time the wizard is called //then, apply suggestions. @@ -559,9 +559,9 @@ class Wizard extends LDAPUtility { */ public function getGroupFilter() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } //make sure the use display name is set @@ -583,9 +583,9 @@ class Wizard extends LDAPUtility { */ public function getUserListFilter() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } //make sure the use display name is set @@ -609,10 +609,10 @@ class Wizard extends LDAPUtility { */ public function getUserLoginFilter() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -666,7 +666,7 @@ class Wizard extends LDAPUtility { */ public function guessPortAndTLS() { if(!$this->checkRequirements(['ldapHost', - ])) { + ])) { return false; } $this->checkHost(); @@ -719,8 +719,8 @@ class Wizard extends LDAPUtility { */ public function guessBaseDN() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - ])) { + 'ldapPort', + ])) { return false; } @@ -1318,13 +1318,13 @@ class Wizard extends LDAPUtility { */ private function getDefaultLdapPortSettings() { static $settings = [ - ['port' => 7636, 'tls' => false], - ['port' => 636, 'tls' => false], - ['port' => 7389, 'tls' => true], - ['port' => 389, 'tls' => true], - ['port' => 7389, 'tls' => false], - ['port' => 389, 'tls' => false], - ]; + ['port' => 7636, 'tls' => false], + ['port' => 636, 'tls' => false], + ['port' => 7389, 'tls' => true], + ['port' => 389, 'tls' => true], + ['port' => 7389, 'tls' => false], + ['port' => 389, 'tls' => false], + ]; return $settings; } @@ -1352,7 +1352,7 @@ class Wizard extends LDAPUtility { //default ports $portSettings = array_merge($portSettings, - $this->getDefaultLdapPortSettings()); + $this->getDefaultLdapPortSettings()); return $portSettings; } diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 0ac3a2bcc40..bbc809481ac 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -83,7 +83,7 @@ style('user_ldap', 'settings'); <p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p> <p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p> <p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p> - <p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()] ));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p> + <p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()]));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p> <p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p> </div> <h3><?php p($l->t('Directory Settings'));?></h3> diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index 35d38b24920..a805f387086 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -538,7 +538,7 @@ class AccessTest extends TestCase { ->willReturn($fakeConnection); $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($key) use ($base) { + ->willReturnCallback(function ($key) use ($base) { if(stripos($key, 'base') !== false) { return $base; } @@ -616,7 +616,7 @@ class AccessTest extends TestCase { ]; $expected = $fakeLdapEntries; unset($expected['count']); - array_walk($expected, function(&$v) { + array_walk($expected, function (&$v) { $v['dn'] = [$v['dn']]; // dn is translated into an array internally for consistency }); @@ -628,7 +628,7 @@ class AccessTest extends TestCase { $this->userMapper->expects($this->exactly($fakeLdapEntries['count'])) ->method('getNameByDN') - ->willReturnCallback(function($fdn) { + ->willReturnCallback(function ($fdn) { $parts = ldap_explode_dn($fdn, false); return $parts[0]; }); diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index 45c01e4b0f0..fee92a523c9 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -53,7 +53,7 @@ class ConfigurationTest extends \Test\TestCase { ' ', '', ' whats my name', - ' ' + ' ' ]; $expectedNames = ['uid', 'cn', 'whats my name']; diff --git a/apps/user_ldap/tests/ConnectionTest.php b/apps/user_ldap/tests/ConnectionTest.php index 59e6476ab45..8a4ec38e4bd 100644 --- a/apps/user_ldap/tests/ConnectionTest.php +++ b/apps/user_ldap/tests/ConnectionTest.php @@ -29,6 +29,7 @@ */ namespace OCA\User_LDAP\Tests; + use OCA\User_LDAP\Connection; use OCA\User_LDAP\ILDAPWrapper; diff --git a/apps/user_ldap/tests/GroupLDAPPluginTest.php b/apps/user_ldap/tests/GroupLDAPPluginTest.php index e971b073cc5..b5d9c40862b 100644 --- a/apps/user_ldap/tests/GroupLDAPPluginTest.php +++ b/apps/user_ldap/tests/GroupLDAPPluginTest.php @@ -24,7 +24,6 @@ namespace OCA\User_LDAP\Tests; - use OCA\User_LDAP\GroupPluginManager; use OCP\GroupInterface; @@ -153,7 +152,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getGroupPluginManager(); $pluginManager->addToGroup('foo', 'bar'); - } + } public function testRemoveFromGroup() { $pluginManager = $this->getGroupPluginManager(); @@ -215,7 +214,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getGroupPluginManager(); $pluginManager->countUsersInGroup('foo', 'bar'); - } + } public function testgetGroupDetails() { $pluginManager = $this->getGroupPluginManager(); diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php index fb5840f0ddb..cf6e2d7bb84 100644 --- a/apps/user_ldap/tests/Group_LDAPTest.php +++ b/apps/user_ldap/tests/Group_LDAPTest.php @@ -88,7 +88,7 @@ class Group_LDAPTest extends TestCase { $access->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapDynamicGroupMemberURL') { return ''; } @@ -109,7 +109,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn) use ($groupDN) { + ->willReturnCallback(function ($dn) use ($groupDN) { if($dn === $groupDN) { return [ 'uid=u11,ou=users,dc=foo,dc=bar', @@ -148,7 +148,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { //the search operation will call readAttribute, thus we need //to anaylze the "dn". All other times we just need to return //something that is neither null or false, but once an array @@ -162,7 +162,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->any()) ->method('dn2username') - ->willReturnCallback(function() { + ->willReturnCallback(function () { return 'foobar' . \OC::$server->getSecureRandom()->generate(7); }); @@ -194,7 +194,7 @@ class Group_LDAPTest extends TestCase { $ldap = new GroupLDAP($access, $pluginManager); $this->assertEquals($ldap->countUsersInGroup('gid', 'search'),42); - } + } public function testGidNumber2NameSuccess() { $access = $this->getAccessMock(); @@ -520,7 +520,7 @@ class Group_LDAPTest extends TestCase { ->willReturn(null); $access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { if($attr === 'primaryGroupToken') { return [1337]; } else if($attr === 'gidNumber') { @@ -557,7 +557,7 @@ class Group_LDAPTest extends TestCase { ->willReturn(null); $access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { if($attr === 'primaryGroupToken') { return [1337]; } @@ -593,7 +593,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { if($attr === 'primaryGroupToken') { return [1337]; } @@ -654,7 +654,7 @@ class Group_LDAPTest extends TestCase { $access->connection = $this->createMock(Connection::class); $access->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'useMemberOfToDetectMembership') { return 0; } else if($name === 'ldapDynamicGroupMemberURL') { @@ -692,7 +692,7 @@ class Group_LDAPTest extends TestCase { $access->connection = $this->createMock(Connection::class); $access->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { switch($name) { case 'useMemberOfToDetectMembership': return 0; @@ -1030,7 +1030,7 @@ class Group_LDAPTest extends TestCase { $access = $this->getAccessMock(); $access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($group) use ($groupDN, $expectedMembers, $groupsInfo) { + ->willReturnCallback(function ($group) use ($groupDN, $expectedMembers, $groupsInfo) { if(isset($groupsInfo[$group])) { return $groupsInfo[$group]; } @@ -1041,7 +1041,7 @@ class Group_LDAPTest extends TestCase { if(count($groupsInfo) > 1) { $access->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapNestedGroups') { return 1; } @@ -1079,7 +1079,7 @@ class Group_LDAPTest extends TestCase { $access->connection = $this->createMock(Connection::class); $access->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapGroupMemberAssocAttr') { return 'member'; } else if($name === 'ldapGroupFilter') { diff --git a/apps/user_ldap/tests/HelperTest.php b/apps/user_ldap/tests/HelperTest.php index c0fa693ff48..5aace2c5c91 100644 --- a/apps/user_ldap/tests/HelperTest.php +++ b/apps/user_ldap/tests/HelperTest.php @@ -25,7 +25,6 @@ namespace OCA\User_LDAP\Tests; - use OCA\User_LDAP\Helper; use OCP\IConfig; @@ -68,7 +67,7 @@ class HelperTest extends \Test\TestCase { ]); $this->config->method('getAppValue') - ->willReturnCallback(function($app, $key, $default) { + ->willReturnCallback(function ($app, $key, $default) { if ($app !== 'user_ldap') { $this->fail('wrong app'); } @@ -94,7 +93,7 @@ class HelperTest extends \Test\TestCase { ]); $this->config->method('getAppValue') - ->willReturnCallback(function($app, $key, $default) { + ->willReturnCallback(function ($app, $key, $default) { if ($app !== 'user_ldap') { $this->fail('wrong app'); } diff --git a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php index a3c4dd364fe..77aeddf94f5 100644 --- a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php +++ b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php @@ -71,10 +71,10 @@ abstract class AbstractIntegrationTest { * the LDAP backend. */ public function init() { - \OC::$server->registerService('LDAPUserPluginManager', function() { + \OC::$server->registerService('LDAPUserPluginManager', function () { return new \OCA\User_LDAP\UserPluginManager(); }); - \OC::$server->registerService('LDAPGroupPluginManager', function() { + \OC::$server->registerService('LDAPGroupPluginManager', function () { return new \OCA\User_LDAP\GroupPluginManager(); }); diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php index 7c62a20165e..33eb1c70d6f 100644 --- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php +++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php @@ -26,7 +26,6 @@ namespace OCA\User_LDAP\Tests\Integration; - use OC\ServerNotAvailableException; use OCA\User_LDAP\LDAP; @@ -37,7 +36,7 @@ use OCA\User_LDAP\LDAP; * * LDAP must be available via toxiproxy. * - * This test must be run manually. + * This test must be run manually. * */ class ExceptionOnLostConnection { @@ -175,8 +174,8 @@ class ExceptionOnLostConnection { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_HTTPHEADER, [ - 'Content-Type: application/json', - 'Content-Length: ' . strlen($postData)] + 'Content-Type: application/json', + 'Content-Length: ' . strlen($postData)] ); $recvd = curl_exec($ch); $this->checkCurlResult($ch, $recvd); diff --git a/apps/user_ldap/tests/Jobs/CleanUpTest.php b/apps/user_ldap/tests/Jobs/CleanUpTest.php index 75bd6f0b08e..bf4c8b75bac 100644 --- a/apps/user_ldap/tests/Jobs/CleanUpTest.php +++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php @@ -55,7 +55,7 @@ class CleanUpTest extends \Test\TestCase { $args = $this->getMocks(); $args['helper']->expects($this->once()) ->method('haveDisabledConfigurations') - ->willReturn(true ); + ->willReturn(true); $args['ocConfig']->expects($this->never()) ->method('getSystemValue'); diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 8cab95fc801..1cdbefb289c 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -128,7 +128,7 @@ class SyncTest extends TestCase { $this->config->expects($this->once()) ->method('setAppValue') ->with('user_ldap', 'background_sync_interval', $this->anything()) - ->willReturnCallback(function($a, $k, $interval) { + ->willReturnCallback(function ($a, $k, $interval) { $this->assertTrue($interval >= SYNC::MIN_INTERVAL); $this->assertTrue($interval <= SYNC::MAX_INTERVAL); return true; @@ -294,7 +294,7 @@ class SyncTest extends TestCase { public function testRun($runData) { $this->config->expects($this->any()) ->method('getAppValue') - ->willReturnCallback(function($app, $key, $default) use ($runData) { + ->willReturnCallback(function ($app, $key, $default) use ($runData) { if($app === 'core' && $key === 'backgroundjobs_mode') { return 'cron'; } diff --git a/apps/user_ldap/tests/LDAPGroupPluginDummy.php b/apps/user_ldap/tests/LDAPGroupPluginDummy.php index 224e8f93f5a..996f6f4a3f0 100644 --- a/apps/user_ldap/tests/LDAPGroupPluginDummy.php +++ b/apps/user_ldap/tests/LDAPGroupPluginDummy.php @@ -23,7 +23,6 @@ namespace OCA\User_LDAP\Tests; - use OCA\User_LDAP\ILDAPGroupPlugin; class LDAPGroupPluginDummy implements ILDAPGroupPlugin { diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php index 71e08654893..4433ed08baa 100644 --- a/apps/user_ldap/tests/LDAPProviderTest.php +++ b/apps/user_ldap/tests/LDAPProviderTest.php @@ -58,8 +58,8 @@ class LDAPProviderTest extends \Test\TestCase { ->setConstructorArgs(['', new \OC\Config(\OC::$configDir)]) ->getMock(); $server->expects($this->at(1)) - ->method('getBackends') - ->willReturn([$userBackend]); + ->method('getBackends') + ->willReturn([$userBackend]); $server->expects($this->any()) ->method('getUserManager') ->willReturn($this->getUserManagerMock($userBackend)); @@ -67,8 +67,8 @@ class LDAPProviderTest extends \Test\TestCase { ->method('getGroupManager') ->willReturn($this->getGroupManagerMock($groupBackend)); $server->expects($this->any()) - ->method($this->anything()) - ->willReturnSelf(); + ->method($this->anything()) + ->willReturnSelf(); return $server; } @@ -135,14 +135,14 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->at(0)) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->at(2)) - ->method('username2dn') - ->willReturn('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org'); + ->method('username2dn') + ->willReturn('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org'); $userBackend->expects($this->any()) - ->method($this->anything()) - ->willReturnSelf(); + ->method($this->anything()) + ->willReturnSelf(); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -207,8 +207,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('dn2UserName') - ->willReturn('existing_user'); + ->method('dn2UserName') + ->willReturn('existing_user'); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -272,11 +272,11 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->any()) - ->method('getNewLDAPConnection') - ->willReturn(true); + ->method('getNewLDAPConnection') + ->willReturn(true); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -381,8 +381,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->atLeastOnce()) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->any()) ->method('getLDAPAccess') ->willReturn($access); @@ -437,8 +437,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->any()) ->method('getLDAPAccess') ->willReturn($access); @@ -472,14 +472,14 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->at(0)) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->at(3)) - ->method('clearCache') - ->willReturn(true); + ->method('clearCache') + ->willReturn(true); $userBackend->expects($this->any()) - ->method($this->anything()) - ->willReturnSelf(); + ->method($this->anything()) + ->willReturnSelf(); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -539,8 +539,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('dn2UserName') - ->willReturn('existing_user'); + ->method('dn2UserName') + ->willReturn('existing_user'); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); diff --git a/apps/user_ldap/tests/LDAPTest.php b/apps/user_ldap/tests/LDAPTest.php index 56ee04906b7..8dd7122b4e1 100644 --- a/apps/user_ldap/tests/LDAPTest.php +++ b/apps/user_ldap/tests/LDAPTest.php @@ -60,7 +60,7 @@ class LDAPTest extends TestCase { public function testSearchWithErrorHandler(string $errorMessage, bool $passThrough) { $wasErrorHandlerCalled = false; - $errorHandler = function($number, $message, $file, $line) use (&$wasErrorHandlerCalled) { + $errorHandler = function ($number, $message, $file, $line) use (&$wasErrorHandlerCalled) { $wasErrorHandlerCalled = true; }; @@ -70,7 +70,7 @@ class LDAPTest extends TestCase { ->expects($this->once()) ->method('invokeLDAPMethod') ->with('search', $this->anything(), $this->anything(), $this->anything(), $this->anything(), $this->anything()) - ->willReturnCallback(function() use($errorMessage) { + ->willReturnCallback(function () use ($errorMessage) { trigger_error($errorMessage); }); diff --git a/apps/user_ldap/tests/LDAPUserPluginDummy.php b/apps/user_ldap/tests/LDAPUserPluginDummy.php index 9ab7479a728..609742d872d 100644 --- a/apps/user_ldap/tests/LDAPUserPluginDummy.php +++ b/apps/user_ldap/tests/LDAPUserPluginDummy.php @@ -23,7 +23,6 @@ namespace OCA\User_LDAP\Tests; - use OCA\User_LDAP\ILDAPUserPlugin; class LDAPUserPluginDummy implements ILDAPUserPlugin { diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php index 4e8dacaeda1..7453b31e338 100644 --- a/apps/user_ldap/tests/User/UserTest.php +++ b/apps/user_ldap/tests/User/UserTest.php @@ -606,7 +606,7 @@ class UserTest extends \Test\TestCase { public function XtestUpdateAvatarThumbnailPhotoProvided() { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { if($dn === $this->dn && $attr === 'jpegphoto') { @@ -671,7 +671,7 @@ class UserTest extends \Test\TestCase { public function testUpdateAvatarCorruptPhotoProvided() { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { if($dn === $this->dn && $attr === 'jpegphoto') { @@ -724,7 +724,7 @@ class UserTest extends \Test\TestCase { public function XtestUpdateAvatarUnsupportedThumbnailPhotoProvided() { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { if($dn === $this->dn && $attr === 'jpegphoto') { @@ -789,7 +789,7 @@ class UserTest extends \Test\TestCase { public function testUpdateAvatarNotProvided() { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { if($dn === $this->dn && $attr === 'jpegPhoto') { @@ -1038,7 +1038,7 @@ class UserTest extends \Test\TestCase { ]); $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'homeFolderNamingRule') { return 'attr:homeDirectory'; } @@ -1193,7 +1193,7 @@ class UserTest extends \Test\TestCase { public function testHandlePasswordExpiryWarningDefaultPolicy() { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapDefaultPPolicyDN') { return 'cn=default,ou=policies,dc=foo,dc=bar'; } @@ -1205,7 +1205,7 @@ class UserTest extends \Test\TestCase { $this->access->expects($this->any()) ->method('search') - ->willReturnCallback(function($filter, $base) { + ->willReturnCallback(function ($filter, $base) { if($base === [$this->dn]) { return [ [ @@ -1256,7 +1256,7 @@ class UserTest extends \Test\TestCase { public function testHandlePasswordExpiryWarningCustomPolicy() { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapDefaultPPolicyDN') { return 'cn=default,ou=policies,dc=foo,dc=bar'; } @@ -1268,7 +1268,7 @@ class UserTest extends \Test\TestCase { $this->access->expects($this->any()) ->method('search') - ->willReturnCallback(function($filter, $base) { + ->willReturnCallback(function ($filter, $base) { if($base === [$this->dn]) { return [ [ diff --git a/apps/user_ldap/tests/UserLDAPPluginTest.php b/apps/user_ldap/tests/UserLDAPPluginTest.php index 1c624b7d340..03557ec174b 100644 --- a/apps/user_ldap/tests/UserLDAPPluginTest.php +++ b/apps/user_ldap/tests/UserLDAPPluginTest.php @@ -24,7 +24,6 @@ namespace OCA\User_LDAP\Tests; - use OC\User\Backend; use OCA\User_LDAP\UserPluginManager; @@ -154,7 +153,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getUserPluginManager(); $pluginManager->getHome('foo'); - } + } public function testGetDisplayName() { $pluginManager = $this->getUserPluginManager(); @@ -205,7 +204,7 @@ class UserLDAPPluginTest extends \Test\TestCase { ); $pluginManager->register($plugin); - $pluginManager->setDisplayName('user', 'password'); + $pluginManager->setDisplayName('user', 'password'); } @@ -215,7 +214,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getUserPluginManager(); $pluginManager->setDisplayName('foo', 'bar'); - } + } public function testCanChangeAvatar() { $pluginManager = $this->getUserPluginManager(); @@ -272,7 +271,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getUserPluginManager(); $pluginManager->countUsers(); - } + } public function testDeleteUser() { $pluginManager = $this->getUserPluginManager(); diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 3f0259692ac..8dc699f371b 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -108,7 +108,7 @@ class User_LDAPTest extends TestCase { private function prepareMockForUserExists() { $this->access->expects($this->any()) ->method('username2dn') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch ($uid) { case 'gunslinger': return 'dnOfRoland,dc=test'; @@ -139,7 +139,7 @@ class User_LDAPTest extends TestCase { private function prepareAccessForCheckPassword($noDisplayName = false) { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapLoginFilter') { return '%uid'; } @@ -148,7 +148,7 @@ class User_LDAPTest extends TestCase { $this->access->expects($this->any()) ->method('fetchListOfUsers') - ->willReturnCallback(function($filter) { + ->willReturnCallback(function ($filter) { if($filter === 'roland') { return [['dn' => ['dnOfRoland,dc=test']]]; } @@ -156,7 +156,7 @@ class User_LDAPTest extends TestCase { }); $this->access->expects($this->any()) ->method('fetchUsersByLoginName') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { if($uid === 'roland') { return [['dn' => ['dnOfRoland,dc=test']]]; } @@ -177,7 +177,7 @@ class User_LDAPTest extends TestCase { ->willReturn(true); $this->access->expects($this->any()) ->method('areCredentialsValid') - ->willReturnCallback(function($dn, $pwd) { + ->willReturnCallback(function ($dn, $pwd) { if($pwd === 'dt19') { return true; } @@ -363,22 +363,22 @@ class User_LDAPTest extends TestCase { private function prepareAccessForGetUsers() { $this->access->expects($this->once()) ->method('escapeFilterPart') - ->willReturnCallback(function($search) { + ->willReturnCallback(function ($search) { return $search; }); $this->access->expects($this->any()) ->method('getFilterPartForUserSearch') - ->willReturnCallback(function($search) { + ->willReturnCallback(function ($search) { return $search; }); $this->access->expects($this->any()) ->method('combineFilterWithAnd') - ->willReturnCallback(function($param) { + ->willReturnCallback(function ($param) { return $param[2]; }); $this->access->expects($this->any()) ->method('fetchListOfUsers') - ->willReturnCallback(function($search, $a, $l, $o) { + ->willReturnCallback(function ($search, $a, $l, $o) { $users = ['gunslinger', 'newyorker', 'ladyofshadows']; if(empty($search)) { $result = $users; @@ -444,7 +444,7 @@ class User_LDAPTest extends TestCase { private function getUsers($search = '', $limit = null, $offset = null) { $users = \OC::$server->getUserManager()->search($search, $limit, $offset); - $uids = array_map(function(IUser $user) { + $uids = array_map(function (IUser $user) { return $user->getUID(); }, $users); return $uids; @@ -544,7 +544,7 @@ class User_LDAPTest extends TestCase { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn) { + ->willReturnCallback(function ($dn) { if($dn === 'dnOfRoland,dc=test') { return []; } @@ -569,7 +569,7 @@ class User_LDAPTest extends TestCase { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn) { + ->willReturnCallback(function ($dn) { if($dn === 'dnOfRoland,dc=test') { return []; } @@ -601,7 +601,7 @@ class User_LDAPTest extends TestCase { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'homeFolderNamingRule') { return 'attr:testAttribute'; } @@ -610,7 +610,7 @@ class User_LDAPTest extends TestCase { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { switch ($dn) { case 'dnOfRoland,dc=test': if($attr === 'testAttribute') { @@ -653,7 +653,7 @@ class User_LDAPTest extends TestCase { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'homeFolderNamingRule') { return 'attr:testAttribute'; } @@ -662,7 +662,7 @@ class User_LDAPTest extends TestCase { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { switch ($dn) { case 'dnOfLadyOfShadows,dc=test': if($attr === 'testAttribute') { @@ -704,7 +704,7 @@ class User_LDAPTest extends TestCase { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'homeFolderNamingRule') { return 'attr:testAttribute'; } @@ -712,7 +712,7 @@ class User_LDAPTest extends TestCase { }); $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { switch ($dn) { default: return false; @@ -720,7 +720,7 @@ class User_LDAPTest extends TestCase { }); $this->access->connection->expects($this->any()) ->method('getFromCache') - ->willReturnCallback(function($key) { + ->willReturnCallback(function ($key) { if($key === 'userExistsnewyorker') { return true; } @@ -752,7 +752,7 @@ class User_LDAPTest extends TestCase { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'homeFolderNamingRule') { return 'attr:testAttribute'; } @@ -798,7 +798,7 @@ class User_LDAPTest extends TestCase { $this->connection->expects($this->any()) ->method('getFromCache') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { return true; }); @@ -809,7 +809,7 @@ class User_LDAPTest extends TestCase { private function prepareAccessForGetDisplayName() { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapUserDisplayName') { return 'displayname'; } @@ -818,7 +818,7 @@ class User_LDAPTest extends TestCase { $this->access->expects($this->any()) ->method('readAttribute') - ->willReturnCallback(function($dn, $attr) { + ->willReturnCallback(function ($dn, $attr) { switch ($dn) { case 'dnOfRoland,dc=test': if($attr === 'displayname') { @@ -842,7 +842,7 @@ class User_LDAPTest extends TestCase { $this->connection->expects($this->any()) ->method('getConnectionResource') - ->willReturnCallback(function() { + ->willReturnCallback(function () { return true; }); @@ -864,11 +864,11 @@ class User_LDAPTest extends TestCase { $mapper = $this->createMock(UserMapping::class); $mapper->expects($this->any()) ->method('getUUIDByDN') - ->willReturnCallback(function($dn) { return $dn; }); + ->willReturnCallback(function ($dn) { return $dn; }); $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) use ($user1, $user2) { + ->willReturnCallback(function ($uid) use ($user1, $user2) { if($uid === 'gunslinger') { return $user1; } else if($uid === 'newyorker') { @@ -881,7 +881,7 @@ class User_LDAPTest extends TestCase { ->willReturn($mapper); $this->access->expects($this->any()) ->method('getUserDnByUuid') - ->willReturnCallback(function($uuid) { return $uuid . '1'; }); + ->willReturnCallback(function ($uuid) { return $uuid . '1'; }); //with displayName $result = $backend->getDisplayName('gunslinger'); @@ -895,7 +895,7 @@ class User_LDAPTest extends TestCase { public function testGetDisplayNamePublicAPI() { $this->access->expects($this->any()) ->method('username2dn') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch ($uid) { case 'gunslinger': return 'dnOfRoland,dc=test'; @@ -919,7 +919,7 @@ class User_LDAPTest extends TestCase { $this->connection->expects($this->any()) ->method('getConnectionResource') - ->willReturnCallback(function() { + ->willReturnCallback(function () { return true; }); @@ -943,11 +943,11 @@ class User_LDAPTest extends TestCase { $mapper = $this->createMock(UserMapping::class); $mapper->expects($this->any()) ->method('getUUIDByDN') - ->willReturnCallback(function($dn) { return $dn; }); + ->willReturnCallback(function ($dn) { return $dn; }); $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) use ($user1, $user2) { + ->willReturnCallback(function ($uid) use ($user1, $user2) { if($uid === 'gunslinger') { return $user1; } else if($uid === 'newyorker') { @@ -960,7 +960,7 @@ class User_LDAPTest extends TestCase { ->willReturn($mapper); $this->access->expects($this->any()) ->method('getUserDnByUuid') - ->willReturnCallback(function($uuid) { return $uuid . '1'; }); + ->willReturnCallback(function ($uuid) { return $uuid . '1'; }); //with displayName $result = \OC::$server->getUserManager()->get('gunslinger')->getDisplayName(); @@ -1135,7 +1135,7 @@ class User_LDAPTest extends TestCase { private function prepareAccessForSetPassword($enablePasswordChange = true) { $this->connection->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) use (&$enablePasswordChange) { + ->willReturnCallback(function ($name) use (&$enablePasswordChange) { if($name === 'ldapLoginFilter') { return '%uid'; } @@ -1146,7 +1146,7 @@ class User_LDAPTest extends TestCase { }); $this->connection->expects($this->any()) ->method('getFromCache') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { if($uid === 'userExists'.'roland') { return true; } @@ -1155,7 +1155,7 @@ class User_LDAPTest extends TestCase { $this->access->expects($this->any()) ->method('fetchListOfUsers') - ->willReturnCallback(function($filter) { + ->willReturnCallback(function ($filter) { if($filter === 'roland') { return [['dn' => ['dnOfRoland,dc=test']]]; } @@ -1163,7 +1163,7 @@ class User_LDAPTest extends TestCase { }); $this->access->expects($this->any()) ->method('fetchUsersByLoginName') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { if($uid === 'roland') { return [['dn' => ['dnOfRoland,dc=test']]]; } @@ -1179,7 +1179,7 @@ class User_LDAPTest extends TestCase { ->willReturn(true); $this->access->expects($this->any()) ->method('setPassword') - ->willReturnCallback(function($uid, $password) { + ->willReturnCallback(function ($uid, $password) { if(strlen($password) <= 5) { throw new HintException('Password fails quality checking policy', '', 19); } diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index 4a7fbb6bbaf..0a94eb2a1f4 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -49,7 +49,7 @@ class WizardTest extends TestCase { //we need to make sure the consts are defined, otherwise tests will fail //on systems without php5_ldap $ldapConsts = ['LDAP_OPT_PROTOCOL_VERSION', - 'LDAP_OPT_REFERRALS', 'LDAP_OPT_NETWORK_TIMEOUT']; + 'LDAP_OPT_REFERRALS', 'LDAP_OPT_NETWORK_TIMEOUT']; foreach($ldapConsts as $const) { if(!defined($const)) { define($const, 42); @@ -103,7 +103,7 @@ class WizardTest extends TestCase { $configuration->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapBase') { return ['base']; } @@ -147,7 +147,7 @@ class WizardTest extends TestCase { $ldap->expects($this->exactly(10)) ->method('getDN') //dummy value, usually invalid - ->willReturnCallback(function($a, $b) { + ->willReturnCallback(function ($a, $b) { global $uidnumber; return $uidnumber++; }); @@ -163,7 +163,7 @@ class WizardTest extends TestCase { $configuration->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapBase') { return ['base']; } @@ -174,7 +174,7 @@ class WizardTest extends TestCase { $ldap->expects($this->any()) ->method('isResource') - ->willReturnCallback(function($r) { + ->willReturnCallback(function ($r) { if($r === true) { return true; } @@ -200,7 +200,7 @@ class WizardTest extends TestCase { $ldap->expects($this->exactly(2)) ->method('firstEntry') //dummy value, usually invalid - ->willReturnCallback(function($r) { + ->willReturnCallback(function ($r) { global $uidnumber; return $uidnumber; }); @@ -208,7 +208,7 @@ class WizardTest extends TestCase { $ldap->expects($this->exactly(46)) ->method('nextEntry') //dummy value, usually invalid - ->willReturnCallback(function($r) { + ->willReturnCallback(function ($r) { global $uidnumber; return $uidnumber; }); @@ -223,7 +223,7 @@ class WizardTest extends TestCase { $ldap->expects($this->exactly(46)) ->method('getDN') //dummy value, usually invalid - ->willReturnCallback(function($a, $b) { + ->willReturnCallback(function ($a, $b) { global $uidnumber; return $uidnumber++; }); @@ -379,7 +379,7 @@ class WizardTest extends TestCase { $configuration->expects($this->any()) ->method('__get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if($name === 'ldapBase') { return ['base']; } @@ -390,7 +390,7 @@ class WizardTest extends TestCase { $ldap->expects($this->any()) ->method('isResource') - ->willReturnCallback(function($res) { + ->willReturnCallback(function ($res) { return (bool)$res; }); @@ -416,7 +416,7 @@ class WizardTest extends TestCase { $ldap->expects($this->any()) ->method('nextEntry') //dummy value, usually invalid - ->willReturnCallback(function($a, $prev){ + ->willReturnCallback(function ($a, $prev) { $current = $prev + 1; if($current === 7) { return false; @@ -432,14 +432,14 @@ class WizardTest extends TestCase { $ldap->expects($this->any()) ->method('getAttributes') //dummy value, usually invalid - ->willReturnCallback(function($a, $entry) { + ->willReturnCallback(function ($a, $entry) { return ['cn' => [$entry], 'count' => 1]; }); $ldap->expects($this->any()) ->method('getDN') //dummy value, usually invalid - ->willReturnCallback(function($a, $b) { + ->willReturnCallback(function ($a, $b) { return $b; }); diff --git a/apps/workflowengine/l10n/ja.js b/apps/workflowengine/l10n/ja.js index fd38d387789..2625d526004 100644 --- a/apps/workflowengine/l10n/ja.js +++ b/apps/workflowengine/l10n/ja.js @@ -13,6 +13,14 @@ OC.L10N.register( "The given end time is invalid" : "指定された終了時刻は無効です", "The given group does not exist" : "指定されたグループは存在しません", "File" : "ファイル", + "File created" : "ファイル作成時", + "File updated" : "ファイル更新時", + "File renamed" : "ファイル名変更時", + "File deleted" : "ファイル削除時", + "File accessed" : "ファイルアクセス時", + "File copied" : "ファイル複製時", + "Tag assigned" : "タグ割り当て時", + "Someone" : "誰か", "Operation #%s does not exist" : "#%s 操作は存在しません", "Operation %s does not exist" : "%s 操作は存在しません", "Operation %s is invalid" : "%s 操作は無効です", @@ -34,6 +42,7 @@ OC.L10N.register( "Thunderbird & Outlook addons" : "Thunderbird & Outlook アドオン", "Cancel" : "キャンセル", "Delete" : "削除", + "The configuration is invalid" : "設定が正しくありません", "Active" : "アクティブ化", "Save" : "保存", "Browse the app store" : "アプリストアをブラウザでみる", diff --git a/apps/workflowengine/l10n/ja.json b/apps/workflowengine/l10n/ja.json index 8f32ae243b8..7ca720423b1 100644 --- a/apps/workflowengine/l10n/ja.json +++ b/apps/workflowengine/l10n/ja.json @@ -11,6 +11,14 @@ "The given end time is invalid" : "指定された終了時刻は無効です", "The given group does not exist" : "指定されたグループは存在しません", "File" : "ファイル", + "File created" : "ファイル作成時", + "File updated" : "ファイル更新時", + "File renamed" : "ファイル名変更時", + "File deleted" : "ファイル削除時", + "File accessed" : "ファイルアクセス時", + "File copied" : "ファイル複製時", + "Tag assigned" : "タグ割り当て時", + "Someone" : "誰か", "Operation #%s does not exist" : "#%s 操作は存在しません", "Operation %s does not exist" : "%s 操作は存在しません", "Operation %s is invalid" : "%s 操作は無効です", @@ -32,6 +40,7 @@ "Thunderbird & Outlook addons" : "Thunderbird & Outlook アドオン", "Cancel" : "キャンセル", "Delete" : "削除", + "The configuration is invalid" : "設定が正しくありません", "Active" : "アクティブ化", "Save" : "保存", "Browse the app store" : "アプリストアをブラウザでみる", diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php index e86ac6bec17..e0de77a852b 100644 --- a/apps/workflowengine/lib/Check/AbstractStringCheck.php +++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCP\IL10N; use OCP\WorkflowEngine\ICheck; use OCP\WorkflowEngine\IManager; @@ -51,7 +50,7 @@ abstract class AbstractStringCheck implements ICheck { * @param string $value * @return bool */ - public function executeCheck($operator, $value) { + public function executeCheck($operator, $value) { $actualValue = $this->getActualValue(); return $this->executeStringCheck($operator, $value, $actualValue); } diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php index a684785911b..9d378379e5e 100644 --- a/apps/workflowengine/lib/Check/FileMimeType.php +++ b/apps/workflowengine/lib/Check/FileMimeType.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCA\WorkflowEngine\Entity\File; use OCP\Files\IMimeTypeDetector; use OCP\Files\Storage\IStorage; diff --git a/apps/workflowengine/lib/Check/FileName.php b/apps/workflowengine/lib/Check/FileName.php index b17355fc486..9f2a78aef62 100644 --- a/apps/workflowengine/lib/Check/FileName.php +++ b/apps/workflowengine/lib/Check/FileName.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2018 Daniel Kesselberg <mail@danielkesselberg.de> diff --git a/apps/workflowengine/lib/Check/FileSize.php b/apps/workflowengine/lib/Check/FileSize.php index ce1bd4718f9..741426082dc 100644 --- a/apps/workflowengine/lib/Check/FileSize.php +++ b/apps/workflowengine/lib/Check/FileSize.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCA\WorkflowEngine\Entity\File; use OCP\IL10N; use OCP\IRequest; diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php index e7e114881ad..03a55b3caca 100644 --- a/apps/workflowengine/lib/Check/FileSystemTags.php +++ b/apps/workflowengine/lib/Check/FileSystemTags.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCA\WorkflowEngine\Entity\File; use OCP\Files\Cache\ICache; use OCP\Files\IHomeStorage; diff --git a/apps/workflowengine/lib/Check/RequestRemoteAddress.php b/apps/workflowengine/lib/Check/RequestRemoteAddress.php index 00029771b52..61022a2513b 100644 --- a/apps/workflowengine/lib/Check/RequestRemoteAddress.php +++ b/apps/workflowengine/lib/Check/RequestRemoteAddress.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCP\IL10N; use OCP\IRequest; use OCP\WorkflowEngine\ICheck; diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php index a6ab4a961ed..aa35e8b84c9 100644 --- a/apps/workflowengine/lib/Check/RequestTime.php +++ b/apps/workflowengine/lib/Check/RequestTime.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCP\AppFramework\Utility\ITimeFactory; use OCP\IL10N; use OCP\WorkflowEngine\ICheck; diff --git a/apps/workflowengine/lib/Check/RequestURL.php b/apps/workflowengine/lib/Check/RequestURL.php index 36d41c101f2..30424a1ee47 100644 --- a/apps/workflowengine/lib/Check/RequestURL.php +++ b/apps/workflowengine/lib/Check/RequestURL.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCP\IL10N; use OCP\IRequest; @@ -47,7 +46,7 @@ class RequestURL extends AbstractStringCheck { * @param string $value * @return bool */ - public function executeCheck($operator, $value) { + public function executeCheck($operator, $value) { $actualValue = $this->getActualValue(); if (in_array($operator, ['is', '!is'])) { switch ($value) { diff --git a/apps/workflowengine/lib/Check/RequestUserAgent.php b/apps/workflowengine/lib/Check/RequestUserAgent.php index ddc222833dd..24dfb1b906e 100644 --- a/apps/workflowengine/lib/Check/RequestUserAgent.php +++ b/apps/workflowengine/lib/Check/RequestUserAgent.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCP\IL10N; use OCP\IRequest; diff --git a/apps/workflowengine/lib/Check/TFileCheck.php b/apps/workflowengine/lib/Check/TFileCheck.php index afaf46b52bf..90eb7dc616c 100644 --- a/apps/workflowengine/lib/Check/TFileCheck.php +++ b/apps/workflowengine/lib/Check/TFileCheck.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Check/UserGroupMembership.php b/apps/workflowengine/lib/Check/UserGroupMembership.php index 8839820050a..27b2ce1879c 100644 --- a/apps/workflowengine/lib/Check/UserGroupMembership.php +++ b/apps/workflowengine/lib/Check/UserGroupMembership.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Check; - use OCP\IGroupManager; use OCP\IL10N; use OCP\IUser; diff --git a/apps/workflowengine/lib/Command/Index.php b/apps/workflowengine/lib/Command/Index.php index 7f3af3c0811..5f901c262df 100644 --- a/apps/workflowengine/lib/Command/Index.php +++ b/apps/workflowengine/lib/Command/Index.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Controller/AWorkflowController.php b/apps/workflowengine/lib/Controller/AWorkflowController.php index 8d51600c7b2..767ae79c5fd 100644 --- a/apps/workflowengine/lib/Controller/AWorkflowController.php +++ b/apps/workflowengine/lib/Controller/AWorkflowController.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php b/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php index 6d49c87b83e..45930c34c5b 100644 --- a/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php +++ b/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Controller/UserWorkflowsController.php b/apps/workflowengine/lib/Controller/UserWorkflowsController.php index 9bb7fc4778a..226746a2264 100644 --- a/apps/workflowengine/lib/Controller/UserWorkflowsController.php +++ b/apps/workflowengine/lib/Controller/UserWorkflowsController.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Entity/File.php b/apps/workflowengine/lib/Entity/File.php index 84e750815b6..78178ff759d 100644 --- a/apps/workflowengine/lib/Entity/File.php +++ b/apps/workflowengine/lib/Entity/File.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Helper/LogContext.php b/apps/workflowengine/lib/Helper/LogContext.php index fa69cde4009..231294d8c74 100644 --- a/apps/workflowengine/lib/Helper/LogContext.php +++ b/apps/workflowengine/lib/Helper/LogContext.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Helper/ScopeContext.php b/apps/workflowengine/lib/Helper/ScopeContext.php index fecc4db0ed7..e0251131a01 100644 --- a/apps/workflowengine/lib/Helper/ScopeContext.php +++ b/apps/workflowengine/lib/Helper/ScopeContext.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php index f715ebc7ef7..3c8d4ce81f8 100644 --- a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php +++ b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Service/Logger.php b/apps/workflowengine/lib/Service/Logger.php index dee09cc0aa4..f369a304e9c 100644 --- a/apps/workflowengine/lib/Service/Logger.php +++ b/apps/workflowengine/lib/Service/Logger.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php index fab2d23aa49..e5dbc08ce1f 100644 --- a/apps/workflowengine/lib/Service/RuleMatcher.php +++ b/apps/workflowengine/lib/Service/RuleMatcher.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Settings/ASettings.php b/apps/workflowengine/lib/Settings/ASettings.php index 6a03625c304..b2db7d12364 100644 --- a/apps/workflowengine/lib/Settings/ASettings.php +++ b/apps/workflowengine/lib/Settings/ASettings.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> @@ -146,7 +147,7 @@ abstract class ASettings implements ISettings { private function entitiesToArray(array $entities) { return array_map(function (IEntity $entity) { - $events = array_map(function(IEntityEvent $entityEvent) { + $events = array_map(function (IEntityEvent $entityEvent) { return [ 'eventName' => $entityEvent->getEventName(), 'displayName' => $entityEvent->getDisplayName() @@ -163,7 +164,7 @@ abstract class ASettings implements ISettings { } private function operatorsToArray(array $operators) { - $operators = array_filter($operators, function(IOperation $operator) { + $operators = array_filter($operators, function (IOperation $operator) { return $operator->isAvailableForScope($this->getScope()); }); @@ -181,7 +182,7 @@ abstract class ASettings implements ISettings { } private function checksToArray(array $checks) { - $checks = array_filter($checks, function(ICheck $check) { + $checks = array_filter($checks, function (ICheck $check) { return $check->isAvailableForScope($this->getScope()); }); diff --git a/apps/workflowengine/lib/Settings/Admin.php b/apps/workflowengine/lib/Settings/Admin.php index fa668231b41..3f8cb00982e 100644 --- a/apps/workflowengine/lib/Settings/Admin.php +++ b/apps/workflowengine/lib/Settings/Admin.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/lib/Settings/Personal.php b/apps/workflowengine/lib/Settings/Personal.php index 30f52073a1c..15f4df3c7e6 100644 --- a/apps/workflowengine/lib/Settings/Personal.php +++ b/apps/workflowengine/lib/Settings/Personal.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> diff --git a/apps/workflowengine/tests/Check/AbstractStringCheckTest.php b/apps/workflowengine/tests/Check/AbstractStringCheckTest.php index 70f8f79146a..f9fc57a5331 100644 --- a/apps/workflowengine/tests/Check/AbstractStringCheckTest.php +++ b/apps/workflowengine/tests/Check/AbstractStringCheckTest.php @@ -31,7 +31,7 @@ class AbstractStringCheckTest extends \Test\TestCase { ->getMock(); $l->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return sprintf($string, $args); }); diff --git a/apps/workflowengine/tests/Check/RequestUserAgentTest.php b/apps/workflowengine/tests/Check/RequestUserAgentTest.php index 7003441053d..7ea5aad2a6e 100644 --- a/apps/workflowengine/tests/Check/RequestUserAgentTest.php +++ b/apps/workflowengine/tests/Check/RequestUserAgentTest.php @@ -44,7 +44,7 @@ class RequestUserAgentTest extends TestCase { ->getMock(); $l->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return sprintf($string, $args); }); diff --git a/apps/workflowengine/tests/ManagerTest.php b/apps/workflowengine/tests/ManagerTest.php index aa6f4baef89..cad4be174cf 100644 --- a/apps/workflowengine/tests/ManagerTest.php +++ b/apps/workflowengine/tests/ManagerTest.php @@ -21,7 +21,6 @@ namespace OCA\WorkflowEngine\Tests; - use OC\L10N\L10N; use OCA\WorkflowEngine\Entity\File; use OCA\WorkflowEngine\Helper\ScopeContext; @@ -79,7 +78,7 @@ class ManagerTest extends TestCase { /** @var IL10N|MockObject $l */ $this->l = $this->createMock(IL10N::class); $this->l->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); @@ -415,7 +414,7 @@ class ManagerTest extends TestCase { $this->legacyDispatcher->expects($this->once()) ->method('dispatch') ->with('OCP\WorkflowEngine::registerEntities', $this->anything()) - ->willReturnCallback(function() use ($extraEntity) { + ->willReturnCallback(function () use ($extraEntity) { $this->manager->registerEntity($extraEntity); }); diff --git a/autotest-checkers.sh b/autotest-checkers.sh index bb1ad2534fb..105cf95c534 100755 --- a/autotest-checkers.sh +++ b/autotest-checkers.sh @@ -6,6 +6,8 @@ bash ./build/autoloaderchecker.sh RESULT=$(($RESULT+$?)) php ./build/translation-checker.php RESULT=$(($RESULT+$?)) +php ./build/triple-dot-checker.php +RESULT=$(($RESULT+$?)) php ./build/htaccess-checker.php RESULT=$(($RESULT+$?)) bash ./build/ca-bundle-checker.sh diff --git a/build/integration/features/bootstrap/AppConfiguration.php b/build/integration/features/bootstrap/AppConfiguration.php index 23ce2f89d04..87ecce24659 100644 --- a/build/integration/features/bootstrap/AppConfiguration.php +++ b/build/integration/features/bootstrap/AppConfiguration.php @@ -96,7 +96,7 @@ trait AppConfiguration { * reset the configs before each scenario * @param BeforeScenarioScope $event */ - public function prepareParameters(BeforeScenarioScope $event){ + public function prepareParameters(BeforeScenarioScope $event) { $user = $this->currentUser; $this->currentUser = 'admin'; diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php index 03cdd58833e..6a42cc1915d 100644 --- a/build/integration/features/bootstrap/BasicStructure.php +++ b/build/integration/features/bootstrap/BasicStructure.php @@ -370,7 +370,7 @@ trait BasicStructure { private function getDataDirectory() { // Based on "runOcc" from CommandLine trait $args = ['config:system:get', 'datadirectory']; - $args = array_map(function($arg) { + $args = array_map(function ($arg) { return escapeshellarg($arg); }, $args); $args[] = '--no-ansi --no-warnings'; diff --git a/build/integration/features/bootstrap/CalDavContext.php b/build/integration/features/bootstrap/CalDavContext.php index 13794df851a..b7b099b9850 100644 --- a/build/integration/features/bootstrap/CalDavContext.php +++ b/build/integration/features/bootstrap/CalDavContext.php @@ -80,7 +80,7 @@ class CalDavContext implements \Behat\Behat\Context\Context { * @param string $calendar * @param string $endpoint */ - public function requestsCalendar($user, $calendar, $endpoint) { + public function requestsCalendar($user, $calendar, $endpoint) { $davUrl = $this->baseUrl . $endpoint . $calendar; $password = ($user === 'admin') ? 'admin' : '123456'; diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php index f38ba17551a..9f778ea5b5a 100644 --- a/build/integration/features/bootstrap/CapabilitiesContext.php +++ b/build/integration/features/bootstrap/CapabilitiesContext.php @@ -42,7 +42,7 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext { * @Then /^fields of capabilities match with$/ * @param \Behat\Gherkin\Node\TableNode|null $formData */ - public function checkCapabilitiesResponse(\Behat\Gherkin\Node\TableNode $formData){ + public function checkCapabilitiesResponse(\Behat\Gherkin\Node\TableNode $formData) { $capabilitiesXML = simplexml_load_string($this->response->getBody())->data->capabilities; foreach ($formData->getHash() as $row) { diff --git a/build/integration/features/bootstrap/CardDavContext.php b/build/integration/features/bootstrap/CardDavContext.php index 2837634a9d5..3e79c41fd13 100644 --- a/build/integration/features/bootstrap/CardDavContext.php +++ b/build/integration/features/bootstrap/CardDavContext.php @@ -206,7 +206,7 @@ class CardDavContext implements \Behat\Behat\Context\Context { /** * @Given :user uploads the contact :fileName to the addressbook :addressbook */ - public function uploadsTheContactToTheAddressbook($user, $fileName, $addressBook) { + public function uploadsTheContactToTheAddressbook($user, $fileName, $addressBook) { $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName; $password = ($user === 'admin') ? 'admin' : '123456'; @@ -239,7 +239,7 @@ class CardDavContext implements \Behat\Behat\Context\Context { /** * @When Exporting the picture of contact :fileName from addressbook :addressBook as user :user */ - public function whenExportingThePictureOfContactFromAddressbookAsUser($fileName, $addressBook, $user) { + public function whenExportingThePictureOfContactFromAddressbookAsUser($fileName, $addressBook, $user) { $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName . '?photo=true'; $password = ($user === 'admin') ? 'admin' : '123456'; @@ -265,7 +265,7 @@ class CardDavContext implements \Behat\Behat\Context\Context { /** * @When Downloading the contact :fileName from addressbook :addressBook as user :user */ - public function whenDownloadingTheContactFromAddressbookAsUser($fileName, $addressBook, $user) { + public function whenDownloadingTheContactFromAddressbookAsUser($fileName, $addressBook, $user) { $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName; $password = ($user === 'admin') ? 'admin' : '123456'; diff --git a/build/integration/features/bootstrap/CommandLine.php b/build/integration/features/bootstrap/CommandLine.php index 91aa7028821..85b5b1e7464 100644 --- a/build/integration/features/bootstrap/CommandLine.php +++ b/build/integration/features/bootstrap/CommandLine.php @@ -42,7 +42,7 @@ trait CommandLine { * @return int exit code */ public function runOcc($args = []) { - $args = array_map(function($arg) { + $args = array_map(function ($arg) { return escapeshellarg($arg); }, $args); $args[] = '--no-ansi'; diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php index 5bb87c04a94..678cf40351f 100644 --- a/build/integration/features/bootstrap/CommandLineContext.php +++ b/build/integration/features/bootstrap/CommandLineContext.php @@ -42,14 +42,14 @@ class CommandLineContext implements \Behat\Behat\Context\Context { /** * @Given Maintenance mode is enabled */ - public function maintenanceModeIsEnabled() { + public function maintenanceModeIsEnabled() { $this->runOcc(['maintenance:mode', '--on']); } /** * @Then Maintenance mode is disabled */ - public function maintenanceModeIsDisabled() { + public function maintenanceModeIsDisabled() { $this->runOcc(['maintenance:mode', '--off']); } @@ -82,7 +82,7 @@ class CommandLineContext implements \Behat\Behat\Context\Context { return null; } - usort($foundPaths, function($a, $b) { + usort($foundPaths, function ($a, $b) { return $a['date'] - $b['date']; }); diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php index d710b9e502d..dce62b16c0d 100644 --- a/build/integration/features/bootstrap/FederationContext.php +++ b/build/integration/features/bootstrap/FederationContext.php @@ -46,7 +46,7 @@ class FederationContext implements Context, SnippetAcceptingContext { * @param string $shareeUser * @param string $shareeServer "LOCAL" or "REMOTE" */ - public function federateSharing($sharerUser, $sharerServer, $sharerPath, $shareeUser, $shareeServer){ + public function federateSharing($sharerUser, $sharerServer, $sharerPath, $shareeUser, $shareeServer) { if ($shareeServer == "REMOTE"){ $shareWith = "$shareeUser@" . substr($this->remoteBaseUrl, 0, -4); } else { @@ -67,7 +67,7 @@ class FederationContext implements Context, SnippetAcceptingContext { * @param string $shareeUser * @param string $shareeServer "LOCAL" or "REMOTE" */ - public function federateGroupSharing($sharerUser, $sharerServer, $sharerPath, $shareeGroup, $shareeServer){ + public function federateGroupSharing($sharerUser, $sharerServer, $sharerPath, $shareeGroup, $shareeServer) { if ($shareeServer == "REMOTE"){ $shareWith = "$shareeGroup@" . substr($this->remoteBaseUrl, 0, -4); } else { @@ -83,7 +83,7 @@ class FederationContext implements Context, SnippetAcceptingContext { * @param string $user * @param string $server */ - public function acceptLastPendingShare($user, $server){ + public function acceptLastPendingShare($user, $server) { $previous = $this->usingServer($server); $this->asAn($user); $this->sendingToWith('GET', "/apps/files_sharing/api/v1/remote_shares/pending", null); diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index b76e846191e..762e0dcb045 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -266,7 +266,7 @@ trait Sharing { $shareWith = null, $publicUpload = null, $password = null, - $permissions = null){ + $permissions = null) { $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares"; $client = new Client(); $options = [ @@ -311,7 +311,7 @@ trait Sharing { } } - public function isFieldInResponse($field, $contentExpected){ + public function isFieldInResponse($field, $contentExpected) { $data = simplexml_load_string($this->response->getBody())->data[0]; if ((string)$field == 'expiration'){ $contentExpected = date('Y-m-d', strtotime($contentExpected)) . " 00:00:00"; @@ -358,7 +358,7 @@ trait Sharing { * * @param string $filename */ - public function checkSharedFileInResponse($filename){ + public function checkSharedFileInResponse($filename) { Assert::assertEquals(true, $this->isFieldInResponse('file_target', "/$filename")); } @@ -367,7 +367,7 @@ trait Sharing { * * @param string $filename */ - public function checkSharedFileNotInResponse($filename){ + public function checkSharedFileNotInResponse($filename) { Assert::assertEquals(false, $this->isFieldInResponse('file_target', "/$filename")); } @@ -376,7 +376,7 @@ trait Sharing { * * @param string $user */ - public function checkSharedUserInResponse($user){ + public function checkSharedUserInResponse($user) { Assert::assertEquals(true, $this->isFieldInResponse('share_with', "$user")); } @@ -385,11 +385,11 @@ trait Sharing { * * @param string $user */ - public function checkSharedUserNotInResponse($user){ + public function checkSharedUserNotInResponse($user) { Assert::assertEquals(false, $this->isFieldInResponse('share_with', "$user")); } - public function isUserOrGroupInSharedData($userOrGroup, $permissions = null){ + public function isUserOrGroupInSharedData($userOrGroup, $permissions = null) { $data = simplexml_load_string($this->response->getBody())->data[0]; foreach($data as $element) { if ($element->share_with == $userOrGroup && ($permissions === null || $permissions == $element->permissions)){ @@ -406,7 +406,7 @@ trait Sharing { * @param string $user1 * @param string $user2 */ - public function assureFileIsShared($entry, $filepath, $user1, $user2, $withPerms = null, $permissions = null){ + public function assureFileIsShared($entry, $filepath, $user1, $user2, $withPerms = null, $permissions = null) { $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares" . "?path=$filepath"; $client = new Client(); $options = []; @@ -435,7 +435,7 @@ trait Sharing { * @param string $user * @param string $group */ - public function assureFileIsSharedWithGroup($entry, $filepath, $user, $group, $withPerms = null, $permissions = null){ + public function assureFileIsSharedWithGroup($entry, $filepath, $user, $group, $withPerms = null, $permissions = null) { $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares" . "?path=$filepath"; $client = new Client(); $options = []; @@ -460,7 +460,7 @@ trait Sharing { /** * @When /^Deleting last share$/ */ - public function deletingLastShare(){ + public function deletingLastShare() { $share_id = $this->lastShareData->data[0]->id; $url = "/apps/files_sharing/api/v{$this->sharingApiVersion}/shares/$share_id"; $this->sendingToWith("DELETE", $url, null); @@ -469,7 +469,7 @@ trait Sharing { /** * @When /^Getting info of last share$/ */ - public function gettingInfoOfLastShare(){ + public function gettingInfoOfLastShare() { $share_id = $this->lastShareData->data[0]->id; $url = "/apps/files_sharing/api/v{$this->sharingApiVersion}/shares/$share_id"; $this->sendingToWith("GET", $url, null); @@ -478,7 +478,7 @@ trait Sharing { /** * @Then /^last share_id is included in the answer$/ */ - public function checkingLastShareIDIsIncluded(){ + public function checkingLastShareIDIsIncluded() { $share_id = $this->lastShareData->data[0]->id; if (!$this->isFieldInResponse('id', $share_id)){ Assert::fail("Share id $share_id not found in response"); @@ -488,7 +488,7 @@ trait Sharing { /** * @Then /^last share_id is not included in the answer$/ */ - public function checkingLastShareIDIsNotIncluded(){ + public function checkingLastShareIDIsNotIncluded() { $share_id = $this->lastShareData->data[0]->id; if ($this->isFieldInResponse('id', $share_id)){ Assert::fail("Share id $share_id has been found in response"); @@ -499,16 +499,16 @@ trait Sharing { * @Then /^Share fields of last share match with$/ * @param TableNode|null $body */ - public function checkShareFields($body){ + public function checkShareFields($body) { if ($body instanceof TableNode) { $fd = $body->getRowsHash(); foreach($fd as $field => $value) { - if (substr($field, 0, 10 ) === "share_with"){ + if (substr($field, 0, 10) === "share_with"){ $value = str_replace("REMOTE", substr($this->remoteBaseUrl, 0, -5), $value); $value = str_replace("LOCAL", substr($this->localBaseUrl, 0, -5), $value); } - if (substr($field, 0, 6 ) === "remote"){ + if (substr($field, 0, 6) === "remote"){ $value = str_replace("REMOTE", substr($this->remoteBaseUrl, 0, -4), $value); $value = str_replace("LOCAL", substr($this->localBaseUrl, 0, -4), $value); } @@ -601,7 +601,7 @@ trait Sharing { * @param string $contentExpected * @param \SimpleXMLElement $returnedShare */ - private function assertFieldIsInReturnedShare(string $field, string $contentExpected, \SimpleXMLElement $returnedShare){ + private function assertFieldIsInReturnedShare(string $field, string $contentExpected, \SimpleXMLElement $returnedShare) { if ($contentExpected === 'IGNORE') { return; } @@ -742,4 +742,3 @@ trait Sharing { return $sharees; } } - diff --git a/build/integration/features/bootstrap/Trashbin.php b/build/integration/features/bootstrap/Trashbin.php index c7bef76e954..b68048e7cc9 100644 --- a/build/integration/features/bootstrap/Trashbin.php +++ b/build/integration/features/bootstrap/Trashbin.php @@ -167,4 +167,3 @@ trait Trashbin { return; } } - diff --git a/build/license.php b/build/license.php index 9a22e915ce2..ecb7bbd5051 100644 --- a/build/license.php +++ b/build/license.php @@ -98,12 +98,12 @@ EOD; return; } - $excludes = array_map(function($item) use ($folder) { + $excludes = array_map(function ($item) use ($folder) { return $folder . '/' . $item; }, ['vendor', '3rdparty', '.git', 'l10n', 'templates', 'composer']); $iterator = new RecursiveDirectoryIterator($folder, RecursiveDirectoryIterator::SKIP_DOTS); - $iterator = new RecursiveCallbackFilterIterator($iterator, function($item) use ($folder, $excludes){ + $iterator = new RecursiveCallbackFilterIterator($iterator, function ($item) use ($folder, $excludes) { /** @var SplFileInfo $item */ foreach($excludes as $exclude) { if (substr($item->getPath(), 0, strlen($exclude)) === $exclude) { @@ -134,7 +134,7 @@ With help from many libraries and frameworks including: jQuery … "; - $authors = implode(PHP_EOL, array_map(function($author){ + $authors = implode(PHP_EOL, array_map(function ($author) { return " - ".$author; }, $this->authors)); $template = str_replace('@AUTHORS@', $authors, $template); @@ -234,7 +234,7 @@ With help from many libraries and frameworks including: array_shift($lines); continue; } - if (strpos($line, '*/') !== false ) { + if (strpos($line, '*/') !== false) { array_shift($lines); break; } @@ -328,7 +328,7 @@ With help from many libraries and frameworks including: } $authors = explode(PHP_EOL, $out); - $authors = array_filter($authors, function($author) { + $authors = array_filter($authors, function ($author) { return !in_array($author, [ '', 'Not Committed Yet <not.committed.yet>', @@ -342,7 +342,7 @@ With help from many libraries and frameworks including: $authors = array_unique($authors); } - $authors = array_map(function($author){ + $authors = array_map(function ($author) { $author = $this->fixInvalidEmail($author); $this->authors[$author] = $author; return " * @author $author"; diff --git a/build/signed-off-checker.php b/build/signed-off-checker.php index 32deceb47b7..43cf4529476 100644 --- a/build/signed-off-checker.php +++ b/build/signed-off-checker.php @@ -127,4 +127,3 @@ if($notSignedCommits !== []) { } else { exit(0); } - diff --git a/build/triple-dot-checker.php b/build/triple-dot-checker.php new file mode 100644 index 00000000000..fa5edfcd5ee --- /dev/null +++ b/build/triple-dot-checker.php @@ -0,0 +1,63 @@ +<?php +/** + * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> + * @copyright Copyright (c) 2020 Gary Kim <gary@garykim.dev> + * + * @author Gary Kim <gary@garykim.dev> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +$directories = [ + __DIR__ . '/../apps', + __DIR__ . '/../core' +]; + +$errors = []; +foreach ($directories as $dir) { + $it = new \RecursiveDirectoryIterator($dir); + + foreach (new RecursiveIteratorIterator($it) as $file) { + if ($file->getExtension() === 'map') { + continue; + } + $content = file_get_contents($file->getPathname()); + $matches = preg_grep('/[^A-Za-z][tn]\([\'"][^\'"]*?[\'"],( ?)[\'"][^\'"]*?(\.\.\.)[^\'"]*?[\'"]/sU', explode(PHP_EOL, $content)); + + foreach ($matches as $ln => $match) { + if (file_exists($file->getPathname() . '.map')) { + $errors[] = sprintf('At line %d in file %s (file may be transpiled)', $ln, $file); + } else { + $errors[] = sprintf('At line %d in file %s', $ln, $file); + } + } + } +} + +echo PHP_EOL . PHP_EOL; +if (count($errors) > 0) { + if (count($errors) > 1) { + echo sprintf('ERROR: There are %d uses of triple dot instead of ellipsis:', count($errors)) . PHP_EOL; + } else { + echo 'ERROR: There is 1 use of triple dot instead of ellipsis:' . PHP_EOL; + } + echo implode(PHP_EOL, $errors) . PHP_EOL; + exit(1); +} + +echo 'OK: all good! No use of triple dot instead of ellipsis found.' . PHP_EOL; +exit(0); diff --git a/composer.json b/composer.json index fae1c7a221d..a4c5c410d3a 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,6 @@ "scripts": { "cs:fix": "php-cs-fixer fix", "cs:check": "php-cs-fixer fix --dry-run", - "lint": "find . -name \\*.php -not -path './lib/composer/*' -exec php -l \"{}\" \\;" + "lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/.phan/*' -exec php -l \"{}\" \\;" } } diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index 3a17114261f..d37211d3add 100644 --- a/core/Command/App/CheckCode.php +++ b/core/Command/App/CheckCode.php @@ -94,12 +94,12 @@ class CheckCode extends Command implements CompletionAwareInterface { $codeChecker = new CodeChecker($checkList, !$input->getOption('skip-validate-info')); - $codeChecker->listen('CodeChecker', 'analyseFileBegin', function($params) use ($output) { + $codeChecker->listen('CodeChecker', 'analyseFileBegin', function ($params) use ($output) { if(OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $output->writeln("<info>Analysing {$params}</info>"); } }); - $codeChecker->listen('CodeChecker', 'analyseFileFinished', function($filename, $errors) use ($output) { + $codeChecker->listen('CodeChecker', 'analyseFileFinished', function ($filename, $errors) use ($output) { $count = count($errors); // show filename if the verbosity is low, but there are errors in a file @@ -111,7 +111,7 @@ class CheckCode extends Command implements CompletionAwareInterface { if($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $output->writeln(" {$count} errors"); } - usort($errors, function($a, $b) { + usort($errors, function ($a, $b) { return $a['line'] >$b['line']; }); @@ -127,7 +127,7 @@ class CheckCode extends Command implements CompletionAwareInterface { if(!$input->getOption('skip-validate-info')) { $infoChecker = new InfoChecker(); - $infoChecker->listen('InfoChecker', 'parseError', function($error) use ($output) { + $infoChecker->listen('InfoChecker', 'parseError', function ($error) use ($output) { $output->writeln("<error>Invalid appinfo.xml file found: $error</error>"); }); diff --git a/core/Command/Background/Ajax.php b/core/Command/Background/Ajax.php index e9cd1405ebd..3eb00655ead 100644 --- a/core/Command/Background/Ajax.php +++ b/core/Command/Background/Ajax.php @@ -1,27 +1,27 @@ <?php /** -* The MIT License (MIT) -* -* Copyright (c) 2015 Christian Kampka <christian@kampka.net> -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ + * The MIT License (MIT) + * + * Copyright (c) 2015 Christian Kampka <christian@kampka.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ namespace OC\Core\Command\Background; diff --git a/core/Command/Background/Base.php b/core/Command/Background/Base.php index 32d22d64cb9..a00a8fe4c51 100644 --- a/core/Command/Background/Base.php +++ b/core/Command/Background/Base.php @@ -1,27 +1,27 @@ <?php /** -* The MIT License (MIT) -* -* Copyright (c) 2015 Christian Kampka <christian@kampka.net> -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ + * The MIT License (MIT) + * + * Copyright (c) 2015 Christian Kampka <christian@kampka.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ namespace OC\Core\Command\Background; @@ -32,23 +32,23 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; /** -* An abstract base class for configuring the background job mode -* from the command line interface. -* Subclasses will override the getMode() function to specify the mode to configure. -*/ + * An abstract base class for configuring the background job mode + * from the command line interface. + * Subclasses will override the getMode() function to specify the mode to configure. + */ abstract class Base extends Command { abstract protected function getMode(); /** - * @var \OCP\IConfig - */ + * @var \OCP\IConfig + */ protected $config; /** - * @param \OCP\IConfig $config - */ + * @param \OCP\IConfig $config + */ public function __construct(IConfig $config) { $this->config = $config; parent::__construct(); @@ -62,16 +62,16 @@ abstract class Base extends Command { } /** - * Executing this command will set the background job mode for owncloud. - * The mode to set is specified by the concrete sub class by implementing the - * getMode() function. - * - * @param InputInterface $input - * @param OutputInterface $output - */ + * Executing this command will set the background job mode for owncloud. + * The mode to set is specified by the concrete sub class by implementing the + * getMode() function. + * + * @param InputInterface $input + * @param OutputInterface $output + */ protected function execute(InputInterface $input, OutputInterface $output) { $mode = $this->getMode(); - $this->config->setAppValue( 'core', 'backgroundjobs_mode', $mode ); + $this->config->setAppValue('core', 'backgroundjobs_mode', $mode); $output->writeln("Set mode for background jobs to '$mode'"); } } diff --git a/core/Command/Background/Cron.php b/core/Command/Background/Cron.php index 434e88893b2..27253a355b2 100644 --- a/core/Command/Background/Cron.php +++ b/core/Command/Background/Cron.php @@ -1,27 +1,27 @@ <?php /** -* The MIT License (MIT) -* -* Copyright (c) 2015 Christian Kampka <christian@kampka.net> -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ + * The MIT License (MIT) + * + * Copyright (c) 2015 Christian Kampka <christian@kampka.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ namespace OC\Core\Command\Background; diff --git a/core/Command/Background/WebCron.php b/core/Command/Background/WebCron.php index 23dbe98e635..76bcf83a304 100644 --- a/core/Command/Background/WebCron.php +++ b/core/Command/Background/WebCron.php @@ -1,27 +1,27 @@ <?php /** -* The MIT License (MIT) -* -* Copyright (c) 2015 Christian Kampka <christian@kampka.net> -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ + * The MIT License (MIT) + * + * Copyright (c) 2015 Christian Kampka <christian@kampka.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ namespace OC\Core\Command\Background; diff --git a/core/Command/Check.php b/core/Command/Check.php index b225aff61ed..234b038084b 100644 --- a/core/Command/Check.php +++ b/core/Command/Check.php @@ -52,7 +52,7 @@ class Check extends Base { protected function execute(InputInterface $input, OutputInterface $output) { $errors = \OC_Util::checkServer($this->config); if (!empty($errors)) { - $errors = array_map(function($item) { + $errors = array_map(function ($item) { return (string) $item['error']; }, $errors); diff --git a/core/Command/Db/Migrations/ExecuteCommand.php b/core/Command/Db/Migrations/ExecuteCommand.php index 1104818e710..0f2709646ba 100644 --- a/core/Command/Db/Migrations/ExecuteCommand.php +++ b/core/Command/Db/Migrations/ExecuteCommand.php @@ -23,7 +23,6 @@ namespace OC\Core\Command\Db\Migrations; - use OC\DB\MigrationService; use OC\Migration\ConsoleOutput; use OCP\App\IAppManager; diff --git a/core/Command/Db/Migrations/GenerateCommand.php b/core/Command/Db/Migrations/GenerateCommand.php index 6e3b26f583c..a40cd800dff 100644 --- a/core/Command/Db/Migrations/GenerateCommand.php +++ b/core/Command/Db/Migrations/GenerateCommand.php @@ -25,7 +25,6 @@ namespace OC\Core\Command\Db\Migrations; - use OC\DB\MigrationService; use OC\Migration\ConsoleOutput; use OCP\App\IAppManager; diff --git a/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php b/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php index 34c91ad6b04..b3d826c1e5b 100644 --- a/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php +++ b/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php @@ -24,7 +24,6 @@ namespace OC\Core\Command\Db\Migrations; - use Doctrine\DBAL\Schema\Schema; use OC\DB\MDB2SchemaReader; use OC\DB\MigrationService; diff --git a/core/Command/Db/Migrations/MigrateCommand.php b/core/Command/Db/Migrations/MigrateCommand.php index e484dbd3f4f..c9ba604ae7e 100644 --- a/core/Command/Db/Migrations/MigrateCommand.php +++ b/core/Command/Db/Migrations/MigrateCommand.php @@ -22,7 +22,6 @@ namespace OC\Core\Command\Db\Migrations; - use OC\DB\MigrationService; use OC\Migration\ConsoleOutput; use OCP\IDBConnection; diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index 4d7b4028396..b4dc3e0160a 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -125,7 +125,7 @@ class DecryptAll extends Command { } protected function execute(InputInterface $input, OutputInterface $output) { - if ( !$input->isInteractive() ) { + if (!$input->isInteractive()) { $output->writeln('Invalid TTY.'); $output->writeln('If you are trying to execute the command in a Docker '); $output->writeln("container, do not forget to execute 'docker exec' with"); diff --git a/core/Command/Encryption/EncryptAll.php b/core/Command/Encryption/EncryptAll.php index fecb7778ed8..77c2cb31204 100644 --- a/core/Command/Encryption/EncryptAll.php +++ b/core/Command/Encryption/EncryptAll.php @@ -106,7 +106,7 @@ class EncryptAll extends Command { } protected function execute(InputInterface $input, OutputInterface $output) { - if ( !$input->isInteractive() ) { + if (!$input->isInteractive()) { $output->writeln('Invalid TTY.'); $output->writeln('If you are trying to execute the command in a Docker '); $output->writeln("container, do not forget to execute 'docker exec' with"); diff --git a/core/Command/Encryption/ListModules.php b/core/Command/Encryption/ListModules.php index e8b7809c823..812d2542d51 100644 --- a/core/Command/Encryption/ListModules.php +++ b/core/Command/Encryption/ListModules.php @@ -85,7 +85,7 @@ class ListModules extends Base { */ protected function writeModuleList(InputInterface $input, OutputInterface $output, $items) { if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { - array_walk($items, function(&$item) { + array_walk($items, function (&$item) { if (!$item['default']) { $item = $item['displayName']; } else { diff --git a/core/Command/Encryption/SetDefaultModule.php b/core/Command/Encryption/SetDefaultModule.php index eb9f3718b1d..5f73792d99b 100644 --- a/core/Command/Encryption/SetDefaultModule.php +++ b/core/Command/Encryption/SetDefaultModule.php @@ -23,7 +23,6 @@ namespace OC\Core\Command\Encryption; - use OCP\Encryption\IManager; use OCP\IConfig; use Symfony\Component\Console\Command\Command; diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php index aa252b8bbb6..249b899173e 100644 --- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php +++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Core\Command\Maintenance\Mimetype; - class GenerateMimetypeFileBuilder { /** @@ -37,7 +36,7 @@ class GenerateMimetypeFileBuilder */ public function generateFile(array $aliases): string { // Remove comments - $keys = array_filter(array_keys($aliases), function($k) { + $keys = array_filter(array_keys($aliases), function ($k) { return $k[0] === '_'; }); foreach($keys as $key) { diff --git a/core/Command/TwoFactorAuth/Base.php b/core/Command/TwoFactorAuth/Base.php index 3af99daca07..1e1e659e617 100644 --- a/core/Command/TwoFactorAuth/Base.php +++ b/core/Command/TwoFactorAuth/Base.php @@ -54,7 +54,7 @@ class Base extends \OC\Core\Command\Base { */ public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { - return array_map(function(IUser $user) { + return array_map(function (IUser $user) { return $user->getUID(); }, $this->userManager->search($context->getCurrentWord(), 100)); } diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php index 5f658e30507..3ae1884d343 100644 --- a/core/Command/TwoFactorAuth/State.php +++ b/core/Command/TwoFactorAuth/State.php @@ -62,7 +62,7 @@ class State extends Base { $providerStates = $this->registry->getProviderStates($user); $filtered = $this->filterEnabledDisabledUnknownProviders($providerStates); - list ($enabled, $disabled) = $filtered; + list($enabled, $disabled) = $filtered; if (!empty($enabled)) { $output->writeln("Two-factor authentication is enabled for user $uid"); diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 7782496c76b..dadcdb0904c 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -105,7 +105,7 @@ class Upgrade extends Command { $dispatcher = \OC::$server->getEventDispatcher(); $progress = new ProgressBar($output); $progress->setFormat(" %message%\n %current%/%max% [%bar%] %percent:3s%%"); - $listener = function($event) use ($progress, $output) { + $listener = function ($event) use ($progress, $output) { if ($event instanceof GenericEvent) { $message = $event->getSubject(); if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { @@ -128,7 +128,7 @@ class Upgrade extends Command { } } }; - $repairListener = function($event) use ($progress, $output) { + $repairListener = function ($event) use ($progress, $output) { if (!$event instanceof GenericEvent) { return; } @@ -182,17 +182,17 @@ class Upgrade extends Command { $dispatcher->addListener('\OC\Repair::error', $repairListener); - $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use($output) { + $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($output) { $output->writeln('<info>Turned on maintenance mode</info>'); }); - $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use($output) { + $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($output) { $output->writeln('<info>Turned off maintenance mode</info>'); }); - $updater->listen('\OC\Updater', 'maintenanceActive', function () use($output) { + $updater->listen('\OC\Updater', 'maintenanceActive', function () use ($output) { $output->writeln('<info>Maintenance mode is kept active</info>'); }); $updater->listen('\OC\Updater', 'updateEnd', - function ($success) use($output, $self) { + function ($success) use ($output, $self) { if ($success) { $message = "<info>Update successful</info>"; } else { @@ -200,28 +200,28 @@ class Upgrade extends Command { } $output->writeln($message); }); - $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($output) { + $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use ($output) { $output->writeln('<info>Updating database schema</info>'); }); - $updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) { + $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($output) { $output->writeln('<info>Updated database</info>'); }); - $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($output) { + $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($output) { $output->writeln('<info>Checking whether the database schema can be updated (this can take a long time depending on the database size)</info>'); }); - $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) { + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($output) { $output->writeln('<info>Checked database schema update</info>'); }); - $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($output) { + $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output) { $output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>'); }); - $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) { + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($output) { $output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>'); }); - $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($output) { + $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($output) { $output->writeln('<info>Update app ' . $app . ' from appstore</info>'); }); - $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($output) { + $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($output) { $output->writeln('<info>Checked for update of app "' . $app . '" in appstore </info>'); }); $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) { @@ -239,19 +239,19 @@ class Upgrade extends Command { $updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) { $output->writeln("<info>Updated <$app> to $version</info>"); }); - $updater->listen('\OC\Updater', 'failure', function ($message) use($output, $self) { + $updater->listen('\OC\Updater', 'failure', function ($message) use ($output, $self) { $output->writeln("<error>$message</error>"); }); - $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($output) { + $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use ($output) { $output->writeln("<info>Set log level to debug</info>"); }); - $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($output) { + $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use ($output) { $output->writeln("<info>Reset log level</info>"); }); - $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($output) { + $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use ($output) { $output->writeln("<info>Starting code integrity check...</info>"); }); - $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($output) { + $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($output) { $output->writeln("<info>Finished code integrity check</info>"); }); diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index c279edf25ad..34280c6094f 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -259,7 +259,7 @@ class AvatarController extends Controller { /** * @NoAdminRequired - * + * * @return JSONResponse */ public function deleteAvatar() { @@ -282,8 +282,8 @@ class AvatarController extends Controller { $tmpAvatar = $this->cache->get('tmpAvatar'); if (is_null($tmpAvatar)) { return new JSONResponse(['data' => [ - 'message' => $this->l->t("No temporary profile picture available, try again") - ]], + 'message' => $this->l->t("No temporary profile picture available, try again") + ]], Http::STATUS_NOT_FOUND); } @@ -320,8 +320,8 @@ class AvatarController extends Controller { $tmpAvatar = $this->cache->get('tmpAvatar'); if (is_null($tmpAvatar)) { return new JSONResponse(['data' => [ - 'message' => $this->l->t("No temporary profile picture available, try again") - ]], + 'message' => $this->l->t("No temporary profile picture available, try again") + ]], Http::STATUS_BAD_REQUEST); } diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index a210f3de547..e3d59951d4e 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -159,8 +159,8 @@ class LostController extends Controller { public function resetform($token, $userId) { if ($this->config->getSystemValue('lost_password_link', '') !== '') { return new TemplateResponse('core', 'error', [ - 'errors' => [['error' => $this->l10n->t('Password reset is disabled')]] - ], + 'errors' => [['error' => $this->l10n->t('Password reset is disabled')]] + ], 'guest' ); } @@ -251,7 +251,7 @@ class LostController extends Controller { * @param string $user * @return JSONResponse */ - public function email($user){ + public function email($user) { if ($this->config->getSystemValue('lost_password_link', '') !== '') { return new JSONResponse($this->error($this->l10n->t('Password reset is disabled'))); } diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index 3fd1ce2c868..b92a82028cd 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -85,7 +85,7 @@ class PreviewController extends Controller { * @param string $mode * @return DataResponse|FileDisplayResponse */ - public function getPreview ( + public function getPreview( string $file = '', int $x = 32, int $y = 32, diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index 7449717831b..d77f6982f3d 100644 --- a/core/Controller/SetupController.php +++ b/core/Controller/SetupController.php @@ -70,7 +70,7 @@ class SetupController { return; } - if(isset($post['install']) AND $post['install']=='true') { + if(isset($post['install']) and $post['install']=='true') { // We have to launch the installation process : $e = $this->setupHelper->install($post); $errors = ['errors' => $e]; @@ -109,7 +109,7 @@ class SetupController { } private function finishSetup(bool $installRecommended) { - if( file_exists( $this->autoConfigFile )) { + if(file_exists($this->autoConfigFile)) { unlink($this->autoConfigFile); } \OC::$server->getIntegrityCodeChecker()->runInstanceVerification(); @@ -130,18 +130,18 @@ class SetupController { } public function loadAutoConfig($post) { - if( file_exists($this->autoConfigFile)) { + if(file_exists($this->autoConfigFile)) { \OCP\Util::writeLog('core', 'Autoconfig file found, setting up Nextcloud…', ILogger::INFO); $AUTOCONFIG = []; include $this->autoConfigFile; - $post = array_merge ($post, $AUTOCONFIG); + $post = array_merge($post, $AUTOCONFIG); } $dbIsSet = isset($post['dbtype']); $directoryIsSet = isset($post['directory']); $adminAccountIsSet = isset($post['adminlogin']); - if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) { + if ($dbIsSet and $directoryIsSet and $adminAccountIsSet) { $post['install'] = 'true'; } $post['dbIsSet'] = $dbIsSet; diff --git a/core/Controller/WebAuthnController.php b/core/Controller/WebAuthnController.php index 0b98a58c1eb..1d667311ff7 100644 --- a/core/Controller/WebAuthnController.php +++ b/core/Controller/WebAuthnController.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> @@ -75,7 +76,7 @@ class WebAuthnController extends Controller { Util::emitHook( '\OCA\Files_Sharing\API\Server2Server', 'preLoginNameUsedAsUserName', - array('uid' => &$uid) + ['uid' => &$uid] ); $this->logger->debug('Got UID: ' . $uid); diff --git a/core/Migrations/Version19000Date20200211083441.php b/core/Migrations/Version19000Date20200211083441.php index ef4d4fde54f..72bb26b02fe 100644 --- a/core/Migrations/Version19000Date20200211083441.php +++ b/core/Migrations/Version19000Date20200211083441.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); namespace OC\Core\Migrations; diff --git a/core/ajax/update.php b/core/ajax/update.php index 7a127e76b65..34c65b56c58 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -128,12 +128,12 @@ if (\OCP\Util::needUpgrade()) { $incompatibleApps = []; $dispatcher = \OC::$server->getEventDispatcher(); - $dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) { + $dispatcher->addListener('\OC\DB\Migrator::executeSql', function ($event) use ($eventSource, $l) { if ($event instanceof GenericEvent) { $eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()])); } }); - $dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) { + $dispatcher->addListener('\OC\DB\Migrator::checkTable', function ($event) use ($eventSource, $l) { if ($event instanceof GenericEvent) { $eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()])); } @@ -156,13 +156,13 @@ if (\OCP\Util::needUpgrade()) { $updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Maintenance mode is kept active')); }); - $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) { + $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Updating database schema')); }); $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Updated database')); }); - $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($eventSource, $l) { + $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)')); }); $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) { @@ -197,16 +197,16 @@ if (\OCP\Util::needUpgrade()) { $eventSource->close(); $config->setSystemValue('maintenance', false); }); - $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { + $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Set log level to debug')); }); - $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { + $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Reset log level')); }); - $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($eventSource, $l) { + $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Starting code integrity check')); }); - $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($eventSource, $l) { + $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Finished code integrity check')); }); diff --git a/core/css/systemtags.scss b/core/css/systemtags.scss index e2b587fcc79..6e100b12a92 100644 --- a/core/css/systemtags.scss +++ b/core/css/systemtags.scss @@ -72,7 +72,12 @@ .systemTagsInfoView, .systemtags-select2-container { width: 100%; - + + .select2-choices { + flex-wrap: nowrap !important; + max-height: 44px; + } + .select2-choices .select2-search-choice.select2-locked .label { opacity: 0.5; } diff --git a/core/js/dist/systemtags.js b/core/js/dist/systemtags.js index fc7fe84fc02..b2eddb48eae 100644 --- a/core/js/dist/systemtags.js +++ b/core/js/dist/systemtags.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);n(1),n(2),n(3),n(4),n(5),n(6),n(7)},function(e,n){!function(e){e.SystemTags={getDescriptiveTag:function(e){if(_.isUndefined(e.name)&&!_.isUndefined(e.toJSON)&&(e=e.toJSON()),_.isUndefined(e.name))return $("<span>").addClass("non-existing-tag").text(t("core","Non-existing tag #{tag}",{tag:e}));var n,s=$("<span>");return s.append(escapeHTML(e.name)),e.userAssignable||(n=t("core","restricted")),e.userVisible||(n=t("core","invisible")),n&&s.append($("<em>").text(" ("+n+")")),s}}}(OC)},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s,i;s=Handlebars.template,(i=OC.SystemTags.Templates=OC.SystemTags.Templates||{}).result=s({1:function(e,t,n,s,i){return" new-item"},3:function(e,t,n,s,i){var l,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="label">'+(null!=(l="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i,loc:{start:{line:4,column:22},end:{line:4,column:37}}}):a)?l:"")+"</span>\n"},5:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="label">'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"name")||(null!=t?a(t,"name"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i,loc:{start:{line:6,column:22},end:{line:6,column:30}}}):l)+"</span>\n"},7:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="systemtags-actions">\n\t\t\t<a href="#" class="rename icon icon-rename" title="'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"renameTooltip")||(null!=t?a(t,"renameTooltip"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"renameTooltip",hash:{},data:i,loc:{start:{line:10,column:54},end:{line:10,column:71}}}):l)+'"></a>\n\t\t</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,l){var a,o,r,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},m='<span class="systemtags-item'+(null!=(a=d(s,"if").call(c,null!=t?d(t,"isNew"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.noop,data:l,loc:{start:{line:1,column:28},end:{line:1,column:57}}}))?a:"")+'" data-id="'+e.escapeExpression("function"===n(o=null!=(o=d(s,"id")||(null!=t?d(t,"id"):t))?o:u)?o.call(c,{name:"id",hash:{},data:l,loc:{start:{line:1,column:68},end:{line:1,column:74}}}):o)+'">\n<span class="checkmark icon icon-checkmark"></span>\n'+(null!=(a=d(s,"if").call(c,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(3,l,0),inverse:e.program(5,l,0),data:l,loc:{start:{line:3,column:1},end:{line:7,column:8}}}))?a:"");return o=null!=(o=d(s,"allowActions")||(null!=t?d(t,"allowActions"):t))?o:u,r={name:"allowActions",hash:{},fn:e.program(7,l,0),inverse:e.noop,data:l,loc:{start:{line:8,column:1},end:{line:12,column:18}}},a="function"===n(o)?o.call(c,r):o,d(s,"allowActions")||(a=e.hooks.blockHelperMissing.call(t,a,r)),null!=a&&(m+=a),m+"</span>\n"},useData:!0}),i.result_form=s({1:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<a href="#" class="delete icon icon-delete" title="'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"deleteTooltip")||(null!=t?a(t,"deleteTooltip"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"deleteTooltip",hash:{},data:i,loc:{start:{line:5,column:53},end:{line:5,column:70}}}):l)+'"></a>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,l){var a,o,r=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression,d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<form class="systemtags-rename-form">\n\t <label class="hidden-visually" for="'+u("function"===n(o=null!=(o=d(s,"cid")||(null!=t?d(t,"cid"):t))?o:c)?o.call(r,{name:"cid",hash:{},data:l,loc:{start:{line:2,column:38},end:{line:2,column:45}}}):o)+'-rename-input">'+u("function"===n(o=null!=(o=d(s,"renameLabel")||(null!=t?d(t,"renameLabel"):t))?o:c)?o.call(r,{name:"renameLabel",hash:{},data:l,loc:{start:{line:2,column:60},end:{line:2,column:75}}}):o)+'</label>\n\t<input id="'+u("function"===n(o=null!=(o=d(s,"cid")||(null!=t?d(t,"cid"):t))?o:c)?o.call(r,{name:"cid",hash:{},data:l,loc:{start:{line:3,column:12},end:{line:3,column:19}}}):o)+'-rename-input" type="text" value="'+u("function"===n(o=null!=(o=d(s,"name")||(null!=t?d(t,"name"):t))?o:c)?o.call(r,{name:"name",hash:{},data:l,loc:{start:{line:3,column:53},end:{line:3,column:61}}}):o)+'">\n'+(null!=(a=d(s,"if").call(r,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.noop,data:l,loc:{start:{line:4,column:1},end:{line:6,column:8}}}))?a:"")+"</form>\n"},useData:!0}),i.selection=s({1:function(e,t,n,s,i){var l,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t<span class="label">'+(null!=(l="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i,loc:{start:{line:2,column:21},end:{line:2,column:36}}}):a)?l:"")+"</span>\n"},3:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t<span class="label">'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"name")||(null!=t?a(t,"name"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i,loc:{start:{line:4,column:21},end:{line:4,column:29}}}):l)+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(l=a(n,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?l:""},useData:!0})},function(e,t){!function(e){_.extend(e.Files.Client,{PROPERTY_FILEID:"{"+e.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_CAN_ASSIGN:"{"+e.Files.Client.NS_OWNCLOUD+"}can-assign",PROPERTY_DISPLAYNAME:"{"+e.Files.Client.NS_OWNCLOUD+"}display-name",PROPERTY_USERVISIBLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-visible",PROPERTY_USERASSIGNABLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-assignable"});var t=e.Backbone.Model.extend({sync:e.Backbone.davSync,defaults:{userVisible:!0,userAssignable:!0,canAssign:!0},davProperties:{id:e.Files.Client.PROPERTY_FILEID,name:e.Files.Client.PROPERTY_DISPLAYNAME,userVisible:e.Files.Client.PROPERTY_USERVISIBLE,userAssignable:e.Files.Client.PROPERTY_USERASSIGNABLE,canAssign:e.Files.Client.PROPERTY_CAN_ASSIGN},parse:function(e){return{id:e.id,name:e.name,userVisible:!0===e.userVisible||"true"===e.userVisible,userAssignable:!0===e.userAssignable||"true"===e.userAssignable,canAssign:!0===e.canAssign||"true"===e.canAssign}}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagModel=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,usePUT:!0,_objectId:null,_objectType:"files",model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags-relations/"+this._objectType+"/"+this._objectId},setObjectId:function(e){this._objectId=e},setObjectType:function(e){this._objectType=e},initialize:function(e,t){t=t||{},_.isUndefined(t.objectId)||(this._objectId=t.objectId),_.isUndefined(t.objectType)||(this._objectType=t.objectType)},getTagIds:function(){return this.map((function(e){return e.id}))}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsMappingCollection=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags/"},filterByName:function(e){return this.filter((function(t){return function(e,t){return e.get("name").substr(0,t.length).toLowerCase()===t.toLowerCase()}(t,e)}))},reset:function(){return this.fetched=!1,e.Backbone.Collection.prototype.reset.apply(this,arguments)},fetch:function(t){var n=this;if(t=t||{},this.fetched||t.force)return t.success&&t.success(this,null,t),this.trigger("sync",this,null,t),Promise.resolve();var s=t.success;return(t=_.extend({},t)).success=function(){if(n.fetched=!0,s)return s.apply(this,arguments)},e.Backbone.Collection.prototype.fetch.call(this,t)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsCollection=t,e.SystemTags.collection=new e.SystemTags.SystemTagsCollection}(OC)},function(e,n){!function(e){var n=e.Backbone.View.extend({_rendered:!1,_newTag:null,_lastUsedTags:[],className:"systemTagsInputFieldContainer",template:function(e){return'<input class="systemTagsInputField" type="hidden" name="tags" value=""/>'},initialize:function(t){t=t||{},this._multiple=!!t.multiple,this._allowActions=_.isUndefined(t.allowActions)||!!t.allowActions,this._allowCreate=_.isUndefined(t.allowCreate)||!!t.allowCreate,this._isAdmin=!!t.isAdmin,_.isFunction(t.initSelection)&&(this._initSelection=t.initSelection),this.collection=t.collection||e.SystemTags.collection;var n=this;this.collection.on("change:name remove",(function(){_.defer(n._refreshSelection)})),_.defer(_.bind(this._getLastUsedTags,this)),_.bindAll(this,"_refreshSelection","_onClickRenameTag","_onClickDeleteTag","_onSelectTag","_onDeselectTag","_onSubmitRenameTag")},_getLastUsedTags:function(){var t=this;$.ajax({type:"GET",url:e.generateUrl("/apps/systemtags/lastused"),success:function(e){t._lastUsedTags=e}})},_refreshSelection:function(){this.$tagsField.select2("val",this.$tagsField.val())},_onClickRenameTag:function(n){var s=$(n.target).closest(".systemtags-item"),i=s.attr("data-id"),l=this.collection.get(i).get("name"),a=$(e.SystemTags.Templates.result_form({cid:this.cid,name:l,deleteTooltip:t("core","Delete"),renameLabel:t("core","Rename"),isAdmin:this._isAdmin}));return s.find(".label").after(a),s.find(".label, .systemtags-actions").addClass("hidden"),s.closest(".select2-result").addClass("has-form"),a.find("[title]").tooltip({placement:"bottom",container:"body"}),a.find("input").focus().selectRange(0,l.length),!1},_onSubmitRenameTag:function(e){e.preventDefault();var t=$(e.target),n=t.closest(".systemtags-item"),s=n.attr("data-id"),i=this.collection.get(s),l=$(e.target).find("input").val().trim();l&&l!==i.get("name")&&(i.save({name:l}),n.find(".label").text(l)),n.find(".label, .systemtags-actions").removeClass("hidden"),t.remove(),n.closest(".select2-result").removeClass("has-form")},_onClickDeleteTag:function(e){var t=$(e.target).closest(".systemtags-item"),n=t.attr("data-id");return this.collection.get(n).destroy(),$(e.target).tooltip("hide"),t.closest(".select2-result").remove(),!1},_addToSelect2Selection:function(e){var t=this.$tagsField.select2("data");t.push(e),this.$tagsField.select2("data",t)},_onSelectTag:function(e){var t,n=this;if(e.object&&e.object.isNew)return t=this.collection.create({name:e.object.name.trim(),userVisible:!0,userAssignable:!0,canAssign:!0},{success:function(e){n._addToSelect2Selection(e.toJSON()),n._lastUsedTags.unshift(e.id),n.trigger("select",e)},error:function(t,s){409===s.status&&(n.collection.reset(),n.collection.fetch({success:function(t){var s=t.where({name:e.object.name.trim(),userVisible:!0,userAssignable:!0});s.length&&(s=s[0],n._addToSelect2Selection(s.toJSON()),n.trigger("select",s))}}))}}),this.$tagsField.select2("close"),e.preventDefault(),!1;t=this.collection.get(e.object.id),this._lastUsedTags.unshift(t.id),this._newTag=null,this.trigger("select",t)},_onDeselectTag:function(e){this.trigger("deselect",e.choice.id)},_queryTagsAutocomplete:function(e){var t=this;this.collection.fetch({success:function(n){var s=n.filterByName(e.term.trim());t._isAdmin||(s=_.filter(s,(function(e){return e.get("canAssign")}))),e.callback({results:_.invoke(s,"toJSON")})}})},_preventDefault:function(e){e.stopPropagation()},_formatDropDownResult:function(n){return e.SystemTags.Templates.result(_.extend({renameTooltip:t("core","Rename"),allowActions:this._allowActions,tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(n)[0].innerHTML:null,isAdmin:this._isAdmin},n))},_formatSelection:function(t){return e.SystemTags.Templates.selection(_.extend({tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(t)[0].innerHTML:null,isAdmin:this._isAdmin},t))},_createSearchChoice:function(e){if(e=e.trim(),!this.collection.filter((function(t){return t.get("name")===e})).length)return this._newTag?this._newTag.name=e:this._newTag={id:-1,name:e,userAssignable:!0,userVisible:!0,canAssign:!0,isNew:!0},this._newTag},_initSelection:function(e,t){var n=this,s=$(e).val().split(",");function i(e){var t=e.toJSON();return n._isAdmin||t.canAssign||(t.locked=!0),t}this.collection.fetch({success:function(){t(function(e){var t=n.collection.filter((function(t){return e.indexOf(t.id)>=0&&(n._isAdmin||t.get("userVisible"))}));return _.map(t,i)}(s))}})},render:function(){var n=this;this.$el.html(this.template()),this.$el.find("[title]").tooltip({placement:"bottom"}),this.$tagsField=this.$el.find("[name=tags]"),this.$tagsField.select2({placeholder:t("core","Collaborative tags"),containerCssClass:"systemtags-select2-container",dropdownCssClass:"systemtags-select2-dropdown",closeOnSelect:!1,allowClear:!1,multiple:this._multiple,toggleSelect:this._multiple,query:_.bind(this._queryTagsAutocomplete,this),id:function(e){return e.id},initSelection:_.bind(this._initSelection,this),formatResult:_.bind(this._formatDropDownResult,this),formatSelection:_.bind(this._formatSelection,this),createSearchChoice:this._allowCreate?_.bind(this._createSearchChoice,this):void 0,sortResults:function(t){var s=_.pluck(n.$tagsField.select2("data"),"id");return t.sort((function(t,i){var l=s.indexOf(t.id)>=0,a=s.indexOf(i.id)>=0;if(l===a){var o=n._lastUsedTags.indexOf(t.id),r=n._lastUsedTags.indexOf(i.id);return o!==r?-1===r?-1:-1===o?1:o<r?-1:1:e.Util.naturalSortCompare(t.name,i.name)}return l&&!a?-1:1})),t},formatNoMatches:function(){return t("core","No tags found")}}).on("select2-selecting",this._onSelectTag).on("select2-removing",this._onDeselectTag);var s=this.$tagsField.select2("dropdown");s.on("mouseup",".rename",this._onClickRenameTag),s.on("mouseup",".delete",this._onClickDeleteTag),s.on("mouseup",".select2-result-selectable.has-form",this._preventDefault),s.on("submit",".systemtags-rename-form",this._onSubmitRenameTag),this.delegateEvents()},remove:function(){this.$tagsField&&this.$tagsField.select2("destroy")},getValues:function(){this.$tagsField.select2("val")},setValues:function(e){this.$tagsField.select2("val",e)},setData:function(e){this.$tagsField.select2("data",e)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsInputField=n}(OC)},function(e,t,n){var s=n(8);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(10).default)("bdf318e0",s,!0,{})},function(e,t,n){(t=n(9)(!1)).push([e.i,".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",s=e[3];if(!s)return n;if(t&&"function"==typeof btoa){var i=(a=s,o=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),l=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[n].concat(l).concat([i]).join("\n")}var a,o,r;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var s=0;s<e.length;s++){var i=[].concat(e[s]);n&&(i[2]?i[2]="".concat(n," and ").concat(i[2]):i[2]=n),t.push(i)}},t}},function(e,t,n){"use strict";function s(e,t){for(var n=[],s={},i=0;i<t.length;i++){var l=t[i],a=l[0],o={id:e+":"+i,css:l[1],media:l[2],sourceMap:l[3]};s[a]?s[a].parts.push(o):n.push(s[a]={id:a,parts:[o]})}return n}n.r(t),n.d(t,"default",(function(){return p}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l={},a=i&&(document.head||document.getElementsByTagName("head")[0]),o=null,r=0,c=!1,u=function(){},d=null,m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,i){c=n,d=i||{};var a=s(e,t);return f(a),function(t){for(var n=[],i=0;i<a.length;i++){var o=a[i];(r=l[o.id]).refs--,n.push(r)}t?f(a=s(e,t)):a=[];for(i=0;i<n.length;i++){var r;if(0===(r=n[i]).refs){for(var c=0;c<r.parts.length;c++)r.parts[c]();delete l[r.id]}}}}function f(e){for(var t=0;t<e.length;t++){var n=e[t],s=l[n.id];if(s){s.refs++;for(var i=0;i<s.parts.length;i++)s.parts[i](n.parts[i]);for(;i<n.parts.length;i++)s.parts.push(h(n.parts[i]));s.parts.length>n.parts.length&&(s.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(h(n.parts[i]));l[n.id]={id:n.id,refs:1,parts:a}}}}function g(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function h(e){var t,n,s=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(s){if(c)return u;s.parentNode.removeChild(s)}if(m){var i=r++;s=o||(o=g()),t=v.bind(null,s,i,!1),n=v.bind(null,s,i,!0)}else s=g(),t=_.bind(null,s),n=function(){s.parentNode.removeChild(s)};return t(e),function(s){if(s){if(s.css===e.css&&s.media===e.media&&s.sourceMap===e.sourceMap)return;t(e=s)}else n()}}var y,b=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function v(e,t,n,s){var i=n?"":s.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var l=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(l,a[t]):e.appendChild(l)}}function _(e,t){var n=t.css,s=t.media,i=t.sourceMap;if(s&&e.setAttribute("media",s),d.ssrId&&e.setAttribute("data-vue-ssr-id",t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}}]); +!function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);n(1),n(2),n(3),n(4),n(5),n(6),n(7)},function(e,n){!function(e){e.SystemTags={getDescriptiveTag:function(e){if(_.isUndefined(e.name)&&!_.isUndefined(e.toJSON)&&(e=e.toJSON()),_.isUndefined(e.name))return $("<span>").addClass("non-existing-tag").text(t("core","Non-existing tag #{tag}",{tag:e}));var n,s=$("<span>");return s.append(escapeHTML(e.name)),e.userAssignable||(n=t("core","restricted")),e.userVisible||(n=t("core","invisible")),n&&s.append($("<em>").text(" ("+n+")")),s}}}(OC)},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s,i;s=Handlebars.template,(i=OC.SystemTags.Templates=OC.SystemTags.Templates||{}).result=s({1:function(e,t,n,s,i){return" new-item"},3:function(e,t,n,s,i){var l,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="label">'+(null!=(l="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i,loc:{start:{line:4,column:22},end:{line:4,column:37}}}):a)?l:"")+"</span>\n"},5:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="label">'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"name")||(null!=t?a(t,"name"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i,loc:{start:{line:6,column:22},end:{line:6,column:30}}}):l)+"</span>\n"},7:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="systemtags-actions">\n\t\t\t<a href="#" class="rename icon icon-rename" title="'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"renameTooltip")||(null!=t?a(t,"renameTooltip"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"renameTooltip",hash:{},data:i,loc:{start:{line:10,column:54},end:{line:10,column:71}}}):l)+'"></a>\n\t\t</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,l){var a,o,r,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},m='<span class="systemtags-item'+(null!=(a=d(s,"if").call(c,null!=t?d(t,"isNew"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.noop,data:l,loc:{start:{line:1,column:28},end:{line:1,column:57}}}))?a:"")+'" data-id="'+e.escapeExpression("function"===n(o=null!=(o=d(s,"id")||(null!=t?d(t,"id"):t))?o:u)?o.call(c,{name:"id",hash:{},data:l,loc:{start:{line:1,column:68},end:{line:1,column:74}}}):o)+'">\n<span class="checkmark icon icon-checkmark"></span>\n'+(null!=(a=d(s,"if").call(c,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(3,l,0),inverse:e.program(5,l,0),data:l,loc:{start:{line:3,column:1},end:{line:7,column:8}}}))?a:"");return o=null!=(o=d(s,"allowActions")||(null!=t?d(t,"allowActions"):t))?o:u,r={name:"allowActions",hash:{},fn:e.program(7,l,0),inverse:e.noop,data:l,loc:{start:{line:8,column:1},end:{line:12,column:18}}},a="function"===n(o)?o.call(c,r):o,d(s,"allowActions")||(a=e.hooks.blockHelperMissing.call(t,a,r)),null!=a&&(m+=a),m+"</span>\n"},useData:!0}),i.result_form=s({1:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<a href="#" class="delete icon icon-delete" title="'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"deleteTooltip")||(null!=t?a(t,"deleteTooltip"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"deleteTooltip",hash:{},data:i,loc:{start:{line:5,column:53},end:{line:5,column:70}}}):l)+'"></a>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,l){var a,o,r=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression,d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<form class="systemtags-rename-form">\n\t <label class="hidden-visually" for="'+u("function"===n(o=null!=(o=d(s,"cid")||(null!=t?d(t,"cid"):t))?o:c)?o.call(r,{name:"cid",hash:{},data:l,loc:{start:{line:2,column:38},end:{line:2,column:45}}}):o)+'-rename-input">'+u("function"===n(o=null!=(o=d(s,"renameLabel")||(null!=t?d(t,"renameLabel"):t))?o:c)?o.call(r,{name:"renameLabel",hash:{},data:l,loc:{start:{line:2,column:60},end:{line:2,column:75}}}):o)+'</label>\n\t<input id="'+u("function"===n(o=null!=(o=d(s,"cid")||(null!=t?d(t,"cid"):t))?o:c)?o.call(r,{name:"cid",hash:{},data:l,loc:{start:{line:3,column:12},end:{line:3,column:19}}}):o)+'-rename-input" type="text" value="'+u("function"===n(o=null!=(o=d(s,"name")||(null!=t?d(t,"name"):t))?o:c)?o.call(r,{name:"name",hash:{},data:l,loc:{start:{line:3,column:53},end:{line:3,column:61}}}):o)+'">\n'+(null!=(a=d(s,"if").call(r,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.noop,data:l,loc:{start:{line:4,column:1},end:{line:6,column:8}}}))?a:"")+"</form>\n"},useData:!0}),i.selection=s({1:function(e,t,n,s,i){var l,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t<span class="label">'+(null!=(l="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i,loc:{start:{line:2,column:21},end:{line:2,column:36}}}):a)?l:"")+"</span>\n"},3:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t<span class="label">'+e.escapeExpression("function"==typeof(l=null!=(l=a(n,"name")||(null!=t?a(t,"name"):t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i,loc:{start:{line:4,column:21},end:{line:4,column:29}}}):l)+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,i){var l,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(l=a(n,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?l:""},useData:!0})},function(e,t){!function(e){_.extend(e.Files.Client,{PROPERTY_FILEID:"{"+e.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_CAN_ASSIGN:"{"+e.Files.Client.NS_OWNCLOUD+"}can-assign",PROPERTY_DISPLAYNAME:"{"+e.Files.Client.NS_OWNCLOUD+"}display-name",PROPERTY_USERVISIBLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-visible",PROPERTY_USERASSIGNABLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-assignable"});var t=e.Backbone.Model.extend({sync:e.Backbone.davSync,defaults:{userVisible:!0,userAssignable:!0,canAssign:!0},davProperties:{id:e.Files.Client.PROPERTY_FILEID,name:e.Files.Client.PROPERTY_DISPLAYNAME,userVisible:e.Files.Client.PROPERTY_USERVISIBLE,userAssignable:e.Files.Client.PROPERTY_USERASSIGNABLE,canAssign:e.Files.Client.PROPERTY_CAN_ASSIGN},parse:function(e){return{id:e.id,name:e.name,userVisible:!0===e.userVisible||"true"===e.userVisible,userAssignable:!0===e.userAssignable||"true"===e.userAssignable,canAssign:!0===e.canAssign||"true"===e.canAssign}}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagModel=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,usePUT:!0,_objectId:null,_objectType:"files",model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags-relations/"+this._objectType+"/"+this._objectId},setObjectId:function(e){this._objectId=e},setObjectType:function(e){this._objectType=e},initialize:function(e,t){t=t||{},_.isUndefined(t.objectId)||(this._objectId=t.objectId),_.isUndefined(t.objectType)||(this._objectType=t.objectType)},getTagIds:function(){return this.map((function(e){return e.id}))}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsMappingCollection=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags/"},filterByName:function(e){return this.filter((function(t){return function(e,t){return e.get("name").substr(0,t.length).toLowerCase()===t.toLowerCase()}(t,e)}))},reset:function(){return this.fetched=!1,e.Backbone.Collection.prototype.reset.apply(this,arguments)},fetch:function(t){var n=this;if(t=t||{},this.fetched||t.force)return t.success&&t.success(this,null,t),this.trigger("sync",this,null,t),Promise.resolve();var s=t.success;return(t=_.extend({},t)).success=function(){if(n.fetched=!0,s)return s.apply(this,arguments)},e.Backbone.Collection.prototype.fetch.call(this,t)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsCollection=t,e.SystemTags.collection=new e.SystemTags.SystemTagsCollection}(OC)},function(e,n){!function(e){var n=e.Backbone.View.extend({_rendered:!1,_newTag:null,_lastUsedTags:[],className:"systemTagsInputFieldContainer",template:function(e){return'<input class="systemTagsInputField" type="hidden" name="tags" value=""/>'},initialize:function(t){t=t||{},this._multiple=!!t.multiple,this._allowActions=_.isUndefined(t.allowActions)||!!t.allowActions,this._allowCreate=_.isUndefined(t.allowCreate)||!!t.allowCreate,this._isAdmin=!!t.isAdmin,_.isFunction(t.initSelection)&&(this._initSelection=t.initSelection),this.collection=t.collection||e.SystemTags.collection;var n=this;this.collection.on("change:name remove",(function(){_.defer(n._refreshSelection)})),_.defer(_.bind(this._getLastUsedTags,this)),_.bindAll(this,"_refreshSelection","_onClickRenameTag","_onClickDeleteTag","_onSelectTag","_onDeselectTag","_onSubmitRenameTag")},_getLastUsedTags:function(){var t=this;$.ajax({type:"GET",url:e.generateUrl("/apps/systemtags/lastused"),success:function(e){t._lastUsedTags=e}})},_refreshSelection:function(){this.$tagsField.select2("val",this.$tagsField.val())},_onClickRenameTag:function(n){var s=$(n.target).closest(".systemtags-item"),i=s.attr("data-id"),l=this.collection.get(i).get("name"),a=$(e.SystemTags.Templates.result_form({cid:this.cid,name:l,deleteTooltip:t("core","Delete"),renameLabel:t("core","Rename"),isAdmin:this._isAdmin}));return s.find(".label").after(a),s.find(".label, .systemtags-actions").addClass("hidden"),s.closest(".select2-result").addClass("has-form"),a.find("[title]").tooltip({placement:"bottom",container:"body"}),a.find("input").focus().selectRange(0,l.length),!1},_onSubmitRenameTag:function(e){e.preventDefault();var t=$(e.target),n=t.closest(".systemtags-item"),s=n.attr("data-id"),i=this.collection.get(s),l=$(e.target).find("input").val().trim();l&&l!==i.get("name")&&(i.save({name:l}),n.find(".label").text(l)),n.find(".label, .systemtags-actions").removeClass("hidden"),t.remove(),n.closest(".select2-result").removeClass("has-form")},_onClickDeleteTag:function(e){var t=$(e.target).closest(".systemtags-item"),n=t.attr("data-id");return this.collection.get(n).destroy(),$(e.target).tooltip("hide"),t.closest(".select2-result").remove(),!1},_addToSelect2Selection:function(e){var t=this.$tagsField.select2("data");t.push(e),this.$tagsField.select2("data",t)},_onSelectTag:function(e){var t,n=this;if(e.object&&e.object.isNew)return t=this.collection.create({name:e.object.name.trim(),userVisible:!0,userAssignable:!0,canAssign:!0},{success:function(e){n._addToSelect2Selection(e.toJSON()),n._lastUsedTags.unshift(e.id),n.trigger("select",e)},error:function(t,s){409===s.status&&(n.collection.reset(),n.collection.fetch({success:function(t){var s=t.where({name:e.object.name.trim(),userVisible:!0,userAssignable:!0});s.length&&(s=s[0],n._addToSelect2Selection(s.toJSON()),n.trigger("select",s))}}))}}),this.$tagsField.select2("close"),e.preventDefault(),!1;t=this.collection.get(e.object.id),this._lastUsedTags.unshift(t.id),this._newTag=null,this.trigger("select",t)},_onDeselectTag:function(e){this.trigger("deselect",e.choice.id)},_queryTagsAutocomplete:function(e){var t=this;this.collection.fetch({success:function(n){var s=n.filterByName(e.term.trim());t._isAdmin||(s=_.filter(s,(function(e){return e.get("canAssign")}))),e.callback({results:_.invoke(s,"toJSON")})}})},_preventDefault:function(e){e.stopPropagation()},_formatDropDownResult:function(n){return e.SystemTags.Templates.result(_.extend({renameTooltip:t("core","Rename"),allowActions:this._allowActions,tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(n)[0].innerHTML:null,isAdmin:this._isAdmin},n))},_formatSelection:function(t){return e.SystemTags.Templates.selection(_.extend({tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(t)[0].innerHTML:null,isAdmin:this._isAdmin},t))},_createSearchChoice:function(e){if(e=e.trim(),!this.collection.filter((function(t){return t.get("name")===e})).length)return this._newTag?this._newTag.name=e:this._newTag={id:-1,name:e,userAssignable:!0,userVisible:!0,canAssign:!0,isNew:!0},this._newTag},_initSelection:function(e,t){var n=this,s=$(e).val().split(",");function i(e){var t=e.toJSON();return n._isAdmin||t.canAssign||(t.locked=!0),t}this.collection.fetch({success:function(){t(function(e){var t=n.collection.filter((function(t){return e.indexOf(t.id)>=0&&(n._isAdmin||t.get("userVisible"))}));return _.map(t,i)}(s))}})},render:function(){var n=this;this.$el.html(this.template()),this.$el.find("[title]").tooltip({placement:"bottom"}),this.$tagsField=this.$el.find("[name=tags]"),this.$tagsField.select2({placeholder:t("core","Collaborative tags"),containerCssClass:"systemtags-select2-container",dropdownCssClass:"systemtags-select2-dropdown",closeOnSelect:!1,allowClear:!1,multiple:this._multiple,toggleSelect:this._multiple,query:_.bind(this._queryTagsAutocomplete,this),id:function(e){return e.id},initSelection:_.bind(this._initSelection,this),formatResult:_.bind(this._formatDropDownResult,this),formatSelection:_.bind(this._formatSelection,this),createSearchChoice:this._allowCreate?_.bind(this._createSearchChoice,this):void 0,sortResults:function(t){var s=_.pluck(n.$tagsField.select2("data"),"id");return t.sort((function(t,i){var l=s.indexOf(t.id)>=0,a=s.indexOf(i.id)>=0;if(l===a){var o=n._lastUsedTags.indexOf(t.id),r=n._lastUsedTags.indexOf(i.id);return o!==r?-1===r?-1:-1===o?1:o<r?-1:1:e.Util.naturalSortCompare(t.name,i.name)}return l&&!a?-1:1})),t},formatNoMatches:function(){return t("core","No tags found")}}).on("select2-selecting",this._onSelectTag).on("select2-removing",this._onDeselectTag);var s=this.$tagsField.select2("dropdown");s.on("mouseup",".rename",this._onClickRenameTag),s.on("mouseup",".delete",this._onClickDeleteTag),s.on("mouseup",".select2-result-selectable.has-form",this._preventDefault),s.on("submit",".systemtags-rename-form",this._onSubmitRenameTag),this.delegateEvents()},remove:function(){this.$tagsField&&this.$tagsField.select2("destroy")},getValues:function(){this.$tagsField.select2("val")},setValues:function(e){this.$tagsField.select2("val",e)},setData:function(e){this.$tagsField.select2("data",e)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsInputField=n}(OC)},function(e,t,n){var s=n(8);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(10).default)("bdf318e0",s,!0,{})},function(e,t,n){(t=n(9)(!1)).push([e.i,".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices,.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",s=e[3];if(!s)return n;if(t&&"function"==typeof btoa){var i=(a=s,o=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),l=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[n].concat(l).concat([i]).join("\n")}var a,o,r;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var s=0;s<e.length;s++){var i=[].concat(e[s]);n&&(i[2]?i[2]="".concat(n," and ").concat(i[2]):i[2]=n),t.push(i)}},t}},function(e,t,n){"use strict";function s(e,t){for(var n=[],s={},i=0;i<t.length;i++){var l=t[i],a=l[0],o={id:e+":"+i,css:l[1],media:l[2],sourceMap:l[3]};s[a]?s[a].parts.push(o):n.push(s[a]={id:a,parts:[o]})}return n}n.r(t),n.d(t,"default",(function(){return p}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l={},a=i&&(document.head||document.getElementsByTagName("head")[0]),o=null,r=0,c=!1,u=function(){},d=null,m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,i){c=n,d=i||{};var a=s(e,t);return f(a),function(t){for(var n=[],i=0;i<a.length;i++){var o=a[i];(r=l[o.id]).refs--,n.push(r)}t?f(a=s(e,t)):a=[];for(i=0;i<n.length;i++){var r;if(0===(r=n[i]).refs){for(var c=0;c<r.parts.length;c++)r.parts[c]();delete l[r.id]}}}}function f(e){for(var t=0;t<e.length;t++){var n=e[t],s=l[n.id];if(s){s.refs++;for(var i=0;i<s.parts.length;i++)s.parts[i](n.parts[i]);for(;i<n.parts.length;i++)s.parts.push(h(n.parts[i]));s.parts.length>n.parts.length&&(s.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(h(n.parts[i]));l[n.id]={id:n.id,refs:1,parts:a}}}}function g(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function h(e){var t,n,s=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(s){if(c)return u;s.parentNode.removeChild(s)}if(m){var i=r++;s=o||(o=g()),t=v.bind(null,s,i,!1),n=v.bind(null,s,i,!0)}else s=g(),t=_.bind(null,s),n=function(){s.parentNode.removeChild(s)};return t(e),function(s){if(s){if(s.css===e.css&&s.media===e.media&&s.sourceMap===e.sourceMap)return;t(e=s)}else n()}}var y,b=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function v(e,t,n,s){var i=n?"":s.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var l=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(l,a[t]):e.appendChild(l)}}function _(e,t){var n=t.css,s=t.media,i=t.sourceMap;if(s&&e.setAttribute("media",s),d.ssrId&&e.setAttribute("data-vue-ssr-id",t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}}]); //# sourceMappingURL=systemtags.js.map
\ No newline at end of file diff --git a/core/js/dist/systemtags.js.map b/core/js/dist/systemtags.js.map index ac1c1702a87..3b38caf854d 100644 --- a/core/js/dist/systemtags.js.map +++ b/core/js/dist/systemtags.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/systemtags/merged-systemtags.js","webpack:///./core/js/systemtags/systemtags.js","webpack:///./core/js/systemtags/templates.js","webpack:///./core/js/systemtags/systemtagmodel.js","webpack:///./core/js/systemtags/systemtagsmappingcollection.js","webpack:///./core/js/systemtags/systemtagscollection.js","webpack:///./core/js/systemtags/systemtagsinputfield.js","webpack:///./core/css/systemtags.scss?456a","webpack:///./core/css/systemtags.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","toJSON","$","addClass","text","scope","$span","append","escapeHTML","userAssignable","userVisible","template","templates","Handlebars","Templates","container","depth0","helpers","partials","data","stack1","helper","lookupProperty","parent","propertyName","hooks","helperMissing","nullContext","escapeExpression","options","alias1","alias2","buffer","program","noop","blockHelperMissing","alias4","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","SystemTagModel","Backbone","Model","sync","davSync","defaults","canAssign","davProperties","parse","id","SystemTagsMappingCollection","Collection","usePUT","_objectId","_objectType","model","url","linkToRemote","this","setObjectId","objectId","setObjectType","objectType","initialize","models","getTagIds","map","SystemTagsCollection","filterByName","filter","term","substr","length","toLowerCase","filterFunction","reset","fetched","apply","arguments","fetch","self","force","success","trigger","Promise","resolve","collection","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","_multiple","multiple","_allowActions","allowActions","_allowCreate","allowCreate","_isAdmin","isAdmin","isFunction","initSelection","_initSelection","on","defer","_refreshSelection","_getLastUsedTags","bindAll","ajax","type","generateUrl","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","$renameForm","cid","deleteTooltip","renameLabel","find","after","tooltip","placement","focus","selectRange","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","isNew","unshift","error","xhr","status","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","renameTooltip","tagMarkup","innerHTML","_formatSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","content","locals","add","default","___CSS_LOADER_API_IMPORT___","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","listToStyles","parentId","styles","newStyles","part","css","media","parts","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","isOldIE","navigator","test","userAgent","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","appendChild","obj","update","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OA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AaE,YAAYiB,IAK/B,SAAST,EAAYV,EAAcG,GACjC,IAAI/B,EAAM+B,EAAI/B,IACVC,EAAQ8B,EAAI9B,MACZpB,EAAYkD,EAAIlD,UAiBpB,GAfIoB,GACF2B,EAAauB,aAAa,QAASlD,GAEjC9N,EAAQiR,OACVxB,EAAauB,aA7JF,kBA6JyBpB,EAAIlO,IAGtCgL,IAGFmB,GAAO,mBAAqBnB,EAAUQ,QAAQ,GAAK,MAEnDW,GAAO,uDAAyDrB,KAAKI,SAASC,mBAAmBC,KAAKC,UAAUL,MAAgB,OAG9H+C,EAAaiB,WACfjB,EAAaiB,WAAWC,QAAU9C,MAC7B,CACL,KAAO4B,EAAayB,YAClBzB,EAAaO,YAAYP,EAAayB,YAExCzB,EAAaE,YAAY1B,SAAS4C,eAAehD","file":"systemtags.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './systemtags.js'\nimport './templates.js'\nimport './systemtagmodel.js'\nimport './systemtagsmappingcollection.js'\nimport './systemtagscollection.js'\nimport './systemtagsinputfield.js'\n\nimport '../../css/systemtags.scss'\n","/* eslint-disable */\n/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @returns {jQuery}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON()\n\t\t\t}\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\treturn $('<span>').addClass('non-existing-tag').text(\n\t\t\t\t\tt('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tvar $span = $('<span>')\n\t\t\t$span.append(escapeHTML(tag.name))\n\n\t\t\tvar scope\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'restricted')\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'invisible')\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\t$span.append($('<em>').text(' (' + scope + ')'))\n\t\t\t}\n\t\t\treturn $span\n\t\t}\n\t}\n})(OC)\n","(function() {\n var template = Handlebars.template, templates = OC.SystemTags.Templates = OC.SystemTags.Templates || {};\ntemplates['result'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":22},\"end\":{\"line\":4,\"column\":37}}}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":6,\"column\":22},\"end\":{\"line\":6,\"column\":30}}}) : helper)))\n + \"</span>\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<span class=\\\"systemtags-actions\\\">\\n\t\t\t<a href=\\\"#\\\" class=\\\"rename icon icon-rename\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"renameTooltip\") || (depth0 != null ? lookupProperty(depth0,\"renameTooltip\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"renameTooltip\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":10,\"column\":54},\"end\":{\"line\":10,\"column\":71}}}) : helper)))\n + \"\\\"></a>\\n\t\t</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }, buffer = \n \"<span class=\\\"systemtags-item\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isNew\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":28},\"end\":{\"line\":1,\"column\":57}}})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"id\") || (depth0 != null ? lookupProperty(depth0,\"id\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":68},\"end\":{\"line\":1,\"column\":74}}}) : helper)))\n + \"\\\">\\n<span class=\\\"checkmark icon icon-checkmark\\\"></span>\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":1},\"end\":{\"line\":7,\"column\":8}}})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = lookupProperty(helpers,\"allowActions\") || (depth0 != null ? lookupProperty(depth0,\"allowActions\") : depth0)) != null ? helper : alias2),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":8,\"column\":1},\"end\":{\"line\":12,\"column\":18}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"allowActions\")) { stack1 = container.hooks.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"</span>\\n\";\n},\"useData\":true});\ntemplates['result_form'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<a href=\\\"#\\\" class=\\\"delete icon icon-delete\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"deleteTooltip\") || (depth0 != null ? lookupProperty(depth0,\"deleteTooltip\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"deleteTooltip\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":5,\"column\":53},\"end\":{\"line\":5,\"column\":70}}}) : helper)))\n + \"\\\"></a>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<form class=\\\"systemtags-rename-form\\\">\\n\t <label class=\\\"hidden-visually\\\" for=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"cid\") || (depth0 != null ? lookupProperty(depth0,\"cid\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":38},\"end\":{\"line\":2,\"column\":45}}}) : helper)))\n + \"-rename-input\\\">\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"renameLabel\") || (depth0 != null ? lookupProperty(depth0,\"renameLabel\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"renameLabel\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":60},\"end\":{\"line\":2,\"column\":75}}}) : helper)))\n + \"</label>\\n\t<input id=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"cid\") || (depth0 != null ? lookupProperty(depth0,\"cid\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":12},\"end\":{\"line\":3,\"column\":19}}}) : helper)))\n + \"-rename-input\\\" type=\\\"text\\\" value=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":53},\"end\":{\"line\":3,\"column\":61}}}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":1},\"end\":{\"line\":6,\"column\":8}}})) != null ? stack1 : \"\")\n + \"</form>\\n\";\n},\"useData\":true});\ntemplates['selection'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":21},\"end\":{\"line\":2,\"column\":36}}}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":21},\"end\":{\"line\":4,\"column\":29}}}) : helper)))\n + \"</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":0},\"end\":{\"line\":5,\"column\":7}}})) != null ? stack1 : \"\");\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN: '{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable',\n\t})\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tconst SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tuserVisible: true,\n\t\t\t\tuserAssignable: true,\n\t\t\t\tcanAssign: true,\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t\t'name': OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t\t'userVisible': OC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t\t'userAssignable': OC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t\t'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN,\n\t\t\t},\n\n\t\t\tparse: function(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tname: data.name,\n\t\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true',\n\t\t\t\t}\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagModel = SystemTagModel\n})(OC)\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tconst SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t * Use PUT instead of PROPPATCH\n\t\t */\n\t\t\tusePUT: true,\n\n\t\t\t/**\n\t\t * Id of the file for which to filter activities by\n\t\t *\n\t\t * @var int\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t * Type of the object to filter by\n\t\t *\n\t\t * @var string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object id to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectId file id or null\n\t\t */\n\t\t\tsetObjectId: function(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object type to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectType file id or null\n\t\t */\n\t\t\tsetObjectType: function(objectType) {\n\t\t\t\tthis._objectType = objectType\n\t\t\t},\n\n\t\t\tinitialize: function(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetTagIds: function() {\n\t\t\t\treturn this.map(function(model) {\n\t\t\t\t\treturn model.id\n\t\t\t\t})\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase()\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags/'\n\t\t\t},\n\n\t\t\tfilterByName: function(name) {\n\t\t\t\treturn this.filter(function(model) {\n\t\t\t\t\treturn filterFunction(model, name)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis.fetched = false\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param options\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\t\tfetch: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\toptions = options || {}\n\t\t\t\tif (this.fetched || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success(this, null, options)\n\t\t\t\t\t}\n\t\t\t\t\t// trigger sync event\n\t\t\t\t\tthis.trigger('sync', this, null, options)\n\t\t\t\t\treturn Promise.resolve()\n\t\t\t\t}\n\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({}, options)\n\t\t\t\toptions.success = function() {\n\t\t\t\t\tself.fetched = true\n\t\t\t\t\tif (success) {\n\t\t\t\t\t\treturn success.apply(this, arguments)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection()\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars */\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t\t_rendered: false,\n\n\t\t\t_newTag: null,\n\n\t\t\t_lastUsedTags: [],\n\n\t\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\t\ttemplate: function(data) {\n\t\t\t\treturn '<input class=\"systemTagsInputField\" type=\"hidden\" name=\"tags\" value=\"\"/>'\n\t\t\t},\n\n\t\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {bool} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {bool} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {bool} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\t\tinitialize: function(options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\tthis._multiple = !!options.multiple\n\t\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions\n\t\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate\n\t\t\t\tthis._isAdmin = !!options.isAdmin\n\n\t\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\t\tthis._initSelection = options.initSelection\n\t\t\t\t}\n\n\t\t\t\tthis.collection = options.collection || OC.SystemTags.collection\n\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t\t_.defer(self._refreshSelection)\n\t\t\t\t})\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\n\t\t\t\t_.bindAll(\n\t\t\t\t\tthis,\n\t\t\t\t\t'_refreshSelection',\n\t\t\t\t\t'_onClickRenameTag',\n\t\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t\t'_onSelectTag',\n\t\t\t\t\t'_onDeselectTag',\n\t\t\t\t\t'_onSubmitRenameTag'\n\t\t\t\t)\n\t\t\t},\n\n\t\t\t_getLastUsedTags: function() {\n\t\t\t\tvar self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t\t_refreshSelection: function() {\n\t\t\t\tthis.$tagsField.select2('val', this.$tagsField.val())\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t\t_onClickRenameTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\n\t\t\t\tvar oldName = tagModel.get('name')\n\t\t\t\tvar $renameForm = $(OC.SystemTags.Templates['result_form']({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tname: oldName,\n\t\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}))\n\t\t\t\t$item.find('.label').after($renameForm)\n\t\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden')\n\t\t\t\t$item.closest('.select2-result').addClass('has-form')\n\n\t\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\tcontainer: 'body'\n\t\t\t\t})\n\t\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length)\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server.\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onSubmitRenameTag: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $form = $(ev.target)\n\t\t\t\tvar $item = $form.closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\t\t\t\tvar newName = $(ev.target).find('input').val().trim()\n\t\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\t\ttagModel.save({ 'name': newName })\n\t\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t\t$item.find('.label').text(newName)\n\t\t\t\t}\n\t\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden')\n\t\t\t\t$form.remove()\n\t\t\t\t$item.closest('.select2-result').removeClass('has-form')\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onClickDeleteTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tthis.collection.get(tagId).destroy()\n\t\t\t\t$(ev.target).tooltip('hide')\n\t\t\t\t$item.closest('.select2-result').remove()\n\t\t\t\t// TODO: spinner\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_addToSelect2Selection: function(selection) {\n\t\t\t\tvar data = this.$tagsField.select2('data')\n\t\t\t\tdata.push(selection)\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onSelectTag: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar tag\n\t\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\t\ttag = this.collection.create({\n\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tcanAssign: true\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\tself._lastUsedTags.unshift(model.id)\n\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\t\tself.collection.reset()\n\t\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\t\tmodel = model[0]\n\t\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.$tagsField.select2('close')\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\ttag = this.collection.get(e.object.id)\n\t\t\t\t\tthis._lastUsedTags.unshift(tag.id)\n\t\t\t\t}\n\t\t\t\tthis._newTag = null\n\t\t\t\tthis.trigger('select', tag)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onDeselectTag: function(e) {\n\t\t\t\tthis.trigger('deselect', e.choice.id)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t\t_queryTagsAutocomplete: function(query) {\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim())\n\t\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\t\treturn tagModel.get('canAssign')\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_preventDefault: function(e) {\n\t\t\t\te.stopPropagation()\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatDropDownResult: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['result'](_.extend({\n\t\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\t\tallowActions: this._allowActions,\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatSelection: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['selection'](_.extend({\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @returns {Object} dummy tag\n\t\t */\n\t\t\t_createSearchChoice: function(term) {\n\t\t\t\tterm = term.trim()\n\t\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term\n\t\t\t\t}).length) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this._newTag) {\n\t\t\t\t\tthis._newTag = {\n\t\t\t\t\t\tid: -1,\n\t\t\t\t\t\tname: term,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tcanAssign: true,\n\t\t\t\t\t\tisNew: true\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._newTag.name = term\n\t\t\t\t}\n\n\t\t\t\treturn this._newTag\n\t\t\t},\n\n\t\t\t_initSelection: function(element, callback) {\n\t\t\t\tvar self = this\n\t\t\t\tvar ids = $(element).val().split(',')\n\n\t\t\t\tfunction modelToSelection(model) {\n\t\t\t\t\tvar data = model.toJSON()\n\t\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\t\tdata.locked = true\n\t\t\t\t\t}\n\t\t\t\t\treturn data\n\t\t\t\t}\n\n\t\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'))\n\t\t\t\t\t})\n\t\t\t\t\treturn _.map(selectedModels, modelToSelection)\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tcallback(findSelectedObjects(ids))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\t\trender: function() {\n\t\t\t\tvar self = this\n\t\t\t\tthis.$el.html(this.template())\n\n\t\t\t\tthis.$el.find('[title]').tooltip({ placement: 'bottom' })\n\t\t\t\tthis.$tagsField = this.$el.find('[name=tags]')\n\t\t\t\tthis.$tagsField.select2({\n\t\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\t\tcloseOnSelect: false,\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: this._multiple,\n\t\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\t\tid: function(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\t\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\t\tsortResults: function(results) {\n\t\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id')\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0\n\t\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0\n\t\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\t\treturn t('core', 'No tags found')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t\t.on('select2-removing', this._onDeselectTag)\n\n\t\t\t\tvar $dropDown = this.$tagsField.select2('dropdown')\n\t\t\t\t// register events for inside the dropdown\n\t\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag)\n\t\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag)\n\t\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault)\n\t\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag)\n\n\t\t\t\tthis.delegateEvents()\n\t\t\t},\n\n\t\t\tremove: function() {\n\t\t\t\tif (this.$tagsField) {\n\t\t\t\t\tthis.$tagsField.select2('destroy')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetValues: function() {\n\t\t\t\tthis.$tagsField.select2('val')\n\t\t\t},\n\n\t\t\tsetValues: function(values) {\n\t\t\t\tthis.$tagsField.select2('val', values)\n\t\t\t},\n\n\t\t\tsetData: function(data) {\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField\n\n})(OC)\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"bdf318e0\", content, true, {});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n for (var i = 0; i < modules.length; i++) {\n var item = [].concat(modules[i]);\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/systemtags/merged-systemtags.js","webpack:///./core/js/systemtags/systemtags.js","webpack:///./core/js/systemtags/templates.js","webpack:///./core/js/systemtags/systemtagmodel.js","webpack:///./core/js/systemtags/systemtagsmappingcollection.js","webpack:///./core/js/systemtags/systemtagscollection.js","webpack:///./core/js/systemtags/systemtagsinputfield.js","webpack:///./core/css/systemtags.scss?456a","webpack:///./core/css/systemtags.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","toJSON","$","addClass","text","scope","$span","append","escapeHTML","userAssignable","userVisible","template","templates","Handlebars","Templates","container","depth0","helpers","partials","data","stack1","helper","lookupProperty","parent","propertyName","hooks","helperMissing","nullContext","escapeExpression","options","alias1","alias2","buffer","program","noop","blockHelperMissing","alias4","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","SystemTagModel","Backbone","Model","sync","davSync","defaults","canAssign","davProperties","parse","id","SystemTagsMappingCollection","Collection","usePUT","_objectId","_objectType","model","url","linkToRemote","this","setObjectId","objectId","setObjectType","objectType","initialize","models","getTagIds","map","SystemTagsCollection","filterByName","filter","term","substr","length","toLowerCase","filterFunction","reset","fetched","apply","arguments","fetch","self","force","success","trigger","Promise","resolve","collection","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","_multiple","multiple","_allowActions","allowActions","_allowCreate","allowCreate","_isAdmin","isAdmin","isFunction","initSelection","_initSelection","on","defer","_refreshSelection","_getLastUsedTags","bindAll","ajax","type","generateUrl","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","$renameForm","cid","deleteTooltip","renameLabel","find","after","tooltip","placement","focus","selectRange","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","isNew","unshift","error","xhr","status","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","renameTooltip","tagMarkup","innerHTML","_formatSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","content","locals","add","default","___CSS_LOADER_API_IMPORT___","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","listToStyles","parentId","styles","newStyles","part","css","media","parts","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","isOldIE","navigator","test","userAgent","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","appendChild","obj","update","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAO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EAAUQ,QAAQ,GAAK,MAEnDW,GAAO,uDAAyDrB,KAAKI,SAASC,mBAAmBC,KAAKC,UAAUL,MAAgB,OAG9H+C,EAAaiB,WACfjB,EAAaiB,WAAWC,QAAU9C,MAC7B,CACL,KAAO4B,EAAayB,YAClBzB,EAAaO,YAAYP,EAAayB,YAExCzB,EAAaE,YAAY1B,SAAS4C,eAAehD","file":"systemtags.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './systemtags.js'\nimport './templates.js'\nimport './systemtagmodel.js'\nimport './systemtagsmappingcollection.js'\nimport './systemtagscollection.js'\nimport './systemtagsinputfield.js'\n\nimport '../../css/systemtags.scss'\n","/* eslint-disable */\n/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @returns {jQuery}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON()\n\t\t\t}\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\treturn $('<span>').addClass('non-existing-tag').text(\n\t\t\t\t\tt('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tvar $span = $('<span>')\n\t\t\t$span.append(escapeHTML(tag.name))\n\n\t\t\tvar scope\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'restricted')\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'invisible')\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\t$span.append($('<em>').text(' (' + scope + ')'))\n\t\t\t}\n\t\t\treturn $span\n\t\t}\n\t}\n})(OC)\n","(function() {\n var template = Handlebars.template, templates = OC.SystemTags.Templates = OC.SystemTags.Templates || {};\ntemplates['result'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":22},\"end\":{\"line\":4,\"column\":37}}}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":6,\"column\":22},\"end\":{\"line\":6,\"column\":30}}}) : helper)))\n + \"</span>\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<span class=\\\"systemtags-actions\\\">\\n\t\t\t<a href=\\\"#\\\" class=\\\"rename icon icon-rename\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"renameTooltip\") || (depth0 != null ? lookupProperty(depth0,\"renameTooltip\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"renameTooltip\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":10,\"column\":54},\"end\":{\"line\":10,\"column\":71}}}) : helper)))\n + \"\\\"></a>\\n\t\t</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }, buffer = \n \"<span class=\\\"systemtags-item\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isNew\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":28},\"end\":{\"line\":1,\"column\":57}}})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"id\") || (depth0 != null ? lookupProperty(depth0,\"id\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":68},\"end\":{\"line\":1,\"column\":74}}}) : helper)))\n + \"\\\">\\n<span class=\\\"checkmark icon icon-checkmark\\\"></span>\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":1},\"end\":{\"line\":7,\"column\":8}}})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = lookupProperty(helpers,\"allowActions\") || (depth0 != null ? lookupProperty(depth0,\"allowActions\") : depth0)) != null ? helper : alias2),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":8,\"column\":1},\"end\":{\"line\":12,\"column\":18}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"allowActions\")) { stack1 = container.hooks.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"</span>\\n\";\n},\"useData\":true});\ntemplates['result_form'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<a href=\\\"#\\\" class=\\\"delete icon icon-delete\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"deleteTooltip\") || (depth0 != null ? lookupProperty(depth0,\"deleteTooltip\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"deleteTooltip\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":5,\"column\":53},\"end\":{\"line\":5,\"column\":70}}}) : helper)))\n + \"\\\"></a>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<form class=\\\"systemtags-rename-form\\\">\\n\t <label class=\\\"hidden-visually\\\" for=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"cid\") || (depth0 != null ? lookupProperty(depth0,\"cid\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":38},\"end\":{\"line\":2,\"column\":45}}}) : helper)))\n + \"-rename-input\\\">\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"renameLabel\") || (depth0 != null ? lookupProperty(depth0,\"renameLabel\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"renameLabel\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":60},\"end\":{\"line\":2,\"column\":75}}}) : helper)))\n + \"</label>\\n\t<input id=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"cid\") || (depth0 != null ? lookupProperty(depth0,\"cid\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":12},\"end\":{\"line\":3,\"column\":19}}}) : helper)))\n + \"-rename-input\\\" type=\\\"text\\\" value=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":53},\"end\":{\"line\":3,\"column\":61}}}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":1},\"end\":{\"line\":6,\"column\":8}}})) != null ? stack1 : \"\")\n + \"</form>\\n\";\n},\"useData\":true});\ntemplates['selection'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":21},\"end\":{\"line\":2,\"column\":36}}}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":21},\"end\":{\"line\":4,\"column\":29}}}) : helper)))\n + \"</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":0},\"end\":{\"line\":5,\"column\":7}}})) != null ? stack1 : \"\");\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN: '{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable',\n\t})\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tconst SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tuserVisible: true,\n\t\t\t\tuserAssignable: true,\n\t\t\t\tcanAssign: true,\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t\t'name': OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t\t'userVisible': OC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t\t'userAssignable': OC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t\t'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN,\n\t\t\t},\n\n\t\t\tparse: function(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tname: data.name,\n\t\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true',\n\t\t\t\t}\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagModel = SystemTagModel\n})(OC)\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tconst SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t * Use PUT instead of PROPPATCH\n\t\t */\n\t\t\tusePUT: true,\n\n\t\t\t/**\n\t\t * Id of the file for which to filter activities by\n\t\t *\n\t\t * @var int\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t * Type of the object to filter by\n\t\t *\n\t\t * @var string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object id to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectId file id or null\n\t\t */\n\t\t\tsetObjectId: function(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object type to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectType file id or null\n\t\t */\n\t\t\tsetObjectType: function(objectType) {\n\t\t\t\tthis._objectType = objectType\n\t\t\t},\n\n\t\t\tinitialize: function(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetTagIds: function() {\n\t\t\t\treturn this.map(function(model) {\n\t\t\t\t\treturn model.id\n\t\t\t\t})\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase()\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags/'\n\t\t\t},\n\n\t\t\tfilterByName: function(name) {\n\t\t\t\treturn this.filter(function(model) {\n\t\t\t\t\treturn filterFunction(model, name)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis.fetched = false\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param options\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\t\tfetch: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\toptions = options || {}\n\t\t\t\tif (this.fetched || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success(this, null, options)\n\t\t\t\t\t}\n\t\t\t\t\t// trigger sync event\n\t\t\t\t\tthis.trigger('sync', this, null, options)\n\t\t\t\t\treturn Promise.resolve()\n\t\t\t\t}\n\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({}, options)\n\t\t\t\toptions.success = function() {\n\t\t\t\t\tself.fetched = true\n\t\t\t\t\tif (success) {\n\t\t\t\t\t\treturn success.apply(this, arguments)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection()\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars */\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t\t_rendered: false,\n\n\t\t\t_newTag: null,\n\n\t\t\t_lastUsedTags: [],\n\n\t\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\t\ttemplate: function(data) {\n\t\t\t\treturn '<input class=\"systemTagsInputField\" type=\"hidden\" name=\"tags\" value=\"\"/>'\n\t\t\t},\n\n\t\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {bool} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {bool} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {bool} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\t\tinitialize: function(options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\tthis._multiple = !!options.multiple\n\t\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions\n\t\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate\n\t\t\t\tthis._isAdmin = !!options.isAdmin\n\n\t\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\t\tthis._initSelection = options.initSelection\n\t\t\t\t}\n\n\t\t\t\tthis.collection = options.collection || OC.SystemTags.collection\n\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t\t_.defer(self._refreshSelection)\n\t\t\t\t})\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\n\t\t\t\t_.bindAll(\n\t\t\t\t\tthis,\n\t\t\t\t\t'_refreshSelection',\n\t\t\t\t\t'_onClickRenameTag',\n\t\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t\t'_onSelectTag',\n\t\t\t\t\t'_onDeselectTag',\n\t\t\t\t\t'_onSubmitRenameTag'\n\t\t\t\t)\n\t\t\t},\n\n\t\t\t_getLastUsedTags: function() {\n\t\t\t\tvar self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t\t_refreshSelection: function() {\n\t\t\t\tthis.$tagsField.select2('val', this.$tagsField.val())\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t\t_onClickRenameTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\n\t\t\t\tvar oldName = tagModel.get('name')\n\t\t\t\tvar $renameForm = $(OC.SystemTags.Templates['result_form']({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tname: oldName,\n\t\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}))\n\t\t\t\t$item.find('.label').after($renameForm)\n\t\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden')\n\t\t\t\t$item.closest('.select2-result').addClass('has-form')\n\n\t\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\tcontainer: 'body'\n\t\t\t\t})\n\t\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length)\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server.\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onSubmitRenameTag: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $form = $(ev.target)\n\t\t\t\tvar $item = $form.closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\t\t\t\tvar newName = $(ev.target).find('input').val().trim()\n\t\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\t\ttagModel.save({ 'name': newName })\n\t\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t\t$item.find('.label').text(newName)\n\t\t\t\t}\n\t\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden')\n\t\t\t\t$form.remove()\n\t\t\t\t$item.closest('.select2-result').removeClass('has-form')\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onClickDeleteTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tthis.collection.get(tagId).destroy()\n\t\t\t\t$(ev.target).tooltip('hide')\n\t\t\t\t$item.closest('.select2-result').remove()\n\t\t\t\t// TODO: spinner\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_addToSelect2Selection: function(selection) {\n\t\t\t\tvar data = this.$tagsField.select2('data')\n\t\t\t\tdata.push(selection)\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onSelectTag: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar tag\n\t\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\t\ttag = this.collection.create({\n\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tcanAssign: true\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\tself._lastUsedTags.unshift(model.id)\n\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\t\tself.collection.reset()\n\t\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\t\tmodel = model[0]\n\t\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.$tagsField.select2('close')\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\ttag = this.collection.get(e.object.id)\n\t\t\t\t\tthis._lastUsedTags.unshift(tag.id)\n\t\t\t\t}\n\t\t\t\tthis._newTag = null\n\t\t\t\tthis.trigger('select', tag)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onDeselectTag: function(e) {\n\t\t\t\tthis.trigger('deselect', e.choice.id)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t\t_queryTagsAutocomplete: function(query) {\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim())\n\t\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\t\treturn tagModel.get('canAssign')\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_preventDefault: function(e) {\n\t\t\t\te.stopPropagation()\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatDropDownResult: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['result'](_.extend({\n\t\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\t\tallowActions: this._allowActions,\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatSelection: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['selection'](_.extend({\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @returns {Object} dummy tag\n\t\t */\n\t\t\t_createSearchChoice: function(term) {\n\t\t\t\tterm = term.trim()\n\t\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term\n\t\t\t\t}).length) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this._newTag) {\n\t\t\t\t\tthis._newTag = {\n\t\t\t\t\t\tid: -1,\n\t\t\t\t\t\tname: term,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tcanAssign: true,\n\t\t\t\t\t\tisNew: true\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._newTag.name = term\n\t\t\t\t}\n\n\t\t\t\treturn this._newTag\n\t\t\t},\n\n\t\t\t_initSelection: function(element, callback) {\n\t\t\t\tvar self = this\n\t\t\t\tvar ids = $(element).val().split(',')\n\n\t\t\t\tfunction modelToSelection(model) {\n\t\t\t\t\tvar data = model.toJSON()\n\t\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\t\tdata.locked = true\n\t\t\t\t\t}\n\t\t\t\t\treturn data\n\t\t\t\t}\n\n\t\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'))\n\t\t\t\t\t})\n\t\t\t\t\treturn _.map(selectedModels, modelToSelection)\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tcallback(findSelectedObjects(ids))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\t\trender: function() {\n\t\t\t\tvar self = this\n\t\t\t\tthis.$el.html(this.template())\n\n\t\t\t\tthis.$el.find('[title]').tooltip({ placement: 'bottom' })\n\t\t\t\tthis.$tagsField = this.$el.find('[name=tags]')\n\t\t\t\tthis.$tagsField.select2({\n\t\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\t\tcloseOnSelect: false,\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: this._multiple,\n\t\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\t\tid: function(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\t\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\t\tsortResults: function(results) {\n\t\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id')\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0\n\t\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0\n\t\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\t\treturn t('core', 'No tags found')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t\t.on('select2-removing', this._onDeselectTag)\n\n\t\t\t\tvar $dropDown = this.$tagsField.select2('dropdown')\n\t\t\t\t// register events for inside the dropdown\n\t\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag)\n\t\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag)\n\t\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault)\n\t\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag)\n\n\t\t\t\tthis.delegateEvents()\n\t\t\t},\n\n\t\t\tremove: function() {\n\t\t\t\tif (this.$tagsField) {\n\t\t\t\t\tthis.$tagsField.select2('destroy')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetValues: function() {\n\t\t\t\tthis.$tagsField.select2('val')\n\t\t\t},\n\n\t\t\tsetValues: function(values) {\n\t\t\t\tthis.$tagsField.select2('val', values)\n\t\t\t},\n\n\t\t\tsetData: function(data) {\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField\n\n})(OC)\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"bdf318e0\", content, true, {});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices,.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n for (var i = 0; i < modules.length; i++) {\n var item = [].concat(modules[i]);\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/core/l10n/nl.js b/core/l10n/nl.js index 763df98c86d..d15da903439 100644 --- a/core/l10n/nl.js +++ b/core/l10n/nl.js @@ -84,7 +84,9 @@ OC.L10N.register( "The PHP function \"set_time_limit\" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended." : "De PHP functie \"set_time_limit\" is niet beschikbaar. Dit kan erin resulteren dat de scripts halverwege stoppen, waardoor de installatie ontregeld raakt. We adviseren sterk om deze functie in te schakelen.", "Your PHP does not have FreeType support, resulting in breakage of profile pictures and the settings interface." : "Je PHP heeft geen FreeType ondersteuning. Dit zal leiden tot verminkte profielafbeeldingen en instellingeninterface.", "Missing index \"{indexName}\" in table \"{tableName}\"." : "Ontbrekende index \"{indexName}\" in tabel \"{tableName}\".", - "The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running \"occ db:add-missing-indices\" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster." : "De database mist een paar indexen. Omdat het toevoegen van indexen op grote tabellen veel tijd kan kosten, zijn ze niet automatisch gecreëerd. Door het draaien van \"occ db:add-missing-indices\" kunnen deze indexen handmatig worden toegevoegd terwijl de server blijft draaien. Als de indexe zijn toegevoegd, zullen opvragingen op die tabellen veel sneller plaatsvinden.", + "The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running \"occ db:add-missing-indices\" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster." : "De database mist een paar indexen. Omdat het toevoegen van indexen op grote tabellen veel tijd kan kosten, zijn ze niet automatisch gecreëerd. Door het draaien van \"occ db:add-missing-indices\" kunnen deze indexen handmatig worden toegevoegd terwijl de server blijft draaien. Als de indexen zijn toegevoegd, zullen opvragingen op die tabellen veel sneller plaatsvinden.", + "Missing optional column \"{columnName}\" in table \"{tableName}\"." : "Ontbrekende kolom \"{columnName}\" in tabel \"{tableName}\".", + "The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running \"occ db:add-missing-columns\" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability." : "De database mist een paar optionele kolommen. Omdat het toevoegen van kolommen op grote tabellen veel tijd kan kosten, zijn ze niet automatisch gecreëerd, omdat dat optioneel kan. Door het draaien van \"occ db:add-missing-columns\" kunnen deze kolommen handmatig worden toegevoegd terwijl de server blijft draaien. Als de kolommen zijn toegevoegd, zullen bepaalde functionaliteiten veel sneller of gemakkelijker plaatsvinden.", "This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them." : "Deze server mist een paar aanbevolen PHP-modules. Voor betere prestaties en compatibiliteit adviseren we om die te installeren.", "Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Sommige kolommen in de database zijn niet geconverteerd naar 'big int'. Doordat het wijzigen van kolomtype op grote databases veel tijd kost, zijn ze niet automatisch gewijzigd. Door het uitvoeren van 'occ db:convert-filecache-bigint' worden de veranderingen alsnog uitgevoerd. Dat moet gebeuren als de server off-line staat. Voor meer informatie verwijzen we naar de <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentatie hierover</a>.", "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend." : "SQLite wordt momenteel gebruikt als backend database. Voor grotere installaties adviseren we dat je omschakelt naar een andere database backend.", @@ -141,6 +143,9 @@ OC.L10N.register( "Wrong username or password." : "Verkeerde gebruikersnaam of wachtwoord.", "User disabled" : "Gebruiker gedeactiveerd", "We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds." : "We hebben meerdere foutieve inlogverzoeken vanaf jouw IP-adres gedetecteerd. Hierdoor wordt je volgende inlogverzoek 30 seconden uitgesteld.", + "Your account is not setup for passwordless login." : "Je account is niet ingesteld voor inloggen zonder wachtwoord.", + "Passwordless authentication is not supported in your browser." : "Inloggen zonder wachtwoord is niet ondersteund door je browser.", + "Passwordless authentication is only available over a secure connection." : "Inloggen zonder wachtwoord is alleen mogelijk over een beveiligde verbinding.", "Reset password" : "Reset wachtwoord", "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "Er is een wachtwoordherstelbericht verzonden naar het e-mailadres van dit account. Als je het niet hebt ontvangen, controleer dan je spam / ongewenste mappen, of vraag je beheerder om hulp.", "If it is not there ask your local administrator." : "Als het hier niet is, vraag dan de lokale beheerder", @@ -167,6 +172,7 @@ OC.L10N.register( "Collaboratively edit office documents." : "Bewerk office documenten gezamelijk.", "Local document editing back-end used by the OnlyOffice app." : "Lokale back-end voor bestandsbewerking gebruikt bij de OnlyOffice-app.", "Forgot password?" : "Wachtwoord vergeten?", + "Log in with a device" : "Inloggen met een toestel", "Back" : "Terug", "Settings" : "Instellingen", "Could not load your contacts" : "Kon je contactpersonenen niet laden", diff --git a/core/l10n/nl.json b/core/l10n/nl.json index 94e5b834179..e32f49718c4 100644 --- a/core/l10n/nl.json +++ b/core/l10n/nl.json @@ -82,7 +82,9 @@ "The PHP function \"set_time_limit\" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended." : "De PHP functie \"set_time_limit\" is niet beschikbaar. Dit kan erin resulteren dat de scripts halverwege stoppen, waardoor de installatie ontregeld raakt. We adviseren sterk om deze functie in te schakelen.", "Your PHP does not have FreeType support, resulting in breakage of profile pictures and the settings interface." : "Je PHP heeft geen FreeType ondersteuning. Dit zal leiden tot verminkte profielafbeeldingen en instellingeninterface.", "Missing index \"{indexName}\" in table \"{tableName}\"." : "Ontbrekende index \"{indexName}\" in tabel \"{tableName}\".", - "The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running \"occ db:add-missing-indices\" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster." : "De database mist een paar indexen. Omdat het toevoegen van indexen op grote tabellen veel tijd kan kosten, zijn ze niet automatisch gecreëerd. Door het draaien van \"occ db:add-missing-indices\" kunnen deze indexen handmatig worden toegevoegd terwijl de server blijft draaien. Als de indexe zijn toegevoegd, zullen opvragingen op die tabellen veel sneller plaatsvinden.", + "The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running \"occ db:add-missing-indices\" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster." : "De database mist een paar indexen. Omdat het toevoegen van indexen op grote tabellen veel tijd kan kosten, zijn ze niet automatisch gecreëerd. Door het draaien van \"occ db:add-missing-indices\" kunnen deze indexen handmatig worden toegevoegd terwijl de server blijft draaien. Als de indexen zijn toegevoegd, zullen opvragingen op die tabellen veel sneller plaatsvinden.", + "Missing optional column \"{columnName}\" in table \"{tableName}\"." : "Ontbrekende kolom \"{columnName}\" in tabel \"{tableName}\".", + "The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running \"occ db:add-missing-columns\" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability." : "De database mist een paar optionele kolommen. Omdat het toevoegen van kolommen op grote tabellen veel tijd kan kosten, zijn ze niet automatisch gecreëerd, omdat dat optioneel kan. Door het draaien van \"occ db:add-missing-columns\" kunnen deze kolommen handmatig worden toegevoegd terwijl de server blijft draaien. Als de kolommen zijn toegevoegd, zullen bepaalde functionaliteiten veel sneller of gemakkelijker plaatsvinden.", "This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them." : "Deze server mist een paar aanbevolen PHP-modules. Voor betere prestaties en compatibiliteit adviseren we om die te installeren.", "Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Sommige kolommen in de database zijn niet geconverteerd naar 'big int'. Doordat het wijzigen van kolomtype op grote databases veel tijd kost, zijn ze niet automatisch gewijzigd. Door het uitvoeren van 'occ db:convert-filecache-bigint' worden de veranderingen alsnog uitgevoerd. Dat moet gebeuren als de server off-line staat. Voor meer informatie verwijzen we naar de <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentatie hierover</a>.", "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend." : "SQLite wordt momenteel gebruikt als backend database. Voor grotere installaties adviseren we dat je omschakelt naar een andere database backend.", @@ -139,6 +141,9 @@ "Wrong username or password." : "Verkeerde gebruikersnaam of wachtwoord.", "User disabled" : "Gebruiker gedeactiveerd", "We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds." : "We hebben meerdere foutieve inlogverzoeken vanaf jouw IP-adres gedetecteerd. Hierdoor wordt je volgende inlogverzoek 30 seconden uitgesteld.", + "Your account is not setup for passwordless login." : "Je account is niet ingesteld voor inloggen zonder wachtwoord.", + "Passwordless authentication is not supported in your browser." : "Inloggen zonder wachtwoord is niet ondersteund door je browser.", + "Passwordless authentication is only available over a secure connection." : "Inloggen zonder wachtwoord is alleen mogelijk over een beveiligde verbinding.", "Reset password" : "Reset wachtwoord", "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "Er is een wachtwoordherstelbericht verzonden naar het e-mailadres van dit account. Als je het niet hebt ontvangen, controleer dan je spam / ongewenste mappen, of vraag je beheerder om hulp.", "If it is not there ask your local administrator." : "Als het hier niet is, vraag dan de lokale beheerder", @@ -165,6 +170,7 @@ "Collaboratively edit office documents." : "Bewerk office documenten gezamelijk.", "Local document editing back-end used by the OnlyOffice app." : "Lokale back-end voor bestandsbewerking gebruikt bij de OnlyOffice-app.", "Forgot password?" : "Wachtwoord vergeten?", + "Log in with a device" : "Inloggen met een toestel", "Back" : "Terug", "Settings" : "Instellingen", "Could not load your contacts" : "Kon je contactpersonenen niet laden", diff --git a/core/l10n/tr.js b/core/l10n/tr.js index 7210e97e023..17c40213599 100644 --- a/core/l10n/tr.js +++ b/core/l10n/tr.js @@ -75,7 +75,7 @@ OC.L10N.register( "No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Henüz bir ön bellek yapılandırılmamış. Olabiliyorsa başarımı arttırmak için memcache ön bellek ayarlarını yapın. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz.", "No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Güvenlik nedeniyle kullanılması önemle önerilen rastgelelik kaynağı PHP tarafından bulunamıyor. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz.", "You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it." : "Şu anda PHP {version} sürümünü kullanıyorsunuz. Kullandığınız dağıtım desteklediği zaman PHP sürümünüzü güncelleyerek <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">PHP grubu tarafından sağlanan başarım ve güvenlik geliştirmelerinden</a> faydalanın.", - "Nextcloud 19 is the last release supporting PHP 7.2. Nextcloud 20 requires at least PHP 7.3." : "Nextcloud 19, PHP 7.2 destekleyecek olan son sürümdür. Nextcloud 20 en az PHP 7.3 ister.", + "Nextcloud 19 is the last release supporting PHP 7.2. Nextcloud 20 requires at least PHP 7.3." : "Nextcloud 19 PHP 7.2 sürümünü destekleyen son sürümdür. Nextcloud 20 sürümü için en az PHP 7.3 gereklidir.", "The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Ters vekil sunucu üst bilgi yapılandırmanız doğru değil ya da Nextcloud üzerine güvenilen bir vekil sunucudan erişiyorsunuz. Böyle değil ise bu bir güvenlik sorunudur ve bir saldırganın IP adresini Nextcolud sunucusuna farklı göstermesine izin verebilir. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz.", "Memcached is configured as distributed cache, but the wrong PHP module \"memcache\" is installed. \\OC\\Memcache\\Memcached only supports \"memcached\" and not \"memcache\". See the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki about both modules</a>." : "Memcached dağıtık bellek olarak yapılandırılmış ancak kurulmuş PHP \"memcache\" modülü yanlış. \\OC\\Memcache\\Memcached yalnız \"memcache\" modülünü değil \"memcached\" mdoülünü destekler. İki modül hakkında ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki sayfasına</a> bakabilirsiniz.", "Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">List of invalid files…</a> / <a href=\"{rescanEndpoint}\">Rescan…</a>)" : "Bazı dosyalar bütünlük denetiminden geçemedi. Bu sorunun çözümü ile ilgili bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz. (<a href=\"{codeIntegrityDownloadEndpoint}\">Geçersiz dosyaların listesi …</a> / <a href=\"{rescanEndpoint}\">Yeniden tara …</a>)", @@ -85,6 +85,8 @@ OC.L10N.register( "Your PHP does not have FreeType support, resulting in breakage of profile pictures and the settings interface." : "PHP kurulumunuzda FreeType desteği yok. Bu durum profil görsellerinin ve ayarlar bölümünün bozuk görüntülenmesine neden olur.", "Missing index \"{indexName}\" in table \"{tableName}\"." : "\"{tableName}\" tablosundaki \"{indexName}\" dizini eksik.", "The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running \"occ db:add-missing-indices\" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster." : "Veritabanında bazı dizinler eksik. Büyük tablolara dizinlerin eklenmesi uzun sürebildiğinden bu işlem otomatik olarak yapılmaz. Sunucunuz normal çalışırken eksik dizinleri el ile eklemek için \"occ db:add-missing-indices\" komutunu yürütün. Dizinler eklendikten sonra bu tablolar üzerindeki sorgular çok daha hızlı yürütülür.", + "Missing optional column \"{columnName}\" in table \"{tableName}\"." : "\"{tableName}\" tablosundaki isteğe bağlı \"{coumnName}\" sütunu eksik.", + "The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running \"occ db:add-missing-columns\" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability." : "Veritabanında bazı isteğe bağlı sütunlar eksik. Büyük tablolara sütunların eklenmesi uzun sürebildiğinden, sütunlar isteğe bağlı olduğunda bu işlem otomatik olarak yapılmaz. Sunucunuz normal çalışırken eksik sütunları el ile eklemek için \"occ db:add-missing-columns\" komutunu yürütün. Sütunlar eklendikten sonra bazı özelliklerin yanıtı ya da kullanımı daha iyileşebilir.", "This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them." : "Bu kopyada önerilen bazı PHP modülleri eksik. Daha iyi başarım ve uyumluluk için bu modüllerin kurulması önemle önerilir.", "Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Veritabanında büyük tamsayıya dönüştürülecek bazı sütunlar eksik. Sütun türlerini büyük tablolara dönüştürme işlemi uzun sürebileceğinden bu işlem otomatik olarak yapılmaz. Sunucunuz normal çalışırken bekleyen değişiklikleri el ile uygulamak için \"occ db:convert-filecache-bigint\" komutunu yürütün. Bu işlem yapılırken Nextcloud kopyası çevrimdışı olur. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgeler bölümüne</a> bakabilirsiniz.", "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend." : "Şu anda veritabanı olarak SQLite kullanılıyor. Daha büyük kurulumlar için farklı bir veritabanı arka ucuna geçmenizi öneriyoruz.", @@ -95,6 +97,7 @@ OC.L10N.register( "Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:" : "Bazı uygulama klasörlerinin sahipliği web sunucusunun kullandığından başka bir kullanıcıya ait. Bu durum, uygulamalar el ile kurulduğunda ortaya çıkabilir. Şu uygulama klasörlerinin izinlerini denetleyin:", "MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Veritabanı olarak MySQL kullanılır ancak 4 bayt uzunluğundaki karakterleri desteklemez. 4 bayt uzunluğundaki karaktelerin (emjo simgeleri gibi) dosya adları ya da yorumlarda sorun çıkmadan işlenebilmesi için MySQL üzerinde 4 bayt desteğinin etkinleştirilmesi önerilir. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgeler bölümüne</a> bakabilirsiniz.", "This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path." : "Bu kopya, birincil depolama olarak S3 tabanlı bir nesne deposu kullanıyor. Yüklenen dosyalar geçici olarak sunucuya kaydedildiğinden PHP geçici klasöründe 50 GB boş alan bulunması önerilir. Klasör yolu ve kullanılabilecek alan hakkındaki ayrıntılı bilgi almak için günlüklere bakabilirsiniz. Bu durumu düzeltmek için php.ini içindeki geçici klasör yolunu değiştirin ya da kullanılan geçici klasörde daha fazla yer açın.", + "You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Kopyanıza güvenli bir bağlantı üzerinden erişiyorsunuz. Bununla birlikte kopyanız güvenli olmayan adresler üretiyor. Bunun nedeni genellikle bir ters vekil sunucunun arkasında bulunmanız nedeniyle düzgün ayarlanmamış yapılandırma değişkenlerinin değiştirilmesinden kaynaklanır. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">bu konudaki bilgilere</a> bakabilirsiniz.", "Error occurred while checking server setup" : "Sunucu ayarları denetlenirken sorun çıktı", "Your data directory and files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root." : "Veri klasörünüz ve dosyalarınız İnternet üzerinden erişime açık olabilir. .htaccess dosyası çalışmıyor. Web sunucunuzu yapılandırarak veri klasörüne erişimi engellemeniz ya da veri klasörünü web sunucu kök klasörü dışına taşımanız önemle önerilir.", "The \"{header}\" HTTP header is not set to \"{expected}\". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly." : "\"{header}\" HTTP üst bilgisi \"{expected}\" şeklinde ayarlanmamış. Bu durum olası bir güvenlik ya da gizlilik riski oluşturduğundan bu ayarın belirtildiği gibi yapılması önerilir.", @@ -140,6 +143,9 @@ OC.L10N.register( "Wrong username or password." : "Kullanıcı adı ya da parola hatalı.", "User disabled" : "Kullanıcı devre dışı", "We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds." : "IP adresinizden yapılan birden çok geçersiz oturum açma girişimi algılandı. Bu nedenle oturum açmanız 30 saniye süreyle engellendi.", + "Your account is not setup for passwordless login." : "Hesabınız parola kullanmadan oturum açılacak şekilde ayarlanmamış.", + "Passwordless authentication is not supported in your browser." : "Parolasız kimlik doğrulama özelliği web tarayıcınız tarafından desteklenmiyor.", + "Passwordless authentication is only available over a secure connection." : "Parolasız kimlik doğrulama özelliği yalnız güvenli bir bağlantı üzerinden kullanılabilir.", "Reset password" : "Parolayı sıfırla", "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "Bu hesabın e-posta adresine bir parola sıfırlama iletisi gönderildi. Bir e-posta almazsanız gelen kutunuzdaki spam/gereksiz klasörlerine bakın ya da yardım almak için sistem yöneticinizle görüşün.", "If it is not there ask your local administrator." : "E-postayı göremiyorsanız yerel sistem yöneticinizle görüşün.", @@ -166,6 +172,7 @@ OC.L10N.register( "Collaboratively edit office documents." : "Ofis belgelerini işbirlikli düzenleme.", "Local document editing back-end used by the OnlyOffice app." : "OnlyOffice uygulaması ile yerel belge düzenleme altyapısı.", "Forgot password?" : "Parolamı unuttum", + "Log in with a device" : "Bir aygıt ile oturum açın", "Back" : "Geri", "Settings" : "Ayarlar", "Could not load your contacts" : "Kişileriniz yüklenemedi", diff --git a/core/l10n/tr.json b/core/l10n/tr.json index 0f676cb8a4a..415c9d9d04f 100644 --- a/core/l10n/tr.json +++ b/core/l10n/tr.json @@ -73,7 +73,7 @@ "No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Henüz bir ön bellek yapılandırılmamış. Olabiliyorsa başarımı arttırmak için memcache ön bellek ayarlarını yapın. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz.", "No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Güvenlik nedeniyle kullanılması önemle önerilen rastgelelik kaynağı PHP tarafından bulunamıyor. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz.", "You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it." : "Şu anda PHP {version} sürümünü kullanıyorsunuz. Kullandığınız dağıtım desteklediği zaman PHP sürümünüzü güncelleyerek <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">PHP grubu tarafından sağlanan başarım ve güvenlik geliştirmelerinden</a> faydalanın.", - "Nextcloud 19 is the last release supporting PHP 7.2. Nextcloud 20 requires at least PHP 7.3." : "Nextcloud 19, PHP 7.2 destekleyecek olan son sürümdür. Nextcloud 20 en az PHP 7.3 ister.", + "Nextcloud 19 is the last release supporting PHP 7.2. Nextcloud 20 requires at least PHP 7.3." : "Nextcloud 19 PHP 7.2 sürümünü destekleyen son sürümdür. Nextcloud 20 sürümü için en az PHP 7.3 gereklidir.", "The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Ters vekil sunucu üst bilgi yapılandırmanız doğru değil ya da Nextcloud üzerine güvenilen bir vekil sunucudan erişiyorsunuz. Böyle değil ise bu bir güvenlik sorunudur ve bir saldırganın IP adresini Nextcolud sunucusuna farklı göstermesine izin verebilir. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz.", "Memcached is configured as distributed cache, but the wrong PHP module \"memcache\" is installed. \\OC\\Memcache\\Memcached only supports \"memcached\" and not \"memcache\". See the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki about both modules</a>." : "Memcached dağıtık bellek olarak yapılandırılmış ancak kurulmuş PHP \"memcache\" modülü yanlış. \\OC\\Memcache\\Memcached yalnız \"memcache\" modülünü değil \"memcached\" mdoülünü destekler. İki modül hakkında ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki sayfasına</a> bakabilirsiniz.", "Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">List of invalid files…</a> / <a href=\"{rescanEndpoint}\">Rescan…</a>)" : "Bazı dosyalar bütünlük denetiminden geçemedi. Bu sorunun çözümü ile ilgili bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgelere</a> bakabilirsiniz. (<a href=\"{codeIntegrityDownloadEndpoint}\">Geçersiz dosyaların listesi …</a> / <a href=\"{rescanEndpoint}\">Yeniden tara …</a>)", @@ -83,6 +83,8 @@ "Your PHP does not have FreeType support, resulting in breakage of profile pictures and the settings interface." : "PHP kurulumunuzda FreeType desteği yok. Bu durum profil görsellerinin ve ayarlar bölümünün bozuk görüntülenmesine neden olur.", "Missing index \"{indexName}\" in table \"{tableName}\"." : "\"{tableName}\" tablosundaki \"{indexName}\" dizini eksik.", "The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running \"occ db:add-missing-indices\" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster." : "Veritabanında bazı dizinler eksik. Büyük tablolara dizinlerin eklenmesi uzun sürebildiğinden bu işlem otomatik olarak yapılmaz. Sunucunuz normal çalışırken eksik dizinleri el ile eklemek için \"occ db:add-missing-indices\" komutunu yürütün. Dizinler eklendikten sonra bu tablolar üzerindeki sorgular çok daha hızlı yürütülür.", + "Missing optional column \"{columnName}\" in table \"{tableName}\"." : "\"{tableName}\" tablosundaki isteğe bağlı \"{coumnName}\" sütunu eksik.", + "The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running \"occ db:add-missing-columns\" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability." : "Veritabanında bazı isteğe bağlı sütunlar eksik. Büyük tablolara sütunların eklenmesi uzun sürebildiğinden, sütunlar isteğe bağlı olduğunda bu işlem otomatik olarak yapılmaz. Sunucunuz normal çalışırken eksik sütunları el ile eklemek için \"occ db:add-missing-columns\" komutunu yürütün. Sütunlar eklendikten sonra bazı özelliklerin yanıtı ya da kullanımı daha iyileşebilir.", "This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them." : "Bu kopyada önerilen bazı PHP modülleri eksik. Daha iyi başarım ve uyumluluk için bu modüllerin kurulması önemle önerilir.", "Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Veritabanında büyük tamsayıya dönüştürülecek bazı sütunlar eksik. Sütun türlerini büyük tablolara dönüştürme işlemi uzun sürebileceğinden bu işlem otomatik olarak yapılmaz. Sunucunuz normal çalışırken bekleyen değişiklikleri el ile uygulamak için \"occ db:convert-filecache-bigint\" komutunu yürütün. Bu işlem yapılırken Nextcloud kopyası çevrimdışı olur. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgeler bölümüne</a> bakabilirsiniz.", "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend." : "Şu anda veritabanı olarak SQLite kullanılıyor. Daha büyük kurulumlar için farklı bir veritabanı arka ucuna geçmenizi öneriyoruz.", @@ -93,6 +95,7 @@ "Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:" : "Bazı uygulama klasörlerinin sahipliği web sunucusunun kullandığından başka bir kullanıcıya ait. Bu durum, uygulamalar el ile kurulduğunda ortaya çıkabilir. Şu uygulama klasörlerinin izinlerini denetleyin:", "MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Veritabanı olarak MySQL kullanılır ancak 4 bayt uzunluğundaki karakterleri desteklemez. 4 bayt uzunluğundaki karaktelerin (emjo simgeleri gibi) dosya adları ya da yorumlarda sorun çıkmadan işlenebilmesi için MySQL üzerinde 4 bayt desteğinin etkinleştirilmesi önerilir. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">belgeler bölümüne</a> bakabilirsiniz.", "This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path." : "Bu kopya, birincil depolama olarak S3 tabanlı bir nesne deposu kullanıyor. Yüklenen dosyalar geçici olarak sunucuya kaydedildiğinden PHP geçici klasöründe 50 GB boş alan bulunması önerilir. Klasör yolu ve kullanılabilecek alan hakkındaki ayrıntılı bilgi almak için günlüklere bakabilirsiniz. Bu durumu düzeltmek için php.ini içindeki geçici klasör yolunu değiştirin ya da kullanılan geçici klasörde daha fazla yer açın.", + "You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">the documentation page about this</a>." : "Kopyanıza güvenli bir bağlantı üzerinden erişiyorsunuz. Bununla birlikte kopyanız güvenli olmayan adresler üretiyor. Bunun nedeni genellikle bir ters vekil sunucunun arkasında bulunmanız nedeniyle düzgün ayarlanmamış yapılandırma değişkenlerinin değiştirilmesinden kaynaklanır. Ayrıntılı bilgi almak için <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">bu konudaki bilgilere</a> bakabilirsiniz.", "Error occurred while checking server setup" : "Sunucu ayarları denetlenirken sorun çıktı", "Your data directory and files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root." : "Veri klasörünüz ve dosyalarınız İnternet üzerinden erişime açık olabilir. .htaccess dosyası çalışmıyor. Web sunucunuzu yapılandırarak veri klasörüne erişimi engellemeniz ya da veri klasörünü web sunucu kök klasörü dışına taşımanız önemle önerilir.", "The \"{header}\" HTTP header is not set to \"{expected}\". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly." : "\"{header}\" HTTP üst bilgisi \"{expected}\" şeklinde ayarlanmamış. Bu durum olası bir güvenlik ya da gizlilik riski oluşturduğundan bu ayarın belirtildiği gibi yapılması önerilir.", @@ -138,6 +141,9 @@ "Wrong username or password." : "Kullanıcı adı ya da parola hatalı.", "User disabled" : "Kullanıcı devre dışı", "We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds." : "IP adresinizden yapılan birden çok geçersiz oturum açma girişimi algılandı. Bu nedenle oturum açmanız 30 saniye süreyle engellendi.", + "Your account is not setup for passwordless login." : "Hesabınız parola kullanmadan oturum açılacak şekilde ayarlanmamış.", + "Passwordless authentication is not supported in your browser." : "Parolasız kimlik doğrulama özelliği web tarayıcınız tarafından desteklenmiyor.", + "Passwordless authentication is only available over a secure connection." : "Parolasız kimlik doğrulama özelliği yalnız güvenli bir bağlantı üzerinden kullanılabilir.", "Reset password" : "Parolayı sıfırla", "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "Bu hesabın e-posta adresine bir parola sıfırlama iletisi gönderildi. Bir e-posta almazsanız gelen kutunuzdaki spam/gereksiz klasörlerine bakın ya da yardım almak için sistem yöneticinizle görüşün.", "If it is not there ask your local administrator." : "E-postayı göremiyorsanız yerel sistem yöneticinizle görüşün.", @@ -164,6 +170,7 @@ "Collaboratively edit office documents." : "Ofis belgelerini işbirlikli düzenleme.", "Local document editing back-end used by the OnlyOffice app." : "OnlyOffice uygulaması ile yerel belge düzenleme altyapısı.", "Forgot password?" : "Parolamı unuttum", + "Log in with a device" : "Bir aygıt ile oturum açın", "Back" : "Geri", "Settings" : "Ayarlar", "Could not load your contacts" : "Kişileriniz yüklenemedi", diff --git a/core/templates/403.php b/core/templates/403.php index 72d5d3e4ae6..d56a63bfe53 100644 --- a/core/templates/403.php +++ b/core/templates/403.php @@ -11,7 +11,7 @@ if(!isset($_)) {//standalone page is not supported anymore - redirect to / ?> <ul> <li class='error'> - <?php p($l->t( 'Access forbidden' )); ?><br> + <?php p($l->t('Access forbidden')); ?><br> <p class='hint'><?php if(isset($_['message'])) p($_['message'])?></p> </li> </ul> diff --git a/core/templates/installation.php b/core/templates/installation.php index 25052782e6f..d65d0adb1cb 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -35,35 +35,35 @@ script('core', [ </fieldset> <?php endif; ?> <fieldset id="adminaccount"> - <legend><?php print_unescaped($l->t( 'Create an <strong>admin account</strong>' )); ?></legend> + <legend><?php print_unescaped($l->t('Create an <strong>admin account</strong>')); ?></legend> <p class="grouptop"> <input type="text" name="adminlogin" id="adminlogin" - placeholder="<?php p($l->t( 'Username' )); ?>" + placeholder="<?php p($l->t('Username')); ?>" value="<?php p($_['adminlogin']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required> - <label for="adminlogin" class="infield"><?php p($l->t( 'Username' )); ?></label> + <label for="adminlogin" class="infield"><?php p($l->t('Username')); ?></label> </p> <p class="groupbottom"> <input type="password" name="adminpass" data-typetoggle="#show" id="adminpass" - placeholder="<?php p($l->t( 'Password' )); ?>" + placeholder="<?php p($l->t('Password')); ?>" value="<?php p($_['adminpass']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off" required> - <label for="adminpass" class="infield"><?php p($l->t( 'Password' )); ?></label> + <label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label> <input type="checkbox" id="show" class="hidden-visually" name="show"> - <label for="show" class="hidden-visually"><?php p($l->t( 'Show password')); ?></label> + <label for="show" class="hidden-visually"><?php p($l->t('Show password')); ?></label> </p> </fieldset> - <?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?> + <?php if(!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?> <fieldset id="advancedHeader"> - <legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t( 'Storage & database' )); ?><img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend> + <legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t('Storage & database')); ?><img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend> </fieldset> <?php endif; ?> - <?php if(!$_['directoryIsSet'] OR count($_['errors']) > 0): ?> + <?php if(!$_['directoryIsSet'] or count($_['errors']) > 0): ?> <fieldset id="datadirField"> <div id="datadirContent"> - <label for="directory"><?php p($l->t( 'Data folder' )); ?></label> + <label for="directory"><?php p($l->t('Data folder')); ?></label> <input type="text" name="directory" id="directory" placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>" value="<?php p($_['directory']); ?>" @@ -72,19 +72,19 @@ script('core', [ </fieldset> <?php endif; ?> - <?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?> + <?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?> <fieldset id='databaseBackend'> <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) - $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?> - <legend><?php p($l->t( 'Configure the database' )); ?></legend> + $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite?> + <legend><?php p($l->t('Configure the database')); ?></legend> <div id="selectDbType"> <?php foreach($_['databases'] as $type => $label): ?> <?php if(count($_['databases']) === 1): ?> <p class="info"> - <?php p($l->t( 'Only %s is available.', [$label] )); ?> - <?php p($l->t( 'Install and activate additional PHP modules to choose other database types.' )); ?><br> + <?php p($l->t('Only %s is available.', [$label])); ?> + <?php p($l->t('Install and activate additional PHP modules to choose other database types.')); ?><br> <a href="<?php print_unescaped(link_to_docs('admin-source_install')); ?>" target="_blank" rel="noreferrer noopener"> - <?php p($l->t( 'For more details check out the documentation.' )); ?> ↗</a> + <?php p($l->t('For more details check out the documentation.')); ?> ↗</a> </p> <input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>"> <?php else: ?> @@ -100,25 +100,25 @@ script('core', [ <fieldset id='databaseField'> <div id="use_other_db"> <p class="grouptop"> - <label for="dbuser" class="infield"><?php p($l->t( 'Database user' )); ?></label> + <label for="dbuser" class="infield"><?php p($l->t('Database user')); ?></label> <input type="text" name="dbuser" id="dbuser" - placeholder="<?php p($l->t( 'Database user' )); ?>" + placeholder="<?php p($l->t('Database user')); ?>" value="<?php p($_['dbuser']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off"> </p> <p class="groupmiddle"> <input type="password" name="dbpass" id="dbpass" data-typetoggle="#dbpassword-toggle" - placeholder="<?php p($l->t( 'Database password' )); ?>" + placeholder="<?php p($l->t('Database password')); ?>" value="<?php p($_['dbpass']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off"> - <label for="dbpass" class="infield"><?php p($l->t( 'Database password' )); ?></label> + <label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label> <input type="checkbox" id="dbpassword-toggle" class="hidden-visually" name="dbpassword-toggle"> <label for="dbpassword-toggle"></label> </p> <p class="groupmiddle"> - <label for="dbname" class="infield"><?php p($l->t( 'Database name' )); ?></label> + <label for="dbname" class="infield"><?php p($l->t('Database name')); ?></label> <input type="text" name="dbname" id="dbname" - placeholder="<?php p($l->t( 'Database name' )); ?>" + placeholder="<?php p($l->t('Database name')); ?>" value="<?php p($_['dbname']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off" pattern="[0-9a-zA-Z$_-]+"> @@ -126,30 +126,30 @@ script('core', [ <?php if($_['hasOracle']): ?> <div id="use_oracle_db"> <p class="groupmiddle"> - <label for="dbtablespace" class="infield"><?php p($l->t( 'Database tablespace' )); ?></label> + <label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label> <input type="text" name="dbtablespace" id="dbtablespace" - placeholder="<?php p($l->t( 'Database tablespace' )); ?>" + placeholder="<?php p($l->t('Database tablespace')); ?>" value="<?php p($_['dbtablespace']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off"> </p> </div> <?php endif; ?> <p class="groupbottom"> - <label for="dbhost" class="infield"><?php p($l->t( 'Database host' )); ?></label> + <label for="dbhost" class="infield"><?php p($l->t('Database host')); ?></label> <input type="text" name="dbhost" id="dbhost" - placeholder="<?php p($l->t( 'Database host' )); ?>" + placeholder="<?php p($l->t('Database host')); ?>" value="<?php p($_['dbhost']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off"> </p> <p class="info"> - <?php p($l->t( 'Please specify the port number along with the host name (e.g., localhost:5432).' )); ?> + <?php p($l->t('Please specify the port number along with the host name (e.g., localhost:5432).')); ?> </p> </div> </fieldset> <?php endif; ?> <?php endif; ?> - <?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?> + <?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?> <fieldset id="sqliteInformation" class="warning"> <legend><?php p($l->t('Performance warning'));?></legend> <p><?php p($l->t('You chose SQLite as database.'));?></p> @@ -162,15 +162,15 @@ script('core', [ <p class="info"> <input type="checkbox" id="install-recommended-apps" name="install-recommended-apps" class="checkbox checkbox--white" checked> <label for="install-recommended-apps"> - <?php p($l->t( 'Install recommended apps' )); ?> - <span><?php p($l->t( 'Calendar, Contacts, Talk, Mail & OnlyOffice' )); ?></span> + <?php p($l->t('Install recommended apps')); ?> + <span><?php p($l->t('Calendar, Contacts, Talk, Mail & OnlyOffice')); ?></span> </label> </p> </fieldset> <div class="icon-loading-dark float-spinner"> </div> - <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" data-finishing="<?php p($l->t( 'Finishing …' )); ?>"></div> + <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t('Finish setup')); ?>" data-finishing="<?php p($l->t('Finishing …')); ?>"></div> <p class="info"> <span class="icon-info-white"></span> diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 8ba6b0a42b3..6bb6e1c74bd 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -30,7 +30,7 @@ <?php }?> <div class="wrapper"> <div class="v-align"> - <?php if ($_['bodyid'] === 'body-login' ): ?> + <?php if ($_['bodyid'] === 'body-login'): ?> <header role="banner"> <div id="header"> <div class="logo"> diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 7712992c9bf..5dbc95e1179 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -84,7 +84,7 @@ <?php foreach($_['navigation'] as $entry): ?> <li data-id="<?php p($entry['id']); ?>"> <a href="<?php print_unescaped($entry['href']); ?>" - <?php if( $entry['active'] ): ?> class="active"<?php endif; ?> + <?php if($entry['active']): ?> class="active"<?php endif; ?> aria-label="<?php p($entry['name']); ?>"> <svg width="16" height="16" viewBox="0 0 16 16" alt=""> <defs><filter id="invertMenuMore-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs> @@ -139,7 +139,7 @@ <?php foreach($_['settingsnavigation'] as $entry):?> <li data-id="<?php p($entry['id']); ?>"> <a href="<?php print_unescaped($entry['href']); ?>" - <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>> + <?php if($entry["active"]): ?> class="active"<?php endif; ?>> <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>"> <?php p($entry['name']) ?> </a> diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php index 890e0b186d9..5946eb78400 100644 --- a/core/templates/loginflow/authpicker.php +++ b/core/templates/loginflow/authpicker.php @@ -31,9 +31,9 @@ $urlGenerator = $_['urlGenerator']; <h2><?php p($l->t('Connect to your account')) ?></h2> <p class="info"> <?php print_unescaped($l->t('Please log in before granting %1$s access to your %2$s account.', [ - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?> </p> <br/> diff --git a/core/templates/loginflow/grant.php b/core/templates/loginflow/grant.php index 2321d3714f3..0f1b9235a89 100644 --- a/core/templates/loginflow/grant.php +++ b/core/templates/loginflow/grant.php @@ -31,9 +31,9 @@ $urlGenerator = $_['urlGenerator']; <h2><?php p($l->t('Account access')) ?></h2> <p class="info"> <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [ - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?> </p> <br/> diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php index 79462eec8dc..ccc9162bbc3 100644 --- a/core/templates/loginflowv2/authpicker.php +++ b/core/templates/loginflowv2/authpicker.php @@ -30,9 +30,9 @@ $urlGenerator = $_['urlGenerator']; <h2><?php p($l->t('Connect to your account')) ?></h2> <p class="info"> <?php print_unescaped($l->t('Please log in before granting %1$s access to your %2$s account.', [ - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?> </p> <br/> diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php index c8ea22dca8b..b036d33ad7c 100644 --- a/core/templates/loginflowv2/grant.php +++ b/core/templates/loginflowv2/grant.php @@ -31,9 +31,9 @@ $urlGenerator = $_['urlGenerator']; <h2><?php p($l->t('Account access')) ?></h2> <p class="info"> <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [ - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?> </p> <br/> diff --git a/core/templates/update.admin.php b/core/templates/update.admin.php index 4a010c025be..c104e0530c3 100644 --- a/core/templates/update.admin.php +++ b/core/templates/update.admin.php @@ -49,7 +49,7 @@ <p id="update-progress-message-error" class="hidden"></p> <ul id="update-progress-message-warnings" class="hidden"></ul> <p id="update-progress-message"></p> - <a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <span class="icon-caret-white"></span></a> + <a class="update-show-detailed"><?php p($l->t('Detailed logs')); ?> <span class="icon-caret-white"></span></a> <div id="update-progress-detailed" class="hidden"></div> </div> </div> diff --git a/core/templates/update.use-cli.php b/core/templates/update.use-cli.php index 30f4169a1db..8cd7e37ffce 100644 --- a/core/templates/update.use-cli.php +++ b/core/templates/update.use-cli.php @@ -14,8 +14,8 @@ <?php if ($_['tooBig']) { ?> <div class="warning updateAnyways"> - <p><?php p($l->t('I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure.' )); ?></p> - <a href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis" class="button updateAnywaysButton"><?php p($l->t('Upgrade via web on my own risk' )); ?></a> + <p><?php p($l->t('I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure.')); ?></p> + <a href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis" class="button updateAnywaysButton"><?php p($l->t('Upgrade via web on my own risk')); ?></a> </div> <?php } ?> diff --git a/lib/base.php b/lib/base.php index 6dc5948d53c..a86dccd0822 100644 --- a/lib/base.php +++ b/lib/base.php @@ -265,7 +265,7 @@ class OC { $l->t('Cannot write into "config" directory!'), $l->t('This can usually be fixed by giving the webserver write access to the config directory.') . '. ' . $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s', - [ $urlGenerator->linkToDocs('admin-config') ] ), + [ $urlGenerator->linkToDocs('admin-config') ]), 503 ); } @@ -863,7 +863,7 @@ class OC { private static function registerAppRestrictionsHooks() { $groupManager = self::$server->query(\OCP\IGroupManager::class); - $groupManager->listen ('\OC\Group', 'postDelete', function (\OCP\IGroup $group) { + $groupManager->listen('\OC\Group', 'postDelete', function (\OCP\IGroup $group) { $appManager = self::$server->getAppManager(); $apps = $appManager->getEnabledAppsForGroup($group); foreach ($apps as $appId) { diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js index 57a848bfe77..630642a52d4 100644 --- a/lib/l10n/nl.js +++ b/lib/l10n/nl.js @@ -5,6 +5,7 @@ OC.L10N.register( "This can usually be fixed by giving the webserver write access to the config directory" : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Of, als je liever config.php alleen-lezen wilt houden, stel de optie \"config_is_read_only\" in op true.", "See %s" : "Zie %s", + "This can usually be fixed by giving the webserver write access to the config directory." : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven.", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Of, als je liever config.php Alleen-lezen houdt, stel de optie \"config_is_read_only\" in op true. Zie %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "De bestanden van app %1$szijn niet correct vervangen. Zorg ervoor dat de versie compatible is met de server.", "Sample configuration detected" : "Voorbeeld configuratie gevonden", @@ -186,6 +187,7 @@ OC.L10N.register( "Cannot write into \"config\" directory" : "Kan niet schrijven naar de \"config\" directory", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dit kan opgelost worden door de config map op de webserver schrijf rechten te geven. See %s", "Cannot write into \"apps\" directory" : "Kan niet schrijven naar de \"apps\" directory", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de appstore te deactiveren in het configuratie bestand.", "Cannot create \"data\" directory" : "\"data\" map kan niet worden aangemaakt", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dit kan hersteld worden door de root map schrijf rechten te geven op de webserver. Zie %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rechten kunnen worden hersteld door de root map op de webserver schrijf toegang te geven. Zie %s.", diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json index 0b66deefc33..0d613dad17f 100644 --- a/lib/l10n/nl.json +++ b/lib/l10n/nl.json @@ -3,6 +3,7 @@ "This can usually be fixed by giving the webserver write access to the config directory" : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Of, als je liever config.php alleen-lezen wilt houden, stel de optie \"config_is_read_only\" in op true.", "See %s" : "Zie %s", + "This can usually be fixed by giving the webserver write access to the config directory." : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven.", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Of, als je liever config.php Alleen-lezen houdt, stel de optie \"config_is_read_only\" in op true. Zie %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "De bestanden van app %1$szijn niet correct vervangen. Zorg ervoor dat de versie compatible is met de server.", "Sample configuration detected" : "Voorbeeld configuratie gevonden", @@ -184,6 +185,7 @@ "Cannot write into \"config\" directory" : "Kan niet schrijven naar de \"config\" directory", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dit kan opgelost worden door de config map op de webserver schrijf rechten te geven. See %s", "Cannot write into \"apps\" directory" : "Kan niet schrijven naar de \"apps\" directory", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de appstore te deactiveren in het configuratie bestand.", "Cannot create \"data\" directory" : "\"data\" map kan niet worden aangemaakt", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dit kan hersteld worden door de root map schrijf rechten te geven op de webserver. Zie %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rechten kunnen worden hersteld door de root map op de webserver schrijf toegang te geven. Zie %s.", diff --git a/lib/l10n/tr.js b/lib/l10n/tr.js index e9a050a0dc7..1746909dad7 100644 --- a/lib/l10n/tr.js +++ b/lib/l10n/tr.js @@ -5,6 +5,7 @@ OC.L10N.register( "This can usually be fixed by giving the webserver write access to the config directory" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", "See %s" : "Şuraya bakın: %s", + "This can usually be fixed by giving the webserver write access to the config directory." : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir.", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın. %s bölümüne bakabilirsiniz", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "%1$s uygulamasının dosyaları doğru şekilde değiştirilmedi. Sunucu ile uyumlu dosyaların yüklü olduğundan emin olun.", "Sample configuration detected" : "Örnek yapılandırma algılandı", @@ -186,6 +187,7 @@ OC.L10N.register( "Cannot write into \"config\" directory" : "\"config\" klasörüne yazılamıyor", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir. %s bölümüne bakın", "Cannot write into \"apps\" directory" : "\"apps\" klasörüne yazılamıyor", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından uygulama mağazasını devre dışı bırakılarak çözülebilir.", "Cannot create \"data\" directory" : "\"data\" klasörü oluşturulamadı", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Bu sorun genellikle, web sunucusuna kök klasöre yazma izni verilerek çözülebilir. %s bölümüne bakın", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "İzinler genellikle, web sunucusuna kök klasöre yazma izni verilerek düzeltilebilir. %s bölümüne bakın.", diff --git a/lib/l10n/tr.json b/lib/l10n/tr.json index 6f90a7f5591..d39d456185d 100644 --- a/lib/l10n/tr.json +++ b/lib/l10n/tr.json @@ -3,6 +3,7 @@ "This can usually be fixed by giving the webserver write access to the config directory" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", "See %s" : "Şuraya bakın: %s", + "This can usually be fixed by giving the webserver write access to the config directory." : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir.", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın. %s bölümüne bakabilirsiniz", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "%1$s uygulamasının dosyaları doğru şekilde değiştirilmedi. Sunucu ile uyumlu dosyaların yüklü olduğundan emin olun.", "Sample configuration detected" : "Örnek yapılandırma algılandı", @@ -184,6 +185,7 @@ "Cannot write into \"config\" directory" : "\"config\" klasörüne yazılamıyor", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir. %s bölümüne bakın", "Cannot write into \"apps\" directory" : "\"apps\" klasörüne yazılamıyor", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından uygulama mağazasını devre dışı bırakılarak çözülebilir.", "Cannot create \"data\" directory" : "\"data\" klasörü oluşturulamadı", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Bu sorun genellikle, web sunucusuna kök klasöre yazma izni verilerek çözülebilir. %s bölümüne bakın", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "İzinler genellikle, web sunucusuna kök klasöre yazma izni verilerek düzeltilebilir. %s bölümüne bakın.", diff --git a/lib/private/Accounts/Account.php b/lib/private/Accounts/Account.php index 3702458ec6b..446bb01d860 100644 --- a/lib/private/Accounts/Account.php +++ b/lib/private/Accounts/Account.php @@ -60,7 +60,7 @@ class Account implements IAccount { } public function getFilteredProperties(string $scope = null, string $verified = null): array { - return \array_filter($this->properties, function(IAccountProperty $obj) use ($scope, $verified){ + return \array_filter($this->properties, function (IAccountProperty $obj) use ($scope, $verified) { if ($scope !== null && $scope !== $obj->getScope()) { return false; } diff --git a/lib/private/Activity/Event.php b/lib/private/Activity/Event.php index dcd854b9fe0..85f896622b9 100644 --- a/lib/private/Activity/Event.php +++ b/lib/private/Activity/Event.php @@ -524,10 +524,10 @@ class Event implements IEvent { $this->getTimestamp() !== 0 /** * Disabled for BC with old activities - && - $this->getObjectType() !== '' - && - $this->getObjectId() !== 0 + * && + * $this->getObjectType() !== '' + * && + * $this->getObjectId() !== 0 */ ; } diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php index c1b09300033..fc1c32a475f 100644 --- a/lib/private/Activity/Manager.php +++ b/lib/private/Activity/Manager.php @@ -28,7 +28,6 @@ namespace OC\Activity; - use OCP\Activity\IConsumer; use OCP\Activity\IEvent; use OCP\Activity\IFilter; diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index a41230e4a97..e62b000938b 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -31,6 +31,7 @@ */ namespace OC; + use OC\Cache\CappedMemoryCache; use OCP\IDBConnection; use OCP\PreConditionNotMetException; diff --git a/lib/private/App/CodeChecker/CodeChecker.php b/lib/private/App/CodeChecker/CodeChecker.php index 53fee7482ef..60276d5bfcc 100644 --- a/lib/private/App/CodeChecker/CodeChecker.php +++ b/lib/private/App/CodeChecker/CodeChecker.php @@ -89,12 +89,12 @@ class CodeChecker extends BasicEmitter { $excludedDirectories[] = 'lists'; } - $excludes = array_map(function($item) use ($folder) { + $excludes = array_map(function ($item) use ($folder) { return $folder . '/' . $item; }, $excludedDirectories); $iterator = new RecursiveDirectoryIterator($folder, RecursiveDirectoryIterator::SKIP_DOTS); - $iterator = new RecursiveCallbackFilterIterator($iterator, function($item) use ($excludes){ + $iterator = new RecursiveCallbackFilterIterator($iterator, function ($item) use ($excludes) { /** @var SplFileInfo $item */ foreach($excludes as $exclude) { if (substr($item->getPath(), 0, strlen($exclude)) === $exclude) { diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index e562870aa7f..f922033bdd1 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -284,7 +284,7 @@ class AppConfig implements IAppConfig { return $this->getAppValues($app); } else { $appIds = $this->getApps(); - $values = array_map(function($appId) use ($key) { + $values = array_map(function ($appId) use ($key) { return isset($this->cache[$appId][$key]) ? $this->cache[$appId][$key] : null; }, $appIds); $result = array_combine($appIds, $values); diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php index 2cbe623bb27..f7defda487e 100644 --- a/lib/private/AppFramework/App.php +++ b/lib/private/AppFramework/App.php @@ -199,7 +199,7 @@ class App { * @param DIContainer $container an instance of a pimple container. */ public static function part(string $controllerName, string $methodName, array $urlParams, - DIContainer $container){ + DIContainer $container) { $container['urlParams'] = $urlParams; $controller = $container[$controllerName]; diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index 6f4a48d8907..14898fadf95 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -83,7 +83,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { * @param array $urlParams * @param ServerContainer|null $server */ - public function __construct($appName, $urlParams = [], ServerContainer $server = null){ + public function __construct($appName, $urlParams = [], ServerContainer $server = null) { parent::__construct(); $this['AppName'] = $appName; $this['urlParams'] = $urlParams; @@ -105,11 +105,11 @@ class DIContainer extends SimpleContainer implements IAppContainer { /** * Core services */ - $this->registerService(IOutput::class, function(){ + $this->registerService(IOutput::class, function () { return new Output($this->getServer()->getWebRoot()); }); - $this->registerService(Folder::class, function() { + $this->registerService(Folder::class, function () { return $this->getServer()->getUserFolder(); }); @@ -117,7 +117,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { return $this->getServer()->getAppDataDir($c->query('AppName')); }); - $this->registerService(IL10N::class, function($c) { + $this->registerService(IL10N::class, function ($c) { return $this->getServer()->getL10N($c->query('AppName')); }); @@ -156,14 +156,14 @@ class DIContainer extends SimpleContainer implements IAppContainer { return $c->query(OC\GlobalScale\Config::class); }); - $this->registerService('Protocol', function($c){ + $this->registerService('Protocol', function ($c) { /** @var \OC\Server $server */ $server = $c->query('ServerContainer'); $protocol = $server->getRequest()->getHttpProtocol(); return new Http($_SERVER, $protocol); }); - $this->registerService('Dispatcher', function($c) { + $this->registerService('Dispatcher', function ($c) { return new Dispatcher( $c['Protocol'], $c['MiddlewareDispatcher'], @@ -182,7 +182,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { /** * Middleware */ - $this->registerService('MiddlewareDispatcher', function(SimpleContainer $c) { + $this->registerService('MiddlewareDispatcher', function (SimpleContainer $c) { $server = $this->getServer(); $dispatcher = new MiddlewareDispatcher(); @@ -376,7 +376,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { * @param string $serviceName e.g. 'OCA\Files\Capabilities' */ public function registerCapability($serviceName) { - $this->query('OC\CapabilitiesManager')->registerCapability(function() use ($serviceName) { + $this->query('OC\CapabilitiesManager')->registerCapability(function () use ($serviceName) { return $this->query($serviceName); }); } diff --git a/lib/private/AppFramework/Http.php b/lib/private/AppFramework/Http.php index 56503ce9595..4b08812b6cf 100644 --- a/lib/private/AppFramework/Http.php +++ b/lib/private/AppFramework/Http.php @@ -117,8 +117,8 @@ class Http extends BaseHttp { * @param string $ETag the etag * @return string */ - public function getStatusHeader($status, \DateTime $lastModified=null, - $ETag=null) { + public function getStatusHeader($status, \DateTime $lastModified=null, + $ETag=null) { if(!is_null($lastModified)) { $lastModified = $lastModified->format(\DateTime::RFC2822); @@ -131,7 +131,7 @@ class Http extends BaseHttp { || (isset($this->server['HTTP_IF_MODIFIED_SINCE']) - && trim($this->server['HTTP_IF_MODIFIED_SINCE']) === + && trim($this->server['HTTP_IF_MODIFIED_SINCE']) === $lastModified)) { $status = self::STATUS_NOT_MODIFIED; @@ -140,13 +140,13 @@ class Http extends BaseHttp { // we have one change currently for the http 1.0 header that differs // from 1.1: STATUS_TEMPORARY_REDIRECT should be STATUS_FOUND // if this differs any more, we want to create childclasses for this - if($status === self::STATUS_TEMPORARY_REDIRECT + if($status === self::STATUS_TEMPORARY_REDIRECT && $this->protocolVersion === 'HTTP/1.0') { $status = self::STATUS_FOUND; } - return $this->protocolVersion . ' ' . $status . ' ' . + return $this->protocolVersion . ' ' . $status . ' ' . $this->headers[$status]; } diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 6554250902d..9b8c0690ba6 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -187,25 +187,25 @@ class Request implements \ArrayAccess, \Countable, IRequest { } /** - * ArrayAccess methods - * - * Gives access to the combined GET, POST and urlParams arrays - * - * Examples: - * - * $var = $request['myvar']; - * - * or - * - * if(!isset($request['myvar']) { - * // Do something - * } - * - * $request['myvar'] = 'something'; // This throws an exception. - * - * @param string $offset The key to lookup - * @return boolean - */ + * ArrayAccess methods + * + * Gives access to the combined GET, POST and urlParams arrays + * + * Examples: + * + * $var = $request['myvar']; + * + * or + * + * if(!isset($request['myvar']) { + * // Do something + * } + * + * $request['myvar'] = 'something'; // This throws an exception. + * + * @param string $offset The key to lookup + * @return boolean + */ public function offsetExists($offset): bool { return isset($this->items['parameters'][$offset]); } @@ -248,20 +248,20 @@ class Request implements \ArrayAccess, \Countable, IRequest { } /** - * Access request variables by method and name. - * Examples: - * - * $request->post['myvar']; // Only look for POST variables - * $request->myvar; or $request->{'myvar'}; or $request->{$myvar} - * Looks in the combined GET, POST and urlParams array. - * - * If you access e.g. ->post but the current HTTP request method - * is GET a \LogicException will be thrown. - * - * @param string $name The key to look for. - * @throws \LogicException - * @return mixed|null - */ + * Access request variables by method and name. + * Examples: + * + * $request->post['myvar']; // Only look for POST variables + * $request->myvar; or $request->{'myvar'}; or $request->{$myvar} + * Looks in the combined GET, POST and urlParams array. + * + * If you access e.g. ->post but the current HTTP request method + * is GET a \LogicException will be thrown. + * + * @param string $name The key to look for. + * @throws \LogicException + * @return mixed|null + */ public function __get($name) { switch($name) { case 'put': @@ -327,8 +327,8 @@ class Request implements \ArrayAccess, \Countable, IRequest { // There's a few headers that seem to end up in the top-level // server array. switch ($name) { - case 'CONTENT_TYPE' : - case 'CONTENT_LENGTH' : + case 'CONTENT_TYPE': + case 'CONTENT_LENGTH': case 'REMOTE_ADDR': if (isset($this->server[$name])) { return $this->server[$name]; @@ -811,7 +811,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { $encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']); switch($encoding) { - case 'ISO-8859-1' : + case 'ISO-8859-1': $pathInfo = utf8_encode($pathInfo); } // end copy diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php index 10cb9249a51..47b9a62af81 100644 --- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php +++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php @@ -55,7 +55,7 @@ class MiddlewareDispatcher { /** * Constructor */ - public function __construct(){ + public function __construct() { $this->middlewares = []; $this->middlewareCounter = 0; } @@ -65,7 +65,7 @@ class MiddlewareDispatcher { * Adds a new middleware * @param Middleware $middleWare the middleware which will be added */ - public function registerMiddleware(Middleware $middleWare){ + public function registerMiddleware(Middleware $middleWare) { $this->middlewares[] = $middleWare; } @@ -87,7 +87,7 @@ class MiddlewareDispatcher { * @param string $methodName the name of the method that will be called on * the controller */ - public function beforeController(Controller $controller, string $methodName){ + public function beforeController(Controller $controller, string $methodName) { // we need to count so that we know which middlewares we have to ask in // case there is an exception $middlewareCount = \count($this->middlewares); diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php index d52163246c7..fe0f58c1ab5 100644 --- a/lib/private/AppFramework/Middleware/OCSMiddleware.php +++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php @@ -101,7 +101,7 @@ class OCSMiddleware extends Middleware { */ if ($controller instanceof OCSController && !($response instanceof BaseResponse)) { if ($response->getStatus() === Http::STATUS_UNAUTHORIZED || - $response->getStatus() === Http::STATUS_FORBIDDEN) { + $response->getStatus() === Http::STATUS_FORBIDDEN) { $message = ''; if ($response instanceof JSONResponse) { diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php index 1883756954b..acfbab25ed4 100644 --- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php @@ -80,7 +80,7 @@ class CORSMiddleware extends Middleware { * @throws SecurityException * @since 6.0.0 */ - public function beforeController($controller, $methodName){ + public function beforeController($controller, $methodName) { // ensure that @CORS annotated API routes are not used in conjunction // with session authentication since this enables CSRF attack vectors if ($this->reflector->hasAnnotation('CORS') && @@ -110,7 +110,7 @@ class CORSMiddleware extends Middleware { * @return Response a Response object * @throws SecurityException */ - public function afterController($controller, $methodName, Response $response){ + public function afterController($controller, $methodName, Response $response) { // only react if its a CORS request and if the request sends origin and if(isset($this->request->server['HTTP_ORIGIN']) && @@ -143,7 +143,7 @@ class CORSMiddleware extends Middleware { * @throws \Exception the passed in exception if it can't handle it * @return Response a Response object or null in case that the exception could not be handled */ - public function afterException($controller, $methodName, \Exception $exception){ + public function afterException($controller, $methodName, \Exception $exception) { if($exception instanceof SecurityException){ $response = new JSONResponse(['message' => $exception->getMessage()]); if($exception->getCode() !== 0) { diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index 16f1fb35a82..0ae2d37b374 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -212,7 +212,7 @@ class SecurityMiddleware extends Middleware { if($exception instanceof SecurityException) { if($exception instanceof StrictCookieMissingException) { return new RedirectResponse(\OC::$WEBROOT); - } + } if (stripos($this->request->getHeader('Accept'),'html') === false) { $response = new JSONResponse( ['message' => $exception->getMessage()], diff --git a/lib/private/AppFramework/Middleware/SessionMiddleware.php b/lib/private/AppFramework/Middleware/SessionMiddleware.php index 1f4ba123104..d2787dde745 100644 --- a/lib/private/AppFramework/Middleware/SessionMiddleware.php +++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php @@ -62,7 +62,7 @@ class SessionMiddleware extends Middleware { * @param Response $response * @return Response */ - public function afterController($controller, $methodName, Response $response){ + public function afterController($controller, $methodName, Response $response) { $useSession = $this->reflector->hasAnnotation('UseSession'); if ($useSession) { $this->session->close(); diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php index ac7953e0457..31f1892772f 100644 --- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php +++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php @@ -46,7 +46,7 @@ class ControllerMethodReflector implements IControllerMethodReflector { * @param object $object an object or classname * @param string $method the method which we want to inspect */ - public function reflect($object, string $method){ + public function reflect($object, string $method) { $reflection = new \ReflectionMethod($object, $method); $docs = $reflection->getDocComment(); diff --git a/lib/private/Authentication/Events/LoginFailed.php b/lib/private/Authentication/Events/LoginFailed.php index cc5a547fdef..6e32e419871 100644 --- a/lib/private/Authentication/Events/LoginFailed.php +++ b/lib/private/Authentication/Events/LoginFailed.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/private/Authentication/Listeners/LoginFailedListener.php b/lib/private/Authentication/Listeners/LoginFailedListener.php index d4f46d9547f..8086194eab3 100644 --- a/lib/private/Authentication/Listeners/LoginFailedListener.php +++ b/lib/private/Authentication/Listeners/LoginFailedListener.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/private/Authentication/Login/LoggedInCheckCommand.php b/lib/private/Authentication/Login/LoggedInCheckCommand.php index 78f27bfa937..5701f2970a8 100644 --- a/lib/private/Authentication/Login/LoggedInCheckCommand.php +++ b/lib/private/Authentication/Login/LoggedInCheckCommand.php @@ -27,11 +27,9 @@ namespace OC\Authentication\Login; use OC\Authentication\Events\LoginFailed; use OC\Core\Controller\LoginController; -use OCP\Authentication\Events\LoginFailedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\ILogger; use OCP\IUserManager; -use OCP\Util; class LoggedInCheckCommand extends ALoginCommand { diff --git a/lib/private/Authentication/Login/WebAuthnChain.php b/lib/private/Authentication/Login/WebAuthnChain.php index dfc6943e853..ff6dd23e1ef 100644 --- a/lib/private/Authentication/Login/WebAuthnChain.php +++ b/lib/private/Authentication/Login/WebAuthnChain.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/private/Authentication/Login/WebAuthnLoginCommand.php b/lib/private/Authentication/Login/WebAuthnLoginCommand.php index e477a243c56..d2f613c59be 100644 --- a/lib/private/Authentication/Login/WebAuthnLoginCommand.php +++ b/lib/private/Authentication/Login/WebAuthnLoginCommand.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/private/Authentication/Token/INamedToken.php b/lib/private/Authentication/Token/INamedToken.php index 99eb338e8d4..30755879963 100644 --- a/lib/private/Authentication/Token/INamedToken.php +++ b/lib/private/Authentication/Token/INamedToken.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Authentication\Token; - interface INamedToken extends IToken { /** * Set token name diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index 170048f451b..40e6e4082e1 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -140,7 +140,7 @@ class Manager { */ public function getLoginSetupProviders(IUser $user): array { $providers = $this->providerLoader->getProviders($user); - return array_filter($providers, function(IProvider $provider) { + return array_filter($providers, function (IProvider $provider) { return ($provider instanceof IActivatableAtLogin); }); } @@ -198,8 +198,8 @@ class Manager { $missing[] = $providerId; $this->logger->alert("two-factor auth provider '$providerId' failed to load", [ - 'app' => 'core', - ]); + 'app' => 'core', + ]); } } diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php index a1577de7440..5b5ac60fd82 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php @@ -72,7 +72,7 @@ class ProviderSet { * @return IProvider[] */ public function getPrimaryProviders(): array { - return array_filter($this->providers, function(IProvider $provider) { + return array_filter($this->providers, function (IProvider $provider) { return !($provider instanceof BackupCodesProvider); }); } diff --git a/lib/private/Authentication/WebAuthn/CredentialRepository.php b/lib/private/Authentication/WebAuthn/CredentialRepository.php index c6f8cdfd888..c57af15d2e4 100644 --- a/lib/private/Authentication/WebAuthn/CredentialRepository.php +++ b/lib/private/Authentication/WebAuthn/CredentialRepository.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php index 3b0413aef00..0b27c78efbd 100644 --- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php +++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> @@ -27,7 +28,6 @@ namespace OC\Authentication\WebAuthn\Db; use JsonSerializable; use OCP\AppFramework\Db\Entity; use Webauthn\PublicKeyCredentialSource; -use Webauthn\TrustPath\TrustPathLoader; /** * @since 19.0.0 diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php index 32a90345b5c..e33d0e48e9b 100644 --- a/lib/private/Authentication/WebAuthn/Manager.php +++ b/lib/private/Authentication/WebAuthn/Manager.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> @@ -49,7 +50,6 @@ use Webauthn\PublicKeyCredentialLoader; use Webauthn\PublicKeyCredentialParameters; use Webauthn\PublicKeyCredentialRequestOptions; use Webauthn\PublicKeyCredentialRpEntity; -use Webauthn\PublicKeyCredentialSource; use Webauthn\PublicKeyCredentialUserEntity; use Webauthn\TokenBinding\TokenBindingNotSupportedHandler; diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php index a097db286f2..4badc8c43f5 100644 --- a/lib/private/Avatar/Avatar.php +++ b/lib/private/Avatar/Avatar.php @@ -300,7 +300,7 @@ abstract class Avatar implements IAvatar { $hash = strtolower($hash); // Already a md5 hash? - if( preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1 ) { + if(preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1) { $hash = md5($hash); } diff --git a/lib/private/BackgroundJob/QueuedJob.php b/lib/private/BackgroundJob/QueuedJob.php index a01e666eb57..08fae26630f 100644 --- a/lib/private/BackgroundJob/QueuedJob.php +++ b/lib/private/BackgroundJob/QueuedJob.php @@ -23,6 +23,7 @@ */ namespace OC\BackgroundJob; + use OCP\ILogger; /** diff --git a/lib/private/BackgroundJob/TimedJob.php b/lib/private/BackgroundJob/TimedJob.php index 755607bfb6d..0da8c4ad123 100644 --- a/lib/private/BackgroundJob/TimedJob.php +++ b/lib/private/BackgroundJob/TimedJob.php @@ -23,6 +23,7 @@ */ namespace OC\BackgroundJob; + use OCP\ILogger; /** diff --git a/lib/private/CapabilitiesManager.php b/lib/private/CapabilitiesManager.php index d49c55bb80d..8034b90567f 100644 --- a/lib/private/CapabilitiesManager.php +++ b/lib/private/CapabilitiesManager.php @@ -48,7 +48,7 @@ class CapabilitiesManager { /** * Get an array of al the capabilities that are registered at this manager - * + * * @param bool $public get public capabilities only * @throws \InvalidArgumentException * @return array diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php index 79204043bd0..493c35a46d4 100644 --- a/lib/private/Collaboration/Collaborators/LookupPlugin.php +++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php @@ -26,7 +26,6 @@ namespace OC\Collaboration\Collaborators; - use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php index 3a3759b5794..bafc383f746 100644 --- a/lib/private/Collaboration/Collaborators/MailPlugin.php +++ b/lib/private/Collaboration/Collaborators/MailPlugin.php @@ -26,7 +26,6 @@ namespace OC\Collaboration\Collaborators; - use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; diff --git a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php index 2f024119c26..a922befec76 100644 --- a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php @@ -24,7 +24,6 @@ namespace OC\Collaboration\Collaborators; - use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php index 5173e889b9c..6309b8e6eab 100644 --- a/lib/private/Collaboration/Collaborators/RemotePlugin.php +++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php @@ -26,7 +26,6 @@ namespace OC\Collaboration\Collaborators; - use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; @@ -97,7 +96,7 @@ class RemotePlugin implements ISearchPlugin { /** * Add local share if remote cloud id matches a local user ones */ - if ($localUser !== null && $remoteUser !== $this->userId && $cloudId === $localUser->getCloudId() ) { + if ($localUser !== null && $remoteUser !== $this->userId && $cloudId === $localUser->getCloudId()) { $result['wide'][] = [ 'label' => $contact['FN'], 'uuid' => $contact['UID'], diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php index 7f5c5a1a811..9b9decfecbe 100644 --- a/lib/private/Collaboration/Collaborators/Search.php +++ b/lib/private/Collaboration/Collaborators/Search.php @@ -85,6 +85,13 @@ class Search implements ISearch { $searchResult->unsetResult($emailType); } + // if we have an exact local user match, there is no need to show the remote and email matches + $userType = new SearchResultType('users'); + if($searchResult->hasExactIdMatch($userType)) { + $searchResult->unsetResult($remoteType); + $searchResult->unsetResult($emailType); + } + return [$searchResult->asArray(), (bool)$hasMoreResults]; } diff --git a/lib/private/Collaboration/Collaborators/SearchResult.php b/lib/private/Collaboration/Collaborators/SearchResult.php index 768089c909a..1ee37e65589 100644 --- a/lib/private/Collaboration/Collaborators/SearchResult.php +++ b/lib/private/Collaboration/Collaborators/SearchResult.php @@ -24,7 +24,6 @@ namespace OC\Collaboration\Collaborators; - use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index bf2c1cfeda9..53dd0c66c7f 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -27,11 +27,11 @@ namespace OC\Collaboration\Collaborators; - use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; use OCP\IConfig; +use OCP\IGroup; use OCP\IGroupManager; use OCP\IUser; use OCP\IUserManager; @@ -75,11 +75,11 @@ class UserPlugin implements ISearchPlugin { $userGroups = []; if ($this->shareWithGroupOnly) { // Search in all the groups this user is part of - $userGroups = $this->groupManager->getUserGroupIds($this->userSession->getUser()); + $userGroups = $this->groupManager->getUserGroups($this->userSession->getUser()); foreach ($userGroups as $userGroup) { - $usersTmp = $this->groupManager->displayNamesInGroup($userGroup, $search, $limit, $offset); - foreach ($usersTmp as $uid => $userDisplayName) { - $users[(string) $uid] = $userDisplayName; + $usersInGroup = $userGroup->searchDisplayName($search, $limit, $offset); + foreach ($usersInGroup as $user) { + $users[$user->getUID()] = $user; } } } else { @@ -88,7 +88,7 @@ class UserPlugin implements ISearchPlugin { $currentUserGroups = $this->groupManager->getUserGroupIds($this->userSession->getUser()); foreach ($usersTmp as $user) { if ($user->isEnabled()) { // Don't keep deactivated users - $users[(string) $user->getUID()] = $user->getDisplayName(); + $users[$user->getUID()] = $user; $addToWideResults = false; if ($this->shareeEnumeration && !$this->shareeEnumerationInGroupOnly) { @@ -123,9 +123,15 @@ class UserPlugin implements ISearchPlugin { $foundUserById = false; $lowerSearch = strtolower($search); - foreach ($users as $uid => $userDisplayName) { + foreach ($users as $uid => $user) { + $userDisplayName = $user->getDisplayName(); + $userEmail = $user->getEMailAddress(); $uid = (string) $uid; - if (strtolower($uid) === $lowerSearch || strtolower($userDisplayName) === $lowerSearch) { + if ( + strtolower($uid) === $lowerSearch || + strtolower($userDisplayName) === $lowerSearch || + strtolower($userEmail) === $lowerSearch + ) { if (strtolower($uid) === $lowerSearch) { $foundUserById = true; } @@ -156,7 +162,10 @@ class UserPlugin implements ISearchPlugin { if ($this->shareWithGroupOnly) { // Only add, if we have a common group - $commonGroups = array_intersect($userGroups, $this->groupManager->getUserGroupIds($user)); + $userGroupIds = array_map(function (IGroup $group) { + return $group->getGID(); + }, $userGroups); + $commonGroups = array_intersect($userGroupIds, $this->groupManager->getUserGroupIds($user)); $addUser = !empty($commonGroups); } @@ -179,6 +188,9 @@ class UserPlugin implements ISearchPlugin { $type = new SearchResultType('users'); $searchResult->addResultSet($type, $result['wide'], $result['exact']); + if (count($result['exact'])) { + $searchResult->markExactIdMatch($type); + } return $hasMoreResults; } diff --git a/lib/private/Collaboration/Resources/Collection.php b/lib/private/Collaboration/Resources/Collection.php index b890e52f33a..827f4e6dd1f 100644 --- a/lib/private/Collaboration/Resources/Collection.php +++ b/lib/private/Collaboration/Resources/Collection.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Collaboration\Resources; - use Doctrine\DBAL\Exception\ConstraintViolationException; use OCP\Collaboration\Resources\ICollection; use OCP\Collaboration\Resources\IManager; @@ -127,7 +126,7 @@ class Collection implements ICollection { * @since 16.0.0 */ public function addResource(IResource $resource): void { - array_map(function(IResource $r) use ($resource) { + array_map(function (IResource $r) use ($resource) { if ($this->isSameResource($r, $resource)) { throw new ResourceException('Already part of the collection'); } @@ -159,7 +158,7 @@ class Collection implements ICollection { * @since 16.0.0 */ public function removeResource(IResource $resource): void { - $this->resources = array_filter($this->getResources(), function(IResource $r) use ($resource) { + $this->resources = array_filter($this->getResources(), function (IResource $r) use ($resource) { return !$this->isSameResource($r, $resource); }); diff --git a/lib/private/Collaboration/Resources/Listener.php b/lib/private/Collaboration/Resources/Listener.php index 41a24960a66..608f72ebd5d 100644 --- a/lib/private/Collaboration/Resources/Listener.php +++ b/lib/private/Collaboration/Resources/Listener.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Collaboration\Resources; - use OCP\Collaboration\Resources\IManager; use OCP\IGroup; use OCP\IUser; @@ -37,7 +36,7 @@ use Symfony\Component\EventDispatcher\GenericEvent; class Listener { public static function register(EventDispatcherInterface $dispatcher): void { - $listener = function(GenericEvent $event) { + $listener = function (GenericEvent $event) { /** @var IUser $user */ $user = $event->getArgument('user'); /** @var IManager $resourceManager */ @@ -48,7 +47,7 @@ class Listener { $dispatcher->addListener(IGroup::class . '::postAddUser', $listener); $dispatcher->addListener(IGroup::class . '::postRemoveUser', $listener); - $dispatcher->addListener(IUser::class . '::postDelete', function(GenericEvent $event) { + $dispatcher->addListener(IUser::class . '::postDelete', function (GenericEvent $event) { /** @var IUser $user */ $user = $event->getSubject(); /** @var IManager $resourceManager */ @@ -57,7 +56,7 @@ class Listener { $resourceManager->invalidateAccessCacheForUser($user); }); - $dispatcher->addListener(IGroup::class . '::preDelete', function(GenericEvent $event) { + $dispatcher->addListener(IGroup::class . '::preDelete', function (GenericEvent $event) { /** @var IGroup $group */ $group = $event->getSubject(); /** @var IManager $resourceManager */ diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php index 35ae0330e51..98cc25916fe 100644 --- a/lib/private/Collaboration/Resources/Manager.php +++ b/lib/private/Collaboration/Resources/Manager.php @@ -28,7 +28,6 @@ declare(strict_types=1); namespace OC\Collaboration\Resources; - use Doctrine\DBAL\Exception\UniqueConstraintViolationException; use OCP\Collaboration\Resources\CollectionException; use OCP\Collaboration\Resources\ICollection; diff --git a/lib/private/Collaboration/Resources/Resource.php b/lib/private/Collaboration/Resources/Resource.php index 19d7f3c0831..702bc2faf46 100644 --- a/lib/private/Collaboration/Resources/Resource.php +++ b/lib/private/Collaboration/Resources/Resource.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Collaboration\Resources; - use OCP\Collaboration\Resources\ICollection; use OCP\Collaboration\Resources\IManager; use OCP\Collaboration\Resources\IResource; diff --git a/lib/private/Color.php b/lib/private/Color.php index 11f2c4ada46..6238831c41b 100644 --- a/lib/private/Color.php +++ b/lib/private/Color.php @@ -24,7 +24,9 @@ namespace OC; class Color { - public $r, $g, $b; + public $r; + public $g; + public $b; public function __construct($r, $g, $b) { $this->r = $r; $this->g = $g; diff --git a/lib/private/Command/FileAccess.php b/lib/private/Command/FileAccess.php index 1a2e52c457b..edad7882ef9 100644 --- a/lib/private/Command/FileAccess.php +++ b/lib/private/Command/FileAccess.php @@ -25,7 +25,7 @@ namespace OC\Command; use OCP\IUser; trait FileAccess { - protected function setupFS(IUser $user){ + protected function setupFS(IUser $user) { \OC_Util::setupFS($user->getUID()); } diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index 3b4a523b884..a45b1e05cfe 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -300,8 +300,8 @@ class Comment implements IComment { */ public function setActor($actorType, $actorId) { if( - !is_string($actorType) || !trim($actorType) - || !is_string($actorId) || $actorId === '' + !is_string($actorType) || !trim($actorType) + || !is_string($actorId) || $actorId === '' ) { throw new \InvalidArgumentException('String expected.'); } @@ -386,8 +386,8 @@ class Comment implements IComment { */ public function setObject($objectType, $objectId) { if( - !is_string($objectType) || !trim($objectType) - || !is_string($objectId) || trim($objectId) === '' + !is_string($objectType) || !trim($objectType) + || !is_string($objectId) || trim($objectId) === '' ) { throw new \InvalidArgumentException('String expected.'); } diff --git a/lib/private/Config.php b/lib/private/Config.php index d2ddab5069a..0c5a9b0320d 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -239,14 +239,14 @@ class Config { $content .= var_export($this->cache, true); $content .= ";\n"; - touch ($this->configFilePath); + touch($this->configFilePath); $filePointer = fopen($this->configFilePath, 'r+'); // Prevent others not to read the config chmod($this->configFilePath, 0640); // File does not exist, this can happen when doing a fresh install - if(!is_resource ($filePointer)) { + if(!is_resource($filePointer)) { throw new HintException( "Can't write into config directory!", 'This can usually be fixed by giving the webserver write access to the config directory.'); @@ -258,7 +258,7 @@ class Config { } // Write the config and release the lock - ftruncate ($filePointer, 0); + ftruncate($filePointer, 0); fwrite($filePointer, $content); fflush($filePointer); flock($filePointer, LOCK_UN); diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php index 946b864ac62..72e3e392e0b 100644 --- a/lib/private/Console/TimestampFormatter.php +++ b/lib/private/Console/TimestampFormatter.php @@ -23,7 +23,6 @@ namespace OC\Console; - use OCP\IConfig; use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Formatter\OutputFormatterStyleInterface; diff --git a/lib/private/Contacts/ContactsMenu/ActionProviderStore.php b/lib/private/Contacts/ContactsMenu/ActionProviderStore.php index c737e1ef289..b8ddf9258fa 100644 --- a/lib/private/Contacts/ContactsMenu/ActionProviderStore.php +++ b/lib/private/Contacts/ContactsMenu/ActionProviderStore.php @@ -94,7 +94,7 @@ class ActionProviderStore { * @return string[] */ private function getAppProviderClasses(IUser $user) { - return array_reduce($this->appManager->getEnabledAppsForUser($user), function($all, $appId) { + return array_reduce($this->appManager->getEnabledAppsForUser($user), function ($all, $appId) { $info = $this->appManager->getAppInfo($appId); if (!isset($info['contactsmenu']) || !isset($info['contactsmenu'])) { @@ -102,7 +102,7 @@ class ActionProviderStore { return $all; } - $providers = array_reduce($info['contactsmenu'], function($all, $provider) { + $providers = array_reduce($info['contactsmenu'], function ($all, $provider) { return array_merge($all, [$provider]); }, []); diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index 8199db952af..dfa6db61607 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -78,7 +78,7 @@ class ContactsStore implements IContactsStore { 'EMAIL' ]); - $entries = array_map(function(array $contact) { + $entries = array_map(function (array $contact) { return $this->contactArrayToEntry($contact); }, $allContacts); return $this->filterContacts( @@ -131,7 +131,7 @@ class ContactsStore implements IContactsStore { $selfUID = $self->getUID(); - return array_values(array_filter($entries, function(IEntry $entry) use ($self, $skipLocal, $ownGroupsOnly, $selfGroups, $selfUID, $disallowEnumeration, $filter) { + return array_values(array_filter($entries, function (IEntry $entry) use ($self, $skipLocal, $ownGroupsOnly, $selfGroups, $selfUID, $disallowEnumeration, $filter) { if ($skipLocal && $entry->getProperty('isLocalSystemBook') === true) { return false; } @@ -196,7 +196,7 @@ class ContactsStore implements IContactsStore { $userId = $user->getUID(); $allContacts = $this->contactsManager->search($shareWith, $filter); - $contacts = array_filter($allContacts, function($contact) use ($userId) { + $contacts = array_filter($allContacts, function ($contact) use ($userId) { return $contact['UID'] !== $userId; }); $match = null; diff --git a/lib/private/Contacts/ContactsMenu/Entry.php b/lib/private/Contacts/ContactsMenu/Entry.php index 73ac22ad69c..c4b590e9397 100644 --- a/lib/private/Contacts/ContactsMenu/Entry.php +++ b/lib/private/Contacts/ContactsMenu/Entry.php @@ -114,7 +114,7 @@ class Entry implements IEntry { * sort the actions by priority and name */ private function sortActions() { - usort($this->actions, function(IAction $action1, IAction $action2) { + usort($this->actions, function (IAction $action1, IAction $action2) { $prio1 = $action1->getPriority(); $prio2 = $action2->getPriority(); @@ -151,7 +151,7 @@ class Entry implements IEntry { */ public function jsonSerialize() { $topAction = !empty($this->actions) ? $this->actions[0]->jsonSerialize() : null; - $otherActions = array_map(function(IAction $action) { + $otherActions = array_map(function (IAction $action) { return $action->jsonSerialize(); }, array_slice($this->actions, 1)); diff --git a/lib/private/Contacts/ContactsMenu/Manager.php b/lib/private/Contacts/ContactsMenu/Manager.php index 0ebc9648285..ba761c5ece8 100644 --- a/lib/private/Contacts/ContactsMenu/Manager.php +++ b/lib/private/Contacts/ContactsMenu/Manager.php @@ -100,7 +100,7 @@ class Manager { * @return IEntry[] */ private function sortEntries(array $entries) { - usort($entries, function(IEntry $entryA, IEntry $entryB) { + usort($entries, function (IEntry $entryA, IEntry $entryB) { return strcasecmp($entryA->getFullName(), $entryB->getFullName()); }); return $entries; diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php index 2913e2b5864..6ccedca77b9 100644 --- a/lib/private/ContactsManager.php +++ b/lib/private/ContactsManager.php @@ -125,7 +125,7 @@ namespace OC { /** * Return a list of the user's addressbooks display names * ! The addressBook displayName are not unique, please use getUserAddressBooks - * + * * @return array * @since 6.0.0 * @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead @@ -142,11 +142,11 @@ namespace OC { /** * Return a list of the user's addressbooks - * + * * @return IAddressBook[] * @since 16.0.0 */ - public function getUserAddressBooks(): Array { + public function getUserAddressBooks(): array { $this->loadAddressBooks(); return $this->addressBooks; } diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php index 628c91dbb9e..dd9c7dc9680 100644 --- a/lib/private/DB/AdapterPgSql.php +++ b/lib/private/DB/AdapterPgSql.php @@ -26,7 +26,6 @@ namespace OC\DB; - class AdapterPgSql extends Adapter { protected $compatModePre9_5 = null; @@ -36,8 +35,8 @@ class AdapterPgSql extends Adapter { const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)'; public function fixupStatement($statement) { - $statement = str_replace( '`', '"', $statement ); - $statement = str_ireplace( 'UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement ); + $statement = str_replace('`', '"', $statement); + $statement = str_ireplace('UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement); return $statement; } diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php index 20d27732131..2d8715e90f5 100644 --- a/lib/private/DB/AdapterSqlite.php +++ b/lib/private/DB/AdapterSqlite.php @@ -43,10 +43,10 @@ class AdapterSqlite extends Adapter { public function fixupStatement($statement) { $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); - $statement = str_replace( '`', '"', $statement ); - $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); + $statement = str_replace('`', '"', $statement); + $statement = str_ireplace('NOW()', 'datetime(\'now\')', $statement); $statement = str_ireplace('GREATEST(', 'MAX(', $statement); - $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); + $statement = str_ireplace('UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement); return $statement; } diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index ed00bcd0e04..a0c0ac18481 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -160,7 +160,7 @@ class Connection extends ReconnectWrapper implements IDBConnection { * @param int $offset * @return \Doctrine\DBAL\Driver\Statement The prepared statement. */ - public function prepare( $statement, $limit=null, $offset=null ) { + public function prepare($statement, $limit=null, $offset=null) { if ($limit === -1) { $limit = null; } @@ -289,7 +289,7 @@ class Connection extends ReconnectWrapper implements IDBConnection { $insertQb = $this->getQueryBuilder(); $insertQb->insert($table) ->values( - array_map(function($value) use ($insertQb) { + array_map(function ($value) use ($insertQb) { return $insertQb->createNamedParameter($value, $this->getType($value)); }, array_merge($keys, $values)) ); @@ -383,7 +383,7 @@ class Connection extends ReconnectWrapper implements IDBConnection { * @param string $table table name without the prefix * @return bool */ - public function tableExists($table){ + public function tableExists($table) { $table = $this->tablePrefix . trim($table); $schema = $this->getSchemaManager(); return $schema->tablesExist([$table]); @@ -395,7 +395,7 @@ class Connection extends ReconnectWrapper implements IDBConnection { * @return string */ protected function replaceTablePrefix($statement) { - return str_replace( '*PREFIX*', $this->tablePrefix, $statement ); + return str_replace('*PREFIX*', $this->tablePrefix, $statement); } /** diff --git a/lib/private/DB/MigrationException.php b/lib/private/DB/MigrationException.php index 9e758f4e860..76d769e08be 100644 --- a/lib/private/DB/MigrationException.php +++ b/lib/private/DB/MigrationException.php @@ -23,7 +23,6 @@ namespace OC\DB; - class MigrationException extends \Exception { private $table; diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 9f5b5bfe72b..dd719ef0a5b 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -468,12 +468,12 @@ class MigrationService { $instance = $this->createInstance($version); if (!$schemaOnly) { - $instance->preSchemaChange($this->output, function() { + $instance->preSchemaChange($this->output, function () { return new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]); } - $toSchema = $instance->changeSchema($this->output, function() { + $toSchema = $instance->changeSchema($this->output, function () { return new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]); @@ -488,7 +488,7 @@ class MigrationService { } if (!$schemaOnly) { - $instance->postSchemaChange($this->output, function() { + $instance->postSchemaChange($this->output, function () { return new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]); } @@ -538,7 +538,7 @@ class MigrationService { if ($isUsingDefaultName) { $sequenceName = $table->getName() . '_' . implode('_', $primaryKey->getColumns()) . '_seq'; - $sequences = array_filter($sequences, function(Sequence $sequence) use ($sequenceName) { + $sequences = array_filter($sequences, function (Sequence $sequence) use ($sequenceName) { return $sequence->getName() !== $sequenceName; }); } diff --git a/lib/private/DB/MySQLMigrator.php b/lib/private/DB/MySQLMigrator.php index e178cfb55d8..fe56a9563e2 100644 --- a/lib/private/DB/MySQLMigrator.php +++ b/lib/private/DB/MySQLMigrator.php @@ -53,25 +53,25 @@ class MySQLMigrator extends Migrator { return $schemaDiff; } - /** - * Speed up migration test by disabling autocommit and unique indexes check - * - * @param \Doctrine\DBAL\Schema\Table $table - * @throws \OC\DB\MigrationException - */ - protected function checkTableMigrate(Table $table) { - $this->connection->exec('SET autocommit=0'); - $this->connection->exec('SET unique_checks=0'); + /** + * Speed up migration test by disabling autocommit and unique indexes check + * + * @param \Doctrine\DBAL\Schema\Table $table + * @throws \OC\DB\MigrationException + */ + protected function checkTableMigrate(Table $table) { + $this->connection->exec('SET autocommit=0'); + $this->connection->exec('SET unique_checks=0'); - try { - parent::checkTableMigrate($table); - } catch (\Exception $e) { - $this->connection->exec('SET unique_checks=1'); - $this->connection->exec('SET autocommit=1'); - throw new MigrationException($table->getName(), $e->getMessage()); - } - $this->connection->exec('SET unique_checks=1'); - $this->connection->exec('SET autocommit=1'); - } + try { + parent::checkTableMigrate($table); + } catch (\Exception $e) { + $this->connection->exec('SET unique_checks=1'); + $this->connection->exec('SET autocommit=1'); + throw new MigrationException($table->getName(), $e->getMessage()); + } + $this->connection->exec('SET unique_checks=1'); + $this->connection->exec('SET autocommit=1'); + } } diff --git a/lib/private/DB/MySqlTools.php b/lib/private/DB/MySqlTools.php index 69d95d4eed6..957afbaa06f 100644 --- a/lib/private/DB/MySqlTools.php +++ b/lib/private/DB/MySqlTools.php @@ -26,8 +26,8 @@ namespace OC\DB; use OCP\IDBConnection; /** -* Various MySQL specific helper functions. -*/ + * Various MySQL specific helper functions. + */ class MySqlTools { /** diff --git a/lib/private/DB/OracleConnection.php b/lib/private/DB/OracleConnection.php index cc1bf66d874..93a52d1772d 100644 --- a/lib/private/DB/OracleConnection.php +++ b/lib/private/DB/OracleConnection.php @@ -98,7 +98,7 @@ class OracleConnection extends Connection { * @param string $table table name without the prefix * @return bool */ - public function tableExists($table){ + public function tableExists($table) { $table = $this->tablePrefix . trim($table); $table = $this->quoteIdentifier($table); $schema = $this->getSchemaManager(); diff --git a/lib/private/DB/OracleMigrator.php b/lib/private/DB/OracleMigrator.php index 7695532a4b7..86d1f71c2b7 100644 --- a/lib/private/DB/OracleMigrator.php +++ b/lib/private/DB/OracleMigrator.php @@ -77,7 +77,7 @@ class OracleMigrator extends Migrator { return new Index( //TODO migrate existing uppercase indexes, then $this->connection->quoteIdentifier($index->getName()), $index->getName(), - array_map(function($columnName) { + array_map(function ($columnName) { return $this->connection->quoteIdentifier($columnName); }, $index->getColumns()), $index->isUnique(), @@ -96,11 +96,11 @@ class OracleMigrator extends Migrator { */ protected function quoteForeignKeyConstraint($fkc) { return new ForeignKeyConstraint( - array_map(function($columnName) { + array_map(function ($columnName) { return $this->connection->quoteIdentifier($columnName); }, $fkc->getLocalColumns()), $this->connection->quoteIdentifier($fkc->getForeignTableName()), - array_map(function($columnName) { + array_map(function ($columnName) { return $this->connection->quoteIdentifier($columnName); }, $fkc->getForeignColumns()), $fkc->getName(), @@ -118,16 +118,16 @@ class OracleMigrator extends Migrator { $schemaDiff = parent::getDiff($targetSchema, $connection); // oracle forces us to quote the identifiers - $schemaDiff->newTables = array_map(function(Table $table) { + $schemaDiff->newTables = array_map(function (Table $table) { return new Table( $this->connection->quoteIdentifier($table->getName()), - array_map(function(Column $column) { + array_map(function (Column $column) { return $this->quoteColumn($column); }, $table->getColumns()), - array_map(function(Index $index) { + array_map(function (Index $index) { return $this->quoteIndex($index); }, $table->getIndexes()), - array_map(function(ForeignKeyConstraint $fck) { + array_map(function (ForeignKeyConstraint $fck) { return $this->quoteForeignKeyConstraint($fck); }, $table->getForeignKeys()), 0, @@ -135,7 +135,7 @@ class OracleMigrator extends Migrator { ); }, $schemaDiff->newTables); - $schemaDiff->removedTables = array_map(function(Table $table) { + $schemaDiff->removedTables = array_map(function (Table $table) { return new Table( $this->connection->quoteIdentifier($table->getName()), $table->getColumns(), @@ -149,7 +149,7 @@ class OracleMigrator extends Migrator { foreach ($schemaDiff->changedTables as $tableDiff) { $tableDiff->name = $this->connection->quoteIdentifier($tableDiff->name); - $tableDiff->addedColumns = array_map(function(Column $column) { + $tableDiff->addedColumns = array_map(function (Column $column) { return $this->quoteColumn($column); }, $tableDiff->addedColumns); @@ -163,39 +163,39 @@ class OracleMigrator extends Migrator { return count($column->changedProperties) > 0; }); - $tableDiff->removedColumns = array_map(function(Column $column) { + $tableDiff->removedColumns = array_map(function (Column $column) { return $this->quoteColumn($column); }, $tableDiff->removedColumns); - $tableDiff->renamedColumns = array_map(function(Column $column) { + $tableDiff->renamedColumns = array_map(function (Column $column) { return $this->quoteColumn($column); }, $tableDiff->renamedColumns); - $tableDiff->addedIndexes = array_map(function(Index $index) { + $tableDiff->addedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->addedIndexes); - $tableDiff->changedIndexes = array_map(function(Index $index) { + $tableDiff->changedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->changedIndexes); - $tableDiff->removedIndexes = array_map(function(Index $index) { + $tableDiff->removedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->removedIndexes); - $tableDiff->renamedIndexes = array_map(function(Index $index) { + $tableDiff->renamedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->renamedIndexes); - $tableDiff->addedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) { + $tableDiff->addedForeignKeys = array_map(function (ForeignKeyConstraint $fkc) { return $this->quoteForeignKeyConstraint($fkc); }, $tableDiff->addedForeignKeys); - $tableDiff->changedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) { + $tableDiff->changedForeignKeys = array_map(function (ForeignKeyConstraint $fkc) { return $this->quoteForeignKeyConstraint($fkc); }, $tableDiff->changedForeignKeys); - $tableDiff->removedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) { + $tableDiff->removedForeignKeys = array_map(function (ForeignKeyConstraint $fkc) { return $this->quoteForeignKeyConstraint($fkc); }, $tableDiff->removedForeignKeys); } diff --git a/lib/private/DB/PgSqlTools.php b/lib/private/DB/PgSqlTools.php index 5a9128bc5b2..724344ac2a1 100644 --- a/lib/private/DB/PgSqlTools.php +++ b/lib/private/DB/PgSqlTools.php @@ -25,11 +25,12 @@ */ namespace OC\DB; + use OCP\IConfig; /** -* Various PostgreSQL specific helper functions. -*/ + * Various PostgreSQL specific helper functions. + */ class PgSqlTools { /** @var \OCP\IConfig */ @@ -43,11 +44,11 @@ class PgSqlTools { } /** - * @brief Resynchronizes all sequences of a database after using INSERTs - * without leaving out the auto-incremented column. - * @param \OC\DB\Connection $conn - * @return null - */ + * @brief Resynchronizes all sequences of a database after using INSERTs + * without leaving out the auto-incremented column. + * @param \OC\DB\Connection $conn + * @return null + */ public function resynchronizeDatabaseSequences(Connection $conn) { $filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/'; $databaseName = $conn->getDatabase(); diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php index 666e99e7f8e..e7df321b102 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php @@ -24,7 +24,6 @@ namespace OC\DB\QueryBuilder\ExpressionBuilder; - use OC\DB\Connection; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index 12719b2aaad..2aa007dba04 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -24,7 +24,6 @@ namespace OC\DB\QueryBuilder\ExpressionBuilder; - use OC\DB\QueryBuilder\QueryFunction; use OCP\DB\QueryBuilder\ILiteral; use OCP\DB\QueryBuilder\IParameter; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php index a59cd591db0..fbf76da8690 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php @@ -24,7 +24,6 @@ namespace OC\DB\QueryBuilder\ExpressionBuilder; - use OC\DB\QueryBuilder\QueryFunction; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php index b82b4d9eb3f..1fa0d79663a 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php @@ -23,7 +23,6 @@ namespace OC\DB\QueryBuilder\ExpressionBuilder; - class SqliteExpressionBuilder extends ExpressionBuilder { /** * @inheritdoc diff --git a/lib/private/DB/SchemaWrapper.php b/lib/private/DB/SchemaWrapper.php index f7f204a564c..eb24cc6f7aa 100644 --- a/lib/private/DB/SchemaWrapper.php +++ b/lib/private/DB/SchemaWrapper.php @@ -64,7 +64,7 @@ class SchemaWrapper implements ISchemaWrapper { */ public function getTableNamesWithoutPrefix() { $tableNames = $this->schema->getTableNames(); - return array_map(function($tableName) { + return array_map(function ($tableName) { if (strpos($tableName, $this->connection->getPrefix()) === 0) { return substr($tableName, strlen($this->connection->getPrefix())); } diff --git a/lib/private/Dashboard/DashboardManager.php b/lib/private/Dashboard/DashboardManager.php index 3f2b04bb96d..6491779bce7 100644 --- a/lib/private/Dashboard/DashboardManager.php +++ b/lib/private/Dashboard/DashboardManager.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\Dashboard; - use OCP\Dashboard\Exceptions\DashboardAppNotAvailableException; use OCP\Dashboard\IDashboardManager; use OCP\Dashboard\Model\IWidgetConfig; diff --git a/lib/private/DateTimeZone.php b/lib/private/DateTimeZone.php index 23fb8ae272f..971a1a97334 100644 --- a/lib/private/DateTimeZone.php +++ b/lib/private/DateTimeZone.php @@ -24,7 +24,6 @@ namespace OC; - use OCP\IConfig; use OCP\IDateTimeZone; use OCP\ILogger; @@ -120,7 +119,7 @@ class DateTimeZone implements IDateTimeZone { * Get the default timezone of the server * * Falls back to UTC if it is not yet set. - * + * * @return string */ protected function getDefaultTimeZone() { diff --git a/lib/private/DirectEditing/Token.php b/lib/private/DirectEditing/Token.php index add6f5b471c..1c0b99b757d 100644 --- a/lib/private/DirectEditing/Token.php +++ b/lib/private/DirectEditing/Token.php @@ -23,7 +23,6 @@ namespace OC\DirectEditing; - use OCP\DirectEditing\IToken; use OCP\Files\File; diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index e5bc0e868bd..6389e996c1d 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -24,7 +24,6 @@ namespace OC\Encryption; - use OC\Files\Filesystem; use OC\Files\Storage\Wrapper\Encryption; use OC\Files\View; diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php index 63d35e6dd86..52fc23de947 100644 --- a/lib/private/Encryption/Manager.php +++ b/lib/private/Encryption/Manager.php @@ -128,7 +128,7 @@ class Manager implements IManager { return true; } - /** + /** * Registers an callback function which must return an encryption module instance * * @param string $id diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php index 9cc78e7ba77..937a77bca7a 100644 --- a/lib/private/Encryption/Util.php +++ b/lib/private/Encryption/Util.php @@ -253,7 +253,7 @@ class Util { public function stripPartialFileExtension($path) { $extension = pathinfo($path, PATHINFO_EXTENSION); - if ( $extension === 'part') { + if ($extension === 'part') { $newLength = strlen($path) - 5; // 5 = strlen(".part") $fPath = substr($path, 0, $newLength); @@ -275,7 +275,7 @@ class Util { $result = []; if (in_array('all', $users)) { $users = $this->userManager->search('', null, null); - $result = array_map(function(IUser $user) { + $result = array_map(function (IUser $user) { return $user->getUID(); }, $users); } else { diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 11f7eedea26..a6daec2a8f3 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -554,7 +554,7 @@ class Cache implements ICache { */ private function removeChildren(ICacheEntry $entry) { $children = $this->getFolderContentsById($entry->getId()); - $childIds = array_map(function(ICacheEntry $cacheEntry) { + $childIds = array_map(function (ICacheEntry $cacheEntry) { return $cacheEntry->getId(); }, $children); $childFolders = array_filter($children, function ($child) { diff --git a/lib/private/Files/Cache/Watcher.php b/lib/private/Files/Cache/Watcher.php index cd375572b08..6270f03ca92 100644 --- a/lib/private/Files/Cache/Watcher.php +++ b/lib/private/Files/Cache/Watcher.php @@ -26,6 +26,7 @@ */ namespace OC\Files\Cache; + use OCP\Files\Cache\ICacheEntry; use OCP\Files\Cache\IWatcher; diff --git a/lib/private/Files/Cache/Wrapper/JailPropagator.php b/lib/private/Files/Cache/Wrapper/JailPropagator.php index 9322d9e610b..956d187783a 100644 --- a/lib/private/Files/Cache/Wrapper/JailPropagator.php +++ b/lib/private/Files/Cache/Wrapper/JailPropagator.php @@ -24,7 +24,6 @@ namespace OC\Files\Cache\Wrapper; - use OC\Files\Cache\Propagator; use OC\Files\Storage\Wrapper\Jail; diff --git a/lib/private/Files/Config/CachedMountFileInfo.php b/lib/private/Files/Config/CachedMountFileInfo.php index 99df663a4e6..7bae52bb65d 100644 --- a/lib/private/Files/Config/CachedMountFileInfo.php +++ b/lib/private/Files/Config/CachedMountFileInfo.php @@ -24,7 +24,6 @@ namespace OC\Files\Config; - use OCP\Files\Config\ICachedMountFileInfo; use OCP\IUser; diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index 8fddbf71200..44da2e6f20f 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -828,7 +828,7 @@ class Filesystem { $patterns = [ '/\\\\/s', // no windows style slashes '/\/\.(\/\.)?\//s', // remove '/./' - '/\/{2,}/s', // remove squence of slashes + '/\/{2,}/s', // remove sequence of slashes '/\/\.$/s', // remove trailing /. ]; diff --git a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php index f7d565d5cd1..98b99efcb5a 100644 --- a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php @@ -34,14 +34,14 @@ class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IH * @param array $params */ public function __construct($params) { - if ( ! isset($params['user']) || ! $params['user'] instanceof User) { + if (! isset($params['user']) || ! $params['user'] instanceof User) { throw new \Exception('missing user object in parameters'); } $this->user = $params['user']; parent::__construct($params); } - public function getId () { + public function getId() { return 'object::user:' . $this->user->getUID(); } diff --git a/lib/private/Files/ObjectStore/NoopScanner.php b/lib/private/Files/ObjectStore/NoopScanner.php index 2625703b5c4..7a253c82c5b 100644 --- a/lib/private/Files/ObjectStore/NoopScanner.php +++ b/lib/private/Files/ObjectStore/NoopScanner.php @@ -26,6 +26,7 @@ */ namespace OC\Files\ObjectStore; + use OC\Files\Cache\Scanner; use OC\Files\Storage\Storage; diff --git a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php index 1343531e384..635d0908c9a 100644 --- a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php +++ b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\Files\ObjectStore; - use OpenStack\Identity\v2\Service; class SwiftV2CachingAuthService extends Service { diff --git a/lib/private/Files/Search/SearchOrder.php b/lib/private/Files/Search/SearchOrder.php index 7a7eb01ed94..4bff8ba1b6c 100644 --- a/lib/private/Files/Search/SearchOrder.php +++ b/lib/private/Files/Search/SearchOrder.php @@ -23,7 +23,6 @@ namespace OC\Files\Search; - use OCP\Files\Search\ISearchOrder; class SearchOrder implements ISearchOrder { diff --git a/lib/private/Files/SimpleFS/SimpleFolder.php b/lib/private/Files/SimpleFS/SimpleFolder.php index 169a8d96fd3..7196b55ea12 100644 --- a/lib/private/Files/SimpleFS/SimpleFolder.php +++ b/lib/private/Files/SimpleFS/SimpleFolder.php @@ -51,7 +51,7 @@ class SimpleFolder implements ISimpleFolder { public function getDirectoryListing() { $listing = $this->folder->getDirectoryListing(); - $fileListing = array_map(function(Node $file) { + $fileListing = array_map(function (Node $file) { if ($file instanceof File) { return new SimpleFile($file); } diff --git a/lib/private/Files/Storage/CommonTest.php b/lib/private/Files/Storage/CommonTest.php index 4ed9364a4b3..164738d9478 100644 --- a/lib/private/Files/Storage/CommonTest.php +++ b/lib/private/Files/Storage/CommonTest.php @@ -43,7 +43,7 @@ class CommonTest extends \OC\Files\Storage\Common{ $this->storage=new \OC\Files\Storage\Local($params); } - public function getId(){ + public function getId() { return 'test::'.$this->storage->getId(); } public function mkdir($path) { diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php index 748253f21bb..7e5a0cef4d7 100644 --- a/lib/private/Files/Storage/Storage.php +++ b/lib/private/Files/Storage/Storage.php @@ -23,6 +23,7 @@ */ namespace OC\Files\Storage; + use OCP\Lock\ILockingProvider; /** diff --git a/lib/private/Files/Stream/SeekableHttpStream.php b/lib/private/Files/Stream/SeekableHttpStream.php index fdcd9ea8cfb..113ba19a17a 100644 --- a/lib/private/Files/Stream/SeekableHttpStream.php +++ b/lib/private/Files/Stream/SeekableHttpStream.php @@ -149,15 +149,25 @@ class SeekableHttpStream implements File { } public function stream_stat() { - return fstat($this->current); + if (is_resource($this->current)) { + return fstat($this->current); + } else { + return false; + } } public function stream_eof() { - return feof($this->current); + if (is_resource($this->current)) { + return feof($this->current); + } else { + return true; + } } public function stream_close() { - fclose($this->current); + if (is_resource($this->current)) { + fclose($this->current); + } } public function stream_write($data) { diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index e3f704a7cbc..881bf1a2126 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -670,7 +670,7 @@ class View { list($storage, $internalPath) = $this->resolvePath($path); $target = $storage->fopen($internalPath, 'w'); if ($target) { - list (, $result) = \OC_Helper::streamCopy($data, $target); + list(, $result) = \OC_Helper::streamCopy($data, $target); fclose($target); fclose($data); @@ -1454,7 +1454,7 @@ class View { $sharingDisabled = \OCP\Util::isSharingDisabledForUser(); - $fileNames = array_map(function(ICacheEntry $content) { + $fileNames = array_map(function (ICacheEntry $content) { return $content->getName(); }, $contents); /** @@ -1735,7 +1735,7 @@ class View { // put non shared mounts in front of the shared mount // this prevent unneeded recursion into shares - usort($mounts, function(IMountPoint $a, IMountPoint $b) { + usort($mounts, function (IMountPoint $a, IMountPoint $b) { return $a instanceof SharedMount && (!$b instanceof SharedMount) ? 1 : -1; }); diff --git a/lib/private/FullTextSearch/FullTextSearchManager.php b/lib/private/FullTextSearch/FullTextSearchManager.php index a67d23f6af6..4af70d97260 100644 --- a/lib/private/FullTextSearch/FullTextSearchManager.php +++ b/lib/private/FullTextSearch/FullTextSearchManager.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\FullTextSearch; - use OCP\FullTextSearch\Exceptions\FullTextSearchAppNotAvailableException; use OCP\FullTextSearch\IFullTextSearchManager; use OCP\FullTextSearch\Model\IIndex; diff --git a/lib/private/FullTextSearch/Model/DocumentAccess.php b/lib/private/FullTextSearch/Model/DocumentAccess.php index 2b74991b717..d4c7a06d079 100644 --- a/lib/private/FullTextSearch/Model/DocumentAccess.php +++ b/lib/private/FullTextSearch/Model/DocumentAccess.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\FullTextSearch\Model; - use JsonSerializable; use OCP\FullTextSearch\Model\IDocumentAccess; diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php index 048696e4d4b..7c7847b7463 100644 --- a/lib/private/FullTextSearch/Model/IndexDocument.php +++ b/lib/private/FullTextSearch/Model/IndexDocument.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\FullTextSearch\Model; - use JsonSerializable; use OCP\FullTextSearch\Model\IDocumentAccess; use OCP\FullTextSearch\Model\IIndex; diff --git a/lib/private/FullTextSearch/Model/SearchOption.php b/lib/private/FullTextSearch/Model/SearchOption.php index a61e823fb74..1ff3fbba272 100644 --- a/lib/private/FullTextSearch/Model/SearchOption.php +++ b/lib/private/FullTextSearch/Model/SearchOption.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\FullTextSearch\Model; - use JsonSerializable; use OCP\FullTextSearch\Model\ISearchOption; diff --git a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php index 2ffc2ee359d..19be494d82f 100644 --- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php +++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\FullTextSearch\Model; - use JsonSerializable; use OCP\FullTextSearch\Model\ISearchRequestSimpleQuery; diff --git a/lib/private/FullTextSearch/Model/SearchTemplate.php b/lib/private/FullTextSearch/Model/SearchTemplate.php index 9060a82046f..4940e57c281 100644 --- a/lib/private/FullTextSearch/Model/SearchTemplate.php +++ b/lib/private/FullTextSearch/Model/SearchTemplate.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\FullTextSearch\Model; - use JsonSerializable; use OCP\FullTextSearch\IFullTextSearchProvider; use OCP\FullTextSearch\Model\ISearchOption; diff --git a/lib/private/GlobalScale/Config.php b/lib/private/GlobalScale/Config.php index c1a70c94647..f886ac8ff84 100644 --- a/lib/private/GlobalScale/Config.php +++ b/lib/private/GlobalScale/Config.php @@ -23,7 +23,6 @@ namespace OC\GlobalScale; - use OCP\IConfig; class Config implements \OCP\GlobalScale\IConfig { diff --git a/lib/private/Group/Backend.php b/lib/private/Group/Backend.php index 024366a46be..4e2f912e7fc 100644 --- a/lib/private/Group/Backend.php +++ b/lib/private/Group/Backend.php @@ -45,15 +45,15 @@ abstract class Backend implements \OCP\GroupInterface { ]; /** - * Get all supported actions - * @return int bitwise-or'ed actions - * - * Returns the supported actions as int to be - * compared with \OC\Group\Backend::CREATE_GROUP etc. - */ + * Get all supported actions + * @return int bitwise-or'ed actions + * + * Returns the supported actions as int to be + * compared with \OC\Group\Backend::CREATE_GROUP etc. + */ public function getSupportedActions() { $actions = 0; - foreach($this->possibleActions AS $action => $methodName) { + foreach($this->possibleActions as $action => $methodName) { if(method_exists($this, $methodName)) { $actions |= $action; } @@ -63,13 +63,13 @@ abstract class Backend implements \OCP\GroupInterface { } /** - * Check if backend implements actions - * @param int $actions bitwise-or'ed actions - * @return bool - * - * Returns the supported actions as int to be - * compared with \OC\Group\Backend::CREATE_GROUP etc. - */ + * Check if backend implements actions + * @param int $actions bitwise-or'ed actions + * @return bool + * + * Returns the supported actions as int to be + * compared with \OC\Group\Backend::CREATE_GROUP etc. + */ public function implementsActions($actions) { return (bool)($this->getSupportedActions() & $actions); } diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 8afd2c4aed2..99654b5d1f2 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -62,14 +62,14 @@ use OCP\IDBConnection; */ class Database extends ABackend implements IAddToGroupBackend, - ICountDisabledInGroup, - ICountUsersBackend, - ICreateGroupBackend, - IDeleteGroupBackend, - IGetDisplayNameBackend, - IGroupDetailsBackend, - IRemoveFromGroupBackend, - ISetDisplayNameBackend { + ICountDisabledInGroup, + ICountUsersBackend, + ICreateGroupBackend, + IDeleteGroupBackend, + IGetDisplayNameBackend, + IGroupDetailsBackend, + IRemoveFromGroupBackend, + ISetDisplayNameBackend { /** @var string[] */ private $groupCache = []; @@ -165,7 +165,7 @@ class Database extends ABackend * * Checks whether the user is member of a group or not. */ - public function inGroup( $uid, $gid ) { + public function inGroup($uid, $gid) { $this->fixDI(); // check @@ -194,7 +194,7 @@ class Database extends ABackend $this->fixDI(); // No duplicate entries! - if( !$this->inGroup( $uid, $gid )) { + if(!$this->inGroup($uid, $gid)) { $qb = $this->dbConn->getQueryBuilder(); $qb->insert('group_user') ->setValue('uid', $qb->createNamedParameter($uid)) @@ -234,7 +234,7 @@ class Database extends ABackend * This function fetches all groups a user belongs to. It does not check * if the user exists at all. */ - public function getUserGroups( $uid ) { + public function getUserGroups($uid) { //guests has empty or null $uid if ($uid === null || $uid === '') { return []; @@ -250,7 +250,7 @@ class Database extends ABackend ->execute(); $groups = []; - while( $row = $cursor->fetch()) { + while($row = $cursor->fetch()) { $groups[] = $row['gid']; $this->groupCache[$row['gid']] = $row['gid']; } diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php index 90b4221b414..9eb1b616609 100644 --- a/lib/private/Group/Group.php +++ b/lib/private/Group/Group.php @@ -285,7 +285,7 @@ class Group implements IGroup { public function countDisabled() { $users = false; foreach ($this->backends as $backend) { - if($backend instanceOf ICountDisabledInGroup) { + if($backend instanceof ICountDisabledInGroup) { if($users === false) { //we could directly add to a bool variable, but this would //be ugly @@ -398,7 +398,7 @@ class Group implements IGroup { * @since 16.0.0 */ public function hideFromCollaboration(): bool { - return array_reduce($this->backends, function(bool $hide, GroupInterface $backend) { + return array_reduce($this->backends, function (bool $hide, GroupInterface $backend) { return $hide | ($backend instanceof IHideFromCollaborationBackend && $backend->hideGroup($this->gid)); }, false); } diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php index 97d71b51f98..3a2c08b0878 100644 --- a/lib/private/Group/MetaData.php +++ b/lib/private/Group/MetaData.php @@ -165,13 +165,13 @@ class MetaData { */ private function generateGroupMetaData(\OCP\IGroup $group, $userSearch) { return [ - 'id' => $group->getGID(), - 'name' => $group->getDisplayName(), - 'usercount' => $this->sorting === self::SORT_USERCOUNT ? $group->count($userSearch) : 0, - 'disabled' => $group->countDisabled(), - 'canAdd' => $group->canAddUser(), - 'canRemove' => $group->canRemoveUser(), - ]; + 'id' => $group->getGID(), + 'name' => $group->getDisplayName(), + 'usercount' => $this->sorting === self::SORT_USERCOUNT ? $group->count($userSearch) : 0, + 'disabled' => $group->countDisabled(), + 'canAdd' => $group->canAddUser(), + 'canRemove' => $group->canRemoveUser(), + ]; } /** diff --git a/lib/private/Installer.php b/lib/private/Installer.php index b3919f22d03..78925a56a2e 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -479,7 +479,7 @@ class Installer { * this has to be done by the function oc_app_uninstall(). */ public function removeApp($appId) { - if($this->isDownloaded( $appId )) { + if($this->isDownloaded($appId)) { if (\OC::$server->getAppManager()->isShipped($appId)) { return false; } @@ -528,10 +528,10 @@ class Installer { $config = \OC::$server->getConfig(); $errors = []; foreach(\OC::$APPSROOTS as $app_dir) { - if($dir = opendir( $app_dir['path'] )) { - while( false !== ( $filename = readdir( $dir ))) { - if( $filename[0] !== '.' and is_dir($app_dir['path']."/$filename") ) { - if( file_exists( $app_dir['path']."/$filename/appinfo/info.xml" )) { + if($dir = opendir($app_dir['path'])) { + while(false !== ($filename = readdir($dir))) { + if($filename[0] !== '.' and is_dir($app_dir['path']."/$filename")) { + if(file_exists($app_dir['path']."/$filename/appinfo/info.xml")) { if($config->getAppValue($filename, "installed_version", null) === null) { $info=OC_App::getAppInfo($filename); $enabled = isset($info['default_enable']); @@ -556,7 +556,7 @@ class Installer { } } } - closedir( $dir ); + closedir($dir); } } @@ -623,7 +623,7 @@ class Installer { * @param string $script */ private static function includeAppScript($script) { - if ( file_exists($script) ){ + if (file_exists($script)){ include $script; } } diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php index 57a80e6f4bd..725d72d9c79 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -239,10 +239,10 @@ class Checker { $signature = $privateKey->sign(json_encode($hashes)); return [ - 'hashes' => $hashes, - 'signature' => base64_encode($signature), - 'certificate' => $certificate->saveX509($certificate->currentCert), - ]; + 'hashes' => $hashes, + 'signature' => base64_encode($signature), + 'certificate' => $certificate->saveX509($certificate->currentCert), + ]; } /** @@ -509,10 +509,10 @@ class Checker { ); } catch (\Exception $e) { $result = [ - 'EXCEPTION' => [ - 'class' => \get_class($e), - 'message' => $e->getMessage(), - ], + 'EXCEPTION' => [ + 'class' => \get_class($e), + 'message' => $e->getMessage(), + ], ]; } $this->storeResults($appId, $result); @@ -559,10 +559,10 @@ class Checker { ); } catch (\Exception $e) { $result = [ - 'EXCEPTION' => [ - 'class' => \get_class($e), - 'message' => $e->getMessage(), - ], + 'EXCEPTION' => [ + 'class' => \get_class($e), + 'message' => $e->getMessage(), + ], ]; } $this->storeResults('core', $result); diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 91420b8d766..5624155dadd 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -114,7 +114,7 @@ class Factory implements IFactory { * @return \OCP\IL10N */ public function get($app, $lang = null, $locale = null) { - return new LazyL10N(function() use ($app, $lang, $locale) { + return new LazyL10N(function () use ($app, $lang, $locale) { $app = \OC_App::cleanAppId($app); if ($lang !== null) { @@ -369,7 +369,7 @@ class Factory implements IFactory { } $locales = $this->findAvailableLocales(); - $userLocale = array_filter($locales, function($value) use ($locale) { + $userLocale = array_filter($locales, function ($value) use ($locale) { return $locale === $value['code']; }); @@ -526,10 +526,10 @@ class Factory implements IFactory { return $this->pluralFunctions[$string]; } - if (preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s*plural=(.*)$/u', $string, $matches)) { + if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s*plural=(.*)$/u', $string, $matches)) { // sanitize - $nplurals = preg_replace( '/[^0-9]/', '', $matches[1] ); - $plural = preg_replace( '#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2] ); + $nplurals = preg_replace('/[^0-9]/', '', $matches[1]); + $plural = preg_replace('#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2]); $body = str_replace( [ 'plural', 'n', '$n$plurals', ], @@ -545,7 +545,7 @@ class Factory implements IFactory { $length = strlen($body); for($i = 0; $i < $length; $i++) { $ch = $body[$i]; - switch ( $ch ) { + switch ($ch) { case '?': $res .= ' ? ('; $p++; @@ -554,7 +554,7 @@ class Factory implements IFactory { $res .= ') : ('; break; case ';': - $res .= str_repeat( ')', $p ) . ';'; + $res .= str_repeat(')', $p) . ';'; $p = 0; break; default: @@ -627,7 +627,7 @@ class Factory implements IFactory { ksort($commonLanguages); // sort now by displayed language not the iso-code - usort( $languages, function ($a, $b) { + usort($languages, function ($a, $b) { if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) { // If a doesn't have a name, but b does, list b before a return 1; diff --git a/lib/private/L10N/L10N.php b/lib/private/L10N/L10N.php index 519ff45292b..ee339ba8840 100644 --- a/lib/private/L10N/L10N.php +++ b/lib/private/L10N/L10N.php @@ -221,7 +221,7 @@ class L10N implements IL10N { public function getPluralFormFunction(): \Closure { if (\is_null($this->pluralFormFunction)) { $lang = $this->getLanguageCode(); - $this->pluralFormFunction = function($n) use ($lang) { + $this->pluralFormFunction = function ($n) use ($lang) { return PluralizationRules::get($n, $lang); }; } diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index 7f6a329c22d..fb4ef1ce4f7 100755 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -34,23 +34,23 @@ namespace OC; */ class LargeFileHelper { /** - * pow(2, 53) as a base-10 string. - * @var string - */ + * pow(2, 53) as a base-10 string. + * @var string + */ const POW_2_53 = '9007199254740992'; /** - * pow(2, 53) - 1 as a base-10 string. - * @var string - */ + * pow(2, 53) - 1 as a base-10 string. + * @var string + */ const POW_2_53_MINUS_1 = '9007199254740991'; /** - * @brief Checks whether our assumptions hold on the PHP platform we are on. - * - * @throws \RunTimeException if our assumptions do not hold on the current - * PHP platform. - */ + * @brief Checks whether our assumptions hold on the PHP platform we are on. + * + * @throws \RunTimeException if our assumptions do not hold on the current + * PHP platform. + */ public function __construct() { $pow_2_53 = (float)self::POW_2_53_MINUS_1 + 1.0; if ($this->formatUnsignedInteger($pow_2_53) !== self::POW_2_53) { @@ -61,16 +61,16 @@ class LargeFileHelper { } /** - * @brief Formats a signed integer or float as an unsigned integer base-10 - * string. Passed strings will be checked for being base-10. - * - * @param int|float|string $number Number containing unsigned integer data - * - * @throws \UnexpectedValueException if $number is not a float, not an int - * and not a base-10 string. - * - * @return string Unsigned integer base-10 string - */ + * @brief Formats a signed integer or float as an unsigned integer base-10 + * string. Passed strings will be checked for being base-10. + * + * @param int|float|string $number Number containing unsigned integer data + * + * @throws \UnexpectedValueException if $number is not a float, not an int + * and not a base-10 string. + * + * @return string Unsigned integer base-10 string + */ public function formatUnsignedInteger($number) { if (is_float($number)) { // Undo the effect of the php.ini setting 'precision'. @@ -88,14 +88,14 @@ class LargeFileHelper { } /** - * @brief Tries to get the size of a file via various workarounds that - * even work for large files on 32-bit platforms. - * - * @param string $filename Path to the file. - * - * @return null|int|float Number of bytes as number (float or int) or - * null on failure. - */ + * @brief Tries to get the size of a file via various workarounds that + * even work for large files on 32-bit platforms. + * + * @param string $filename Path to the file. + * + * @return null|int|float Number of bytes as number (float or int) or + * null on failure. + */ public function getFileSize($filename) { $fileSize = $this->getFileSizeViaCurl($filename); if (!is_null($fileSize)) { @@ -109,13 +109,13 @@ class LargeFileHelper { } /** - * @brief Tries to get the size of a file via a CURL HEAD request. - * - * @param string $fileName Path to the file. - * - * @return null|int|float Number of bytes as number (float or int) or - * null on failure. - */ + * @brief Tries to get the size of a file via a CURL HEAD request. + * + * @param string $fileName Path to the file. + * + * @return null|int|float Number of bytes as number (float or int) or + * null on failure. + */ public function getFileSizeViaCurl($fileName) { if (\OC::$server->getIniWrapper()->getString('open_basedir') === '') { $encodedFileName = rawurlencode($fileName); @@ -137,13 +137,13 @@ class LargeFileHelper { } /** - * @brief Tries to get the size of a file via an exec() call. - * - * @param string $filename Path to the file. - * - * @return null|int|float Number of bytes as number (float or int) or - * null on failure. - */ + * @brief Tries to get the size of a file via an exec() call. + * + * @param string $filename Path to the file. + * + * @return null|int|float Number of bytes as number (float or int) or + * null on failure. + */ public function getFileSizeViaExec($filename) { if (\OC_Helper::is_function_enabled('exec')) { $os = strtolower(php_uname('s')); @@ -160,15 +160,15 @@ class LargeFileHelper { } /** - * @brief Gets the size of a file via a filesize() call and converts - * negative signed int to positive float. As the result of filesize() - * will wrap around after a file size of 2^32 bytes = 4 GiB, this - * should only be used as a last resort. - * - * @param string $filename Path to the file. - * - * @return int|float Number of bytes as number (float or int). - */ + * @brief Gets the size of a file via a filesize() call and converts + * negative signed int to positive float. As the result of filesize() + * will wrap around after a file size of 2^32 bytes = 4 GiB, this + * should only be used as a last resort. + * + * @param string $filename Path to the file. + * + * @return int|float Number of bytes as number (float or int). + */ public function getFileSizeNative($filename) { $result = filesize($filename); if ($result < 0) { diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 5fccb36acb1..57b4e9353ef 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -35,6 +35,7 @@ */ namespace OC\Log; + use OC\SystemConfig; use OCP\ILogger; use OCP\Log\IFileBased; diff --git a/lib/private/Log/Rotate.php b/lib/private/Log/Rotate.php index c7103b46075..a5fc7d5a0cd 100644 --- a/lib/private/Log/Rotate.php +++ b/lib/private/Log/Rotate.php @@ -24,6 +24,7 @@ */ namespace OC\Log; + use OCP\Log\RotationTrait; /** diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index f8af68faad3..c07556b6a62 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -47,7 +47,6 @@ use OCP\Mail\IMailer; use OCP\Mail\IMessage; use OCP\Mail\Events\BeforeMessageSent; - /** * Class Mailer provides some basic functions to create a mail message that can be used in combination with * \OC\Mail\Message. diff --git a/lib/private/Migration/ConsoleOutput.php b/lib/private/Migration/ConsoleOutput.php index 2efe898a01e..2ad42843dba 100644 --- a/lib/private/Migration/ConsoleOutput.php +++ b/lib/private/Migration/ConsoleOutput.php @@ -22,7 +22,6 @@ namespace OC\Migration; - use OCP\Migration\IOutput; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/private/Migration/SimpleOutput.php b/lib/private/Migration/SimpleOutput.php index 7f44db9e30a..11f2ed2837c 100644 --- a/lib/private/Migration/SimpleOutput.php +++ b/lib/private/Migration/SimpleOutput.php @@ -22,7 +22,6 @@ namespace OC\Migration; - use OCP\ILogger; use OCP\Migration\IOutput; diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 310201e812d..8d72040af9a 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -120,7 +120,7 @@ class NavigationManager implements INavigationManager { $result = $this->entries; if ($type !== 'all') { - $result = array_filter($this->entries, function($entry) use ($type) { + $result = array_filter($this->entries, function ($entry) use ($type) { return $entry['type'] === $type; }); } @@ -135,7 +135,7 @@ class NavigationManager implements INavigationManager { * @return array */ private function proceedNavigation(array $list): array { - uasort($list, function($a, $b) { + uasort($list, function ($a, $b) { if (isset($a['order']) && isset($b['order'])) { return ($a['order'] < $b['order']) ? -1 : 1; } else if (isset($a['order']) || isset($b['order'])) { diff --git a/lib/private/Notification/Action.php b/lib/private/Notification/Action.php index 93029bcd7ac..a04f622c3cb 100644 --- a/lib/private/Notification/Action.php +++ b/lib/private/Notification/Action.php @@ -25,7 +25,6 @@ declare(strict_types=1); namespace OC\Notification; - use OCP\Notification\IAction; class Action implements IAction { diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index b8b549663b1..3a19b0f49e6 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Notification; - use OCP\AppFramework\QueryException; use OCP\ILogger; use OCP\Notification\AlreadyProcessedException; diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php index 3e3a15a4f8a..8ac4e19b7d1 100644 --- a/lib/private/Notification/Notification.php +++ b/lib/private/Notification/Notification.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Notification; - use OCP\Notification\IAction; use OCP\Notification\INotification; use OCP\RichObjectStrings\InvalidObjectExeption; diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index bb597460f9d..4ee8518981c 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -330,9 +330,9 @@ class Generator { } /* - * Make sure the requested height and width fall within the max - * of the preview. - */ + * Make sure the requested height and width fall within the max + * of the preview. + */ if ($height > $maxHeight) { $ratio = $height / $maxHeight; $height = $maxHeight; diff --git a/lib/private/Remote/Api/ApiCollection.php b/lib/private/Remote/Api/ApiCollection.php index c1f2a732a8e..9ce4c7d0661 100644 --- a/lib/private/Remote/Api/ApiCollection.php +++ b/lib/private/Remote/Api/ApiCollection.php @@ -23,7 +23,6 @@ namespace OC\Remote\Api; - use OCP\Http\Client\IClientService; use OCP\Remote\Api\IApiCollection; use OCP\Remote\ICredentials; diff --git a/lib/private/Remote/Api/ApiFactory.php b/lib/private/Remote/Api/ApiFactory.php index 62f20e2787c..81bc41f9269 100644 --- a/lib/private/Remote/Api/ApiFactory.php +++ b/lib/private/Remote/Api/ApiFactory.php @@ -23,7 +23,6 @@ namespace OC\Remote\Api; - use OCP\Http\Client\IClientService; use OCP\Remote\Api\IApiFactory; use OCP\Remote\ICredentials; diff --git a/lib/private/Remote/Api/NotFoundException.php b/lib/private/Remote/Api/NotFoundException.php index 429d3e87a10..51ecfabd402 100644 --- a/lib/private/Remote/Api/NotFoundException.php +++ b/lib/private/Remote/Api/NotFoundException.php @@ -23,7 +23,6 @@ namespace OC\Remote\Api; - class NotFoundException extends \Exception { } diff --git a/lib/private/Remote/Api/OCS.php b/lib/private/Remote/Api/OCS.php index 553ac92df7a..6a32c83e086 100644 --- a/lib/private/Remote/Api/OCS.php +++ b/lib/private/Remote/Api/OCS.php @@ -23,7 +23,6 @@ namespace OC\Remote\Api; - use GuzzleHttp\Exception\ClientException; use OC\ForbiddenException; use OC\Remote\User; diff --git a/lib/private/Remote/Credentials.php b/lib/private/Remote/Credentials.php index 5a4654436b8..09f5e1cda78 100644 --- a/lib/private/Remote/Credentials.php +++ b/lib/private/Remote/Credentials.php @@ -23,7 +23,6 @@ namespace OC\Remote; - use OCP\Remote\ICredentials; class Credentials implements ICredentials { diff --git a/lib/private/Remote/InstanceFactory.php b/lib/private/Remote/InstanceFactory.php index 9d42353e792..a4445a8306b 100644 --- a/lib/private/Remote/InstanceFactory.php +++ b/lib/private/Remote/InstanceFactory.php @@ -23,7 +23,6 @@ namespace OC\Remote; - use OCP\Http\Client\IClientService; use OCP\ICache; use OCP\Remote\IInstanceFactory; diff --git a/lib/private/Remote/User.php b/lib/private/Remote/User.php index ef26171859a..5519d7dc22f 100644 --- a/lib/private/Remote/User.php +++ b/lib/private/Remote/User.php @@ -23,7 +23,6 @@ namespace OC\Remote; - use OCP\Remote\IUser; class User implements IUser { diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php index 0a651256d3a..c80da2914a4 100644 --- a/lib/private/RichObjectStrings/Validator.php +++ b/lib/private/RichObjectStrings/Validator.php @@ -25,7 +25,6 @@ namespace OC\RichObjectStrings; - use OCP\RichObjectStrings\Definitions; use OCP\RichObjectStrings\InvalidObjectExeption; use OCP\RichObjectStrings\IValidator; diff --git a/lib/private/Route/Route.php b/lib/private/Route/Route.php index 60b14efc7d6..705183d24ae 100644 --- a/lib/private/Route/Route.php +++ b/lib/private/Route/Route.php @@ -149,7 +149,7 @@ class Route extends SymfonyRoute implements IRoute { * @return void */ public function actionInclude($file) { - $function = function($param) use ($file) { + $function = function ($param) use ($file) { unset($param["_route"]); $_GET=array_merge($_GET, $param); unset($param); diff --git a/lib/private/Search.php b/lib/private/Search.php index ca9024bdd78..42a925f90d9 100644 --- a/lib/private/Search.php +++ b/lib/private/Search.php @@ -27,6 +27,7 @@ */ namespace OC; + use OCP\ISearch; use OCP\Search\PagedProvider; use OCP\Search\Provider; @@ -52,7 +53,7 @@ class Search implements ISearch { $results = []; foreach($this->providers as $provider) { /** @var $provider Provider */ - if ( ! $provider->providesResultsFor($inApps) ) { + if (! $provider->providesResultsFor($inApps)) { continue; } if ($provider instanceof PagedProvider) { @@ -108,7 +109,7 @@ class Search implements ISearch { * Create instances of all the registered search providers */ private function initProviders() { - if( ! empty($this->providers) ) { + if(! empty($this->providers)) { return; } foreach($this->registeredProviders as $provider) { diff --git a/lib/private/Search/Provider/File.php b/lib/private/Search/Provider/File.php index afd37cfe703..734878be982 100644 --- a/lib/private/Search/Provider/File.php +++ b/lib/private/Search/Provider/File.php @@ -27,6 +27,7 @@ */ namespace OC\Search\Provider; + use OC\Files\Filesystem; /** diff --git a/lib/private/Search/Result/Audio.php b/lib/private/Search/Result/Audio.php index a035f51b38b..67a6add04bf 100644 --- a/lib/private/Search/Result/Audio.php +++ b/lib/private/Search/Result/Audio.php @@ -31,7 +31,7 @@ class Audio extends File { /** * Type name; translated in templates - * @var string + * @var string */ public $type = 'audio'; diff --git a/lib/private/Search/Result/File.php b/lib/private/Search/Result/File.php index 09d2afb2617..cd605c49821 100644 --- a/lib/private/Search/Result/File.php +++ b/lib/private/Search/Result/File.php @@ -24,6 +24,7 @@ */ namespace OC\Search\Result; + use OCP\Files\FileInfo; use OCP\Files\Folder; @@ -34,7 +35,7 @@ class File extends \OCP\Search\Result { /** * Type name; translated in templates - * @var string + * @var string */ public $type = 'file'; @@ -46,7 +47,7 @@ class File extends \OCP\Search\Result { /** * Size, in bytes - * @var int + * @var int */ public $size; @@ -64,7 +65,7 @@ class File extends \OCP\Search\Result { /** * File permissions: - * + * * @var string */ public $permissions; @@ -105,7 +106,7 @@ class File extends \OCP\Search\Result { * @param string $path * @return string relative path */ - protected function getRelativePath ($path) { + protected function getRelativePath($path) { if (!isset(self::$userFolderCache)) { $user = \OC::$server->getUserSession()->getUser()->getUID(); self::$userFolderCache = \OC::$server->getUserFolder($user); diff --git a/lib/private/Search/Result/Folder.php b/lib/private/Search/Result/Folder.php index 1626f9d67d2..0a746221ee0 100644 --- a/lib/private/Search/Result/Folder.php +++ b/lib/private/Search/Result/Folder.php @@ -31,7 +31,7 @@ class Folder extends File { /** * Type name; translated in templates - * @var string + * @var string */ public $type = 'folder'; diff --git a/lib/private/Search/Result/Image.php b/lib/private/Search/Result/Image.php index 02973855efb..21123a4de13 100644 --- a/lib/private/Search/Result/Image.php +++ b/lib/private/Search/Result/Image.php @@ -31,7 +31,7 @@ class Image extends File { /** * Type name; translated in templates - * @var string + * @var string */ public $type = 'image'; diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php index b5a4dfbfaff..8e58e9bde9a 100644 --- a/lib/private/Security/Bruteforce/Throttler.php +++ b/lib/private/Security/Bruteforce/Throttler.php @@ -144,7 +144,7 @@ class Throttler { } $keys = $this->config->getAppKeys('bruteForce'); - $keys = array_filter($keys, function($key) { + $keys = array_filter($keys, function ($key) { $regex = '/^whitelist_/S'; return preg_match($regex, $key) === 1; }); diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php index 473e56cdd51..c1789da6ad7 100644 --- a/lib/private/Security/TrustedDomainHelper.php +++ b/lib/private/Security/TrustedDomainHelper.php @@ -26,6 +26,7 @@ */ namespace OC\Security; + use OC\AppFramework\Http\Request; use OCP\IConfig; @@ -97,11 +98,11 @@ class TrustedDomainHelper { if (gettype($trusted) !== 'string') { break; } - $regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/i'; + $regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function ($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/i'; if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) { - return true; - } - } - return false; + return true; + } + } + return false; } } diff --git a/lib/private/Server.php b/lib/private/Server.php index 4e62e2d2916..026dcdf9a85 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -700,7 +700,7 @@ class Server extends ServerContainer implements IServerContainer { }); $this->registerAlias(IValidator::class, Validator::class); - $this->registerService(AvatarManager::class, function(Server $c) { + $this->registerService(AvatarManager::class, function (Server $c) { return new AvatarManager( $c->query(\OC\User\Manager::class), $c->getAppDataDir('avatar'), @@ -1085,7 +1085,7 @@ class Server extends ServerContainer implements IServerContainer { $factory = new $factoryClass($this); $manager = $factory->getManager(); - $manager->registerDisplayNameResolver('user', function($id) use ($c) { + $manager->registerDisplayNameResolver('user', function ($id) use ($c) { $manager = $c->getUserManager(); $user = $manager->get($id); if(is_null($user)) { @@ -1231,7 +1231,7 @@ class Server extends ServerContainer implements IServerContainer { }); $this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class); - $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) { + $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) { $instance = new Collaboration\Collaborators\Search($c); // register default plugins @@ -1316,7 +1316,7 @@ class Server extends ServerContainer implements IServerContainer { ); }); - $this->registerService(Installer::class, function(Server $c) { + $this->registerService(Installer::class, function (Server $c) { return new Installer( $c->getAppFetcher(), $c->getHTTPClientService(), @@ -1327,16 +1327,16 @@ class Server extends ServerContainer implements IServerContainer { ); }); - $this->registerService(IApiFactory::class, function(Server $c) { + $this->registerService(IApiFactory::class, function (Server $c) { return new ApiFactory($c->getHTTPClientService()); }); - $this->registerService(IInstanceFactory::class, function(Server $c) { + $this->registerService(IInstanceFactory::class, function (Server $c) { $memcacheFactory = $c->getMemCacheFactory(); return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->getHTTPClientService()); }); - $this->registerService(IContactsStore::class, function(Server $c) { + $this->registerService(IContactsStore::class, function (Server $c) { return new ContactsStore( $c->getContactsManager(), $c->getConfig(), @@ -1347,7 +1347,7 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias(IContactsStore::class, ContactsStore::class); $this->registerAlias(IAccountManager::class, AccountManager::class); - $this->registerService(IStorageFactory::class, function() { + $this->registerService(IStorageFactory::class, function () { return new StorageFactory(); }); @@ -1386,7 +1386,7 @@ class Server extends ServerContainer implements IServerContainer { $dispatcher = $this->getEventDispatcher(); // Delete avatar on user deletion - $dispatcher->addListener('OCP\IUser::preDelete', function(GenericEvent $e) { + $dispatcher->addListener('OCP\IUser::preDelete', function (GenericEvent $e) { $logger = $this->getLogger(); $manager = $this->getAvatarManager(); /** @var IUser $user */ @@ -2141,7 +2141,7 @@ class Server extends ServerContainer implements IServerContainer { /** * @return \OCP\Collaboration\AutoComplete\IManager */ - public function getAutoCompleteManager(){ + public function getAutoCompleteManager() { return $this->query(IManager::class); } diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php index 8f2f2a93503..13fb70ddd44 100644 --- a/lib/private/ServerContainer.php +++ b/lib/private/ServerContainer.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC; - use OC\AppFramework\App; use OC\AppFramework\DependencyInjection\DIContainer; use OC\AppFramework\Utility\SimpleContainer; diff --git a/lib/private/ServerNotAvailableException.php b/lib/private/ServerNotAvailableException.php index a78d470e2a6..1dd93aefb20 100644 --- a/lib/private/ServerNotAvailableException.php +++ b/lib/private/ServerNotAvailableException.php @@ -22,7 +22,6 @@ namespace OC; - class ServerNotAvailableException extends \Exception { } diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php index a0178c7eea2..da9bf950ba2 100644 --- a/lib/private/Session/CryptoSessionData.php +++ b/lib/private/Session/CryptoSessionData.php @@ -50,7 +50,7 @@ class CryptoSessionData implements \ArrayAccess, ISession { protected $sessionValues; /** @var bool */ protected $isModified = false; - CONST encryptedSessionName = 'encrypted_session_data'; + const encryptedSessionName = 'encrypted_session_data'; /** * @param ISession $session diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 81b29020287..ac4f8f9342c 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -230,7 +230,7 @@ class Manager implements IManager { */ public function getAdminSettings($section, bool $subAdminOnly = false): array { if ($subAdminOnly) { - $subAdminSettingsFilter = function(ISettings $settings) { + $subAdminSettingsFilter = function (ISettings $settings) { return $settings instanceof ISubAdminSettings; }; $appSettings = $this->getSettings('admin', $section, $subAdminSettingsFilter); diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index 2bc2afbea2e..9b74239d69d 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -854,7 +854,7 @@ class Share extends Constants { } // Add display names to result $row['share_with_displayname'] = $row['share_with']; - if ( isset($row['share_with']) && $row['share_with'] != '' && + if (isset($row['share_with']) && $row['share_with'] != '' && $row['share_type'] === self::SHARE_TYPE_USER) { $shareWithUser = \OC::$server->getUserManager()->get($row['share_with']); $row['share_with_displayname'] = $shareWithUser === null ? $row['share_with'] : $shareWithUser->getDisplayName(); @@ -869,7 +869,7 @@ class Share extends Constants { } } } - if ( isset($row['uid_owner']) && $row['uid_owner'] != '') { + if (isset($row['uid_owner']) && $row['uid_owner'] != '') { $ownerUser = \OC::$server->getUserManager()->get($row['uid_owner']); $row['displayname_owner'] = $ownerUser === null ? $row['uid_owner'] : $ownerUser->getDisplayName(); } @@ -975,7 +975,7 @@ class Share extends Constants { // filter out invalid items, these can appear when subshare entries exist // for a group in which the requested user isn't a member any more - $items = array_filter($items, function($item) { + $items = array_filter($items, function ($item) { return $item['share_type'] !== self::$shareTypeGroupUserUnique; }); @@ -1018,7 +1018,7 @@ class Share extends Constants { // for file/folder shares we need to compare file_source, otherwise we compare item_source // only group shares if they already point to the same target, otherwise the file where shared // before grouping of shares was added. In this case we don't group them toi avoid confusions - if (( $fileSharing && $item['file_source'] === $r['file_source'] && $item['file_target'] === $r['file_target']) || + if (($fileSharing && $item['file_source'] === $r['file_source'] && $item['file_target'] === $r['file_target']) || (!$fileSharing && $item['item_source'] === $r['item_source'] && $item['item_target'] === $r['item_target'])) { // add the first item to the list of grouped shares if (!isset($result[$key]['grouped'])) { @@ -1359,7 +1359,7 @@ class Share extends Constants { $select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `item_target`,' . '`*PREFIX*share`.`parent`, `share_type`, `share_with`, `uid_owner`,' . '`file_source`, `path`, `file_target`, `*PREFIX*share`.`permissions`,' - . '`stime`, `expiration`, `token`, `storage`, `mail_send`,' + . '`stime`, `expiration`, `token`, `storage`, `mail_send`,' . '`*PREFIX*storages`.`id` AS `storage_id`, `*PREFIX*filecache`.`parent` as `file_parent`'; } } diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 065d06de37e..1c0ec194528 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -838,7 +838,7 @@ class DefaultShareProvider implements IShareProvider { $pathSections = explode('/', $data['path'], 2); // FIXME: would not detect rare md5'd home storage case properly if ($pathSections[0] !== 'files' - && in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) { + && in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) { return false; } return true; @@ -933,8 +933,8 @@ class DefaultShareProvider implements IShareProvider { } - $groups = array_filter($groups, function($group) { return $group instanceof IGroup; }); - $groups = array_map(function(IGroup $group) { return $group->getGID(); }, $groups); + $groups = array_filter($groups, function ($group) { return $group instanceof IGroup; }); + $groups = array_map(function (IGroup $group) { return $group->getGID(); }, $groups); $qb->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_GROUP))) ->andWhere($qb->expr()->in('share_with', $qb->createNamedParameter( @@ -961,8 +961,8 @@ class DefaultShareProvider implements IShareProvider { } /* - * Resolve all group shares to user specific shares - */ + * Resolve all group shares to user specific shares + */ $shares = $this->resolveGroupShares($shares2, $userId); } else { throw new BackendError('Invalid backend'); diff --git a/lib/private/Share20/Exception/ProviderException.php b/lib/private/Share20/Exception/ProviderException.php index 360f42f63f0..7d3f79f7120 100644 --- a/lib/private/Share20/Exception/ProviderException.php +++ b/lib/private/Share20/Exception/ProviderException.php @@ -22,7 +22,6 @@ namespace OC\Share20\Exception; - class ProviderException extends \Exception { } diff --git a/lib/private/Share20/LegacyHooks.php b/lib/private/Share20/LegacyHooks.php index 5cfc1cc27e3..f292499584e 100644 --- a/lib/private/Share20/LegacyHooks.php +++ b/lib/private/Share20/LegacyHooks.php @@ -75,7 +75,7 @@ class LegacyHooks { /** @var IShare[] $deletedShares */ $deletedShares = $e->getArgument('deletedShares'); - $formattedDeletedShares = array_map(function($share) { + $formattedDeletedShares = array_map(function ($share) { return $this->formatHookParams($share); }, $deletedShares); diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 4e1f6567e6b..c56db22c883 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -932,7 +932,7 @@ class Manager implements IManager { // We can only change the recipient on user shares if ($share->getSharedWith() !== $originalShare->getSharedWith() && - $share->getShareType() !== \OCP\Share::SHARE_TYPE_USER) { + $share->getShareType() !== \OCP\Share::SHARE_TYPE_USER) { throw new \InvalidArgumentException('Can only update recipient on user shares'); } @@ -1200,7 +1200,7 @@ class Manager implements IManager { public function getSharesInFolder($userId, Folder $node, $reshares = false) { $providers = $this->factory->getAllProviders(); - return array_reduce($providers, function($shares, IShareProvider $provider) use ($userId, $node, $reshares) { + return array_reduce($providers, function ($shares, IShareProvider $provider) use ($userId, $node, $reshares) { $newShares = $provider->getSharesInFolder($userId, $node, $reshares); foreach ($newShares as $fid => $data) { if (!isset($shares[$fid])) { @@ -1318,7 +1318,7 @@ class Manager implements IManager { $shares = $this->getSharedWith($userId, $shareType, $node, $limit, $offset); // Only get deleted shares - $shares = array_filter($shares, function(IShare $share) { + $shares = array_filter($shares, function (IShare $share) { return $share->getPermissions() === 0; }); diff --git a/lib/private/Streamer.php b/lib/private/Streamer.php index 939bb4ea5d8..47348447e6d 100644 --- a/lib/private/Streamer.php +++ b/lib/private/Streamer.php @@ -52,7 +52,7 @@ class Streamer { * @param int $numberOfFiles The number of files (and directories) that will * be included in the streamed file */ - public function __construct(IRequest $request, int $size, int $numberOfFiles){ + public function __construct(IRequest $request, int $size, int $numberOfFiles) { /** * zip32 constraints for a basic (without compression, volumes nor @@ -89,7 +89,7 @@ class Streamer { * Send HTTP headers * @param string $name */ - public function sendHeaders($name){ + public function sendHeaders($name) { $extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar'; $fullName = $name . $extension; $this->streamerInstance->sendHeaders($fullName); @@ -169,7 +169,7 @@ class Streamer { * @param string $dirName Directory Path and name to be added to the archive. * @return bool $success */ - public function addEmptyDir($dirName){ + public function addEmptyDir($dirName) { return $this->streamerInstance->addEmptyDir($dirName); } @@ -179,7 +179,7 @@ class Streamer { * closing, the file is completely written to the output stream. * @return bool $success */ - public function finalize(){ + public function finalize() { return $this->streamerInstance->finalize(); } } diff --git a/lib/private/SubAdmin.php b/lib/private/SubAdmin.php index ce2a38ccbf6..8a8cbdb9813 100644 --- a/lib/private/SubAdmin.php +++ b/lib/private/SubAdmin.php @@ -54,16 +54,16 @@ class SubAdmin extends PublicEmitter implements ISubAdmin { * @param IDBConnection $dbConn */ public function __construct(IUserManager $userManager, - IGroupManager $groupManager, + IGroupManager $groupManager, IDBConnection $dbConn) { $this->userManager = $userManager; $this->groupManager = $groupManager; $this->dbConn = $dbConn; - $this->userManager->listen('\OC\User', 'postDelete', function($user) { + $this->userManager->listen('\OC\User', 'postDelete', function ($user) { $this->post_deleteUser($user); }); - $this->groupManager->listen('\OC\Group', 'postDelete', function($group) { + $this->groupManager->listen('\OC\Group', 'postDelete', function ($group) { $this->post_deleteGroup($group); }); } @@ -135,7 +135,7 @@ class SubAdmin extends PublicEmitter implements ISubAdmin { * @return array ['displayName' => displayname] */ public function getSubAdminsGroupsName(IUser $user): array { - return array_map(function($group) { + return array_map(function ($group) { return ['displayName' => $group->getDisplayName()]; }, $this->getSubAdminsGroups($user)); } diff --git a/lib/private/SystemConfig.php b/lib/private/SystemConfig.php index 321ec61e048..7f0114ec821 100644 --- a/lib/private/SystemConfig.php +++ b/lib/private/SystemConfig.php @@ -27,7 +27,6 @@ namespace OC; - use OCP\IConfig; /** diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php index f73bb3f5f12..179e16f8e17 100644 --- a/lib/private/SystemTag/SystemTagObjectMapper.php +++ b/lib/private/SystemTag/SystemTagObjectMapper.php @@ -51,12 +51,12 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { protected $dispatcher; /** - * Constructor. - * - * @param IDBConnection $connection database connection - * @param ISystemTagManager $tagManager system tag manager - * @param EventDispatcherInterface $dispatcher - */ + * Constructor. + * + * @param IDBConnection $connection database connection + * @param ISystemTagManager $tagManager system tag manager + * @param EventDispatcherInterface $dispatcher + */ public function __construct(IDBConnection $connection, ISystemTagManager $tagManager, EventDispatcherInterface $dispatcher) { $this->connection = $connection; $this->tagManager = $tagManager; @@ -259,7 +259,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { if (\count($tags) !== \count($tagIds)) { // at least one tag missing, bail out $foundTagIds = array_map( - function(ISystemTag $tag) { + function (ISystemTag $tag) { return $tag->getId(); }, $tags diff --git a/lib/private/TagManager.php b/lib/private/TagManager.php index ccb2e796155..52d000f8c94 100644 --- a/lib/private/TagManager.php +++ b/lib/private/TagManager.php @@ -56,11 +56,11 @@ class TagManager implements \OCP\ITagManager { private $mapper; /** - * Constructor. - * - * @param TagMapper $mapper Instance of the TagMapper abstraction layer. - * @param \OCP\IUserSession $userSession the user session - */ + * Constructor. + * + * @param TagMapper $mapper Instance of the TagMapper abstraction layer. + * @param \OCP\IUserSession $userSession the user session + */ public function __construct(TagMapper $mapper, \OCP\IUserSession $userSession) { $this->mapper = $mapper; $this->userSession = $userSession; @@ -68,16 +68,16 @@ class TagManager implements \OCP\ITagManager { } /** - * Create a new \OCP\ITags instance and load tags from db. - * - * @see \OCP\ITags - * @param string $type The type identifier e.g. 'contact' or 'event'. - * @param array $defaultTags An array of default tags to be used if none are stored. - * @param boolean $includeShared Whether to include tags for items shared with this user by others. - * @param string $userId user for which to retrieve the tags, defaults to the currently - * logged in user - * @return \OCP\ITags - */ + * Create a new \OCP\ITags instance and load tags from db. + * + * @see \OCP\ITags + * @param string $type The type identifier e.g. 'contact' or 'event'. + * @param array $defaultTags An array of default tags to be used if none are stored. + * @param boolean $includeShared Whether to include tags for items shared with this user by others. + * @param string $userId user for which to retrieve the tags, defaults to the currently + * logged in user + * @return \OCP\ITags + */ public function load($type, $defaultTags = [], $includeShared = false, $userId = null) { if (is_null($userId)) { $user = $this->userSession->getUser(); diff --git a/lib/private/Tagging/Tag.php b/lib/private/Tagging/Tag.php index eacb272ca7a..f818a115b25 100644 --- a/lib/private/Tagging/Tag.php +++ b/lib/private/Tagging/Tag.php @@ -43,12 +43,12 @@ class Tag extends Entity { protected $name; /** - * Constructor. - * - * @param string $owner The tag's owner - * @param string $type The type of item this tag is used for - * @param string $name The tag's name - */ + * Constructor. + * + * @param string $owner The tag's owner + * @param string $type The type of item this tag is used for + * @param string $name The tag's name + */ public function __construct($owner = null, $type = null, $name = null) { $this->setOwner($owner); $this->setType($type); @@ -63,13 +63,13 @@ class Tag extends Entity { * @todo migrate existing database columns to the correct names * to be able to drop this direct mapping */ - public function columnToProperty($columnName){ + public function columnToProperty($columnName) { if ($columnName === 'category') { - return 'name'; + return 'name'; } elseif ($columnName === 'uid') { - return 'owner'; + return 'owner'; } else { - return parent::columnToProperty($columnName); + return parent::columnToProperty($columnName); } } @@ -79,13 +79,13 @@ class Tag extends Entity { * @param string $property the name of the property * @return string the column name */ - public function propertyToColumn($property){ + public function propertyToColumn($property) { if ($property === 'name') { - return 'category'; + return 'category'; } elseif ($property === 'owner') { - return 'uid'; + return 'uid'; } else { - return parent::propertyToColumn($property); + return parent::propertyToColumn($property); } } } diff --git a/lib/private/Tagging/TagMapper.php b/lib/private/Tagging/TagMapper.php index c021c3646a4..2ffb663aeff 100644 --- a/lib/private/Tagging/TagMapper.php +++ b/lib/private/Tagging/TagMapper.php @@ -36,21 +36,21 @@ use OCP\IDBConnection; class TagMapper extends Mapper { /** - * Constructor. - * - * @param IDBConnection $db Instance of the Db abstraction layer. - */ + * Constructor. + * + * @param IDBConnection $db Instance of the Db abstraction layer. + */ public function __construct(IDBConnection $db) { parent::__construct($db, 'vcategory', Tag::class); } /** - * Load tags from the database. - * - * @param array|string $owners The user(s) whose tags we are going to load. - * @param string $type The type of item for which we are loading tags. - * @return array An array of Tag objects. - */ + * Load tags from the database. + * + * @param array|string $owners The user(s) whose tags we are going to load. + * @param string $type The type of item for which we are loading tags. + * @return array An array of Tag objects. + */ public function loadTags($owners, $type) { if(!is_array($owners)) { $owners = [$owners]; @@ -62,11 +62,11 @@ class TagMapper extends Mapper { } /** - * Check if a given Tag object already exists in the database. - * - * @param Tag $tag The tag to look for in the database. - * @return bool - */ + * Check if a given Tag object already exists in the database. + * + * @param Tag $tag The tag to look for in the database. + * @return bool + */ public function tagExists($tag) { $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` ' . 'WHERE `uid` = ? AND `type` = ? AND `category` = ?'; diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 8e26cccb408..4d05beb259c 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -116,14 +116,14 @@ class Tags implements ITags { const RELATION_TABLE = '*PREFIX*vcategory_to_object'; /** - * Constructor. - * - * @param TagMapper $mapper Instance of the TagMapper abstraction layer. - * @param string $user The user whose data the object will operate on. - * @param string $type The type of items for which tags will be loaded. - * @param array $defaultTags Tags that should be created at construction. - * @param boolean $includeShared Whether to include tags for items shared with this user by others. - */ + * Constructor. + * + * @param TagMapper $mapper Instance of the TagMapper abstraction layer. + * @param string $user The user whose data the object will operate on. + * @param string $type The type of items for which tags will be loaded. + * @param array $defaultTags Tags that should be created at construction. + * @param boolean $includeShared Whether to include tags for items shared with this user by others. + */ public function __construct(TagMapper $mapper, $user, $type, $defaultTags = [], $includeShared = false) { $this->mapper = $mapper; $this->user = $user; @@ -142,21 +142,21 @@ class Tags implements ITags { } /** - * Check if any tags are saved for this type and user. - * - * @return boolean - */ + * Check if any tags are saved for this type and user. + * + * @return boolean + */ public function isEmpty() { return count($this->tags) === 0; } /** - * Returns an array mapping a given tag's properties to its values: - * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] - * - * @param string $id The ID of the tag that is going to be mapped - * @return array|false - */ + * Returns an array mapping a given tag's properties to its values: + * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] + * + * @param string $id The ID of the tag that is going to be mapped + * @return array|false + */ public function getTag($id) { $key = $this->getTagById($id); if ($key !== false) { @@ -166,22 +166,22 @@ class Tags implements ITags { } /** - * Get the tags for a specific user. - * - * This returns an array with maps containing each tag's properties: - * [ - * ['id' => 0, 'name' = 'First tag', 'owner' = 'User', 'type' => 'tagtype'], - * ['id' => 1, 'name' = 'Shared tag', 'owner' = 'Other user', 'type' => 'tagtype'], - * ] - * - * @return array - */ + * Get the tags for a specific user. + * + * This returns an array with maps containing each tag's properties: + * [ + * ['id' => 0, 'name' = 'First tag', 'owner' = 'User', 'type' => 'tagtype'], + * ['id' => 1, 'name' = 'Shared tag', 'owner' = 'Other user', 'type' => 'tagtype'], + * ] + * + * @return array + */ public function getTags() { if(!count($this->tags)) { return []; } - usort($this->tags, function($a, $b) { + usort($this->tags, function ($a, $b) { return strnatcasecmp($a->getName(), $b->getName()); }); $tagMap = []; @@ -196,15 +196,15 @@ class Tags implements ITags { } /** - * Return only the tags owned by the given user, omitting any tags shared - * by other users. - * - * @param string $user The user whose tags are to be checked. - * @return array An array of Tag objects. - */ + * Return only the tags owned by the given user, omitting any tags shared + * by other users. + * + * @param string $user The user whose tags are to be checked. + * @return array An array of Tag objects. + */ public function getTagsForUser($user) { return array_filter($this->tags, - function($tag) use($user) { + function ($tag) use ($user) { return $tag->getOwner() === $user; } ); @@ -256,14 +256,14 @@ class Tags implements ITags { } /** - * Get the a list if items tagged with $tag. - * - * Throws an exception if the tag could not be found. - * - * @param string $tag Tag id or name. - * @return array|false An array of object ids or false on error. - * @throws \Exception - */ + * Get the a list if items tagged with $tag. + * + * Throws an exception if the tag could not be found. + * + * @param string $tag Tag id or name. + * @return array|false An array of object ids or false on error. + * @throws \Exception + */ public function getIdsForTag($tag) { $result = null; $tagId = false; @@ -306,7 +306,7 @@ class Tags implements ITags { } if(!is_null($result)) { - while( $row = $result->fetchRow()) { + while($row = $result->fetchRow()) { $id = (int)$row['objid']; if ($this->includeShared) { @@ -330,34 +330,34 @@ class Tags implements ITags { } /** - * Checks whether a tag is saved for the given user, - * disregarding the ones shared with him or her. - * - * @param string $name The tag name to check for. - * @param string $user The user whose tags are to be checked. - * @return bool - */ + * Checks whether a tag is saved for the given user, + * disregarding the ones shared with him or her. + * + * @param string $name The tag name to check for. + * @param string $user The user whose tags are to be checked. + * @return bool + */ public function userHasTag($name, $user) { $key = $this->array_searchi($name, $this->getTagsForUser($user)); return ($key !== false) ? $this->tags[$key]->getId() : false; } /** - * Checks whether a tag is saved for or shared with the current user. - * - * @param string $name The tag name to check for. - * @return bool - */ + * Checks whether a tag is saved for or shared with the current user. + * + * @param string $name The tag name to check for. + * @return bool + */ public function hasTag($name) { return $this->getTagId($name) !== false; } /** - * Add a new tag. - * - * @param string $name A string with a name of the tag - * @return false|int the id of the added tag or false on error. - */ + * Add a new tag. + * + * @param string $name A string with a name of the tag + * @return false|int the id of the added tag or false on error. + */ public function add($name) { $name = trim($name); @@ -386,12 +386,12 @@ class Tags implements ITags { } /** - * Rename tag. - * - * @param string|integer $from The name or ID of the existing tag - * @param string $to The new name of the tag. - * @return bool - */ + * Rename tag. + * + * @param string|integer $from The name or ID of the existing tag + * @param string $to The new name of the tag. + * @return bool + */ public function rename($from, $to) { $from = trim($from); $to = trim($to); @@ -432,14 +432,14 @@ class Tags implements ITags { } /** - * Add a list of new tags. - * - * @param string[] $names A string with a name or an array of strings containing - * the name(s) of the tag(s) to add. - * @param bool $sync When true, save the tags - * @param int|null $id int Optional object id to add to this|these tag(s) - * @return bool Returns false on error. - */ + * Add a list of new tags. + * + * @param string[] $names A string with a name or an array of strings containing + * the name(s) of the tag(s) to add. + * @param bool $sync When true, save the tags + * @param int|null $id int Optional object id to add to this|these tag(s) + * @return bool Returns false on error. + */ public function addMultiple($names, $sync=false, $id = null) { if(!is_array($names)) { $names = [$names]; @@ -452,7 +452,7 @@ class Tags implements ITags { if(!$this->hasTag($name) && $name !== '') { $newones[] = new Tag($this->user, $this->type, $name); } - if(!is_null($id) ) { + if(!is_null($id)) { // Insert $objectid, $categoryid pairs if not exist. self::$relations[] = ['objid' => $id, 'tag' => $name]; } @@ -504,7 +504,7 @@ class Tags implements ITags { 'objid' => $relation['objid'], 'categoryid' => $tagId, 'type' => $this->type, - ]); + ]); } catch(\Exception $e) { \OC::$server->getLogger()->logException($e, [ 'message' => __METHOD__, @@ -522,12 +522,12 @@ class Tags implements ITags { } /** - * Delete tags and tag/object relations for a user. - * - * For hooking up on post_deleteUser - * - * @param array $arguments - */ + * Delete tags and tag/object relations for a user. + * + * For hooking up on post_deleteUser + * + * @param array $arguments + */ public static function post_deleteUser($arguments) { // Find all objectid/tagId pairs. $result = null; @@ -550,7 +550,7 @@ class Tags implements ITags { try { $stmt = \OC_DB::prepare('DELETE FROM `' . self::RELATION_TABLE . '` ' . 'WHERE `categoryid` = ?'); - while( $row = $result->fetchRow()) { + while($row = $result->fetchRow()) { try { $stmt->execute([$row['id']]); } catch(\Exception $e) { @@ -586,11 +586,11 @@ class Tags implements ITags { } /** - * Delete tag/object relations from the db - * - * @param array $ids The ids of the objects - * @return boolean Returns false on error. - */ + * Delete tag/object relations from the db + * + * @param array $ids The ids of the objects + * @return boolean Returns false on error. + */ public function purgeObjects(array $ids) { if(count($ids) === 0) { // job done ;) @@ -620,10 +620,10 @@ class Tags implements ITags { } /** - * Get favorites for an object type - * - * @return array|false An array of object ids. - */ + * Get favorites for an object type + * + * @return array|false An array of object ids. + */ public function getFavorites() { if(!$this->userHasTag(ITags::TAG_FAVORITE, $this->user)) { return []; @@ -642,11 +642,11 @@ class Tags implements ITags { } /** - * Add an object to favorites - * - * @param int $objid The id of the object - * @return boolean - */ + * Add an object to favorites + * + * @param int $objid The id of the object + * @return boolean + */ public function addToFavorites($objid) { if(!$this->userHasTag(ITags::TAG_FAVORITE, $this->user)) { $this->add(ITags::TAG_FAVORITE); @@ -655,22 +655,22 @@ class Tags implements ITags { } /** - * Remove an object from favorites - * - * @param int $objid The id of the object - * @return boolean - */ + * Remove an object from favorites + * + * @param int $objid The id of the object + * @return boolean + */ public function removeFromFavorites($objid) { return $this->unTag($objid, ITags::TAG_FAVORITE); } /** - * Creates a tag/object relation. - * - * @param int $objid The id of the object - * @param string $tag The id or name of the tag - * @return boolean Returns false on error. - */ + * Creates a tag/object relation. + * + * @param int $objid The id of the object + * @param string $tag The id or name of the tag + * @return boolean Returns false on error. + */ public function tagAs($objid, $tag) { if(is_string($tag) && !is_numeric($tag)) { $tag = trim($tag); @@ -704,12 +704,12 @@ class Tags implements ITags { } /** - * Delete single tag/object relation from the db - * - * @param int $objid The id of the object - * @param string $tag The id or name of the tag - * @return boolean - */ + * Delete single tag/object relation from the db + * + * @param int $objid The id of the object + * @param string $tag The id or name of the tag + * @return boolean + */ public function unTag($objid, $tag) { if(is_string($tag) && !is_numeric($tag)) { $tag = trim($tag); @@ -739,11 +739,11 @@ class Tags implements ITags { } /** - * Delete tags from the database. - * - * @param string[]|integer[] $names An array of tags (names or IDs) to delete - * @return bool Returns false on error - */ + * Delete tags from the database. + * + * @param string[]|integer[] $names An array of tags (names or IDs) to delete + * @return bool Returns false on error + */ public function delete($names) { if(!is_array($names)) { $names = [$names]; @@ -802,18 +802,18 @@ class Tags implements ITags { return false; } return array_search(strtolower($needle), array_map( - function($tag) use($mem) { + function ($tag) use ($mem) { return strtolower(call_user_func([$tag, $mem])); }, $haystack) ); } /** - * Get a tag's ID. - * - * @param string $name The tag name to look for. - * @return string|bool The tag's id or false if no matching tag is found. - */ + * Get a tag's ID. + * + * @param string $name The tag name to look for. + * @return string|bool The tag's id or false if no matching tag is found. + */ private function getTagId($name) { $key = $this->array_searchi($name, $this->tags); if ($key !== false) { @@ -823,34 +823,34 @@ class Tags implements ITags { } /** - * Get a tag by its name. - * - * @param string $name The tag name. - * @return integer|bool The tag object's offset within the $this->tags - * array or false if it doesn't exist. - */ + * Get a tag by its name. + * + * @param string $name The tag name. + * @return integer|bool The tag object's offset within the $this->tags + * array or false if it doesn't exist. + */ private function getTagByName($name) { return $this->array_searchi($name, $this->tags, 'getName'); } /** - * Get a tag by its ID. - * - * @param string $id The tag ID to look for. - * @return integer|bool The tag object's offset within the $this->tags - * array or false if it doesn't exist. - */ + * Get a tag by its ID. + * + * @param string $id The tag ID to look for. + * @return integer|bool The tag object's offset within the $this->tags + * array or false if it doesn't exist. + */ private function getTagById($id) { return $this->array_searchi($id, $this->tags, 'getId'); } /** - * Returns an array mapping a given tag's properties to its values: - * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] - * - * @param Tag $tag The tag that is going to be mapped - * @return array - */ + * Returns an array mapping a given tag's properties to its values: + * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] + * + * @param Tag $tag The tag that is going to be mapped + * @return array + */ private function tagMap(Tag $tag) { return [ 'id' => $tag->getId(), diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php index 9ac74ffc60c..d07cf2249f7 100644 --- a/lib/private/Template/Base.php +++ b/lib/private/Template/Base.php @@ -48,7 +48,7 @@ class Base { * @param \OCP\IL10N $l10n * @param Defaults $theme */ - public function __construct($template, $requestToken, $l10n, $theme ) { + public function __construct($template, $requestToken, $l10n, $theme) { $this->vars = []; $this->vars['requesttoken'] = $requestToken; $this->l10n = $l10n; @@ -65,7 +65,7 @@ class Base { */ protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) { // Check if the app is in the app folder or in the root - if( file_exists($app_dir.'/templates/' )) { + if(file_exists($app_dir.'/templates/')) { return [ $serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/', $app_dir.'/templates/', @@ -100,7 +100,7 @@ class Base { * * If the key existed before, it will be overwritten */ - public function assign( $key, $value) { + public function assign($key, $value) { $this->vars[$key] = $value; return true; } @@ -114,8 +114,8 @@ class Base { * exists, the value will be appended. It can be accessed via * $_[$key][$position] in the template. */ - public function append( $key, $value ) { - if( array_key_exists( $key, $this->vars )) { + public function append($key, $value) { + if(array_key_exists($key, $this->vars)) { $this->vars[$key][] = $value; } else{ @@ -131,7 +131,7 @@ class Base { */ public function printPage() { $data = $this->fetchPage(); - if( $data === false ) { + if($data === false) { return false; } else{ @@ -168,7 +168,7 @@ class Base { $theme = $this->theme; if(!is_null($additionalParams)) { - $_ = array_merge( $additionalParams, $this->vars ); + $_ = array_merge($additionalParams, $this->vars); foreach ($_ as $var => $value) { ${$var} = $value; } diff --git a/lib/private/Template/TemplateFileLocator.php b/lib/private/Template/TemplateFileLocator.php index f1f5fefc6f5..afeddd6b544 100644 --- a/lib/private/Template/TemplateFileLocator.php +++ b/lib/private/Template/TemplateFileLocator.php @@ -32,7 +32,7 @@ class TemplateFileLocator { /** * @param string[] $dirs */ - public function __construct( $dirs ) { + public function __construct($dirs) { $this->dirs = $dirs; } @@ -41,7 +41,7 @@ class TemplateFileLocator { * @return string * @throws \Exception */ - public function find( $template ) { + public function find($template) { if ($template === '') { throw new \InvalidArgumentException('Empty template name'); } diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 5562d4b5e2a..968ae7fceb8 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -64,7 +64,7 @@ class TemplateLayout extends \OC_Template { * @param string $renderAs * @param string $appId application id */ - public function __construct( $renderAs, $appId = '' ) { + public function __construct($renderAs, $appId = '') { // yes - should be injected .... $this->config = \OC::$server->getConfig(); @@ -75,7 +75,7 @@ class TemplateLayout extends \OC_Template { // Decide which page we show if($renderAs === 'user') { - parent::__construct( 'core', 'layout.user' ); + parent::__construct('core', 'layout.user'); if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) { $this->assign('bodyid', 'body-settings'); }else{ @@ -83,22 +83,22 @@ class TemplateLayout extends \OC_Template { } // Add navigation entry - $this->assign( 'application', ''); - $this->assign( 'appid', $appId ); + $this->assign('application', ''); + $this->assign('appid', $appId); $navigation = \OC::$server->getNavigationManager()->getAll(); - $this->assign( 'navigation', $navigation); + $this->assign('navigation', $navigation); $settingsNavigation = \OC::$server->getNavigationManager()->getAll('settings'); - $this->assign( 'settingsnavigation', $settingsNavigation); + $this->assign('settingsnavigation', $settingsNavigation); foreach($navigation as $entry) { if ($entry['active']) { - $this->assign( 'application', $entry['name'] ); + $this->assign('application', $entry['name']); break; } } foreach($settingsNavigation as $entry) { if ($entry['active']) { - $this->assign( 'application', $entry['name'] ); + $this->assign('application', $entry['name']); break; } } @@ -139,7 +139,7 @@ class TemplateLayout extends \OC_Template { $this->assign('user_uid', \OC_User::getUser()); } else if ($renderAs === 'public') { parent::__construct('core', 'layout.public'); - $this->assign( 'appid', $appId ); + $this->assign('appid', $appId); $this->assign('bodyid', 'body-public'); /** @var IRegistry $subscription */ @@ -196,7 +196,7 @@ class TemplateLayout extends \OC_Template { foreach($jsFiles as $info) { $web = $info[1]; $file = $info[2]; - $this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); + $this->append('jsfiles', $web.'/'.$file . $this->getVersionHashSuffix()); } try { @@ -229,14 +229,14 @@ class TemplateLayout extends \OC_Template { $file = $info[2]; if (substr($file, -strlen('print.css')) === 'print.css') { - $this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); + $this->append('printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix()); } else { $suffix = $this->getVersionHashSuffix($web, $file); if (strpos($file, '?v=') == false) { - $this->append( 'cssfiles', $web.'/'.$file . $suffix); + $this->append('cssfiles', $web.'/'.$file . $suffix); } else { - $this->append( 'cssfiles', $web.'/'.$file . '-' . substr($suffix, 3)); + $this->append('cssfiles', $web.'/'.$file . '-' . substr($suffix, 3)); } } @@ -249,7 +249,7 @@ class TemplateLayout extends \OC_Template { /** * @param string $path - * @param string $file + * @param string $file * @return string */ protected function getVersionHashSuffix($path = false, $file = false) { diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index 62eafaafedb..c0896ec3516 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -122,7 +122,7 @@ class URLGenerator implements IURLGenerator { public function linkTo(string $app, string $file, array $args = []): string { $frontControllerActive = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'); - if( $app !== '' ) { + if($app !== '') { $app_path = \OC_App::getAppPath($app); // Check if the app is in the app folder if ($app_path && file_exists($app_path . '/' . $file)) { diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 91a0943e048..e94f36554d7 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -495,20 +495,20 @@ class Updater extends BasicEmitter { $log = $this->log; $dispatcher = \OC::$server->getEventDispatcher(); - $dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($log) { + $dispatcher->addListener('\OC\DB\Migrator::executeSql', function ($event) use ($log) { if (!$event instanceof GenericEvent) { return; } $log->info('\OC\DB\Migrator::executeSql: ' . $event->getSubject() . ' (' . $event->getArgument(0) . ' of ' . $event->getArgument(1) . ')', ['app' => 'updater']); }); - $dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($log) { + $dispatcher->addListener('\OC\DB\Migrator::checkTable', function ($event) use ($log) { if (!$event instanceof GenericEvent) { return; } $log->info('\OC\DB\Migrator::checkTable: ' . $event->getSubject() . ' (' . $event->getArgument(0) . ' of ' . $event->getArgument(1) . ')', ['app' => 'updater']); }); - $repairListener = function($event) use ($log) { + $repairListener = function ($event) use ($log) { if (!$event instanceof GenericEvent) { return; } @@ -551,44 +551,44 @@ class Updater extends BasicEmitter { $dispatcher->addListener('\OC\Repair::error', $repairListener); - $this->listen('\OC\Updater', 'maintenanceEnabled', function () use($log) { + $this->listen('\OC\Updater', 'maintenanceEnabled', function () use ($log) { $log->info('\OC\Updater::maintenanceEnabled: Turned on maintenance mode', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'maintenanceDisabled', function () use($log) { + $this->listen('\OC\Updater', 'maintenanceDisabled', function () use ($log) { $log->info('\OC\Updater::maintenanceDisabled: Turned off maintenance mode', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'maintenanceActive', function () use($log) { + $this->listen('\OC\Updater', 'maintenanceActive', function () use ($log) { $log->info('\OC\Updater::maintenanceActive: Maintenance mode is kept active', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'updateEnd', function ($success) use($log) { + $this->listen('\OC\Updater', 'updateEnd', function ($success) use ($log) { if ($success) { $log->info('\OC\Updater::updateEnd: Update successful', ['app' => 'updater']); } else { $log->error('\OC\Updater::updateEnd: Update failed', ['app' => 'updater']); } }); - $this->listen('\OC\Updater', 'dbUpgradeBefore', function () use($log) { + $this->listen('\OC\Updater', 'dbUpgradeBefore', function () use ($log) { $log->info('\OC\Updater::dbUpgradeBefore: Updating database schema', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'dbUpgrade', function () use($log) { + $this->listen('\OC\Updater', 'dbUpgrade', function () use ($log) { $log->info('\OC\Updater::dbUpgrade: Updated database', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($log) { + $this->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($log) { $log->info('\OC\Updater::dbSimulateUpgradeBefore: Checking whether the database schema can be updated (this can take a long time depending on the database size)', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($log) { + $this->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($log) { $log->info('\OC\Updater::dbSimulateUpgrade: Checked database schema update', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($log) { + $this->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($log) { $log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: ' . $app, ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($log) { + $this->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($log) { $log->info('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "' . $app . '" in appstore', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($log) { + $this->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($log) { $log->info('\OC\Updater::upgradeAppStoreApp: Update app "' . $app . '" from appstore', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($log) { + $this->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($log) { $log->info('\OC\Updater::checkAppStoreApp: Checked for update of app "' . $app . '" in appstore', ['app' => 'updater']); }); $this->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($log) { @@ -606,19 +606,19 @@ class Updater extends BasicEmitter { $this->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($log) { $log->info('\OC\Updater::appUpgrade: Updated <' . $app . '> to ' . $version, ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'failure', function ($message) use($log) { + $this->listen('\OC\Updater', 'failure', function ($message) use ($log) { $log->error('\OC\Updater::failure: ' . $message, ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'setDebugLogLevel', function () use($log) { + $this->listen('\OC\Updater', 'setDebugLogLevel', function () use ($log) { $log->info('\OC\Updater::setDebugLogLevel: Set log level to debug', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($log) { + $this->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use ($log) { $log->info('\OC\Updater::resetLogLevel: Reset log level to ' . $logLevelName . '(' . $logLevel . ')', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($log) { + $this->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use ($log) { $log->info('\OC\Updater::startCheckCodeIntegrity: Starting code integrity check...', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($log) { + $this->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($log) { $log->info('\OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check', ['app' => 'updater']); }); diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php index 8fa2f3018b2..e90cfdc2e3d 100644 --- a/lib/private/User/Backend.php +++ b/lib/private/User/Backend.php @@ -60,15 +60,15 @@ abstract class Backend implements UserInterface { ]; /** - * Get all supported actions - * @return int bitwise-or'ed actions - * - * Returns the supported actions as int to be - * compared with self::CREATE_USER etc. - */ + * Get all supported actions + * @return int bitwise-or'ed actions + * + * Returns the supported actions as int to be + * compared with self::CREATE_USER etc. + */ public function getSupportedActions() { $actions = 0; - foreach($this->possibleActions AS $action => $methodName) { + foreach($this->possibleActions as $action => $methodName) { if(method_exists($this, $methodName)) { $actions |= $action; } @@ -78,13 +78,13 @@ abstract class Backend implements UserInterface { } /** - * Check if backend implements actions - * @param int $actions bitwise-or'ed actions - * @return boolean - * - * Returns the supported actions as int to be - * compared with self::CREATE_USER etc. - */ + * Check if backend implements actions + * @param int $actions bitwise-or'ed actions + * @return boolean + * + * Returns the supported actions as int to be + * compared with self::CREATE_USER etc. + */ public function implementsActions($actions) { return (bool)($this->getSupportedActions() & $actions); } @@ -96,7 +96,7 @@ abstract class Backend implements UserInterface { * * Deletes a user */ - public function deleteUser( $uid ) { + public function deleteUser($uid) { return false; } @@ -113,19 +113,19 @@ abstract class Backend implements UserInterface { } /** - * check if a user exists - * @param string $uid the username - * @return boolean - */ + * check if a user exists + * @param string $uid the username + * @return boolean + */ public function userExists($uid) { return false; } /** - * get the user's home directory - * @param string $uid the username - * @return boolean - */ + * get the user's home directory + * @param string $uid the username + * @return boolean + */ public function getHome($uid) { return false; } @@ -150,7 +150,7 @@ abstract class Backend implements UserInterface { public function getDisplayNames($search = '', $limit = null, $offset = null) { $displayNames = []; $users = $this->getUsers($search, $limit, $offset); - foreach ( $users as $user) { + foreach ($users as $user) { $displayNames[$user] = $user; } return $displayNames; diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 856959a4596..c89d3ce3690 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -78,13 +78,13 @@ use OCP\User\Backend\ISetPasswordBackend; */ class Database extends ABackend implements ICreateUserBackend, - ISetPasswordBackend, - ISetDisplayNameBackend, - IGetDisplayNameBackend, - ICheckPasswordBackend, - IGetHomeBackend, - ICountUsersBackend, - IGetRealUIDBackend { + ISetPasswordBackend, + ISetDisplayNameBackend, + IGetDisplayNameBackend, + ICheckPasswordBackend, + IGetHomeBackend, + ICountUsersBackend, + IGetRealUIDBackend { /** @var CappedMemoryCache */ private $cache; diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 2dd12cf916d..1ab335eeea6 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -422,7 +422,7 @@ class Manager extends PublicEmitter implements IUserManager { public function countUsersOfGroups(array $groups) { $users = []; foreach($groups as $group) { - $usersIds = array_map(function($user) { + $usersIds = array_map(function ($user) { return $user->getUID(); }, $group->getUsers()); $users = array_merge($users, $usersIds); @@ -618,11 +618,11 @@ class Manager extends PublicEmitter implements IUserManager { public function getByEmail($email) { $userIds = $this->config->getUsersForUserValueCaseInsensitive('settings', 'email', $email); - $users = array_map(function($uid) { + $users = array_map(function ($uid) { return $this->get($uid); }, $userIds); - return array_values(array_filter($users, function($u) { + return array_values(array_filter($users, function ($u) { return ($u instanceof IUser); })); } diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 9129fb7054b..7b129a393e3 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -51,7 +51,6 @@ use OC_User; use OC_Util; use OCA\DAV\Connector\Sabre\Auth; use OCP\AppFramework\Utility\ITimeFactory; -use OCP\Authentication\Events\LoginFailedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\NotPermittedException; use OCP\IConfig; @@ -59,7 +58,6 @@ use OCP\ILogger; use OCP\IRequest; use OCP\ISession; use OCP\IUser; -use OCP\IUserManager; use OCP\IUserSession; use OCP\Lockdown\ILockdownManager; use OCP\Security\ISecureRandom; @@ -461,7 +459,7 @@ class Session implements IUserSession, Emitter { } // Try to login with this username and password - if (!$this->login($user, $password) ) { + if (!$this->login($user, $password)) { // Failed, maybe the user used their email address $users = $this->manager->getByEmail($user); diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 0f17af3063e..bc492a6df29 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -449,7 +449,7 @@ class User implements IUser { public function getCloudId() { $uid = $this->getUID(); $server = $this->urlGenerator->getAbsoluteURL('/'); - $server = rtrim( $this->removeProtocolFromUrl($server), '/'); + $server = rtrim($this->removeProtocolFromUrl($server), '/'); return \OC::$server->getCloudIdManager()->getCloudId($uid, $server)->getId(); } diff --git a/lib/private/legacy/OC_DB.php b/lib/private/legacy/OC_DB.php index 34cc39f26aa..cf45faae314 100644 --- a/lib/private/legacy/OC_DB.php +++ b/lib/private/legacy/OC_DB.php @@ -58,7 +58,7 @@ class OC_DB { * * SQL query via Doctrine prepare(), needs to be execute()'d! */ - static public function prepare( $query , $limit = null, $offset = null, $isManipulation = null) { + static public function prepare($query , $limit = null, $offset = null, $isManipulation = null) { $connection = \OC::$server->getDatabaseConnection(); if ($isManipulation === null) { @@ -84,7 +84,7 @@ class OC_DB { * @param string $sql * @return bool */ - static public function isManipulation( $sql ) { + static public function isManipulation($sql) { $selectOccurrence = stripos($sql, 'SELECT'); if ($selectOccurrence !== false && $selectOccurrence < 10) { return false; @@ -113,7 +113,7 @@ class OC_DB { * @return OC_DB_StatementWrapper * @throws \OC\DatabaseException */ - static public function executeAudited( $stmt, array $parameters = []) { + static public function executeAudited($stmt, array $parameters = []) { if (is_string($stmt)) { // convert to an array with 'sql' if (stripos($stmt, 'LIMIT') !== false) { //OFFSET requires LIMIT, so we only need to check for LIMIT @@ -126,14 +126,14 @@ class OC_DB { } if (is_array($stmt)) { // convert to prepared statement - if ( ! array_key_exists('sql', $stmt) ) { + if (! array_key_exists('sql', $stmt)) { $message = 'statement array must at least contain key \'sql\''; throw new \OC\DatabaseException($message); } - if ( ! array_key_exists('limit', $stmt) ) { + if (! array_key_exists('limit', $stmt)) { $stmt['limit'] = null; } - if ( ! array_key_exists('limit', $stmt) ) { + if (! array_key_exists('limit', $stmt)) { $stmt['offset'] = null; } $stmt = self::prepare($stmt['sql'], $stmt['limit'], $stmt['offset']); @@ -172,7 +172,7 @@ class OC_DB { * * TODO: write more documentation */ - public static function createDbFromStructure( $file ) { + public static function createDbFromStructure($file) { $schemaManager = self::getMDB2SchemaManager(); return $schemaManager->createDbFromStructure($file); } diff --git a/lib/private/legacy/OC_DB_StatementWrapper.php b/lib/private/legacy/OC_DB_StatementWrapper.php index 872e8f64e79..d4072caf28e 100644 --- a/lib/private/legacy/OC_DB_StatementWrapper.php +++ b/lib/private/legacy/OC_DB_StatementWrapper.php @@ -114,7 +114,7 @@ class OC_DB_StatementWrapper { * @param integer|null $length max length when using an OUT bind * @return boolean */ - public function bindParam($column, &$variable, $type = null, $length = null){ + public function bindParam($column, &$variable, $type = null, $length = null) { return $this->statement->bindParam($column, $variable, $type, $length); } } diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php index 73443adb031..d5a4b5eecee 100644 --- a/lib/private/legacy/OC_Defaults.php +++ b/lib/private/legacy/OC_Defaults.php @@ -322,7 +322,7 @@ class OC_Defaults { } else { $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo/logo.png'); } - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); + return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); } public function getTextColorPrimary() { diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php index 249d3e5154f..710e0882010 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -84,19 +84,19 @@ class OC_Files { $type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename)); if ($fileSize > -1) { if (!empty($rangeArray)) { - http_response_code(206); - header('Accept-Ranges: bytes', true); - if (count($rangeArray) > 1) { + http_response_code(206); + header('Accept-Ranges: bytes', true); + if (count($rangeArray) > 1) { $type = 'multipart/byteranges; boundary='.self::getBoundary(); // no Content-Length header here - } - else { + } + else { header(sprintf('Content-Range: bytes %d-%d/%d', $rangeArray[0]['from'], $rangeArray[0]['to'], $fileSize), true); OC_Response::setContentLengthHeader($rangeArray[0]['to'] - $rangeArray[0]['from'] + 1); - } + } } else { - OC_Response::setContentLengthHeader($fileSize); + OC_Response::setContentLengthHeader($fileSize); } } header('Content-Type: '.$type, true); @@ -329,10 +329,10 @@ class OC_Files { if (!empty($rangeArray)) { try { - if (count($rangeArray) == 1) { + if (count($rangeArray) == 1) { $view->readfilePart($filename, $rangeArray[0]['from'], $rangeArray[0]['to']); - } - else { + } + else { // check if file is seekable (if not throw UnseekableException) // we have to check it before body contents $view->readfilePart($filename, $rangeArray[0]['size'], $rangeArray[0]['size']); @@ -340,24 +340,24 @@ class OC_Files { $type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename)); foreach ($rangeArray as $range) { - echo "\r\n--".self::getBoundary()."\r\n". - "Content-type: ".$type."\r\n". - "Content-range: bytes ".$range['from']."-".$range['to']."/".$range['size']."\r\n\r\n"; - $view->readfilePart($filename, $range['from'], $range['to']); + echo "\r\n--".self::getBoundary()."\r\n". + "Content-type: ".$type."\r\n". + "Content-range: bytes ".$range['from']."-".$range['to']."/".$range['size']."\r\n\r\n"; + $view->readfilePart($filename, $range['from'], $range['to']); } echo "\r\n--".self::getBoundary()."--\r\n"; - } + } } catch (\OCP\Files\UnseekableException $ex) { - // file is unseekable - header_remove('Accept-Ranges'); - header_remove('Content-Range'); - http_response_code(200); - self::sendHeaders($filename, $name, []); - $view->readfile($filename); + // file is unseekable + header_remove('Accept-Ranges'); + header_remove('Content-Range'); + http_response_code(200); + self::sendHeaders($filename, $name, []); + $view->readfile($filename); } } else { - $view->readfile($filename); + $view->readfile($filename); } } @@ -399,7 +399,7 @@ class OC_Files { $view->lockFile($file, ILockingProvider::LOCK_SHARED); if ($view->is_dir($file)) { $contents = $view->getDirectoryContent($file); - $contents = array_map(function($fileInfo) use ($file) { + $contents = array_map(function ($fileInfo) use ($file) { /** @var \OCP\Files\FileInfo $fileInfo */ return $file . '/' . $fileInfo->getName(); }, $contents); diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 626295af5a9..73154909a4a 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -44,7 +44,6 @@ * */ -use OCP\IUser; use Symfony\Component\Process\ExecutableFinder; /** @@ -368,7 +367,7 @@ class OC_Helper { $it = new RecursiveIteratorIterator($aIt); while ($it->valid()) { - if (((isset($index) AND ($it->key() == $index)) OR !isset($index)) AND ($it->current() == $needle)) { + if (((isset($index) and ($it->key() == $index)) or !isset($index)) and ($it->current() == $needle)) { return $aIt->key(); } diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php index 2918dd4282f..b98424711dd 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -51,15 +51,15 @@ class OC_Hook { * * TODO: write example */ - static public function connect($signalClass, $signalName, $slotClass, $slotName ) { + static public function connect($signalClass, $signalName, $slotClass, $slotName) { // If we're trying to connect to an emitting class that isn't // yet registered, register it - if( !array_key_exists($signalClass, self::$registered )) { + if(!array_key_exists($signalClass, self::$registered)) { self::$registered[$signalClass] = []; } // If we're trying to connect to an emitting method that isn't // yet registered, register it with the emitting class - if( !array_key_exists( $signalName, self::$registered[$signalClass] )) { + if(!array_key_exists($signalName, self::$registered[$signalClass])) { self::$registered[$signalClass][$signalName] = []; } @@ -71,8 +71,8 @@ class OC_Hook { } // Connect the hook handler to the requested emitter self::$registered[$signalClass][$signalName][] = [ - "class" => $slotClass, - "name" => $slotName + "class" => $slotClass, + "name" => $slotName ]; // No chance for failure ;-) @@ -95,20 +95,20 @@ class OC_Hook { // Return false if no hook handlers are listening to this // emitting class - if( !array_key_exists($signalClass, self::$registered )) { + if(!array_key_exists($signalClass, self::$registered)) { return false; } // Return false if no hook handlers are listening to this // emitting method - if( !array_key_exists( $signalName, self::$registered[$signalClass] )) { + if(!array_key_exists($signalName, self::$registered[$signalClass])) { return false; } // Call all slots - foreach( self::$registered[$signalClass][$signalName] as $i ) { + foreach(self::$registered[$signalClass][$signalName] as $i) { try { - call_user_func( [ $i["class"], $i["name"] ], $params ); + call_user_func([ $i["class"], $i["name"] ], $params); } catch (Exception $e){ self::$thrownExceptions[] = $e; \OC::$server->getLogger()->logException($e); diff --git a/lib/private/legacy/OC_JSON.php b/lib/private/legacy/OC_JSON.php index f83fca0a433..5b4b97e6fd0 100644 --- a/lib/private/legacy/OC_JSON.php +++ b/lib/private/legacy/OC_JSON.php @@ -42,7 +42,7 @@ class OC_JSON{ * @suppress PhanDeprecatedFunction */ public static function checkAppEnabled($app) { - if( !\OC::$server->getAppManager()->isEnabledForUser($app)) { + if(!\OC::$server->getAppManager()->isEnabledForUser($app)) { $l = \OC::$server->getL10N('lib'); self::error([ 'data' => [ 'message' => $l->t('Application is not enabled'), 'error' => 'application_not_enabled' ]]); exit(); @@ -56,7 +56,7 @@ class OC_JSON{ */ public static function checkLoggedIn() { $twoFactorAuthManger = \OC::$server->getTwoFactorAuthManager(); - if( !\OC::$server->getUserSession()->isLoggedIn() + if(!\OC::$server->getUserSession()->isLoggedIn() || $twoFactorAuthManger->needsSecondFactor(\OC::$server->getUserSession()->getUser())) { $l = \OC::$server->getL10N('lib'); http_response_code(\OCP\AppFramework\Http::STATUS_UNAUTHORIZED); @@ -76,7 +76,7 @@ class OC_JSON{ exit(); } - if( !\OC::$server->getRequest()->passesCSRFCheck()) { + if(!\OC::$server->getRequest()->passesCSRFCheck()) { $l = \OC::$server->getL10N('lib'); self::error([ 'data' => [ 'message' => $l->t('Token expired. Please reload page.'), 'error' => 'token_expired' ]]); exit(); @@ -89,7 +89,7 @@ class OC_JSON{ * @suppress PhanDeprecatedFunction */ public static function checkAdminUser() { - if( !OC_User::isAdminUser(OC_User::getUser())) { + if(!OC_User::isAdminUser(OC_User::getUser())) { $l = \OC::$server->getL10N('lib'); self::error([ 'data' => [ 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ]]); exit(); @@ -103,7 +103,7 @@ class OC_JSON{ */ public static function error($data = []) { $data['status'] = 'error'; - header( 'Content-Type: application/json; charset=utf-8'); + header('Content-Type: application/json; charset=utf-8'); echo self::encode($data); } @@ -114,7 +114,7 @@ class OC_JSON{ */ public static function success($data = []) { $data['status'] = 'success'; - header( 'Content-Type: application/json; charset=utf-8'); + header('Content-Type: application/json; charset=utf-8'); echo self::encode($data); } diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php index 4eb454d3181..45fea27d61d 100644 --- a/lib/private/legacy/OC_Response.php +++ b/lib/private/legacy/OC_Response.php @@ -33,17 +33,17 @@ class OC_Response { * @param string $filename file name * @param string $type disposition type, either 'attachment' or 'inline' */ - static public function setContentDispositionHeader( $filename, $type = 'attachment' ) { + static public function setContentDispositionHeader($filename, $type = 'attachment') { if (\OC::$server->getRequest()->isUserAgent( [ \OC\AppFramework\Http\Request::USER_AGENT_IE, \OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME, \OC\AppFramework\Http\Request::USER_AGENT_FREEBOX, ])) { - header( 'Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode( $filename ) . '"' ); + header('Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode($filename) . '"'); } else { - header( 'Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode( $filename ) - . '; filename="' . rawurlencode( $filename ) . '"' ); + header('Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode($filename) + . '; filename="' . rawurlencode($filename) . '"'); } } diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php index 279ceb8de0f..08f23b55a0f 100644 --- a/lib/private/legacy/OC_Template.php +++ b/lib/private/legacy/OC_Template.php @@ -72,7 +72,7 @@ class OC_Template extends \OC\Template\Base { * "admin". * @param bool $registerCall = true */ - public function __construct( $app, $name, $renderAs = "", $registerCall = true ) { + public function __construct($app, $name, $renderAs = "", $registerCall = true) { // Read the selected theme from the config file self::initTemplateEngine($renderAs); @@ -104,16 +104,16 @@ class OC_Template extends \OC\Template\Base { //apps that started before the template initialization can load their own scripts/styles //so to make sure this scripts/styles here are loaded first we use OC_Util::addScript() with $prepend=true //meaning the last script/style in this list will be loaded first - if (\OC::$server->getSystemConfig()->getValue ('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) { - if (\OC::$server->getConfig ()->getAppValue ( 'core', 'backgroundjobs_mode', 'ajax' ) == 'ajax') { - OC_Util::addScript ( 'backgroundjobs', null, true ); + if (\OC::$server->getSystemConfig()->getValue('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) { + if (\OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') { + OC_Util::addScript('backgroundjobs', null, true); } } OC_Util::addStyle('css-variables', null, true); OC_Util::addStyle('server', null, true); OC_Util::addTranslations('core', null, true); - if (\OC::$server->getSystemConfig()->getValue ('installed', false)) { + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { OC_Util::addStyle('search', 'results'); OC_Util::addScript('search', 'search', true); OC_Util::addScript('search', 'searchprovider'); @@ -146,12 +146,12 @@ class OC_Template extends \OC\Template\Base { */ protected function findTemplate($theme, $app, $name) { // Check if it is a app template or not. - if( $app !== '' ) { + if($app !== '') { $dirs = $this->getAppTemplateDirs($theme, $app, OC::$SERVERROOT, OC_App::getAppPath($app)); } else { $dirs = $this->getCoreTemplateDirs($theme, OC::$SERVERROOT); } - $locator = new \OC\Template\TemplateFileLocator( $dirs ); + $locator = new \OC\Template\TemplateFileLocator($dirs); $template = $locator->find($name); $path = $locator->getPath(); return [$path, $template]; @@ -182,7 +182,7 @@ class OC_Template extends \OC\Template\Base { public function fetchPage($additionalParams = null) { $data = parent::fetchPage($additionalParams); - if( $this->renderAs ) { + if($this->renderAs) { $page = new TemplateLayout($this->renderAs, $this->app); if(is_array($additionalParams)) { @@ -195,7 +195,7 @@ class OC_Template extends \OC\Template\Base { $headers = ''; foreach(OC_Util::$headers as $header) { $headers .= '<'.\OCP\Util::sanitizeHTML($header['tag']); - if ( strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes']))) ) { + if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) { $headers .= ' defer'; } foreach($header['attributes'] as $name=>$value) { @@ -227,7 +227,7 @@ class OC_Template extends \OC\Template\Base { * Includes another template. use <?php echo $this->inc('template'); ?> to * do this. */ - public function inc( $file, $additionalParams = null ) { + public function inc($file, $additionalParams = null) { return $this->load($this->path.$file.'.php', $additionalParams); } @@ -238,10 +238,10 @@ class OC_Template extends \OC\Template\Base { * @param array $parameters Parameters for the template * @return boolean|null */ - public static function printUserPage( $application, $name, $parameters = [] ) { - $content = new OC_Template( $application, $name, "user" ); - foreach( $parameters as $key => $value ) { - $content->assign( $key, $value ); + public static function printUserPage($application, $name, $parameters = []) { + $content = new OC_Template($application, $name, "user"); + foreach($parameters as $key => $value) { + $content->assign($key, $value); } print $content->printPage(); } @@ -253,10 +253,10 @@ class OC_Template extends \OC\Template\Base { * @param array $parameters Parameters for the template * @return bool */ - public static function printAdminPage( $application, $name, $parameters = [] ) { - $content = new OC_Template( $application, $name, "admin" ); - foreach( $parameters as $key => $value ) { - $content->assign( $key, $value ); + public static function printAdminPage($application, $name, $parameters = []) { + $content = new OC_Template($application, $name, "admin"); + foreach($parameters as $key => $value) { + $content->assign($key, $value); } return $content->printPage(); } @@ -268,10 +268,10 @@ class OC_Template extends \OC\Template\Base { * @param array|string $parameters Parameters for the template * @return bool */ - public static function printGuestPage( $application, $name, $parameters = [] ) { + public static function printGuestPage($application, $name, $parameters = []) { $content = new OC_Template($application, $name, $name === 'error' ? $name : 'guest'); - foreach( $parameters as $key => $value ) { - $content->assign( $key, $value ); + foreach($parameters as $key => $value) { + $content->assign($key, $value); } return $content->printPage(); } @@ -283,7 +283,7 @@ class OC_Template extends \OC\Template\Base { * @param int $statusCode * @suppress PhanAccessMethodInternal */ - public static function printErrorPage( $error_msg, $hint = '', $statusCode = 500) { + public static function printErrorPage($error_msg, $hint = '', $statusCode = 500) { if (\OC::$server->getAppManager()->isEnabledForUser('theming') && !\OC_App::isAppLoaded('theming')) { \OC_App::loadApp('theming'); } @@ -296,9 +296,9 @@ class OC_Template extends \OC\Template\Base { http_response_code($statusCode); try { - $content = new \OC_Template( '', 'error', 'error', false ); + $content = new \OC_Template('', 'error', 'error', false); $errors = [['error' => $error_msg, 'hint' => $hint]]; - $content->assign( 'errors', $errors ); + $content->assign('errors', $errors); $content->printPage(); } catch (\Exception $e) { $logger = \OC::$server->getLogger(); diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php index d96400ad1d4..a9de5cdef9f 100644 --- a/lib/private/legacy/OC_User.php +++ b/lib/private/legacy/OC_User.php @@ -80,7 +80,7 @@ class OC_User { \OC::$server->getUserManager()->registerBackend($backend); } else { // You'll never know what happens - if (null === $backend OR !is_string($backend)) { + if (null === $backend or !is_string($backend)) { $backend = 'database'; } diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index f14095675dc..4d7d00f5dc2 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -590,7 +590,7 @@ class OC_Util { // core js files need separate handling if ($application !== 'core' && $file !== null) { - self::addTranslations ( $application ); + self::addTranslations($application); } self::addExternalResource($application, $prepend, $path, "script"); } @@ -667,7 +667,7 @@ class OC_Util { if ($type === "style") { if (!in_array($path, self::$styles)) { if ($prepend === true) { - array_unshift ( self::$styles, $path ); + array_unshift(self::$styles, $path); } else { self::$styles[] = $path; } @@ -675,7 +675,7 @@ class OC_Util { } elseif ($type === "script") { if (!in_array($path, self::$scripts)) { if ($prepend === true) { - array_unshift ( self::$scripts, $path ); + array_unshift(self::$scripts, $path); } else { self::$scripts [] = $path; } @@ -699,7 +699,7 @@ class OC_Util { 'text' => $text ]; if ($prepend === true) { - array_unshift (self::$headers, $header); + array_unshift(self::$headers, $header); } else { self::$headers[] = $header; @@ -757,7 +757,7 @@ class OC_Util { 'hint' => $l->t('This can usually be fixed by giving the webserver write access to the config directory. See %s', [ $urlGenerator->linkToDocs('admin-dir_permissions') ]) . '. ' . $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s', - [ $urlGenerator->linkToDocs('admin-config') ] ) + [ $urlGenerator->linkToDocs('admin-config') ]) ]; } } @@ -925,7 +925,7 @@ class OC_Util { } if(function_exists('xml_parser_create') && - LIBXML_LOADED_VERSION < 20700 ) { + LIBXML_LOADED_VERSION < 20700) { $version = LIBXML_LOADED_VERSION; $major = floor($version/10000); $version -= ($major * 10000); @@ -1163,7 +1163,7 @@ class OC_Util { */ public static function sanitizeHTML($value) { if (is_array($value)) { - $value = array_map(function($value) { + $value = array_map(function ($value) { return self::sanitizeHTML($value); }, $value); } else { diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index f2f737baf9a..e42ef796f0f 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -45,7 +45,7 @@ function p($string) { * Prints a <link> tag for loading css * @param string $href the source URL, ignored when empty * @param string $opts, additional optional options -*/ + */ function emit_css_tag($href, $opts = '') { $s='<link rel="stylesheet"'; if (!empty($href)) { @@ -60,7 +60,7 @@ function emit_css_tag($href, $opts = '') { /** * Prints all tags for CSS loading * @param array $obj all the script information from template -*/ + */ function emit_css_loading_tags($obj) { foreach($obj['cssfiles'] as $css) { emit_css_tag($css); @@ -74,7 +74,7 @@ function emit_css_loading_tags($obj) { * Prints a <script> tag with nonce and defer depending on config * @param string $src the source URL, ignored when empty * @param string $script_content the inline script content, ignored when empty -*/ + */ function emit_script_tag($src, $script_content='') { $defer_str=' defer'; $s='<script nonce="' . \OC::$server->getContentSecurityPolicyNonceManager()->getNonce() . '"'; @@ -95,7 +95,7 @@ function emit_script_tag($src, $script_content='') { /** * Print all <script> tags for loading JS * @param array $obj all the script information from template -*/ + */ function emit_script_loading_tags($obj) { foreach($obj['jsfiles'] as $jsfile) { emit_script_tag($jsfile, ''); @@ -214,7 +214,7 @@ function component($app, $file) { * * For further information have a look at \OCP\IURLGenerator::linkTo */ -function link_to( $app, $file, $args = [] ) { +function link_to($app, $file, $args = []) { return \OC::$server->getURLGenerator()->linkTo($app, $file, $args); } @@ -234,8 +234,8 @@ function link_to_docs($key) { * * For further information have a look at \OCP\IURLGenerator::imagePath */ -function image_path( $app, $image ) { - return \OC::$server->getURLGenerator()->imagePath( $app, $image ); +function image_path($app, $image) { + return \OC::$server->getURLGenerator()->imagePath($app, $image); } /** @@ -243,8 +243,8 @@ function image_path( $app, $image ) { * @param string $mimetype mimetype * @return string link to the image */ -function mimetype_icon( $mimetype ) { - return \OC::$server->getMimeTypeDetector()->mimeTypeIcon( $mimetype ); +function mimetype_icon($mimetype) { + return \OC::$server->getMimeTypeDetector()->mimeTypeIcon($mimetype); } /** @@ -253,7 +253,7 @@ function mimetype_icon( $mimetype ) { * @param string $path path of file * @return string link to the preview */ -function preview_icon( $path ) { +function preview_icon($path) { return \OC::$server->getURLGenerator()->linkToRoute('core.Preview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path]); } @@ -262,7 +262,7 @@ function preview_icon( $path ) { * @param string $token * @return string */ -function publicPreview_icon ( $path, $token ) { +function publicPreview_icon($path, $token) { return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 'token' => $token]); } @@ -273,8 +273,8 @@ function publicPreview_icon ( $path, $token ) { * * For further information have a look at OC_Helper::humanFileSize */ -function human_file_size( $bytes ) { - return OC_Helper::humanFileSize( $bytes ); +function human_file_size($bytes) { + return OC_Helper::humanFileSize($bytes); } /** @@ -282,7 +282,7 @@ function human_file_size( $bytes ) { * @param int $timestamp UNIX timestamp to strip * @return int timestamp without time value */ -function strip_time($timestamp){ +function strip_time($timestamp) { $date = new \DateTime("@{$timestamp}"); $date->setTime(0, 0, 0); return (int)$date->format('U'); diff --git a/lib/public/Accounts/PropertyDoesNotExistException.php b/lib/public/Accounts/PropertyDoesNotExistException.php index 0aa5b4c394c..e9e57dd8779 100644 --- a/lib/public/Accounts/PropertyDoesNotExistException.php +++ b/lib/public/Accounts/PropertyDoesNotExistException.php @@ -37,7 +37,7 @@ class PropertyDoesNotExistException extends \Exception { * @param string $msg the error message * @since 15.0.0 */ - public function __construct($property){ + public function __construct($property) { parent::__construct('Property ' . $property . ' does not exist.'); } diff --git a/lib/public/Activity/IEventMerger.php b/lib/public/Activity/IEventMerger.php index a8f75875c6f..90d9cecb756 100644 --- a/lib/public/Activity/IEventMerger.php +++ b/lib/public/Activity/IEventMerger.php @@ -23,7 +23,6 @@ namespace OCP\Activity; - /** * Interface EventMerger * diff --git a/lib/public/App.php b/lib/public/App.php index 9b30ef4cf93..8e4a983c6bf 100644 --- a/lib/public/App.php +++ b/lib/public/App.php @@ -55,9 +55,9 @@ class App { * @return void * @since 4.0.0 * @deprecated 14.0.0 Use settings section in appinfo.xml to register personal admin sections - */ - public static function registerPersonal( $app, $page ) { - \OC_App::registerPersonal( $app, $page ); + */ + public static function registerPersonal($app, $page) { + \OC_App::registerPersonal($app, $page); } /** @@ -68,8 +68,8 @@ class App { * @since 4.0.0 * @deprecated 14.0.0 Use settings section in appinfo.xml to register admin sections */ - public static function registerAdmin( $app, $page ) { - \OC_App::registerAdmin( $app, $page ); + public static function registerAdmin($app, $page) { + \OC_App::registerAdmin($app, $page); } /** @@ -79,9 +79,9 @@ class App { * @return array|null * @deprecated 14.0.0 ise \OC::$server->getAppManager()->getAppInfo($appId) * @since 4.0.0 - */ - public static function getAppInfo( $app, $path=false ) { - return \OC_App::getAppInfo( $app, $path); + */ + public static function getAppInfo($app, $path=false) { + return \OC_App::getAppInfo($app, $path); } /** @@ -93,8 +93,8 @@ class App { * @since 4.0.0 * @deprecated 13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId) */ - public static function isEnabled( $app ) { - return \OC::$server->getAppManager()->isEnabledForUser( $app ); + public static function isEnabled($app) { + return \OC::$server->getAppManager()->isEnabledForUser($app); } /** @@ -104,7 +104,7 @@ class App { * @since 4.0.0 * @deprecated 14.0.0 use \OC::$server->getAppManager()->getAppVersion($appId) */ - public static function getAppVersion( $app ) { + public static function getAppVersion($app) { return \OC::$server->getAppManager()->getAppVersion($app); } } diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index d09a2d5c290..feae56fc2c0 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -39,60 +39,60 @@ use OCP\IRequest; */ abstract class ApiController extends Controller { - private $corsMethods; - private $corsAllowedHeaders; - private $corsMaxAge; + private $corsMethods; + private $corsAllowedHeaders; + private $corsMaxAge; - /** - * constructor of the controller - * @param string $appName the name of the app - * @param IRequest $request an instance of the request - * @param string $corsMethods comma separated string of HTTP verbs which - * should be allowed for websites or webapps when calling your API, defaults to - * 'PUT, POST, GET, DELETE, PATCH' - * @param string $corsAllowedHeaders comma separated string of HTTP headers - * which should be allowed for websites or webapps when calling your API, - * defaults to 'Authorization, Content-Type, Accept' - * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS - * request should be cached, defaults to 1728000 seconds + /** + * constructor of the controller + * @param string $appName the name of the app + * @param IRequest $request an instance of the request + * @param string $corsMethods comma separated string of HTTP verbs which + * should be allowed for websites or webapps when calling your API, defaults to + * 'PUT, POST, GET, DELETE, PATCH' + * @param string $corsAllowedHeaders comma separated string of HTTP headers + * which should be allowed for websites or webapps when calling your API, + * defaults to 'Authorization, Content-Type, Accept' + * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS + * request should be cached, defaults to 1728000 seconds * @since 7.0.0 - */ - public function __construct($appName, - IRequest $request, - $corsMethods='PUT, POST, GET, DELETE, PATCH', - $corsAllowedHeaders='Authorization, Content-Type, Accept', - $corsMaxAge=1728000){ - parent::__construct($appName, $request); - $this->corsMethods = $corsMethods; - $this->corsAllowedHeaders = $corsAllowedHeaders; - $this->corsMaxAge = $corsMaxAge; - } + */ + public function __construct($appName, + IRequest $request, + $corsMethods='PUT, POST, GET, DELETE, PATCH', + $corsAllowedHeaders='Authorization, Content-Type, Accept', + $corsMaxAge=1728000) { + parent::__construct($appName, $request); + $this->corsMethods = $corsMethods; + $this->corsAllowedHeaders = $corsAllowedHeaders; + $this->corsMaxAge = $corsMaxAge; + } - /** - * This method implements a preflighted cors response for you that you can - * link to for the options request - * - * @NoAdminRequired - * @NoCSRFRequired - * @PublicPage + /** + * This method implements a preflighted cors response for you that you can + * link to for the options request + * + * @NoAdminRequired + * @NoCSRFRequired + * @PublicPage * @since 7.0.0 - */ - public function preflightedCors() { - if(isset($this->request->server['HTTP_ORIGIN'])) { - $origin = $this->request->server['HTTP_ORIGIN']; - } else { - $origin = '*'; - } + */ + public function preflightedCors() { + if(isset($this->request->server['HTTP_ORIGIN'])) { + $origin = $this->request->server['HTTP_ORIGIN']; + } else { + $origin = '*'; + } - $response = new Response(); - $response->addHeader('Access-Control-Allow-Origin', $origin); - $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); - $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); - $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); - $response->addHeader('Access-Control-Allow-Credentials', 'false'); - return $response; - } + $response = new Response(); + $response->addHeader('Access-Control-Allow-Origin', $origin); + $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); + $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); + $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); + $response->addHeader('Access-Control-Allow-Credentials', 'false'); + return $response; + } } diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index d6bf23e4afe..7bf9e72637b 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -37,6 +37,7 @@ declare(strict_types=1); */ namespace OCP\AppFramework; + use OC\AppFramework\Routing\RouteConfig; use OC\ServerContainer; use OCP\Route\IRouter; diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index 2e442c49768..487b6a854fe 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -73,7 +73,7 @@ abstract class Controller { * @since 6.0.0 - parameter $appName was added in 7.0.0 - parameter $app was removed in 7.0.0 */ public function __construct($appName, - IRequest $request) { + IRequest $request) { $this->appName = $appName; $this->request = $request; diff --git a/lib/public/AppFramework/Db/DoesNotExistException.php b/lib/public/AppFramework/Db/DoesNotExistException.php index 45008473c21..36cab24db76 100644 --- a/lib/public/AppFramework/Db/DoesNotExistException.php +++ b/lib/public/AppFramework/Db/DoesNotExistException.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Db; - /** * This is returned or should be returned when a find request does not find an * entry in the database @@ -40,7 +39,7 @@ class DoesNotExistException extends \Exception implements IMapperException { * @param string $msg the error message * @since 7.0.0 */ - public function __construct($msg){ + public function __construct($msg) { parent::__construct($msg); } diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index 7340df55fc4..6221f96b375 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -25,7 +25,6 @@ namespace OCP\AppFramework\Db; - use function lcfirst; use function substr; @@ -66,7 +65,7 @@ abstract class Entity { * @param array $row the row to map onto the entity * @since 7.0.0 */ - public static function fromRow(array $row){ + public static function fromRow(array $row) { $instance = new static(); foreach($row as $key => $value){ @@ -94,7 +93,7 @@ abstract class Entity { * Marks the entity as clean needed for setting the id after the insertion * @since 7.0.0 */ - public function resetUpdatedFields(){ + public function resetUpdatedFields() { $this->_updatedFields = []; } @@ -176,7 +175,7 @@ abstract class Entity { * @param string $attribute the name of the attribute * @since 7.0.0 */ - protected function markFieldUpdated($attribute){ + protected function markFieldUpdated($attribute) { $this->_updatedFields[$attribute] = true; } @@ -187,7 +186,7 @@ abstract class Entity { * @return string the property name * @since 7.0.0 */ - public function columnToProperty($columnName){ + public function columnToProperty($columnName) { $parts = explode('_', $columnName); $property = null; @@ -209,7 +208,7 @@ abstract class Entity { * @return string the column name * @since 7.0.0 */ - public function propertyToColumn($property){ + public function propertyToColumn($property) { $parts = preg_split('/(?=[A-Z])/', $property); $column = null; @@ -229,7 +228,7 @@ abstract class Entity { * @return array array of updated fields for update query * @since 7.0.0 */ - public function getUpdatedFields(){ + public function getUpdatedFields() { return $this->_updatedFields; } @@ -241,7 +240,7 @@ abstract class Entity { * @param string $type the type which will be used to call settype() * @since 7.0.0 */ - protected function addType($fieldName, $type){ + protected function addType($fieldName, $type) { $this->_fieldTypes[$fieldName] = $type; } @@ -253,7 +252,7 @@ abstract class Entity { * @return string slugified value * @since 7.0.0 */ - public function slugify($attributeName){ + public function slugify($attributeName) { // toSlug should only work for existing attributes if(property_exists($this, $attributeName)){ $value = $this->$attributeName; diff --git a/lib/public/AppFramework/Db/Mapper.php b/lib/public/AppFramework/Db/Mapper.php index 7dcc4a4bade..289ac1d684d 100644 --- a/lib/public/AppFramework/Db/Mapper.php +++ b/lib/public/AppFramework/Db/Mapper.php @@ -49,7 +49,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function __construct(IDBConnection $db, $tableName, $entityClass=null){ + public function __construct(IDBConnection $db, $tableName, $entityClass=null) { $this->db = $db; $this->tableName = '*PREFIX*' . $tableName; @@ -68,7 +68,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function getTableName(){ + public function getTableName() { return $this->tableName; } @@ -80,7 +80,7 @@ abstract class Mapper { * @since 7.0.0 - return value added in 8.1.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function delete(Entity $entity){ + public function delete(Entity $entity) { $sql = 'DELETE FROM `' . $this->tableName . '` WHERE `id` = ?'; $stmt = $this->execute($sql, [$entity->getId()]); $stmt->closeCursor(); @@ -95,7 +95,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function insert(Entity $entity){ + public function insert(Entity $entity) { // get updated fields to save, fields have to be set using a setter to // be saved $properties = $entity->getUpdatedFields(); @@ -145,7 +145,7 @@ abstract class Mapper { * @since 7.0.0 - return value was added in 8.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function update(Entity $entity){ + public function update(Entity $entity) { // if entity wasn't changed it makes no sense to run a db query $properties = $entity->getUpdatedFields(); if(count($properties) === 0) { @@ -235,7 +235,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function execute($sql, array $params=[], $limit=null, $offset=null){ + protected function execute($sql, array $params=[], $limit=null, $offset=null) { $query = $this->db->prepare($sql, $limit, $offset); if ($this->isAssocArray($params)) { @@ -271,7 +271,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null){ + protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null) { $stmt = $this->execute($sql, $params, $limit, $offset); $row = $stmt->fetch(); @@ -285,7 +285,7 @@ abstract class Mapper { $row2 = $stmt->fetch(); $stmt->closeCursor(); //MDB2 returns null, PDO and doctrine false when no row is available - if( ! ($row2 === false || $row2 === null )) { + if(! ($row2 === false || $row2 === null)) { $msg = $this->buildDebugMessage( 'Did not expect more than one result when executing', $sql, $params, $limit, $offset ); @@ -367,7 +367,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function findEntity($sql, array $params=[], $limit=null, $offset=null){ + protected function findEntity($sql, array $params=[], $limit=null, $offset=null) { return $this->mapRowToEntity($this->findOneQuery($sql, $params, $limit, $offset)); } diff --git a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php index 0f37d16cffc..a3f211194c4 100644 --- a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php +++ b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Db; - /** * This is returned or should be returned when a find request finds more than one * row @@ -40,7 +39,7 @@ class MultipleObjectsReturnedException extends \Exception implements IMapperExce * @param string $msg the error message * @since 7.0.0 */ - public function __construct($msg){ + public function __construct($msg) { parent::__construct($msg); } diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index 487128b7305..c7b4b877651 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -58,7 +58,7 @@ abstract class QBMapper { * mapped to queries without using sql * @since 14.0.0 */ - public function __construct(IDBConnection $db, string $tableName, string $entityClass=null){ + public function __construct(IDBConnection $db, string $tableName, string $entityClass=null) { $this->db = $db; $this->tableName = $tableName; @@ -261,7 +261,7 @@ abstract class QBMapper { $row2 = $cursor->fetch(); $cursor->closeCursor(); - if($row2 !== false ) { + if($row2 !== false) { $msg = $this->buildDebugMessage( 'Did not expect more than one result when executing', $query ); diff --git a/lib/public/AppFramework/Http/DataDisplayResponse.php b/lib/public/AppFramework/Http/DataDisplayResponse.php index 512e52ee9fc..8e14b231522 100644 --- a/lib/public/AppFramework/Http/DataDisplayResponse.php +++ b/lib/public/AppFramework/Http/DataDisplayResponse.php @@ -48,7 +48,7 @@ class DataDisplayResponse extends Response { * @since 8.1.0 */ public function __construct($data='', $statusCode=Http::STATUS_OK, - $headers=[]) { + $headers=[]) { parent::__construct(); $this->data = $data; @@ -73,7 +73,7 @@ class DataDisplayResponse extends Response { * @return DataDisplayResponse Reference to this object * @since 8.1.0 */ - public function setData($data){ + public function setData($data) { $this->data = $data; return $this; @@ -85,7 +85,7 @@ class DataDisplayResponse extends Response { * @return string the data * @since 8.1.0 */ - public function getData(){ + public function getData() { return $this->data; } diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php index 700fe1f418b..a978df49010 100644 --- a/lib/public/AppFramework/Http/DataResponse.php +++ b/lib/public/AppFramework/Http/DataResponse.php @@ -53,7 +53,7 @@ class DataResponse extends Response { * @since 8.0.0 */ public function __construct($data=[], $statusCode=Http::STATUS_OK, - array $headers=[]) { + array $headers=[]) { parent::__construct(); $this->data = $data; @@ -68,7 +68,7 @@ class DataResponse extends Response { * @return DataResponse Reference to this object * @since 8.0.0 */ - public function setData($data){ + public function setData($data) { $this->data = $data; return $this; @@ -80,7 +80,7 @@ class DataResponse extends Response { * @return array the data * @since 8.0.0 */ - public function getData(){ + public function getData() { return $this->data; } diff --git a/lib/public/AppFramework/Http/DownloadResponse.php b/lib/public/AppFramework/Http/DownloadResponse.php index 2f808ff156c..c28550a0bbd 100644 --- a/lib/public/AppFramework/Http/DownloadResponse.php +++ b/lib/public/AppFramework/Http/DownloadResponse.php @@ -25,7 +25,6 @@ namespace OCP\AppFramework\Http; - /** * Prompts the user to download the a file * @since 7.0.0 diff --git a/lib/public/AppFramework/Http/ICallbackResponse.php b/lib/public/AppFramework/Http/ICallbackResponse.php index f12a406120a..ca2f5f424ff 100644 --- a/lib/public/AppFramework/Http/ICallbackResponse.php +++ b/lib/public/AppFramework/Http/ICallbackResponse.php @@ -25,7 +25,6 @@ namespace OCP\AppFramework\Http; - /** * Interface ICallbackResponse * diff --git a/lib/public/AppFramework/Http/IOutput.php b/lib/public/AppFramework/Http/IOutput.php index 082e5e40046..83d65857c16 100644 --- a/lib/public/AppFramework/Http/IOutput.php +++ b/lib/public/AppFramework/Http/IOutput.php @@ -26,7 +26,6 @@ namespace OCP\AppFramework\Http; - /** * Very thin wrapper class to make output testable * @since 8.1.0 diff --git a/lib/public/AppFramework/Http/JSONResponse.php b/lib/public/AppFramework/Http/JSONResponse.php index 9451ef6677e..1d7a626d5cd 100644 --- a/lib/public/AppFramework/Http/JSONResponse.php +++ b/lib/public/AppFramework/Http/JSONResponse.php @@ -86,7 +86,7 @@ class JSONResponse extends Response { * @return JSONResponse Reference to this object * @since 6.0.0 - return value was added in 7.0.0 */ - public function setData($data){ + public function setData($data) { $this->data = $data; return $this; @@ -98,7 +98,7 @@ class JSONResponse extends Response { * @return array the data * @since 6.0.0 */ - public function getData(){ + public function getData() { return $this->data; } diff --git a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php index b34ede45dfd..9072ca8a059 100644 --- a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php +++ b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Http; - /** * Redirects to the default app * @since 16.0.0 diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 2fc985aabfb..0aacc2f3a58 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -198,8 +198,8 @@ class Response { */ public function addHeader($name, $value) { $name = trim($name); // always remove leading and trailing whitespace - // to be able to reliably check for security - // headers + // to be able to reliably check for security + // headers if(is_null($value)) { unset($this->headers[$name]); diff --git a/lib/public/AppFramework/Http/StreamResponse.php b/lib/public/AppFramework/Http/StreamResponse.php index 80985ae7527..a228ed5566c 100644 --- a/lib/public/AppFramework/Http/StreamResponse.php +++ b/lib/public/AppFramework/Http/StreamResponse.php @@ -42,7 +42,7 @@ class StreamResponse extends Response implements ICallbackResponse { * @param string|resource $filePath the path to the file or a file handle which should be streamed * @since 8.1.0 */ - public function __construct ($filePath) { + public function __construct($filePath) { parent::__construct(); $this->filePath = $filePath; @@ -55,7 +55,7 @@ class StreamResponse extends Response implements ICallbackResponse { * @param IOutput $output a small wrapper that handles output * @since 8.1.0 */ - public function callback (IOutput $output) { + public function callback(IOutput $output) { // handle caching if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) { if (!(is_resource($this->filePath) || file_exists($this->filePath))) { diff --git a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php index 9965ca6bd33..67fe6165eef 100644 --- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php +++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php @@ -98,7 +98,7 @@ class PublicTemplateResponse extends TemplateResponse { } $this->headerActions[] = $action; } - usort($this->headerActions, function(IMenuAction $a, IMenuAction $b) { + usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) { return $a->getPriority() > $b->getPriority(); }); } diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php index 4a77d4844ed..504b4af93ff 100644 --- a/lib/public/AppFramework/Http/TemplateResponse.php +++ b/lib/public/AppFramework/Http/TemplateResponse.php @@ -33,7 +33,6 @@ namespace OCP\AppFramework\Http; - /** * Response for a normal template * @since 6.0.0 @@ -77,7 +76,7 @@ class TemplateResponse extends Response { * @since 6.0.0 - parameters $params and $renderAs were added in 7.0.0 */ public function __construct($appName, $templateName, array $params=[], - $renderAs='user') { + $renderAs='user') { parent::__construct(); $this->templateName = $templateName; @@ -97,7 +96,7 @@ class TemplateResponse extends Response { * @return TemplateResponse Reference to this object * @since 6.0.0 - return value was added in 7.0.0 */ - public function setParams(array $params){ + public function setParams(array $params) { $this->params = $params; return $this; @@ -109,7 +108,7 @@ class TemplateResponse extends Response { * @return array the params * @since 6.0.0 */ - public function getParams(){ + public function getParams() { return $this->params; } @@ -119,7 +118,7 @@ class TemplateResponse extends Response { * @return string the name of the used template * @since 6.0.0 */ - public function getTemplateName(){ + public function getTemplateName() { return $this->templateName; } @@ -133,7 +132,7 @@ class TemplateResponse extends Response { * @return TemplateResponse Reference to this object * @since 6.0.0 - return value was added in 7.0.0 */ - public function renderAs($renderAs){ + public function renderAs($renderAs) { $this->renderAs = $renderAs; return $this; @@ -145,7 +144,7 @@ class TemplateResponse extends Response { * @return string the renderAs value * @since 6.0.0 */ - public function getRenderAs(){ + public function getRenderAs() { return $this->renderAs; } @@ -155,7 +154,7 @@ class TemplateResponse extends Response { * @return string the rendered html * @since 6.0.0 */ - public function render(){ + public function render() { // \OCP\Template needs an empty string instead of 'blank' for an unwrapped response $renderAs = $this->renderAs === 'blank' ? '' : $this->renderAs; diff --git a/lib/public/AppFramework/Middleware.php b/lib/public/AppFramework/Middleware.php index 5df8a919efe..2cf27fc14fd 100644 --- a/lib/public/AppFramework/Middleware.php +++ b/lib/public/AppFramework/Middleware.php @@ -52,7 +52,7 @@ abstract class Middleware { * the controller * @since 6.0.0 */ - public function beforeController($controller, $methodName){ + public function beforeController($controller, $methodName) { } @@ -72,7 +72,7 @@ abstract class Middleware { * @return Response a Response object in case that the exception was handled * @since 6.0.0 */ - public function afterException($controller, $methodName, \Exception $exception){ + public function afterException($controller, $methodName, \Exception $exception) { throw $exception; } @@ -88,7 +88,7 @@ abstract class Middleware { * @return Response a Response object * @since 6.0.0 */ - public function afterController($controller, $methodName, Response $response){ + public function afterController($controller, $methodName, Response $response) { return $response; } @@ -104,7 +104,7 @@ abstract class Middleware { * @return string the output that should be printed * @since 6.0.0 */ - public function beforeOutput($controller, $methodName, $output){ + public function beforeOutput($controller, $methodName, $output) { return $output; } diff --git a/lib/public/AppFramework/OCSController.php b/lib/public/AppFramework/OCSController.php index 4a3fa882577..d7243bb4d68 100644 --- a/lib/public/AppFramework/OCSController.php +++ b/lib/public/AppFramework/OCSController.php @@ -63,7 +63,7 @@ abstract class OCSController extends ApiController { IRequest $request, $corsMethods='PUT, POST, GET, DELETE, PATCH', $corsAllowedHeaders='Authorization, Content-Type, Accept', - $corsMaxAge=1728000){ + $corsMaxAge=1728000) { parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge); $this->registerResponder('json', function ($data) { diff --git a/lib/public/AppFramework/Utility/ITimeFactory.php b/lib/public/AppFramework/Utility/ITimeFactory.php index 08266ec775d..2ab10986f19 100644 --- a/lib/public/AppFramework/Utility/ITimeFactory.php +++ b/lib/public/AppFramework/Utility/ITimeFactory.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Utility; - /** * Needed to mock calls to time() * @since 8.0.0 diff --git a/lib/public/Authentication/Events/LoginFailedEvent.php b/lib/public/Authentication/Events/LoginFailedEvent.php index 15c8fb31bce..ba5a54efb45 100644 --- a/lib/public/Authentication/Events/LoginFailedEvent.php +++ b/lib/public/Authentication/Events/LoginFailedEvent.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php index 9c10e86b5f8..70026ca1dad 100644 --- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php +++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php @@ -31,7 +31,7 @@ use OCP\IUser; /** * Nextcloud 2FA provider registry for stateful 2FA providers - * + * * This service keeps track of which providers are currently active for a specific * user. Stateful 2FA providers (IStatefulProvider) must use this service to save * their enabled/disabled state. diff --git a/lib/public/BackgroundJob/IJob.php b/lib/public/BackgroundJob/IJob.php index 719d0ea013a..d1d763fd5e4 100644 --- a/lib/public/BackgroundJob/IJob.php +++ b/lib/public/BackgroundJob/IJob.php @@ -24,6 +24,7 @@ */ namespace OCP\BackgroundJob; + use OCP\ILogger; /** diff --git a/lib/public/BackgroundJob/Job.php b/lib/public/BackgroundJob/Job.php index b5b920338df..803a06ae176 100644 --- a/lib/public/BackgroundJob/Job.php +++ b/lib/public/BackgroundJob/Job.php @@ -60,7 +60,7 @@ abstract class Job implements IJob { /** * The function to prepare the execution of the job. - + * * * @param IJobList $jobList * @param ILogger|null $logger diff --git a/lib/public/Calendar/Resource/IBackend.php b/lib/public/Calendar/Resource/IBackend.php index 416643919ec..474d5f902ee 100644 --- a/lib/public/Calendar/Resource/IBackend.php +++ b/lib/public/Calendar/Resource/IBackend.php @@ -22,6 +22,7 @@ */ namespace OCP\Calendar\Resource; + use OCP\Calendar\BackendTemporarilyUnavailableException; /** diff --git a/lib/public/Calendar/Room/IBackend.php b/lib/public/Calendar/Room/IBackend.php index 00f8b64a41e..d0d3e70dc17 100644 --- a/lib/public/Calendar/Room/IBackend.php +++ b/lib/public/Calendar/Room/IBackend.php @@ -22,6 +22,7 @@ */ namespace OCP\Calendar\Room; + use OCP\Calendar\BackendTemporarilyUnavailableException; /** diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php index cd711ea20b2..6b46d9157de 100644 --- a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php +++ b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Collaboration\AutoComplete; - use Symfony\Component\EventDispatcher\GenericEvent; /** diff --git a/lib/public/Collaboration/Resources/ResourceException.php b/lib/public/Collaboration/Resources/ResourceException.php index 81bace8f085..8aa72447c95 100644 --- a/lib/public/Collaboration/Resources/ResourceException.php +++ b/lib/public/Collaboration/Resources/ResourceException.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Collaboration\Resources; - /** * @since 16.0.0 */ diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php index 45baa127eee..dcb4c7ddbb3 100644 --- a/lib/public/Contacts/IManager.php +++ b/lib/public/Contacts/IManager.php @@ -160,7 +160,7 @@ interface IManager { /** * Return a list of the user's addressbooks display names - * + * * @return array * @since 6.0.0 * @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead @@ -169,7 +169,7 @@ interface IManager { /** * Return a list of the user's addressbooks - * + * * @return IAddressBook[] * @since 16.0.0 */ @@ -177,7 +177,7 @@ interface IManager { /** * removes all registered address book instances - * + * * @return void * @since 6.0.0 */ diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 1db98ba98f4..5f17585a131 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -25,7 +25,6 @@ namespace OCP\DB\QueryBuilder; - use Doctrine\DBAL\Query\Expression\ExpressionBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index ece5d36c3eb..d65872388f9 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -26,7 +26,6 @@ namespace OCP\DB\QueryBuilder; - use Doctrine\DBAL\Connection; /** diff --git a/lib/public/Dashboard/IDashboardManager.php b/lib/public/Dashboard/IDashboardManager.php index 683ead5512e..7805bc236e8 100644 --- a/lib/public/Dashboard/IDashboardManager.php +++ b/lib/public/Dashboard/IDashboardManager.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard; - use OCP\Dashboard\Exceptions\DashboardAppNotAvailableException; use OCP\Dashboard\Model\IWidgetConfig; use OCP\Dashboard\Service\IEventsService; diff --git a/lib/public/Dashboard/IDashboardWidget.php b/lib/public/Dashboard/IDashboardWidget.php index 8532a8700a1..9010845355a 100644 --- a/lib/public/Dashboard/IDashboardWidget.php +++ b/lib/public/Dashboard/IDashboardWidget.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\Dashboard; - use OCP\Dashboard\Model\IWidgetConfig; use OCP\Dashboard\Model\IWidgetRequest; use OCP\Dashboard\Model\WidgetSetup; diff --git a/lib/public/Dashboard/Model/IWidgetConfig.php b/lib/public/Dashboard/Model/IWidgetConfig.php index 7d3d88f3241..bc33b37f544 100644 --- a/lib/public/Dashboard/Model/IWidgetConfig.php +++ b/lib/public/Dashboard/Model/IWidgetConfig.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use OCP\Dashboard\IDashboardWidget; /** diff --git a/lib/public/Dashboard/Model/IWidgetRequest.php b/lib/public/Dashboard/Model/IWidgetRequest.php index 0a49e34ab30..b646935978a 100644 --- a/lib/public/Dashboard/Model/IWidgetRequest.php +++ b/lib/public/Dashboard/Model/IWidgetRequest.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use OCP\Dashboard\IDashboardWidget; /** diff --git a/lib/public/Dashboard/Model/WidgetSetting.php b/lib/public/Dashboard/Model/WidgetSetting.php index 29744c56fac..b20d8d68b38 100644 --- a/lib/public/Dashboard/Model/WidgetSetting.php +++ b/lib/public/Dashboard/Model/WidgetSetting.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use JsonSerializable; /** diff --git a/lib/public/Dashboard/Model/WidgetSetup.php b/lib/public/Dashboard/Model/WidgetSetup.php index 4d9884fd470..80885705633 100644 --- a/lib/public/Dashboard/Model/WidgetSetup.php +++ b/lib/public/Dashboard/Model/WidgetSetup.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use JsonSerializable; /** diff --git a/lib/public/Dashboard/Model/WidgetTemplate.php b/lib/public/Dashboard/Model/WidgetTemplate.php index ba4447638a1..979a49a342d 100644 --- a/lib/public/Dashboard/Model/WidgetTemplate.php +++ b/lib/public/Dashboard/Model/WidgetTemplate.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use JsonSerializable; /** diff --git a/lib/public/Dashboard/Service/IEventsService.php b/lib/public/Dashboard/Service/IEventsService.php index a036149599c..a9898f578e6 100644 --- a/lib/public/Dashboard/Service/IEventsService.php +++ b/lib/public/Dashboard/Service/IEventsService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Service; - use OCP\Dashboard\IDashboardManager; /** diff --git a/lib/public/Dashboard/Service/IWidgetsService.php b/lib/public/Dashboard/Service/IWidgetsService.php index 73a0bd7b171..dfa89ec1f59 100644 --- a/lib/public/Dashboard/Service/IWidgetsService.php +++ b/lib/public/Dashboard/Service/IWidgetsService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Service; - use OCP\Dashboard\Model\IWidgetConfig; /** diff --git a/lib/public/Diagnostics/IQueryLogger.php b/lib/public/Diagnostics/IQueryLogger.php index 14628c5688f..5a5656a6bca 100644 --- a/lib/public/Diagnostics/IQueryLogger.php +++ b/lib/public/Diagnostics/IQueryLogger.php @@ -35,10 +35,10 @@ use Doctrine\DBAL\Logging\SQLLogger; */ interface IQueryLogger extends SQLLogger { /** - * Mark the start of a query providing query SQL statement, its parameters and types. - * This method should be called as close to the DB as possible and after - * query is finished finalized with stopQuery() method. - * + * Mark the start of a query providing query SQL statement, its parameters and types. + * This method should be called as close to the DB as possible and after + * query is finished finalized with stopQuery() method. + * * @param string $sql * @param array|null $params * @param array|null $types @@ -49,7 +49,7 @@ interface IQueryLogger extends SQLLogger { /** * Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to * be returned with getQueries() method. - * + * * @return mixed * @since 8.0.0 */ @@ -58,7 +58,7 @@ interface IQueryLogger extends SQLLogger { /** * This method should return all \OCP\Diagnostics\IQuery objects stored using * startQuery()/stopQuery() methods. - * + * * @return \OCP\Diagnostics\IQuery[] * @since 8.0.0 */ @@ -67,8 +67,8 @@ interface IQueryLogger extends SQLLogger { /** * Activate the module for the duration of the request. Deactivated module * does not create and store \OCP\Diagnostics\IQuery objects. - * Only activated module should create and store objects to be - * returned with getQueries() call. + * Only activated module should create and store objects to be + * returned with getQueries() call. * * @since 12.0.0 */ diff --git a/lib/public/DirectEditing/ACreateEmpty.php b/lib/public/DirectEditing/ACreateEmpty.php index 022bccf9516..71a18c94e23 100644 --- a/lib/public/DirectEditing/ACreateEmpty.php +++ b/lib/public/DirectEditing/ACreateEmpty.php @@ -23,7 +23,6 @@ namespace OCP\DirectEditing; - use OCP\Files\File; /** diff --git a/lib/public/DirectEditing/IEditor.php b/lib/public/DirectEditing/IEditor.php index 5b376ba2ad5..22ec130aee0 100644 --- a/lib/public/DirectEditing/IEditor.php +++ b/lib/public/DirectEditing/IEditor.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\DirectEditing; - use OCP\AppFramework\Http\Response; /** diff --git a/lib/public/DirectEditing/IManager.php b/lib/public/DirectEditing/IManager.php index 33d4716fc60..e9548a91e7a 100644 --- a/lib/public/DirectEditing/IManager.php +++ b/lib/public/DirectEditing/IManager.php @@ -87,4 +87,3 @@ interface IManager { public function cleanup(): int; } - diff --git a/lib/public/DirectEditing/IToken.php b/lib/public/DirectEditing/IToken.php index 416b2ccb807..46c423053fe 100644 --- a/lib/public/DirectEditing/IToken.php +++ b/lib/public/DirectEditing/IToken.php @@ -23,7 +23,6 @@ namespace OCP\DirectEditing; - use OCP\Files\File; use OCP\Files\NotFoundException; diff --git a/lib/public/Encryption/Exceptions/GenericEncryptionException.php b/lib/public/Encryption/Exceptions/GenericEncryptionException.php index 938e6662a79..2124e5effea 100644 --- a/lib/public/Encryption/Exceptions/GenericEncryptionException.php +++ b/lib/public/Encryption/Exceptions/GenericEncryptionException.php @@ -25,6 +25,7 @@ */ namespace OCP\Encryption\Exceptions; + use OC\HintException; /** diff --git a/lib/public/Encryption/IEncryptionModule.php b/lib/public/Encryption/IEncryptionModule.php index 90d427d4a1a..9646fb90e93 100644 --- a/lib/public/Encryption/IEncryptionModule.php +++ b/lib/public/Encryption/IEncryptionModule.php @@ -25,6 +25,7 @@ */ namespace OCP\Encryption; + use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/public/Files.php b/lib/public/Files.php index 1e6e9d48e03..a1ff8a6d5a9 100644 --- a/lib/public/Files.php +++ b/lib/public/Files.php @@ -54,8 +54,8 @@ class Files { * @since 5.0.0 * @deprecated 14.0.0 */ - static public function rmdirr( $dir ) { - return \OC_Helper::rmdirr( $dir ); + static public function rmdirr($dir) { + return \OC_Helper::rmdirr($dir); } /** @@ -66,7 +66,7 @@ class Files { * @since 5.0.0 * @deprecated 14.0.0 */ - static public function getMimeType( $path ) { + static public function getMimeType($path) { return \OC::$server->getMimeTypeDetector()->detect($path); } @@ -89,8 +89,8 @@ class Files { * @since 5.0.0 * @deprecated 14.0.0 */ - public static function streamCopy( $source, $target ) { - list($count, ) = \OC_Helper::streamCopy( $source, $target ); + public static function streamCopy($source, $target) { + list($count, ) = \OC_Helper::streamCopy($source, $target); return $count; } @@ -115,6 +115,6 @@ class Files { * @deprecated 14.0.0 use IAppData instead */ public static function getStorage($app) { - return \OC_App::getStorage( $app ); + return \OC_App::getStorage($app); } } diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php index a4c9bfe3e45..d1388f02b1d 100644 --- a/lib/public/Files/Cache/ICache.php +++ b/lib/public/Files/Cache/ICache.php @@ -21,6 +21,7 @@ */ namespace OCP\Files\Cache; + use OCP\Files\Search\ISearchQuery; /** diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php index a78a9ca8f78..4c05b0fb490 100644 --- a/lib/public/Files/Folder.php +++ b/lib/public/Files/Folder.php @@ -32,6 +32,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; + use OCP\Files\Search\ISearchQuery; /** diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php index ec80b3480d1..bb75ce742c5 100644 --- a/lib/public/Files/IMimeTypeDetector.php +++ b/lib/public/Files/IMimeTypeDetector.php @@ -26,7 +26,6 @@ namespace OCP\Files; - /** * Interface IMimeTypeDetector * @package OCP\Files diff --git a/lib/public/Files/Storage/IStorageFactory.php b/lib/public/Files/Storage/IStorageFactory.php index e5a94de34f9..e9550fdaa29 100644 --- a/lib/public/Files/Storage/IStorageFactory.php +++ b/lib/public/Files/Storage/IStorageFactory.php @@ -23,6 +23,7 @@ */ namespace OCP\Files\Storage; + use OCP\Files\Mount\IMountPoint; /** diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php index 0b1defaded8..052a6b5ad78 100644 --- a/lib/public/Files/StorageNotAvailableException.php +++ b/lib/public/Files/StorageNotAvailableException.php @@ -36,6 +36,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; + use OC\HintException; /** diff --git a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php index 24c14089bcc..1ca6bff98c9 100644 --- a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php +++ b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Files_FullTextSearch\Model; - use OC\FullTextSearch\Model\IndexDocument; use OCP\FullTextSearch\Model\IIndexDocument; diff --git a/lib/public/FullTextSearch/IFullTextSearchManager.php b/lib/public/FullTextSearch/IFullTextSearchManager.php index 8730a344ded..e420e91f3a1 100644 --- a/lib/public/FullTextSearch/IFullTextSearchManager.php +++ b/lib/public/FullTextSearch/IFullTextSearchManager.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch; - use OCP\FullTextSearch\Model\IIndex; use OCP\FullTextSearch\Model\ISearchResult; use OCP\FullTextSearch\Service\IIndexService; diff --git a/lib/public/FullTextSearch/IFullTextSearchPlatform.php b/lib/public/FullTextSearch/IFullTextSearchPlatform.php index a22e6930383..797c179082e 100644 --- a/lib/public/FullTextSearch/IFullTextSearchPlatform.php +++ b/lib/public/FullTextSearch/IFullTextSearchPlatform.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch; - use OCP\FullTextSearch\Model\IDocumentAccess; use OCP\FullTextSearch\Model\IIndex; use OCP\FullTextSearch\Model\IIndexDocument; diff --git a/lib/public/FullTextSearch/IFullTextSearchProvider.php b/lib/public/FullTextSearch/IFullTextSearchProvider.php index f9a56b40e85..4a37001754a 100644 --- a/lib/public/FullTextSearch/IFullTextSearchProvider.php +++ b/lib/public/FullTextSearch/IFullTextSearchProvider.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch; - use OCP\FullTextSearch\Model\IIndex; use OCP\FullTextSearch\Model\IIndexDocument; use OCP\FullTextSearch\Model\IIndexOptions; diff --git a/lib/public/FullTextSearch/Model/IDocumentAccess.php b/lib/public/FullTextSearch/Model/IDocumentAccess.php index 713a018e661..478072593aa 100644 --- a/lib/public/FullTextSearch/Model/IDocumentAccess.php +++ b/lib/public/FullTextSearch/Model/IDocumentAccess.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IDocumentAccess * diff --git a/lib/public/FullTextSearch/Model/IIndex.php b/lib/public/FullTextSearch/Model/IIndex.php index 0f3f718d7ba..7078962d99e 100644 --- a/lib/public/FullTextSearch/Model/IIndex.php +++ b/lib/public/FullTextSearch/Model/IIndex.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IIndex * diff --git a/lib/public/FullTextSearch/Model/IIndexDocument.php b/lib/public/FullTextSearch/Model/IIndexDocument.php index e86582b9234..667d2c15c7f 100644 --- a/lib/public/FullTextSearch/Model/IIndexDocument.php +++ b/lib/public/FullTextSearch/Model/IIndexDocument.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Class IIndexDocument * diff --git a/lib/public/FullTextSearch/Model/IIndexOptions.php b/lib/public/FullTextSearch/Model/IIndexOptions.php index daa8f5a0c7a..8719289d746 100644 --- a/lib/public/FullTextSearch/Model/IIndexOptions.php +++ b/lib/public/FullTextSearch/Model/IIndexOptions.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IIndexOptions * diff --git a/lib/public/FullTextSearch/Model/IRunner.php b/lib/public/FullTextSearch/Model/IRunner.php index c4eecfa4894..d92eb789d64 100644 --- a/lib/public/FullTextSearch/Model/IRunner.php +++ b/lib/public/FullTextSearch/Model/IRunner.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IRunner * diff --git a/lib/public/FullTextSearch/Model/ISearchOption.php b/lib/public/FullTextSearch/Model/ISearchOption.php index bbd2ac4827a..3f893c516d9 100644 --- a/lib/public/FullTextSearch/Model/ISearchOption.php +++ b/lib/public/FullTextSearch/Model/ISearchOption.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * @since 16.0.0 * diff --git a/lib/public/FullTextSearch/Model/ISearchRequest.php b/lib/public/FullTextSearch/Model/ISearchRequest.php index 2453c1e871c..d48b74288fd 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequest.php +++ b/lib/public/FullTextSearch/Model/ISearchRequest.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface ISearchRequest * diff --git a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php index ca11b0c9317..c72d15a6930 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php +++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface ISearchRequestSimpleQuery * diff --git a/lib/public/FullTextSearch/Model/ISearchResult.php b/lib/public/FullTextSearch/Model/ISearchResult.php index 775c4314bb1..1d8cb5d8037 100644 --- a/lib/public/FullTextSearch/Model/ISearchResult.php +++ b/lib/public/FullTextSearch/Model/ISearchResult.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - use OCP\FullTextSearch\IFullTextSearchProvider; /** diff --git a/lib/public/FullTextSearch/Model/ISearchTemplate.php b/lib/public/FullTextSearch/Model/ISearchTemplate.php index 43d1a586a1d..b63bae43a0a 100644 --- a/lib/public/FullTextSearch/Model/ISearchTemplate.php +++ b/lib/public/FullTextSearch/Model/ISearchTemplate.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - use OCP\FullTextSearch\IFullTextSearchProvider; /** diff --git a/lib/public/FullTextSearch/Service/IIndexService.php b/lib/public/FullTextSearch/Service/IIndexService.php index 3c3bd4bbe1f..f660909c9ca 100644 --- a/lib/public/FullTextSearch/Service/IIndexService.php +++ b/lib/public/FullTextSearch/Service/IIndexService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Service; - use OCP\FullTextSearch\Model\IIndex; /** diff --git a/lib/public/FullTextSearch/Service/IProviderService.php b/lib/public/FullTextSearch/Service/IProviderService.php index 8d4b68e4136..50c32649357 100644 --- a/lib/public/FullTextSearch/Service/IProviderService.php +++ b/lib/public/FullTextSearch/Service/IProviderService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Service; - /** * Interface IProviderService * diff --git a/lib/public/FullTextSearch/Service/ISearchService.php b/lib/public/FullTextSearch/Service/ISearchService.php index 8c2152855a1..89fa1a444e2 100644 --- a/lib/public/FullTextSearch/Service/ISearchService.php +++ b/lib/public/FullTextSearch/Service/ISearchService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Service; - use OCP\FullTextSearch\Model\ISearchRequest; use OCP\FullTextSearch\Model\ISearchResult; diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php index a7aa9d448f1..405b4ba1b04 100644 --- a/lib/public/IDBConnection.php +++ b/lib/public/IDBConnection.php @@ -38,6 +38,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP; + use Doctrine\DBAL\Schema\Schema; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/public/ISearch.php b/lib/public/ISearch.php index bdfe8431f13..fa6fc49c976 100644 --- a/lib/public/ISearch.php +++ b/lib/public/ISearch.php @@ -27,7 +27,6 @@ namespace OCP; - /** * Small Interface for Search * @since 7.0.0 diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php index 7443f32bfe3..40f8d93f350 100644 --- a/lib/public/IServerContainer.php +++ b/lib/public/IServerContainer.php @@ -47,6 +47,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP; + use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationProviderManager; use OCP\Log\ILogFactory; diff --git a/lib/public/ITagManager.php b/lib/public/ITagManager.php index 960ae6f2f3b..46e1ba06297 100644 --- a/lib/public/ITagManager.php +++ b/lib/public/ITagManager.php @@ -59,6 +59,6 @@ interface ITagManager { * logged in user * @return \OCP\ITags * @since 6.0.0 - parameter $includeShared and $userId were added in 8.0.0 - */ + */ public function load($type, $defaultTags = [], $includeShared = false, $userId = null); } diff --git a/lib/public/IUser.php b/lib/public/IUser.php index a5e94bf8ac4..910c1a06d9d 100644 --- a/lib/public/IUser.php +++ b/lib/public/IUser.php @@ -28,7 +28,6 @@ namespace OCP; - /** * Interface IUser * diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php index 7985c1bd6f4..a8df1a1af7e 100644 --- a/lib/public/IUserManager.php +++ b/lib/public/IUserManager.php @@ -30,7 +30,6 @@ namespace OCP; - /** * Class Manager * @@ -50,11 +49,11 @@ namespace OCP; */ interface IUserManager { /** - * register a user backend - * - * @param \OCP\UserInterface $backend - * @since 8.0.0 - */ + * register a user backend + * + * @param \OCP\UserInterface $backend + * @since 8.0.0 + */ public function registerBackend($backend); /** diff --git a/lib/public/LDAP/ILDAPProvider.php b/lib/public/LDAP/ILDAPProvider.php index 25127987eef..491906e5556 100644 --- a/lib/public/LDAP/ILDAPProvider.php +++ b/lib/public/LDAP/ILDAPProvider.php @@ -76,7 +76,7 @@ interface ILDAPProvider { public function sanitizeDN($dn); /** - * Return a new LDAP connection resource for the specified user. + * Return a new LDAP connection resource for the specified user. * @param string $uid user id * @return resource of the LDAP connection * @since 11.0.0 diff --git a/lib/public/Lock/ManuallyLockedException.php b/lib/public/Lock/ManuallyLockedException.php index 12567456e18..1609727f4e8 100644 --- a/lib/public/Lock/ManuallyLockedException.php +++ b/lib/public/Lock/ManuallyLockedException.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\Lock; - /** * Class ManuallyLockedException * diff --git a/lib/public/Notification/AlreadyProcessedException.php b/lib/public/Notification/AlreadyProcessedException.php index 2cb1fc92765..251221004c9 100644 --- a/lib/public/Notification/AlreadyProcessedException.php +++ b/lib/public/Notification/AlreadyProcessedException.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Notification; - /** * @since 17.0.0 */ diff --git a/lib/public/RichObjectStrings/Definitions.php b/lib/public/RichObjectStrings/Definitions.php index a4cf4dac725..6b293dfff6d 100644 --- a/lib/public/RichObjectStrings/Definitions.php +++ b/lib/public/RichObjectStrings/Definitions.php @@ -26,7 +26,6 @@ namespace OCP\RichObjectStrings; - /** * Class Definitions * diff --git a/lib/public/SabrePluginEvent.php b/lib/public/SabrePluginEvent.php index b04ca420e32..c9f80d184c2 100644 --- a/lib/public/SabrePluginEvent.php +++ b/lib/public/SabrePluginEvent.php @@ -25,7 +25,6 @@ namespace OCP; - use OCP\AppFramework\Http; use OCP\EventDispatcher\Event; use Sabre\DAV\Server; diff --git a/lib/public/SabrePluginException.php b/lib/public/SabrePluginException.php index 3f46885a11a..7d2220999e5 100644 --- a/lib/public/SabrePluginException.php +++ b/lib/public/SabrePluginException.php @@ -22,7 +22,6 @@ namespace OCP; - use Sabre\DAV\Exception; /** diff --git a/lib/public/Search/Result.php b/lib/public/Search/Result.php index 0cbeb114af6..8d9a4e5d237 100644 --- a/lib/public/Search/Result.php +++ b/lib/public/Search/Result.php @@ -56,7 +56,7 @@ class Result { /** * The type of search result returned; for consistency, name this the same - * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. + * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. * @var string * @since 7.0.0 */ diff --git a/lib/public/Security/IContentSecurityPolicyManager.php b/lib/public/Security/IContentSecurityPolicyManager.php index bd579703cad..465a8c317f6 100644 --- a/lib/public/Security/IContentSecurityPolicyManager.php +++ b/lib/public/Security/IContentSecurityPolicyManager.php @@ -22,6 +22,7 @@ */ namespace OCP\Security; + use OCP\AppFramework\Http\EmptyContentSecurityPolicy; /** diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php index c2d149feaf8..3fbc6c8ee10 100644 --- a/lib/public/Security/ISecureRandom.php +++ b/lib/public/Security/ISecureRandom.php @@ -51,7 +51,7 @@ interface ISecureRandom { /** * Characters that can be used for <code>generate($length, $characters)</code>, to - * generate human readable random strings. Lower- and upper-case characters and digits + * generate human readable random strings. Lower- and upper-case characters and digits * are included. Characters which are ambiguous are excluded, such as I, l, and 1 and so on. */ const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789'; diff --git a/lib/public/Share.php b/lib/public/Share.php index 25e255f35ba..622a6718924 100644 --- a/lib/public/Share.php +++ b/lib/public/Share.php @@ -121,7 +121,7 @@ class Share extends \OC\Share\Constants { * @deprecated 17.0.0 */ public static function getItemShared($itemType, $itemSource, $format = self::FORMAT_NONE, - $parameters = null, $includeCollections = false) { + $parameters = null, $includeCollections = false) { return \OC\Share\Share::getItemShared($itemType, $itemSource, $format, $parameters, $includeCollections); } diff --git a/lib/public/Share/Exceptions/GenericShareException.php b/lib/public/Share/Exceptions/GenericShareException.php index b9c134b8d00..3714edbfc33 100644 --- a/lib/public/Share/Exceptions/GenericShareException.php +++ b/lib/public/Share/Exceptions/GenericShareException.php @@ -23,6 +23,7 @@ */ namespace OCP\Share\Exceptions; + use OC\HintException; /** diff --git a/lib/public/User/Backend/ABackend.php b/lib/public/User/Backend/ABackend.php index 6c691ef1fce..a57a561369b 100644 --- a/lib/public/User/Backend/ABackend.php +++ b/lib/public/User/Backend/ABackend.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** -* @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> + * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/public/User/Events/BeforeUserLoggedInEvent.php b/lib/public/User/Events/BeforeUserLoggedInEvent.php index dca5c16518b..3f64bf7ce3d 100644 --- a/lib/public/User/Events/BeforeUserLoggedInEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedInEvent.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\User\Events; use OCP\EventDispatcher\Event; -use OCP\IUser; /** * @since 18.0.0 diff --git a/lib/public/Util.php b/lib/public/Util.php index f1008ad77c9..4427e39b24b 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -128,7 +128,7 @@ class Util { * @since 4.0.0 * @deprecated 13.0.0 use log of \OCP\ILogger */ - public static function writeLog( $app, $message, $level ) { + public static function writeLog($app, $message, $level) { $context = ['app' => $app]; \OC::$server->getLogger()->log($level, $message, $context); } @@ -170,8 +170,8 @@ class Util { * @param string $file * @since 4.0.0 */ - public static function addStyle( $application, $file = null ) { - \OC_Util::addStyle( $application, $file ); + public static function addStyle($application, $file = null) { + \OC_Util::addStyle($application, $file); } /** @@ -180,8 +180,8 @@ class Util { * @param string $file * @since 4.0.0 */ - public static function addScript( $application, $file = null ) { - \OC_Util::addScript( $application, $file ); + public static function addScript($application, $file = null) { + \OC_Util::addScript($application, $file); } /** @@ -216,7 +216,7 @@ class Util { * @return string the url * @since 4.0.0 - parameter $args was added in 4.5.0 */ - public static function linkToAbsolute( $app, $file, $args = [] ) { + public static function linkToAbsolute($app, $file, $args = []) { $urlGenerator = \OC::$server->getURLGenerator(); return $urlGenerator->getAbsoluteURL( $urlGenerator->linkTo($app, $file, $args) @@ -229,7 +229,7 @@ class Util { * @return string the url * @since 4.0.0 */ - public static function linkToRemote( $service ) { + public static function linkToRemote($service) { $urlGenerator = \OC::$server->getURLGenerator(); $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service; return $urlGenerator->getAbsoluteURL( diff --git a/lib/public/WorkflowEngine/IFileCheck.php b/lib/public/WorkflowEngine/IFileCheck.php index b94f3e512d3..d11a5011367 100644 --- a/lib/public/WorkflowEngine/IFileCheck.php +++ b/lib/public/WorkflowEngine/IFileCheck.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\WorkflowEngine; - use OCP\Files\Storage\IStorage; /** diff --git a/ocm-provider/index.php b/ocm-provider/index.php index 079ef790faa..e1aa7f2b03b 100644 --- a/ocm-provider/index.php +++ b/ocm-provider/index.php @@ -36,4 +36,3 @@ if ($isEnabled) { header($_SERVER["SERVER_PROTOCOL"]." 501 Not Implemented", true, 501); exit("501 Not Implemented"); } - diff --git a/remote.php b/remote.php index a83238d883d..3e2398a0623 100644 --- a/remote.php +++ b/remote.php @@ -76,7 +76,7 @@ function handleException($e) { $server->exec(); } else { $statusCode = 500; - if ($e instanceof \OC\ServiceUnavailableException ) { + if ($e instanceof \OC\ServiceUnavailableException) { $statusCode = 503; } if ($e instanceof RemoteException) { diff --git a/tests/Core/Command/Apps/AppsDisableTest.php b/tests/Core/Command/Apps/AppsDisableTest.php index fea368f4b03..b5fd18ece22 100644 --- a/tests/Core/Command/Apps/AppsDisableTest.php +++ b/tests/Core/Command/Apps/AppsDisableTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Daniel Kesselberg (mail@danielkesselberg.de) diff --git a/tests/Core/Command/Apps/AppsEnableTest.php b/tests/Core/Command/Apps/AppsEnableTest.php index ecbed649d36..a8aa4c434f0 100644 --- a/tests/Core/Command/Apps/AppsEnableTest.php +++ b/tests/Core/Command/Apps/AppsEnableTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Daniel Kesselberg (mail@danielkesselberg.de) diff --git a/tests/Core/Command/Config/App/DeleteConfigTest.php b/tests/Core/Command/Config/App/DeleteConfigTest.php index 251de227d67..442b9c5a8ef 100644 --- a/tests/Core/Command/Config/App/DeleteConfigTest.php +++ b/tests/Core/Command/Config/App/DeleteConfigTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config\App; - use OC\Core\Command\Config\App\DeleteConfig; use OCP\IConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php index 7ecb09b8f82..75e51a68b2f 100644 --- a/tests/Core/Command/Config/App/GetConfigTest.php +++ b/tests/Core/Command/Config/App/GetConfigTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config\App; - use OC\Core\Command\Config\App\GetConfig; use OCP\IConfig; use Symfony\Component\Console\Input\InputInterface; @@ -148,7 +147,7 @@ class GetConfigTest extends TestCase { $output = ''; $this->consoleOutput->expects($this->any()) ->method('writeln') - ->willReturnCallback(function($value) { + ->willReturnCallback(function ($value) { global $output; $output .= $value . "\n"; return $output; diff --git a/tests/Core/Command/Config/App/SetConfigTest.php b/tests/Core/Command/Config/App/SetConfigTest.php index 988e965d317..3077f74b369 100644 --- a/tests/Core/Command/Config/App/SetConfigTest.php +++ b/tests/Core/Command/Config/App/SetConfigTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config\App; - use OC\Core\Command\Config\App\SetConfig; use OCP\IConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/Config/ImportTest.php b/tests/Core/Command/Config/ImportTest.php index fa1ed151678..2c0a6e3d8fd 100644 --- a/tests/Core/Command/Config/ImportTest.php +++ b/tests/Core/Command/Config/ImportTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config; - use OC\Core\Command\Config\Import; use OCP\IConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/Config/ListConfigsTest.php b/tests/Core/Command/Config/ListConfigsTest.php index 203feaacbf1..2cab9500702 100644 --- a/tests/Core/Command/Config/ListConfigsTest.php +++ b/tests/Core/Command/Config/ListConfigsTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config; - use OC\Core\Command\Config\ListConfigs; use OC\SystemConfig; use OCP\IAppConfig; @@ -321,7 +320,7 @@ class ListConfigsTest extends TestCase { $output = ''; $this->consoleOutput->expects($this->any()) ->method('writeln') - ->willReturnCallback(function($value) { + ->willReturnCallback(function ($value) { global $output; $output .= $value . "\n"; return $output; diff --git a/tests/Core/Command/Config/System/DeleteConfigTest.php b/tests/Core/Command/Config/System/DeleteConfigTest.php index 21ef3e33981..ee27fa587bc 100644 --- a/tests/Core/Command/Config/System/DeleteConfigTest.php +++ b/tests/Core/Command/Config/System/DeleteConfigTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config\System; - use OC\Core\Command\Config\System\DeleteConfig; use OC\SystemConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php index 1d8975f7f7f..175a24eb354 100644 --- a/tests/Core/Command/Config/System/GetConfigTest.php +++ b/tests/Core/Command/Config/System/GetConfigTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config\System; - use OC\Core\Command\Config\System\GetConfig; use OC\SystemConfig; use Symfony\Component\Console\Input\InputInterface; @@ -157,7 +156,7 @@ class GetConfigTest extends TestCase { $output = ''; $this->consoleOutput->expects($this->any()) ->method('writeln') - ->willReturnCallback(function($value) { + ->willReturnCallback(function ($value) { global $output; $output .= $value . "\n"; return $output; diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index 1ed7cf2758f..e359e846aa7 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Config\System; - use OC\Core\Command\Config\System\SetConfig; use OC\SystemConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index d17050e7245..4f3fc432dfe 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Encryption; - use OC\Core\Command\Encryption\ChangeKeyStorageRoot; use OC\Encryption\Util; use OC\Files\View; @@ -333,7 +332,7 @@ class ChangeKeyStorageRootTest extends TestCase { public function testPrepareParentFolder($path, $pathExists) { $this->view->expects($this->any())->method('file_exists') ->willReturnCallback( - function($fileExistsPath) use ($path, $pathExists) { + function ($fileExistsPath) use ($path, $pathExists) { if ($path === $fileExistsPath) { return $pathExists; } diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index acdaff4bbab..a6918404d71 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Encryption; - use OC\Core\Command\Encryption\DecryptAll; use OCP\App\IAppManager; use OCP\Encryption\IManager; @@ -218,7 +217,7 @@ class DecryptAllTest extends TestCase { $this->decryptAll->expects($this->once()) ->method('decryptAll') ->with($this->consoleInput, $this->consoleOutput, 'user1') - ->willReturnCallback(function() { throw new \Exception(); }); + ->willReturnCallback(function () { throw new \Exception(); }); $this->invokePrivate($instance, 'execute', [$this->consoleInput, $this->consoleOutput]); } diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index f9035a84788..4d088073380 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Encryption; - use OC\Core\Command\Encryption\Disable; use OCP\IConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/Encryption/EnableTest.php b/tests/Core/Command/Encryption/EnableTest.php index 5c8fc826af1..f76638c0ecf 100644 --- a/tests/Core/Command/Encryption/EnableTest.php +++ b/tests/Core/Command/Encryption/EnableTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Encryption; - use OC\Core\Command\Encryption\Enable; use OCP\Encryption\IManager; use OCP\IConfig; diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index 778d51fd8b8..4a0d40ea5b3 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Encryption; - use OC\Core\Command\Encryption\EncryptAll; use OCP\App\IAppManager; use OCP\Encryption\IEncryptionModule; diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index 0776ef42b48..f2f1d1cfc67 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Encryption; - use OC\Core\Command\Encryption\SetDefaultModule; use OCP\Encryption\IManager; use OCP\IConfig; diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php index d4ba34246af..87cf3c6b8d1 100644 --- a/tests/Core/Command/Group/AddTest.php +++ b/tests/Core/Command/Group/AddTest.php @@ -52,7 +52,7 @@ class AddTest extends TestCase { $this->input = $this->createMock(InputInterface::class); $this->input->method('getArgument') - ->willReturnCallback(function($arg) { + ->willReturnCallback(function ($arg) { if ($arg === 'groupid') { return 'myGroup'; } diff --git a/tests/Core/Command/Group/AddUserTest.php b/tests/Core/Command/Group/AddUserTest.php index 1ee2d2d3377..800e5ecd4f4 100644 --- a/tests/Core/Command/Group/AddUserTest.php +++ b/tests/Core/Command/Group/AddUserTest.php @@ -58,7 +58,7 @@ class AddUserTest extends TestCase { $this->input = $this->createMock(InputInterface::class); $this->input->method('getArgument') - ->willReturnCallback(function($arg) { + ->willReturnCallback(function ($arg) { if ($arg === 'group') { return 'myGroup'; } else if ($arg === 'user') { diff --git a/tests/Core/Command/Group/DeleteTest.php b/tests/Core/Command/Group/DeleteTest.php index 69bdae99d63..60d41d2e24c 100644 --- a/tests/Core/Command/Group/DeleteTest.php +++ b/tests/Core/Command/Group/DeleteTest.php @@ -57,7 +57,7 @@ class DeleteTest extends TestCase { public function testDoesNotExists() { $gid = 'myGroup'; $this->input->method('getArgument') - ->willReturnCallback(function($arg) use ($gid) { + ->willReturnCallback(function ($arg) use ($gid) { if ($arg === 'groupid') { return $gid; } @@ -79,7 +79,7 @@ class DeleteTest extends TestCase { public function testDeleteAdmin() { $gid = 'admin'; $this->input->method('getArgument') - ->willReturnCallback(function($arg) use ($gid) { + ->willReturnCallback(function ($arg) use ($gid) { if ($arg === 'groupid') { return $gid; } @@ -98,7 +98,7 @@ class DeleteTest extends TestCase { public function testDeleteFailed() { $gid = 'myGroup'; $this->input->method('getArgument') - ->willReturnCallback(function($arg) use ($gid) { + ->willReturnCallback(function ($arg) use ($gid) { if ($arg === 'groupid') { return $gid; } @@ -124,7 +124,7 @@ class DeleteTest extends TestCase { public function testDelete() { $gid = 'myGroup'; $this->input->method('getArgument') - ->willReturnCallback(function($arg) use ($gid) { + ->willReturnCallback(function ($arg) use ($gid) { if ($arg === 'groupid') { return $gid; } diff --git a/tests/Core/Command/Group/ListCommandTest.php b/tests/Core/Command/Group/ListCommandTest.php index 21adb29924a..6f2a45c9706 100644 --- a/tests/Core/Command/Group/ListCommandTest.php +++ b/tests/Core/Command/Group/ListCommandTest.php @@ -56,7 +56,7 @@ class ListCommandTest extends TestCase { $this->input = $this->createMock(InputInterface::class); $this->input->method('getOption') - ->willReturnCallback(function($arg) { + ->willReturnCallback(function ($arg) { if ($arg === 'limit') { return '100'; } else if ($arg === 'offset') { diff --git a/tests/Core/Command/Group/RemoveUserTest.php b/tests/Core/Command/Group/RemoveUserTest.php index eda4886da3b..18d8512fcaa 100644 --- a/tests/Core/Command/Group/RemoveUserTest.php +++ b/tests/Core/Command/Group/RemoveUserTest.php @@ -58,7 +58,7 @@ class RemoveUserTest extends TestCase { $this->input = $this->createMock(InputInterface::class); $this->input->method('getArgument') - ->willReturnCallback(function($arg) { + ->willReturnCallback(function ($arg) { if ($arg === 'group') { return 'myGroup'; } else if ($arg === 'user') { diff --git a/tests/Core/Command/Log/FileTest.php b/tests/Core/Command/Log/FileTest.php index c1d005e0c56..58507227780 100644 --- a/tests/Core/Command/Log/FileTest.php +++ b/tests/Core/Command/Log/FileTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Log; - use OC\Core\Command\Log\File; use OCP\IConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index cae6293abd1..4425a9e0054 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\Log; - use OC\Core\Command\Log\Manage; use OCP\IConfig; use Symfony\Component\Console\Input\InputInterface; diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index 9dc920894d7..ec65984bef8 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\User; - use OC\Core\Command\User\Delete; use OCP\IUser; use OCP\IUserManager; diff --git a/tests/Core/Command/User/DisableTest.php b/tests/Core/Command/User/DisableTest.php index 5456118f67c..5fb4633dc00 100644 --- a/tests/Core/Command/User/DisableTest.php +++ b/tests/Core/Command/User/DisableTest.php @@ -23,7 +23,6 @@ namespace Tests\Core\Command\User; - use OC\Core\Command\User\Disable; use OCP\IUser; use OCP\IUserManager; diff --git a/tests/Core/Command/User/EnableTest.php b/tests/Core/Command/User/EnableTest.php index 4a723ca1167..4babe0d91c1 100644 --- a/tests/Core/Command/User/EnableTest.php +++ b/tests/Core/Command/User/EnableTest.php @@ -23,7 +23,6 @@ namespace Tests\Core\Command\User; - use OC\Core\Command\User\Enable; use OCP\IUser; use OCP\IUserManager; diff --git a/tests/Core/Command/User/LastSeenTest.php b/tests/Core/Command/User/LastSeenTest.php index f6ee4796454..0a402a30119 100644 --- a/tests/Core/Command/User/LastSeenTest.php +++ b/tests/Core/Command/User/LastSeenTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\User; - use OC\Core\Command\User\LastSeen; use OCP\IUser; use OCP\IUserManager; diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index 8486e7fc3ca..4aa3b5e4801 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -21,7 +21,6 @@ namespace Tests\Core\Command\User; - use OC\Core\Command\User\Setting; use OCP\IConfig; use OCP\IDBConnection; diff --git a/tests/Core/Controller/AppPasswordControllerTest.php b/tests/Core/Controller/AppPasswordControllerTest.php index ceccf912285..f2c104efbe0 100644 --- a/tests/Core/Controller/AppPasswordControllerTest.php +++ b/tests/Core/Controller/AppPasswordControllerTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2018, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/Core/Controller/CSRFTokenControllerTest.php b/tests/Core/Controller/CSRFTokenControllerTest.php index a02f84832e5..88e54ee864a 100644 --- a/tests/Core/Controller/CSRFTokenControllerTest.php +++ b/tests/Core/Controller/CSRFTokenControllerTest.php @@ -67,7 +67,7 @@ class CSRFTokenControllerTest extends TestCase { $this->assertSame(Http::STATUS_OK, $response->getStatus()); $this->assertEquals([ 'token' => 'toktok123' - ], $response->getData()); + ], $response->getData()); } public function testGetTokenNoStrictSameSiteCookie(): void { diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php index 211f08b929f..bc86c262d91 100644 --- a/tests/Core/Controller/ClientFlowLoginControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php @@ -83,7 +83,7 @@ class ClientFlowLoginControllerTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $this->defaults = $this->createMock(Defaults::class); @@ -407,7 +407,7 @@ class ClientFlowLoginControllerTest extends TestCase { * ["https://example.com/redirect.php?hello=world", "https://example.com/redirect.php?hello=world&state=MyOauthState&code=MyAccessCode"] * */ - public function testGeneratePasswordWithPasswordForOauthClient($redirectUri, $redirectUrl) { + public function testGeneratePasswordWithPasswordForOauthClient($redirectUri, $redirectUrl) { $this->session ->expects($this->at(0)) ->method('get') diff --git a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php index 01c60dd7511..1e35dc71c3f 100644 --- a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> @@ -183,7 +184,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase { public function testGrantPageInvalidStateToken() { $this->session->method('get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { return null; }); @@ -193,7 +194,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase { public function testGrantPageInvalidLoginToken() { $this->session->method('get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if ($name === 'client.flow.v2.state.token') { return 'stateToken'; } @@ -213,7 +214,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase { public function testGrantPageValid() { $this->session->method('get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if ($name === 'client.flow.v2.state.token') { return 'stateToken'; } @@ -235,7 +236,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase { public function testGenerateAppPasswordInvalidStateToken() { $this->session->method('get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { return null; }); @@ -245,7 +246,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase { public function testGenerateAppPassworInvalidLoginToken() { $this->session->method('get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if ($name === 'client.flow.v2.state.token') { return 'stateToken'; } @@ -265,7 +266,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase { public function testGenerateAppPassworValid() { $this->session->method('get') - ->willReturnCallback(function($name) { + ->willReturnCallback(function ($name) { if ($name === 'client.flow.v2.state.token') { return 'stateToken'; } diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index daccee82705..d1d3ae7eb47 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -159,7 +159,7 @@ class CssControllerTest extends TestCase { $folder->method('getFile') ->willReturnCallback( - function($fileName) use ($file) { + function ($fileName) use ($file) { if ($fileName === 'file.css') { return $file; } diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index 4476b3ee6ed..0b2c6a28f5b 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -159,7 +159,7 @@ class JsControllerTest extends TestCase { $folder->method('getFile') ->willReturnCallback( - function($fileName) use ($file) { + function ($fileName) use ($file) { if ($fileName === 'file.js') { return $file; } diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index c1177d84e1e..80be53ed26d 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -322,9 +322,9 @@ class LoginControllerTest extends TestCase { ->expects($this->exactly(2)) ->method('getSystemValue') ->willReturnMap([ - ['login_form_autocomplete', true, true], - ['lost_password_link', '', false], - ]); + ['login_form_autocomplete', true, true], + ['lost_password_link', '', false], + ]); $user = $this->createMock(IUser::class); $user ->expects($this->once()) @@ -370,9 +370,9 @@ class LoginControllerTest extends TestCase { ->expects($this->exactly(2)) ->method('getSystemValue') ->willReturnMap([ - ['login_form_autocomplete', true, true], - ['lost_password_link', '', false], - ]); + ['login_form_autocomplete', true, true], + ['lost_password_link', '', false], + ]); $user = $this->createMock(IUser::class); $user->expects($this->once()) ->method('canChangePassword') @@ -588,7 +588,7 @@ class LoginControllerTest extends TestCase { $this->chain->expects($this->once()) ->method('process') ->with($this->equalTo($loginData)) - ->willReturnCallback(function(LoginData $data) use ($loginResult) { + ->willReturnCallback(function (LoginData $data) use ($loginResult) { $data->setUsername('john'); return $loginResult; }); diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index 750547473b1..ffd8a5a8c02 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -110,7 +110,7 @@ class LostControllerTest extends \Test\TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $this->defaults = $this->getMockBuilder('\OCP\Defaults') @@ -695,7 +695,7 @@ class LostControllerTest extends \Test\TestCase { $expectedResponse = [ 'status' => 'error', 'msg' => 'Couldn\'t reset password because the token is invalid' - ]; + ]; $this->assertSame($expectedResponse, $response); } @@ -734,7 +734,7 @@ class LostControllerTest extends \Test\TestCase { $expectedResponse = [ 'status' => 'error', 'msg' => 'Couldn\'t reset password because the token is invalid' - ]; + ]; $this->assertSame($expectedResponse, $response); } @@ -766,7 +766,7 @@ class LostControllerTest extends \Test\TestCase { $encryptionModule = $this->createMock(IEncryptionModule::class); $encryptionModule->expects($this->once())->method('needDetailedAccessList')->willReturn(true); $this->encryptionManager->expects($this->once())->method('getEncryptionModules') - ->willReturn([0 => ['callback' => function() use ($encryptionModule) { return $encryptionModule; }]]); + ->willReturn([0 => ['callback' => function () use ($encryptionModule) { return $encryptionModule; }]]); $response = $this->lostController->setPassword('myToken', 'user', 'newpass', false); $expectedResponse = ['status' => 'error', 'msg' => '', 'encryption' => true]; $this->assertSame($expectedResponse, $response); @@ -776,7 +776,7 @@ class LostControllerTest extends \Test\TestCase { $encryptionModule = $this->createMock(IEncryptionModule::class); $encryptionModule->expects($this->once())->method('needDetailedAccessList')->willReturn(false); $this->encryptionManager->expects($this->once())->method('getEncryptionModules') - ->willReturn([0 => ['callback' => function() use ($encryptionModule) { return $encryptionModule; }]]); + ->willReturn([0 => ['callback' => function () use ($encryptionModule) { return $encryptionModule; }]]); $this->config->method('getUserValue') ->with('ValidTokenUser', 'core', 'lostpassword', null) ->willReturn('encryptedData'); diff --git a/tests/Core/Controller/SvgControllerTest.php b/tests/Core/Controller/SvgControllerTest.php index 2cac635c896..4413fbb9ae5 100644 --- a/tests/Core/Controller/SvgControllerTest.php +++ b/tests/Core/Controller/SvgControllerTest.php @@ -1,4 +1,5 @@ <?php + declare (strict_types = 1); /** * @copyright Copyright (c) 2018 Michael Weimann <mail@michael-weimann.eu> diff --git a/tests/Core/Controller/WipeControllerTest.php b/tests/Core/Controller/WipeControllerTest.php index 73d16a63a6e..298d11848b8 100644 --- a/tests/Core/Controller/WipeControllerTest.php +++ b/tests/Core/Controller/WipeControllerTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/acceptance/features/bootstrap/AppNavigationContext.php b/tests/acceptance/features/bootstrap/AppNavigationContext.php index 02a8b1c0152..0fd9e92e9e4 100644 --- a/tests/acceptance/features/bootstrap/AppNavigationContext.php +++ b/tests/acceptance/features/bootstrap/AppNavigationContext.php @@ -1,10 +1,10 @@ <?php /** - * + * * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com) * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> - * + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify diff --git a/tests/acceptance/features/bootstrap/AppSettingsContext.php b/tests/acceptance/features/bootstrap/AppSettingsContext.php index 5cf54cb5280..a75cce29936 100644 --- a/tests/acceptance/features/bootstrap/AppSettingsContext.php +++ b/tests/acceptance/features/bootstrap/AppSettingsContext.php @@ -1,10 +1,10 @@ <?php /** - * + * * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com) * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> - * + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -90,7 +90,7 @@ class AppSettingsContext implements Context, ActorAwareInterface { } $this->actor->find($locator)->click(); - } + } /** * @Then I see that the settings are opened diff --git a/tests/acceptance/features/bootstrap/DialogContext.php b/tests/acceptance/features/bootstrap/DialogContext.php index 8f387992b5f..0558123ad9d 100644 --- a/tests/acceptance/features/bootstrap/DialogContext.php +++ b/tests/acceptance/features/bootstrap/DialogContext.php @@ -1,7 +1,7 @@ <?php /** - * + * * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version diff --git a/tests/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php index 32b01916189..6a816d7f368 100644 --- a/tests/acceptance/features/bootstrap/FilesAppContext.php +++ b/tests/acceptance/features/bootstrap/FilesAppContext.php @@ -33,13 +33,13 @@ class FilesAppContext implements Context, ActorAwareInterface { */ public static function sections() { return [ "All files" => "files", - "Recent" => "recent", - "Favorites" => "favorites", - "Shared with you" => "sharingin", - "Shared with others" => "sharingout", - "Shared by link" => "sharinglinks", - "Tags" => "systemtagsfilter", - "Deleted files" => "trashbin" ]; + "Recent" => "recent", + "Favorites" => "favorites", + "Shared with you" => "sharingin", + "Shared with others" => "sharingout", + "Shared by link" => "sharinglinks", + "Tags" => "systemtagsfilter", + "Deleted files" => "trashbin" ]; } /** diff --git a/tests/acceptance/features/bootstrap/SettingsContext.php b/tests/acceptance/features/bootstrap/SettingsContext.php index 5f9a724e771..ccc010e38e9 100644 --- a/tests/acceptance/features/bootstrap/SettingsContext.php +++ b/tests/acceptance/features/bootstrap/SettingsContext.php @@ -204,7 +204,7 @@ class SettingsContext implements Context, ActorAwareInterface { $actor = $this->actor; - $tagFoundInDropdownCallback = function() use($actor, $tag) { + $tagFoundInDropdownCallback = function () use ($actor, $tag) { // Open the dropdown to look for the tag. $actor->find(self::systemTagsSelectTagButton())->click(); diff --git a/tests/acceptance/features/bootstrap/SettingsMenuContext.php b/tests/acceptance/features/bootstrap/SettingsMenuContext.php index e4e20997fc2..a740e98756b 100644 --- a/tests/acceptance/features/bootstrap/SettingsMenuContext.php +++ b/tests/acceptance/features/bootstrap/SettingsMenuContext.php @@ -103,7 +103,7 @@ class SettingsMenuContext implements Context, ActorAwareInterface { } /** - * @return array + * @return array */ public function menuItems() { return $this->actor->find(self::settingsMenu(), 10) diff --git a/tests/acceptance/features/bootstrap/ThemingAppContext.php b/tests/acceptance/features/bootstrap/ThemingAppContext.php index 4791a70e813..e52c1c86b03 100644 --- a/tests/acceptance/features/bootstrap/ThemingAppContext.php +++ b/tests/acceptance/features/bootstrap/ThemingAppContext.php @@ -93,11 +93,11 @@ class ThemingAppContext implements Context, ActorAwareInterface { $actor = $this->actor; - $colorSelectorLoadedCallback = function() use($actor) { + $colorSelectorLoadedCallback = function () use ($actor) { $colorSelectorValue = $this->getRGBArray($actor->getSession()->evaluateScript("return $('#theming-color')[0].value;")); $inputBgColor = $this->getRGBArray($actor->getSession()->evaluateScript("return $('#theming-color').css('background-color');")); if ($colorSelectorValue == $inputBgColor) { - return true; + return true; } return false; @@ -108,27 +108,27 @@ class ThemingAppContext implements Context, ActorAwareInterface { } } - private function getRGBArray ($color) { - if (preg_match("/rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)/", $color, $matches)) { + private function getRGBArray($color) { + if (preg_match("/rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)/", $color, $matches)) { // Already an RGB (R, G, B) color // Convert from "rgb(R, G, B)" string to RGB array $tmpColor = array_splice($matches, 1); - } else if ($color[0] === '#') { + } else if ($color[0] === '#') { $color = substr($color, 1); // HEX Color, convert to RGB array. $tmpColor = sscanf($color, "%02X%02X%02X"); - } else { + } else { PHPUnit_Framework_Assert::fail("The acceptance test does not know how to handle the color string : '$color'. " . "Please provide # before HEX colors in your features."); - } - return $tmpColor; + } + return $tmpColor; } /** * @Then I see that the header color is eventually :color */ public function iSeeThatTheHeaderColorIsEventually($color) { - $headerColorMatchesCallback = function() use($color) { + $headerColorMatchesCallback = function () use ($color) { $headerColor = $this->actor->getSession()->evaluateScript("return $('#header').css('background-color');"); $headerColor = $this->getRGBArray($headerColor); $color = $this->getRGBArray($color); @@ -149,7 +149,7 @@ class ThemingAppContext implements Context, ActorAwareInterface { $actor = $this->actor; - $savedStatusMessageShownCallback = function() use($actor) { + $savedStatusMessageShownCallback = function () use ($actor) { if ($actor->find(self::statusMessage())->getText() !== "Saved") { return false; } diff --git a/tests/acceptance/features/bootstrap/WaitFor.php b/tests/acceptance/features/bootstrap/WaitFor.php index 038de3e42c2..0b79d023ee5 100644 --- a/tests/acceptance/features/bootstrap/WaitFor.php +++ b/tests/acceptance/features/bootstrap/WaitFor.php @@ -39,7 +39,7 @@ class WaitFor { * the timeout expires, false otherwise. */ public static function elementToBeEventuallyShown(Actor $actor, Locator $elementLocator, $timeout = 10, $timeoutStep = 1) { - $elementShownCallback = function() use ($actor, $elementLocator) { + $elementShownCallback = function () use ($actor, $elementLocator) { try { return $actor->find($elementLocator)->isVisible(); } catch (NoSuchElementException $exception) { @@ -64,7 +64,7 @@ class WaitFor { * the timeout expires, false otherwise. */ public static function elementToBeEventuallyNotShown(Actor $actor, Locator $elementLocator, $timeout = 10, $timeoutStep = 1) { - $elementNotShownCallback = function() use ($actor, $elementLocator) { + $elementNotShownCallback = function () use ($actor, $elementLocator) { try { return !$actor->find($elementLocator)->isVisible(); } catch (NoSuchElementException $exception) { diff --git a/tests/acceptance/features/core/ElementFinder.php b/tests/acceptance/features/core/ElementFinder.php index d075e9fe660..5570637aa96 100644 --- a/tests/acceptance/features/core/ElementFinder.php +++ b/tests/acceptance/features/core/ElementFinder.php @@ -56,7 +56,7 @@ class ElementFinder { $locator = $elementLocator->getLocator(); $ancestorElement = self::findAncestorElement($session, $elementLocator, $timeout, $timeoutStep); - $findCallback = function() use (&$element, $selector, $locator, $ancestorElement) { + $findCallback = function () use (&$element, $selector, $locator, $ancestorElement) { $element = $ancestorElement->find($selector, $locator); return $element !== null; diff --git a/tests/acceptance/features/core/ElementWrapper.php b/tests/acceptance/features/core/ElementWrapper.php index c866ea699fe..97b1b4bfbcd 100644 --- a/tests/acceptance/features/core/ElementWrapper.php +++ b/tests/acceptance/features/core/ElementWrapper.php @@ -141,7 +141,7 @@ class ElementWrapper { * @return bool true if the wrapped element is visible, false otherwise. */ public function isVisible() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->isVisible(); }; return $this->executeCommand($commandCallback, "visibility could not be got"); @@ -153,7 +153,7 @@ class ElementWrapper { * @return bool true if the wrapped element is checked, false otherwise. */ public function isChecked() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->isChecked(); }; return $this->executeCommand($commandCallback, "check state could not be got"); @@ -169,7 +169,7 @@ class ElementWrapper { * is not visible. */ public function getText() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->getText(); }; return $this->executeCommand($commandCallback, "text could not be got"); @@ -183,7 +183,7 @@ class ElementWrapper { * @return string the value of the wrapped element. */ public function getValue() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->getValue(); }; return $this->executeCommand($commandCallback, "value could not be got"); @@ -198,7 +198,7 @@ class ElementWrapper { * @param string $value the value to set. */ public function setValue($value) { - $commandCallback = function() use ($value) { + $commandCallback = function () use ($value) { $this->element->setValue($value); }; $this->executeCommandOnVisibleElement($commandCallback, "value could not be set"); @@ -211,7 +211,7 @@ class ElementWrapper { * timeout set when finding it). */ public function click() { - $commandCallback = function() { + $commandCallback = function () { $this->element->click(); }; $this->executeCommandOnVisibleElement($commandCallback, "could not be clicked"); @@ -224,7 +224,7 @@ class ElementWrapper { * timeout set when finding it). */ public function check() { - $commandCallback = function() { + $commandCallback = function () { $this->element->check(); }; $this->executeCommand($commandCallback, "could not be checked"); @@ -237,7 +237,7 @@ class ElementWrapper { * timeout set when finding it). */ public function uncheck() { - $commandCallback = function() { + $commandCallback = function () { $this->element->uncheck(); }; $this->executeCommand($commandCallback, "could not be unchecked"); @@ -325,7 +325,7 @@ class ElementWrapper { * otherwise. */ private function waitForElementToBeVisible() { - $isVisibleCallback = function() { + $isVisibleCallback = function () { return $this->isVisible(); }; $timeout = $this->elementFinder->getTimeout(); diff --git a/tests/acceptance/features/core/Utils.php b/tests/acceptance/features/core/Utils.php index 86b7515e4c6..f81542eb079 100644 --- a/tests/acceptance/features/core/Utils.php +++ b/tests/acceptance/features/core/Utils.php @@ -71,7 +71,7 @@ class Utils { * @return boolean true if the server was found, false otherwise. */ public static function waitForServer($url, $timeout, $timeoutStep = 0.5) { - $isServerUpCallback = function() use ($url) { + $isServerUpCallback = function () use ($url) { $curlHandle = curl_init($url); // Returning the transfer as the result of curl_exec prevents the diff --git a/tests/bootstrap.php b/tests/bootstrap.php index a1bc26bbf0e..7e5e4c7c547 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,4 +1,5 @@ <?php + define('PHPUNIT_RUN', 1); $configDir = getenv('CONFIG_DIR'); diff --git a/tests/lib/Accounts/AccountsManagerTest.php b/tests/lib/Accounts/AccountsManagerTest.php index 958b6fd4738..5bed1ff74fb 100644 --- a/tests/lib/Accounts/AccountsManagerTest.php +++ b/tests/lib/Accounts/AccountsManagerTest.php @@ -21,7 +21,6 @@ namespace Test\Accounts; - use OC\Accounts\Account; use OC\Accounts\AccountManager; use OCP\Accounts\IAccountManager; @@ -166,7 +165,7 @@ class AccountsManagerTest extends TestCase { if(empty($expectedData)) { $accountManager->expects($this->never())->method('addMissingDefaultValues'); - } else { + } else { $accountManager->expects($this->once())->method('addMissingDefaultValues')->with($expectedData) ->willReturn($expectedData); } diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php index 0d6ce3241d6..433ecdedcf4 100644 --- a/tests/lib/Accounts/HooksTest.php +++ b/tests/lib/Accounts/HooksTest.php @@ -21,7 +21,6 @@ namespace Test\Accounts; - use OC\Accounts\AccountManager; use OC\Accounts\Hooks; use OCP\ILogger; diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index b52b12a7e8c..98f36572c4a 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -19,7 +19,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * -*/ + */ namespace Test\Activity; @@ -61,7 +61,7 @@ class ManagerTest extends TestCase { $this->assertSame([], self::invokePrivate($this->activityManager, 'getConsumers')); - $this->activityManager->registerConsumer(function() { + $this->activityManager->registerConsumer(function () { return new NoOpConsumer(); }); @@ -79,7 +79,7 @@ class ManagerTest extends TestCase { public function testGetConsumersInvalidConsumer() { $this->expectException(\InvalidArgumentException::class); - $this->activityManager->registerConsumer(function() { + $this->activityManager->registerConsumer(function () { return new \stdClass(); }); @@ -240,7 +240,7 @@ class ManagerTest extends TestCase { $consumer->expects($this->once()) ->method('receive') ->with($event) - ->willReturnCallback(function(\OCP\Activity\IEvent $event) use ($expected) { + ->willReturnCallback(function (\OCP\Activity\IEvent $event) use ($expected) { $this->assertLessThanOrEqual(time() + 2, $event->getTimestamp(), 'Timestamp not set correctly'); $this->assertGreaterThanOrEqual(time() - 2, $event->getTimestamp(), 'Timestamp not set correctly'); $this->assertSame($expected, $event->getAuthor(), 'Author name not set correctly'); @@ -270,7 +270,7 @@ class ManagerTest extends TestCase { ->getMock(); $consumer->expects($this->once()) ->method('receive') - ->willReturnCallback(function(\OCP\Activity\IEvent $event) { + ->willReturnCallback(function (\OCP\Activity\IEvent $event) { $this->assertSame('test_app', $event->getApp(), 'App not set correctly'); $this->assertSame('test_type', $event->getType(), 'Type not set correctly'); $this->assertSame('test_affected', $event->getAffectedUser(), 'Affected user not set correctly'); diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php index 9e30977e29b..c0e2878de37 100644 --- a/tests/lib/AllConfigTest.php +++ b/tests/lib/AllConfigTest.php @@ -308,11 +308,11 @@ class AllConfigTest extends \Test\TestCase { $value = $config->getUserValueForUsers('appFetch2', 'keyFetch1', ['userFetch1', 'userFetch2', 'userFetch3', 'userFetch5']); $this->assertEquals([ - 'userFetch1' => 'value1', - 'userFetch2' => 'value2', - 'userFetch3' => 3, - 'userFetch5' => 'value5' - ], $value); + 'userFetch1' => 'value1', + 'userFetch2' => 'value2', + 'userFetch3' => 3, + 'userFetch5' => 'value5' + ], $value); $value = $config->getUserValueForUsers('appFetch2', 'keyFetch1', ['userFetch1', 'userFetch4', 'userFetch9']); diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index 68e4a5beaf1..1a5d6c648a1 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> @@ -463,7 +465,7 @@ class AppManagerTest extends TestCase { $manager->expects($this->any()) ->method('getAppInfo') ->willReturnCallback( - function($appId) use ($appInfos) { + function ($appId) use ($appInfos) { return $appInfos[$appId]; } ); @@ -512,7 +514,7 @@ class AppManagerTest extends TestCase { $manager->expects($this->any()) ->method('getAppInfo') ->willReturnCallback( - function($appId) use ($appInfos) { + function ($appId) use ($appInfos) { return $appInfos[$appId]; } ); diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index f18c24f2f61..9b772ca5bfc 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -60,48 +60,48 @@ EOD; static $expectedResponse = [ 'data' => [ - 0 => - [ - 'id' => 'direct_menu', - 'categories' => - [ - 0 => 'customization', - ], - 'userDocs' => '', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/juliushaertl/direct_menu/issues', - 'website' => '', - 'created' => '2016-10-01T09:16:06.030994Z', - 'lastModified' => '2016-10-06T14:01:05.584192Z', - 'releases' => - [ - 0 => - [ - 'version' => '0.9.2', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/juliushaertl/direct_menu/releases/download/v0.9.2/direct_menu.tar.gz', - 'created' => '2016-10-06T14:01:05.578297Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-06T14:01:05.643813Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'ERBS9G5bZ3vwCizz2Ht5DehsVJmb63bzF3aYcH7xjbDVMPagOFWdUAiLDwTeZR1n + 0 => + [ + 'id' => 'direct_menu', + 'categories' => + [ + 0 => 'customization', + ], + 'userDocs' => '', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/juliushaertl/direct_menu/issues', + 'website' => '', + 'created' => '2016-10-01T09:16:06.030994Z', + 'lastModified' => '2016-10-06T14:01:05.584192Z', + 'releases' => + [ + 0 => + [ + 'version' => '0.9.2', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/juliushaertl/direct_menu/releases/download/v0.9.2/direct_menu.tar.gz', + 'created' => '2016-10-06T14:01:05.578297Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-06T14:01:05.643813Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'ERBS9G5bZ3vwCizz2Ht5DehsVJmb63bzF3aYcH7xjbDVMPagOFWdUAiLDwTeZR1n i4gdZ73J/IjHQQJoOPwtCjgbZgLPFqL5x13CLUO9mb/33dZe/+gqEDc/3AuJ4TlA XUdLxHRb1bwIlJOwuSr/E24452VG20WUhLXBoM0Zm7WcMxvJWo2zAWnuqnLX3dy9 cPB4PX+6JU2lUMINj8OYQmM1QnqvjG8YV0cYHbBbnSicOGwXEnni7mojsC8T0cn7 @@ -112,42 +112,42 @@ u2SqRhwybS8j4YvfjAL9RPdRfPLwf6X2gx/Y6QFrKHH0QMI/9J/ZFyoUQcqKbsHV bkR1DTBCyDjdpNBidpa3/26675dz5IT5Zedp4BBBREQzX08cIhJx5mgqDdX3CU09 uWtzoaLi71/1BWTFAN+Y9VyfZ8/Z3Pg3vKedRJ565mztIj0geL3riEsC5YnPS0+C +a3B9sDiiOa101EORzX3lrPqL7reEPdCxrIwN+hKFBQ=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://bitgrid.net/~jus/direct_menu_nc.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Direct Menu', - 'summary' => 'Provide easy access to all apps in the header.', - 'description' => 'Provide easy access to all apps in the header.', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Julius Härtl', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://bitgrid.net/~jus/direct_menu_nc.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Direct Menu', + 'summary' => 'Provide easy access to all apps in the header.', + 'description' => 'Provide easy access to all apps in the header.', + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Julius Härtl', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEBjCCAu4CAhADMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -171,68 +171,68 @@ e/zxnB1EmeI2X5D2xceJDLB7Fy5W0EGrLixRIdFaSUommWFUm9E2hSIaNlziSBdc G2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx 2OmWZo7UBREWenjKyFZZ/iKoqH5sdenBtpo= -----END CERTIFICATE-----', - ], - 1 => - [ - 'id' => 'apporder', - 'categories' => - [ - 0 => 'customization', - ], - 'userDocs' => '', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/juliushaertl/apporder/issues', - 'website' => '', - 'created' => '2016-10-01T09:16:47.111889Z', - 'lastModified' => '2016-10-12T19:50:16.038821Z', - 'releases' => - [ - 0 => - [ - 'version' => '0.3.3', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/juliushaertl/apporder/releases/download/0.3.3/apporder.tar.gz', - 'created' => '2016-10-12T19:14:10.802359Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-12T19:50:16.104357Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'nhlT9lhrmBxIsqh/e3RLm2NDw/U8ZvvoMyYQTLMM3H19DQmVcPYPYC9QWVTsowUzXblVaOXVGylbpKma9yOlOAqJtF3qyXecLl4+tA/Awb6BBhKPgHFdcLDAL5yy1K7/uei3SgEojMlJoI9vEK5I1C5YTh43yNH+//Im6MAuNYFUTlMXK426zdOe6ogpCI5GlYdXopqYANxcpT+WXWET6DDSM5Ev+MYwMcSAY4r8+tvARRU4ZAenRgjkBT6R5z6cD76emRax14tbV6vkjjwRcO+dQtM0tFPbd+5fsNInbauv50VzIMgjA6RnKTOI17gRsSdGlsV4vZn2aIxEPWauu6T/UohMvAE9HMn13vtbpPBSFwJAktj6yHASYGzupNQLprA0+OdyALoLZPpQAKNEXA42a4EVISBKu0EmduHJlUPeqhnIGkkGgVNWS8AWqzP2nFoPdXBgUWateiMcBTHxgEKDac5YmNc9lsXpzf1OxBaXHBhGYKuXPwIfyH3jTWb1OdwixJEuRe9dl63T9qOTRre8QWns/bMqKLibGfMtFhVB21ARJayBuX70eVvabG/2N7Y5t1zUlFygIKu51tvo3AVCRDdRrFWDvkAjxzIz5FIdALVZ+DReFYu/r4WF/w3V9rInFuEDSwb/OH4r8sQycs07tSlMyA74Y3FpjKTBxso=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://bitgrid.net/~jus/apporder-nc.gif', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'AppOrder', - 'summary' => 'Sort apps in the menu with drag and drop', - 'description' => ' + ], + 1 => + [ + 'id' => 'apporder', + 'categories' => + [ + 0 => 'customization', + ], + 'userDocs' => '', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/juliushaertl/apporder/issues', + 'website' => '', + 'created' => '2016-10-01T09:16:47.111889Z', + 'lastModified' => '2016-10-12T19:50:16.038821Z', + 'releases' => + [ + 0 => + [ + 'version' => '0.3.3', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/juliushaertl/apporder/releases/download/0.3.3/apporder.tar.gz', + 'created' => '2016-10-12T19:14:10.802359Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-12T19:50:16.104357Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'nhlT9lhrmBxIsqh/e3RLm2NDw/U8ZvvoMyYQTLMM3H19DQmVcPYPYC9QWVTsowUzXblVaOXVGylbpKma9yOlOAqJtF3qyXecLl4+tA/Awb6BBhKPgHFdcLDAL5yy1K7/uei3SgEojMlJoI9vEK5I1C5YTh43yNH+//Im6MAuNYFUTlMXK426zdOe6ogpCI5GlYdXopqYANxcpT+WXWET6DDSM5Ev+MYwMcSAY4r8+tvARRU4ZAenRgjkBT6R5z6cD76emRax14tbV6vkjjwRcO+dQtM0tFPbd+5fsNInbauv50VzIMgjA6RnKTOI17gRsSdGlsV4vZn2aIxEPWauu6T/UohMvAE9HMn13vtbpPBSFwJAktj6yHASYGzupNQLprA0+OdyALoLZPpQAKNEXA42a4EVISBKu0EmduHJlUPeqhnIGkkGgVNWS8AWqzP2nFoPdXBgUWateiMcBTHxgEKDac5YmNc9lsXpzf1OxBaXHBhGYKuXPwIfyH3jTWb1OdwixJEuRe9dl63T9qOTRre8QWns/bMqKLibGfMtFhVB21ARJayBuX70eVvabG/2N7Y5t1zUlFygIKu51tvo3AVCRDdRrFWDvkAjxzIz5FIdALVZ+DReFYu/r4WF/w3V9rInFuEDSwb/OH4r8sQycs07tSlMyA74Y3FpjKTBxso=', + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://bitgrid.net/~jus/apporder-nc.gif', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'AppOrder', + 'summary' => 'Sort apps in the menu with drag and drop', + 'description' => ' Enable sorting for icons inside the app menu. The order will be saved for each user individually. Administrators can define a custom default order. AppOrder works with the default owncloud menu as well as with the direct_menu @@ -252,23 +252,23 @@ personal order by changing the following parameter in your config/config.php: Users will now get redirected to the first app of the default order or to the first app of the user order. ', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Julius Härtl', - 'mail' => 'jus@bitgrid.net', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Julius Härtl', + 'mail' => 'jus@bitgrid.net', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhAEMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -292,49 +292,49 @@ CSKtBro2jcnxzI3BvHdQcx4RAGo8sUzaqKBmsy+JmAqpCSk8f1zHR94x4Akp7n44 Tu+WGOL2Ee5U4k4XFdzeSLODWby08iU+Gx3bXTR6WIvXCYeIVsCPKK/luvfGkiSR CpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ= -----END CERTIFICATE-----', - ], - 2 => - [ - 'id' => 'twofactor_totp', - 'categories' => - [ - 0 => 'tools', - ], - 'userDocs' => '', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => '', - 'website' => '', - 'created' => '2016-10-08T14:13:54.356716Z', - 'lastModified' => '2016-10-12T14:38:56.186269Z', - 'releases' => - [ - 0 => - [ - 'version' => '0.4.1', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '>=5.4.0 <7.1.0', - 'platformVersionSpec' => '>=10.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/ChristophWurst/twofactor_totp/releases/download/0.4.1/twofactor_totp.tar.gz', - 'created' => '2016-10-12T14:38:56.174612Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-12T14:38:56.248223Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.4 <=7.0', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'bnwWxmHEn8xkoWbtwhC1kIrJ0dQfAI3PUtU62k+Tru/BHt1G2aVxqO8bCdghojZ7 + ], + 2 => + [ + 'id' => 'twofactor_totp', + 'categories' => + [ + 0 => 'tools', + ], + 'userDocs' => '', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => '', + 'website' => '', + 'created' => '2016-10-08T14:13:54.356716Z', + 'lastModified' => '2016-10-12T14:38:56.186269Z', + 'releases' => + [ + 0 => + [ + 'version' => '0.4.1', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '>=5.4.0 <7.1.0', + 'platformVersionSpec' => '>=10.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/ChristophWurst/twofactor_totp/releases/download/0.4.1/twofactor_totp.tar.gz', + 'created' => '2016-10-12T14:38:56.174612Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-12T14:38:56.248223Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.4 <=7.0', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'bnwWxmHEn8xkoWbtwhC1kIrJ0dQfAI3PUtU62k+Tru/BHt1G2aVxqO8bCdghojZ7 zdFMlIJw4kekYFsVfLk8jzjUTZKVbNVKCdkHrVTQ0bUUryMAMLqGQ3PSRI5NX6D5 FpkvwO1coYwU0XVWF8KAS0meX0ztSkT3Mv96LLrxr8F8SrB/MGmKIE4WTjt1fAIa ZLAVEUo/3sNFTGLYBtL3wjctrkZvJltP8abeRfls9FkRHu+rN7R3uLFzk42uZn3X @@ -345,38 +345,38 @@ h7ro5ls+d3OQ8i3i4vdZm821Ytxdu/DQBHiVoOBarvFWwWAv2zd2VAvpTmk6J5yv 3y+csRqpEJYd9fcVMPsTu7WBRRrpBsAqdAHJcZEwak2kz1kdOgSf8FIzP1z6Q71d Ml2RKcPeutMHHSLiGIN/h7fM5aSs49wGgGZmfz28fHVd7/U0HFSMYmkT/GMq5tMP Iyc+QZAN4qbX8G0k/QSTkK/L4lOT2hQiQqiSqmWItMk=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Two Factor TOTP Provider', - 'summary' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)', - 'description' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)', - ], - ], - 'isFeatured' => true, - 'authors' => - [ - 0 => - [ - 'name' => 'Christoph Wurst', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Two Factor TOTP Provider', + 'summary' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)', + 'description' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)', + ], + ], + 'isFeatured' => true, + 'authors' => + [ + 0 => + [ + 'name' => 'Christoph Wurst', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIECTCCAvECAhASMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -400,51 +400,51 @@ dIu2MkhxAZk9FZfnFkjTaAXcBHafJce7H/IEjHDEoIkFp5KnAQLHsJb4n8JeXmi9 VMgQ6yUWNuzOQMZpMIV7RMOUZHvxiX/ZWUFzXNYX0GYub6p4O2uh3LJE+xXyDf77 RBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI= -----END CERTIFICATE-----', - ], - 3 => - [ - 'id' => 'contacts', - 'categories' => - [ - 0 => 'office', - 1 => 'organization', - 2 => 'social', - ], - 'userDocs' => 'https://docs.nextcloud.com/server/11/user_manual/pim/contacts.html', - 'adminDocs' => 'https://docs.nextcloud.com/server/11/admin_manual/configuration_server/occ_command.html?highlight=occ%20commands#dav-label', - 'developerDocs' => 'https://github.com/nextcloud/contacts#building-the-app', - 'issueTracker' => 'https://github.com/nextcloud/contacts/issues', - 'website' => 'https://github.com/nextcloud/contacts#readme', - 'created' => '2016-10-30T14:00:58.922766Z', - 'lastModified' => '2016-11-22T22:08:01.904319Z', - 'releases' => - [ - 0 => - [ - 'version' => '1.5.0', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/nextcloud/contacts/releases/download/v1.5.0/contacts.tar.gz', - 'created' => '2016-11-22T22:08:01.861942Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-22T22:08:02.306939Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'ZqqhqtbHcNB+rzGCQ7FDIjjvHjit+dhAE1UhFgiXApkx3tmPP4nJOBAGNjHe+2Ao + ], + 3 => + [ + 'id' => 'contacts', + 'categories' => + [ + 0 => 'office', + 1 => 'organization', + 2 => 'social', + ], + 'userDocs' => 'https://docs.nextcloud.com/server/11/user_manual/pim/contacts.html', + 'adminDocs' => 'https://docs.nextcloud.com/server/11/admin_manual/configuration_server/occ_command.html?highlight=occ%20commands#dav-label', + 'developerDocs' => 'https://github.com/nextcloud/contacts#building-the-app', + 'issueTracker' => 'https://github.com/nextcloud/contacts/issues', + 'website' => 'https://github.com/nextcloud/contacts#readme', + 'created' => '2016-10-30T14:00:58.922766Z', + 'lastModified' => '2016-11-22T22:08:01.904319Z', + 'releases' => + [ + 0 => + [ + 'version' => '1.5.0', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/nextcloud/contacts/releases/download/v1.5.0/contacts.tar.gz', + 'created' => '2016-11-22T22:08:01.861942Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-22T22:08:02.306939Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'ZqqhqtbHcNB+rzGCQ7FDIjjvHjit+dhAE1UhFgiXApkx3tmPP4nJOBAGNjHe+2Ao VcTIX2SrWEfieRrA4Gp+0k7pUPWag1Z0T1OVOwO4cmS1AVFyGIOE1bRvDhMfsWTU 4CI4oXaKBFAY6mtnf7VJ7EeIdNqhImkohyWDQ88NiPRLM1XNkJJk6AvZBcT0fvCv o145X4dLpbixSXsN99QFNJ/oXvK+9tBGwTd5i/WnNFY90vcNRLia8aRo7SA0YJRx @@ -455,54 +455,54 @@ Me1EZcde8SLEpTbCWYIfIw/O9Fkp5cWD/dAqoiO6g+gNxSZ/gGp57qoGfFxn7d/x H3aH8GljatAFjrwItw1JzR0THt0ukkOK+bw/pfCslk10sjHMitmz/GXa4qMS91DZ BKLUd0dSfQUQzkfwcojImbzJRvca4/DYe3mfG7+RCH0tDL6t72dKL9joB++u5R1u VZPgkToexlXcKWpiDB8H2/SEShKr4udAOjR5de9CYWM=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Contacts/contacts.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Contacts', - 'summary' => 'The new and improved app for your Contacts.', - 'description' => 'The new and improved app for your Contacts.', - ], - ], - 'isFeatured' => true, - 'authors' => - [ - 0 => - [ - 'name' => 'Alexander Weidinger', - 'mail' => '', - 'homepage' => '', - ], - 1 => - [ - 'name' => 'Jan-Christoph Borchardt', - 'mail' => '', - 'homepage' => '', - ], - 2 => - [ - 'name' => 'Hendrik Leppelsack', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Contacts/contacts.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Contacts', + 'summary' => 'The new and improved app for your Contacts.', + 'description' => 'The new and improved app for your Contacts.', + ], + ], + 'isFeatured' => true, + 'authors' => + [ + 0 => + [ + 'name' => 'Alexander Weidinger', + 'mail' => '', + 'homepage' => '', + ], + 1 => + [ + 'name' => 'Jan-Christoph Borchardt', + 'mail' => '', + 'homepage' => '', + ], + 2 => + [ + 'name' => 'Hendrik Leppelsack', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhATMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -526,49 +526,49 @@ iuPit2pjkw3nWz0JRHneRXz/BNoAWBnJiV7JMF2xwBAHN4ghTM8NSJzrGTurmpMI Gld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId 52bVrGMxJwOuL1393vKxGH0PHDzcB1M= -----END CERTIFICATE-----', - ], - 4 => - [ - 'id' => 'mail', - 'categories' => - [ - 0 => 'tools', - ], - 'userDocs' => '', - 'adminDocs' => 'https://github.com/nextcloud/mail#readme', - 'developerDocs' => '', - 'issueTracker' => '', - 'website' => '', - 'created' => '2016-10-19T19:41:41.710285Z', - 'lastModified' => '2016-10-19T19:57:33.689238Z', - 'releases' => - [ - 0 => - [ - 'version' => '0.6.0', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '>=5.4.0 <7.1.0', - 'platformVersionSpec' => '>=10.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/nextcloud/mail/releases/download/v0.6.0/mail.tar.gz', - 'created' => '2016-10-19T19:57:33.676730Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-19T19:57:33.834580Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.4 <=7.0', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'VbMsvDpt+gSPeFM8LrZXEK10rk8kkLlgCcblgqNdCSeGZeVpwDAYv3CccVSLa0+l + ], + 4 => + [ + 'id' => 'mail', + 'categories' => + [ + 0 => 'tools', + ], + 'userDocs' => '', + 'adminDocs' => 'https://github.com/nextcloud/mail#readme', + 'developerDocs' => '', + 'issueTracker' => '', + 'website' => '', + 'created' => '2016-10-19T19:41:41.710285Z', + 'lastModified' => '2016-10-19T19:57:33.689238Z', + 'releases' => + [ + 0 => + [ + 'version' => '0.6.0', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '>=5.4.0 <7.1.0', + 'platformVersionSpec' => '>=10.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/nextcloud/mail/releases/download/v0.6.0/mail.tar.gz', + 'created' => '2016-10-19T19:57:33.676730Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-19T19:57:33.834580Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.4 <=7.0', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'VbMsvDpt+gSPeFM8LrZXEK10rk8kkLlgCcblgqNdCSeGZeVpwDAYv3CccVSLa0+l lTSqQ0VIoH+OIU6vIQNBKHmSCzTplk7OrY0+L5FajXx8LnBaOh892GfGSlEt1neN KyM0i0uOjO/xpCP/NoUlgkz6hnmYY5XEdN6DTsJtJ/XZhDQ45IYuIkMkHE/eFehS 0JnOagIz+PSipeBY2Ry+tV8YbRa7bC1JAvZzlod0dyI015AHZESeitRUY+MwMWkt @@ -579,11 +579,11 @@ sP8OrkQFooL4E7S4BWfdSiN/a8jUITJQkuXp/OVrVGeCupLWJh7qegUw6DvoqyGy D4c6b+qYn68kx3CLaPPiz+tFAZQZQdj7+Kx/lohso8yTnVSiGYrMj4IvvCbpsQjg WF3WSqF/K/tTnPYTWb9NUPSihTbVNv6AXOfTsPEp/ba2YSS5DjvjVjkr5vhR9eg1 ikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=', - 'translations' => - [ - 'en' => - [ - 'changelog' => '### Added + 'translations' => + [ + 'en' => + [ + 'changelog' => '### Added - Alias support [#1523](https://github.com/owncloud/mail/pull/1523) @tahaalibra - New incoming messages are prefetched @@ -616,37 +616,37 @@ ikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=', [#1603](https://github.com/owncloud/mail/pull/1603) @ChristophWurst - Update folder counters when reading/deleting messages [#1585](https://github.com/owncloud/mail/pull/1585)', - ], - ], - ], - ], - 'screenshots' => - [ - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Mail', - 'summary' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.', - 'description' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Christoph Wurst, Thomas Müller, Jan-Christoph Borchardt, Steffen Lindner & many more …', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + ], + ], + 'screenshots' => + [ + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Mail', + 'summary' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.', + 'description' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.', + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Christoph Wurst, Thomas Müller, Jan-Christoph Borchardt, Steffen Lindner & many more …', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIID/zCCAucCAhAVMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -670,99 +670,99 @@ ZETmzhx0BXDt5enJYs8R2KMYJNIme1easQRYmWKliXogNY09W7ifT9FHtVW1HX+K xRS4JXbapjolkxyGSpP+iYSgItVnYzl6o9KZResR4yDsBv7G/8fpV4GQU9IS3zLD PiZOosVHWJdpUKCw9V4P1prGTQ== -----END CERTIFICATE-----', - ], - 5 => - [ - 'id' => 'audioplayer', - 'categories' => - [ - 0 => 'multimedia', - ], - 'userDocs' => 'https://github.com/rello/audioplayer/wiki#user-documentation', - 'adminDocs' => 'https://github.com/rello/audioplayer/wiki#admin-documentation', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/rello/audioplayer/issues', - 'website' => 'https://github.com/rello/audioplayer', - 'created' => '2016-09-16T05:44:24.857567Z', - 'lastModified' => '2016-11-17T22:34:34.637028Z', - 'releases' => - [ - 0 => - [ - 'version' => '1.3.1', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '>=5.4.0', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/Rello/audioplayer/releases/download/1.3.1/audioplayer-1.3.1.tar.gz', - 'created' => '2016-11-17T22:34:34.215350Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-17T22:34:34.867778Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.4', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'p6Zz0IEFrxvw6y/3jHgGWWCxR6qpMzvU2HKfxcIVsK6sJnoRUhWLeAXwZ432fH2a S2llj+IGS9OvW+5VQElrXgPtEjDK1BT00DRJnp5RFCRlUv0LNoedJMzx6B6AHqPP JBufk3cG1O/CO0M0L1ITGSmSOzfKvWTRo3lxVGF792NyBaP/SyZCkH1N1TzBQzUi Ywl3+HiglPcXbHjtJm/arnKorbJWVKoaN93xFuaBapd2ozQSpi0fE0uGRsici+U7 HNa1M5WFE1rzUJoufE0E9246At07rFY1e+TdNEq8IlLgCXg5vGCKkEyuWpWno6aX LfRaIiT9x39UTAwNvuDKS0c+n4uWDYPsGfKhDx9N7CXpUrthfXVEWRzZEXG7as10 6ANvrRPJemSZH8FUSrdJhD7k12qa9R825y7mIG68Li8P71V92EOxFfo9tNXqXwBt VuDGxBqByFVPqSCj5I8hrzJzQl2Xt40g8+8ZcSF96RMg/pM+bwRMTv+mz0V+vQQ4 DWjqnWVPalaJ1PPD5/QFFErtXuNRbyxKZ6BMWxfJlLM9Kz66P75K+8fYaSwz+2KG NxY7I3svzS2K9LGH3fBLUy1t3Hl+c3zGFq/ll1MJrf9NswV4yxt2WmISfM/KDww8 yELkGs2cRzbw2tCvnmYlJJhIqRLkyFAbDzWRH/XdVx4=', - 'translations' => - [ - 'en' => - [ - 'changelog' => '2016-11-17 + ], + 5 => + [ + 'id' => 'audioplayer', + 'categories' => + [ + 0 => 'multimedia', + ], + 'userDocs' => 'https://github.com/rello/audioplayer/wiki#user-documentation', + 'adminDocs' => 'https://github.com/rello/audioplayer/wiki#admin-documentation', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/rello/audioplayer/issues', + 'website' => 'https://github.com/rello/audioplayer', + 'created' => '2016-09-16T05:44:24.857567Z', + 'lastModified' => '2016-11-17T22:34:34.637028Z', + 'releases' => + [ + 0 => + [ + 'version' => '1.3.1', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '>=5.4.0', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/Rello/audioplayer/releases/download/1.3.1/audioplayer-1.3.1.tar.gz', + 'created' => '2016-11-17T22:34:34.215350Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-17T22:34:34.867778Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.4', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'p6Zz0IEFrxvw6y/3jHgGWWCxR6qpMzvU2HKfxcIVsK6sJnoRUhWLeAXwZ432fH2a S2llj+IGS9OvW+5VQElrXgPtEjDK1BT00DRJnp5RFCRlUv0LNoedJMzx6B6AHqPP JBufk3cG1O/CO0M0L1ITGSmSOzfKvWTRo3lxVGF792NyBaP/SyZCkH1N1TzBQzUi Ywl3+HiglPcXbHjtJm/arnKorbJWVKoaN93xFuaBapd2ozQSpi0fE0uGRsici+U7 HNa1M5WFE1rzUJoufE0E9246At07rFY1e+TdNEq8IlLgCXg5vGCKkEyuWpWno6aX LfRaIiT9x39UTAwNvuDKS0c+n4uWDYPsGfKhDx9N7CXpUrthfXVEWRzZEXG7as10 6ANvrRPJemSZH8FUSrdJhD7k12qa9R825y7mIG68Li8P71V92EOxFfo9tNXqXwBt VuDGxBqByFVPqSCj5I8hrzJzQl2Xt40g8+8ZcSF96RMg/pM+bwRMTv+mz0V+vQQ4 DWjqnWVPalaJ1PPD5/QFFErtXuNRbyxKZ6BMWxfJlLM9Kz66P75K+8fYaSwz+2KG NxY7I3svzS2K9LGH3fBLUy1t3Hl+c3zGFq/ll1MJrf9NswV4yxt2WmISfM/KDww8 yELkGs2cRzbw2tCvnmYlJJhIqRLkyFAbDzWRH/XdVx4=', + 'translations' => + [ + 'en' => + [ + 'changelog' => '2016-11-17 - fix: one-click-play for wav not working - fix: wrong sql statement for PostgreSQL [#90](https://github.com/rello/audioplayer/issues/90)', - ], - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_main.png', - ], - 1 => - [ - 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_lists.png', - ], - 2 => - [ - 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_share.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Audio Player', - 'summary' => 'Audio Player for ownCloud and Nextcloud', - 'description' => 'Audio Player for MP3, MP4, Ogg, and Wave with a lot of flexibility for all your needs.', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Marcel Scherello', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_main.png', + ], + 1 => + [ + 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_lists.png', + ], + 2 => + [ + 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_share.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Audio Player', + 'summary' => 'Audio Player for ownCloud and Nextcloud', + 'description' => 'Audio Player for MP3, MP4, Ogg, and Wave with a lot of flexibility for all your needs.', + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Marcel Scherello', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEBjCCAu4CAhAIMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -786,49 +786,49 @@ zi7mQDFxmAE6FWSMBgKKUb4tqLc5oBap8e12tPEZl/UR6d9iUB2ltvrm3T3vrjjl FNvGFVBn4r5qCiChEoq+rCXHRjPi/eCfbW21XeLFDiLxapcZyc85JIcA7znUYoFe P7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI= -----END CERTIFICATE-----', - ], - 6 => - [ - 'id' => 'calendar', - 'categories' => - [ - 0 => 'organization', - ], - 'userDocs' => 'https://docs.nextcloud.com/server/10/user_manual/pim/calendar.html', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/nextcloud/calendar/issues', - 'website' => 'https://github.com/nextcloud/calendar/', - 'created' => '2016-10-01T12:40:39.060903Z', - 'lastModified' => '2016-11-22T20:31:13.029921Z', - 'releases' => - [ - 0 => - [ - 'version' => '1.4.1', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/nextcloud/calendar/releases/download/v1.4.1/calendar.tar.gz', - 'created' => '2016-11-22T20:31:13.020268Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-22T20:31:13.087340Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'nThwe9CJBCan9nuDLdhfBiQyPhmum6Aa0UcYsIDdhGMw+C2acf81KhEmBJuTTWxo + ], + 6 => + [ + 'id' => 'calendar', + 'categories' => + [ + 0 => 'organization', + ], + 'userDocs' => 'https://docs.nextcloud.com/server/10/user_manual/pim/calendar.html', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/nextcloud/calendar/issues', + 'website' => 'https://github.com/nextcloud/calendar/', + 'created' => '2016-10-01T12:40:39.060903Z', + 'lastModified' => '2016-11-22T20:31:13.029921Z', + 'releases' => + [ + 0 => + [ + 'version' => '1.4.1', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/nextcloud/calendar/releases/download/v1.4.1/calendar.tar.gz', + 'created' => '2016-11-22T20:31:13.020268Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-22T20:31:13.087340Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'nThwe9CJBCan9nuDLdhfBiQyPhmum6Aa0UcYsIDdhGMw+C2acf81KhEmBJuTTWxo WGby6WcrcJJmeuCW+ePU91ju7Pd76RirprhVXIEceIDzSCxin+K0oZCZ1IGVIJjP IkVehTsLuCeTBbjvz1b3k5QFyhUhvd32Xt7k5d7VARyI4OqnqYYNBtH9vvgeRrFw AxsQr4o4axof6i3iykLg6WfWarYArY4dIuu5DkPuGPWf2bbgjwWEra4sQejhOs7G @@ -839,68 +839,68 @@ hh1FBfA5pvCJbkJ6nr5bU4bKaffwDX1nr5h77FS5zzn0Pyd7ZIExmVmNtaeJfnfV eFLKrUg3EvnTjvknbBxMB55h9jNJr0SAlkrmyEVm6+CE3BwRWpKB+cJMBuGiwPwv r/ASRiJrkDThbNWAUtX70rUmCqDV6/MujLXViqOc/Q2OHvcXd1oGDccJSQT92/1z 7nonnedyYQIDqUt7u68WL8JRxp7pFsEqKLVuWSgxW3c=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png', - ], - 2 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png', - ], - 3 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/4.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Calendar', - 'summary' => 'Calendar GUI for Nextcloud\'s CalDAV server', - 'description' => 'The Nextcloud calendar app is a user interface for Nextcloud\'s CalDAV server. + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png', + ], + 2 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png', + ], + 3 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/4.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Calendar', + 'summary' => 'Calendar GUI for Nextcloud\'s CalDAV server', + 'description' => 'The Nextcloud calendar app is a user interface for Nextcloud\'s CalDAV server. It integrates with other apps, allows you to manage calendars and events, display external calendars and invite attendees to your events', - ], - ], - 'isFeatured' => true, - 'authors' => - [ - 0 => - [ - 'name' => 'Georg Ehrke', - 'mail' => '', - 'homepage' => 'https://georg.coffee', - ], - 1 => - [ - 'name' => 'Raghu Nayyar', - 'mail' => '', - 'homepage' => 'http://raghunayyar.com', - ], - 2 => - [ - 'name' => 'Thomas Citharel', - 'mail' => '', - 'homepage' => 'https://tcit.fr', - ], - ], - 'ratingRecent' => 0.94444444444444398, - 'ratingOverall' => 0.94444444444444398, - 'ratingNumRecent' => 9, - 'ratingNumOverall' => 9, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => true, + 'authors' => + [ + 0 => + [ + 'name' => 'Georg Ehrke', + 'mail' => '', + 'homepage' => 'https://georg.coffee', + ], + 1 => + [ + 'name' => 'Raghu Nayyar', + 'mail' => '', + 'homepage' => 'http://raghunayyar.com', + ], + 2 => + [ + 'name' => 'Thomas Citharel', + 'mail' => '', + 'homepage' => 'https://tcit.fr', + ], + ], + 'ratingRecent' => 0.94444444444444398, + 'ratingOverall' => 0.94444444444444398, + 'ratingNumRecent' => 9, + 'ratingNumOverall' => 9, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhARMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -924,49 +924,49 @@ D3xxtc17ll3B5IqrMnMHRqmOQ39Sbe56Y7T4agaIz/sUWpseo85D5kt7UAIOR+Mr Q0Bl/QinETk72afGR46Qvc7tC1t9JjQQD3AUbEGuJdGvXjJJ9GREYu01XoODmPdT jXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0= -----END CERTIFICATE-----', - ], - 8 => - [ - 'id' => 'ownpad', - 'categories' => - [ - 0 => 'tools', - ], - 'userDocs' => 'https://github.com/otetard/ownpad/blob/master/README.md#mimetype-detection', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/otetard/ownpad/issues', - 'website' => '', - 'created' => '2016-09-29T15:58:52.814912Z', - 'lastModified' => '2016-11-19T17:37:52.278497Z', - 'releases' => - [ - 0 => - [ - 'version' => '0.5.6', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/otetard/ownpad/releases/download/v0.5.6/ownpad.tar.gz', - 'created' => '2016-11-19T17:37:52.234684Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-19T17:37:52.423930Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'dh+Txg1iVfqXr8+cxplNQuBZGErSnXUo0ewGwnybNMJqp8/EjEo72+zPpW3dVnhY + ], + 8 => + [ + 'id' => 'ownpad', + 'categories' => + [ + 0 => 'tools', + ], + 'userDocs' => 'https://github.com/otetard/ownpad/blob/master/README.md#mimetype-detection', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/otetard/ownpad/issues', + 'website' => '', + 'created' => '2016-09-29T15:58:52.814912Z', + 'lastModified' => '2016-11-19T17:37:52.278497Z', + 'releases' => + [ + 0 => + [ + 'version' => '0.5.6', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/otetard/ownpad/releases/download/v0.5.6/ownpad.tar.gz', + 'created' => '2016-11-19T17:37:52.234684Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-19T17:37:52.423930Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'dh+Txg1iVfqXr8+cxplNQuBZGErSnXUo0ewGwnybNMJqp8/EjEo72+zPpW3dVnhY 67YCvhrm2bo+VRdFFymEfymzSJu9nWVFkGJhEwvTxPyIdAtuD5YAVrzmnR6L+H7m 7Q1nXE63ICPCAQpHkxIfIXLh25OhWeyofBB8AVsjDUNn58FEYJ8fFkr6dCgPriZS sM2J+xtZMDYufy+xFMsVf/Q3WopjFuBjMC3qOecW76ZTwtREaswOC2RtpzUku2r1 @@ -977,46 +977,46 @@ qEC5WBgJucsFxSvkHh52v43M8jgPYBfHWEL/M/+377z3+mbuIh+BcQ+vcDdiqxTF o3n0+gw3QYIhLEe75sUhxG6ynVUdW25AKKju1kVj3KJnZTBH1R8t8/zy4DnJG8d4 uRGqyU4BXpZjEC3nVlsC7vCncWWhxl0WZQ/MWKqsfjVAU4I88E518D6NioqMnPEJ iCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Ownpad', - 'summary' => ' + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Ownpad', + 'summary' => ' Create and open Etherpad and Ethercalc documents. ', - 'description' => ' + 'description' => ' Ownpad is an ownCloud application that allows to create and open Etherpad and Ethercalc documents. This application requires to have access to an instance of Etherpad and/or Ethercalc to work properly. ', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Olivier Tétard', - 'mail' => 'olivier.tetard@miskin.fr', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Olivier Tétard', + 'mail' => 'olivier.tetard@miskin.fr', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEATCCAukCAhAPMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1040,90 +1040,90 @@ ifneTw/Ba1d0AXBOq0c0HFyGxMPIlWe4qn5LtxH5t0wyVGeSj4jyv4nvd3ZGuAgY EUa2uYht/z475k4+vf0YhV98iQH07GnmlfD2TDZgmOCQGKlNfJh1v88OZyLLa3dz gRHzGwKbAiJ8T8bbpZ3e2ozXxADr -----END CERTIFICATE-----', - ], - 9 => - [ - 'id' => 'announcementcenter', - 'categories' => - [ - 0 => 'organization', - ], - 'userDocs' => '', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/nextcloud/announcementcenter/issues', - 'website' => 'https://github.com/nextcloud/announcementcenter', - 'created' => '2016-09-14T10:38:53.939634Z', - 'lastModified' => '2016-11-24T11:21:50.324839Z', - 'releases' => - [ - 0 => - [ - 'version' => '2.0.0', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=10.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/nextcloud/announcementcenter/releases/download/v2.0.0/announcementcenter-2.0.0.tar.gz', - 'created' => '2016-10-06T12:41:56.195206Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-06T12:41:56.263124Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'NVWYz73KtuoZ7ti2sluztJO5aFUc7PzhlDcg0VWyAQd1H7sk5wjw7i0bhrjw8O7M + ], + 9 => + [ + 'id' => 'announcementcenter', + 'categories' => + [ + 0 => 'organization', + ], + 'userDocs' => '', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/nextcloud/announcementcenter/issues', + 'website' => 'https://github.com/nextcloud/announcementcenter', + 'created' => '2016-09-14T10:38:53.939634Z', + 'lastModified' => '2016-11-24T11:21:50.324839Z', + 'releases' => + [ + 0 => + [ + 'version' => '2.0.0', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=10.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/nextcloud/announcementcenter/releases/download/v2.0.0/announcementcenter-2.0.0.tar.gz', + 'created' => '2016-10-06T12:41:56.195206Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-06T12:41:56.263124Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'NVWYz73KtuoZ7ti2sluztJO5aFUc7PzhlDcg0VWyAQd1H7sk5wjw7i0bhrjw8O7M Lsrb+PegnsL9eMlYM2WrRom+RF1PDP482xymZf1T8vh8qcTCm3TK89xSuiSm8yoA iWUb/Uv/ODj74wVDWqWxAFKaAG/FestCB3InOOZQqQZLzlAV0U9ziYDGNzBjFqof 9rLNxJ2IOqZOA7hhMIKhSrpA0KkSfNhBsVf8CWClYnVkZQiq0LoYkHkHIlXmXUr3 OfQFKEjtsx+bNLa6CkAaocHGHJXAofX3GQZ9cjBsjZqiTfbXfcVk0kRfz7pwL92L I1McfJYvgMxDQG5bjRpNJw==', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://github.com/nextcloud/announcementcenter/raw/stable10/docs/AnnouncementCenterFrontpage.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Announcement Center', - 'summary' => 'An announcement center for Nextcloud', - 'description' => 'An announcement center for Nextcloud', - ], - ], - 'isFeatured' => true, - 'authors' => - [ - 0 => - [ - 'name' => 'Joas Schilling', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.75, - 'ratingOverall' => 0.75, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://github.com/nextcloud/announcementcenter/raw/stable10/docs/AnnouncementCenterFrontpage.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Announcement Center', + 'summary' => 'An announcement center for Nextcloud', + 'description' => 'An announcement center for Nextcloud', + ], + ], + 'isFeatured' => true, + 'authors' => + [ + 0 => + [ + 'name' => 'Joas Schilling', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.75, + 'ratingOverall' => 0.75, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIDDTCCAfUCAhABMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1142,50 +1142,50 @@ sli/yAYQRTVDsXD8A3ACYT7BG31jGxyXtIHzqCci0MhZFdKKayMYkwfjZchIUtGN JJoU8LQoHwGRtp3wutk0GlFzpEQEvSsn/Lsvvot5IfIe46tnzA6MVj5s64s5G8+Q phhXFlzXqO/VxquPdbfYjvU= -----END CERTIFICATE-----', - ], - 11 => - [ - 'id' => 'rainloop', - 'categories' => - [ - 0 => 'social', - 1 => 'tools', - ], - 'userDocs' => '', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/RainLoop/rainloop-webmail/issues', - 'website' => 'http://www.rainloop.net/', - 'created' => '2016-10-20T04:17:37.217555Z', - 'lastModified' => '2016-11-18T11:36:04.309739Z', - 'releases' => - [ - 0 => - [ - 'version' => '4.26.0', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '>=5.4.0', - 'platformVersionSpec' => '>=10.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/v4.26.0/rainloop-4.26.0.tar.gz', - 'created' => '2016-10-20T04:28:21.491747Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-18T11:36:04.619927Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.4', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'nTYIVSB6mIwKtXIrKoVGsOGFflpLjed8jFem1VLQNtXQj4bztnNrdc4YaPIn0yzM + ], + 11 => + [ + 'id' => 'rainloop', + 'categories' => + [ + 0 => 'social', + 1 => 'tools', + ], + 'userDocs' => '', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/RainLoop/rainloop-webmail/issues', + 'website' => 'http://www.rainloop.net/', + 'created' => '2016-10-20T04:17:37.217555Z', + 'lastModified' => '2016-11-18T11:36:04.309739Z', + 'releases' => + [ + 0 => + [ + 'version' => '4.26.0', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '>=5.4.0', + 'platformVersionSpec' => '>=10.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/v4.26.0/rainloop-4.26.0.tar.gz', + 'created' => '2016-10-20T04:28:21.491747Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-18T11:36:04.619927Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.4', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'nTYIVSB6mIwKtXIrKoVGsOGFflpLjed8jFem1VLQNtXQj4bztnNrdc4YaPIn0yzM yLpMSqRDNzdYNFuOeDiyKLPJPTA++MotLCNjEe7kxUekek+m+qzgnGBdcT7RQT6R p9xWGecnVx94d6aA55uiRhgQRyHpdDMMLCOz1be+HvpwHy69DRFZ1+SPmGUt6eW0 u5yS0vHCu1K22cbrVNXFKjxAOlGcIDm61oQuz7ycl3uAujZO4rZbWt55jilgKGak @@ -1196,42 +1196,42 @@ hgFhPrg+7rf7g6UmJFOCp0dC9sBdyQ3KtJkv7bGqPr854r2cdA7xW0QHWQ2in9qQ LhIczc32ECi3ZVVgyF8zyT4Y/3MRS05oX3FHvHyt88mjni6bVaO78F7ZRSha8gHh NOAkku7AMXPvUCHaZP2iVCCoAViEso8GeR3O8xh2G42Ai61RLYwx8LB1+23EoJTr mfFuRYNSg+qAKCokXNnh+lDlwu4AkaQo3vtKGPXvU7A=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/pierre-alain-b/rainloop-nextcloud/master/screenshots/2016.10.20-screenshot.jpg', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'RainLoop', - 'summary' => 'RainLoop Webmail', - 'description' => 'Simple, modern and fast web-based email client.', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'RainLoop Team', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/pierre-alain-b/rainloop-nextcloud/master/screenshots/2016.10.20-screenshot.jpg', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'RainLoop', + 'summary' => 'RainLoop Webmail', + 'description' => 'Simple, modern and fast web-based email client.', + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'RainLoop Team', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhAXMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1255,103 +1255,103 @@ pzAeVGiABI/e5URpxzz2UayRX7EE+vtpe3B84hzkLqsq0N39ZN6KLfaTyEBGLzqE iLYeXQTV0XSRs8xVt+iyGlj7nPkv2DR0oCqRpWUFWeSBI//niDG5WxS3qg8kacSW fDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE= -----END CERTIFICATE-----', - ], - 12 => - [ - 'id' => 'richdocuments', - 'categories' => - [ - 0 => 'integration', - 1 => 'office', - ], - 'userDocs' => 'https://nextcloud.com/collaboraonline/', - 'adminDocs' => 'https://nextcloud.com/collaboraonline/', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/owncloud/richdocuments/issues', - 'website' => '', - 'created' => '2016-10-31T08:55:45.631429Z', - 'lastModified' => '2016-11-24T12:13:53.905352Z', - 'releases' => - [ - 0 => - [ - 'version' => '1.1.14', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/owncloud/richdocuments/releases/download/1.1.14/richdocuments.tar.gz', - 'created' => '2016-11-24T12:10:13.337165Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-24T12:13:53.963638Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'prDGlfRPxqT6LP0BsAFPwGww7P4Bngha2N4u5B6+F02N+RVOjGtTcXKqvM1KjZb1 + ], + 12 => + [ + 'id' => 'richdocuments', + 'categories' => + [ + 0 => 'integration', + 1 => 'office', + ], + 'userDocs' => 'https://nextcloud.com/collaboraonline/', + 'adminDocs' => 'https://nextcloud.com/collaboraonline/', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/owncloud/richdocuments/issues', + 'website' => '', + 'created' => '2016-10-31T08:55:45.631429Z', + 'lastModified' => '2016-11-24T12:13:53.905352Z', + 'releases' => + [ + 0 => + [ + 'version' => '1.1.14', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/owncloud/richdocuments/releases/download/1.1.14/richdocuments.tar.gz', + 'created' => '2016-11-24T12:10:13.337165Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-24T12:13:53.963638Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'prDGlfRPxqT6LP0BsAFPwGww7P4Bngha2N4u5B6+F02N+RVOjGtTcXKqvM1KjZb1 Co7qJvgJmjpvIvDmB+rup02i8ObfwP2ct6UdsD7ouzOWJG2sJANXK31bHyvOmQ2h vKu5eNcOkf+WFyFKYi51TbsfWn2+1Wge3WWujKAVcEvqtcOOz+uMWNtqzBptEupk E1aaRnQfTx488YB8Ubul06LIY0PNCHgGCWPgy817tOVT7JA+V0P0FFonl/PXE0dr WgtxRJmvGaNiFzYq+kQmdKMfayZTm3kdVgP0W52t5wp878K0i4s2KPg5lANvjTz7 DCT+VV2IGIE52o4RpMUGyQ==', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png', - ], - 1 => - [ - 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png', - ], - 2 => - [ - 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png', - ], - 3 => - [ - 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-spreadsheet.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Collabora Online', - 'summary' => 'Edit office documents directly in your browser.', - 'description' => 'Collabora Online allows you to to work with all kinds of office documents directly in your browser. This application requires Collabora Cloudsuite to be installed on one of your servers, please read the documentation to learn more about that.', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png', + ], + 1 => + [ + 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png', + ], + 2 => + [ + 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png', + ], + 3 => + [ + 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-spreadsheet.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Collabora Online', + 'summary' => 'Edit office documents directly in your browser.', + 'description' => 'Collabora Online allows you to to work with all kinds of office documents directly in your browser. This application requires Collabora Cloudsuite to be installed on one of your servers, please read the documentation to learn more about that.', + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIDCDCCAfACAhAZMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1370,70 +1370,70 @@ Ru1DXn+LW7TJ4NZ8VtLWvmW/6Kfmi7dQ1V++Kmn0lO5ntRt5altePbStCHC8bhGp myBOrjhrJgLIwvgH26MYZhdiSkFzoE38nMPZdrUmUDxcPCwucWJqgzDPudguFthj WCVZ3TTG/2z3+tWM -----END CERTIFICATE-----', - ], - 13 => - [ - 'id' => 'ocr', - 'categories' => - [ - 0 => 'files', - 1 => 'tools', - ], - 'userDocs' => 'https://janis91.github.io/ocr/', - 'adminDocs' => 'https://github.com/janis91/ocr/wiki', - 'developerDocs' => 'https://github.com/janis91/ocr/wiki', - 'issueTracker' => 'https://github.com/janis91/ocr/issues', - 'website' => 'https://janis91.github.io/ocr/', - 'created' => '2016-09-19T12:07:49.220376Z', - 'lastModified' => '2016-11-21T11:22:21.024501Z', - 'releases' => - [ - 0 => - [ - 'version' => '1.0.0', - 'phpExtensions' => - [ - ], - 'databases' => - [ - 0 => - [ - 'id' => 'pgsql', - 'versionSpec' => '*', - 'rawVersionSpec' => '*', - ], - 1 => - [ - 'id' => 'mysql', - 'versionSpec' => '*', - 'rawVersionSpec' => '*', - ], - 2 => - [ - 'id' => 'sqlite', - 'versionSpec' => '*', - 'rawVersionSpec' => '*', - ], - ], - 'shellCommands' => - [ - 0 => 'ocrmypdf', - 1 => 'tesseract', - ], - 'phpVersionSpec' => '>=5.6.0 <8.0.0', - 'platformVersionSpec' => '>=10.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/janis91/ocr/releases/download/v1.0.0/ocr.tar.gz', - 'created' => '2016-10-24T06:50:43.283900Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-21T11:22:21.269108Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.6 <=7', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'CBJkCIiUKyf2NuWfz2zJ3grhf8p7wJes7DPV/OxUzhlxIH0Fh7K54+U5A9JOOi6f + ], + 13 => + [ + 'id' => 'ocr', + 'categories' => + [ + 0 => 'files', + 1 => 'tools', + ], + 'userDocs' => 'https://janis91.github.io/ocr/', + 'adminDocs' => 'https://github.com/janis91/ocr/wiki', + 'developerDocs' => 'https://github.com/janis91/ocr/wiki', + 'issueTracker' => 'https://github.com/janis91/ocr/issues', + 'website' => 'https://janis91.github.io/ocr/', + 'created' => '2016-09-19T12:07:49.220376Z', + 'lastModified' => '2016-11-21T11:22:21.024501Z', + 'releases' => + [ + 0 => + [ + 'version' => '1.0.0', + 'phpExtensions' => + [ + ], + 'databases' => + [ + 0 => + [ + 'id' => 'pgsql', + 'versionSpec' => '*', + 'rawVersionSpec' => '*', + ], + 1 => + [ + 'id' => 'mysql', + 'versionSpec' => '*', + 'rawVersionSpec' => '*', + ], + 2 => + [ + 'id' => 'sqlite', + 'versionSpec' => '*', + 'rawVersionSpec' => '*', + ], + ], + 'shellCommands' => + [ + 0 => 'ocrmypdf', + 1 => 'tesseract', + ], + 'phpVersionSpec' => '>=5.6.0 <8.0.0', + 'platformVersionSpec' => '>=10.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/janis91/ocr/releases/download/v1.0.0/ocr.tar.gz', + 'created' => '2016-10-24T06:50:43.283900Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-21T11:22:21.269108Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.6 <=7', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'CBJkCIiUKyf2NuWfz2zJ3grhf8p7wJes7DPV/OxUzhlxIH0Fh7K54+U5A9JOOi6f WPhjXG1ylkyIVY1glr/B8svWNsD4jAclpnUi1/9ZW5UPT8LnRBfTbtF9Uoj0OgNs tsGQYbpuREoHnjbJWTRe0kq1OsOfX44xuf8PuX43B+lpQPW4iRSSz3ZIhdPcDGq1 7pyqQM7gdKhBQ6/tOiwd7Enyt5Hi4V6jhwhUOCYeTNiLD2V3yKL+qA9DzpXUfNNw @@ -1444,33 +1444,33 @@ GsrecNftUEhP/ngxA6lMBVkLmmdpiexVisvsavPi64i34OUA6qOuxjgNVBDwg56i D3tJOF7spnK6I3BhVLviou/zs30AIRVBDTU0Orzx78cbInwy6/vyJib2a1olAaHz v05SzlQRnBWM4jYBe0mA/2ds9AO6VrXGrT/iLlHemj6JYoGBM185TGewA7OJyX3a HSlSDqaremmi+aS3onx3AKhXykDxTRkMVarePwTzzFs=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png', - ], - 2 => - [ - 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc3.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'OCR', - 'summary' => 'Character recoginition for your images and pdf files.', - 'description' => '# Description + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png', + ], + 2 => + [ + 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc3.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'OCR', + 'summary' => 'Character recoginition for your images and pdf files.', + 'description' => '# Description Nextcloud OCR (optical character recoginition) processing for images and PDF with tesseract-ocr and OCRmyPDF brings OCR capability to your Nextcloud 10. The app uses tesseract-ocr, OCRmyPDF and a php internal message queueing service in order to process images (png, jpeg, tiff) and PDF (currently not all PDF-types are supported, for more information see [here](https://github.com/jbarlow83/OCRmyPDF)) asynchronously and save the output file to the same folder in nextcloud, so you are able to search in it. @@ -1488,12 +1488,12 @@ The OCR app has some prerequisites: - **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 with corresponding language files (e.g. tesseract-ocr-eng) For further information see the homepage or the appropriate documentation.', - ], - 'de' => - [ - 'name' => 'OCR', - 'summary' => 'Schrifterkennung für Bilder (mit Text) und PDF Dateien.', - 'description' => '# Beschreibung + ], + 'de' => + [ + 'name' => 'OCR', + 'summary' => 'Schrifterkennung für Bilder (mit Text) und PDF Dateien.', + 'description' => '# Beschreibung OCR (Automatische Texterkennung) für Bilder (mit Text) und PDF Dateien mithilfe von tesseract-ocr und OCRmyPDF ermöglicht Ihnen automatische Schrifterkennung direkt in Ihrer Nextcloud 10. Die App nutzt Tesseract-ocr, OCRmyPDF und den internen Message Queueing Service von PHP, um so asynchron (im Hintegrund) Bilder (PNG, JPEG, TIFF) und PDFs (aktuell werden nicht alle Typen unterstützt, näheres [hier](https://github.com/jbarlow83/OCRmyPDF)) zu verarbeiten. Das Ergebnis, welches jetzt durchsuchbar, kopierbar und ähnliches ist, wird anschließend im selben Ordner gespeichert, wie die Ursprungsdatei. @@ -1511,23 +1511,23 @@ Für die OCR App müssen folgende Anforderungen erfüllt sein: - **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 mit den dazugehörigen Übersetzungs- und Sprachdateien (z. B. tesseract-ocr-deu) Für weiter Informationen besuchen Sie die Homepage oder lesen Sie die zutreffende Dokumentation.', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Janis Koehr', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Janis Koehr', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIID/jCCAuYCAhAKMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1551,49 +1551,49 @@ HR7qPCNz4uG2Va7mlUHE3UYUYnlv8JFOV3YdbVL0nxhWwIdzSri5sxFIhdlabpzY yA1z/MCBEyTRo80jxFmL+MpwbsdbUJi7Qxlnd56zb6HHDGrLHXZTh9LXgyVbnhWL kxomWjIXQh4aMHQL4QF7U4EK -----END CERTIFICATE-----', - ], - 14 => - [ - 'id' => 'spreedme', - 'categories' => - [ - 0 => 'tools', - ], - 'userDocs' => 'https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md', - 'adminDocs' => 'https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/strukturag/nextcloud-spreedme/issues', - 'website' => '', - 'created' => '2016-09-27T08:43:07.835196Z', - 'lastModified' => '2016-11-21T16:51:23.703819Z', - 'releases' => - [ - 0 => - [ - 'version' => '0.3.4', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz', - 'created' => '2016-11-21T16:51:23.689599Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-21T16:51:23.826509Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'Mhy3hXeGWlIujx1Op39MMRdqHYOo360BCwr4FPWoTNNggH3aS0gWlh48DAfGYK9W + ], + 14 => + [ + 'id' => 'spreedme', + 'categories' => + [ + 0 => 'tools', + ], + 'userDocs' => 'https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md', + 'adminDocs' => 'https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/strukturag/nextcloud-spreedme/issues', + 'website' => '', + 'created' => '2016-09-27T08:43:07.835196Z', + 'lastModified' => '2016-11-21T16:51:23.703819Z', + 'releases' => + [ + 0 => + [ + 'version' => '0.3.4', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz', + 'created' => '2016-11-21T16:51:23.689599Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-21T16:51:23.826509Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'Mhy3hXeGWlIujx1Op39MMRdqHYOo360BCwr4FPWoTNNggH3aS0gWlh48DAfGYK9W etNiOqIuRyA0NrVlsqR2vDILgFtODJSbKPyHd3PQn3hcGsjogjQ+dkKciLNLinw7 Ohbv6aDdRFLBeRHpX/7wOnWL5W3ko/gyn0Awvi88M9+nC5aARtqncQqPy2SxDGzH KlOZHSNDnEQCGMhA8hNWWKdVwNUJHod/wmBWpW5QVNSJq5DqrKZcNwpGM2UUJoql @@ -1604,54 +1604,54 @@ bOks45K5gE1da4QpkYOUQa3GVMNPqPiT3CqjmJ8tjxq7bGpb6v+YoCLACjjPpPZL 2Y28qLxwHVaINDFUUxD75WWdrlulRbqHwiSw8jolP9qrpXhDuLAqYam9tRwV5K5R 8uNawnFwWkicBEYkN/WtBTouWzehOPn38tHXov6SyEyD6lkuxUBZrsGQ2ru+t33U k0kKCbV0GFw43I+3Ji5DiB4TUVNZYVoPG1B7Qve+UfA=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png', - ], - 2 => - [ - 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png', - ], - 3 => - [ - 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/users.png', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Spreed.ME', - 'summary' => 'Audio-, video- and text chat for your Nextcloud', - 'description' => 'Securely communicate with your friends and family using rich audio-, video- and text chat, and much more right from your Nextcloud – in your browser', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'struktur AG', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png', + ], + 2 => + [ + 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png', + ], + 3 => + [ + 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/users.png', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Spreed.ME', + 'summary' => 'Audio-, video- and text chat for your Nextcloud', + 'description' => 'Securely communicate with your friends and family using rich audio-, video- and text chat, and much more right from your Nextcloud – in your browser', + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'struktur AG', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhANMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1675,50 +1675,50 @@ axCNzc7veb2M98hS73w5ZE6vO+C/wz0GTsxuK0AoLitApT5naQnjvxSvSsjFPEGD sUNUEU2Decyp0jxLVnrrpz6Y5UupfBR0V8yAv1t5Od/mCKLc5DxHsDWiKOpsob9U JN+bdzJil2NNftihD4Dm7Ha7OS3O8W0= -----END CERTIFICATE-----', - ], - 15 => - [ - 'id' => 'nextant', - 'categories' => - [ - 0 => 'files', - 1 => 'tools', - ], - 'userDocs' => '', - 'adminDocs' => 'https://github.com/nextcloud/nextant/wiki', - 'developerDocs' => '', - 'issueTracker' => 'https://github.com/nextcloud/nextant/issues', - 'website' => 'https://github.com/nextcloud/nextant/wiki', - 'created' => '2016-09-14T14:34:35.977699Z', - 'lastModified' => '2016-11-22T16:02:57.758477Z', - 'releases' => - [ - 0 => - [ - 'version' => '0.6.6', - 'phpExtensions' => - [ - ], - 'databases' => - [ - ], - 'shellCommands' => - [ - ], - 'phpVersionSpec' => '*', - 'platformVersionSpec' => '>=9.0.0 <12.0.0', - 'minIntSize' => 32, - 'download' => 'https://github.com/nextcloud/nextant/releases/download/v0.6.6/nextant-0.6.6.tar.gz', - 'created' => '2016-11-16T15:11:14.344704Z', - 'licenses' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-16T20:39:59.030384Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'aOZeEeThyZ0V/vXBcn6c+Z0vyCsZcN6nfSJ8oWEea4zXh4g705Si+MFZESqix3M2 + ], + 15 => + [ + 'id' => 'nextant', + 'categories' => + [ + 0 => 'files', + 1 => 'tools', + ], + 'userDocs' => '', + 'adminDocs' => 'https://github.com/nextcloud/nextant/wiki', + 'developerDocs' => '', + 'issueTracker' => 'https://github.com/nextcloud/nextant/issues', + 'website' => 'https://github.com/nextcloud/nextant/wiki', + 'created' => '2016-09-14T14:34:35.977699Z', + 'lastModified' => '2016-11-22T16:02:57.758477Z', + 'releases' => + [ + 0 => + [ + 'version' => '0.6.6', + 'phpExtensions' => + [ + ], + 'databases' => + [ + ], + 'shellCommands' => + [ + ], + 'phpVersionSpec' => '*', + 'platformVersionSpec' => '>=9.0.0 <12.0.0', + 'minIntSize' => 32, + 'download' => 'https://github.com/nextcloud/nextant/releases/download/v0.6.6/nextant-0.6.6.tar.gz', + 'created' => '2016-11-16T15:11:14.344704Z', + 'licenses' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-16T20:39:59.030384Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'aOZeEeThyZ0V/vXBcn6c+Z0vyCsZcN6nfSJ8oWEea4zXh4g705Si+MFZESqix3M2 OPCnA/U8eASwdRTAEwQJrW5ECmu1THXSIsrzQzc9kFycvyOGzCgAWtuu0ayzZD2/ U5aDWlzpLHC1Czg9QJ5UnfZR0AfChWQ402N1YzGqMShdJv6AHXFrVE+uYnIyxuYI oPJQBUYbQwthVUjpYwFwSxw50YU17gmx5RZ0Y0OPz3i/EiuEUrxopXtfDVYAuCML @@ -1729,29 +1729,29 @@ oAKv2GkvWPQ0aiiBtA1i4oXuzvHW/M2wOrK7v7DCpNfILrD/sjxpljxcX082nRCd 9P3iPd2hQ6yOM9fG21LVN74b6wggI81BzFf/xJPd4ZqYLjfeG/yqd0zaiMOzMm1W se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/ 2avNqQnUh3hgOnxFCLI/5VrbqxfSTVdO6O/LTuAmwgw=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Nextant', - 'summary' => 'Navigate through your cloud using Solr', - 'description' => ' + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Nextant', + 'summary' => 'Navigate through your cloud using Solr', + 'description' => ' Navigate through your cloud using Solr @@ -1787,23 +1787,23 @@ se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/ ', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Maxence Lange', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Maxence Lange', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAjCCAuoCAhAFMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1827,8 +1827,8 @@ my7Z1C7jG9/h57vx0+QBMDCYnTmqLsvMKqo27uHskzAiB7VXLEdSZ2FtMGHkLUQO 0bfhnvTZ2VhMmK83t7ovo71An4ycmsolGD/MA0vNI78VrVISrdI8rRh2WntUnCBU EJL3BaQAQaASSsvFrcozYxrQG4VzEg== -----END CERTIFICATE-----', - ], - ], + ], + ], 'timestamp' => 1234, 'ncversion' => '11.0.0.2', 'ETag' => '"myETag"', @@ -1863,7 +1863,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== public function testGetWithFilter() { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'appstoreenabled') { return true; } else if ($key === 'version') { @@ -1946,7 +1946,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== public function testAppstoreDisabled() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($var, $default) { + ->willReturnCallback(function ($var, $default) { if ($var === 'appstoreenabled') { return false; } else if ($var === 'version') { @@ -1965,7 +1965,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== public function testNoInternet() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($var, $default) { + ->willReturnCallback(function ($var, $default) { if ($var === 'has_internet_connection') { return false; } else if ($var === 'version') { @@ -1982,7 +1982,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== public function testSetVersion() { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'appstoreenabled') { return true; } else if ($key === 'version') { diff --git a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php index 22e7a8742ec..47be7adcc7b 100644 --- a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php @@ -41,7 +41,7 @@ class CategoryFetcherTest extends FetcherBase { public function testAppstoreDisabled() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($var, $default) { + ->willReturnCallback(function ($var, $default) { if ($var === 'appstoreenabled') { return false; } @@ -57,7 +57,7 @@ class CategoryFetcherTest extends FetcherBase { public function testNoInternet() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($var, $default) { + ->willReturnCallback(function ($var, $default) { if ($var === 'has_internet_connection') { return false; } diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index 9dac4dd7499..11813c7f3bd 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -210,7 +210,7 @@ abstract class FetcherBase extends TestCase { public function testGetWithAlreadyExistingFileAndOutdatedTimestamp() { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'appstoreenabled') { return true; } else if ($key === 'version') { @@ -463,7 +463,7 @@ abstract class FetcherBase extends TestCase { public function testGetWithExceptionInClient() { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'appstoreenabled') { return true; } else { @@ -503,7 +503,7 @@ abstract class FetcherBase extends TestCase { public function testGetMatchingETag() { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'appstoreenabled') { return true; } else if ($key === 'version') { @@ -584,7 +584,7 @@ abstract class FetcherBase extends TestCase { public function testGetNoMatchingETag() { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'appstoreenabled') { return true; } else if ($key === 'version') { @@ -671,7 +671,7 @@ abstract class FetcherBase extends TestCase { public function testFetchAfterUpgradeNoETag() { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'appstoreenabled') { return true; } else if ($key === 'version') { diff --git a/tests/lib/App/CodeChecker/NodeVisitorTest.php b/tests/lib/App/CodeChecker/NodeVisitorTest.php index d1b1f643677..2383b56b676 100644 --- a/tests/lib/App/CodeChecker/NodeVisitorTest.php +++ b/tests/lib/App/CodeChecker/NodeVisitorTest.php @@ -45,10 +45,10 @@ class NodeVisitorTest extends TestCase { ], 'test-deprecated-function-sub-alias.php'], // TODO Failing to resolve variables to classes -// [[['OCP\NamespaceName\ClassName::methodName', 1007]], 'test-deprecated-method.php'], -// [[['Alias::methodName', 1002]], 'test-deprecated-method-alias.php'], -// [[['NamespaceName\ClassName::methodName', 1002]], 'test-deprecated-method-sub.php'], -// [[['SubAlias\ClassName::methodName', 1002]], 'test-deprecated-method-sub-alias.php'], + // [[['OCP\NamespaceName\ClassName::methodName', 1007]], 'test-deprecated-method.php'], + // [[['Alias::methodName', 1002]], 'test-deprecated-method-alias.php'], + // [[['NamespaceName\ClassName::methodName', 1002]], 'test-deprecated-method-sub.php'], + // [[['SubAlias\ClassName::methodName', 1002]], 'test-deprecated-method-sub-alias.php'], ]; } diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index 52965d4a72d..40cd308f886 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -32,24 +32,24 @@ class DependencyAnalyzerTest extends TestCase { ->getMock(); $this->platformMock->expects($this->any()) ->method('getPhpVersion') - ->willReturn( '5.4.3'); + ->willReturn('5.4.3'); $this->platformMock->expects($this->any()) ->method('getIntSize') - ->willReturn( '4'); + ->willReturn('4'); $this->platformMock->expects($this->any()) ->method('getDatabase') - ->willReturn( 'mysql'); + ->willReturn('mysql'); $this->platformMock->expects($this->any()) ->method('getOS') - ->willReturn( 'Linux'); + ->willReturn('Linux'); $this->platformMock->expects($this->any()) ->method('isCommandKnown') - ->willReturnCallback( function($command) { + ->willReturnCallback(function ($command) { return ($command === 'grep'); }); $this->platformMock->expects($this->any()) ->method('getLibraryVersion') - ->willReturnCallback( function($lib) { + ->willReturnCallback(function ($lib) { if ($lib === 'curl') { return "2.3.4"; } @@ -57,14 +57,14 @@ class DependencyAnalyzerTest extends TestCase { }); $this->platformMock->expects($this->any()) ->method('getOcVersion') - ->willReturn( '8.0.2'); + ->willReturn('8.0.2'); $this->l10nMock = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor() ->getMock(); $this->l10nMock->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); diff --git a/tests/lib/App/PlatformRepositoryTest.php b/tests/lib/App/PlatformRepositoryTest.php index 555247f7dda..9063dffa646 100644 --- a/tests/lib/App/PlatformRepositoryTest.php +++ b/tests/lib/App/PlatformRepositoryTest.php @@ -52,14 +52,14 @@ class PlatformRepositoryTest extends \Test\TestCase { 'parses dt+patch' => ['20100102-203040-p1', '20100102-203040-patch1'], 'parses master' => ['dev-master', '9999999-dev'], 'parses trunk' => ['dev-trunk', '9999999-dev'], -// 'parses branches' => array('1.x-dev', '1.9999999.9999999.9999999-dev'), + // 'parses branches' => array('1.x-dev', '1.9999999.9999999.9999999-dev'), 'parses arbitrary' => ['dev-feature-foo', 'dev-feature-foo'], 'parses arbitrary2' => ['DEV-FOOBAR', 'dev-FOOBAR'], 'parses arbitrary3' => ['dev-feature/foo', 'dev-feature/foo'], 'ignores aliases' => ['dev-master as 1.0.0', '9999999-dev'], -// 'semver metadata' => array('dev-master+foo.bar', '9999999-dev'), -// 'semver metadata/2' => array('1.0.0-beta.5+foo', '1.0.0.0-beta5'), -// 'semver metadata/3' => array('1.0.0+foo', '1.0.0.0'), -// 'metadata w/ alias' => array('1.0.0+foo as 2.0', '1.0.0.0'), + // 'semver metadata' => array('dev-master+foo.bar', '9999999-dev'), + // 'semver metadata/2' => array('1.0.0-beta.5+foo', '1.0.0.0-beta5'), + // 'semver metadata/3' => array('1.0.0+foo', '1.0.0.0'), + // 'metadata w/ alias' => array('1.0.0+foo as 2.0', '1.0.0.0'), ]; }} diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index 14114e8fad7..3a4c16b3396 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -8,6 +8,7 @@ */ namespace Test; + use OCP\IConfig; /** diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php index fd83b6feae5..6b4cd656a89 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -80,14 +80,14 @@ class AppTest extends \Test\TestCase { $xml = '<?xml version="1.0" encoding="UTF-8"?>' . '<info>' . - '<id>namespacetestapp</id>' . + '<id>namespacetestapp</id>' . '<namespace>NameSpaceTestApp</namespace>' . '</info>'; file_put_contents($infoXmlPath, $xml); } - public function testControllerNameAndMethodAreBeingPassed(){ + public function testControllerNameAndMethodAreBeingPassed() { $return = ['HTTP/2.0 200 OK', [], [], null, new Response()]; $this->dispatcher->expects($this->once()) ->method('dispatch') @@ -127,7 +127,7 @@ class AppTest extends \Test\TestCase { } - public function testOutputIsPrinted(){ + public function testOutputIsPrinted() { $return = ['HTTP/2.0 200 OK', [], [], $this->output, new Response()]; $this->dispatcher->expects($this->once()) ->method('dispatch') @@ -166,7 +166,7 @@ class AppTest extends \Test\TestCase { } - public function testCallbackIsCalled(){ + public function testCallbackIsCalled() { $mock = $this->getMockBuilder('OCP\AppFramework\Http\ICallbackResponse') ->getMock(); diff --git a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php index 8259ec930fd..4c79adcb4a7 100644 --- a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php @@ -129,7 +129,7 @@ class AuthPublicShareControllerTest extends \Test\TestCase { $hashSet = false; $this->session ->method('set') - ->willReturnCallback(function($key, $value) use (&$tokenSet, &$hashSet) { + ->willReturnCallback(function ($key, $value) use (&$tokenSet, &$hashSet) { if ($key === 'public_link_authenticated_token' && $value === 'token') { $tokenSet = true; return true; diff --git a/tests/lib/AppFramework/Controller/OCSControllerTest.php b/tests/lib/AppFramework/Controller/OCSControllerTest.php index f5eb838b584..85f2a7f6463 100644 --- a/tests/lib/AppFramework/Controller/OCSControllerTest.php +++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php @@ -108,7 +108,7 @@ class OCSControllerTest extends \Test\TestCase { )); $controller->setOCSVersion(1); $expected = '{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK",' . - '"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}'; + '"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}'; $params = new DataResponse(['test' => 'hi']); $response = $controller->buildResponse($params, 'json'); diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index 43770eba17a..faff2649bc6 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -1,29 +1,28 @@ <?php /** -* ownCloud - App Framework -* -* @author Bernhard Posselt -* @copyright 2012 Bernhard Posselt dev@bernhard-posselt.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud - App Framework + * + * @author Bernhard Posselt + * @copyright 2012 Bernhard Posselt dev@bernhard-posselt.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ namespace Test\AppFramework\Db; - use OCP\AppFramework\Db\Entity; use PHPUnit\Framework\Constraint\IsType; @@ -72,7 +71,7 @@ class EntityTest extends \Test\TestCase { } - public function testResetUpdatedFields(){ + public function testResetUpdatedFields() { $entity = new TestEntity(); $entity->setId(3); $entity->resetUpdatedFields(); @@ -81,7 +80,7 @@ class EntityTest extends \Test\TestCase { } - public function testFromRow(){ + public function testFromRow() { $row = [ 'pre_name' => 'john', 'email' => 'john@something.com' @@ -93,7 +92,7 @@ class EntityTest extends \Test\TestCase { } - public function testGetSetId(){ + public function testGetSetId() { $id = 3; $this->entity->setId(3); @@ -101,28 +100,28 @@ class EntityTest extends \Test\TestCase { } - public function testColumnToPropertyNoReplacement(){ + public function testColumnToPropertyNoReplacement() { $column = 'my'; $this->assertEquals('my', $this->entity->columnToProperty($column)); } - public function testColumnToProperty(){ + public function testColumnToProperty() { $column = 'my_attribute'; $this->assertEquals('myAttribute', $this->entity->columnToProperty($column)); } - public function testPropertyToColumnNoReplacement(){ + public function testPropertyToColumnNoReplacement() { $property = 'my'; $this->assertEquals('my', $this->entity->propertyToColumn($property)); } - public function testSetterMarksFieldUpdated(){ + public function testSetterMarksFieldUpdated() { $this->entity->setId(3); $this->assertContains('id', $this->entity->getUpdatedFields()); @@ -130,7 +129,7 @@ class EntityTest extends \Test\TestCase { - public function testCallShouldOnlyWorkForGetterSetter(){ + public function testCallShouldOnlyWorkForGetterSetter() { $this->expectException(\BadFunctionCallException::class); $this->entity->something(); @@ -138,21 +137,21 @@ class EntityTest extends \Test\TestCase { - public function testGetterShouldFailIfAttributeNotDefined(){ + public function testGetterShouldFailIfAttributeNotDefined() { $this->expectException(\BadFunctionCallException::class); $this->entity->getTest(); } - public function testSetterShouldFailIfAttributeNotDefined(){ + public function testSetterShouldFailIfAttributeNotDefined() { $this->expectException(\BadFunctionCallException::class); $this->entity->setTest(); } - public function testFromRowShouldNotAssignEmptyArray(){ + public function testFromRowShouldNotAssignEmptyArray() { $row = []; $entity2 = new TestEntity(); @@ -161,7 +160,7 @@ class EntityTest extends \Test\TestCase { } - public function testIdGetsConvertedToInt(){ + public function testIdGetsConvertedToInt() { $row = ['id' => '4']; $this->entity = TestEntity::fromRow($row); @@ -169,7 +168,7 @@ class EntityTest extends \Test\TestCase { } - public function testSetType(){ + public function testSetType() { $row = ['testId' => '4']; $this->entity = TestEntity::fromRow($row); @@ -177,7 +176,7 @@ class EntityTest extends \Test\TestCase { } - public function testFromParams(){ + public function testFromParams() { $params = [ 'testId' => 4, 'email' => 'john@doe' @@ -190,7 +189,7 @@ class EntityTest extends \Test\TestCase { $this->assertTrue($entity instanceof TestEntity); } - public function testSlugify(){ + public function testSlugify() { $entity = new TestEntity(); $entity->setName('Slugify this!'); $this->assertEquals('slugify-this', $entity->slugify('name')); diff --git a/tests/lib/AppFramework/Db/MapperTest.php b/tests/lib/AppFramework/Db/MapperTest.php index 79a9a1884e0..4509b1b80c7 100644 --- a/tests/lib/AppFramework/Db/MapperTest.php +++ b/tests/lib/AppFramework/Db/MapperTest.php @@ -44,12 +44,12 @@ class Example extends Entity { class ExampleMapper extends Mapper { - public function __construct(IDBConnection $db){ parent::__construct($db, 'table'); } - public function find($table, $id){ return $this->findOneQuery($table, $id); } - public function findOneEntity($table, $id){ return $this->findEntity($table, $id); } - public function findAllEntities($table){ return $this->findEntities($table); } - public function mapRow($row){ return $this->mapRowToEntity($row); } - public function execSql($sql, $params){ return $this->execute($sql, $params); } + public function __construct(IDBConnection $db) { parent::__construct($db, 'table'); } + public function find($table, $id) { return $this->findOneQuery($table, $id); } + public function findOneEntity($table, $id) { return $this->findEntity($table, $id); } + public function findAllEntities($table) { return $this->findEntities($table); } + public function mapRow($row) { return $this->mapRowToEntity($row); } + public function execSql($sql, $params) { return $this->execute($sql, $params); } } @@ -66,12 +66,12 @@ class MapperTest extends MapperTestUtility { } - public function testMapperShouldSetTableName(){ + public function testMapperShouldSetTableName() { $this->assertEquals('*PREFIX*table', $this->mapper->getTableName()); } - public function testFindQuery(){ + public function testFindQuery() { $sql = 'hi'; $params = ['jo']; $rows = [ @@ -81,7 +81,7 @@ class MapperTest extends MapperTestUtility { $this->mapper->find($sql, $params); } - public function testFindEntity(){ + public function testFindEntity() { $sql = 'hi'; $params = ['jo']; $rows = [ @@ -91,7 +91,7 @@ class MapperTest extends MapperTestUtility { $this->mapper->findOneEntity($sql, $params); } - public function testFindNotFound(){ + public function testFindNotFound() { $sql = 'hi'; $params = ['jo']; $rows = []; @@ -100,7 +100,7 @@ class MapperTest extends MapperTestUtility { $this->mapper->find($sql, $params); } - public function testFindEntityNotFound(){ + public function testFindEntityNotFound() { $sql = 'hi'; $params = ['jo']; $rows = []; @@ -109,7 +109,7 @@ class MapperTest extends MapperTestUtility { $this->mapper->findOneEntity($sql, $params); } - public function testFindMultiple(){ + public function testFindMultiple() { $sql = 'hi'; $params = ['jo']; $rows = [ @@ -120,7 +120,7 @@ class MapperTest extends MapperTestUtility { $this->mapper->find($sql, $params); } - public function testFindEntityMultiple(){ + public function testFindEntityMultiple() { $sql = 'hi'; $params = ['jo']; $rows = [ @@ -132,7 +132,7 @@ class MapperTest extends MapperTestUtility { } - public function testDelete(){ + public function testDelete() { $sql = 'DELETE FROM `*PREFIX*table` WHERE `id` = ?'; $params = [2]; @@ -144,7 +144,7 @@ class MapperTest extends MapperTestUtility { } - public function testCreate(){ + public function testCreate() { $this->db->expects($this->once()) ->method('lastInsertId') ->with($this->equalTo('*PREFIX*table')) @@ -164,7 +164,7 @@ class MapperTest extends MapperTestUtility { } - public function testCreateShouldReturnItemWithCorrectInsertId(){ + public function testCreateShouldReturnItemWithCorrectInsertId() { $this->db->expects($this->once()) ->method('lastInsertId') ->with($this->equalTo('*PREFIX*table')) @@ -195,7 +195,7 @@ class MapperTest extends MapperTestUtility { } - public function testUpdate(){ + public function testUpdate() { $sql = 'UPDATE `*PREFIX*table` ' . 'SET ' . '`pre_name` = ?,'. @@ -214,7 +214,7 @@ class MapperTest extends MapperTestUtility { } - public function testUpdateNoId(){ + public function testUpdateNoId() { $params = ['john', 'my@email']; $entity = new Example(); $entity->setPreName($params[0]); @@ -226,7 +226,7 @@ class MapperTest extends MapperTestUtility { } - public function testUpdateNothingChangedNoQuery(){ + public function testUpdateNothingChangedNoQuery() { $params = ['john', 'my@email']; $entity = new Example(); $entity->setId(3); @@ -240,7 +240,7 @@ class MapperTest extends MapperTestUtility { } - public function testMapRowToEntity(){ + public function testMapRowToEntity() { $entity1 = $this->mapper->mapRow(['pre_name' => 'test1', 'email' => 'test2']); $entity2 = new Example(); $entity2->setPreName('test1'); @@ -249,7 +249,7 @@ class MapperTest extends MapperTestUtility { $this->assertEquals($entity2, $entity1); } - public function testFindEntities(){ + public function testFindEntities() { $sql = 'hi'; $rows = [ ['pre_name' => 'hi'] @@ -262,7 +262,7 @@ class MapperTest extends MapperTestUtility { $this->assertEquals([$entity], $result); } - public function testFindEntitiesNotFound(){ + public function testFindEntitiesNotFound() { $sql = 'hi'; $rows = []; $this->setMapperResult($sql, [], $rows); @@ -270,7 +270,7 @@ class MapperTest extends MapperTestUtility { $this->assertEquals([], $result); } - public function testFindEntitiesMultiple(){ + public function testFindEntitiesMultiple() { $sql = 'hi'; $rows = [ ['pre_name' => 'jo'], ['email' => 'ho'] diff --git a/tests/lib/AppFramework/Db/MapperTestUtility.php b/tests/lib/AppFramework/Db/MapperTestUtility.php index 11905a9bbbb..9ee83e5a161 100644 --- a/tests/lib/AppFramework/Db/MapperTestUtility.php +++ b/tests/lib/AppFramework/Db/MapperTestUtility.php @@ -23,7 +23,6 @@ namespace Test\AppFramework\Db; - /** * Simple utility class for testing mappers */ @@ -90,7 +89,7 @@ abstract class MapperTestUtility extends \Test\TestCase { * will be called on the result */ protected function setMapperResult($sql, $arguments=[], $returnRows=[], - $limit=null, $offset=null, $expectClose=false){ + $limit=null, $offset=null, $expectClose=false) { if($limit === null && $offset === null) { $this->db->expects($this->at($this->prepareAt)) ->method('prepare') @@ -125,7 +124,7 @@ abstract class MapperTestUtility extends \Test\TestCase { $this->query->expects($this->any()) ->method('fetch') ->willReturnCallback( - function() use ($iterators, $fetchAt){ + function () use ($iterators, $fetchAt) { $iterator = $iterators[$fetchAt]; $result = $iterator->next(); @@ -165,7 +164,7 @@ abstract class MapperTestUtility extends \Test\TestCase { $this->query->expects($this->at($this->queryAt)) ->method('execute') - ->willReturnCallback(function($sql, $p=null, $o=null, $s=null) { + ->willReturnCallback(function ($sql, $p=null, $o=null, $s=null) { }); $this->queryAt++; @@ -192,11 +191,11 @@ class ArgumentIterator { private $arguments; - public function __construct($arguments){ + public function __construct($arguments) { $this->arguments = $arguments; } - public function next(){ + public function next() { $result = array_shift($this->arguments); if($result === null){ return false; diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php index 95d368a448e..ba114433a4c 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php +++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php @@ -25,7 +25,6 @@ namespace Test\AppFramework\DependencyInjection; - use OC\AppFramework\DependencyInjection\DIContainer; use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\Security\SecurityMiddleware; @@ -50,24 +49,24 @@ class DIContainerTest extends \Test\TestCase { } - public function testProvidesRequest(){ + public function testProvidesRequest() { $this->assertTrue(isset($this->container['Request'])); } - public function testProvidesMiddlewareDispatcher(){ + public function testProvidesMiddlewareDispatcher() { $this->assertTrue(isset($this->container['MiddlewareDispatcher'])); } - public function testProvidesAppName(){ + public function testProvidesAppName() { $this->assertTrue(isset($this->container['AppName'])); } - public function testAppNameIsSetCorrectly(){ + public function testAppNameIsSetCorrectly() { $this->assertEquals('name', $this->container['AppName']); } - public function testMiddlewareDispatcherIncludesSecurityMiddleware(){ + public function testMiddlewareDispatcherIncludesSecurityMiddleware() { $this->container['Request'] = new Request( ['method' => 'GET'], $this->createMock(ISecureRandom::class), diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php index 7af11807d87..cd7b64a1caa 100644 --- a/tests/lib/AppFramework/Http/DataResponseTest.php +++ b/tests/lib/AppFramework/Http/DataResponseTest.php @@ -23,7 +23,6 @@ namespace Test\AppFramework\Http; - use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php index b6b43d4a5d3..bb6f68c40bb 100644 --- a/tests/lib/AppFramework/Http/DispatcherTest.php +++ b/tests/lib/AppFramework/Http/DispatcherTest.php @@ -51,7 +51,7 @@ class TestController extends Controller { * @return array */ public function exec($int, $bool, $test=4, $test2=1) { - $this->registerResponder('text', function($in) { + $this->registerResponder('text', function ($in) { return new JSONResponse(['text' => $in]); }); return [$int, $bool, $test, $test2]; @@ -231,7 +231,7 @@ class DispatcherTest extends \Test\TestCase { } - public function testHeadersAndOutputAreReturned(){ + public function testHeadersAndOutputAreReturned() { $out = 'yo'; $httpHeaders = 'Http'; $responseHeaders = ['hell' => 'yeah']; @@ -281,12 +281,12 @@ class DispatcherTest extends \Test\TestCase { ->method('beforeController'); $this->middlewareDispatcher->expects($this->once()) ->method('afterController') - ->willReturnCallback(function($a, $b, $in) { + ->willReturnCallback(function ($a, $b, $in) { return $in; }); $this->middlewareDispatcher->expects($this->once()) ->method('beforeOutput') - ->willReturnCallback(function($a, $b, $in) { + ->willReturnCallback(function ($a, $b, $in) { return $in; }); } @@ -296,8 +296,8 @@ class DispatcherTest extends \Test\TestCase { $this->request = new Request( [ 'post' => [ - 'int' => '3', - 'bool' => 'false' + 'int' => '3', + 'bool' => 'false' ], 'method' => 'POST' ], diff --git a/tests/lib/AppFramework/Http/DownloadResponseTest.php b/tests/lib/AppFramework/Http/DownloadResponseTest.php index 5f816eaeb76..b3437a351f9 100644 --- a/tests/lib/AppFramework/Http/DownloadResponseTest.php +++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php @@ -23,7 +23,6 @@ namespace Test\AppFramework\Http; - use OCP\AppFramework\Http\DownloadResponse; class ChildDownloadResponse extends DownloadResponse { diff --git a/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php b/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php index 1cebc9ef0f2..18c255463c5 100644 --- a/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php +++ b/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/AppFramework/Http/FeaturePolicyTest.php b/tests/lib/AppFramework/Http/FeaturePolicyTest.php index af21457bf0a..869650f42b1 100644 --- a/tests/lib/AppFramework/Http/FeaturePolicyTest.php +++ b/tests/lib/AppFramework/Http/FeaturePolicyTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index 2a0978db62a..56e6d43096d 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -25,7 +25,6 @@ namespace Test\AppFramework\Http; - use OCP\AppFramework\Http; use OCP\AppFramework\Http\JSONResponse; diff --git a/tests/lib/AppFramework/Http/OCSResponseTest.php b/tests/lib/AppFramework/Http/OCSResponseTest.php index e092cb53f58..ec1b422ddd9 100644 --- a/tests/lib/AppFramework/Http/OCSResponseTest.php +++ b/tests/lib/AppFramework/Http/OCSResponseTest.php @@ -23,48 +23,47 @@ namespace Test\AppFramework\Http; - use OCP\AppFramework\Http\OCSResponse; class OCSResponseTest extends \Test\TestCase { - public function testHeadersJSON() { - $response = new OCSResponse('json', 1, 2, 3); - $type = $response->getHeaders()['Content-Type']; - $this->assertEquals('application/json; charset=utf-8', $type); - } + public function testHeadersJSON() { + $response = new OCSResponse('json', 1, 2, 3); + $type = $response->getHeaders()['Content-Type']; + $this->assertEquals('application/json; charset=utf-8', $type); + } - public function testHeadersXML() { - $response = new OCSResponse('xml', 1, 2, 3); - $type = $response->getHeaders()['Content-Type']; - $this->assertEquals('application/xml; charset=utf-8', $type); - } + public function testHeadersXML() { + $response = new OCSResponse('xml', 1, 2, 3); + $type = $response->getHeaders()['Content-Type']; + $this->assertEquals('application/xml; charset=utf-8', $type); + } - public function testRender() { - $response = new OCSResponse( - 'xml', 2, 'message', ['test' => 'hi'], 3, 4 - ); - $out = $response->render(); - $expected = "<?xml version=\"1.0\"?>\n" . - "<ocs>\n" . - " <meta>\n" . - " <status>failure</status>\n" . - " <statuscode>2</statuscode>\n" . - " <message>message</message>\n" . - " <totalitems>3</totalitems>\n" . - " <itemsperpage>4</itemsperpage>\n" . - " </meta>\n" . - " <data>\n" . - " <test>hi</test>\n" . - " </data>\n" . - "</ocs>\n"; + public function testRender() { + $response = new OCSResponse( + 'xml', 2, 'message', ['test' => 'hi'], 3, 4 + ); + $out = $response->render(); + $expected = "<?xml version=\"1.0\"?>\n" . + "<ocs>\n" . + " <meta>\n" . + " <status>failure</status>\n" . + " <statuscode>2</statuscode>\n" . + " <message>message</message>\n" . + " <totalitems>3</totalitems>\n" . + " <itemsperpage>4</itemsperpage>\n" . + " </meta>\n" . + " <data>\n" . + " <test>hi</test>\n" . + " </data>\n" . + "</ocs>\n"; - $this->assertEquals($expected, $out); + $this->assertEquals($expected, $out); - } + } } diff --git a/tests/lib/AppFramework/Http/RedirectResponseTest.php b/tests/lib/AppFramework/Http/RedirectResponseTest.php index fc24f323c6a..3c210092ca8 100644 --- a/tests/lib/AppFramework/Http/RedirectResponseTest.php +++ b/tests/lib/AppFramework/Http/RedirectResponseTest.php @@ -42,12 +42,12 @@ class RedirectResponseTest extends \Test\TestCase { public function testHeaders() { $headers = $this->response->getHeaders(); $this->assertEquals('/url', $headers['Location']); - $this->assertEquals(Http::STATUS_SEE_OTHER, + $this->assertEquals(Http::STATUS_SEE_OTHER, $this->response->getStatus()); } - public function testGetRedirectUrl(){ + public function testGetRedirectUrl() { $this->assertEquals('/url', $this->response->getRedirectUrl()); } diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index 8f7c26cc952..e5a3e88d98e 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -716,7 +716,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerProtocolWithProtoValid() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'trusted_proxies') { return ['1.2.3.4']; } @@ -757,7 +757,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerProtocolWithHttpsServerValueOn() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { return $default; }); @@ -778,7 +778,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerProtocolWithHttpsServerValueOff() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { return $default; }); @@ -799,7 +799,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerProtocolWithHttpsServerValueEmpty() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { return $default; }); @@ -820,7 +820,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerProtocolDefault() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { return $default; }); @@ -837,7 +837,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerProtocolBehindLoadBalancers() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'trusted_proxies') { return ['1.2.3.4']; } @@ -1059,7 +1059,7 @@ class RequestTest extends \Test\TestCase { public function testInsecureServerHostHttpFromForwardedHeaderSingle() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'trusted_proxies') { return ['1.2.3.4']; } @@ -1088,7 +1088,7 @@ class RequestTest extends \Test\TestCase { public function testInsecureServerHostHttpFromForwardedHeaderStacked() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'trusted_proxies') { return ['1.2.3.4']; } @@ -1117,7 +1117,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerHostWithOverwriteHost() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'overwritecondaddr') { return ''; } else if ($key === 'overwritehost') { @@ -1141,7 +1141,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerHostWithTrustedDomain() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'trusted_proxies') { return ['1.2.3.4']; } else if ($key === 'trusted_domains') { @@ -1170,7 +1170,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerHostWithUntrustedDomain() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'trusted_proxies') { return ['1.2.3.4']; } else if ($key === 'trusted_domains') { @@ -1199,7 +1199,7 @@ class RequestTest extends \Test\TestCase { public function testGetServerHostWithNoTrustedDomain() { $this->config ->method('getSystemValue') - ->willReturnCallback(function($key, $default) { + ->willReturnCallback(function ($key, $default) { if ($key === 'trusted_proxies') { return ['1.2.3.4']; } diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index 86a909b7688..7ff12b7fa67 100644 --- a/tests/lib/AppFramework/Http/ResponseTest.php +++ b/tests/lib/AppFramework/Http/ResponseTest.php @@ -23,7 +23,6 @@ namespace Test\AppFramework\Http; - use OCP\AppFramework\Http; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Utility\ITimeFactory; @@ -41,7 +40,7 @@ class ResponseTest extends \Test\TestCase { } - public function testAddHeader(){ + public function testAddHeader() { $this->childResponse->addHeader(' hello ', 'world'); $headers = $this->childResponse->getHeaders(); $this->assertEquals('world', $headers['hello']); @@ -88,14 +87,14 @@ class ResponseTest extends \Test\TestCase { $this->assertEquals(new Http\EmptyContentSecurityPolicy(), $this->childResponse->getContentSecurityPolicy()); } - public function testAddHeaderValueNullDeletesIt(){ + public function testAddHeaderValueNullDeletesIt() { $this->childResponse->addHeader('hello', 'world'); $this->childResponse->addHeader('hello', null); $this->assertEquals(3, count($this->childResponse->getHeaders())); } - public function testCacheHeadersAreDisabledByDefault(){ + public function testCacheHeadersAreDisabledByDefault() { $headers = $this->childResponse->getHeaders(); $this->assertEquals('no-cache, no-store, must-revalidate', $headers['Cache-Control']); } @@ -187,7 +186,7 @@ class ResponseTest extends \Test\TestCase { } - public function testRenderReturnNullByDefault(){ + public function testRenderReturnNullByDefault() { $this->assertEquals(null, $this->childResponse->render()); } diff --git a/tests/lib/AppFramework/Http/StreamResponseTest.php b/tests/lib/AppFramework/Http/StreamResponseTest.php index b66d9c5ed1d..fb4eb5dc91c 100644 --- a/tests/lib/AppFramework/Http/StreamResponseTest.php +++ b/tests/lib/AppFramework/Http/StreamResponseTest.php @@ -23,7 +23,6 @@ namespace Test\AppFramework\Http; - use OCP\AppFramework\Http; use OCP\AppFramework\Http\IOutput; use OCP\AppFramework\Http\StreamResponse; @@ -40,7 +39,7 @@ class StreamResponseTest extends \Test\TestCase { ->getMock(); } - public function testOutputNotModified(){ + public function testOutputNotModified() { $path = __FILE__; $this->output->expects($this->once()) ->method('getHttpResponseCode') @@ -52,7 +51,7 @@ class StreamResponseTest extends \Test\TestCase { $response->callback($this->output); } - public function testOutputOk(){ + public function testOutputOk() { $path = __FILE__; $this->output->expects($this->once()) ->method('getHttpResponseCode') @@ -66,7 +65,7 @@ class StreamResponseTest extends \Test\TestCase { $response->callback($this->output); } - public function testOutputNotFound(){ + public function testOutputNotFound() { $path = __FILE__ . 'test'; $this->output->expects($this->once()) ->method('getHttpResponseCode') @@ -81,7 +80,7 @@ class StreamResponseTest extends \Test\TestCase { $response->callback($this->output); } - public function testOutputReadFileError(){ + public function testOutputReadFileError() { $path = __FILE__; $this->output->expects($this->once()) ->method('getHttpResponseCode') diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php index af5b428cf86..0faa78998cb 100644 --- a/tests/lib/AppFramework/Http/TemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php @@ -40,7 +40,7 @@ class TemplateResponseTest extends \Test\TestCase { } - public function testSetParamsConstructor(){ + public function testSetParamsConstructor() { $params = ['hi' => 'yo']; $this->tpl = new TemplateResponse('app', 'home', $params); @@ -48,7 +48,7 @@ class TemplateResponseTest extends \Test\TestCase { } - public function testSetRenderAsConstructor(){ + public function testSetRenderAsConstructor() { $renderAs = 'myrender'; $this->tpl = new TemplateResponse('app', 'home', [], $renderAs); @@ -56,7 +56,7 @@ class TemplateResponseTest extends \Test\TestCase { } - public function testSetParams(){ + public function testSetParams() { $params = ['hi' => 'yo']; $this->tpl->setParams($params); @@ -64,11 +64,11 @@ class TemplateResponseTest extends \Test\TestCase { } - public function testGetTemplateName(){ + public function testGetTemplateName() { $this->assertEquals('home', $this->tpl->getTemplateName()); } - public function testGetRenderAs(){ + public function testGetRenderAs() { $render = 'myrender'; $this->tpl->renderAs($render); $this->assertEquals($render, $this->tpl->getRenderAs()); diff --git a/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php b/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php index 8971fe4df06..617ead473c0 100644 --- a/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> @@ -81,7 +82,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { public function testStandaloneTemplateResponse() { $this->dispatcher->expects($this->once()) ->method('dispatch') - ->willReturnCallback(function($eventName) { + ->willReturnCallback(function ($eventName) { if ($eventName === TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS) { return; } @@ -97,7 +98,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { public function testTemplateResponseNotLoggedIn() { $this->dispatcher->expects($this->once()) ->method('dispatch') - ->willReturnCallback(function($eventName) { + ->willReturnCallback(function ($eventName) { if ($eventName === TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS) { return; } @@ -115,7 +116,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { $this->dispatcher->expects($this->exactly(2)) ->method('dispatch') - ->willReturnCallback(function($eventName) use (&$events) { + ->willReturnCallback(function ($eventName) use (&$events) { if ($eventName === TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS || $eventName === TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN) { $events[] = $eventName; diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php index 69dd6d16226..5f0517016dd 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php @@ -60,7 +60,7 @@ class TestMiddleware extends Middleware { $this->beforeControllerThrowsEx = $beforeControllerThrowsEx; } - public function beforeController($controller, $methodName){ + public function beforeController($controller, $methodName) { self::$beforeControllerCalled++; $this->beforeControllerOrder = self::$beforeControllerCalled; $this->controller = $controller; @@ -70,7 +70,7 @@ class TestMiddleware extends Middleware { } } - public function afterException($controller, $methodName, \Exception $exception){ + public function afterException($controller, $methodName, \Exception $exception) { self::$afterExceptionCalled++; $this->afterExceptionOrder = self::$afterExceptionCalled; $this->controller = $controller; @@ -79,7 +79,7 @@ class TestMiddleware extends Middleware { parent::afterException($controller, $methodName, $exception); } - public function afterController($controller, $methodName, Response $response){ + public function afterController($controller, $methodName, Response $response) { self::$afterControllerCalled++; $this->afterControllerOrder = self::$afterControllerCalled; $this->controller = $controller; @@ -88,7 +88,7 @@ class TestMiddleware extends Middleware { return parent::afterController($controller, $methodName, $response); } - public function beforeOutput($controller, $methodName, $output){ + public function beforeOutput($controller, $methodName, $output) { self::$beforeOutputCalled++; $this->beforeOutputOrder = self::$beforeOutputCalled; $this->controller = $controller; @@ -124,7 +124,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - private function getControllerMock(){ + private function getControllerMock() { return $this->getMockBuilder('OCP\AppFramework\Controller') ->setMethods(['method']) ->setConstructorArgs(['app', @@ -137,14 +137,14 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - private function getMiddleware($beforeControllerThrowsEx=false){ + private function getMiddleware($beforeControllerThrowsEx=false) { $m1 = new TestMiddleware($beforeControllerThrowsEx); $this->dispatcher->registerMiddleware($m1); return $m1; } - public function testAfterExceptionShouldReturnResponseOfMiddleware(){ + public function testAfterExceptionShouldReturnResponseOfMiddleware() { $response = new Response(); $m1 = $this->getMockBuilder('\OCP\AppFramework\Middleware') ->setMethods(['afterException', 'beforeController']) @@ -167,7 +167,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testAfterExceptionShouldThrowAgainWhenNotHandled(){ + public function testAfterExceptionShouldThrowAgainWhenNotHandled() { $m1 = new TestMiddleware(false); $m2 = new TestMiddleware(true); @@ -180,7 +180,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testBeforeControllerCorrectArguments(){ + public function testBeforeControllerCorrectArguments() { $m1 = $this->getMiddleware(); $this->dispatcher->beforeController($this->controller, $this->method); @@ -189,7 +189,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testAfterControllerCorrectArguments(){ + public function testAfterControllerCorrectArguments() { $m1 = $this->getMiddleware(); $this->dispatcher->afterController($this->controller, $this->method, $this->response); @@ -200,7 +200,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testAfterExceptionCorrectArguments(){ + public function testAfterExceptionCorrectArguments() { $m1 = $this->getMiddleware(); $this->expectException(\Exception::class); @@ -214,7 +214,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testBeforeOutputCorrectArguments(){ + public function testBeforeOutputCorrectArguments() { $m1 = $this->getMiddleware(); $this->dispatcher->beforeOutput($this->controller, $this->method, $this->out); @@ -225,7 +225,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testBeforeControllerOrder(){ + public function testBeforeControllerOrder() { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(); @@ -235,7 +235,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { $this->assertEquals(2, $m2->beforeControllerOrder); } - public function testAfterControllerOrder(){ + public function testAfterControllerOrder() { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(); @@ -246,7 +246,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testAfterExceptionOrder(){ + public function testAfterExceptionOrder() { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(); @@ -259,7 +259,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testBeforeOutputOrder(){ + public function testBeforeOutputOrder() { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(); @@ -270,7 +270,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { } - public function testExceptionShouldRunAfterExceptionOfOnlyPreviouslyExecutedMiddlewares(){ + public function testExceptionShouldRunAfterExceptionOfOnlyPreviouslyExecutedMiddlewares() { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(true); $m3 = $this->getMockBuilder('\OCP\AppFramework\Middleware')->getMock(); diff --git a/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php index 6d089e3880d..2dfb04e138e 100644 --- a/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php index 62be8037cfc..0a4b3c4f34c 100644 --- a/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 85e1ac4e205..422087241f6 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -112,7 +112,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @PublicPage * @NoCSRFRequired */ - public function testSetNavigationEntry(){ + public function testSetNavigationEntry() { $this->navigationManager->expects($this->once()) ->method('setActiveEntry') ->with($this->equalTo('files')); @@ -208,7 +208,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @PublicPage * @NoCSRFRequired */ - public function testNoChecks(){ + public function testNoChecks() { $this->request->expects($this->never()) ->method('passesCSRFCheck') ->willReturn(false); @@ -224,7 +224,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @param string $method * @param string $expects */ - private function securityCheck($method, $expects, $shouldFail=false){ + private function securityCheck($method, $expects, $shouldFail=false) { // admin check requires login if ($expects === 'isAdminUser') { $isLoggedIn = true; @@ -250,7 +250,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { /** * @PublicPage */ - public function testCsrfCheck(){ + public function testCsrfCheck() { $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException::class); $this->request->expects($this->once()) @@ -268,7 +268,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @PublicPage * @NoCSRFRequired */ - public function testNoCsrfCheck(){ + public function testNoCsrfCheck() { $this->request->expects($this->never()) ->method('passesCSRFCheck') ->willReturn(false); @@ -280,7 +280,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { /** * @PublicPage */ - public function testPassesCsrfCheck(){ + public function testPassesCsrfCheck() { $this->request->expects($this->once()) ->method('passesCSRFCheck') ->willReturn(true); @@ -295,7 +295,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { /** * @PublicPage */ - public function testFailCsrfCheck(){ + public function testFailCsrfCheck() { $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException::class); $this->request->expects($this->once()) @@ -411,7 +411,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @NoCSRFRequired * @NoAdminRequired */ - public function testLoggedInCheck(){ + public function testLoggedInCheck() { $this->securityCheck(__FUNCTION__, 'isLoggedIn'); } @@ -420,7 +420,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @NoCSRFRequired * @NoAdminRequired */ - public function testFailLoggedInCheck(){ + public function testFailLoggedInCheck() { $this->securityCheck(__FUNCTION__, 'isLoggedIn', true); } @@ -428,7 +428,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { /** * @NoCSRFRequired */ - public function testIsAdminCheck(){ + public function testIsAdminCheck() { $this->securityCheck(__FUNCTION__, 'isAdminUser'); } @@ -436,7 +436,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @NoCSRFRequired * @SubAdminRequired */ - public function testIsNotSubAdminCheck(){ + public function testIsNotSubAdminCheck() { $this->reader->reflect(__CLASS__,__FUNCTION__); $sec = $this->getMiddleware(true, false, false); @@ -448,7 +448,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @NoCSRFRequired * @SubAdminRequired */ - public function testIsSubAdminCheck(){ + public function testIsSubAdminCheck() { $this->reader->reflect(__CLASS__,__FUNCTION__); $sec = $this->getMiddleware(true, false, true); @@ -460,7 +460,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @NoCSRFRequired * @SubAdminRequired */ - public function testIsSubAdminAndAdminCheck(){ + public function testIsSubAdminAndAdminCheck() { $this->reader->reflect(__CLASS__,__FUNCTION__); $sec = $this->getMiddleware(true, true, true); @@ -471,12 +471,12 @@ class SecurityMiddlewareTest extends \Test\TestCase { /** * @NoCSRFRequired */ - public function testFailIsAdminCheck(){ + public function testFailIsAdminCheck() { $this->securityCheck(__FUNCTION__, 'isAdminUser', true); } - public function testAfterExceptionNotCaughtThrowsItAgain(){ + public function testAfterExceptionNotCaughtThrowsItAgain() { $ex = new \Exception(); $this->expectException(\Exception::class); $this->middleware->afterException($this->controller, 'test', $ex); @@ -588,7 +588,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->assertEquals($expected , $response); } - public function testAfterAjaxExceptionReturnsJSONError(){ + public function testAfterAjaxExceptionReturnsJSONError() { $response = $this->middleware->afterException($this->controller, 'test', $this->secAjaxException); diff --git a/tests/lib/AppFramework/OCS/BaseResponseTest.php b/tests/lib/AppFramework/OCS/BaseResponseTest.php index 8a86ae13e79..18a85788af2 100644 --- a/tests/lib/AppFramework/OCS/BaseResponseTest.php +++ b/tests/lib/AppFramework/OCS/BaseResponseTest.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace Test\AppFramework\Middleware; - use OC\AppFramework\OCS\BaseResponse; class BaseResponseTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php index 95f8996dbdb..5e0604263fc 100644 --- a/tests/lib/AppFramework/Routing/RoutingTest.php +++ b/tests/lib/AppFramework/Routing/RoutingTest.php @@ -24,8 +24,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRoute() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'GET'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'GET'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open'); @@ -42,8 +42,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithMissingVerb() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open'); @@ -60,8 +60,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithLowercaseVerb() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open'); @@ -78,8 +78,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithRequirements() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'requirements' => ['something']] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'requirements' => ['something']] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', ['something']); @@ -97,8 +97,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithDefaults() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'defaults' => ['param' => 'foobar']] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'defaults' => ['param' => 'foobar']] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', [], ['param' => 'foobar']); @@ -115,8 +115,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithPostfix() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'postfix' => '_something'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'postfix' => '_something'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', [], [], '_something'); @@ -484,11 +484,11 @@ class RoutingTest extends \Test\TestCase # the section simple describes one route routes: - - name: folders#open - url: /folders/{folderId}/open - verb: GET - # controller: name.split()[0] - # action: name.split()[1] + - name: folders#open + url: /folders/{folderId}/open + verb: GET + # controller: name.split()[0] + # action: name.split()[1] # for a resource following actions will be generated: # - index @@ -498,15 +498,15 @@ routes: # - destroy # - new resources: - accounts: - url: /accounts - - folders: - url: /accounts/{accountId}/folders - # actions can be used to define additional actions on the resource - actions: - - name: validate - verb: GET - on-collection: false + accounts: + url: /accounts + + folders: + url: /accounts/{accountId}/folders + # actions can be used to define additional actions on the resource + actions: + - name: validate + verb: GET + on-collection: false * */ diff --git a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php index 5a3c3f2a007..2d20578efab 100644 --- a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php +++ b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php @@ -23,7 +23,6 @@ namespace Test\AppFramework\Utility; - use OC\AppFramework\Utility\ControllerMethodReflector; class BaseController { @@ -31,17 +30,17 @@ class BaseController { /** * @Annotation */ - public function test(){} + public function test() {} /** * @Annotation */ - public function test2(){} + public function test2() {} /** * @Annotation */ - public function test3(){} + public function test3() {} } @@ -64,7 +63,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { /** * @Annotation */ - public function testReadAnnotation(){ + public function testReadAnnotation() { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -106,7 +105,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param test */ - public function testReadAnnotationNoLowercase(){ + public function testReadAnnotationNoLowercase() { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -122,7 +121,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param int $test */ - public function testReadTypeIntAnnotations(){ + public function testReadTypeIntAnnotations() { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -137,12 +136,12 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @param int $a * @param int $b */ - public function arguments3($a, float $b, int $c, $d){} + public function arguments3($a, float $b, int $c, $d) {} /** * @requires PHP 7 */ - public function testReadTypeIntAnnotationsScalarTypes(){ + public function testReadTypeIntAnnotationsScalarTypes() { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -160,7 +159,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param double $test something special */ - public function testReadTypeDoubleAnnotations(){ + public function testReadTypeDoubleAnnotations() { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -174,7 +173,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param string $foo */ - public function testReadTypeWhitespaceAnnotations(){ + public function testReadTypeWhitespaceAnnotations() { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index 0341be14af9..52908ed8839 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -30,193 +30,193 @@ interface TestInterface {} class ClassEmptyConstructor implements IInterfaceConstructor {} class ClassSimpleConstructor implements IInterfaceConstructor { - public $test; - public function __construct($test) { - $this->test = $test; - } + public $test; + public function __construct($test) { + $this->test = $test; + } } class ClassComplexConstructor { - public $class; - public $test; - public function __construct(ClassSimpleConstructor $class, $test) { - $this->class = $class; - $this->test = $test; - } + public $class; + public $test; + public function __construct(ClassSimpleConstructor $class, $test) { + $this->class = $class; + $this->test = $test; + } } interface IInterfaceConstructor {} class ClassInterfaceConstructor { - public $class; - public $test; - public function __construct(IInterfaceConstructor $class, $test) { - $this->class = $class; - $this->test = $test; - } + public $class; + public $test; + public function __construct(IInterfaceConstructor $class, $test) { + $this->class = $class; + $this->test = $test; + } } class SimpleContainerTest extends \Test\TestCase { - private $container; - - protected function setUp(): void { - $this->container = new SimpleContainer(); - } - - - public function testRegister() { - $this->container->registerParameter('test', 'abc'); - $this->assertEquals('abc', $this->container->query('test')); - } - - - - public function testNothingRegistered() { - $this->expectException(\OCP\AppFramework\QueryException::class); - - $this->container->query('something really hard'); - } - - - - public function testNotAClass() { - $this->expectException(\OCP\AppFramework\QueryException::class); - - $this->container->query('Test\AppFramework\Utility\TestInterface'); - } - - - public function testNoConstructorClass() { - $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - $this->assertTrue($object instanceof ClassEmptyConstructor); - } - - - public function testInstancesOnlyOnce() { - $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - $object2 = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - $this->assertSame($object, $object2); - } - - public function testConstructorSimple() { - $this->container->registerParameter('test', 'abc'); - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassSimpleConstructor' - ); - $this->assertTrue($object instanceof ClassSimpleConstructor); - $this->assertEquals('abc', $object->test); - } - - - public function testConstructorComplex() { - $this->container->registerParameter('test', 'abc'); - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassComplexConstructor' - ); - $this->assertTrue($object instanceof ClassComplexConstructor); - $this->assertEquals('abc', $object->class->test); - $this->assertEquals('abc', $object->test); - } - - - public function testConstructorComplexInterface() { - $this->container->registerParameter('test', 'abc'); - $this->container->registerService( - 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { - return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); - }); - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassInterfaceConstructor' - ); - $this->assertTrue($object instanceof ClassInterfaceConstructor); - $this->assertEquals('abc', $object->class->test); - $this->assertEquals('abc', $object->test); - } - - - public function testOverrideService() { - $this->container->registerService( - 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { - return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); - }); - $this->container->registerService( - 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { - return $c->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - }); - $object = $this->container->query( - 'Test\AppFramework\Utility\IInterfaceConstructor' - ); - $this->assertTrue($object instanceof ClassEmptyConstructor); - } - - public function testRegisterAliasParamter() { - $this->container->registerParameter('test', 'abc'); - $this->container->registerAlias('test1', 'test'); - $this->assertEquals('abc', $this->container->query('test1')); - } - - public function testRegisterAliasService() { - $this->container->registerService('test', function() { - return new \StdClass; - }, true); - $this->container->registerAlias('test1', 'test'); - $this->assertSame( - $this->container->query('test'), $this->container->query('test')); - $this->assertSame( - $this->container->query('test1'), $this->container->query('test1')); - $this->assertSame( - $this->container->query('test'), $this->container->query('test1')); - } - - public function sanitizeNameProvider() { - return [ - ['ABC\\Foo', 'ABC\\Foo'], - ['\\ABC\\Foo', '\\ABC\\Foo'], - ['\\ABC\\Foo', 'ABC\\Foo'], - ['ABC\\Foo', '\\ABC\\Foo'], - ]; - } - - /** - * @dataProvider sanitizeNameProvider - */ - public function testSanitizeName($register, $query) { - $this->container->registerService($register, function() { - return 'abc'; - }); - $this->assertEquals('abc', $this->container->query($query)); - } - - - public function testConstructorComplexNoTestParameterFound() { - $this->expectException(\OCP\AppFramework\QueryException::class); - - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassComplexConstructor' - ); - } - - public function testRegisterFactory() { - $this->container->registerService('test', function() { - return new \StdClass(); - }, false); - $this->assertNotSame( - $this->container->query('test'), $this->container->query('test')); - } - - public function testRegisterAliasFactory() { - $this->container->registerService('test', function() { - return new \StdClass(); - }, false); - $this->container->registerAlias('test1', 'test'); - $this->assertNotSame( - $this->container->query('test'), $this->container->query('test')); - $this->assertNotSame( - $this->container->query('test1'), $this->container->query('test1')); - $this->assertNotSame( - $this->container->query('test'), $this->container->query('test1')); - } + private $container; + + protected function setUp(): void { + $this->container = new SimpleContainer(); + } + + + public function testRegister() { + $this->container->registerParameter('test', 'abc'); + $this->assertEquals('abc', $this->container->query('test')); + } + + + + public function testNothingRegistered() { + $this->expectException(\OCP\AppFramework\QueryException::class); + + $this->container->query('something really hard'); + } + + + + public function testNotAClass() { + $this->expectException(\OCP\AppFramework\QueryException::class); + + $this->container->query('Test\AppFramework\Utility\TestInterface'); + } + + + public function testNoConstructorClass() { + $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + $this->assertTrue($object instanceof ClassEmptyConstructor); + } + + + public function testInstancesOnlyOnce() { + $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + $object2 = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + $this->assertSame($object, $object2); + } + + public function testConstructorSimple() { + $this->container->registerParameter('test', 'abc'); + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassSimpleConstructor' + ); + $this->assertTrue($object instanceof ClassSimpleConstructor); + $this->assertEquals('abc', $object->test); + } + + + public function testConstructorComplex() { + $this->container->registerParameter('test', 'abc'); + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassComplexConstructor' + ); + $this->assertTrue($object instanceof ClassComplexConstructor); + $this->assertEquals('abc', $object->class->test); + $this->assertEquals('abc', $object->test); + } + + + public function testConstructorComplexInterface() { + $this->container->registerParameter('test', 'abc'); + $this->container->registerService( + 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { + return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); + }); + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassInterfaceConstructor' + ); + $this->assertTrue($object instanceof ClassInterfaceConstructor); + $this->assertEquals('abc', $object->class->test); + $this->assertEquals('abc', $object->test); + } + + + public function testOverrideService() { + $this->container->registerService( + 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { + return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); + }); + $this->container->registerService( + 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { + return $c->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + }); + $object = $this->container->query( + 'Test\AppFramework\Utility\IInterfaceConstructor' + ); + $this->assertTrue($object instanceof ClassEmptyConstructor); + } + + public function testRegisterAliasParamter() { + $this->container->registerParameter('test', 'abc'); + $this->container->registerAlias('test1', 'test'); + $this->assertEquals('abc', $this->container->query('test1')); + } + + public function testRegisterAliasService() { + $this->container->registerService('test', function () { + return new \StdClass; + }, true); + $this->container->registerAlias('test1', 'test'); + $this->assertSame( + $this->container->query('test'), $this->container->query('test')); + $this->assertSame( + $this->container->query('test1'), $this->container->query('test1')); + $this->assertSame( + $this->container->query('test'), $this->container->query('test1')); + } + + public function sanitizeNameProvider() { + return [ + ['ABC\\Foo', 'ABC\\Foo'], + ['\\ABC\\Foo', '\\ABC\\Foo'], + ['\\ABC\\Foo', 'ABC\\Foo'], + ['ABC\\Foo', '\\ABC\\Foo'], + ]; + } + + /** + * @dataProvider sanitizeNameProvider + */ + public function testSanitizeName($register, $query) { + $this->container->registerService($register, function () { + return 'abc'; + }); + $this->assertEquals('abc', $this->container->query($query)); + } + + + public function testConstructorComplexNoTestParameterFound() { + $this->expectException(\OCP\AppFramework\QueryException::class); + + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassComplexConstructor' + ); + } + + public function testRegisterFactory() { + $this->container->registerService('test', function () { + return new \StdClass(); + }, false); + $this->assertNotSame( + $this->container->query('test'), $this->container->query('test')); + } + + public function testRegisterAliasFactory() { + $this->container->registerService('test', function () { + return new \StdClass(); + }, false); + $this->container->registerAlias('test1', 'test'); + $this->assertNotSame( + $this->container->query('test'), $this->container->query('test')); + $this->assertNotSame( + $this->container->query('test1'), $this->container->query('test1')); + $this->assertNotSame( + $this->container->query('test'), $this->container->query('test1')); + } } diff --git a/tests/lib/Archive/TARTest.php b/tests/lib/Archive/TARTest.php index 77df1c32ca4..6b16f061623 100644 --- a/tests/lib/Archive/TARTest.php +++ b/tests/lib/Archive/TARTest.php @@ -8,7 +8,6 @@ namespace Test\Archive; - use OC\Archive\TAR; class TARTest extends TestBase { diff --git a/tests/lib/Archive/TestBase.php b/tests/lib/Archive/TestBase.php index 8ecedb189ce..c94767db606 100644 --- a/tests/lib/Archive/TestBase.php +++ b/tests/lib/Archive/TestBase.php @@ -8,7 +8,6 @@ namespace Test\Archive; - abstract class TestBase extends \Test\TestCase { /** * @var \OC\Archive\Archive diff --git a/tests/lib/Archive/ZIPTest.php b/tests/lib/Archive/ZIPTest.php index 573339e5a19..17a639c9f5f 100644 --- a/tests/lib/Archive/ZIPTest.php +++ b/tests/lib/Archive/ZIPTest.php @@ -8,7 +8,6 @@ namespace Test\Archive; - use OC\Archive\ZIP; class ZIPTest extends TestBase { diff --git a/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php b/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php index 49e9e79462f..4d64a1c216a 100644 --- a/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php +++ b/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> diff --git a/tests/lib/Authentication/Events/RemoteWipeStartedTest.php b/tests/lib/Authentication/Events/RemoteWipeStartedTest.php index 8fbaa086656..0a962eafc12 100644 --- a/tests/lib/Authentication/Events/RemoteWipeStartedTest.php +++ b/tests/lib/Authentication/Events/RemoteWipeStartedTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> diff --git a/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php index 4f203b368c0..35d0ae26080 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> diff --git a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php index 3d47b8d4a03..2470e686902 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> diff --git a/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php index 79d362410ae..b582749e645 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> diff --git a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php index f051147609c..7b47bbf5130 100644 --- a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php +++ b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php @@ -25,7 +25,6 @@ declare(strict_types=1); namespace lib\Authentication\Login; -use Hoa\Iterator\Mock; use OC\Authentication\Login\LoggedInCheckCommand; use OC\Core\Controller\LoginController; use OCP\EventDispatcher\IEventDispatcher; diff --git a/tests/lib/Authentication/Token/ManagerTest.php b/tests/lib/Authentication/Token/ManagerTest.php index 8cac7d5be5c..fb92b3e5018 100644 --- a/tests/lib/Authentication/Token/ManagerTest.php +++ b/tests/lib/Authentication/Token/ManagerTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php index 58340b905c0..fc1c71e4511 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index c9dc3d6ef4a..357200e24b4 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -285,7 +285,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->mapper ->expects($this->at(2)) ->method('delete') - ->with($this->callback(function($token) use ($oldToken) { + ->with($this->callback(function ($token) use ($oldToken) { return $token === $oldToken; })); @@ -325,7 +325,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->mapper ->expects($this->at(2)) ->method('delete') - ->with($this->callback(function($token) use ($oldToken) { + ->with($this->callback(function ($token) use ($oldToken) { return $token === $oldToken; })); diff --git a/tests/lib/Authentication/Token/PublicKeyTokenTest.php b/tests/lib/Authentication/Token/PublicKeyTokenTest.php index d0226eb9902..35c2e0ece39 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/Authentication/Token/RemoteWipeTest.php b/tests/lib/Authentication/Token/RemoteWipeTest.php index 2d887a0a870..11be7590459 100644 --- a/tests/lib/Authentication/Token/RemoteWipeTest.php +++ b/tests/lib/Authentication/Token/RemoteWipeTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> diff --git a/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php b/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php index 9be2e64e980..50a74a6424e 100644 --- a/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** diff --git a/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php b/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php index 92d072608f2..e1e401e7683 100644 --- a/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php @@ -109,7 +109,7 @@ class MandatoryTwoFactorTest extends TestCase { ['twofactor_enforced_excluded_groups', [], []], ]); $this->groupManager->method('isInGroup') - ->willReturnCallback(function($user, $group) { + ->willReturnCallback(function ($user, $group) { return $user === 'user123' && $group ==='twofactorers'; }); @@ -147,7 +147,7 @@ class MandatoryTwoFactorTest extends TestCase { ['twofactor_enforced_excluded_groups', [], ['yoloers']], ]); $this->groupManager->method('isInGroup') - ->willReturnCallback(function($user, $group) { + ->willReturnCallback(function ($user, $group) { return $user === 'user123' && $group ==='yoloers'; }); diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php index 046c541f4d5..20f7a57d367 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php index f294e40111d..c5d2b356a2c 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** diff --git a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php index 90fc4a9d27a..5b2aa654f11 100644 --- a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at> @@ -79,7 +81,7 @@ class RegistryTest extends TestCase { ->method('dispatch') ->with( $this->equalTo(IRegistry::EVENT_PROVIDER_ENABLED), - $this->callback(function(RegistryEvent $e) use ($user, $provider) { + $this->callback(function (RegistryEvent $e) use ($user, $provider) { return $e->getUser() === $user && $e->getProvider() === $provider; }) ); @@ -100,7 +102,7 @@ class RegistryTest extends TestCase { ->method('dispatch') ->with( $this->equalTo(IRegistry::EVENT_PROVIDER_DISABLED), - $this->callback(function(RegistryEvent $e) use ($user, $provider) { + $this->callback(function (RegistryEvent $e) use ($user, $provider) { return $e->getUser() === $user && $e->getProvider() === $provider; }) ); diff --git a/tests/lib/AutoLoaderTest.php b/tests/lib/AutoLoaderTest.php index b3ca21a90d4..24eaa367435 100644 --- a/tests/lib/AutoLoaderTest.php +++ b/tests/lib/AutoLoaderTest.php @@ -21,7 +21,7 @@ class AutoLoaderTest extends TestCase { public function testLegacyPath() { $this->assertEquals([ - \OC::$SERVERROOT . '/lib/private/legacy/files.php', + \OC::$SERVERROOT . '/lib/private/legacy/files.php', ], $this->loader->findClass('OC_Files')); } @@ -33,7 +33,7 @@ class AutoLoaderTest extends TestCase { public function testLoadCore() { $this->assertEquals([ - \OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php', + \OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php', ], $this->loader->findClass('OC_Foo_Bar')); } diff --git a/tests/lib/Avatar/GuestAvatarTest.php b/tests/lib/Avatar/GuestAvatarTest.php index 0d13655133b..1c424234f10 100644 --- a/tests/lib/Avatar/GuestAvatarTest.php +++ b/tests/lib/Avatar/GuestAvatarTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php index b93c4112af5..d3e36954cee 100644 --- a/tests/lib/Avatar/UserAvatarTest.php +++ b/tests/lib/Avatar/UserAvatarTest.php @@ -57,13 +57,13 @@ class UserAvatarTest extends \Test\TestCase { ->willReturn($file); $this->folder->method('getFile') - ->willReturnCallback(function($path) { + ->willReturnCallback(function ($path) { if ($path === 'avatar.64.png') { throw new NotFoundException(); } }); $this->folder->method('fileExists') - ->willReturnCallback(function($path) { + ->willReturnCallback(function ($path) { if ($path === 'generated') { return true; } @@ -134,7 +134,7 @@ class UserAvatarTest extends \Test\TestCase { $this->folder->method('getFile') ->willReturnCallback( - function($path) use ($file) { + function ($path) use ($file) { if ($path === 'avatar.png') { return $file; } else { diff --git a/tests/lib/BackgroundJob/DummyJobList.php b/tests/lib/BackgroundJob/DummyJobList.php index 4b8de82b368..529e93e960f 100644 --- a/tests/lib/BackgroundJob/DummyJobList.php +++ b/tests/lib/BackgroundJob/DummyJobList.php @@ -7,6 +7,7 @@ */ namespace Test\BackgroundJob; + use OCP\BackgroundJob\IJob; /** diff --git a/tests/lib/BackgroundJob/TestJob.php b/tests/lib/BackgroundJob/TestJob.php index a5ab4454550..e15c7e86c99 100644 --- a/tests/lib/BackgroundJob/TestJob.php +++ b/tests/lib/BackgroundJob/TestJob.php @@ -8,7 +8,6 @@ namespace Test\BackgroundJob; - class TestJob extends \OC\BackgroundJob\Job { private $testCase; diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php index df7a72a7491..96c35ebf786 100644 --- a/tests/lib/Cache/FileCacheTest.php +++ b/tests/lib/Cache/FileCacheTest.php @@ -21,6 +21,7 @@ */ namespace Test\Cache; + use OC\Files\Storage\Local; /** diff --git a/tests/lib/CapabilitiesManagerTest.php b/tests/lib/CapabilitiesManagerTest.php index e7d519a7493..536355f9697 100644 --- a/tests/lib/CapabilitiesManagerTest.php +++ b/tests/lib/CapabilitiesManagerTest.php @@ -53,7 +53,7 @@ class CapabilitiesManagerTest extends TestCase { * Test a valid capabilitie */ public function testValidCapability() { - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new SimpleCapability(); }); @@ -65,13 +65,13 @@ class CapabilitiesManagerTest extends TestCase { * Test a public capabilitie */ public function testPublicCapability() { - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new PublicSimpleCapability1(); }); - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new SimpleCapability2(); }); - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new SimpleCapability3(); }); @@ -86,7 +86,7 @@ class CapabilitiesManagerTest extends TestCase { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('The given Capability (Test\\NoCapability) does not implement the ICapability interface'); - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new NoCapability(); }); @@ -98,13 +98,13 @@ class CapabilitiesManagerTest extends TestCase { * Test a bunch of merged Capabilities */ public function testMergedCapabilities() { - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new SimpleCapability(); }); - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new SimpleCapability2(); }); - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new SimpleCapability3(); }); @@ -124,10 +124,10 @@ class CapabilitiesManagerTest extends TestCase { * Test deep identical capabilities */ public function testDeepIdenticalCapabilities() { - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new DeepCapability(); }); - $this->manager->registerCapability(function() { + $this->manager->registerCapability(function () { return new DeepCapability(); }); diff --git a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php index 3d81134680a..b4a9b3d0955 100644 --- a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php @@ -23,7 +23,6 @@ namespace Test\Collaboration\Collaborators; - use OC\Collaboration\Collaborators\GroupPlugin; use OC\Collaboration\Collaborators\SearchResult; use OCP\Collaboration\Collaborators\ISearchResult; @@ -460,8 +459,7 @@ class GroupPluginTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnCallback( - function($appName, $key, $default) - use ($shareWithGroupOnly, $shareeEnumeration) + function ($appName, $key, $default) use ($shareWithGroupOnly, $shareeEnumeration) { if ($appName === 'core' && $key === 'shareapi_only_share_with_group_members') { return $shareWithGroupOnly ? 'yes' : 'no'; diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index 15dccf2c84c..eb26443a269 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -23,7 +23,6 @@ namespace Test\Collaboration\Collaborators; - use OC\Collaboration\Collaborators\LookupPlugin; use OC\Federation\CloudId; use OCP\Collaboration\Collaborators\ISearchResult; diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php index 9cf308cd414..5a690393d6c 100644 --- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php @@ -23,7 +23,6 @@ namespace Test\Collaboration\Collaborators; - use OC\Collaboration\Collaborators\MailPlugin; use OC\Collaboration\Collaborators\SearchResult; use OC\Federation\CloudIdManager; @@ -87,8 +86,7 @@ class MailPluginTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnCallback( - function($appName, $key, $default) - use ($shareeEnumeration) + function ($appName, $key, $default) use ($shareeEnumeration) { if ($appName === 'core' && $key === 'shareapi_allow_share_dialog_user_enumeration') { return $shareeEnumeration ? 'yes' : 'no'; @@ -535,7 +533,7 @@ class MailPluginTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnCallback( - function($appName, $key, $default) { + function ($appName, $key, $default) { if ($appName === 'core' && $key === 'shareapi_allow_share_dialog_user_enumeration') { return 'yes'; } else if ($appName === 'core' && $key === 'shareapi_only_share_with_group_members') { @@ -565,13 +563,13 @@ class MailPluginTest extends TestCase { $this->groupManager->expects($this->any()) ->method('getUserGroupIds') - ->willReturnCallback(function(\OCP\IUser $user) use ($userToGroupMapping) { + ->willReturnCallback(function (\OCP\IUser $user) use ($userToGroupMapping) { return $userToGroupMapping[$user->getUID()]; }); $this->groupManager->expects($this->any()) ->method('isInGroup') - ->willReturnCallback(function($userId, $group) use ($userToGroupMapping) { + ->willReturnCallback(function ($userId, $group) use ($userToGroupMapping) { return in_array($group, $userToGroupMapping[$userId]); }); @@ -607,7 +605,7 @@ class MailPluginTest extends TestCase { ], // The user `User` cannot share with the current user [ - 'test', + 'test', [ [ 'FN' => 'User', @@ -627,7 +625,7 @@ class MailPluginTest extends TestCase { ], // The user `User` cannot share with the current user, but there is an exact match on the e-mail address -> share by e-mail [ - 'test@example.com', + 'test@example.com', [ [ 'FN' => 'User', diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php index 59338b74de9..d85fadad408 100644 --- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php +++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php @@ -23,7 +23,6 @@ namespace Test\Collaboration\Collaborators; - use OC\Collaboration\Collaborators\RemotePlugin; use OC\Collaboration\Collaborators\SearchResult; use OC\Federation\CloudIdManager; @@ -93,8 +92,7 @@ class RemotePluginTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnCallback( - function($appName, $key, $default) - use ($shareeEnumeration) + function ($appName, $key, $default) use ($shareeEnumeration) { if ($appName === 'core' && $key === 'shareapi_allow_share_dialog_user_enumeration') { return $shareeEnumeration ? 'yes' : 'no'; diff --git a/tests/lib/Collaboration/Collaborators/SearchResultTest.php b/tests/lib/Collaboration/Collaborators/SearchResultTest.php index 3d09a9b632d..45ce0b4c1b8 100644 --- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php @@ -23,7 +23,6 @@ namespace Test\Collaboration\Collaborators; - use OC\Collaboration\Collaborators\Search; use OC\Collaboration\Collaborators\SearchResult; use OCP\Collaboration\Collaborators\ISearch; diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php index 284d8270c49..521ea0737ed 100644 --- a/tests/lib/Collaboration/Collaborators/SearchTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchTest.php @@ -23,7 +23,6 @@ namespace Test\Collaboration\Collaborators; - use OC\Collaboration\Collaborators\Search; use OC\Collaboration\Collaborators\SearchResult; use OCP\Collaboration\Collaborators\ISearch; @@ -76,7 +75,7 @@ class SearchTest extends TestCase { $userPlugin = $this->createMock(ISearchPlugin::class); $userPlugin->expects($this->any()) ->method('search') - ->willReturnCallback(function() use ($searchResult, $mockedUserResult, $expectedMoreResults) { + ->willReturnCallback(function () use ($searchResult, $mockedUserResult, $expectedMoreResults) { $type = new SearchResultType('users'); $searchResult->addResultSet($type, $mockedUserResult); return $expectedMoreResults; @@ -85,7 +84,7 @@ class SearchTest extends TestCase { $groupPlugin = $this->createMock(ISearchPlugin::class); $groupPlugin->expects($this->any()) ->method('search') - ->willReturnCallback(function() use ($searchResult, $mockedGroupsResult, $expectedMoreResults) { + ->willReturnCallback(function () use ($searchResult, $mockedGroupsResult, $expectedMoreResults) { $type = new SearchResultType('groups'); $searchResult->addResultSet($type, $mockedGroupsResult); return $expectedMoreResults; @@ -94,7 +93,7 @@ class SearchTest extends TestCase { $remotePlugin = $this->createMock(ISearchPlugin::class); $remotePlugin->expects($this->any()) ->method('search') - ->willReturnCallback(function() use ($searchResult, $mockedRemotesResult, $expectedMoreResults) { + ->willReturnCallback(function () use ($searchResult, $mockedRemotesResult, $expectedMoreResults) { if($mockedRemotesResult !== null) { $type = new SearchResultType('remotes'); $searchResult->addResultSet($type, $mockedRemotesResult['results'], $mockedRemotesResult['exact']); @@ -107,7 +106,7 @@ class SearchTest extends TestCase { $this->container->expects($this->any()) ->method('resolve') - ->willReturnCallback(function($class) use ($searchResult, $userPlugin, $groupPlugin, $remotePlugin) { + ->willReturnCallback(function ($class) use ($searchResult, $userPlugin, $groupPlugin, $remotePlugin) { if($class === SearchResult::class) { return $searchResult; } elseif ($class === $userPlugin) { @@ -152,12 +151,12 @@ class SearchTest extends TestCase { ], [ 'test', [Share::SHARE_TYPE_USER, Share::SHARE_TYPE_GROUP, Share::SHARE_TYPE_REMOTE], 1, 2, [ - ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ], [ - ['label' => 'testgroup1', 'value' => ['shareType' => Share::SHARE_TYPE_GROUP, 'shareWith' => 'testgroup1']], - ], [ - 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false, - ], + ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ], [ + ['label' => 'testgroup1', 'value' => ['shareType' => Share::SHARE_TYPE_GROUP, 'shareWith' => 'testgroup1']], + ], [ + 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false, + ], [ 'exact' => ['users' => [], 'groups' => [], 'remotes' => []], 'users' => [ @@ -174,10 +173,10 @@ class SearchTest extends TestCase { // No groups requested [ 'test', [Share::SHARE_TYPE_USER, Share::SHARE_TYPE_REMOTE], 1, 2, [ - ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ], [], [ - 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false - ], + ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ], [], [ + 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false + ], [ 'exact' => ['users' => [], 'remotes' => []], 'users' => [ @@ -191,8 +190,8 @@ class SearchTest extends TestCase { // Share type restricted to user - Only one user [ 'test', [Share::SHARE_TYPE_USER], 1, 2, [ - ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ], [], [], + ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ], [], [], [ 'exact' => ['users' => []], 'users' => [ @@ -203,9 +202,9 @@ class SearchTest extends TestCase { // Share type restricted to user - Multipage result [ 'test', [Share::SHARE_TYPE_USER], 1, 2, [ - ['label' => 'test 1', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ['label' => 'test 2', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test2']], - ], [], [], + ['label' => 'test 1', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ['label' => 'test 2', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test2']], + ], [], [], [ 'exact' => ['users' => []], 'users' => [ diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php index ff916d63b38..bacf68f652e 100644 --- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php @@ -27,6 +27,7 @@ use OC\Collaboration\Collaborators\SearchResult; use OC\Collaboration\Collaborators\UserPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\IConfig; +use OCP\IGroup; use OCP\IGroupManager; use OCP\IUser; use OCP\IUserManager; @@ -93,9 +94,7 @@ class UserPluginTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnCallback( - function($appName, $key, $default) - use ($shareWithGroupOnly, $shareeEnumeration, $shareeEnumerationLimitToGroup) - { + function ($appName, $key, $default) use ($shareWithGroupOnly, $shareeEnumeration, $shareeEnumerationLimitToGroup) { if ($appName === 'core' && $key === 'shareapi_only_share_with_group_members') { return $shareWithGroupOnly ? 'yes' : 'no'; } else if ($appName === 'core' && $key === 'shareapi_allow_share_dialog_user_enumeration') { @@ -127,6 +126,16 @@ class UserPluginTest extends TestCase { return $user; } + public function getGroupMock($gid) { + $group = $this->createMock(IGroup::class); + + $group->expects($this->any()) + ->method('getGID') + ->willReturn($gid); + + return $group; + } + public function dataGetUsers() { return [ ['test', false, true, [], [], [], [], true, false], @@ -137,33 +146,33 @@ class UserPluginTest extends TestCase { 'test', false, true, [], [], [ ['label' => 'Test', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test']], - ], [], true, $this->getUserMock('test', 'Test') + ], [], true, $this->getUserMock('test', 'Test'), ], [ 'test', false, false, [], [], [ ['label' => 'Test', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test']], - ], [], true, $this->getUserMock('test', 'Test') + ], [], true, $this->getUserMock('test', 'Test'), ], [ 'test', true, true, [], [], - [], [], true, $this->getUserMock('test', 'Test') + [], [], true, $this->getUserMock('test', 'Test'), ], [ 'test', true, false, [], [], - [], [], true, $this->getUserMock('test', 'Test') + [], [], true, $this->getUserMock('test', 'Test'), ], [ 'test', true, true, ['test-group'], [['test-group', 'test', 2, 0, []]], [ ['label' => 'Test', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test']], - ], [], true, $this->getUserMock('test', 'Test') + ], [], true, $this->getUserMock('test', 'Test'), ], [ 'test', true, false, ['test-group'], [['test-group', 'test', 2, 0, []]], [ ['label' => 'Test', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test']], - ], [], true, $this->getUserMock('test', 'Test') + ], [], true, $this->getUserMock('test', 'Test'), ], [ 'test', @@ -267,7 +276,7 @@ class UserPluginTest extends TestCase { true, ['abc', 'xyz'], [ - ['abc', 'test', 2, 0, ['test1' => 'Test One']], + ['abc', 'test', 2, 0, [$this->getUserMock('test1', 'Test One')]], ['xyz', 'test', 2, 0, []], ], [], @@ -283,7 +292,7 @@ class UserPluginTest extends TestCase { false, ['abc', 'xyz'], [ - ['abc', 'test', 2, 0, ['test1' => 'Test One']], + ['abc', 'test', 2, 0, [$this->getUserMock('test1', 'Test One')]], ['xyz', 'test', 2, 0, []], ], [], @@ -298,12 +307,12 @@ class UserPluginTest extends TestCase { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + $this->getUserMock('test1', 'Test One'), + $this->getUserMock('test2', 'Test Two'), ]], ['xyz', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + $this->getUserMock('test1', 'Test One'), + $this->getUserMock('test2', 'Test Two'), ]], ], [], @@ -321,12 +330,12 @@ class UserPluginTest extends TestCase { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + $this->getUserMock('test1', 'Test One'), + $this->getUserMock('test2', 'Test Two'), ]], ['xyz', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + $this->getUserMock('test1', 'Test One'), + $this->getUserMock('test2', 'Test Two'), ]], ], [], @@ -341,10 +350,10 @@ class UserPluginTest extends TestCase { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test' => 'Test One', + $this->getUserMock('test', 'Test One'), ]], ['xyz', 'test', 2, 0, [ - 'test2' => 'Test Two', + $this->getUserMock('test2', 'Test Two'), ]], ], [ @@ -363,10 +372,10 @@ class UserPluginTest extends TestCase { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test' => 'Test One', + $this->getUserMock('test', 'Test One'), ]], ['xyz', 'test', 2, 0, [ - 'test2' => 'Test Two', + $this->getUserMock('test2', 'Test Two'), ]], ], [ @@ -410,31 +419,36 @@ class UserPluginTest extends TestCase { ->method('getUser') ->willReturn($this->user); - if(!$shareWithGroupOnly) { + if (!$shareWithGroupOnly) { $this->userManager->expects($this->once()) ->method('searchDisplayName') ->with($searchTerm, $this->limit, $this->offset) ->willReturn($userResponse); } else { + $groups = array_combine($groupResponse, array_map(function ($gid) { + return $this->getGroupMock($gid); + }, $groupResponse)); if ($singleUser !== false) { - $this->groupManager->expects($this->exactly(2)) - ->method('getUserGroupIds') - ->withConsecutive( - [$this->user], - [$singleUser] - ) + $this->groupManager->method('getUserGroups') + ->with($this->user) + ->willReturn($groups); + + $this->groupManager->method('getUserGroupIds') + ->with($singleUser) ->willReturn($groupResponse); } else { $this->groupManager->expects($this->once()) - ->method('getUserGroupIds') + ->method('getUserGroups') ->with($this->user) - ->willReturn($groupResponse); + ->willReturn($groups); } - $this->groupManager->expects($this->exactly(sizeof($groupResponse))) - ->method('displayNamesInGroup') - ->with($this->anything(), $searchTerm, $this->limit, $this->offset) - ->willReturnMap($userResponse); + foreach ($userResponse as $groupDefinition) { + [$gid, $search, $limit, $offset, $users] = $groupDefinition; + $groups[$gid]->method('searchDisplayName') + ->with($search, $limit, $offset) + ->willReturn($users); + } } if ($singleUser !== false) { @@ -457,24 +471,24 @@ class UserPluginTest extends TestCase { $inputUsers = [ 'alice' => 'Alice', 'bob' => 'Bob', - 'carol' => 'Carol' + 'carol' => 'Carol', ]; return [ [ $inputUsers, ['alice', 'carol'], - 'bob' + 'bob', ], [ $inputUsers, ['alice', 'bob', 'carol'], - 'dave' + 'dave', ], [ $inputUsers, ['alice', 'bob', 'carol'], - null - ] + null, + ], ]; } @@ -489,8 +503,8 @@ class UserPluginTest extends TestCase { $this->session->expects($this->once()) ->method('getUser') - ->willReturnCallback(function() use ($currentUserId) { - if($currentUserId !== null) { + ->willReturnCallback(function () use ($currentUserId) { + if ($currentUserId !== null) { return $this->getUserMock($currentUserId, $currentUserId); } return null; @@ -506,55 +520,55 @@ class UserPluginTest extends TestCase { 'test', ['groupA'], [ - [ 'uid' => 'test1', 'groups' => ['groupA'] ], - [ 'uid' => 'test2', 'groups' => ['groupB'] ] + ['uid' => 'test1', 'groups' => ['groupA']], + ['uid' => 'test2', 'groups' => ['groupB']], ], - ['test1'] + ['test1'], ], [ 'test', ['groupA'], [ - [ 'uid' => 'test1', 'groups' => ['groupA'] ], - [ 'uid' => 'test2', 'groups' => ['groupB', 'groupA'] ] + ['uid' => 'test1', 'groups' => ['groupA']], + ['uid' => 'test2', 'groups' => ['groupB', 'groupA']], ], - ['test1', 'test2'] + ['test1', 'test2'], ], [ 'test', ['groupA'], [ - [ 'uid' => 'test1', 'groups' => ['groupA', 'groupC'] ], - [ 'uid' => 'test2', 'groups' => ['groupB', 'groupA'] ] + ['uid' => 'test1', 'groups' => ['groupA', 'groupC']], + ['uid' => 'test2', 'groups' => ['groupB', 'groupA']], ], - ['test1', 'test2'] + ['test1', 'test2'], ], [ 'test', ['groupC', 'groupB'], [ - [ 'uid' => 'test1', 'groups' => ['groupA', 'groupC'] ], - [ 'uid' => 'test2', 'groups' => ['groupB', 'groupA'] ] + ['uid' => 'test1', 'groups' => ['groupA', 'groupC']], + ['uid' => 'test2', 'groups' => ['groupB', 'groupA']], ], - ['test1', 'test2'] + ['test1', 'test2'], ], [ 'test', [], [ - [ 'uid' => 'test1', 'groups' => ['groupA'] ], - [ 'uid' => 'test2', 'groups' => ['groupB', 'groupA'] ] + ['uid' => 'test1', 'groups' => ['groupA']], + ['uid' => 'test2', 'groups' => ['groupB', 'groupA']], ], - [] + [], ], [ 'test', ['groupC', 'groupB'], [ - [ 'uid' => 'test1', 'groups' => [] ], - [ 'uid' => 'test2', 'groups' => [] ] + ['uid' => 'test1', 'groups' => []], + ['uid' => 'test2', 'groups' => []], ], - [] + [], ], ]; } @@ -570,7 +584,7 @@ class UserPluginTest extends TestCase { }, $matchingUsers); $mappedResult = array_map(function ($user) { - return ['label' => $user, 'value' => [ 'shareType' => 0, 'shareWith' => $user ]]; + return ['label' => $user, 'value' => ['shareType' => 0, 'shareWith' => $user]]; }, $result); $this->userManager->expects($this->once()) diff --git a/tests/lib/Collaboration/Resources/ManagerTest.php b/tests/lib/Collaboration/Resources/ManagerTest.php index f59c2913c88..092d4ffd39c 100644 --- a/tests/lib/Collaboration/Resources/ManagerTest.php +++ b/tests/lib/Collaboration/Resources/ManagerTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Daniel Kesselberg <mail@danielkesselberg.de> diff --git a/tests/lib/Collaboration/Resources/ProviderManagerTest.php b/tests/lib/Collaboration/Resources/ProviderManagerTest.php index d8bebe8fa6c..751e2cc1f8d 100644 --- a/tests/lib/Collaboration/Resources/ProviderManagerTest.php +++ b/tests/lib/Collaboration/Resources/ProviderManagerTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Daniel Kesselberg <mail@danielkesselberg.de> diff --git a/tests/lib/Command/BackgroundJobsTest.php b/tests/lib/Command/BackgroundJobsTest.php index fc506be644a..972daf51a7a 100644 --- a/tests/lib/Command/BackgroundJobsTest.php +++ b/tests/lib/Command/BackgroundJobsTest.php @@ -1,27 +1,27 @@ <?php /** -* The MIT License (MIT) -* -* Copyright (c) 2015 Christian Kampka <christian@kampka.net> -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ + * The MIT License (MIT) + * + * Copyright (c) 2015 Christian Kampka <christian@kampka.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ namespace Test\Command; diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php index bd58d3fb156..686c2bcd19e 100644 --- a/tests/lib/Comments/CommentTest.php +++ b/tests/lib/Comments/CommentTest.php @@ -112,7 +112,7 @@ class CommentTest extends TestCase { /** * @dataProvider roleSetterProvider */ - public function testSetRoleInvalidInput($role, $type, $id){ + public function testSetRoleInvalidInput($role, $type, $id) { $this->expectException(\InvalidArgumentException::class); $comment = new Comment(); diff --git a/tests/lib/Comments/FakeManager.php b/tests/lib/Comments/FakeManager.php index 9078226afb5..5b74b54de50 100644 --- a/tests/lib/Comments/FakeManager.php +++ b/tests/lib/Comments/FakeManager.php @@ -1,6 +1,7 @@ <?php namespace Test\Comments; + use OCP\Comments\IComment; use OCP\Comments\ICommentsManager; use OCP\IUser; diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index 1700af797fe..9ae49d62f33 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -378,7 +378,7 @@ class ManagerTest extends TestCase { $expected = array_reverse($expected); } - $this->assertSame($expected, array_map(function(IComment $c) { + $this->assertSame($expected, array_map(function (IComment $c) { return (int) $c->getId(); }, $comments)); } diff --git a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php index 31c52ea80e1..6883ed2f98c 100644 --- a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php @@ -76,13 +76,13 @@ class ActionProviderStoreTest extends TestCase { 'contactsmenu' => [ 'OCA\Contacts\Provider1', ], - ]); + ]); $this->serverContainer->expects($this->exactly(2)) ->method('query') ->willReturnMap([ - [EMailProvider::class, true, $provider1], - ['OCA\Contacts\Provider1', true, $provider2] - ]); + [EMailProvider::class, true, $provider1], + ['OCA\Contacts\Provider1', true, $provider2] + ]); $providers = $this->actionProviderStore->getProviders($user); @@ -105,8 +105,8 @@ class ActionProviderStoreTest extends TestCase { $this->serverContainer->expects($this->once()) ->method('query') ->willReturnMap([ - [EMailProvider::class, true, $provider1], - ]); + [EMailProvider::class, true, $provider1], + ]); $providers = $this->actionProviderStore->getProviders($user); diff --git a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php index 82619fb5679..245c89c3228 100644 --- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php @@ -73,7 +73,7 @@ class ContactsStoreTest extends TestCase { 'darren@roner.au' ], ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); @@ -83,7 +83,7 @@ class ContactsStoreTest extends TestCase { $this->assertCount(2, $entries); $this->assertEquals([ 'darren@roner.au' - ], $entries[1]->getEMailAddresses()); + ], $entries[1]->getEMailAddresses()); } public function testGetContactsHidesOwnEntry() { @@ -103,7 +103,7 @@ class ContactsStoreTest extends TestCase { 'darren@roner.au' ], ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); @@ -131,7 +131,7 @@ class ContactsStoreTest extends TestCase { ], 'PHOTO' => base64_encode('photophotophoto'), ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); @@ -160,7 +160,7 @@ class ContactsStoreTest extends TestCase { ], 'PHOTO' => 'VALUE=uri:https://photo', ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); diff --git a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php index 85ffd1e72b1..ac90260d161 100644 --- a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php +++ b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php @@ -67,7 +67,7 @@ class EMailproviderTest extends TestCase { ->method('getEMailAddresses') ->willReturn([ 'user@example.com', - ]); + ]); $this->actionFactory->expects($this->once()) ->method('newEMailAction') ->with($this->equalTo($iconUrl), $this->equalTo('user@example.com'), $this->equalTo('user@example.com')) @@ -94,7 +94,7 @@ class EMailproviderTest extends TestCase { ->method('getEMailAddresses') ->willReturn([ '', - ]); + ]); $this->actionFactory->expects($this->never()) ->method('newEMailAction'); $entry->expects($this->never()) diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php index 5437ca3fbaf..099f27ce07b 100644 --- a/tests/lib/ContactsManagerTest.php +++ b/tests/lib/ContactsManagerTest.php @@ -14,7 +14,7 @@ class ContactsManagerTest extends \Test\TestCase { $this->cm = new \OC\ContactsManager(); } - public function searchProvider(){ + public function searchProvider() { $search1 = [ 0 => [ 'N' => [0 => '', 1 => 'Jan', 2 => 'Jansen', 3 => '', 4 => '',], @@ -62,7 +62,7 @@ class ContactsManagerTest extends \Test\TestCase { /** * @dataProvider searchProvider */ - public function testSearch($search1, $search2, $expectedResult ){ + public function testSearch($search1, $search2, $expectedResult) { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook1 = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() @@ -96,7 +96,7 @@ class ContactsManagerTest extends \Test\TestCase { } - public function testDeleteHavePermission(){ + public function testDeleteHavePermission() { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() @@ -116,7 +116,7 @@ class ContactsManagerTest extends \Test\TestCase { $this->assertEquals($result, 'returnMe'); } - public function testDeleteNoPermission(){ + public function testDeleteNoPermission() { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() @@ -134,7 +134,7 @@ class ContactsManagerTest extends \Test\TestCase { $this->assertEquals($result, null); } - public function testDeleteNoAddressbook(){ + public function testDeleteNoAddressbook() { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class ContactsManagerTest extends \Test\TestCase { } - public function testCreateOrUpdateHavePermission(){ + public function testCreateOrUpdateHavePermission() { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() @@ -168,7 +168,7 @@ class ContactsManagerTest extends \Test\TestCase { $this->assertEquals($result, 'returnMe'); } - public function testCreateOrUpdateNoPermission(){ + public function testCreateOrUpdateNoPermission() { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() @@ -187,7 +187,7 @@ class ContactsManagerTest extends \Test\TestCase { } - public function testCreateOrUpdateNOAdressbook(){ + public function testCreateOrUpdateNOAdressbook() { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() @@ -201,12 +201,12 @@ class ContactsManagerTest extends \Test\TestCase { $this->assertEquals($result, null); } - public function testIsEnabledIfNot(){ + public function testIsEnabledIfNot() { $result = $this->cm->isEnabled(); $this->assertFalse($result); } - public function testIsEnabledIfSo(){ + public function testIsEnabledIfSo() { /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() diff --git a/tests/lib/DB/DBSchemaTest.php b/tests/lib/DB/DBSchemaTest.php index 5fb68fdf258..4b249d07c45 100644 --- a/tests/lib/DB/DBSchemaTest.php +++ b/tests/lib/DB/DBSchemaTest.php @@ -39,12 +39,12 @@ class DBSchemaTest extends TestCase { $r = '_' . \OC::$server->getSecureRandom()-> generate(4, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS) . '_'; - $content = file_get_contents( $dbfile ); - $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content ); - file_put_contents( $this->schema_file, $content ); - $content = file_get_contents( $dbfile2 ); - $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content ); - file_put_contents( $this->schema_file2, $content ); + $content = file_get_contents($dbfile); + $content = str_replace('*dbprefix*', '*dbprefix*'.$r, $content); + file_put_contents($this->schema_file, $content); + $content = file_get_contents($dbfile2); + $content = str_replace('*dbprefix*', '*dbprefix*'.$r, $content); + file_put_contents($this->schema_file2, $content); $this->table1 = $r.'cntcts_addrsbks'; $this->table2 = $r.'cntcts_cards'; diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php index cd4befdbe52..cf4c746a4dd 100644 --- a/tests/lib/DB/LegacyDBTest.php +++ b/tests/lib/DB/LegacyDBTest.php @@ -62,9 +62,9 @@ class LegacyDBTest extends \Test\TestCase { $dbFile = \OC::$SERVERROOT.'/tests/data/db_structure.xml'; $r = $this->getUniqueID('_', 4).'_'; - $content = file_get_contents( $dbFile ); - $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content ); - file_put_contents( self::$schema_file, $content ); + $content = file_get_contents($dbFile); + $content = str_replace('*dbprefix*', '*dbprefix*'.$r, $content); + file_put_contents(self::$schema_file, $content); OC_DB::createDbFromStructure(self::$schema_file); $this->test_prefix = $r; diff --git a/tests/lib/DB/SchemaDiffTest.php b/tests/lib/DB/SchemaDiffTest.php index 78963698571..c98cf173d8f 100644 --- a/tests/lib/DB/SchemaDiffTest.php +++ b/tests/lib/DB/SchemaDiffTest.php @@ -72,7 +72,7 @@ class SchemaDiffTest extends TestCase { */ public function testZeroChangeOnSchemaMigrations($xml) { - $xml = str_replace( '*dbprefix*', $this->testPrefix, $xml ); + $xml = str_replace('*dbprefix*', $this->testPrefix, $xml); $schemaFile = $this->schemaFile; file_put_contents($schemaFile, $xml); diff --git a/tests/lib/DirectEditing/ManagerTest.php b/tests/lib/DirectEditing/ManagerTest.php index 004292eb47f..ef72a4e81d3 100644 --- a/tests/lib/DirectEditing/ManagerTest.php +++ b/tests/lib/DirectEditing/ManagerTest.php @@ -23,7 +23,7 @@ use Test\TestCase; class CreateEmpty extends ACreateEmpty { public function getId(): string { - return 'createEmpty'; + return 'createEmpty'; } public function getName(): string { @@ -42,7 +42,7 @@ class CreateEmpty extends ACreateEmpty { class Editor implements IEditor { public function getId(): string { - return 'testeditor'; + return 'testeditor'; } public function getName(): string { diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php index 3365b1fedca..8e53c4a92e1 100644 --- a/tests/lib/Encryption/DecryptAllTest.php +++ b/tests/lib/Encryption/DecryptAllTest.php @@ -21,7 +21,6 @@ namespace Test\Encryption; - use OC\Encryption\DecryptAll; use OC\Encryption\Exceptions\DecryptionFailedException; use OC\Encryption\Manager; @@ -178,7 +177,7 @@ class DecryptAllTest extends TestCase { ->with($this->inputInterface, $this->outputInterface, $user) ->willReturn($success); - $callback = function() use ($dummyEncryptionModule) {return $dummyEncryptionModule;}; + $callback = function () use ($dummyEncryptionModule) {return $dummyEncryptionModule;}; $moduleDescription = [ 'id' => 'id', 'displayName' => 'displayName', @@ -284,7 +283,7 @@ class DecryptAllTest extends TestCase { $this->view->expects($this->any())->method('is_dir') ->willReturnCallback( - function($path) { + function ($path) { if ($path === '/user1/files/foo') { return true; } @@ -380,7 +379,7 @@ class DecryptAllTest extends TestCase { $this->view->expects($this->once()) ->method('copy') ->with($path, $path . '.decrypted.42') - ->willReturnCallback(function() { throw new DecryptionFailedException();}); + ->willReturnCallback(function () { throw new DecryptionFailedException();}); $this->view->expects($this->never())->method('rename'); $this->view->expects($this->once()) diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php index 93987a8bb20..3fc18817327 100644 --- a/tests/lib/Encryption/EncryptionWrapperTest.php +++ b/tests/lib/Encryption/EncryptionWrapperTest.php @@ -21,7 +21,6 @@ namespace Test\Encryption; - use OC\Encryption\EncryptionWrapper; use OC\Encryption\Manager; use OC\Memcache\ArrayCache; diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php index 7e21fe881fc..2233c25c8f1 100644 --- a/tests/lib/Encryption/Keys/StorageTest.php +++ b/tests/lib/Encryption/Keys/StorageTest.php @@ -338,7 +338,7 @@ class StorageTest extends TestCase { ->willReturnCallback([$this, 'getUidAndFilenameCallback']); $this->util->expects($this->any()) ->method('isSystemWideMountPoint') - ->willReturnCallback(function($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) { + ->willReturnCallback(function ($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) { if(strpos($path, 'source.txt') !== false) { return $systemWideMountSource; } @@ -369,7 +369,7 @@ class StorageTest extends TestCase { ->willReturnCallback([$this, 'getUidAndFilenameCallback']); $this->util->expects($this->any()) ->method('isSystemWideMountPoint') - ->willReturnCallback(function($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) { + ->willReturnCallback(function ($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) { if(strpos($path, 'source.txt') !== false) { return $systemWideMountSource; } diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php index 6e18cd296a3..5a34e9cb392 100644 --- a/tests/lib/Encryption/ManagerTest.php +++ b/tests/lib/Encryption/ManagerTest.php @@ -60,7 +60,7 @@ class ManagerTest extends TestCase { $em = $this->createMock(IEncryptionModule::class); $em->expects($this->any())->method('getId')->willReturn('id'); $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0'); - $this->manager->registerEncryptionModule('id', 'TestDummyModule0', function() use ($em) {return $em;}); + $this->manager->registerEncryptionModule('id', 'TestDummyModule0', function () use ($em) {return $em;}); $this->assertFalse($this->manager->isEnabled()); } @@ -117,7 +117,7 @@ class ManagerTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->with('core', 'default_encryption_module') - ->willReturnCallback(function() { global $defaultId; return $defaultId; }); + ->willReturnCallback(function () { global $defaultId; return $defaultId; }); $this->addNewEncryptionModule($this->manager, 0); $this->assertCount(1, $this->manager->getEncryptionModules()); @@ -138,7 +138,7 @@ class ManagerTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->with('core', 'default_encryption_module') - ->willReturnCallback(function() { global $defaultId; return $defaultId; }); + ->willReturnCallback(function () { global $defaultId; return $defaultId; }); $this->addNewEncryptionModule($this->manager, 0); $defaultId = 'ID0'; @@ -160,7 +160,7 @@ class ManagerTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->with('core', 'default_encryption_module') - ->willReturnCallback(function() { global $defaultId; return $defaultId; }); + ->willReturnCallback(function () { global $defaultId; return $defaultId; }); $this->addNewEncryptionModule($this->manager, 0); $this->assertCount(1, $this->manager->getEncryptionModules()); @@ -251,7 +251,7 @@ class ManagerTest extends TestCase { ->method('getDisplayName') ->willReturn('TestDummyModule' . $id); /** @var \OCP\Encryption\IEncryptionModule $encryptionModule */ - $manager->registerEncryptionModule('ID' . $id, 'TestDummyModule' . $id, function() use ($encryptionModule) { + $manager->registerEncryptionModule('ID' . $id, 'TestDummyModule' . $id, function () use ($encryptionModule) { return $encryptionModule; }); } diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php index 6328df3dc30..a783c620a5b 100644 --- a/tests/lib/Encryption/UpdateTest.php +++ b/tests/lib/Encryption/UpdateTest.php @@ -21,7 +21,6 @@ namespace Test\Encryption; - use OC\Encryption\Update; use OC\Files\Mount\Manager; use OC\Files\View; @@ -148,7 +147,7 @@ class UpdateTest extends TestCase { } else { $updateMock->expects($this->once()) ->method('getOwnerPath') - ->willReturnCallback(function($path) use ($target) { + ->willReturnCallback(function ($path) use ($target) { $this->assertSame( $target, $path, diff --git a/tests/lib/ErrorHandlerTest.php b/tests/lib/ErrorHandlerTest.php index 179b5c12123..4cea21b4276 100644 --- a/tests/lib/ErrorHandlerTest.php +++ b/tests/lib/ErrorHandlerTest.php @@ -35,7 +35,7 @@ class ErrorHandlerTest extends \Test\TestCase { ['user', 'pass@word'], ['us:er', 'password'], ['user', 'pass:word'], - ]; + ]; } diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index 40d87214aad..dff21491052 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -8,7 +8,6 @@ namespace Test\Files\Cache; - use Doctrine\DBAL\Platforms\MySqlPlatform; use OC\Files\Cache\Cache; use OC\Files\Search\SearchComparison; diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php index d5aad09a8fb..464561681d0 100644 --- a/tests/lib/Files/Cache/QuerySearchHelperTest.php +++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php @@ -200,7 +200,7 @@ class QuerySearchHelperTest extends TestCase { 'mimetype' => 'image/png' ]); - $fileIds = array_map(function($i) use ($fileId) { + $fileIds = array_map(function ($i) use ($fileId) { return $fileId[$i]; }, $fileIds); diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index d98256501b1..39545b542e7 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -46,7 +46,7 @@ class DummyMountProvider implements IMountProvider { * @param IStorageFactory $loader * @return \OCP\Files\Mount\IMountPoint[] */ - public function getMountsForUser(IUser $user, IStorageFactory $loader) { + public function getMountsForUser(IUser $user, IStorageFactory $loader) { return isset($this->mounts[$user->getUID()]) ? $this->mounts[$user->getUID()] : []; } } diff --git a/tests/lib/Files/Mount/MountPointTest.php b/tests/lib/Files/Mount/MountPointTest.php index 800b360415a..976ccc64d70 100644 --- a/tests/lib/Files/Mount/MountPointTest.php +++ b/tests/lib/Files/Mount/MountPointTest.php @@ -51,7 +51,7 @@ class MountPointTest extends \Test\TestCase { ->will($this->throwException(new \Exception('Test storage init exception'))); $called = false; - $wrapper = function($mountPoint, $storage) use ($called) { + $wrapper = function ($mountPoint, $storage) use ($called) { $called = true; }; diff --git a/tests/lib/Files/Mount/MountTest.php b/tests/lib/Files/Mount/MountTest.php index 160545e784c..340e6931c1d 100644 --- a/tests/lib/Files/Mount/MountTest.php +++ b/tests/lib/Files/Mount/MountTest.php @@ -8,7 +8,6 @@ namespace Test\Files\Mount; - use OC\Files\Storage\StorageFactory; use OC\Files\Storage\Wrapper\Wrapper; diff --git a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php index aa3b2519ec1..1a3477090b9 100644 --- a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php +++ b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright Copyright (c) 2019 Robin Appelman <robin@icewind.nl> * @@ -21,7 +23,6 @@ namespace Test\Files\ObjectStore; - use OCP\Files\ObjectStore\IObjectStore; class FailDeleteObjectStore implements IObjectStore { diff --git a/tests/lib/Files/ObjectStore/FailWriteObjectStore.php b/tests/lib/Files/ObjectStore/FailWriteObjectStore.php index 4310d8ba27c..ad2350ea36b 100644 --- a/tests/lib/Files/ObjectStore/FailWriteObjectStore.php +++ b/tests/lib/Files/ObjectStore/FailWriteObjectStore.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl> * diff --git a/tests/lib/Files/ObjectStore/MapperTest.php b/tests/lib/Files/ObjectStore/MapperTest.php index eef308af088..50d3cd553aa 100644 --- a/tests/lib/Files/ObjectStore/MapperTest.php +++ b/tests/lib/Files/ObjectStore/MapperTest.php @@ -21,7 +21,6 @@ namespace Test\Files\ObjectStore; - use OC\Files\ObjectStore\Mapper; use OCP\IUser; diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageOverwrite.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageOverwrite.php index 5e8faed3347..5872056e42d 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStorageOverwrite.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageOverwrite.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); /** * @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl> * diff --git a/tests/lib/Files/SimpleFS/InMemoryFileTest.php b/tests/lib/Files/SimpleFS/InMemoryFileTest.php index 195a5d04a8f..0ba1a9ddc9f 100644 --- a/tests/lib/Files/SimpleFS/InMemoryFileTest.php +++ b/tests/lib/Files/SimpleFS/InMemoryFileTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index ac3880309c0..c50015483fb 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -174,7 +174,7 @@ class EncryptionTest extends Storage { ->disableOriginalConstructor()->getMock(); $this->cache->expects($this->any()) ->method('get') - ->willReturnCallback(function($path) {return ['encrypted' => false, 'path' => $path];}); + ->willReturnCallback(function ($path) {return ['encrypted' => false, 'path' => $path];}); $this->mountManager = $this->createMock(\OC\Files\Mount\Manager::class); $this->mountManager->method('findByStorageId') @@ -253,7 +253,7 @@ class EncryptionTest extends Storage { $cache->expects($this->any()) ->method('get') ->willReturnCallback( - function($path) use ($encrypted) { + function ($path) use ($encrypted) { return ['encrypted' => $encrypted, 'path' => $path, 'size' => 0, 'fileid' => 1]; } ); @@ -387,7 +387,7 @@ class EncryptionTest extends Storage { $this->instance->expects($this->any())->method('fixUnencryptedSize') ->with('/test.txt', $encryptedSize, $unencryptedSize) ->willReturnCallback( - function() use ($failure, $expected) { + function () use ($failure, $expected) { if ($failure) { throw new \Exception(); } else { @@ -645,7 +645,7 @@ class EncryptionTest extends Storage { ->disableOriginalConstructor()->getMock(); $cache->expects($this->any()) ->method('get') - ->willReturnCallback(function($path) use ($isEncrypted) {return ['encrypted' => $isEncrypted, 'path' => $path];}); + ->willReturnCallback(function ($path) use ($isEncrypted) {return ['encrypted' => $isEncrypted, 'path' => $path];}); $instance = $this->getMockBuilder('\OC\Files\Storage\Wrapper\Encryption') ->setConstructorArgs( @@ -737,7 +737,7 @@ class EncryptionTest extends Storage { $storage2->expects($this->any()) ->method('fopen') - ->willReturnCallback(function($path, $mode) { + ->willReturnCallback(function ($path, $mode) { $temp = \OC::$server->getTempManager(); return fopen($temp->getTemporaryFile(), $mode); }); @@ -786,7 +786,7 @@ class EncryptionTest extends Storage { $storage2->expects($this->any()) ->method('fopen') - ->willReturnCallback(function($path, $mode) { + ->willReturnCallback(function ($path, $mode) { $temp = \OC::$server->getTempManager(); return fopen($temp->getTemporaryFile(), $mode); }); @@ -839,7 +839,7 @@ class EncryptionTest extends Storage { * @param bool $copyResult * @param bool $encrypted */ - public function testCopyBetweenStorageVersions($sourceInternalPath, $targetInternalPath, $copyResult, $encrypted) { + public function testCopyBetweenStorageVersions($sourceInternalPath, $targetInternalPath, $copyResult, $encrypted) { $sourceStorage = $this->createMock(\OC\Files\Storage\Storage::class); @@ -1005,7 +1005,7 @@ class EncryptionTest extends Storage { ->method('getEncryptionModule') ->with($fullPath) ->willReturnCallback( - function() use ($encryptionModule) { + function () use ($encryptionModule) { if ($encryptionModule === false) { throw new ModuleDoesNotExistsException(); } diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php index 43114ff70f3..f884aefb7d8 100644 --- a/tests/lib/Files/Stream/EncryptionTest.php +++ b/tests/lib/Files/Stream/EncryptionTest.php @@ -59,7 +59,7 @@ class EncryptionTest extends \Test\TestCase { 'fileid' => 5, 'encryptedVersion' => 2, ]); - $cache->expects($this->any())->method('get')->willReturn($entry ); + $cache->expects($this->any())->method('get')->willReturn($entry); $cache->expects($this->any())->method('update')->with(5, ['encrypted' => 3, 'encryptedVersion' => 3]); @@ -342,7 +342,7 @@ class EncryptionTest extends \Test\TestCase { $encryptionModule->expects($this->any())->method('end')->willReturn(''); $encryptionModule->expects($this->any())->method('isReadable')->willReturn(true); $encryptionModule->expects($this->any())->method('needDetailedAccessList')->willReturn(false); - $encryptionModule->expects($this->any())->method('encrypt')->willReturnCallback(function($data) { + $encryptionModule->expects($this->any())->method('encrypt')->willReturnCallback(function ($data) { // simulate different block size by adding some padding to the data if (isset($data[6125])) { return str_pad($data, 8192, 'X'); @@ -350,7 +350,7 @@ class EncryptionTest extends \Test\TestCase { // last block return $data; }); - $encryptionModule->expects($this->any())->method('decrypt')->willReturnCallback(function($data) { + $encryptionModule->expects($this->any())->method('decrypt')->willReturnCallback(function ($data) { if (isset($data[8191])) { return substr($data, 0, 6126); } diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 3befe64c825..a7ac6c8057d 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -71,7 +71,7 @@ class DetectionTest extends \Test\TestCase { public function dataDetectContent(): array { return [ ['/', 'httpd/unix-directory'], -// ['/data.tar.gz', 'application/x-gzip'], TODO: fix as it fails hard on php7.4 now + // ['/data.tar.gz', 'application/x-gzip'], TODO: fix as it fails hard on php7.4 now ['/data.zip', 'application/zip'], ['/testimage.mp3', 'audio/mpeg'], ['/testimage.png', 'image/png'], @@ -241,7 +241,7 @@ class DetectionTest extends \Test\TestCase { [$this->equalTo('core'), $this->equalTo('filetypes/my.png')] ) ->willReturnCallback( - function($appName, $file) { + function ($appName, $file) { if ($file === 'filetypes/my.png') { return 'my.svg'; } @@ -272,7 +272,7 @@ class DetectionTest extends \Test\TestCase { [$this->equalTo('core'), $this->equalTo('filetypes/file.png')] ) ->willReturnCallback( - function($appName, $file) { + function ($appName, $file) { if ($file === 'filetypes/file.png') { return 'file.svg'; } diff --git a/tests/lib/GlobalScale/ConfigTest.php b/tests/lib/GlobalScale/ConfigTest.php index 5aaed1ed5bd..a9474f12d77 100644 --- a/tests/lib/GlobalScale/ConfigTest.php +++ b/tests/lib/GlobalScale/ConfigTest.php @@ -21,7 +21,6 @@ namespace Test\GlobalScale; - use OC\GlobalScale\Config; use OCP\IConfig; use Test\TestCase; diff --git a/tests/lib/Group/Dummy.php b/tests/lib/Group/Dummy.php index 3be04159938..d687b6a3dda 100644 --- a/tests/lib/Group/Dummy.php +++ b/tests/lib/Group/Dummy.php @@ -1,24 +1,24 @@ <?php /** -* ownCloud -* -* @author Robin Appelman -* @copyright 2012 Robin Appelman icewind@owncloud.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud + * + * @author Robin Appelman + * @copyright 2012 Robin Appelman icewind@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ namespace Test\Group; diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index 73b315ac297..9437e62996c 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -91,7 +91,7 @@ class ManagerTest extends TestCase { ->getMock(); $backend->expects($this->any()) ->method('implementsActions') - ->willReturnCallback(function($actions) use ($implementedActions) { + ->willReturnCallback(function ($actions) use ($implementedActions) { return (bool)($actions & $implementedActions); }); return $backend; @@ -546,11 +546,11 @@ class ManagerTest extends TestCase { $backend->expects($this->any()) ->method('inGroup') - ->willReturnCallback(function($uid, $gid) { + ->willReturnCallback(function ($uid, $gid) { switch($uid) { - case 'user1' : return false; - case 'user2' : return true; - case 'user3' : return false; + case 'user1': return false; + case 'user2': return true; + case 'user3': return false; case 'user33': return true; default: return null; @@ -560,21 +560,21 @@ class ManagerTest extends TestCase { $this->userManager->expects($this->any()) ->method('searchDisplayName') ->with('user3') - ->willReturnCallback(function($search, $limit, $offset) { + ->willReturnCallback(function ($search, $limit, $offset) { switch($offset) { - case 0 : return ['user3' => $this->getTestUser('user3'), - 'user33' => $this->getTestUser('user33')]; - case 2 : return []; + case 0: return ['user3' => $this->getTestUser('user3'), + 'user33' => $this->getTestUser('user33')]; + case 2: return []; } return null; }); $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch($uid) { - case 'user1' : return $this->getTestUser('user1'); - case 'user2' : return $this->getTestUser('user2'); - case 'user3' : return $this->getTestUser('user3'); + case 'user1': return $this->getTestUser('user1'); + case 'user2': return $this->getTestUser('user2'); + case 'user3': return $this->getTestUser('user3'); case 'user33': return $this->getTestUser('user33'); default: return null; @@ -604,11 +604,11 @@ class ManagerTest extends TestCase { $backend->expects($this->any()) ->method('inGroup') - ->willReturnCallback(function($uid, $gid) { + ->willReturnCallback(function ($uid, $gid) { switch($uid) { - case 'user1' : return false; - case 'user2' : return true; - case 'user3' : return false; + case 'user1': return false; + case 'user2': return true; + case 'user3': return false; case 'user33': return true; case 'user333': return true; default: @@ -619,21 +619,21 @@ class ManagerTest extends TestCase { $this->userManager->expects($this->any()) ->method('searchDisplayName') ->with('user3') - ->willReturnCallback(function($search, $limit, $offset) { + ->willReturnCallback(function ($search, $limit, $offset) { switch($offset) { - case 0 : return ['user3' => $this->getTestUser('user3'), - 'user33' => $this->getTestUser('user33')]; - case 2 : return ['user333' => $this->getTestUser('user333')]; + case 0: return ['user3' => $this->getTestUser('user3'), + 'user33' => $this->getTestUser('user33')]; + case 2: return ['user333' => $this->getTestUser('user333')]; } return null; }); $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch($uid) { - case 'user1' : return $this->getTestUser('user1'); - case 'user2' : return $this->getTestUser('user2'); - case 'user3' : return $this->getTestUser('user3'); + case 'user1': return $this->getTestUser('user1'); + case 'user2': return $this->getTestUser('user2'); + case 'user3': return $this->getTestUser('user3'); case 'user33': return $this->getTestUser('user33'); case 'user333': return $this->getTestUser('user333'); default: @@ -665,11 +665,11 @@ class ManagerTest extends TestCase { $backend->expects($this->any()) ->method('inGroup') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch($uid) { - case 'user1' : return false; - case 'user2' : return true; - case 'user3' : return false; + case 'user1': return false; + case 'user2': return true; + case 'user3': return false; case 'user33': return true; case 'user333': return true; default: @@ -680,9 +680,9 @@ class ManagerTest extends TestCase { $this->userManager->expects($this->any()) ->method('searchDisplayName') ->with('user3') - ->willReturnCallback(function($search, $limit, $offset) { + ->willReturnCallback(function ($search, $limit, $offset) { switch($offset) { - case 0 : + case 0: return [ 'user3' => $this->getTestUser('user3'), 'user33' => $this->getTestUser('user33'), @@ -693,11 +693,11 @@ class ManagerTest extends TestCase { }); $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch($uid) { - case 'user1' : return $this->getTestUser('user1'); - case 'user2' : return $this->getTestUser('user2'); - case 'user3' : return $this->getTestUser('user3'); + case 'user1': return $this->getTestUser('user1'); + case 'user2': return $this->getTestUser('user2'); + case 'user3': return $this->getTestUser('user3'); case 'user33': return $this->getTestUser('user33'); case 'user333': return $this->getTestUser('user333'); default: @@ -734,11 +734,11 @@ class ManagerTest extends TestCase { $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch($uid) { - case 'user1' : return $this->getTestUser('user1'); - case 'user2' : return $this->getTestUser('user2'); - case 'user3' : return $this->getTestUser('user3'); + case 'user1': return $this->getTestUser('user1'); + case 'user2': return $this->getTestUser('user2'); + case 'user3': return $this->getTestUser('user3'); case 'user33': return $this->getTestUser('user33'); default: return null; @@ -773,11 +773,11 @@ class ManagerTest extends TestCase { $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch($uid) { - case 'user1' : return $this->getTestUser('user1'); - case 'user2' : return $this->getTestUser('user2'); - case 'user3' : return $this->getTestUser('user3'); + case 'user1': return $this->getTestUser('user1'); + case 'user2': return $this->getTestUser('user2'); + case 'user3': return $this->getTestUser('user3'); case 'user33': return $this->getTestUser('user33'); default: return null; @@ -812,11 +812,11 @@ class ManagerTest extends TestCase { $this->userManager->expects($this->any()) ->method('get') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { switch($uid) { - case 'user1' : return $this->getTestUser('user1'); - case 'user2' : return $this->getTestUser('user2'); - case 'user3' : return $this->getTestUser('user3'); + case 'user1': return $this->getTestUser('user1'); + case 'user2': return $this->getTestUser('user2'); + case 'user3': return $this->getTestUser('user3'); case 'user33': return $this->getTestUser('user33'); default: return null; diff --git a/tests/lib/HelperStorageTest.php b/tests/lib/HelperStorageTest.php index 606a527f5c9..22c5658e565 100644 --- a/tests/lib/HelperStorageTest.php +++ b/tests/lib/HelperStorageTest.php @@ -7,6 +7,7 @@ */ namespace Test; + use OC\Files\Storage\Temporary; /** diff --git a/tests/lib/Hooks/ForwardingEmitterTest.php b/tests/lib/Hooks/ForwardingEmitterTest.php index 9b0a51d1bd4..0c073b95573 100644 --- a/tests/lib/Hooks/ForwardingEmitterTest.php +++ b/tests/lib/Hooks/ForwardingEmitterTest.php @@ -7,6 +7,7 @@ */ namespace Test\Hooks; + use OC\Hooks\PublicEmitter; class DummyForwardingEmitter extends \OC\Hooks\ForwardingEmitter { diff --git a/tests/lib/InfoXmlTest.php b/tests/lib/InfoXmlTest.php index 0d528dbb652..30f169eac0b 100644 --- a/tests/lib/InfoXmlTest.php +++ b/tests/lib/InfoXmlTest.php @@ -21,7 +21,6 @@ namespace Test; - /** * Class InfoXmlTest * diff --git a/tests/lib/InitialStateServiceTest.php b/tests/lib/InitialStateServiceTest.php index 2a97f07ac21..6859fbec4f8 100644 --- a/tests/lib/InitialStateServiceTest.php +++ b/tests/lib/InitialStateServiceTest.php @@ -84,7 +84,7 @@ class InitialStateServiceTest extends TestCase { * @dataProvider staticData */ public function testLazyData($value) { - $this->service->provideLazyInitialState('test', 'key', function() use ($value) { + $this->service->provideLazyInitialState('test', 'key', function () use ($value) { return $value; }); $data = $this->service->getInitialStates(); diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index 7a91fcab270..5d86757020f 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -8,7 +8,6 @@ namespace Test; - use OC\App\AppStore\Fetcher\AppFetcher; use OC\Archive\ZIP; use OC\Installer; diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index 7d99316f479..b1b3e4eb029 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -140,7 +140,7 @@ class CheckerTest extends TestCase { ->method('file_put_contents') ->with( $this->equalTo(\OC::$SERVERROOT . '/tests/data/integritycheck/app//appinfo/signature.json'), - $this->callback(function($signature) use ($expectedSignatureFileData) { + $this->callback(function ($signature) use ($expectedSignatureFileData) { $expectedArray = json_decode($expectedSignatureFileData, true); $actualArray = json_decode($signature, true); $this->assertEquals($expectedArray, $actualArray); @@ -170,8 +170,8 @@ class CheckerTest extends TestCase { $expected = [ 'EXCEPTION' => [ - 'class' => 'OC\IntegrityCheck\Exceptions\InvalidSignatureException', - 'message' => 'Signature data not found.', + 'class' => 'OC\IntegrityCheck\Exceptions\InvalidSignatureException', + 'message' => 'Signature data not found.', ], ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp')); @@ -259,10 +259,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Signature could not get verified.', - ], + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Signature could not get verified.', + ], ]; $this->assertEquals($expected, $this->checker->verifyAppSignature('SomeApp')); } @@ -310,20 +310,20 @@ class CheckerTest extends TestCase { $expected = [ 'INVALID_HASH' => [ 'AnotherFile.txt' => [ - 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', - 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', + 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', + 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', ], ], 'FILE_MISSING' => [ 'subfolder/file.txt' => [ - 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', - 'current' => '', + 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', + 'current' => '', ], ], 'EXTRA_FILE' => [ 'UnecessaryFile' => [ - 'expected' => '', - 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', + 'expected' => '', + 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], ], @@ -371,24 +371,24 @@ class CheckerTest extends TestCase { $expected = [ - 'INVALID_HASH' => [ - 'AnotherFile.txt' => [ - 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', - 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', - ], + 'INVALID_HASH' => [ + 'AnotherFile.txt' => [ + 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', + 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', ], - 'FILE_MISSING' => [ - 'subfolder/file.txt' => [ - 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', - 'current' => '', - ], + ], + 'FILE_MISSING' => [ + 'subfolder/file.txt' => [ + 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', + 'current' => '', ], - 'EXTRA_FILE' => [ - 'UnecessaryFile' => [ - 'expected' => '', - 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', - ], + ], + 'EXTRA_FILE' => [ + 'UnecessaryFile' => [ + 'expected' => '', + 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], + ], ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp', \OC::$SERVERROOT . '/tests/data/integritycheck/appWithInvalidData/')); @@ -432,10 +432,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Certificate is not valid for required scope. (Requested: SomeApp, current: CN=AnotherScope)', - ], + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Certificate is not valid for required scope. (Requested: SomeApp, current: CN=AnotherScope)', + ], ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp')); } @@ -546,7 +546,7 @@ class CheckerTest extends TestCase { ->method('file_put_contents') ->with( \OC::$SERVERROOT . '/tests/data/integritycheck/app//core/signature.json', - $this->callback(function($signature) use ($expectedSignatureFileData) { + $this->callback(function ($signature) use ($expectedSignatureFileData) { $expectedArray = json_decode($expectedSignatureFileData, true); $actualArray = json_decode($signature, true); $this->assertEquals($expectedArray, $actualArray); @@ -581,7 +581,7 @@ class CheckerTest extends TestCase { ->method('file_put_contents') ->with( \OC::$SERVERROOT . '/tests/data/integritycheck/htaccessUnmodified//core/signature.json', - $this->callback(function($signature) use ($expectedSignatureFileData) { + $this->callback(function ($signature) use ($expectedSignatureFileData) { $expectedArray = json_decode($expectedSignatureFileData, true); $actualArray = json_decode($signature, true); $this->assertEquals($expectedArray, $actualArray); @@ -611,7 +611,7 @@ class CheckerTest extends TestCase { ->method('file_put_contents') ->with( \OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithInvalidModifiedContent//core/signature.json', - $this->callback(function($signature) use ($expectedSignatureFileData) { + $this->callback(function ($signature) use ($expectedSignatureFileData) { $expectedArray = json_decode($expectedSignatureFileData, true); $actualArray = json_decode($signature, true); $this->assertEquals($expectedArray, $actualArray); @@ -646,7 +646,7 @@ class CheckerTest extends TestCase { ->method('file_put_contents') ->with( \OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithValidModifiedContent/core/signature.json', - $this->callback(function($signature) use ($expectedSignatureFileData) { + $this->callback(function ($signature) use ($expectedSignatureFileData) { $expectedArray = json_decode($expectedSignatureFileData, true); $actualArray = json_decode($signature, true); $this->assertEquals($expectedArray, $actualArray); @@ -781,215 +781,215 @@ class CheckerTest extends TestCase { ->method('getOnlyDefaultAliases') ->willReturn( [ - '_comment' => 'Array of mimetype aliases.', - '_comment2' => 'Any changes you make here will be overwritten on an update of Nextcloud.', - '_comment3' => 'Put any custom mappings in a new file mimetypealiases.json in the config/ folder of Nextcloud', - '_comment4' => 'After any change to mimetypealiases.json run:', - '_comment5' => './occ maintenance:mimetype:update-js', - '_comment6' => 'Otherwise your update won\'t propagate through the system.', - 'application/coreldraw' => 'image', - 'application/epub+zip' => 'text', - 'application/font-sfnt' => 'image', - 'application/font-woff' => 'image', - 'application/gpx+xml' => 'location', - 'application/illustrator' => 'image', - 'application/javascript' => 'text/code', - 'application/json' => 'text/code', - 'application/msaccess' => 'file', - 'application/msexcel' => 'x-office/spreadsheet', - 'application/msonenote' => 'x-office/document', - 'application/mspowerpoint' => 'x-office/presentation', - 'application/msword' => 'x-office/document', - 'application/octet-stream' => 'file', - 'application/postscript' => 'image', - 'application/rss+xml' => 'application/xml', - 'application/vnd.android.package-archive' => 'package/x-generic', - 'application/vnd.lotus-wordpro' => 'x-office/document', - 'application/vnd.garmin.tcx+xml' => 'location', - 'application/vnd.google-earth.kml+xml' => 'location', - 'application/vnd.google-earth.kmz' => 'location', - 'application/vnd.ms-excel' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-fontobject' => 'image', - 'application/vnd.ms-powerpoint' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', - 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.template' => 'application/vnd.visio', - 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', - 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', - 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.text' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', - 'application/vnd.visio' => 'x-office/document', - 'application/vnd.wordperfect' => 'x-office/document', - 'application/x-7z-compressed' => 'package/x-generic', - 'application/x-bzip2' => 'package/x-generic', - 'application/x-cbr' => 'text', - 'application/x-compressed' => 'package/x-generic', - 'application/x-dcraw' => 'image', - 'application/x-deb' => 'package/x-generic', - 'application/x-fictionbook+xml' => 'text', - 'application/x-font' => 'image', - 'application/x-gimp' => 'image', - 'application/x-gzip' => 'package/x-generic', - 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', - 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', - 'application/x-iwork-pages-sffpages' => 'x-office/document', - 'application/x-mobipocket-ebook' => 'text', - 'application/x-perl' => 'text/code', - 'application/x-photoshop' => 'image', - 'application/x-php' => 'text/code', - 'application/x-rar-compressed' => 'package/x-generic', - 'application/x-tar' => 'package/x-generic', - 'application/x-tex' => 'text', - 'application/xml' => 'text/html', - 'application/yaml' => 'text/code', - 'application/zip' => 'package/x-generic', - 'database' => 'file', - 'httpd/unix-directory' => 'dir', - 'text/css' => 'text/code', - 'text/csv' => 'x-office/spreadsheet', - 'text/html' => 'text/code', - 'text/x-c' => 'text/code', - 'text/x-c++src' => 'text/code', - 'text/x-h' => 'text/code', - 'text/x-java-source' => 'text/code', - 'text/x-ldif' => 'text/code', - 'text/x-python' => 'text/code', - 'text/x-shellscript' => 'text/code', - 'web' => 'text/code', - 'application/internet-shortcut' => 'link', - ]); + '_comment' => 'Array of mimetype aliases.', + '_comment2' => 'Any changes you make here will be overwritten on an update of Nextcloud.', + '_comment3' => 'Put any custom mappings in a new file mimetypealiases.json in the config/ folder of Nextcloud', + '_comment4' => 'After any change to mimetypealiases.json run:', + '_comment5' => './occ maintenance:mimetype:update-js', + '_comment6' => 'Otherwise your update won\'t propagate through the system.', + 'application/coreldraw' => 'image', + 'application/epub+zip' => 'text', + 'application/font-sfnt' => 'image', + 'application/font-woff' => 'image', + 'application/gpx+xml' => 'location', + 'application/illustrator' => 'image', + 'application/javascript' => 'text/code', + 'application/json' => 'text/code', + 'application/msaccess' => 'file', + 'application/msexcel' => 'x-office/spreadsheet', + 'application/msonenote' => 'x-office/document', + 'application/mspowerpoint' => 'x-office/presentation', + 'application/msword' => 'x-office/document', + 'application/octet-stream' => 'file', + 'application/postscript' => 'image', + 'application/rss+xml' => 'application/xml', + 'application/vnd.android.package-archive' => 'package/x-generic', + 'application/vnd.lotus-wordpro' => 'x-office/document', + 'application/vnd.garmin.tcx+xml' => 'location', + 'application/vnd.google-earth.kml+xml' => 'location', + 'application/vnd.google-earth.kmz' => 'location', + 'application/vnd.ms-excel' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-fontobject' => 'image', + 'application/vnd.ms-powerpoint' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', + 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.template' => 'application/vnd.visio', + 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', + 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', + 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.text' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', + 'application/vnd.visio' => 'x-office/document', + 'application/vnd.wordperfect' => 'x-office/document', + 'application/x-7z-compressed' => 'package/x-generic', + 'application/x-bzip2' => 'package/x-generic', + 'application/x-cbr' => 'text', + 'application/x-compressed' => 'package/x-generic', + 'application/x-dcraw' => 'image', + 'application/x-deb' => 'package/x-generic', + 'application/x-fictionbook+xml' => 'text', + 'application/x-font' => 'image', + 'application/x-gimp' => 'image', + 'application/x-gzip' => 'package/x-generic', + 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', + 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', + 'application/x-iwork-pages-sffpages' => 'x-office/document', + 'application/x-mobipocket-ebook' => 'text', + 'application/x-perl' => 'text/code', + 'application/x-photoshop' => 'image', + 'application/x-php' => 'text/code', + 'application/x-rar-compressed' => 'package/x-generic', + 'application/x-tar' => 'package/x-generic', + 'application/x-tex' => 'text', + 'application/xml' => 'text/html', + 'application/yaml' => 'text/code', + 'application/zip' => 'package/x-generic', + 'database' => 'file', + 'httpd/unix-directory' => 'dir', + 'text/css' => 'text/code', + 'text/csv' => 'x-office/spreadsheet', + 'text/html' => 'text/code', + 'text/x-c' => 'text/code', + 'text/x-c++src' => 'text/code', + 'text/x-h' => 'text/code', + 'text/x-java-source' => 'text/code', + 'text/x-ldif' => 'text/code', + 'text/x-python' => 'text/code', + 'text/x-shellscript' => 'text/code', + 'web' => 'text/code', + 'application/internet-shortcut' => 'link', + ]); $this->mimeTypeDetector ->expects($this->once()) ->method('getAllAliases') ->willReturn( [ - '_comment' => 'Array of mimetype aliases.', - '_comment2' => 'Any changes you make here will be overwritten on an update of Nextcloud.', - '_comment3' => 'Put any custom mappings in a new file mimetypealiases.json in the config/ folder of Nextcloud', - '_comment4' => 'After any change to mimetypealiases.json run:', - '_comment5' => './occ maintenance:mimetype:update-js', - '_comment6' => 'Otherwise your update won\'t propagate through the system.', - 'application/coreldraw' => 'image', - 'application/test' => 'image', - 'application/epub+zip' => 'text', - 'application/font-sfnt' => 'image', - 'application/font-woff' => 'image', - 'application/gpx+xml' => 'location', - 'application/illustrator' => 'image', - 'application/javascript' => 'text/code', - 'application/json' => 'text/code', - 'application/msaccess' => 'file', - 'application/msexcel' => 'x-office/spreadsheet', - 'application/msonenote' => 'x-office/document', - 'application/mspowerpoint' => 'x-office/presentation', - 'application/msword' => 'x-office/document', - 'application/octet-stream' => 'file', - 'application/postscript' => 'image', - 'application/rss+xml' => 'application/xml', - 'application/vnd.android.package-archive' => 'package/x-generic', - 'application/vnd.lotus-wordpro' => 'x-office/document', - 'application/vnd.garmin.tcx+xml' => 'location', - 'application/vnd.google-earth.kml+xml' => 'location', - 'application/vnd.google-earth.kmz' => 'location', - 'application/vnd.ms-excel' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-fontobject' => 'image', - 'application/vnd.ms-powerpoint' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', - 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.template' => 'application/vnd.visio', - 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', - 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', - 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.text' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', - 'application/vnd.visio' => 'x-office/document', - 'application/vnd.wordperfect' => 'x-office/document', - 'application/x-7z-compressed' => 'package/x-generic', - 'application/x-bzip2' => 'package/x-generic', - 'application/x-cbr' => 'text', - 'application/x-compressed' => 'package/x-generic', - 'application/x-dcraw' => 'image', - 'application/x-deb' => 'package/x-generic', - 'application/x-fictionbook+xml' => 'text', - 'application/x-font' => 'image', - 'application/x-gimp' => 'image', - 'application/x-gzip' => 'package/x-generic', - 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', - 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', - 'application/x-iwork-pages-sffpages' => 'x-office/document', - 'application/x-mobipocket-ebook' => 'text', - 'application/x-perl' => 'text/code', - 'application/x-photoshop' => 'image', - 'application/x-php' => 'text/code', - 'application/x-rar-compressed' => 'package/x-generic', - 'application/x-tar' => 'package/x-generic', - 'application/x-tex' => 'text', - 'application/xml' => 'text/html', - 'application/yaml' => 'text/code', - 'application/zip' => 'package/x-generic', - 'database' => 'file', - 'httpd/unix-directory' => 'dir', - 'text/css' => 'text/code', - 'text/csv' => 'x-office/spreadsheet', - 'text/html' => 'text/code', - 'text/x-c' => 'text/code', - 'text/x-c++src' => 'text/code', - 'text/x-h' => 'text/code', - 'text/x-java-source' => 'text/code', - 'text/x-ldif' => 'text/code', - 'text/x-python' => 'text/code', - 'text/x-shellscript' => 'text/code', - 'web' => 'text/code', - 'application/internet-shortcut' => 'link', - ]); + '_comment' => 'Array of mimetype aliases.', + '_comment2' => 'Any changes you make here will be overwritten on an update of Nextcloud.', + '_comment3' => 'Put any custom mappings in a new file mimetypealiases.json in the config/ folder of Nextcloud', + '_comment4' => 'After any change to mimetypealiases.json run:', + '_comment5' => './occ maintenance:mimetype:update-js', + '_comment6' => 'Otherwise your update won\'t propagate through the system.', + 'application/coreldraw' => 'image', + 'application/test' => 'image', + 'application/epub+zip' => 'text', + 'application/font-sfnt' => 'image', + 'application/font-woff' => 'image', + 'application/gpx+xml' => 'location', + 'application/illustrator' => 'image', + 'application/javascript' => 'text/code', + 'application/json' => 'text/code', + 'application/msaccess' => 'file', + 'application/msexcel' => 'x-office/spreadsheet', + 'application/msonenote' => 'x-office/document', + 'application/mspowerpoint' => 'x-office/presentation', + 'application/msword' => 'x-office/document', + 'application/octet-stream' => 'file', + 'application/postscript' => 'image', + 'application/rss+xml' => 'application/xml', + 'application/vnd.android.package-archive' => 'package/x-generic', + 'application/vnd.lotus-wordpro' => 'x-office/document', + 'application/vnd.garmin.tcx+xml' => 'location', + 'application/vnd.google-earth.kml+xml' => 'location', + 'application/vnd.google-earth.kmz' => 'location', + 'application/vnd.ms-excel' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-fontobject' => 'image', + 'application/vnd.ms-powerpoint' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', + 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.template' => 'application/vnd.visio', + 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', + 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', + 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.text' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', + 'application/vnd.visio' => 'x-office/document', + 'application/vnd.wordperfect' => 'x-office/document', + 'application/x-7z-compressed' => 'package/x-generic', + 'application/x-bzip2' => 'package/x-generic', + 'application/x-cbr' => 'text', + 'application/x-compressed' => 'package/x-generic', + 'application/x-dcraw' => 'image', + 'application/x-deb' => 'package/x-generic', + 'application/x-fictionbook+xml' => 'text', + 'application/x-font' => 'image', + 'application/x-gimp' => 'image', + 'application/x-gzip' => 'package/x-generic', + 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', + 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', + 'application/x-iwork-pages-sffpages' => 'x-office/document', + 'application/x-mobipocket-ebook' => 'text', + 'application/x-perl' => 'text/code', + 'application/x-photoshop' => 'image', + 'application/x-php' => 'text/code', + 'application/x-rar-compressed' => 'package/x-generic', + 'application/x-tar' => 'package/x-generic', + 'application/x-tex' => 'text', + 'application/xml' => 'text/html', + 'application/yaml' => 'text/code', + 'application/zip' => 'package/x-generic', + 'database' => 'file', + 'httpd/unix-directory' => 'dir', + 'text/css' => 'text/code', + 'text/csv' => 'x-office/spreadsheet', + 'text/html' => 'text/code', + 'text/x-c' => 'text/code', + 'text/x-c++src' => 'text/code', + 'text/x-h' => 'text/code', + 'text/x-java-source' => 'text/code', + 'text/x-ldif' => 'text/code', + 'text/x-python' => 'text/code', + 'text/x-shellscript' => 'text/code', + 'web' => 'text/code', + 'application/internet-shortcut' => 'link', + ]); $this->environmentHelper ->expects($this->any()) @@ -1101,10 +1101,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Signature could not get verified.', - ] + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Signature could not get verified.', + ] ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); } @@ -1148,24 +1148,24 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'INVALID_HASH' => [ - 'AnotherFile.txt' => [ - 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', - 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', - ], + 'INVALID_HASH' => [ + 'AnotherFile.txt' => [ + 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', + 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', ], - 'FILE_MISSING' => [ - 'subfolder/file.txt' => [ - 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', - 'current' => '', - ], + ], + 'FILE_MISSING' => [ + 'subfolder/file.txt' => [ + 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', + 'current' => '', ], - 'EXTRA_FILE' => [ - 'UnecessaryFile' => [ - 'expected' => '', - 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', - ], + ], + 'EXTRA_FILE' => [ + 'UnecessaryFile' => [ + 'expected' => '', + 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], + ], ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); @@ -1210,10 +1210,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Certificate is not valid.', - ] + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Certificate is not valid.', + ] ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); } @@ -1257,10 +1257,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Certificate is not valid for required scope. (Requested: core, current: CN=SomeApp)', - ] + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Certificate is not valid for required scope. (Requested: core, current: CN=SomeApp)', + ] ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); } diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index 4d35aeabc91..33667e26fe8 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -419,7 +419,7 @@ class FactoryTest extends TestCase { ->willReturn($availableLanguages); $factory->expects($this->any()) - ->method('respectDefaultLanguage')->willReturnCallback(function($app, $lang) { + ->method('respectDefaultLanguage')->willReturnCallback(function ($app, $lang) { return $lang; }); @@ -510,7 +510,7 @@ class FactoryTest extends TestCase { $this->config->expects($this->any()) ->method('getSystemValue') - ->willReturnCallback(function($var, $default) use ($defaultLang) { + ->willReturnCallback(function ($var, $default) use ($defaultLang) { if ($var === 'installed') { return true; } else if ($var === 'default_language') { @@ -558,7 +558,7 @@ class FactoryTest extends TestCase { return $availableLang; }); $factory->expects($this->any()) - ->method('respectDefaultLanguage')->willReturnCallback(function($app, $lang) { + ->method('respectDefaultLanguage')->willReturnCallback(function ($app, $lang) { return $lang; }); diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php index b2e7d5ebfc9..0de09386fba 100644 --- a/tests/lib/L10N/L10nTest.php +++ b/tests/lib/L10N/L10nTest.php @@ -8,7 +8,6 @@ namespace Test\L10N; - use DateTime; use OC\L10N\Factory; use OC\L10N\L10N; diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php index 530615f46b4..3ad8f5b8806 100644 --- a/tests/lib/LargeFileHelperGetFileSizeTest.php +++ b/tests/lib/LargeFileHelperGetFileSizeTest.php @@ -9,9 +9,9 @@ namespace Test; /** -* Tests whether LargeFileHelper is able to determine file size at all. -* Large files are not considered yet. -*/ + * Tests whether LargeFileHelper is able to determine file size at all. + * Large files are not considered yet. + */ class LargeFileHelperGetFileSizeTest extends TestCase { /** @var string */ protected $filename; diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php index f6e85ea188c..a2c2e011254 100644 --- a/tests/lib/LegacyHelperTest.php +++ b/tests/lib/LegacyHelperTest.php @@ -54,7 +54,7 @@ class LegacyHelperTest extends \Test\TestCase { $this->assertEquals($expected, $result); } - function providesComputerFileSize(){ + function providesComputerFileSize() { return [ [0.0, "0 B"], [1024.0, "1 KB"], @@ -69,11 +69,11 @@ class LegacyHelperTest extends \Test\TestCase { $arrayStart = [ "Foo" => "bar", "Bar" => "foo", - ]; + ]; $arrayResult = [ "foo" => "bar", "bar" => "foo", - ]; + ]; $result = OC_Helper::mb_array_change_key_case($arrayStart); $expected = $arrayResult; $this->assertEquals($result, $expected); @@ -81,11 +81,11 @@ class LegacyHelperTest extends \Test\TestCase { $arrayStart = [ "foo" => "bar", "bar" => "foo", - ]; + ]; $arrayResult = [ "FOO" => "bar", "BAR" => "foo", - ]; + ]; $result = OC_Helper::mb_array_change_key_case($arrayStart, MB_CASE_UPPER); $expected = $arrayResult; $this->assertEquals($result, $expected); @@ -95,7 +95,7 @@ class LegacyHelperTest extends \Test\TestCase { $haystack = [ "Foo" => "own", "Bar" => "Cloud", - ]; + ]; $result = OC_Helper::recursiveArraySearch($haystack, "own"); $expected = "Foo"; diff --git a/tests/lib/Lockdown/LockdownManagerTest.php b/tests/lib/Lockdown/LockdownManagerTest.php index 7b52994d381..2f9a410b7e3 100644 --- a/tests/lib/Lockdown/LockdownManagerTest.php +++ b/tests/lib/Lockdown/LockdownManagerTest.php @@ -32,7 +32,7 @@ class LockdownManagerTest extends TestCase { protected function setUp(): void { parent::setUp(); - $this->sessionCallback = function() { + $this->sessionCallback = function () { return $this->createMock(ISession::class); }; } diff --git a/tests/lib/Log/FileTest.php b/tests/lib/Log/FileTest.php index 0bbcdc0a23c..35e118bf3b9 100644 --- a/tests/lib/Log/FileTest.php +++ b/tests/lib/Log/FileTest.php @@ -47,7 +47,7 @@ class FileTest extends TestCase $config->getValue("logfile", $this->restore_logfile); } else { $config->deleteValue("logfile"); - } + } if (isset($this->restore_logdateformat)) { $config->getValue("logdateformat", $this->restore_logdateformat); } else { diff --git a/tests/lib/Log/LogFactoryTest.php b/tests/lib/Log/LogFactoryTest.php index 4a3997dbf20..e4725a3bc1a 100644 --- a/tests/lib/Log/LogFactoryTest.php +++ b/tests/lib/Log/LogFactoryTest.php @@ -23,6 +23,7 @@ */ namespace Test\Log; + use OC\Log\Errorlog; use OC\Log\File; use OC\Log\LogFactory; diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php index fd695c8c68d..99743ab95bd 100644 --- a/tests/lib/LoggerTest.php +++ b/tests/lib/LoggerTest.php @@ -176,7 +176,7 @@ class LoggerTest extends TestCase implements IWriter { * @dataProvider userAndPasswordData */ public function testDetectclosure(string $user, string $password): void { - $a = function($user, $password) { + $a = function ($user, $password) { throw new \Exception('test'); }; $this->registry->expects($this->once()) diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 8d169d598c9..bf469e87b94 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -11,7 +11,6 @@ namespace Test\Mail; - use OC\Mail\EMailTemplate; use OC\Mail\Mailer; use OC\Mail\Message; diff --git a/tests/lib/Memcache/RedisTest.php b/tests/lib/Memcache/RedisTest.php index e6a940599d7..d5bf10e7af9 100644 --- a/tests/lib/Memcache/RedisTest.php +++ b/tests/lib/Memcache/RedisTest.php @@ -23,7 +23,7 @@ class RedisTest extends Cache { $errorOccurred = false; set_error_handler( - function($errno, $errstr) { + function ($errno, $errstr) { throw new \RuntimeException($errstr, 123456789); }, E_WARNING diff --git a/tests/lib/MemoryInfoTest.php b/tests/lib/MemoryInfoTest.php index 489ef51d373..8feb4b6332d 100644 --- a/tests/lib/MemoryInfoTest.php +++ b/tests/lib/MemoryInfoTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** diff --git a/tests/lib/NaturalSortTest.php b/tests/lib/NaturalSortTest.php index 1408a64dadd..30e439655d7 100644 --- a/tests/lib/NaturalSortTest.php +++ b/tests/lib/NaturalSortTest.php @@ -25,8 +25,8 @@ class NaturalSortTest extends \Test\TestCase { } /** - * @dataProvider defaultCollatorDataProvider - */ + * @dataProvider defaultCollatorDataProvider + */ public function testDefaultCollatorCompare($array, $sorted) { $comparator = new \OC\NaturalSort(new \OC\NaturalSort_DefaultCollator()); @@ -190,10 +190,10 @@ class NaturalSortTest extends \Test\TestCase { } /** - * Data provider for natural sorting with \OC\NaturalSort_DefaultCollator. - * Must provide the same result as in core/js/tests/specs/coreSpec.js - * @return array test cases - */ + * Data provider for natural sorting with \OC\NaturalSort_DefaultCollator. + * Must provide the same result as in core/js/tests/specs/coreSpec.js + * @return array test cases + */ public function defaultCollatorDataProvider() { return [ diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 74cb3948c5e..e2ab0e3fddc 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -228,9 +228,9 @@ class NavigationManagerTest extends TestCase { $this->userSession->expects($this->any())->method('getUser')->willReturn($user); $this->userSession->expects($this->any())->method('isLoggedIn')->willReturn(true); $this->appManager->expects($this->once()) - ->method('getEnabledAppsForUser') - ->with($user) - ->willReturn(['test']); + ->method('getEnabledAppsForUser') + ->with($user) + ->willReturn(['test']); $this->groupManager->expects($this->any())->method('isAdmin')->willReturn($isAdmin); $subadmin = $this->createMock(SubAdmin::class); $subadmin->expects($this->any())->method('isSubAdmin')->with($user)->willReturn(false); diff --git a/tests/lib/Notification/ActionTest.php b/tests/lib/Notification/ActionTest.php index 1923f2305e1..6016760c24f 100644 --- a/tests/lib/Notification/ActionTest.php +++ b/tests/lib/Notification/ActionTest.php @@ -21,7 +21,6 @@ namespace Test\Notification; - use OC\Notification\Action; use OCP\Notification\IAction; use Test\TestCase; diff --git a/tests/lib/Notification/DummyApp.php b/tests/lib/Notification/DummyApp.php index 680fb44d009..b1281f6b7a0 100644 --- a/tests/lib/Notification/DummyApp.php +++ b/tests/lib/Notification/DummyApp.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Joas Schilling <coding@schilljs.com> @@ -22,7 +23,6 @@ declare(strict_types=1); namespace Test\Notification; - use OCP\Notification\IApp; use OCP\Notification\INotification; diff --git a/tests/lib/Notification/DummyNotifier.php b/tests/lib/Notification/DummyNotifier.php index 849fb3c275f..92c1ddfb310 100644 --- a/tests/lib/Notification/DummyNotifier.php +++ b/tests/lib/Notification/DummyNotifier.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019 Joas Schilling <coding@schilljs.com> @@ -22,7 +23,6 @@ declare(strict_types=1); namespace Test\Notification; - use OCP\Notification\AlreadyProcessedException; use OCP\Notification\INotification; use OCP\Notification\INotifier; diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php index c70fa1ec7df..12c6818588c 100644 --- a/tests/lib/Notification/NotificationTest.php +++ b/tests/lib/Notification/NotificationTest.php @@ -1,4 +1,5 @@ <?php + declare (strict_types = 1); /** * @author Joas Schilling <nickvergessen@owncloud.com> @@ -22,7 +23,6 @@ declare (strict_types = 1); namespace Test\Notification; - use OC\Notification\Notification; use OCP\Notification\IAction; use OCP\Notification\INotification; diff --git a/tests/lib/OCS/DiscoveryServiceTest.php b/tests/lib/OCS/DiscoveryServiceTest.php index 710d683841f..4b31de3f0a3 100644 --- a/tests/lib/OCS/DiscoveryServiceTest.php +++ b/tests/lib/OCS/DiscoveryServiceTest.php @@ -21,7 +21,6 @@ namespace Test\OCS; - use OC\OCS\DiscoveryService; use OCP\Http\Client\IClientService; use OCP\ICacheFactory; diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index ae84d8eb4b3..80293102631 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -112,7 +112,7 @@ class GeneratorTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo(IPreview::EVENT), - $this->callback(function(GenericEvent $event) use ($file) { + $this->callback(function (GenericEvent $event) use ($file) { return $event->getSubject() === $file && $event->getArgument('width') === 100 && $event->getArgument('height') === 100; @@ -146,7 +146,7 @@ class GeneratorTest extends \Test\TestCase { ->willReturn($previewFolder); $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $defult) { + ->willReturnCallback(function ($key, $defult) { return $defult; }); @@ -168,7 +168,7 @@ class GeneratorTest extends \Test\TestCase { ]); $this->helper->method('getProvider') - ->willReturnCallback(function($provider) use ($invalidProvider, $validProvider, $unavailableProvider) { + ->willReturnCallback(function ($provider) use ($invalidProvider, $validProvider, $unavailableProvider) { if ($provider === 'wrongProvider') { $this->fail('Wrongprovider should not be constructed!'); } else if ($provider === 'brokenProvider') { @@ -210,7 +210,7 @@ class GeneratorTest extends \Test\TestCase { $previewFolder->method('getDirectoryListing') ->willReturn([]); $previewFolder->method('newFile') - ->willReturnCallback(function($filename) use ($maxPreview, $previewFile) { + ->willReturnCallback(function ($filename) use ($maxPreview, $previewFile) { if ($filename === '2048-2048-max.png') { return $maxPreview; } else if ($filename === '256-256.png') { @@ -248,7 +248,7 @@ class GeneratorTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo(IPreview::EVENT), - $this->callback(function(GenericEvent $event) use ($file) { + $this->callback(function (GenericEvent $event) use ($file) { return $event->getSubject() === $file && $event->getArgument('width') === 100 && $event->getArgument('height') === 100; @@ -274,7 +274,7 @@ class GeneratorTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo(IPreview::EVENT), - $this->callback(function(GenericEvent $event) use ($file) { + $this->callback(function (GenericEvent $event) use ($file) { return $event->getSubject() === $file && $event->getArgument('width') === 0 && $event->getArgument('height') === 0 && @@ -314,7 +314,7 @@ class GeneratorTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo(IPreview::EVENT), - $this->callback(function(GenericEvent $event) use ($file) { + $this->callback(function (GenericEvent $event) use ($file) { return $event->getSubject() === $file && $event->getArgument('width') === 100 && $event->getArgument('height') === 100; @@ -427,7 +427,7 @@ class GeneratorTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo(IPreview::EVENT), - $this->callback(function(GenericEvent $event) use ($file, $reqX, $reqY, $crop, $mode) { + $this->callback(function (GenericEvent $event) use ($file, $reqX, $reqY, $crop, $mode) { return $event->getSubject() === $file && $event->getArgument('width') === $reqX && $event->getArgument('height') === $reqY && diff --git a/tests/lib/Preview/HEICTest.php b/tests/lib/Preview/HEICTest.php index f75ae3192a1..ea937f4df3c 100644 --- a/tests/lib/Preview/HEICTest.php +++ b/tests/lib/Preview/HEICTest.php @@ -31,7 +31,7 @@ namespace Test\Preview; class HEICTest extends Provider { protected function setUp(): void { - if ( !in_array("HEIC", \Imagick::queryFormats("HEI*")) ) { + if (!in_array("HEIC", \Imagick::queryFormats("HEI*"))) { $this->markTestSkipped('ImageMagick is not HEIC aware. Skipping tests'); } else { parent::setUp(); diff --git a/tests/lib/PublicNamespace/UtilTest.php b/tests/lib/PublicNamespace/UtilTest.php index 7892501aaa0..e4e830468f2 100644 --- a/tests/lib/PublicNamespace/UtilTest.php +++ b/tests/lib/PublicNamespace/UtilTest.php @@ -21,13 +21,12 @@ namespace Test\PublicNamespace; - class UtilTest extends \Test\TestCase { /** - * @dataProvider channelProvider - * - * @param string $channel - */ + * @dataProvider channelProvider + * + * @param string $channel + */ public function testOverrideChannel($channel) { \OCP\Util::setChannel($channel); $actual = \OCP\Util::getChannel($channel); diff --git a/tests/lib/Remote/InstanceTest.php b/tests/lib/Remote/InstanceTest.php index 0adb608d875..3ec7451263d 100644 --- a/tests/lib/Remote/InstanceTest.php +++ b/tests/lib/Remote/InstanceTest.php @@ -21,7 +21,6 @@ namespace Test\Remote; - use OC\Memcache\ArrayCache; use OC\Remote\Instance; use OCP\ICache; diff --git a/tests/lib/Repair/CleanTagsTest.php b/tests/lib/Repair/CleanTagsTest.php index 5ff13beba76..b724891cda7 100644 --- a/tests/lib/Repair/CleanTagsTest.php +++ b/tests/lib/Repair/CleanTagsTest.php @@ -7,6 +7,7 @@ */ namespace Test\Repair; + use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IUserManager; use OCP\Migration\IOutput; diff --git a/tests/lib/Repair/ClearFrontendCachesTest.php b/tests/lib/Repair/ClearFrontendCachesTest.php index ea33d331c4d..9acd1f4df17 100644 --- a/tests/lib/Repair/ClearFrontendCachesTest.php +++ b/tests/lib/Repair/ClearFrontendCachesTest.php @@ -22,6 +22,7 @@ */ namespace Test\Repair; + use OC\Template\JSCombiner; use OC\Template\SCSSCacher; use OCP\ICache; diff --git a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php index 218a59caa3b..30df6474b80 100644 --- a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php +++ b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php @@ -73,9 +73,9 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase { */ public function testShouldRun($from, $expected) { $this->config->expects($this->any()) - ->method('getSystemValue') - ->with('version', '0.0.0.0') - ->willReturn($from); + ->method('getSystemValue') + ->with('version', '0.0.0.0') + ->willReturn($from); $this->assertEquals($expected, $this->invokePrivate($this->repair, 'shouldRun')); } diff --git a/tests/lib/Repair/RepairInvalidSharesTest.php b/tests/lib/Repair/RepairInvalidSharesTest.php index ed25a81ca1f..23e6b2dad5f 100644 --- a/tests/lib/Repair/RepairInvalidSharesTest.php +++ b/tests/lib/Repair/RepairInvalidSharesTest.php @@ -8,7 +8,6 @@ namespace Test\Repair; - use OC\Repair\RepairInvalidShares; use OC\Share\Constants; use OCP\IConfig; diff --git a/tests/lib/Repair/RepairSqliteAutoincrementTest.php b/tests/lib/Repair/RepairSqliteAutoincrementTest.php index 66b30ca033f..c740384fc0f 100644 --- a/tests/lib/Repair/RepairSqliteAutoincrementTest.php +++ b/tests/lib/Repair/RepairSqliteAutoincrementTest.php @@ -7,6 +7,7 @@ */ namespace Test\Repair; + use OCP\Migration\IOutput; /** diff --git a/tests/lib/RichObjectStrings/DefinitionsTest.php b/tests/lib/RichObjectStrings/DefinitionsTest.php index 829689704e7..acf5256a7f3 100644 --- a/tests/lib/RichObjectStrings/DefinitionsTest.php +++ b/tests/lib/RichObjectStrings/DefinitionsTest.php @@ -21,7 +21,6 @@ namespace Test\RichObjectStrings; - use OCP\RichObjectStrings\Definitions; use Test\TestCase; diff --git a/tests/lib/RichObjectStrings/ValidatorTest.php b/tests/lib/RichObjectStrings/ValidatorTest.php index 0c344248f77..63ad22c8200 100644 --- a/tests/lib/RichObjectStrings/ValidatorTest.php +++ b/tests/lib/RichObjectStrings/ValidatorTest.php @@ -21,7 +21,6 @@ namespace Test\RichObjectStrings; - use OC\RichObjectStrings\Validator; use OCP\RichObjectStrings\Definitions; use Test\TestCase; diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php index 5e0db3bf24c..1c58849c9f8 100644 --- a/tests/lib/Security/Bruteforce/ThrottlerTest.php +++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php @@ -185,7 +185,7 @@ class ThrottlerTest extends TestCase { ->willReturn($enabled); $this->config->method('getAppValue') - ->willReturnCallback(function($app, $key, $default) use ($whitelists) { + ->willReturnCallback(function ($app, $key, $default) use ($whitelists) { if ($app !== 'bruteForce') { return $default; } diff --git a/tests/lib/Security/CSP/AddContentSecurityPolicyEventTest.php b/tests/lib/Security/CSP/AddContentSecurityPolicyEventTest.php index 01227ec359a..ef894bb56f3 100644 --- a/tests/lib/Security/CSP/AddContentSecurityPolicyEventTest.php +++ b/tests/lib/Security/CSP/AddContentSecurityPolicyEventTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php index c4749513140..21e29c910c4 100644 --- a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php +++ b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php @@ -21,7 +21,6 @@ namespace Test\Security\CSP; - use OC\Security\CSP\ContentSecurityPolicyManager; use OCP\EventDispatcher\IEventDispatcher; use OCP\Security\CSP\AddContentSecurityPolicyEvent; @@ -80,7 +79,7 @@ class ContentSecurityPolicyManagerTest extends TestCase { } public function testGetDefaultPolicyWithPoliciesViaEvent() { - $this->dispatcher->addListener(AddContentSecurityPolicyEvent::class, function(AddContentSecurityPolicyEvent $e) { + $this->dispatcher->addListener(AddContentSecurityPolicyEvent::class, function (AddContentSecurityPolicyEvent $e) { $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(); $policy->addAllowedFontDomain('mydomain.com'); $policy->addAllowedImageDomain('anotherdomain.de'); @@ -88,7 +87,7 @@ class ContentSecurityPolicyManagerTest extends TestCase { $e->addPolicy($policy); }); - $this->dispatcher->addListener(AddContentSecurityPolicyEvent::class, function(AddContentSecurityPolicyEvent $e) { + $this->dispatcher->addListener(AddContentSecurityPolicyEvent::class, function (AddContentSecurityPolicyEvent $e) { $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(); $policy->addAllowedFontDomain('example.com'); $policy->addAllowedImageDomain('example.org'); @@ -97,7 +96,7 @@ class ContentSecurityPolicyManagerTest extends TestCase { $e->addPolicy($policy); }); - $this->dispatcher->addListener(AddContentSecurityPolicyEvent::class, function(AddContentSecurityPolicyEvent $e) { + $this->dispatcher->addListener(AddContentSecurityPolicyEvent::class, function (AddContentSecurityPolicyEvent $e) { $policy = new \OCP\AppFramework\Http\EmptyContentSecurityPolicy(); $policy->addAllowedChildSrcDomain('childdomain'); $policy->addAllowedFontDomain('anotherFontDomain'); diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 5d8e66bb99b..579a15f483a 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -181,7 +181,7 @@ class CertificateManagerTest extends \Test\TestCase { } $view->expects($this->any())->method('filemtime') - ->willReturnCallback(function($path) use ($systemWideMtime, $targetBundleMtime) { + ->willReturnCallback(function ($path) use ($systemWideMtime, $targetBundleMtime) { if ($path === 'SystemBundlePath') { return $systemWideMtime; } elseif ($path === 'targetBundlePath') { diff --git a/tests/lib/Security/FeaturePolicy/AddFeaturePolicyEventTest.php b/tests/lib/Security/FeaturePolicy/AddFeaturePolicyEventTest.php index 75525c306ca..6e6433adbeb 100644 --- a/tests/lib/Security/FeaturePolicy/AddFeaturePolicyEventTest.php +++ b/tests/lib/Security/FeaturePolicy/AddFeaturePolicyEventTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php b/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php index d2be124a482..15bbc803f5a 100644 --- a/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php +++ b/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> @@ -50,7 +51,7 @@ class FeaturePolicyManagerTest extends TestCase { } public function testGetDefaultPolicyWithPoliciesViaEvent() { - $this->dispatcher->addListener(AddFeaturePolicyEvent::class, function(AddFeaturePolicyEvent $e) { + $this->dispatcher->addListener(AddFeaturePolicyEvent::class, function (AddFeaturePolicyEvent $e) { $policy = new FeaturePolicy(); $policy->addAllowedMicrophoneDomain('mydomain.com'); $policy->addAllowedPaymentDomain('mypaymentdomain.com'); @@ -58,7 +59,7 @@ class FeaturePolicyManagerTest extends TestCase { $e->addPolicy($policy); }); - $this->dispatcher->addListener(AddFeaturePolicyEvent::class, function(AddFeaturePolicyEvent $e) { + $this->dispatcher->addListener(AddFeaturePolicyEvent::class, function (AddFeaturePolicyEvent $e) { $policy = new FeaturePolicy(); $policy->addAllowedPaymentDomain('mydomainother.com'); $policy->addAllowedGeoLocationDomain('mylocation.here'); @@ -66,7 +67,7 @@ class FeaturePolicyManagerTest extends TestCase { $e->addPolicy($policy); }); - $this->dispatcher->addListener(AddFeaturePolicyEvent::class, function(AddFeaturePolicyEvent $e) { + $this->dispatcher->addListener(AddFeaturePolicyEvent::class, function (AddFeaturePolicyEvent $e) { $policy = new FeaturePolicy(); $policy->addAllowedAutoplayDomain('youtube.com'); diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index fbedad61fd7..ada25247393 100644 --- a/tests/lib/ServerTest.php +++ b/tests/lib/ServerTest.php @@ -23,6 +23,7 @@ */ namespace Test; + use OC\App\AppStore\Fetcher\AppFetcher; use OC\App\AppStore\Fetcher\CategoryFetcher; diff --git a/tests/lib/Share/Backend.php b/tests/lib/Share/Backend.php index 1a443229dff..72451d54567 100644 --- a/tests/lib/Share/Backend.php +++ b/tests/lib/Share/Backend.php @@ -1,23 +1,23 @@ <?php /** -* ownCloud -* -* @author Michael Gapczynski -* @copyright 2012 Michael Gapczynski mtgap@owncloud.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ + * ownCloud + * + * @author Michael Gapczynski + * @copyright 2012 Michael Gapczynski mtgap@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ namespace Test\Share; diff --git a/tests/lib/Share/HelperTest.php b/tests/lib/Share/HelperTest.php index 2056e6bd1e2..941cb5b737d 100644 --- a/tests/lib/Share/HelperTest.php +++ b/tests/lib/Share/HelperTest.php @@ -1,23 +1,23 @@ <?php /** -* ownCloud -* -* @author Bjoern Schiessle -* @copyright 2014 Bjoern Schiessle <schiessle@owncloud.com> -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ + * ownCloud + * + * @author Bjoern Schiessle + * @copyright 2014 Bjoern Schiessle <schiessle@owncloud.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ namespace Test\Share; diff --git a/tests/lib/Share/SearchResultSorterTest.php b/tests/lib/Share/SearchResultSorterTest.php index 17869436428..63c3aead62e 100644 --- a/tests/lib/Share/SearchResultSorterTest.php +++ b/tests/lib/Share/SearchResultSorterTest.php @@ -1,23 +1,23 @@ <?php /** -* ownCloud -* -* @author Arthur Schiwon -* @copyright 2014 Arthur Schiwon <blizzz@owncloud.com> -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ + * ownCloud + * + * @author Arthur Schiwon + * @copyright 2014 Arthur Schiwon <blizzz@owncloud.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ namespace Test\Share; diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php index c4464efa5dd..b90e18a6238 100644 --- a/tests/lib/Share/ShareTest.php +++ b/tests/lib/Share/ShareTest.php @@ -1,25 +1,26 @@ <?php /** -* ownCloud -* -* @author Michael Gapczynski -* @copyright 2012 Michael Gapczynski mtgap@owncloud.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ + * ownCloud + * + * @author Michael Gapczynski + * @copyright 2012 Michael Gapczynski mtgap@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ namespace Test\Share; + use OC\Share\Share; use OCP\IGroup; use OCP\IGroupManager; @@ -276,44 +277,44 @@ class ShareTest extends \Test\TestCase { [ // input ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'], ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'], - ], + ], [ // expected result ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1', 'grouped' => [ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'], ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'], - ] - ], - ] - ], + ] + ], + ] + ], // two shares both point to the same source but with different targets [ [ // input ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'], ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'], - ], + ], [ // expected result ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'], ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'], - ] - ], + ] + ], // three shares two point to the same source [ [ // input ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'], ['item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'], ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'], - ], + ], [ // expected result ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1', 'grouped' => [ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'], ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'], - ] - ], + ] + ], ['item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'], - ] - ], + ] + ], ]; } } diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 396f0cbad84..c0a869d0793 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -302,7 +302,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->rootFolder ->method('getUserFolder') ->willReturnMap([ - ['shareOwner', $shareOwnerFolder], + ['shareOwner', $shareOwnerFolder], ]); $share = $this->provider->getShareById($id); @@ -385,7 +385,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->rootFolder ->method('getUserFolder') ->willReturnMap([ - ['shareOwner', $shareOwnerFolder], + ['shareOwner', $shareOwnerFolder], ]); $share = $this->provider->getShareById($id); @@ -761,8 +761,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->rootFolder ->method('getUserFolder') ->willReturnMap([ - ['sharedBy', $userFolder], - ['shareOwner', $ownerFolder], + ['sharedBy', $userFolder], + ['shareOwner', $ownerFolder], ]); $userFolder->method('getById') @@ -1767,7 +1767,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } $this->userManager->method('get')->willReturnCallback( - function($userId) use ($users) { + function ($userId) use ($users) { return $users[$userId]; } ); @@ -1824,7 +1824,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } $this->userManager->method('get')->willReturnCallback( - function($userId) use ($users) { + function ($userId) use ($users) { return $users[$userId]; } ); @@ -1890,7 +1890,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } $this->userManager->method('get')->willReturnCallback( - function($userId) use ($users) { + function ($userId) use ($users) { return $users[$userId]; } ); @@ -1947,7 +1947,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } $this->userManager->method('get')->willReturnCallback( - function($userId) use ($users) { + function ($userId) use ($users) { return $users[$userId]; } ); @@ -1960,7 +1960,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } $this->groupManager->method('get')->willReturnCallback( - function($groupId) use ($groups) { + function ($groupId) use ($groups) { return $groups[$groupId]; } ); @@ -2025,7 +2025,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } $this->userManager->method('get')->willReturnCallback( - function($userId) use ($users) { + function ($userId) use ($users) { return $users[$userId]; } ); @@ -2038,7 +2038,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } $this->groupManager->method('get')->willReturnCallback( - function($groupId) use ($groups) { + function ($groupId) use ($groups) { return $groups[$groupId]; } ); diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index e46e019c6ed..96bebc196f6 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -123,9 +123,9 @@ class ManagerTest extends \Test\TestCase { $this->l10nFactory = $this->createMock(IFactory::class); $this->l = $this->createMock(IL10N::class); $this->l->method('t') - ->willReturnCallback(function($text, $parameters = []) { - return vsprintf($text, $parameters); - }); + ->willReturnCallback(function ($text, $parameters = []) { + return vsprintf($text, $parameters); + }); $this->factory = new DummyFactory(\OC::$server); @@ -233,7 +233,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCP\Share::preUnshare', - $this->callBack(function(GenericEvent $e) use ($share) { + $this->callBack(function (GenericEvent $e) use ($share) { return $e->getSubject() === $share; }) ); @@ -241,7 +241,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCP\Share::postUnshare', - $this->callBack(function(GenericEvent $e) use ($share) { + $this->callBack(function (GenericEvent $e) use ($share) { return $e->getSubject() === $share && $e->getArgument('deletedShares') === [$share]; }) @@ -279,7 +279,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCP\Share::preUnshare', - $this->callBack(function(GenericEvent $e) use ($share) { + $this->callBack(function (GenericEvent $e) use ($share) { return $e->getSubject() === $share; }) ); @@ -287,7 +287,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCP\Share::postUnshare', - $this->callBack(function(GenericEvent $e) use ($share) { + $this->callBack(function (GenericEvent $e) use ($share) { return $e->getSubject() === $share && $e->getArgument('deletedShares') === [$share]; }) @@ -348,7 +348,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCP\Share::preUnshare', - $this->callBack(function(GenericEvent $e) use ($share1) { + $this->callBack(function (GenericEvent $e) use ($share1) { return $e->getSubject() === $share1; }) ); @@ -356,7 +356,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCP\Share::postUnshare', - $this->callBack(function(GenericEvent $e) use ($share1, $share2, $share3) { + $this->callBack(function (GenericEvent $e) use ($share1, $share2, $share3) { return $e->getSubject() === $share1 && $e->getArgument('deletedShares') === [$share3, $share2, $share1]; }) @@ -391,7 +391,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( 'OCP\Share::postUnshareFromSelf', - $this->callBack(function(GenericEvent $e) use ($share) { + $this->callBack(function (GenericEvent $e) use ($share) { return $e->getSubject() === $share; }) ); @@ -423,7 +423,7 @@ class ManagerTest extends \Test\TestCase { $this->defaultProvider ->expects($this->exactly(4)) ->method('getChildren') - ->willReturnCallback(function($_share) use ($share, $shares) { + ->willReturnCallback(function ($_share) use ($share, $shares) { if ($_share === $share) { return $shares; } @@ -492,7 +492,7 @@ class ManagerTest extends \Test\TestCase { public function testVerifyPasswordNull() { $this->config->method('getAppValue')->willReturnMap([ - ['core', 'shareapi_enforce_links_password', 'no', 'no'], + ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); $result = self::invokePrivate($this->manager, 'verifyPassword', [null]); @@ -501,11 +501,11 @@ class ManagerTest extends \Test\TestCase { public function testVerifyPasswordHook() { $this->config->method('getAppValue')->willReturnMap([ - ['core', 'shareapi_enforce_links_password', 'no', 'no'], + ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); $this->eventDispatcher->expects($this->once())->method('dispatch') - ->willReturnCallback(function(Event $event) { + ->willReturnCallback(function (Event $event) { $this->assertInstanceOf(ValidatePasswordPolicyEvent::class, $event); /** @var ValidatePasswordPolicyEvent $event */ $this->assertSame('password', $event->getPassword()); @@ -522,11 +522,11 @@ class ManagerTest extends \Test\TestCase { $this->expectExceptionMessage('password not accepted'); $this->config->method('getAppValue')->willReturnMap([ - ['core', 'shareapi_enforce_links_password', 'no', 'no'], + ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); $this->eventDispatcher->expects($this->once())->method('dispatch') - ->willReturnCallback(function(Event $event) { + ->willReturnCallback(function (Event $event) { $this->assertInstanceOf(ValidatePasswordPolicyEvent::class, $event); /** @var ValidatePasswordPolicyEvent $event */ $this->assertSame('password', $event->getPassword()); @@ -1096,7 +1096,7 @@ class ManagerTest extends \Test\TestCase { } - public function testUserCreateChecksIdenticalPathSharedViaGroup() { + public function testUserCreateChecksIdenticalPathSharedViaGroup() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Path is already shared with this user'); @@ -1137,7 +1137,7 @@ class ManagerTest extends \Test\TestCase { self::invokePrivate($this->manager, 'userCreateChecks', [$share]); } - public function testUserCreateChecksIdenticalPathSharedViaDeletedGroup() { + public function testUserCreateChecksIdenticalPathSharedViaDeletedGroup() { $share = $this->manager->newShare(); $sharedWith = $this->createMock(IUser::class); @@ -1773,7 +1773,7 @@ class ManagerTest extends \Test\TestCase { ->expects($this->once()) ->method('create') ->with($share) - ->willReturnCallback(function(Share $share) { + ->willReturnCallback(function (Share $share) { return $share->setId(42); }); @@ -1782,7 +1782,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo('OCP\Share::preShare'), - $this->callback(function(GenericEvent $e) use ($path, $date) { + $this->callback(function (GenericEvent $e) use ($path, $date) { /** @var IShare $share */ $share = $e->getSubject(); @@ -1801,7 +1801,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo('OCP\Share::postShare'), - $this->callback(function(GenericEvent $e) use ($path, $date) { + $this->callback(function (GenericEvent $e) use ($path, $date) { /** @var IShare $share */ $share = $e->getSubject(); @@ -1882,7 +1882,7 @@ class ManagerTest extends \Test\TestCase { ->expects($this->once()) ->method('create') ->with($share) - ->willReturnCallback(function(Share $share) { + ->willReturnCallback(function (Share $share) { return $share->setId(42); }); @@ -1891,7 +1891,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo('OCP\Share::preShare'), - $this->callback(function(GenericEvent $e) use ($path) { + $this->callback(function (GenericEvent $e) use ($path) { /** @var IShare $share */ $share = $e->getSubject(); @@ -1910,7 +1910,7 @@ class ManagerTest extends \Test\TestCase { ->method('dispatch') ->with( $this->equalTo('OCP\Share::postShare'), - $this->callback(function(GenericEvent $e) use ($path) { + $this->callback(function (GenericEvent $e) use ($path) { /** @var IShare $share */ $share = $e->getSubject(); @@ -1993,7 +1993,7 @@ class ManagerTest extends \Test\TestCase { ->with( $this->equalTo('OCP\Share::preShare'), $this->isInstanceOf(GenericEvent::class) - )->willReturnCallback(function($name, GenericEvent $e) { + )->willReturnCallback(function ($name, GenericEvent $e) { $e->setArgument('error', 'I won\'t let you share!'); $e->stopPropagation(); } @@ -2145,7 +2145,7 @@ class ManagerTest extends \Test\TestCase { */ $this->defaultProvider ->method('getSharesBy') - ->willReturnCallback(function($uid, $type, $node, $reshares, $limit, $offset) use (&$shares2) { + ->willReturnCallback(function ($uid, $type, $node, $reshares, $limit, $offset) use (&$shares2) { return array_slice($shares2, $offset, $limit); }); @@ -2153,7 +2153,7 @@ class ManagerTest extends \Test\TestCase { * Simulate the deleteShare call. */ $manager->method('deleteShare') - ->willReturnCallback(function($share) use (&$shares2) { + ->willReturnCallback(function ($share) use (&$shares2) { for($i = 0; $i < count($shares2); $i++) { if ($shares2[$i]->getId() === $share->getId()) { array_splice($shares2, $i, 1); @@ -2255,7 +2255,7 @@ class ManagerTest extends \Test\TestCase { $factory->expects($this->any()) ->method('getProviderForType') - ->willReturnCallback(function($shareType) use ($roomShareProvider) { + ->willReturnCallback(function ($shareType) use ($roomShareProvider) { if ($shareType !== \OCP\Share::SHARE_TYPE_ROOM) { throw new Exception\ProviderException(); } @@ -2410,8 +2410,8 @@ class ManagerTest extends \Test\TestCase { ->expects($this->at(1)) ->method('getAppValue') ->willReturnMap([ - ['core', 'shareapi_allow_public_upload', 'yes', 'no'], - ]); + ['core', 'shareapi_allow_public_upload', 'yes', 'no'], + ]); $this->defaultProvider->expects($this->once()) ->method('getShareByToken') @@ -2464,7 +2464,7 @@ class ManagerTest extends \Test\TestCase { ->setPassword('passwordHash'); $this->hasher->method('verify')->with('password', 'passwordHash', '') - ->willReturnCallback(function($pass, $hash, &$newHash) { + ->willReturnCallback(function ($pass, $hash, &$newHash) { $newHash = 'newHash'; return true; @@ -3741,12 +3741,12 @@ class ManagerTest extends \Test\TestCase { $share4 = $this->createMock(IShare::class); $this->defaultProvider->method('getAllShares') - ->willReturnCallback(function() use ($share1, $share2) { + ->willReturnCallback(function () use ($share1, $share2) { yield $share1; yield $share2; }); $extraProvider->method('getAllShares') - ->willReturnCallback(function() use ($share3, $share4) { + ->willReturnCallback(function () use ($share3, $share4) { yield $share3; yield $share4; }); diff --git a/tests/lib/SubAdminTest.php b/tests/lib/SubAdminTest.php index b2c15894391..23207c8f721 100644 --- a/tests/lib/SubAdminTest.php +++ b/tests/lib/SubAdminTest.php @@ -113,7 +113,7 @@ class SubAdminTest extends \Test\TestCase { ->fetch(); $this->assertEquals( [ - 'gid' => $this->groups[0]->getGID(), + 'gid' => $this->groups[0]->getGID(), 'uid' => $this->users[0]->getUID() ], $result); diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index 552e1627629..9eea05b7966 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -6,7 +6,7 @@ * later. * See the COPYING-README file. * -*/ + */ namespace Test\SystemTag; diff --git a/tests/lib/SystemTag/SystemTagObjectMapperTest.php b/tests/lib/SystemTag/SystemTagObjectMapperTest.php index 986686dc93e..a5158bbee68 100644 --- a/tests/lib/SystemTag/SystemTagObjectMapperTest.php +++ b/tests/lib/SystemTag/SystemTagObjectMapperTest.php @@ -6,7 +6,7 @@ * later. * See the COPYING-README file. * -*/ + */ namespace Test\SystemTag; @@ -88,7 +88,7 @@ class SystemTagObjectMapperTest extends TestCase { $this->tagManager->expects($this->any()) ->method('getTagsByIds') - ->willReturnCallback(function($tagIds) { + ->willReturnCallback(function ($tagIds) { $result = []; if (in_array(1, $tagIds)) { $result[1] = $this->tag1; diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php index 463ec5809dd..54a8b85289d 100644 --- a/tests/lib/TagsTest.php +++ b/tests/lib/TagsTest.php @@ -1,26 +1,27 @@ <?php /** -* ownCloud -* -* @author Thomas Tanghus -* @copyright 2012-13 Thomas Tanghus (thomas@tanghus.net) -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud + * + * @author Thomas Tanghus + * @copyright 2012-13 Thomas Tanghus (thomas@tanghus.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ namespace Test; + use OCP\IUser; use OCP\IUserSession; @@ -261,8 +262,8 @@ class TagsTest extends \Test\TestCase { } /** - * @depends testTagAs - */ + * @depends testTagAs + */ public function testUnTag() { $objIds = [1, 2, 3, 4, 5, 6, 7, 8, 9]; diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index 7aa1eb177d7..8c1eb66d303 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -69,8 +69,8 @@ class CSSResourceLocatorTest extends \Test\TestCase { private function cssResourceLocator() { /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ - $factory = $this->createMock(Factory::class); - $factory->method('get')->with('css')->willReturn($this->appData); + $factory = $this->createMock(Factory::class); + $factory->method('get')->with('css')->willReturn($this->appData); $scssCacher = new SCSSCacher( $this->logger, $factory, @@ -130,10 +130,10 @@ class CSSResourceLocatorTest extends \Test\TestCase { // Use the symlink as the app path \OC::$APPSROOTS[] = [ - 'path' => $new_apps_path_symlink, - 'url' => '/css-apps-test', - 'writable' => false, - ]; + 'path' => $new_apps_path_symlink, + 'url' => '/css-apps-test', + 'writable' => false, + ]; $locator = $this->cssResourceLocator(); $locator->find(['test-css-app/test-file']); diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php index bd7a175862a..eacb5c812bc 100644 --- a/tests/lib/Template/IconsCacherTest.php +++ b/tests/lib/Template/IconsCacherTest.php @@ -1,4 +1,5 @@ <?php + declare (strict_types = 1); /** * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv@protonmail.com) diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 1e8ba5f6a2c..b892749806d 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -120,7 +120,7 @@ class JSCombinerTest extends \Test\TestCase { $fileDeps = $this->createMock(ISimpleFile::class); $folder->method('getFile') - ->willReturnCallback(function($path) use ($file, $gzfile) { + ->willReturnCallback(function ($path) use ($file, $gzfile) { if ($path === 'combine.js') { return $file; } else if ($path === 'combine.js.deps') { @@ -157,7 +157,7 @@ class JSCombinerTest extends \Test\TestCase { $gzfile = $this->createMock(ISimpleFile::class); $folder->method('getFile') - ->willReturnCallback(function($path) use ($file, $gzfile) { + ->willReturnCallback(function ($path) use ($file, $gzfile) { if ($path === 'combine.js') { return $file; } else if ($path === 'combine.js.deps') { @@ -200,7 +200,7 @@ class JSCombinerTest extends \Test\TestCase { ->willReturn(true); $folder->method('getFile') - ->willReturnCallback(function($path) use ($file, $fileDeps) { + ->willReturnCallback(function ($path) use ($file, $fileDeps) { if ($path === 'combine.js') { return $file; } @@ -245,7 +245,7 @@ class JSCombinerTest extends \Test\TestCase { ->willReturn('{}'); $folder->method('getFile') - ->willReturnCallback(function($path) use ($file) { + ->willReturnCallback(function ($path) use ($file) { if ($path === 'combine.js') { return $file; } @@ -262,7 +262,7 @@ class JSCombinerTest extends \Test\TestCase { $file = $this->createMock(ISimpleFile::class); $folder->method('getFile') - ->willReturnCallback(function($path) use ($file) { + ->willReturnCallback(function ($path) use ($file) { if ($path === 'combine.js') { return $file; } diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index 8c8fc99c961..0e6b217ec52 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -110,10 +110,10 @@ class JSResourceLocatorTest extends \Test\TestCase { // Use the symlink as the app path \OC::$APPSROOTS[] = [ - 'path' => $new_apps_path_symlink, - 'url' => '/js-apps-test', - 'writable' => false, - ]; + 'path' => $new_apps_path_symlink, + 'url' => '/js-apps-test', + 'writable' => false, + ]; $locator = $this->jsResourceLocator(); $locator->find(['test-js-app/test-file']); diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index fda899e51b2..5760ea7f8e0 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -120,7 +120,7 @@ class SCSSCacherTest extends \Test\TestCase { substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') - ->willReturnCallback(function($path) use ($file, $gzfile, $filePrefix) { + ->willReturnCallback(function ($path) use ($file, $gzfile, $filePrefix) { if ($path === $filePrefix.'styles.css') { return $file; } else if ($path === $filePrefix.'styles.css.deps') { @@ -160,7 +160,7 @@ class SCSSCacherTest extends \Test\TestCase { substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') - ->willReturnCallback(function($path) use ($file, $gzfile, $filePrefix) { + ->willReturnCallback(function ($path) use ($file, $gzfile, $filePrefix) { if ($path === $filePrefix.'styles.css') { return $file; } else if ($path === $filePrefix.'styles.css.deps') { @@ -196,7 +196,7 @@ class SCSSCacherTest extends \Test\TestCase { substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') - ->willReturnCallback(function($name) use ($file, $fileDeps, $gzFile, $filePrefix) { + ->willReturnCallback(function ($name) use ($file, $fileDeps, $gzFile, $filePrefix) { if ($name === $filePrefix.'styles.css') { return $file; } else if ($name === $filePrefix.'styles.css.deps') { @@ -234,7 +234,7 @@ class SCSSCacherTest extends \Test\TestCase { $filePrefix = substr(md5(\OC_Util::getVersionString('core')), 0, 4) . '-' . substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') - ->willReturnCallback(function($name) use ($file, $fileDeps, $gzFile, $filePrefix) { + ->willReturnCallback(function ($name) use ($file, $fileDeps, $gzFile, $filePrefix) { if ($name === $filePrefix.'styles.css') { return $file; } else if ($name === $filePrefix.'styles.css.deps') { @@ -272,7 +272,7 @@ class SCSSCacherTest extends \Test\TestCase { $file->expects($this->once())->method('getSize')->willReturn(1); $folder->method('getFile') - ->willReturnCallback(function($path) use ($file) { + ->willReturnCallback(function ($path) use ($file) { if ($path === 'styles.css') { return $file; } else if ($path === 'styles.css.deps') { @@ -300,7 +300,7 @@ class SCSSCacherTest extends \Test\TestCase { $path = \OC::$SERVERROOT . '/core/css/'; $folder->method('getFile')->willThrowException(new NotFoundException()); - $folder->method('newFile')->willReturnCallback(function($fileName) use ($file, $depsFile, $gzipFile) { + $folder->method('newFile')->willReturnCallback(function ($fileName) use ($file, $depsFile, $gzipFile) { if ($fileName === 'styles.css') { return $file; } else if ($fileName === 'styles.css.deps') { @@ -334,7 +334,7 @@ class SCSSCacherTest extends \Test\TestCase { $webDir = "core/css"; $path = \OC::$SERVERROOT; - $folder->method('getFile')->willReturnCallback(function($fileName) use ($file, $depsFile, $gzipFile) { + $folder->method('getFile')->willReturnCallback(function ($fileName) use ($file, $depsFile, $gzipFile) { if ($fileName === 'styles.css') { return $file; } else if ($fileName === 'styles.css.deps') { @@ -368,7 +368,7 @@ class SCSSCacherTest extends \Test\TestCase { $webDir = "tests/data/scss"; $path = \OC::$SERVERROOT . $webDir; - $folder->method('getFile')->willReturnCallback(function($fileName) use ($file, $depsFile, $gzipFile) { + $folder->method('getFile')->willReturnCallback(function ($fileName) use ($file, $depsFile, $gzipFile) { if ($fileName === 'styles-success.css') { return $file; } else if ($fileName === 'styles-success.css.deps') { @@ -384,7 +384,7 @@ class SCSSCacherTest extends \Test\TestCase { ->willReturn('body{background-color:#0082c9}'); $file->expects($this->at(0))->method('putContent')->with($this->callback( - function ($content){ + function ($content) { return 'body{background-color:#0082c9}' === $content; })); $depsFile->expects($this->at(0))->method('putContent')->with($this->callback( diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index be4a7ade787..c4ff92c223f 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -449,7 +449,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { } $annotations = $this->getAnnotations(); if (isset($annotations['class']['group'])) { - if(in_array('DB', $annotations['class']['group']) || in_array('SLOWDB', $annotations['class']['group']) ) { + if(in_array('DB', $annotations['class']['group']) || in_array('SLOWDB', $annotations['class']['group'])) { return true; } } @@ -479,7 +479,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { $l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); @@ -516,7 +516,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { if($node->hasChildNodes()) { $this->removeWhitespaces($node); } else { - if ($node instanceof \DOMText && $node->isWhitespaceInElementContent() ) { + if ($node instanceof \DOMText && $node->isWhitespaceInElementContent()) { $domNode->removeChild($node); } } diff --git a/tests/lib/Traits/ClientServiceTrait.php b/tests/lib/Traits/ClientServiceTrait.php index d4f540e6c36..cab28e76dba 100644 --- a/tests/lib/Traits/ClientServiceTrait.php +++ b/tests/lib/Traits/ClientServiceTrait.php @@ -21,7 +21,6 @@ namespace Test\Traits; - use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; use OCP\Http\Client\IResponse; diff --git a/tests/lib/Updater/ChangesCheckTest.php b/tests/lib/Updater/ChangesCheckTest.php index 1bc8b47e58f..b3897ebbd07 100644 --- a/tests/lib/Updater/ChangesCheckTest.php +++ b/tests/lib/Updater/ChangesCheckTest.php @@ -348,8 +348,8 @@ class ChangesCheckTest extends TestCase { public function changeDataProvider():array { $testDataFound = $testDataNotFound = $this->versionProvider(); - array_walk($testDataFound, function(&$params) { $params[] = true; }); - array_walk($testDataNotFound, function(&$params) { $params[] = false; }); + array_walk($testDataFound, function (&$params) { $params[] = true; }); + array_walk($testDataNotFound, function (&$params) { $params[] = false; }); return array_merge($testDataFound, $testDataNotFound); } diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php index afde88e3995..438835f2c3f 100644 --- a/tests/lib/UrlGeneratorTest.php +++ b/tests/lib/UrlGeneratorTest.php @@ -7,6 +7,7 @@ */ namespace Test; + use OCP\ICacheFactory; use OCP\IConfig; use OCP\IRequest; diff --git a/tests/lib/User/AvatarUserDummy.php b/tests/lib/User/AvatarUserDummy.php index 123825de50f..87e1cfc5f83 100644 --- a/tests/lib/User/AvatarUserDummy.php +++ b/tests/lib/User/AvatarUserDummy.php @@ -1,24 +1,24 @@ <?php /** -* ownCloud -* -* @author Arthur Schiwon -* @copyright 2013 Arthur Schiwon blizzz@owncloud.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud + * + * @author Arthur Schiwon + * @copyright 2013 Arthur Schiwon blizzz@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ namespace Test\User; diff --git a/tests/lib/User/Backend.php b/tests/lib/User/Backend.php index 1c7d482c480..3fb08777abb 100644 --- a/tests/lib/User/Backend.php +++ b/tests/lib/User/Backend.php @@ -1,24 +1,24 @@ <?php /** -* ownCloud -* -* @author Robin Appelman -* @copyright 2012 Robin Appelman icewind@owncloud.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud + * + * @author Robin Appelman + * @copyright 2012 Robin Appelman icewind@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ namespace Test\User; diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index 65d483734d9..3546cb17d2f 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -1,24 +1,24 @@ <?php /** -* ownCloud -* -* @author Robin Appelman -* @copyright 2012 Robin Appelman icewind@owncloud.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud + * + * @author Robin Appelman + * @copyright 2012 Robin Appelman icewind@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ namespace Test\User; diff --git a/tests/lib/User/Dummy.php b/tests/lib/User/Dummy.php index 7eb5cc41ba8..a543e7e58b6 100644 --- a/tests/lib/User/Dummy.php +++ b/tests/lib/User/Dummy.php @@ -1,24 +1,24 @@ <?php /** -* ownCloud -* -* @author Robin Appelman -* @copyright 2012 Robin Appelman icewind@owncloud.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud + * + * @author Robin Appelman + * @copyright 2012 Robin Appelman icewind@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ namespace Test\User; diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index 3d53301b325..7cc42e81ba2 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -8,6 +8,7 @@ */ namespace Test\User; + use OC\AllConfig; use OC\User\Database; use OC\User\Manager; diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index f7aba189603..48c4785bf71 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -264,7 +264,7 @@ class SessionTest extends \Test\TestCase { $this->dispatcher->expects($this->once()) ->method('dispatchTyped') ->with( - $this->callback(function(PostLoginEvent $e) { + $this->callback(function (PostLoginEvent $e) { return $e->getUser()->getUID() === 'foo' && $e->getPassword() === 'bar' && $e->isTokenLogin() === false; @@ -1375,7 +1375,7 @@ class SessionTest extends \Test\TestCase { $this->session ->method('set') - ->willReturnCallback(function($k, $v) use (&$davAuthenticatedSet, &$lastPasswordConfirmSet) { + ->willReturnCallback(function ($k, $v) use (&$davAuthenticatedSet, &$lastPasswordConfirmSet) { switch ($k) { case Auth::DAV_AUTHENTICATED: $davAuthenticatedSet = $v; diff --git a/tests/lib/Util/User/Dummy.php b/tests/lib/Util/User/Dummy.php index 1d3c2d57b42..3e6372ca033 100644 --- a/tests/lib/Util/User/Dummy.php +++ b/tests/lib/Util/User/Dummy.php @@ -175,7 +175,7 @@ class Dummy extends Backend implements \OCP\IUserBackend { * Backend name to be shown in user management * @return string the name of the backend to be shown */ - public function getBackendName(){ + public function getBackendName() { return 'Dummy'; } } diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index 4d8432294fb..767ada3ae03 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -233,7 +233,7 @@ class UtilTest extends \Test\TestCase { $appManager = $this->createMock(IAppManager::class); $appManager->expects($this->any()) ->method('isEnabledForUser') - ->willReturnCallback(function($appId) use ($enabledApps){ + ->willReturnCallback(function ($appId) use ($enabledApps) { return in_array($appId, $enabledApps); }); Dummy_OC_Util::$appManager = $appManager; diff --git a/tests/preseed-config.php b/tests/preseed-config.php index 6831ec66f6b..fdea46230c3 100644 --- a/tests/preseed-config.php +++ b/tests/preseed-config.php @@ -1,4 +1,5 @@ <?php + $CONFIG = [ 'appstoreenabled' => false, 'apps_paths' => [ diff --git a/version.php b/version.php index 9c9f35f0949..68900b18960 100644 --- a/version.php +++ b/version.php @@ -29,10 +29,10 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // when updating major/minor version number. -$OC_Version = [19, 0, 0, 2]; +$OC_Version = [19, 0, 0, 3]; // The human readable string -$OC_VersionString = '19.0.0 beta 1'; +$OC_VersionString = '19.0.0 beta 2'; $OC_VersionCanBeUpgradedFrom = [ 'nextcloud' => [ |