Subversion-Projekte lars-tiefland.ci

Revision

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

Revision 2254 Revision 2257
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 - 2017, British Columbia Institute of Technology
9
 * Copyright (c) 2014 - 2018, 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 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
32
 * @copyright	Copyright (c) 2014 - 2018, 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 1.3.0
35
 * @since	Version 1.3.0
36
 * @filesource
36
 * @filesource
37
 */
37
 */
Zeile 222... Zeile 222...
222
		/* If PHP was compiled with PostgreSQL lib versions earlier
222
		/* If PHP was compiled with PostgreSQL lib versions earlier
223
		 * than 7.4, pg_version() won't return the server version
223
		 * than 7.4, pg_version() won't return the server version
224
		 * and so we'll have to fall back to running a query in
224
		 * and so we'll have to fall back to running a query in
225
		 * order to get it.
225
		 * order to get it.
226
		 */
226
		 */
227
		return isset($pg_version['server'])
227
		return (isset($pg_version['server']) && preg_match('#^(\d+\.\d+)#', $pg_version['server'], $match))
228
			? $this->data_cache['version'] = $pg_version['server']
228
			? $this->data_cache['version'] = $match[1]
229
			: parent::version();
229
			: parent::version();
230
	}
230
	}
Zeile 231... Zeile 231...
231
 
231
 
Zeile 352... Zeile 352...
352
	 *
352
	 *
353
	 * @return	string
353
	 * @return	string
354
	 */
354
	 */
355
	public function insert_id()
355
	public function insert_id()
356
	{
356
	{
357
		$v = pg_version($this->conn_id);
357
		$v = $this->version();
358
		$v = isset($v['server']) ? $v['server'] : 0; // 'server' key is only available since PosgreSQL 7.4
-
 
Zeile 359... Zeile 358...
359
 
358
 
360
		$table	= (func_num_args() > 0) ? func_get_arg(0) : NULL;
359
		$table	= (func_num_args() > 0) ? func_get_arg(0) : NULL;
Zeile 361... Zeile 360...
361
		$column	= (func_num_args() > 1) ? func_get_arg(1) : NULL;
360
		$column	= (func_num_args() > 1) ? func_get_arg(1) : NULL;