Moodle
  1. Moodle
  2. MDL-40137

Correct naming of functions in theme/clean/lib.php

    Details

    • Rank:
      50880

      Description

      Functions names should begin with theme_clean_ in order to decrease the chance of running into conflicts.
      This is a standard naming convention within Moodle.

        Activity

        Hide
        Sam Hemelryk added a comment -

        Putting this up for integration review.

        Changes are pretty simple.
        In MOODLE_25_STABLE the functions are mapping and a debugging notice is given.
        In master you get a coding_exception.

        This will affect any one who has created a theme based upon the clean theme, but as that is only a single minor version (assuming we land this before 2.5.1) that shouldn't be a big issue.

        I think this change is important and it promotes best practices.

        Many thanks
        Sam

        Show
        Sam Hemelryk added a comment - Putting this up for integration review. Changes are pretty simple. In MOODLE_25_STABLE the functions are mapping and a debugging notice is given. In master you get a coding_exception. This will affect any one who has created a theme based upon the clean theme, but as that is only a single minor version (assuming we land this before 2.5.1) that shouldn't be a big issue. I think this change is important and it promotes best practices. Many thanks Sam
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (25 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (25 & master), thanks!
        Hide
        Rajesh Taneja added a comment -

        Thanks for fixing this Sam,

        Works fine, no error encountered.

        Show
        Rajesh Taneja added a comment - Thanks for fixing this Sam, Works fine, no error encountered.
        Hide
        Dan Poltawski added a comment -

        Thanks for your contributions!

        _main:
        @ BB#0:
                push    {r7, lr}
                mov     r7, sp
                sub     sp, #4
                movw    r0, :lower16:(L_.str-(LPC0_0+4))
                movt    r0, :upper16:(L_.str-(LPC0_0+4))
        LPC0_0:
                add     r0, pc
                bl      _printf
                movs    r1, #0
                movt    r1, #0
                str     r0, [sp]                @ 4-byte Spill
                mov     r0, r1
                add     sp, #4
                pop     {r7, pc}
        
                .section        __TEXT,__cstring,cstring_literals
        L_.str:                                 @ @.str
                .asciz   "This code is now upstream!"
        
        Show
        Dan Poltawski added a comment - Thanks for your contributions! _main: @ BB#0: push {r7, lr} mov r7, sp sub sp, #4 movw r0, :lower16:(L_.str-(LPC0_0+4)) movt r0, :upper16:(L_.str-(LPC0_0+4)) LPC0_0: add r0, pc bl _printf movs r1, #0 movt r1, #0 str r0, [sp] @ 4- byte Spill mov r0, r1 add sp, #4 pop {r7, pc} .section __TEXT,__cstring,cstring_literals L_.str: @ @.str .asciz "This code is now upstream!"

          People

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

            Dates

            • Created:
              Updated:
              Resolved: