Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      See https://github.com/blesta/module-pterodactyl/issues/65

      Pterodactyl allows a value -1 to give unlimited Swap. We should allow this for the package field as well. Update the error message to mention that -1 is valid and update the validation rule

      In components/modules/pterodactyl/pterodactyl.php around line 408 change

                  'meta[swap]' => [
                      'format' => [
                          'rule' => ['matches', '/^[0-9]+$/'],
                          'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                      ]
                  ],
      

      To

                  'meta[swap]' => [
                      'format' => [
                          'rule' => ['matches', '/^(?:\-1|[0-9]+)$/'],
                          'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                      ]
                  ],
      

        Activity

        jonathan Jonathan Reissmueller created issue -
        jonathan Jonathan Reissmueller made changes -
        Field Original Value New Value
        Description Pterodactyl allows a value -1 to give unlimited Swap. We should allow this for the package field as well. Update the error message to mention that -1 is valid and update the validation rule

        In components/modules/pterodactyl/pterodactyl.php around line 408 change

        ```
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^[0-9]+$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        ```

        To

        ```
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^(?:\-1|[0-9]+)$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        ```
        Pterodactyl allows a value -1 to give unlimited Swap. We should allow this for the package field as well. Update the error message to mention that -1 is valid and update the validation rule

        In components/modules/pterodactyl/pterodactyl.php around line 408 change

        {code:java}
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^[0-9]+$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        {code}

        To

        {code:java}
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^(?:\-1|[0-9]+)$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        {code}
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Story Points 1
        jonathan Jonathan Reissmueller made changes -
        Description Pterodactyl allows a value -1 to give unlimited Swap. We should allow this for the package field as well. Update the error message to mention that -1 is valid and update the validation rule

        In components/modules/pterodactyl/pterodactyl.php around line 408 change

        {code:java}
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^[0-9]+$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        {code}

        To

        {code:java}
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^(?:\-1|[0-9]+)$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        {code}
        See https://github.com/blesta/module-pterodactyl/issues/65

        Pterodactyl allows a value -1 to give unlimited Swap. We should allow this for the package field as well. Update the error message to mention that -1 is valid and update the validation rule

        In components/modules/pterodactyl/pterodactyl.php around line 408 change

        {code:java}
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^[0-9]+$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        {code}

        To

        {code:java}
                    'meta[swap]' => [
                        'format' => [
                            'rule' => ['matches', '/^(?:\-1|[0-9]+)$/'],
                            'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
                        ]
                    ],
        {code}
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.6.0 Sprint 1 [ 156 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.6.0 Sprint 1 [ 156 ] 5.6.0/5.5.1 [ 166 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 20 minutes [ 1200 ]
        Worklog Id 15936 [ 15936 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.6.0 Sprint 1/5.5.1 [ 166 ] 5.6.0 Sprint 1/5.5.1, 5.6.0 Sprint 2 [ 166, 167 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Time Spent 20 minutes [ 1200 ] 40 minutes [ 2400 ]
        Worklog Id 15944 [ 15944 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Nov/22

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 40 minutes
              40m

                Agile