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 133... Zeile 133...
133
	 * exist it is instantiated and set to a static variable. If it has
133
	 * exist it is instantiated and set to a static variable. If it has
134
	 * previously been instantiated the variable is returned.
134
	 * previously been instantiated the variable is returned.
135
	 *
135
	 *
136
	 * @param	string	the class name being requested
136
	 * @param	string	the class name being requested
137
	 * @param	string	the directory where the class should be found
137
	 * @param	string	the directory where the class should be found
138
	 * @param	string	an optional argument to pass to the class constructor
138
	 * @param	mixed	an optional argument to pass to the class constructor
139
	 * @return	object
139
	 * @return	object
140
	 */
140
	 */
141
	function &load_class($class, $directory = 'libraries', $param = NULL)
141
	function &load_class($class, $directory = 'libraries', $param = NULL)
142
	{
142
	{
143
		static $_classes = array();
143
		static $_classes = array();
Zeile 317... Zeile 317...
317
	{
317
	{
318
		static $_mimes;
318
		static $_mimes;
Zeile 319... Zeile 319...
319
 
319
 
320
		if (empty($_mimes))
320
		if (empty($_mimes))
-
 
321
		{
-
 
322
			$_mimes = file_exists(APPPATH.'config/mimes.php')
-
 
323
				? include(APPPATH.'config/mimes.php')
-
 
324
				: array();
321
		{
325
 
322
			if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
326
			if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
323
			{
327
			{
324
				$_mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
-
 
325
			}
-
 
326
			elseif (file_exists(APPPATH.'config/mimes.php'))
-
 
327
			{
-
 
328
				$_mimes = include(APPPATH.'config/mimes.php');
-
 
329
			}
-
 
330
			else
-
 
331
			{
-
 
332
				$_mimes = array();
328
				$_mimes = array_merge($_mimes, include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'));
333
			}
329
			}
Zeile 334... Zeile 330...
334
		}
330
		}
335
 
331
 
Zeile 408... Zeile 404...
408
	{
404
	{
409
		$status_code = abs($status_code);
405
		$status_code = abs($status_code);
410
		if ($status_code < 100)
406
		if ($status_code < 100)
411
		{
407
		{
412
			$exit_status = $status_code + 9; // 9 is EXIT__AUTO_MIN
408
			$exit_status = $status_code + 9; // 9 is EXIT__AUTO_MIN
413
			if ($exit_status > 125) // 125 is EXIT__AUTO_MAX
-
 
414
			{
-
 
415
				$exit_status = 1; // EXIT_ERROR
-
 
416
			}
-
 
417
 
-
 
418
			$status_code = 500;
409
			$status_code = 500;
419
		}
410
		}
420
		else
411
		else
421
		{
412
		{
422
			$exit_status = 1; // EXIT_ERROR
413
			$exit_status = 1; // EXIT_ERROR
Zeile 569... Zeile 560...
569
		}
560
		}
Zeile 570... Zeile 561...
570
 
561
 
571
		if (strpos(PHP_SAPI, 'cgi') === 0)
562
		if (strpos(PHP_SAPI, 'cgi') === 0)
572
		{
563
		{
-
 
564
			header('Status: '.$code.' '.$text, TRUE);
573
			header('Status: '.$code.' '.$text, TRUE);
565
			return;
574
		}
-
 
575
		else
566
		}
576
		{
567
 
-
 
568
		$server_protocol = (isset($_SERVER['SERVER_PROTOCOL']) && in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP/1.0', 'HTTP/1.1', 'HTTP/2'), TRUE))
577
			$server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
569
			? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
578
			header($server_protocol.' '.$code.' '.$text, TRUE, $code);
-
 
579
		}
570
		header($server_protocol.' '.$code.' '.$text, TRUE, $code);
580
	}
571
	}
Zeile 581... Zeile 572...
581
}
572
}
Zeile 722... Zeile 713...
722
		// carriage return (dec 13) and horizontal tab (dec 09)
713
		// carriage return (dec 13) and horizontal tab (dec 09)
723
		if ($url_encoded)
714
		if ($url_encoded)
724
		{
715
		{
725
			$non_displayables[] = '/%0[0-8bcef]/i';	// url encoded 00-08, 11, 12, 14, 15
716
			$non_displayables[] = '/%0[0-8bcef]/i';	// url encoded 00-08, 11, 12, 14, 15
726
			$non_displayables[] = '/%1[0-9a-f]/i';	// url encoded 16-31
717
			$non_displayables[] = '/%1[0-9a-f]/i';	// url encoded 16-31
-
 
718
			$non_displayables[] = '/%7f/i';	// url encoded 127
727
		}
719
		}
Zeile 728... Zeile 720...
728
 
720
 
Zeile 729... Zeile 721...
729
		$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S';	// 00-08, 11, 12, 14-31, 127
721
		$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S';	// 00-08, 11, 12, 14-31, 127
Zeile 825... Zeile 817...
825
	 * setting, but not for *suhosin.executor.func.blacklist* and
817
	 * setting, but not for *suhosin.executor.func.blacklist* and
826
	 * *suhosin.executor.disable_eval*. These settings will just
818
	 * *suhosin.executor.disable_eval*. These settings will just
827
	 * terminate script execution if a disabled function is executed.
819
	 * terminate script execution if a disabled function is executed.
828
	 *
820
	 *
829
	 * The above described behavior turned out to be a bug in Suhosin,
821
	 * The above described behavior turned out to be a bug in Suhosin,
830
	 * but even though a fix was commited for 0.9.34 on 2012-02-12,
822
	 * but even though a fix was committed for 0.9.34 on 2012-02-12,
831
	 * that version is yet to be released. This function will therefore
823
	 * that version is yet to be released. This function will therefore
832
	 * be just temporary, but would probably be kept for a few years.
824
	 * be just temporary, but would probably be kept for a few years.
833
	 *
825
	 *
834
	 * @link	http://www.hardened-php.net/suhosin/
826
	 * @link	http://www.hardened-php.net/suhosin/
835
	 * @param	string	$function_name	Function to check for
827
	 * @param	string	$function_name	Function to check for