developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 11 years ago

Closed 11 years ago

#932 closed bug (fixed)

enhancement in jMailer file driver

Reported by: bastnic Owned by: bastnic
Priority: normal Milestone: Jelix 1.2 beta
Component: jelix:utils Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

Laurent recently add a file driver for jMailer which I think it's a very great idea during dev.

But if more than one mail is sent in the same second, only one file is generated. So I add a little random pattern. I used jAuth::getRandomPassword which I don't think it's a good idea for jelix core.

Furthermore, I add a little return to line between header and body

Attachments (1)

patch-jmailer.diff (1.0 KB) - added by bastnic 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by bastnic

comment:1 Changed 11 years ago by bastnic

  • review set to review?

comment:2 Changed 11 years ago by laurentj

  • review changed from review? to review-

This dependency with jAuth is not good.

comment:3 Changed 11 years ago by Julien

you may use

$token = uniqid(mt_rand(), true);

there are still collision risks if mt_rand() returns the same value and both intructions are called in the same microsecond, but that's quite improbable.

comment:4 Changed 11 years ago by bastnic

  • Milestone set to Jelix 1.2
  • Owner set to bastnic
  • Status changed from new to assigned

comment:5 Changed 11 years ago by laurentj

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed the issue in changeset http://hg.jelix.org/jelix/jelix-trunk/rev/319c81b9a1ec

thanks Bastnic and Julien.

Note: See TracTickets for help on using tickets.