[aur-dev] [PATCH 1/6] Add support for filing package requests

Lukas Fleischer archlinux at cryptocrack.de
Tue Jul 1 13:35:19 EDT 2014


On Tue, 01 Jul 2014 at 18:50:33, Florian Pritz wrote:
> [...]
> > +     /*
> > +      * TODO: Add native language emails for users, based on their
> > +      * preferences. Simply making these strings translatable won't
> > +      * work, users would be getting emails in the language that the
> > +      * user who posted the comment was in.
> > +      */
> > +     $username = username_from_sid($_COOKIE['AURSID']);
> > +     $body =
> > +             $username . " [1] filed a " . $type . " request for " .
> > +             $row['Name'] . " [2]:\n\n" . $comments . "\n\n" .
> > +             "[1] " . $AUR_LOCATION . get_user_uri($username) . "\n" .
> > +             "[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n";
> > +     $body = wordwrap($body, 70);
> > +     $headers = "MIME-Version: 1.0\r\n" .
> > +                "Content-type: text/plain; charset=UTF-8\r\n";
> > +     if (!empty($bcc)) {
> > +             $headers .= "Bcc: $bcc\r\n";
> > +     }
> > +     $headers .= "Reply-to: noreply at aur.archlinux.org\r\n" .
> > +                 "From: notify at aur.archlinux.org\r\n" .
> > +                 "X-Mailer: AUR";
> 
> Can you set a References header here so accept requests generated via
> the webui will be able to thread properly? Something like "References:
> <request-$request_id at aur.archlinux.org>".
> 

See commit 0e84667 (Add threading headers to request notification mails,
2014-06-25) in master.

> > +     @mail($AUR_REQUEST_ML, "AUR " . ucfirst($type) . " Request for " .
> > +                            $row['Name'], $body, $headers);
> > +
> > +     return array(true, __("Added request successfully."));
> > +}
> 


More information about the aur-dev mailing list