Zeile 691 | Zeile 691 |
---|
$options['dst'] = 0; }
|
$options['dst'] = 0; }
|
if($this->method == "insert" || (isset($options['threadmode']) && $options['threadmode'] != "linear" && $options['threadmode'] != "threaded"))
| if($this->method == "insert" || (isset($options['threadmode']) && $options['threadmode'] != "linear" && $options['threadmode'] != "threaded" && $options['threadmode'] != ''))
|
{
|
{
|
if($mybb->settings['threadusenetstyle']) { $options['threadmode'] = 'threaded'; } else { $options['threadmode'] = 'linear'; }
| $options['threadmode'] = '';
|
}
// Verify the "threads per page" option.
| }
// Verify the "threads per page" option.
|
Zeile 719 | Zeile 712 |
---|
if($options['tpp'] > $biggest) { $options['tpp'] = $biggest;
|
if($options['tpp'] > $biggest) { $options['tpp'] = $biggest;
|
} }
| } }
|
$options['tpp'] = (int)$options['tpp']; } // Verify the "posts per page" option.
| $options['tpp'] = (int)$options['tpp']; } // Verify the "posts per page" option.
|
Zeile 740 | Zeile 733 |
---|
{ $options['ppp'] = $biggest; }
|
{ $options['ppp'] = $biggest; }
|
}
| }
|
$options['ppp'] = (int)$options['ppp']; } // Is our selected "days prune" option valid or not?
| $options['ppp'] = (int)$options['ppp']; } // Is our selected "days prune" option valid or not?
|
Zeile 779 | Zeile 772 |
---|
/** * Verifies if a last visit date is valid or not.
|
/** * Verifies if a last visit date is valid or not.
|
* * @return boolean True when valid, false when invalid.
| * * @return boolean True when valid, false when invalid.
|
*/ function verify_lastvisit() {
| */ function verify_lastvisit() {
|
Zeile 798 | Zeile 791 |
---|
/** * Verifies if a last active date is valid or not.
|
/** * Verifies if a last active date is valid or not.
|
* * @return boolean True when valid, false when invalid. */
| * * @return boolean True when valid, false when invalid. */
|
function verify_lastactive() { $lastactive = &$this->data['lastactive'];
| function verify_lastactive() { $lastactive = &$this->data['lastactive'];
|
Zeile 810 | Zeile 803 |
---|
if($lastactive <= 0) { $lastactive = TIME_NOW;
|
if($lastactive <= 0) { $lastactive = TIME_NOW;
|
}
| }
|
return true;
}
| return true;
}
|
Zeile 850 | Zeile 843 |
---|
$this->set_error("missing_returndate"); return false; }
|
$this->set_error("missing_returndate"); return false; }
|
|
|
// Validate the return date lengths $user['away']['returndate'] = substr($returnday, 0, 2).'-'.substr($returnmonth, 0, 2).'-'.substr($returnyear, 0, 4); }
| // Validate the return date lengths $user['away']['returndate'] = substr($returnday, 0, 2).'-'.substr($returnmonth, 0, 2).'-'.substr($returnyear, 0, 4); }
|
Zeile 859 | Zeile 852 |
---|
/** * Verifies if a language is valid for this user or not.
|
/** * Verifies if a language is valid for this user or not.
|
*
| *
|
* @return boolean True when valid, false when invalid. */ function verify_language()
|
* @return boolean True when valid, false when invalid. */ function verify_language()
|
{ global $lang;
$language = &$this->data['language'];
// An invalid language has been specified?
| { global $lang;
$language = &$this->data['language'];
// An invalid language has been specified?
|
if($language != '' && !$lang->language_exists($language)) { $this->set_error("invalid_language");
|
if($language != '' && !$lang->language_exists($language)) { $this->set_error("invalid_language");
|
return false; } return true; }
/**
| return false; } return true; }
/**
|
* Verifies if a style is valid for this user or not. * * @return boolean True when valid, false when invalid.
| * Verifies if a style is valid for this user or not. * * @return boolean True when valid, false when invalid.
|
Zeile 885 | Zeile 878 |
---|
function verify_style() { global $lang;
|
function verify_style() { global $lang;
|
$user = &$this->data;
| $user = &$this->data;
|
if($user['style']) { $theme = get_theme($user['style']);
| if($user['style']) { $theme = get_theme($user['style']);
|
Zeile 906 | Zeile 899 |
---|
* Verifies if this is coming from a spam bot or not * * @return boolean True when valid, false when invalid.
|
* Verifies if this is coming from a spam bot or not * * @return boolean True when valid, false when invalid.
|
*/
| */
|
function verify_checkfields() { $user = &$this->data;
| function verify_checkfields() { $user = &$this->data;
|
Zeile 915 | Zeile 908 |
---|
if($user['regcheck1'] !== "" || $user['regcheck2'] !== "true") { $this->set_error("invalid_checkfield");
|
if($user['regcheck1'] !== "" || $user['regcheck2'] !== "true") { $this->set_error("invalid_checkfield");
|
return false;
| return false;
|
} return true; }
| } return true; }
|
Zeile 928 | Zeile 921 |
---|
*/ function verify_timezone() {
|
*/ function verify_timezone() {
|
| global $mybb;
|
$user = &$this->data;
|
$user = &$this->data;
|
|
|
$timezones = get_supported_timezones();
|
$timezones = get_supported_timezones();
|
|
|
if(!array_key_exists($user['timezone'], $timezones)) { $user['timezone'] = $mybb->settings['timezoneoffset'];
|
if(!array_key_exists($user['timezone'], $timezones)) { $user['timezone'] = $mybb->settings['timezoneoffset'];
|
return false; }
| return false; }
|
return true; }
| return true; }
|
Zeile 1016 | Zeile 1011 |
---|
$this->verify_referrer(); } if($this->method == "insert" || array_key_exists('options', $user))
|
$this->verify_referrer(); } if($this->method == "insert" || array_key_exists('options', $user))
|
{
| {
|
$this->verify_options(); } if($this->method == "insert" || array_key_exists('regdate', $user))
| $this->verify_options(); } if($this->method == "insert" || array_key_exists('regdate', $user))
|
Zeile 1095 | Zeile 1090 |
---|
$user = &$this->data;
|
$user = &$this->data;
|
$array = array('postnum', 'threadnum', 'avatar', 'avatartype', 'additionalgroups', 'displaygroup', 'icq', 'yahoo', 'skype', 'google', 'bday', 'signature', 'style', 'dateformat', 'timeformat', 'notepad');
| $array = array('postnum', 'threadnum', 'avatar', 'avatartype', 'additionalgroups', 'displaygroup', 'icq', 'skype', 'google', 'bday', 'signature', 'style', 'dateformat', 'timeformat', 'notepad');
|
foreach($array as $value) { if(!isset($user[$value])) { $user[$value] = ''; }
|
foreach($array as $value) { if(!isset($user[$value])) { $user[$value] = ''; }
|
| } // If user is being created from ACP, there is no last visit or last active if(defined('IN_ADMINCP')) { $user['lastvisit'] = $user['lastactive'] = 0;
|
}
$this->user_insert_data = array(
| }
$this->user_insert_data = array(
|
Zeile 1123 | Zeile 1124 |
---|
"lastvisit" => (int)$user['lastvisit'], "website" => $db->escape_string($user['website']), "icq" => (int)$user['icq'],
|
"lastvisit" => (int)$user['lastvisit'], "website" => $db->escape_string($user['website']), "icq" => (int)$user['icq'],
|
"yahoo" => $db->escape_string($user['yahoo']),
| |
"skype" => $db->escape_string($user['skype']), "google" => $db->escape_string($user['google']), "birthday" => $user['bday'],
| "skype" => $db->escape_string($user['skype']), "google" => $db->escape_string($user['google']), "birthday" => $user['bday'],
|
Zeile 1166 | Zeile 1166 |
---|
"referrals" => 0, "buddylist" => '', "ignorelist" => '',
|
"referrals" => 0, "buddylist" => '', "ignorelist" => '',
|
"pmfolders" => '',
| "pmfolders" => "0**$%%$1**$%%$2**$%%$3**$%%$4**",
|
"notepad" => '', "warningpoints" => 0, "moderateposts" => 0,
| "notepad" => '', "warningpoints" => 0, "moderateposts" => 0,
|
Zeile 1176 | Zeile 1176 |
---|
"coppauser" => (int)$user['coppa_user'], "classicpostbit" => (int)$user['options']['classicpostbit'], "usernotes" => ''
|
"coppauser" => (int)$user['coppa_user'], "classicpostbit" => (int)$user['options']['classicpostbit'], "usernotes" => ''
|
);
| );
|
if($user['options']['dstcorrection'] == 1)
|
if($user['options']['dstcorrection'] == 1)
|
{
| {
|
$this->user_insert_data['dst'] = 1;
|
$this->user_insert_data['dst'] = 1;
|
}
| }
|
elseif($user['options']['dstcorrection'] == 0) { $this->user_insert_data['dst'] = 0;
|
elseif($user['options']['dstcorrection'] == 0) { $this->user_insert_data['dst'] = 0;
|
}
| }
|
$plugins->run_hooks("datahandler_user_insert", $this);
| $plugins->run_hooks("datahandler_user_insert", $this);
|
Zeile 1205 | Zeile 1205 |
---|
} $user['user_fields']["fid{$profile_field['fid']}"] = ''; }
|
} $user['user_fields']["fid{$profile_field['fid']}"] = ''; }
|
}
| }
|
$db->insert_query("userfields", $user['user_fields'], false);
| $db->insert_query("userfields", $user['user_fields'], false);
|
Zeile 1224 | Zeile 1224 |
---|
if((int)$user['usergroup'] == 5) { $cache->update_awaitingactivation();
|
if((int)$user['usergroup'] == 5) { $cache->update_awaitingactivation();
|
}
| }
|
$this->return_values = array( "uid" => $this->uid, "username" => $user['username'],
| $this->return_values = array( "uid" => $this->uid, "username" => $user['username'],
|
Zeile 1255 | Zeile 1255 |
---|
die("The user needs to be validated before inserting it into the DB."); } if(count($this->get_errors()) > 0)
|
die("The user needs to be validated before inserting it into the DB."); } if(count($this->get_errors()) > 0)
|
{
| {
|
die("The user is not valid."); }
|
die("The user is not valid."); }
|
|
|
$user = &$this->data; $user['uid'] = (int)$user['uid']; $this->uid = $user['uid'];
// Set up the update data. if(isset($user['username']))
|
$user = &$this->data; $user['uid'] = (int)$user['uid']; $this->uid = $user['uid'];
// Set up the update data. if(isset($user['username']))
|
{
| {
|
$this->user_update_data['username'] = $db->escape_string($user['username']);
|
$this->user_update_data['username'] = $db->escape_string($user['username']);
|
}
| }
|
if(isset($user['password']))
|
if(isset($user['password']))
|
{
| {
|
$this->user_update_data['password'] = $user['password'];
|
$this->user_update_data['password'] = $user['password'];
|
}
| }
|
if(isset($user['salt'])) { $this->user_update_data['salt'] = $user['salt'];
|
if(isset($user['salt'])) { $this->user_update_data['salt'] = $user['salt'];
|
}
| }
|
if(isset($user['loginkey'])) { $this->user_update_data['loginkey'] = $user['loginkey']; } if(isset($user['email'])) {
|
if(isset($user['loginkey'])) { $this->user_update_data['loginkey'] = $user['loginkey']; } if(isset($user['email'])) {
|
$this->user_update_data['email'] = $user['email'];
| $this->user_update_data['email'] = $db->escape_string($user['email']);
|
} if(isset($user['postnum'])) {
| } if(isset($user['postnum'])) {
|
Zeile 1296 | Zeile 1296 |
---|
{ $this->user_update_data['avatar'] = $db->escape_string($user['avatar']); $this->user_update_data['avatartype'] = $db->escape_string($user['avatartype']);
|
{ $this->user_update_data['avatar'] = $db->escape_string($user['avatar']); $this->user_update_data['avatartype'] = $db->escape_string($user['avatartype']);
|
}
| }
|
if(isset($user['usergroup']))
|
if(isset($user['usergroup']))
|
{
| {
|
$this->user_update_data['usergroup'] = (int)$user['usergroup'];
|
$this->user_update_data['usergroup'] = (int)$user['usergroup'];
|
}
| }
|
if(isset($user['additionalgroups']))
|
if(isset($user['additionalgroups']))
|
{
| {
|
$this->user_update_data['additionalgroups'] = $db->escape_string($user['additionalgroups']); } if(isset($user['displaygroup']))
|
$this->user_update_data['additionalgroups'] = $db->escape_string($user['additionalgroups']); } if(isset($user['displaygroup']))
|
{
| {
|
$this->user_update_data['displaygroup'] = (int)$user['displaygroup'];
|
$this->user_update_data['displaygroup'] = (int)$user['displaygroup'];
|
}
| }
|
if(isset($user['usertitle']))
|
if(isset($user['usertitle']))
|
{
| {
|
$this->user_update_data['usertitle'] = $db->escape_string($user['usertitle']);
|
$this->user_update_data['usertitle'] = $db->escape_string($user['usertitle']);
|
}
| }
|
if(isset($user['regdate'])) { $this->user_update_data['regdate'] = (int)$user['regdate'];
|
if(isset($user['regdate'])) { $this->user_update_data['regdate'] = (int)$user['regdate'];
|
}
| }
|
if(isset($user['lastactive']))
|
if(isset($user['lastactive']))
|
{
| {
|
$this->user_update_data['lastactive'] = (int)$user['lastactive'];
|
$this->user_update_data['lastactive'] = (int)$user['lastactive'];
|
}
| }
|
if(isset($user['lastvisit']))
|
if(isset($user['lastvisit']))
|
{
| {
|
$this->user_update_data['lastvisit'] = (int)$user['lastvisit']; } if(isset($user['signature']))
|
$this->user_update_data['lastvisit'] = (int)$user['lastvisit']; } if(isset($user['signature']))
|
{
| {
|
$this->user_update_data['signature'] = $db->escape_string($user['signature']);
|
$this->user_update_data['signature'] = $db->escape_string($user['signature']);
|
}
| }
|
if(isset($user['website']))
|
if(isset($user['website']))
|
{
| {
|
$this->user_update_data['website'] = $db->escape_string($user['website']);
|
$this->user_update_data['website'] = $db->escape_string($user['website']);
|
}
| }
|
if(isset($user['icq']))
|
if(isset($user['icq']))
|
{
| {
|
$this->user_update_data['icq'] = (int)$user['icq'];
|
$this->user_update_data['icq'] = (int)$user['icq'];
|
} if(isset($user['yahoo'])) { $this->user_update_data['yahoo'] = $db->escape_string($user['yahoo']);
| |
} if(isset($user['skype'])) {
| } if(isset($user['skype'])) {
|
Zeile 1590 | Zeile 1586 |
---|
$plugins->run_hooks("datahandler_user_delete_end", $this);
// Update cache
|
$plugins->run_hooks("datahandler_user_delete_end", $this);
// Update cache
|
$cache->update_banned();
| |
$cache->update_moderators(); $cache->update_forumsdisplay(); $cache->update_reportedcontent();
| $cache->update_moderators(); $cache->update_forumsdisplay(); $cache->update_reportedcontent();
|
Zeile 1750 | Zeile 1745 |
---|
"website" => "", "birthday" => "", "icq" => "",
|
"website" => "", "birthday" => "", "icq" => "",
|
"yahoo" => "",
| |
"skype" => "", "google" => "", "usertitle" => "",
| "skype" => "", "google" => "", "usertitle" => "",
|
Zeile 1801 | Zeile 1795 |
---|
$parser_options = array( 'allow_html' => $mybb->settings['sightml'],
|
$parser_options = array( 'allow_html' => $mybb->settings['sightml'],
|
'filter_badwords' => 1,
| |
'allow_mycode' => $mybb->settings['sigmycode'], 'allow_smilies' => $mybb->settings['sigsmilies'], 'allow_imgcode' => $mybb->settings['sigimgcode'],
| 'allow_mycode' => $mybb->settings['sigmycode'], 'allow_smilies' => $mybb->settings['sigsmilies'], 'allow_imgcode' => $mybb->settings['sigimgcode'],
|
Zeile 1828 | Zeile 1821 |
---|
if($mybb->settings['sigcountmycode'] == 0) {
|
if($mybb->settings['sigcountmycode'] == 0) {
|
$parsed_sig = $parser->text_parse_message($this->data['signature']);
| $parsed_sig = $parser->text_parse_message($this->data['signature'], array('signature_parse' => '1'));
|
} else {
| } else {
|