jmontoyaa 7 жил өмнө
parent
commit
1e4e917945

+ 55 - 55
.codeclimate.yml

@@ -53,58 +53,58 @@ plugins:
     enabled: false
 
 exclude_patterns:
-- cli-config.php
-- var/cache/
-- var/log/
-- app/config/
-- config/
-- app/SymfonyRequirements.php
-- app/Migrations/
-- app/Resources/
-- main/admin/db.php
-- main/admin/ldap_synchro.php
-- main/auth/cas/lib/
-- main/auth/shibboleth
-- main/auth/openid
-- main/chat/emoji_strategy.php
-- main/default_course_document
-- main/document/Wami.swf
-- main/fonts/
-- main/inc/ajax/Wami.swf
-- main/inc/lib/browser/
-- main/inc/lib/freemindflashbrowser/
-- main/inc/lib/internationalization_database/
-- main/inc/lib/javascript/
-- main/inc/lib/kses-0.2.2/
-- main/inc/lib/mimetex/
-- main/inc/lib/nanogong/
-- main/inc/lib/nusoap/
-- main/inc/lib/opengraph/*
-- main/inc/lib/ppt2png/
-- main/inc/lib/phpseclib
-- main/inc/lib/pear/
-- main/inc/lib/phpmailer/
-- main/inc/lib/phpseclib/
-- main/inc/lib/portfolio.class.php
-- main/inc/lib/svg-edit/
-- main/inc/lib/swfobject/
-- main/inc/lib/wami-recorder/
-- main/inc/lib/xajax/
-- main/lp/packaging/
-- main/template/
-- main/img/
-- main/lang/
-- plugin/buycourses/src/Culqi/
-- plugin/buycourses/src/Requests/
-- plugin/buycourses/src/Requests.php
-- plugin/buycourses/src/paypalfunctions.php
-- plugin/vchamilo/cli/
-- plugin/kannelsms/vendor/
-- plugin/clockworksms/vendor/
-- plugin/pens/lib
-- plugin/bbb/lib/bbb_api.php
-- plugin/ims_lti/OAuthSimple.php
-- plugin/sepe/src/wsse/
-- tests/
-- vendor/
-- web/
+  - cli-config.php
+  - var/cache/
+  - var/log/
+  - app/config/
+  - config/
+  - app/SymfonyRequirements.php
+  - app/Migrations/
+  - app/Resources/
+  - main/admin/db.php
+  - main/admin/ldap_synchro.php
+  - main/auth/cas/lib/
+  - main/auth/shibboleth
+  - main/auth/openid
+  - main/chat/emoji_strategy.php
+  - main/default_course_document
+  - main/document/Wami.swf
+  - main/fonts/
+  - main/inc/ajax/Wami.swf
+  - main/inc/lib/browser/
+  - main/inc/lib/freemindflashbrowser/
+  - main/inc/lib/internationalization_database/
+  - main/inc/lib/javascript/
+  - main/inc/lib/kses-0.2.2/
+  - main/inc/lib/mimetex/
+  - main/inc/lib/nanogong/
+  - main/inc/lib/nusoap/
+  - main/inc/lib/opengraph/*
+  - main/inc/lib/ppt2png/
+  - main/inc/lib/phpseclib
+  - main/inc/lib/pear/
+  - main/inc/lib/phpmailer/
+  - main/inc/lib/phpseclib/
+  - main/inc/lib/portfolio.class.php
+  - main/inc/lib/svg-edit/
+  - main/inc/lib/swfobject/
+  - main/inc/lib/wami-recorder/
+  - main/inc/lib/xajax/
+  - main/lp/packaging/
+  - main/template/
+  - main/img/
+  - main/lang/
+  - plugin/buycourses/src/Culqi/
+  - plugin/buycourses/src/Requests/
+  - plugin/buycourses/src/Requests.php
+  - plugin/buycourses/src/paypalfunctions.php
+  - plugin/vchamilo/cli/
+  - plugin/kannelsms/vendor/
+  - plugin/clockworksms/vendor/
+  - plugin/pens/lib
+  - plugin/bbb/lib/bbb_api.php
+  - plugin/ims_lti/OAuthSimple.php
+  - plugin/sepe/src/wsse/
+  - tests/
+  - vendor/
+  - web/

+ 1 - 1
.flintci.yml

@@ -1,3 +1,3 @@
 services:
   phpcsfixer: true
-  yamllint: true
+  yamllint: true

+ 10 - 15
.travis.yml

@@ -1,28 +1,23 @@
 language: php
-
 addons:
-    apt:
-        packages:
-        - apache2
-        - postfix
-        - libapache2-mod-fastcgi
-        - libappindicator1
-        - fonts-liberation
-    chrome: stable
-
+  apt:
+    packages:
+      - apache2
+      - postfix
+      - libapache2-mod-fastcgi
+      - libappindicator1
+      - fonts-liberation
+  chrome: stable
 services:
-    - mysql
-
+  - mysql
 sudo: required
 dist: trusty
 cache:
   directories:
     - $HOME/.composer/cache/files
-
 php:
   - 7.1
   - 7.2
-
 env:
   global:
     - VHOST_URL=localhost
@@ -110,4 +105,4 @@ notifications:
   irc: irc.freenode.org#chamilodev
   slack:
     rooms:
-      secure: wlaaOwNt58ENjx2PEciISr4VBRWXp6YfI8TAZgvhDO1H0XpLByRYyktgm/+h6NQWvTEcPGBSFcsIA6K0N8FA52/fdDQFxbe0en+b4q7AGNLdjTRdszfZ4AbIdRngSBFKRmXC5IX0dEx/nGWYp5fRs26QPvgBadpj8M11BnL7qhg=
+      secure: wlaaOwNt58ENjx2PEciISr4VBRWXp6YfI8TAZgvhDO1H0XpLByRYyktgm/+h6NQWvTEcPGBSFcsIA6K0N8FA52/fdDQFxbe0en+b4q7AGNLdjTRdszfZ4AbIdRngSBFKRmXC5IX0dEx/nGWYp5fRs26QPvgBadpj8M11BnL7qhg=

+ 0 - 6
app/Resources/public/assets/modernizr/.travis.yml

@@ -1,6 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-before_script:
-  - npm install grunt
-script: grunt travis --verbose

+ 0 - 22
app/Resources/public/assets/select2/.travis.yml

@@ -1,22 +0,0 @@
-language: node_js
-
-sudo: false
-
-node_js:
-  - 0.10
-
-env:
-  global:
-    - secure: XMNK8GVxkwKa6oLl7nJwgg/wmY1YDk5rrMd+UXz26EDCsMDbiy1P7GhN2fEiBSLaQ7YfEuvaDcmzQxTrT0YTHp1PDzb2o9J4tIDdEkqPcv1y8xMaYDfmsN0rBPdBwZEg9H5zUgi7OdUbrGswSYxsKCE3x8EOqK89104HyOo1LN4=
-    - secure: BU5BPRx6H4O3WJ509YPixjUxg+hDF3z2BVJX6NiGmKWweqvCEYFfiiHLwDEgp/ynRcF9vGVi1V4Ly1jq7f8NIajbDZ5q443XchZFYFg78K/EwD5mK6LYt16zb7+Jn0KbzwHeGRGzc9AvcEYlW6i634cSCm4n3BnqtF5PpogSzdw=
-
-script:
-  - grunt ci
-
-notifications:
-  email: false
-  irc:
-    channels:
-      - "chat.freenode.net#select2"
-    on_success: change
-    on_failure: always

+ 0 - 34
app/Resources/public/assets/simpleWebRTC/.travis.yml

@@ -1,34 +0,0 @@
-sudo: false
-language: node_js
-node_js:
-  - 6
-addons:
-  apt:
-    sources:
-      - ubuntu-toolchain-r-test
-    packages:
-      - g++-4.8
-cache:
-  directories:
-    - node_modules
-
-env:
-  global:
-    - CXX=g++-4.8
-  matrix:
-    - BROWSER=chrome  BVER=stable
-
-before_script:
-  - ./node_modules/travis-multirunner/setup.sh
-  - export DISPLAY=:99.0
-  - sh -e /etc/init.d/xvfb start
-
-script:
-  - npm run test-travis
-
-after_failure:
-  - for file in *.log; do echo $file; echo "======================"; cat $file; done || true
-
-notifications:
-  email:
-  - 

+ 2 - 1
config/packages/chamilo.yaml

@@ -86,6 +86,7 @@ chamilo_course:
             classes:
                 model: Chamilo\CourseBundle\Entity\CCourseSetting
                 repository: Chamilo\CourseBundle\Entity\Repository\CCourseSettingRepository
+
 doctrine_cache:
     providers:
         sylius_settings:
@@ -95,4 +96,4 @@ doctrine_cache:
 
 imports:
     - { resource: ../../src/CoreBundle/Resources/config/services.yml }
-    - { resource: ../../vendor/knplabs/doctrine-behaviors/config/orm-services.yml }
+    - { resource: ../../vendor/knplabs/doctrine-behaviors/config/orm-services.yml }

+ 0 - 1
config/packages/cmf_routing_bundle.yaml

@@ -1,4 +1,3 @@
-# Read the documentation: https://symfony.com/doc/master/cmf/bundles/routing/configuration.html
 # Install phpcr stack before using this configuration
 #cmf_routing:
 #    chain:

+ 1 - 2
config/packages/dev/monolog.yaml

@@ -5,8 +5,7 @@ monolog:
             path: "%kernel.logs_dir%/%kernel.environment%.log"
             level: debug
             channels: ["!event"]
-        # uncomment to get logging in your browser
-        # you may have to allow bigger header sizes in your Web server configuration
+
         #firephp:
         #    type: firephp
         #    level: info

+ 7 - 7
config/packages/dev/security_checker.yaml

@@ -1,8 +1,8 @@
 services:
-    SensioLabs\Security\SecurityChecker:
-        public: false
-
-    SensioLabs\Security\Command\SecurityCheckerCommand:
-        arguments: ['@SensioLabs\Security\SecurityChecker']
-        tags:
-            - { name: console.command }
+  SensioLabs\Security\SecurityChecker:
+    public: false
+  SensioLabs\Security\Command\SecurityCheckerCommand:
+    arguments:
+      - '@SensioLabs\Security\SecurityChecker'
+    tags:
+      - { name: console.command }

+ 4 - 4
config/packages/dev/web_profiler.yaml

@@ -1,6 +1,6 @@
 web_profiler:
-    toolbar: true
-    intercept_redirects: true
-
+  toolbar: true
+  intercept_redirects: true
 framework:
-    profiler: { only_exceptions: false }
+  profiler:
+    only_exceptions: false

+ 11 - 11
config/packages/fos_rest.yaml

@@ -1,12 +1,12 @@
 fos_rest:
-    param_fetcher_listener: true
-    body_listener:          true
-    format_listener:        true
-    view:
-        view_response_listener: 'force'
-    body_converter:
-        enabled: false
-        validate: true
-    exception:
-        messages:
-            'Symfony\Component\HttpKernel\Exception\NotFoundHttpException': true
+  param_fetcher_listener: true
+  body_listener: true
+  format_listener: true
+  view:
+    view_response_listener: force
+  body_converter:
+    enabled: false
+    validate: true
+  exception:
+    messages:
+      'Symfony\Component\HttpKernel\Exception\NotFoundHttpException': true

+ 0 - 2
config/packages/fos_user.yaml

@@ -1,8 +1,6 @@
 fos_user:
     db_driver: orm # can be orm or odm
     firewall_name: admin
-
-    # if you change the class configuration, please also alter the sonata_user.yml file
     user_class: Chamilo\UserBundle\Entity\User
 
     group:

+ 1 - 1
config/packages/framework.yaml

@@ -19,7 +19,7 @@ framework:
         # handler_id set to null will use default session handler from php.ini
         handler_id: ~
         name: ch_sid
-    fragments:       ~
+    fragments: ~
     http_method_override: true
     assets: ~
     annotations: true

+ 38 - 39
config/packages/hwi_oauth.yaml

@@ -1,41 +1,40 @@
 hwi_oauth:
-    connect:
-        account_connector: chamilo_user_provider
-    firewall_names: [admin]
-    resource_owners:
-        github:
-            type:                github
-            client_id:           <client_id>
-            client_secret:       <client_secret>
-        facebook:
-            type:                facebook
-            client_id:           <client_id>
-            client_secret:       <client_secret>
-        google:
-            type:                google
-            client_id:           <client_id>
-            client_secret:       <client_secret>
-            scope:               "email profile"
-        my_custom_oauth2:
-            type:                oauth2
-            client_id:           <client_id>
-            client_secret:       <client_secret>
-            access_token_url:    https://path.to/oauth/v2/token
-            authorization_url:   https://path.to/oauth/v2/authorize
-            infos_url:           https://path.to/api/user
-            scope:               "user_details"
-            user_response_class: HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse
-            paths:
-                identifier: id
-                nickname:   username
-                realname:   fullname
-    fosub:
-        # try 30 times to check if a username is available (foo, foo1, foo2 etc)
-        username_iterations: 30
+  connect:
+    account_connector: chamilo_user_provider
+  firewall_names:
+    - admin
+  resource_owners:
+    github:
+      type: github
+      client_id: '<client_id>'
+      client_secret: '<client_secret>'
+    facebook:
+      type: facebook
+      client_id: '<client_id>'
+      client_secret: '<client_secret>'
+    google:
+      type: google
+      client_id: '<client_id>'
+      client_secret: '<client_secret>'
+      scope: 'email profile'
+    my_custom_oauth2:
+      type: oauth2
+      client_id: '<client_id>'
+      client_secret: '<client_secret>'
+      access_token_url: 'https://path.to/oauth/v2/token'
+      authorization_url: 'https://path.to/oauth/v2/authorize'
+      infos_url: 'https://path.to/api/user'
+      scope: user_details
+      user_response_class: HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse
+      paths: { identifier: id, nickname: username, realname: fullname }
 
-        # mapping between resource owners (see below) and properties
-        properties:
-            github: githubId
-            google: googleId
-            facebook: facebookId
-            my_custom_provider: customId
+  fosub:
+    # try 30 times to check if a username is available (foo, foo1, foo2 etc)
+    username_iterations: 30
+
+    # mapping between resource owners (see below) and properties
+    properties:
+      github: githubId
+      google: googleId
+      facebook: facebookId
+      my_custom_provider: customId

+ 3 - 3
src/CoreBundle/Framework/PageController.php

@@ -33,9 +33,9 @@ class PageController
      */
     public function returnHelp()
     {
-        $home                   = api_get_home_path();
+        $home = api_get_home_path();
         $user_selected_language = api_get_language_isocode();
-        $sys_path               = api_get_path(SYS_PATH);
+        $sys_path = api_get_path(SYS_PATH);
         $platformLanguage = api_get_setting('language.platform_language');
 
         if (!isset($user_selected_language)) {
@@ -709,7 +709,7 @@ class PageController
         );
 
         if (!empty($html)) {
-            $adapter    = new FixedAdapter($nbResults, []);
+            $adapter = new FixedAdapter($nbResults, []);
             $pagerfanta = new Pagerfanta($adapter);
             $pagerfanta->setMaxPerPage($this->maxPerPage); // 10 by default
             $pagerfanta->setCurrentPage($page); // 1 by default

+ 5 - 7
src/UserBundle/Resources/config/services.yml

@@ -1,8 +1,6 @@
 services:
-    chamilo_user_provider:
-        class: Chamilo\UserBundle\Security\FOSUBUserProvider
-        #this is the place where the properties are passed to the UserProvider - see config.yml
-        arguments: [
-            '@sonata.user.orm.user_manager',
-            {facebook: facebookId, google: googleId, github: githubId}
-        ]
+  chamilo_user_provider:
+    class: Chamilo\UserBundle\Security\FOSUBUserProvider
+    arguments:
+      - '@sonata.user.orm.user_manager'
+      - { facebook: facebookId, google: googleId, github: githubId }