Ejemplo n.º 1
0
 /**
  * A wrapper for Scrub.htmlStrict
  * @param string $value
  * @return string
  */
 public function htmlStrict($value){
     return Scrub::htmlStrict($value);
 }
Ejemplo n.º 2
0
    /**
     * Prepares the final text of an email
     * @access private
     * @param string $notification
     * @param array $options
     */
    private function __prepareEmail($notification, $options = null){
        $html = '';
        $text = '';
        $language = 'en';
        $message = $this->__notificiations[$language][$notification];

        switch($notification){
            case 'invitation_to_join':
                $html = sprintf(
                $message['email']['html_body'],
                $options['invitee'],
                Configure::read('Domain.host'), //Product or Domain
                Configure::read('Domain.url'), //FQDN
                $options['token']
                );
                break;

            case 'password_reset':
                $html = sprintf(
                    $message['email']['html_body'],
                    Configure::read('Domain.url'), //FQDN
                    Configure::read('Domain.host'), //Product or Domain
                    $options['token'],
                    $options['ip']
                );

                $text = sprintf(
                    $message['email']['text_body'],
                    Configure::read('Domain.url'),  //FQDN
                    Configure::read('Domain.host'), //Product or Domain
                    $options['token'],
                    $options['ip']
                );
                break;
        }

        return array('html'=>Scrub::htmlStrict($html), 'text'=>Scrub::noHTML($text));
    }