mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r168
git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@168 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
41e6f1ad6f
commit
5ad1692e5e
2 changed files with 12 additions and 6 deletions
|
@ -14,7 +14,7 @@ if (!$field = (string) $this->request['field'])
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = BB_USERS;
|
$table = BB_USERS;
|
||||||
$value = (string) $this->request['value'];
|
$value = $this->request['value'] = (string) (isset($this->request['value'])) ? $this->request['value'] : 0;
|
||||||
|
|
||||||
switch ($field)
|
switch ($field)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,9 @@ switch ($field)
|
||||||
$this->ajax_die('error');
|
$this->ajax_die('error');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
$this->response['new_value'] = $lang['GENDER_SELECT'][$value];
}
|
{
|
||||||
|
$this->response['new_value'] = $lang['GENDER_SELECT'][$value];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'user_birthday':
|
case 'user_birthday':
|
||||||
|
@ -65,7 +67,9 @@ switch ($field)
|
||||||
if($b_day || $b_md || $b_year)
|
if($b_day || $b_md || $b_year)
|
||||||
{
|
{
|
||||||
if((bb_date(TIMENOW, 'Y') - $b_year) > $bb_cfg['birthday']['max_user_age'])
|
if((bb_date(TIMENOW, 'Y') - $b_year) > $bb_cfg['birthday']['max_user_age'])
|
||||||
{
$this->ajax_die(sprintf($lang['BIRTHDAY_TO_HIGH'], $bb_cfg['birthday']['max_user_age']));
}
|
{
|
||||||
|
$this->ajax_die(sprintf($lang['BIRTHDAY_TO_HIGH'], $bb_cfg['birthday']['max_user_age']));
|
||||||
|
}
|
||||||
else if((bb_date(TIMENOW, 'Y') - $b_year) < $bb_cfg['birthday']['min_user_age'])
|
else if((bb_date(TIMENOW, 'Y') - $b_year) < $bb_cfg['birthday']['min_user_age'])
|
||||||
{
|
{
|
||||||
$this->ajax_die(sprintf($lang['BIRTHDAY_TO_LOW'], $bb_cfg['birthday']['min_user_age']));
|
$this->ajax_die(sprintf($lang['BIRTHDAY_TO_LOW'], $bb_cfg['birthday']['min_user_age']));
|
||||||
|
@ -78,11 +82,13 @@ switch ($field)
|
||||||
{
|
{
|
||||||
$value = mkrealdate($b_day, $b_md, $b_year);
|
$value = mkrealdate($b_day, $b_md, $b_year);
|
||||||
$next_birthday_greeting = (date('md') < $b_md . (($b_day <= 9) ? '0' : '') . $b_day) ? date('Y') : date('Y')+1;
|
$next_birthday_greeting = (date('md') < $b_md . (($b_day <= 9) ? '0' : '') . $b_day) ? date('Y') : date('Y')+1;
|
||||||
}
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$value = 0;
|
$value = 0;
|
||||||
$next_birthday_greeting = 0;
}
|
$next_birthday_greeting = 0;
|
||||||
|
}
|
||||||
DB()->query("UPDATE $table SET user_next_birthday_greeting = $next_birthday_greeting WHERE user_id = $user_id LIMIT 1");
|
DB()->query("UPDATE $table SET user_next_birthday_greeting = $next_birthday_greeting WHERE user_id = $user_id LIMIT 1");
|
||||||
|
|
||||||
$this->response['new_value'] = $this->request['value'];
|
$this->response['new_value'] = $this->request['value'];
|
||||||
|
|
|
@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1;
|
||||||
|
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.0.2';
|
$bb_cfg['tp_version'] = '2.0.2';
|
||||||
$bb_cfg['tp_release_state'] = 'TP II r167';
|
$bb_cfg['tp_release_state'] = 'TP II r168';
|
||||||
$bb_cfg['tp_release_date'] = '27-07-2011';
|
$bb_cfg['tp_release_date'] = '27-07-2011';
|
||||||
|
|
||||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue