cashmusic / platform

A free and open platform giving all musicians access to tools that let them manage, promote, and sell their music online.
https://cashmusic.org
Other
1.31k stars 267 forks source link

Mustache library call replacements #988

Open paperscissors opened 7 years ago

paperscissors commented 7 years ago

Legacy mustache library replaced with composer autoloader version. Several calls on the site still use the old version and need to be changed over.

paperscissors commented 7 years ago

New mustache calls look like:

get template: $template = CASHSystem::setMustacheTemplate("system_email") render template:

$encoded_html = CASHSystem::renderMustache(
     $template, array(
          // array of values to be passed to the mustache template
          ...
          )
);

old ones sometimes look something like

        if (file_exists(CASH_PLATFORM_ROOT . '/lib/mustache/Mustache.php')) {
            include_once(CASH_PLATFORM_ROOT . '/lib/mustache/Mustache.php');
            $this->mustache = new Mustache;
        }

and then call the mustacher later. or not. telltale sign is the /lib/mustache/Mustache.php business.