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 1.0.0
35
 * @since	Version 1.0.0
36
 * @filesource
36
 * @filesource
37
 */
37
 */
Zeile 1526... Zeile 1526...
1526
		}
1526
		}
Zeile 1527... Zeile 1527...
1527
 
1527
 
1528
		return 'UPDATE '.$table.' SET '.implode(', ', $valstr)
1528
		return 'UPDATE '.$table.' SET '.implode(', ', $valstr)
1529
			.$this->_compile_wh('qb_where')
1529
			.$this->_compile_wh('qb_where')
1530
			.$this->_compile_order_by()
1530
			.$this->_compile_order_by()
1531
			.($this->qb_limit !== FALSE ? ' LIMIT '.$this->qb_limit : '');
1531
			.($this->qb_limit ? ' LIMIT '.$this->qb_limit : '');
Zeile 1532... Zeile 1532...
1532
	}
1532
	}
Zeile 1533... Zeile 1533...
1533
 
1533
 
Zeile 1924... Zeile 1924...
1924
				if ($field_exists === FALSE)
1924
				if ($field_exists === FALSE)
1925
				{
1925
				{
1926
					$i++;
1926
					$i++;
1927
				}
1927
				}
Zeile 1928... Zeile -...
1928
 
-
 
1929
				// dbprefix may've already been applied, with or without the identifier escaped
-
 
1930
				$ec = '(?<ec>'.preg_quote(is_array($this->_escape_char) ? $this->_escape_char[0] : $this->_escape_char).')?';
-
 
1931
				isset($ec[0]) && $ec .= '?'; // Just in case someone has disabled escaping by forcing an empty escape character
-
 
1932
 
1928
 
1933
				// Verify table prefix and replace if necessary
1929
				// Verify table prefix and replace if necessary
1934
				if ($this->swap_pre !== '' && preg_match('#^'.$ec.preg_quote($this->swap_pre).'#', $parts[$i]))
1930
				if ($this->swap_pre !== '' && strpos($parts[$i], $this->swap_pre) === 0)
1935
				{
1931
				{
1936
					$parts[$i] = preg_replace('#^'.$ec.preg_quote($this->swap_pre).'(\S+?)#', '\\1'.$this->dbprefix.'\\2', $parts[$i]);
1932
					$parts[$i] = preg_replace('/^'.$this->swap_pre.'(\S+?)/', $this->dbprefix.'\\1', $parts[$i]);
1937
				}
1933
				}
1938
				// We only add the table prefix if it does not already exist
1934
				// We only add the table prefix if it does not already exist
1939
				else
1935
				elseif (strpos($parts[$i], $this->dbprefix) !== 0)
1940
				{
1936
				{
1941
					preg_match('#^'.$ec.preg_quote($this->dbprefix).'#', $parts[$i]) OR $parts[$i] = $this->dbprefix.$parts[$i];
1937
					$parts[$i] = $this->dbprefix.$parts[$i];
Zeile 1942... Zeile 1938...
1942
				}
1938
				}
1943
 
1939
 
1944
				// Put the parts back together
1940
				// Put the parts back together