Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36111

Cache API - typo's and other trivial non-descript cleanup

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Caching
    • Labels:

      Description

      A few small obvious things to fix up. Big thanks to Fred for looking over the code to find these!

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              fred Frédéric Massart added a comment -

              Noticed this as well. Just an argument which is never used because not set:

              diff --git a/cache/classes/factory.php b/cache/classes/factory.php
              index 729a46b..32415fc 100644
              --- a/cache/classes/factory.php
              +++ b/cache/classes/factory.php
              @@ -135,7 +135,7 @@ class cache_factory {
                       }
                       $definition = $this->create_definition($component, $area, $aggregate);
                       $definition->set_identifiers($identifiers);
              -        $cache = $this->create_cache($definition, $identifiers);
              +        $cache = $this->create_cache($definition);
                       if ($definition->should_be_persistent()) {
                           $this->cachesfromdefinitions[$definitionname] = $cache;
                       }

              Show
              fred Frédéric Massart added a comment - Noticed this as well. Just an argument which is never used because not set: diff --git a/cache/classes/factory.php b/cache/classes/factory.php index 729a46b..32415fc 100644 --- a/cache/classes/factory.php +++ b/cache/classes/factory.php @@ -135,7 +135,7 @@ class cache_factory { } $definition = $this->create_definition($component, $area, $aggregate); $definition->set_identifiers($identifiers); - $cache = $this->create_cache($definition, $identifiers); + $cache = $this->create_cache($definition); if ($definition->should_be_persistent()) { $this->cachesfromdefinitions[$definitionname] = $cache; }
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Putting this up for integration now.

              Show
              samhemelryk Sam Hemelryk added a comment - Putting this up for integration now.
              Hide
              poltawski Dan Poltawski added a comment -

              Integrated, thanks Sam

              Show
              poltawski Dan Poltawski added a comment - Integrated, thanks Sam
              Hide
              poltawski Dan Poltawski added a comment -

              Looks good.

              Show
              poltawski Dan Poltawski added a comment - Looks good.
              Hide
              matteo Matteo Scaramuccia added a comment -

              What about adding an extra commit to remove ;; in cache/?

              # find cache/ -type f -name '*.php' -exec grep -H -n -E ';;$' {} \; | sort
              cache/classes/dummystore.php:267:        return $cache;;
              cache/stores/mongodb/lib.php:242:        return false;;
              cache/stores/static/lib.php:363:        return $cache;;

              (More in MDL-36357)

              Show
              matteo Matteo Scaramuccia added a comment - What about adding an extra commit to remove ;; in cache/ ? # find cache/ -type f -name '*.php' -exec grep -H -n -E ';;$' {} \; | sort cache/classes/dummystore.php:267: return $cache;; cache/stores/mongodb/lib.php:242: return false;; cache/stores/static/lib.php:363: return $cache;; (More in MDL-36357 )
              Hide
              poltawski Dan Poltawski added a comment -

              Matteo, thanks! I have done a quick commit to remove those new ones, since you pointed them out.

              Show
              poltawski Dan Poltawski added a comment - Matteo, thanks! I have done a quick commit to remove those new ones, since you pointed them out.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Many, many thanks for your effort!

              Millions of people will enjoy the results of your work, yay!

              Closing as fixed. Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Many, many thanks for your effort! Millions of people will enjoy the results of your work, yay! Closing as fixed. Ciao

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12