Subversion-Projekte lars-tiefland.ci

Revision

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

Revision 2049 Revision 2107
Zeile 357... Zeile 357...
357
	 * @param	string		$prefix		Cookie name prefix
357
	 * @param	string		$prefix		Cookie name prefix
358
	 * @param	bool		$secure		Whether to only transfer cookies via SSL
358
	 * @param	bool		$secure		Whether to only transfer cookies via SSL
359
	 * @param	bool		$httponly	Whether to only makes the cookie accessible via HTTP (no javascript)
359
	 * @param	bool		$httponly	Whether to only makes the cookie accessible via HTTP (no javascript)
360
	 * @return	void
360
	 * @return	void
361
	 */
361
	 */
362
	public function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE)
362
	public function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL)
363
	{
363
	{
364
		if (is_array($name))
364
		if (is_array($name))
365
		{
365
		{
366
			// always leave 'name' in last place, as the loop will break otherwise, due to $$item
366
			// always leave 'name' in last place, as the loop will break otherwise, due to $$item
367
			foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'httponly', 'name') as $item)
367
			foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'httponly', 'name') as $item)
Zeile 386... Zeile 386...
386
		if ($path === '/' && config_item('cookie_path') !== '/')
386
		if ($path === '/' && config_item('cookie_path') !== '/')
387
		{
387
		{
388
			$path = config_item('cookie_path');
388
			$path = config_item('cookie_path');
389
		}
389
		}
Zeile 390... Zeile 390...
390
 
390
 
391
		if ($secure === FALSE && config_item('cookie_secure') === TRUE)
-
 
392
		{
391
		$secure = ($secure === NULL && config_item('cookie_secure') !== NULL)
393
			$secure = config_item('cookie_secure');
392
			? (bool) config_item('cookie_secure')
394
		}
393
			: (bool) $secure;
395
 
394
 
396
		if ($httponly === FALSE && config_item('cookie_httponly') !== FALSE)
-
 
397
		{
395
		$httponly = ($httponly === NULL && config_item('cookie_httponly') !== NULL)
398
			$httponly = config_item('cookie_httponly');
396
			? (bool) config_item('cookie_httponly')
Zeile 399... Zeile 397...
399
		}
397
			: (bool) $httponly;
400
 
398
 
401
		if ( ! is_numeric($expire))
399
		if ( ! is_numeric($expire))
402
		{
400
		{