Cs fixes
This commit is contained in:
parent
f0234db13c
commit
5eb5ec79e4
1 changed files with 6 additions and 6 deletions
12
api.php
12
api.php
|
|
@ -705,7 +705,7 @@ class SQLServer implements DatabaseInterface {
|
|||
case 'nsis': return array('!.STIsSimple()=0',$field);
|
||||
case 'nsiv': return array('!.STIsValid()=0',$field);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1154,7 +1154,7 @@ class PHP_CRUD_API {
|
|||
protected function convertFilter($field, $comparator, $value) {
|
||||
$result = $this->db->convertFilter($field,$comparator,$value);
|
||||
if ($result) return $result;
|
||||
// default behavior
|
||||
// default behavior
|
||||
$comparator = strtolower($comparator);
|
||||
if ($comparator[0]!='n') {
|
||||
if (strlen($comparator)==2) {
|
||||
|
|
@ -1896,7 +1896,7 @@ class PHP_CRUD_API {
|
|||
$get = isset($get)?$get:null;
|
||||
$post = isset($post)?$post:null;
|
||||
$origin = isset($origin)?$origin:null;
|
||||
|
||||
|
||||
// defaults
|
||||
if (!$dbengine) {
|
||||
$dbengine = 'MySQL';
|
||||
|
|
@ -2013,7 +2013,7 @@ class PHP_CRUD_API {
|
|||
$table_list = array($table['name']);
|
||||
$table_fields = $this->findFields($table_list,false,$database);
|
||||
$table_names = array_map(function($v){ return $v['name'];},$tables);
|
||||
|
||||
|
||||
if ($extensions) {
|
||||
$result = $this->db->query($this->db->getSql('reflect_belongs_to'),array($table_list[0],$table_names,$database,$database));
|
||||
while ($row = $this->db->fetchRow($result)) {
|
||||
|
|
@ -2028,7 +2028,7 @@ class PHP_CRUD_API {
|
|||
$table_fields[$table['name']][$primaryKey]->primaryKey = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (array('root_actions','id_actions') as $path) {
|
||||
foreach ($table[$path] as $i=>$action) {
|
||||
$table_list = array($table['name']);
|
||||
|
|
@ -2296,7 +2296,7 @@ class PHP_CRUD_API {
|
|||
header('Access-Control-Allow-Origin: *');
|
||||
} else {
|
||||
if ($origin) foreach (explode(',',$allowOrigins) as $o) {
|
||||
if (preg_match('/^'.str_replace('\*','.*',preg_quote(strtolower(trim($o)))).'$/',$origin)) {
|
||||
if (preg_match('/^'.str_replace('\*','.*',preg_quote(strtolower(trim($o)))).'$/',$origin)) {
|
||||
header('Access-Control-Allow-Origin: '.$origin);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue