Revize 1870
Přidáno uživatelem Ondřej Fibich před více než 11 roky(ů)
freenetis/branches/1.1/application/models/members_fee.php | ||
---|---|---|
$current_month = date('m', strtotime($entrance_date));
|
||
$year = date('Y', strtotime($connected_from));
|
||
$month = date('m', strtotime($connected_from));
|
||
$deduct_day = max(1, min(31, Settings::get('deduct_day')));
|
||
|
||
// will be payed later in ordinary member fees
|
||
if (date('d', strtotime($entrance_date)) <= 15) // fix after #332 implemented
|
||
if (date('d', strtotime($entrance_date)) <= $deduct_day)
|
||
{
|
||
if (--$current_month <= 0)
|
||
{
|
||
... | ... | |
|
||
while ($month <= $to_month)
|
||
{
|
||
$date = date('Y-m-d', mktime(0, 0, 0, $month, 15, $year)); // fix after #332 implemented
|
||
$date = date('Y-m-d', mktime(0, 0, 0, $month, $deduct_day, $year));
|
||
$fee = $fee_model->get_default_fee_by_date_type($date, 'regular member fee');
|
||
|
||
if ($fee && $fee->id)
|
freenetis/branches/1.1/application/models/town.php | ||
---|---|---|
return $towns->current();
|
||
}
|
||
else
|
||
{throw new Exception($zip_code . '#' . $town . '#' . $quarter . '#' . $this->get_last_sql_query());
|
||
{
|
||
return NULL;
|
||
}
|
||
}
|
freenetis/branches/1.1/application/models/user.php | ||
---|---|---|
'password' => sha1($password)
|
||
))->get();
|
||
|
||
return ($query->count()) ? $query->current()->id : 0;
|
||
if ($query->count())
|
||
{
|
||
return $query->current()->id;
|
||
}
|
||
|
||
// see Settings for exclamation
|
||
if (Settings::get('pasword_check_for_md5'))
|
||
{
|
||
$query = $this->db->from('users')->select('id')->where(array
|
||
(
|
||
'login' => $username,
|
||
'password' => md5($password)
|
||
))->get();
|
||
|
||
if ($query->count())
|
||
{
|
||
return $query->current()->id;
|
||
}
|
||
}
|
||
|
||
return 0;
|
||
}
|
||
|
||
/**
|
freenetis/branches/1.1/application/controllers/users.php | ||
---|---|---|
if ($user_model->password != sha1($input->value) ||
|
||
trim($input->value) == '')
|
||
{
|
||
$input->add_error('required', __('Wrong password.'));
|
||
$error = TRUE;
|
||
|
||
// see Settings for exclamation
|
||
if (Settings::get('pasword_check_for_md5'))
|
||
{
|
||
$error = ($user_model->password != md5($input->value));
|
||
}
|
||
|
||
if ($error)
|
||
{
|
||
$input->add_error('required', __('Wrong password.'));
|
||
}
|
||
}
|
||
}
|
||
|
freenetis/branches/1.1/application/libraries/Settings.php | ||
---|---|---|
'monitoring_notification_down_host_interval' => 10,
|
||
// interval of notication for host up
|
||
'monitoring_notification_up_host_interval' => 5,
|
||
// password check also for MD5 algorithm (not only fo SHA1)
|
||
// this is here because of posibility of transformation from old data
|
||
// structures (another IS). I (Ondrej Fibich) made this due to
|
||
// inport of passwords from old IS of PVFREE association (2013-02-15)
|
||
'pasword_check_for_md5' => FALSE,
|
||
);
|
||
|
||
/**
|
Také k dispozici: Unified diff
Opravy:
- odtraneni zapomenuteho dubugu v Town modelu
- zapomenuta uprava dne strzeni v pocitani doplatku pred clenstvim (registrovani zajemci)
- umozneni prihlaseni heslem hashovanym pomoci md5 algoritmu (kvuli importu hesel z jinych systemu - defaultne vypnuto)