Overrides EmailRecipientMixin
198277
def get_default_recipients(self):
        '''  '''
        if self.email:
            return [self.email,]
        if self.finalRegistration:
            return [self.finalRegistration.customer.email,]
        elif self.temporaryRegistration:
            return [self.temporaryRegistration.email,]
        return []
1282244
function(template, options){
			var payload = { data: {}, template_id: template };

			// Add root attributes to the payload root
			for(var attr in rootAttributes){
				if(!rootAttributes.hasOwnProperty(attr)){
					continue;
				}
				if(typeof options[attr] === 'undefined'){
					continue;
				}
				var key = rootAttributes[attr],
					val = options[attr];
				payload[key] = val;
				delete options[attr];
			}

			// Add any left over attribtues to the data object
			for(attr in options){
				if(!options.hasOwnProperty(attr)){
					continue;
				}
				payload.data[attr] = options[attr]
			}

			// Add to the list of emails
			this.mails.push(payload);
		}
117426
public String generateAntiSpamMailto(String name, String email)
    {
        StringTokenizer st = new StringTokenizer(email, "@");
        if (Security.containsXssRiskyCharacters(email) || st.countTokens() != 2)
        {
            throw new IllegalArgumentException("Invalid email address: " + email);
        }

        String before = st.nextToken();
        String after = st.nextToken();

        StringBuffer buffer = new StringBuffer();

        buffer.append("Contact ");
        buffer.append(Security.replaceXmlCharacters(name));
        buffer.append(" using: <span id=\"asmgLink\"></span>\n");
        buffer.append("<script type='text/javascript'>\n");

        buffer.append("var before = '");
        buffer.append(before);
        buffer.append("';\n");

        buffer.append("var after = '");
        buffer.append(after);
        buffer.append("';\n");

        buffer.append("var link = \"<a href='mail\" + \"to:\" + before + '@' + after + \"'>\" + before + '@' + after + \"</a>\";\n");

        buffer.append("document.getElementById(\"asmgLink\").innerHTML = link;\n");
        buffer.append("</script>\n");
        buffer.append("<noscript>[");
        buffer.append(before);
        buffer.append(" at ");
        buffer.append(after);
        buffer.append("]</noscript>\n");

        return buffer.toString();
    }
848439
function checkForInlineMixins(mixin, rtn) {
            if (mixin.mixins) {
                get(mixin.mixins, index, initiatedOnce, rtn);
            }
        }
1123370
function modifyTarget(target, source, sourceKeys, filters, overrideKeys) {

    // Arguments available to each filter.
    var filterContext = {
        target: target, // readonly
        source: source, // readonly
        sourceKey: null, // readonly
        targetKey: null,
        sourceValue: null
    };

    // For each property, send it through the filter pipeline and
    // then apply it to the target object.
    for (var sourceKey in sourceKeys) {
        filterContext.sourceKey = sourceKey;
        filterContext.targetKey = sourceKeys[sourceKey];

        // Throw an error if the source property name doesn't refer to a value.
        if (!(sourceKey in source)) {
            errorManager.propertyNotFound(sourceKey, source);
        }
        filterContext.sourceValue = source[sourceKey];

        // Apply the filters to the property.
        for (var i = 0; i < filters.length; i++) {
            if (!filters[i](filterContext)) {
                // Don't apply this property to the target.
                filterContext.targetKey = null;
                break;
            }
        }

        // Apply property to target.
        if (filterContext.targetKey !== null) {
            // Allow overwrite to take place. Developer can ignore error.
            var overwritten = filterContext.targetKey in target;

            target[filterContext.targetKey] = filterContext.sourceValue;

            if (overwritten && !overrideKeys[sourceKey]) {
                errorManager.propertyOverride(filterContext.targetKey, target);
            }
        }
    }
}
617646
def _change_generic(env, model_name, record_ids, target_record_id,
                    exclude_columns, method='orm'):
    
    for model_to_replace, res_id_column, model_column in [
            ('calendar.event', 'res_id', 'res_model'),
            ('ir.attachment', 'res_id', 'res_model'),
            ('mail.activity', 'res_id', 'res_model'),
            ('mail.followers', 'res_id', 'res_model'),
            ('mail.message', 'res_id', 'model'),
            ('rating.rating', 'res_id', 'res_model'),
            ]:
        try:
            model = env[model_to_replace].with_context(active_test=False)
        except KeyError:
            continue
        if (model._table, res_id_column) in exclude_columns:
            continue
        if method == 'orm':
            records = model.search([
                (model_column, '=', model_name),
                (res_id_column, 'in', record_ids)])
            if records:
                records.write({res_id_column: target_record_id})
                logger.debug(
                    "Changed %s record(s) of model '%s'",
                    len(records), model_to_replace)
        else:
            logged_query(
                env.cr,
                """ UPDATE %(table)s
                    SET %(res_id_column)s = %(target_record_id)s
                    WHERE %(model_column)s = %(model_name)s
                    AND %(res_id_column)s in %(record_ids)s
                """,
                {
                    'table': AsIs(model._table),
                    'res_id_column': AsIs(res_id_column),
                    'model_column': AsIs(model_column),
                    'model_name': model_name,
                    'target_record_id': target_record_id,
                    'record_ids': record_ids,
                }, skip_no_result=True)
1260873
function overrideTasks() {
    function noop() {
        Elixir.log.heading.error('Quorra don\'t have php tests!')
    }

    Elixir.extend('phpSpec', noop);
    Elixir.extend('phpunit', noop);
    Elixir.extend('babel', function () {
        new Elixir.Task('babel', function () {
            Elixir.log.heading('Alert!').heading("'mix.babel()' is not supported in Quorra Elixir. " +
            "You'll want to instead call 'mix.rollup().'");

            process.exit(1);
        });
    });
}
597123
void addMixin( Rule mixin, Map<String, Expression> parameters, Map<String, Expression> variables ) {
        int idx = state.stackIdx++;
        Scope scope;
        if( state.stack.size() <= idx ) {
            scope = new Scope();
            state.stack.add( scope );
        } else {
            scope = state.stack.get( idx );
            scope.returns.clear();
        }
        scope.mixin = mixin;
        scope.parameters = parameters;
        scope.variables = variables;
    }
936591
def render_or_send(func, message):
    """"""
    if request.endpoint != func.func_name:
        mail.send(message)

    if (current_user.is_authenticated() and current_user.superuser):
        return render_template('debug_email.html', message=message)
1113384
@Override
    public void setRecipients(final javax.mail.Message.RecipientType type, final Address[] addresses) throws MessagingException {
        throw new IllegalWriteException("Mock messages are read-only");
    }
1156397
protected function setRecipient($type, $email, $name)
    {
        $this->recipients[$type][$email] = compact('email', 'name');

        return $this;
    }
736613
def _default
        given_defaults = (respond_to?(:default, true) && default) || {}
        if MandrillBatchMailer.intercept_recipients
          given_defaults[:message].try(:delete, :to)
        end
        given_defaults
      end
637222
function processMixin(feed,mixin,mixinName,stable) {
	if (warnReleaseStatus(mixin.release_status)) {
		console.log('Warning: mixin '+mixinName+' is '+mixin.release_status+deprecationInfo(feed,mixin.name,'mixin',mixin.deprecated_since));
	}
	if (seen.indexOf(mixinName)<0) {
		exportMixin(feed,mixin,mixinName,stable);
		seen.push(mixinName);
	}
	else {
		console.log('* Skipping mixin '+mixinName+' as duplicate name');
	}
}
859585
protected function addRecipient(string $headerName, string $address, array $variables): MessageBuilder
    {
        if (array_key_exists($headerName, $this->counters['recipients'])) {
            if (self::RECIPIENT_COUNT_LIMIT === $this->counters['recipients'][$headerName]) {
                if (false === $this->autoSend) {
                    throw TooManyRecipients::whenAutoSendDisabled();
                }
                $this->finalize();
            }
        }

        parent::addRecipient($headerName, $address, $variables);

        if (array_key_exists($headerName, $this->counters['recipients']) && !array_key_exists('id', $variables)) {
            $variables['id'] = $headerName.'_'.$this->counters['recipients'][$headerName];
        }

        $this->batchRecipientAttributes[$address] = $variables;

        return $this;
    }
841339
def edit_message_reply_markup(self, *args, **kwargs):
        """"""
        return edit_message_reply_markup(*args, **self._merge_overrides(**kwargs)).run()
910753
public HtmlEmailImpl setTextMsg(String aText) throws EmailException {
	if (StringUtil.isEmpty(aText)) {
	    throw new EmailException("Invalid message supplied");
	}
	this.text = aText;
	return this;
    }
960767
public function setRecipients($type, array $recipients = [])
    {
        foreach ($recipients as $key => $recipient) {
            $this->setRecipient(
                $type,
                array_get($recipient, 'email'),
                array_get($recipient, 'name')
            );
        }

        return $this;
    }