Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1991

Přidáno uživatelem Ondřej Fibich před více než 11 roky(ů)

Opravy:
- fixes #645: Automaticka aktivace presmerovani - dny v mesici
- oprava automatickeho strhavani pri nastaveni strhavani na konec mesice

Zobrazit rozdíly:

freenetis/branches/1.1/application/controllers/scheduler.php
*/
private function fee_deduction()
{
$day_of_deduct = date::get_deduct_day_to(date('m', $this->t), date('Y', $this->t));
if (Settings::get('deduct_fees_automatically_enabled') &&
intval(date('j', $this->t)) == intval(Settings::get('deduct_day')))
intval(date('j', $this->t)) == intval($day_of_deduct))
{
// preparations
$association = new Member_Model(Member_Model::ASSOCIATION);
freenetis/branches/1.1/application/libraries/TimeActivityRule.php
}
// time properties
$day = date('d', $time);
$year = date('Y', $time);
$month = date('m', $time);
$day = intval(date('d', $time));
$hour = date('H', $time);
$minute = date('i', $time);
......
switch ($rule->getType())
{
case Messages_automatical_activation_Model::TYPE_MONTHLY:
if (intval($day) == intval($rule->getAttribute()) && $hour == '00')
$days_of_month = date::days_of_month($month, $year);
$max_day = max(1, min($days_of_month, intval($rule->getAttribute())));
if ($day == intval($max_day) && $hour == '00')
$passed = TRUE;
break;
......
case Messages_automatical_activation_Model::TYPE_AFTER_DEDUCTION:
if (Settings::get('deduct_fees_automatically_enabled') &&
$hour == '00' && intval($day) == intval(Settings::get('deduct_day')))
$hour == '00' && $day == intval(date::get_deduct_day_to($month, $year)))
{
$passed = TRUE;
}

Také k dispozici: Unified diff