Zeile 72 | Zeile 72 |
---|
{ $query = $db->simple_select("sessions", "*", "sid='{$sid}'"); $session = $db->fetch_array($query);
|
{ $query = $db->simple_select("sessions", "*", "sid='{$sid}'"); $session = $db->fetch_array($query);
|
if(!empty($session) && $session['sid'])
| if($session)
|
{ $this->sid = $session['sid']; }
| { $this->sid = $session['sid']; }
|
Zeile 121 | Zeile 121 |
---|
if($this->sid && (!isset($mybb->cookies['sid']) || $mybb->cookies['sid'] != $this->sid) && $this->is_spider != true) { my_setcookie("sid", $this->sid, -1, true);
|
if($this->sid && (!isset($mybb->cookies['sid']) || $mybb->cookies['sid'] != $this->sid) && $this->is_spider != true) { my_setcookie("sid", $this->sid, -1, true);
|
| }
if(isset($plugins)) { $plugins->run_hooks('post_session_load', $this);
|
} }
| } }
|
Zeile 144 | Zeile 149 |
---|
LIMIT 1 "); $mybb->user = $db->fetch_array($query);
|
LIMIT 1 "); $mybb->user = $db->fetch_array($query);
|
|
|
// Check the password if we're not using a session
|
// Check the password if we're not using a session
|
if(empty($loginkey) || $loginkey !== $mybb->user['loginkey'] || !$mybb->user['uid'])
| if(!$mybb->user || empty($loginkey) || $loginkey !== $mybb->user['loginkey'])
|
{ unset($mybb->user); $this->uid = 0;
| { unset($mybb->user); $this->uid = 0;
|
Zeile 181 | Zeile 186 |
---|
$mybb->user['pms_unread'] = $mybb->user['unreadpms'];
if($mybb->user['lastip'] != $this->packedip && array_key_exists('lastip', $mybb->user) && !defined('IN_UPGRADE'))
|
$mybb->user['pms_unread'] = $mybb->user['unreadpms'];
if($mybb->user['lastip'] != $this->packedip && array_key_exists('lastip', $mybb->user) && !defined('IN_UPGRADE'))
|
{
| {
|
$lastip_add = ", lastip=".$db->escape_binary($this->packedip); } else
| $lastip_add = ", lastip=".$db->escape_binary($this->packedip); } else
|
Zeile 357 | Zeile 362 |
---|
$mybb->user['moderateposts'] = 0; $mybb->user['showquickreply'] = 1; $mybb->user['signature'] = '';
|
$mybb->user['moderateposts'] = 0; $mybb->user['showquickreply'] = 1; $mybb->user['signature'] = '';
|
| $mybb->user['sourceeditor'] = 0; $mybb->user['subscriptionmethod'] = 0;
|
$mybb->user['suspendposting'] = 0;
|
$mybb->user['suspendposting'] = 0;
|
|
|
// Has this user visited before? Lastvisit need updating? if(isset($mybb->cookies['mybb']['lastvisit'])) {
| // Has this user visited before? Lastvisit need updating? if(isset($mybb->cookies['mybb']['lastvisit'])) {
|
Zeile 366 | Zeile 373 |
---|
{ $mybb->user['lastactive'] = $time; $mybb->cookies['mybb']['lastactive'] = $mybb->user['lastactive'];
|
{ $mybb->user['lastactive'] = $time; $mybb->cookies['mybb']['lastactive'] = $mybb->user['lastactive'];
|
}
| }
|
else { $mybb->user['lastactive'] = (int)$mybb->cookies['mybb']['lastactive']; }
|
else { $mybb->user['lastactive'] = (int)$mybb->cookies['mybb']['lastactive']; }
|
if($time - $mybb->cookies['mybb']['lastactive'] > 900)
| if($time - (int)$mybb->cookies['mybb']['lastactive'] > 900)
|
{ my_setcookie("mybb[lastvisit]", $mybb->user['lastactive']); $mybb->user['lastvisit'] = $mybb->user['lastactive'];
| { my_setcookie("mybb[lastvisit]", $mybb->user['lastactive']); $mybb->user['lastvisit'] = $mybb->user['lastactive'];
|
Zeile 396 | Zeile 403 |
---|
$mybb->usergroup = usergroup_permissions($mybbgroups); $mydisplaygroup = usergroup_displaygroup($mybb->user['displaygroup']); if(is_array($mydisplaygroup))
|
$mybb->usergroup = usergroup_permissions($mybbgroups); $mydisplaygroup = usergroup_displaygroup($mybb->user['displaygroup']); if(is_array($mydisplaygroup))
|
{
| {
|
$mybb->usergroup = array_merge($mybb->usergroup, $mydisplaygroup); }
| $mybb->usergroup = array_merge($mybb->usergroup, $mydisplaygroup); }
|
Zeile 404 | Zeile 411 |
---|
if(!defined("NO_ONLINE") && !defined('IN_UPGRADE')) { if(!empty($this->sid))
|
if(!defined("NO_ONLINE") && !defined('IN_UPGRADE')) { if(!empty($this->sid))
|
{
| {
|
$this->update_session($this->sid); } else
| $this->update_session($this->sid); } else
|
Zeile 418 | Zeile 425 |
---|
* Load a search engine spider. * * @param int $spider_id The ID of the search engine spider
|
* Load a search engine spider. * * @param int $spider_id The ID of the search engine spider
|
*/
| */
|
function load_spider($spider_id) { global $mybb, $time, $db, $lang;
| function load_spider($spider_id) { global $mybb, $time, $db, $lang;
|
Zeile 572 | Zeile 579 |
---|
*/ function get_special_locations() {
|
*/ function get_special_locations() {
|
global $mybb;
| global $mybb, $db;
|
$array = array('1' => '', '2' => ''); if(preg_match("#forumdisplay.php#", $_SERVER['PHP_SELF']) && $mybb->get_input('fid', MyBB::INPUT_INT) > 0 && $mybb->get_input('fid', MyBB::INPUT_INT) < 4294967296) { $array[1] = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$array = array('1' => '', '2' => ''); if(preg_match("#forumdisplay.php#", $_SERVER['PHP_SELF']) && $mybb->get_input('fid', MyBB::INPUT_INT) > 0 && $mybb->get_input('fid', MyBB::INPUT_INT) < 4294967296) { $array[1] = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$array[2] = '';
| |
} elseif(preg_match("#showthread.php#", $_SERVER['PHP_SELF'])) {
|
} elseif(preg_match("#showthread.php#", $_SERVER['PHP_SELF'])) {
|
global $db;
| |
if($mybb->get_input('tid', MyBB::INPUT_INT) > 0 && $mybb->get_input('tid', MyBB::INPUT_INT) < 4294967296)
|
if($mybb->get_input('tid', MyBB::INPUT_INT) > 0 && $mybb->get_input('tid', MyBB::INPUT_INT) < 4294967296)
|
{
| {
|
$array[2] = $mybb->get_input('tid', MyBB::INPUT_INT);
|
$array[2] = $mybb->get_input('tid', MyBB::INPUT_INT);
|
}
| }
|
// If there is no tid but a pid, trick the system into thinking there was a tid anyway. elseif(isset($mybb->input['pid']) && !empty($mybb->input['pid']))
|
// If there is no tid but a pid, trick the system into thinking there was a tid anyway. elseif(isset($mybb->input['pid']) && !empty($mybb->input['pid']))
|
{
| {
|
$options = array( "limit" => 1 ); $query = $db->simple_select("posts", "tid", "pid=".$mybb->get_input('pid', MyBB::INPUT_INT), $options); $post = $db->fetch_array($query);
|
$options = array( "limit" => 1 ); $query = $db->simple_select("posts", "tid", "pid=".$mybb->get_input('pid', MyBB::INPUT_INT), $options); $post = $db->fetch_array($query);
|
$array[2] = $post['tid']; }
| if($post) { $array[2] = $post['tid']; } }
|
$thread = get_thread($array[2]);
|
$thread = get_thread($array[2]);
|
$array[1] = $thread['fid'];
| if($thread) { $array[1] = $thread['fid']; }
|
} return $array; }
| } return $array; }
|