bugs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bugs [02-12-2008 10:41]
213.41.94.221 Birthday reminder bug
bugs [17-11-2016 12:34] (current)
Line 3: Line 3:
  
 ==== Version 1.00 ==== ==== Version 1.00 ====
 +Try this code in iaddressbook/functions/module_birthday.php, line 30, to fix end-of-year bug:
 +
 +<code php>
 + $sql  = "SELECT * FROM ".$db_config['dbtable_ab'].
 + $sql .= " WHERE ((MONTH(birthdate) = MONTH(NOW()) OR MONTH(birthdate) = MONTH(NOW()) + 1) AND MONTH(NOW()) != 12)";
 + $sql .= " OR ((MONTH(birthdate) = 12 OR MONTH(birthdate) = 1) AND MONTH(NOW()) = 12)";
 + $sql .= " ORDER BY DAYOFYEAR(birthdate) ASC LIMIT 100";
 +</code>
 +
 +This code exports LDIF to Mozilla Thunderbird, in a format which uses names, instead of numbers.
 +
 +iaddressbook/functions/module_ldif.php line 85:
 +
 +<code php>
 +    $line[] .= rtrim('dn: cn='. ldif_escape($contact->firstname).' '.ldif_escape($contact->lastname).', mail='.ldif_escape($workMail));
 +//    $line[] .= rtrim('dn: cn='. ldif_escape($contact->id).', '.$base, ", ");
 +    $line[] .= 'objectClass: inetOrgPerson';
 +    $line[] .= 'objectClass: person';
 +    $line[] .= 'objectClass: top';
 +    $line[] .= 'cn: '.ldif_escape($contact->firstname).' '.ldif_escape($contact->lastname);
 +//    $line[] .= 'cn: '                                                                     ldif_escape($contact->name());
 +//    $line[] .= 'cn: '                                                                     ldif_escape($contact->id);
 +</code>
 +
 +
   * Birthday reminder seems a little buggy with the new year. Since December, it only shows people born in january (although some contacts are born in december).   * Birthday reminder seems a little buggy with the new year. Since December, it only shows people born in january (although some contacts are born in december).
 +  * The code has bugs in several files which prevent the program from being executed correctly. The code contains "<?=" instead of "<?php echo". The workaround is to replace all "<?=" with "<?php echo".
 +  * [PHP 5.3] All occurences of "split" have to be replaced by "explode" in order to work properly. Apart from this, iAddressBook work perfectly with PHP 5.3.
 +  * [PHP 5.3] All objects created by reference should be replaced by "normal" construction. That is change the "=& new" for "= new".
  
 ==== Version 0.99 ==== ==== Version 0.99 ====
  • bugs.1228210871.txt.gz
  • Last modified: 17-11-2016 12:33
  • (external edit)