Ignore:
Timestamp:
Apr 27, 2017 4:43:35 PM (7 years ago)
Author:
anonymous
Message:

Updated every instance of 'zero' date 0000-00-00 to use 1000-01-01 if mysql version >= 5.7.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/list_template.cli.php

    r533 r601  
    119119            $listrows[] = "<\x3fphp echo mb_strlen(\$list[\$i]['$field'])<50 \x3f oTxt(\$list[\$i]['$field'], true) : oTxt(trim(mb_substr(\$list[\$i]['$field'], 0, 50)) . '...'); \x3f>";
    120120        } else if (preg_match('/.*(begin|start).*date.*/i', $field)) {
    121             $listrows[] = "<\x3fphp echo '0000-00-00' == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
     121            $listrows[] = "<\x3fphp echo \$db->getParam('zero_date') == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
    122122        } else if (preg_match('/.*(end|expire).*date.*/i', $field)) {
    123123            $listrows[] = "<\x3fphp echo '9999-12-31' == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
Note: See TracChangeset for help on using the changeset viewer.