owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Consider simplifying this complex logical expression.
Open

            if (
            $.inArray(keyCodes.n, keys) !== -1 && ($.inArray(keyCodes.cmdFirefox, keys) !== -1 || $.inArray(keyCodes.cmdOpera, keys) !== -1 || $.inArray(keyCodes.leftCmdWebKit, keys) !== -1 || $.inArray(keyCodes.rightCmdWebKit, keys) !== -1 || $.inArray(keyCodes.ctrl, keys) !== -1 || event.ctrlKey)) {
                if ($.inArray(keyCodes.shift, keys) !== -1) { //16=shift, New File
                    newFile();
                } else { //New Folder
Severity: Major
Found in apps/files/js/keyboardshortcuts.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                if (
                $.inArray(keyCodes.n, keys) !== -1 && ($.inArray(keyCodes.cmdFirefox, keys) !== -1 || $.inArray(keyCodes.cmdOpera, keys) !== -1 || $.inArray(keyCodes.leftCmdWebKit, keys) !== -1 || $.inArray(keyCodes.rightCmdWebKit, keys) !== -1 || $.inArray(keyCodes.ctrl, keys) !== -1 || event.ctrlKey)) {
                    preventDefault = true; //new file/folder prevent browser from responding
                }
    Severity: Major
    Found in apps/files/js/keyboardshortcuts.js - About 1 hr to fix

      Function prompt has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          prompt: function (text, title, callback, modal, name, password, buttonDeclineText, buttonConfirmText) {
      Severity: Major
      Found in core/js/oc-dialogs.js - About 1 hr to fix

        Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $appName,
                IRequest $request,
                IL10N $l10n,
                IConfig $config,
                Session $userSession,
        Severity: Major
        Found in settings/Controller/MailSettingsController.php - About 1 hr to fix

          Method setMailSettings has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $mail_domain,
                  $mail_from_address,
                  $mail_smtpmode,
                  $mail_smtpsecure,
                  $mail_smtphost,
          Severity: Major
          Found in settings/Controller/MailSettingsController.php - About 1 hr to fix

            Method addShare has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function addShare($remote, $token, $password, $name, $owner, $accepted = false, $user = null, $remoteId = -1) {
            Severity: Major
            Found in apps/files_sharing/lib/External/Manager.php - About 1 hr to fix

              Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      IRootFolder $rootFolder,
                      IUrlGenerator $urlGenerator,
                      EventDispatcher $eventDispatcher,
                      \OCP\Share\IManager $shareManager,
                      NotificationPublisher $notificationPublisher,
              Severity: Major
              Found in apps/files_sharing/lib/Hooks.php - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                            if ($newPermissions !== null &&
                                $newPermissions !== Constants::PERMISSION_READ &&
                                $newPermissions !== Constants::PERMISSION_CREATE &&
                                $newPermissions !== (Constants::PERMISSION_READ | Constants::PERMISSION_UPDATE) &&
                                $newPermissions !== (Constants::PERMISSION_READ | Constants::PERMISSION_CREATE) &&
                Severity: Major
                Found in apps/files_sharing/lib/Controller/Share20OcsController.php - About 1 hr to fix

                  Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          IDBConnection $connection,
                          IL10N $l,
                          IClientService $clientService,
                          ILogger $logger,
                          IJobList $jobList,
                  Severity: Major
                  Found in apps/federation/lib/Panels/Admin.php - About 1 hr to fix

                    Method addShareToDB has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        private function addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $uidOwner, $permissions, $expiration, $token) {
                    Severity: Major
                    Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 1 hr to fix

                      Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              IConfig $config,
                              ILogger $logger,
                              IDBConnection $databaseConnection,
                              IUserSession $userSession,
                              IMountManager $mountManager,
                      Severity: Major
                      Found in apps/dav/lib/Connector/Sabre/ServerFactory.php - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (\OC_User::handleApacheAuth() ||
                                        //Fix for broken webdav clients
                                        ($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === null) ||
                                        //Well behaved clients that only send the cookie are allowed
                                        ($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && ($request->getHeader('Authorization') === null || $request->getHeader('Authorization') === ''))
                        Severity: Major
                        Found in apps/dav/lib/Connector/Sabre/Auth.php - About 1 hr to fix

                          Method create has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  $mountPoint,
                                  $backend,
                                  $authMechanism,
                                  $backendOptions,
                                  $mountOptions,
                          Severity: Major
                          Found in apps/files_external/lib/Controller/GlobalStoragesController.php - About 1 hr to fix

                            Method createStorage has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    $mountPoint,
                                    $backend,
                                    $authMechanism,
                                    $backendOptions,
                                    $mountOptions = null,
                            Severity: Major
                            Found in apps/files_external/lib/Controller/StoragesController.php - About 1 hr to fix

                              Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      Tree $tree,
                                      View $view,
                                      ISystemTagManager $tagManager,
                                      ISystemTagObjectMapper $tagMapper,
                                      ITagManager $fileTagger,
                              Severity: Major
                              Found in apps/dav/lib/Connector/Sabre/FilesReportPlugin.php - About 1 hr to fix

                                Method shareItem has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) {
                                Severity: Major
                                Found in lib/public/Share.php - About 1 hr to fix

                                  Method createStorage has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          $mountPoint,
                                          $backendIdentifier,
                                          $authMechanismIdentifier,
                                          $backendOptions,
                                          $mountOptions = null,
                                  Severity: Major
                                  Found in lib/public/Files/External/Service/IStoragesService.php - About 1 hr to fix

                                    Method register has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            $method,
                                            $url,
                                            $action,
                                            $app,
                                            $authLevel = self::USER_AUTH,
                                    Severity: Major
                                    Found in lib/public/API.php - About 1 hr to fix

                                      Method createStorage has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              $mountPoint,
                                              $backendIdentifier,
                                              $authMechanismIdentifier,
                                              $backendOptions,
                                              $mountOptions = null,
                                      Severity: Major
                                      Found in lib/private/Files/External/Service/StoragesService.php - About 1 hr to fix

                                        Method checkReshare has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            private static function checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate) {
                                        Severity: Major
                                        Found in lib/private/Share/Share.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language