Changeset 113123 in spip-zone


Ignore:
Timestamp:
Dec 26, 2018, 10:28:19 AM (3 weeks ago)
Author:
cedric@…
Message:

Mise a jour de la librairie When pour corriger des bugs de reccurence (https://contrib.spip.net/Newsletters#comment499003) - Necessite PHP 5.3+

Location:
_plugins_/newsletters/trunk
Files:
25 added
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/newsletters/trunk/inc/when.php

    r68664 r113123  
    1818 */
    1919function when_rule_to_next_date($date_start,$rule,$prev=''){
    20         include_spip("lib/when/When");
     20        include_spip("lib/when/src/When");
     21        include_spip("lib/when/src/Valid");
    2122
    2223        try {
    23                 $r = new When();
    24                 $r->recur($date_start)->rrule($rule);
    25                 while ($next=$r->next()
     24                $r = new When\When();
     25                $r->startDate(new DateTime($date_start))->rrule($rule);
     26                if (!$prev) {
     27                        $prev = $date_start;
     28                }
     29                while ($next=$r->getNextOccurrence(new DateTime($prev))
    2630                        AND $prev AND strtotime($prev)>=strtotime($next->format("Y-m-d H:i:s")));
    2731
  • _plugins_/newsletters/trunk/paquet.xml

    r110639 r113123  
    22        prefix="newsletters"
    33        categorie="communication"
    4         version="1.5.5"
     4        version="1.6.0"
    55        etat="stable"
    66        compatibilite="[3.0.5;3.2.*]"
     
    1212
    1313        <auteur lien='http://nursit.com/'>Cedric Morin</auteur>
     14        <credit lien='https://github.com/tplaner/When'>When</credit>
     15        <credit lien='https://github.com/ecenter/markdownify'>Markdownify</credit>
    1416
    1517        <licence>GNU/GPL</licence>
Note: See TracChangeset for help on using the changeset viewer.