mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Patch CS consistency
This commit is contained in:
@@ -56,8 +56,9 @@ class patch_320alpha1b implements patchInterface
|
||||
public function apply(base $appbox, Application $app)
|
||||
{
|
||||
$sql = 'REPLACE INTO records_rights
|
||||
(SELECT null as id, usr_id, b.sbas_id, record_id, "1" as document
|
||||
, null as preview, "push" as `case`, pushFrom as pusher_usr_id
|
||||
(
|
||||
SELECT null as id, usr_id, b.sbas_id, record_id, "1" as document, null as preview
|
||||
, "push" as `case`, pushFrom as pusher_usr_id
|
||||
FROM sselcont c, ssel s, bas b
|
||||
WHERE c.ssel_id = s.ssel_id
|
||||
AND b.base_id = c.base_id AND c.canHD = 1
|
||||
|
@@ -56,7 +56,6 @@ class patch_320alpha2a implements patchInterface
|
||||
public function apply(base $appbox, Application $app)
|
||||
{
|
||||
$sql = 'SELECT * FROM usr WHERE nonce IS NULL';
|
||||
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
@@ -75,8 +75,7 @@ class patch_320alpha4b implements patchInterface
|
||||
|
||||
}
|
||||
|
||||
$sql = 'SELECT ssel_id, usr_id, name, descript, pub_date
|
||||
, updater, pub_restrict, homelink
|
||||
$sql = 'SELECT ssel_id, usr_id, name, descript, pub_date, updater, pub_restrict, homelink
|
||||
FROM ssel WHERE (public = "1" or homelink="1") and migrated = 0';
|
||||
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
|
@@ -57,7 +57,8 @@ class patch_360alpha2a implements patchInterface
|
||||
{
|
||||
|
||||
$sql = 'UPDATE usr SET usr_mail = NULL
|
||||
WHERE usr_mail IS NOT NULL AND usr_login LIKE "(#deleted%"';
|
||||
WHERE usr_mail IS NOT NULL
|
||||
AND usr_login LIKE "(#deleted%"';
|
||||
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
@@ -68,8 +68,10 @@ class patch_360alpha2b implements patchInterface
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = 'UPDATE metadatas SET updated = "0"
|
||||
WHERE meta_struct_id
|
||||
IN (SELECT id FROM metadatas_structure WHERE multi = "1")';
|
||||
WHERE meta_struct_id IN
|
||||
(
|
||||
SELECT id FROM metadatas_structure WHERE multi = "1"
|
||||
)';
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
@@ -69,5 +69,7 @@ class patch_370alpha3a implements patchInterface
|
||||
$client->set_type(\API_OAuth2_Application::DESKTOP_TYPE);
|
||||
$client->set_redirect_uri(\API_OAuth2_Application::NATIVE_APP_REDIRECT_URI);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,6 @@ class patch_370alpha4a implements patchInterface
|
||||
|
||||
public function apply(base $databox, Application $app)
|
||||
{
|
||||
|
||||
$sql = 'SELECT id, src FROM metadatas_structure';
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
@@ -153,7 +153,7 @@ class patch_370alpha7a implements patchInterface
|
||||
|
||||
$stmt->closeCursor();
|
||||
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
private function truncateTable(\Doctrine\ORM\EntityManager $em, $className)
|
||||
|
@@ -62,5 +62,7 @@ class patch_371alpha1a implements patchInterface
|
||||
foreach ($databox->get_meta_structure() as $databox_field) {
|
||||
$databox_field->save();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -65,5 +65,7 @@ class patch_380alpha10a implements patchInterface
|
||||
}
|
||||
|
||||
$stmt->closeCursor();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ class patch_380alpha11a implements patchInterface
|
||||
$stmt->closeCursor();
|
||||
} catch (\PDOException $e) {
|
||||
// this may fail on oldest versions
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($rs as $row) {
|
||||
@@ -115,5 +115,7 @@ class patch_380alpha11a implements patchInterface
|
||||
}
|
||||
|
||||
$app['EM']->flush();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -66,5 +66,7 @@ class patch_380alpha2a implements patchInterface
|
||||
}
|
||||
|
||||
$app['configuration']->setConfig($config);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -70,6 +70,6 @@ class patch_380alpha2b implements patchInterface
|
||||
$app['phraseanet.appbox']->get_connection()->exec($sql);
|
||||
}
|
||||
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -81,5 +81,7 @@ class patch_380alpha4a implements patchInterface
|
||||
|
||||
$app['EM']->flush();
|
||||
$app['EM']->clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -50,5 +50,7 @@ class patch_380alpha6a implements patchInterface
|
||||
{
|
||||
$app['configuration']->setDefault('registration-fields');
|
||||
$app['configuration']->setDefault('authentication');
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ class patch_380alpha8a implements patchInterface
|
||||
$stmt->closeCursor();
|
||||
|
||||
if (!$row) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
$sxe = simplexml_load_string($row['settings']);
|
||||
|
@@ -70,5 +70,7 @@ class patch_380alpha9a implements patchInterface
|
||||
$dom->loadXML($sxe->asXML());
|
||||
|
||||
$databox->saveStructure($dom);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -88,5 +88,7 @@ class patch_390alpha1a implements patchInterface
|
||||
|
||||
$em->flush();
|
||||
$em->clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -123,5 +123,7 @@ class patch_390alpha1b implements patchInterface
|
||||
$em->clear();
|
||||
|
||||
$em->getEventManager()->addEventSubscriber(new TimestampableListener());
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -68,6 +68,8 @@ class patch_390alpha2a implements patchInterface
|
||||
$this->updateModels($em, $conn);
|
||||
|
||||
$em->getEventManager()->addEventSubscriber(new TimestampableListener());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -84,5 +84,7 @@ class patch_390alpha3a implements patchInterface
|
||||
|
||||
$em->flush();
|
||||
$em->clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -89,5 +89,7 @@ class patch_390alpha4a implements patchInterface
|
||||
|
||||
$em->flush();
|
||||
$em->clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -85,5 +85,7 @@ class patch_390alpha5a implements patchInterface
|
||||
|
||||
$em->flush();
|
||||
$em->clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -80,8 +80,7 @@ class patch_390alpha6a implements patchInterface
|
||||
$rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = 'SELECT base_id, record_id, subdef, filename, folder, error,
|
||||
done, businessfields
|
||||
$sql = 'SELECT base_id, record_id, subdef, filename, folder, error, done, businessfields
|
||||
FROM ftp_export_elements
|
||||
WHERE ftp_export_id = :export_id';
|
||||
$stmt = $conn->prepare($sql);
|
||||
@@ -152,5 +151,7 @@ class patch_390alpha6a implements patchInterface
|
||||
$em->clear();
|
||||
|
||||
$em->getEventManager()->addEventSubscriber(new TimestampableListener());
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -220,5 +220,7 @@ class patch_390alpha7a implements patchInterface
|
||||
|
||||
$em->flush();
|
||||
$em->clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user