Subversion-Projekte lars-tiefland.ci

Revision

Revision 2242 | Revision 2257 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2242 Revision 2254
Zeile 4... Zeile 4...
4
 *
4
 *
5
 * An open source application development framework for PHP
5
 * An open source application development framework for PHP
6
 *
6
 *
7
 * This content is released under the MIT License (MIT)
7
 * This content is released under the MIT License (MIT)
8
 *
8
 *
9
 * Copyright (c) 2014 - 2018, British Columbia Institute of Technology
9
 * Copyright (c) 2014 - 2017, British Columbia Institute of Technology
10
 *
10
 *
11
 * Permission is hereby granted, free of charge, to any person obtaining a copy
11
 * Permission is hereby granted, free of charge, to any person obtaining a copy
12
 * of this software and associated documentation files (the "Software"), to deal
12
 * of this software and associated documentation files (the "Software"), to deal
13
 * in the Software without restriction, including without limitation the rights
13
 * in the Software without restriction, including without limitation the rights
14
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
Zeile 27... Zeile 27...
27
 * THE SOFTWARE.
27
 * THE SOFTWARE.
28
 *
28
 *
29
 * @package	CodeIgniter
29
 * @package	CodeIgniter
30
 * @author	EllisLab Dev Team
30
 * @author	EllisLab Dev Team
31
 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
31
 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
32
 * @copyright	Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
32
 * @copyright	Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
33
 * @license	http://opensource.org/licenses/MIT	MIT License
33
 * @license	http://opensource.org/licenses/MIT	MIT License
34
 * @link	https://codeigniter.com
34
 * @link	https://codeigniter.com
35
 * @since	Version 3.0.0
35
 * @since	Version 3.0.0
36
 * @filesource
36
 * @filesource
37
 */
37
 */
Zeile 131... Zeile 131...
131
		if (empty($this->_db->conn_id) && ! $this->_db->db_connect())
131
		if (empty($this->_db->conn_id) && ! $this->_db->db_connect())
132
		{
132
		{
133
			return $this->_fail();
133
			return $this->_fail();
134
		}
134
		}
Zeile 135... Zeile -...
135
 
-
 
136
		$this->php5_validate_id();
-
 
137
 
135
 
138
		return $this->_success;
136
		return $this->_success;
Zeile 139... Zeile 137...
139
	}
137
	}
Zeile 340... Zeile 338...
340
		return ($this->_db->delete($this->_config['save_path'], 'timestamp < '.(time() - $maxlifetime)))
338
		return ($this->_db->delete($this->_config['save_path'], 'timestamp < '.(time() - $maxlifetime)))
341
			? $this->_success
339
			? $this->_success
342
			: $this->_fail();
340
			: $this->_fail();
343
	}
341
	}
Zeile 344... Zeile -...
344
 
-
 
345
	// --------------------------------------------------------------------
-
 
346
 
-
 
347
	/**
-
 
348
	 * Validate ID
-
 
349
	 *
-
 
350
	 * Checks whether a session ID record exists server-side,
-
 
351
	 * to enforce session.use_strict_mode.
-
 
352
	 *
-
 
353
	 * @param	string	$id
-
 
354
	 * @return	bool
-
 
355
	 */
-
 
356
	public function validateId($id)
-
 
357
	{
-
 
358
		// Prevent previous QB calls from messing with our queries
-
 
359
		$this->_db->reset_query();
-
 
360
 
-
 
361
		$this->_db->select('1')->from($this->_config['save_path'])->where('id', $id);
-
 
362
		empty($this->_config['match_ip']) OR $this->_db->where('ip_address', $_SERVER['REMOTE_ADDR']);
-
 
363
		$result = $this->_db->get();
-
 
364
		empty($result) OR $result = $result->row();
-
 
365
 
-
 
366
		return ! empty($result);
-
 
367
	}
-
 
368
 
342
 
Zeile 369... Zeile 343...
369
	// ------------------------------------------------------------------------
343
	// ------------------------------------------------------------------------
370
 
344
 
371
	/**
345
	/**