mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for Ticket #2101.
Changed Helper::loadConfig() to accept a param with the name of the file to load git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4589 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
59908ac629
commit
a9c128b0ec
2 changed files with 9 additions and 6 deletions
|
@ -1424,7 +1424,7 @@ class DboSource extends DataSource {
|
|||
$data = $this->name($key) . ' IS NULL';
|
||||
} elseif($value === '') {
|
||||
$data = $this->name($key) . " = ''";
|
||||
} elseif (preg_match('/^([a-z]*\\([a-z0-9]*\\)\\x20?|(?:' . join('\\x20)|(?:', $this->__sqlOps) . '\\x20)|<=?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)?(.*)/i', $value, $match)) {
|
||||
} elseif (preg_match('/^([a-z]*\\([a-z0-9]*\\)\\x20?|(?:' . join('\\x20)|(?:', $this->__sqlOps) . '\\x20)|<[>=]?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)?(.*)/i', $value, $match)) {
|
||||
if (preg_match('/(\\x20[\\w]*\\x20)/', $key, $regs)) {
|
||||
$clause = $regs['1'];
|
||||
$key = preg_replace('/' . $regs['1'] . '/', '', $key);
|
||||
|
|
|
@ -151,12 +151,15 @@ class Helper extends Overloadable {
|
|||
/**
|
||||
* Parses tag templates into $this->tags.
|
||||
*
|
||||
* @return void
|
||||
* @param $name file name
|
||||
* @return array merged tags from config/$name.php
|
||||
*/
|
||||
function loadConfig() {
|
||||
if (file_exists(APP . 'config' . DS . 'tags.php')) {
|
||||
require(APP . 'config' . DS . 'tags.php');
|
||||
$this->tags = am($this->tags, $tags);
|
||||
function loadConfig($name = 'tags') {
|
||||
if (file_exists(APP . 'config' . DS . $name .'.php')) {
|
||||
require(APP . 'config' . DS . $name .'.php');
|
||||
if(isset($tags)) {
|
||||
$this->tags = am($this->tags, $tags);
|
||||
}
|
||||
}
|
||||
return $this->tags;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue