mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Update patch
This commit is contained in:
@@ -60,7 +60,7 @@ class patch_373 implements patchInterface
|
|||||||
public function apply(base $appbox, Application $app)
|
public function apply(base $appbox, Application $app)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT * FROM registry WHERE `key` = :key';
|
$sql = 'SELECT * FROM registry WHERE `key` = :key';
|
||||||
$stmt = $appbox->get_connection()->prepare($sql);
|
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||||
|
|
||||||
$Regbinaries = array(
|
$Regbinaries = array(
|
||||||
'GV_cli',
|
'GV_cli',
|
||||||
@@ -90,6 +90,8 @@ class patch_373 implements patchInterface
|
|||||||
'GV_pdftotext' => 'pdftotext_binary',
|
'GV_pdftotext' => 'pdftotext_binary',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$binaries = array();
|
||||||
|
|
||||||
foreach ($Regbinaries as $name) {
|
foreach ($Regbinaries as $name) {
|
||||||
$stmt->execute(array(':key' => $name));
|
$stmt->execute(array(':key' => $name));
|
||||||
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
|
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
@@ -103,7 +105,7 @@ class patch_373 implements patchInterface
|
|||||||
$app['phraseanet.configuration']->setBinaries(array('binaries' => $binaries));
|
$app['phraseanet.configuration']->setBinaries(array('binaries' => $binaries));
|
||||||
|
|
||||||
$sql = 'DELETE FROM registry WHERE `key` = :key';
|
$sql = 'DELETE FROM registry WHERE `key` = :key';
|
||||||
$stmt = $appbox->get_connection()->prepare($sql);
|
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||||
|
|
||||||
foreach ($Regbinaries as $name) {
|
foreach ($Regbinaries as $name) {
|
||||||
$stmt->execute(array(':key' => $name));
|
$stmt->execute(array(':key' => $name));
|
||||||
@@ -112,7 +114,7 @@ class patch_373 implements patchInterface
|
|||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
$sql = 'SELECT value FROM registry WHERE `key` = :key';
|
$sql = 'SELECT value FROM registry WHERE `key` = :key';
|
||||||
$stmt = $appbox->get_connection()->prepare($sql);
|
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||||
$stmt->execute(array(':key'=>'GV_sit'));
|
$stmt->execute(array(':key'=>'GV_sit'));
|
||||||
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
|
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
@@ -122,7 +124,7 @@ class patch_373 implements patchInterface
|
|||||||
$app['phraseanet.configuration']->setConfigurations($configs);
|
$app['phraseanet.configuration']->setConfigurations($configs);
|
||||||
|
|
||||||
$sql = 'DELETE FROM registry WHERE `key` = :key';
|
$sql = 'DELETE FROM registry WHERE `key` = :key';
|
||||||
$stmt = $appbox->get_connection()->prepare($sql);
|
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||||
$stmt->execute(array(':key'=>'GV_sit'));
|
$stmt->execute(array(':key'=>'GV_sit'));
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user