PHRAS-508_acl-cache

- fix ref on pdo stmt
This commit is contained in:
Jean-Yves Gaulier
2016-10-27 18:32:39 +02:00
parent ce0aeaff0e
commit e42bb376f8
5 changed files with 6 additions and 3 deletions

View File

@@ -118,7 +118,7 @@ class RecordIndex implements MappingProvider
$child->setAnalyzer('keyword', 'searching'); $child->setAnalyzer('keyword', 'searching');
$child->addChild((new Mapping\StringFieldMapping('raw'))->enableRawIndexing()); $child->addChild((new Mapping\StringFieldMapping('raw'))->enableRawIndexing());
$thesaurusMapping->addChild($thesaurusMapping); $thesaurusMapping->addChild($child);
} }
return $thesaurusMapping; return $thesaurusMapping;

View File

@@ -1152,8 +1152,9 @@ class ACL implements cache_cacheableInterface
return $this; return $this;
} }
private function try_give_access_to_base_insert(&$stmt, $base_id, $usr_id) private function try_give_access_to_base_insert(PDOStatement $stmt, $base_id, $usr_id)
{ {
$stmt = null;
$inserted = false; $inserted = false;
try { try {
$stmt->execute([':base_id' => $base_id, ':usr_id' => $usr_id]); $stmt->execute([':base_id' => $base_id, ':usr_id' => $usr_id]);
@@ -1169,7 +1170,7 @@ class ACL implements cache_cacheableInterface
return $inserted; return $inserted;
} }
private function try_give_access_to_base_update(&$stmt, $base_id, $usr_id) private function try_give_access_to_base_update(PDOStatement $stmt, $base_id, $usr_id)
{ {
$stmt->execute([':base_id' => $base_id, ':usr_id' => $usr_id]); $stmt->execute([':base_id' => $base_id, ':usr_id' => $usr_id]);
$stmt->closeCursor(); $stmt->closeCursor();

View File

@@ -5,6 +5,7 @@ languages:
main: main:
maintenance: false maintenance: false
key: '' key: ''
api_require_ssl: true
database: database:
host: 'sql-host' host: 'sql-host'
port: 3306 port: 3306

View File

@@ -5,6 +5,7 @@ languages:
main: main:
maintenance: false maintenance: false
key: '' key: ''
api_require_ssl: true
database: database:
host: 'sql-host' host: 'sql-host'
port: 3306 port: 3306

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB