mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 23:43:12 +00:00
Add some minor adjustments
Fix CS Fix CS Fix CS
This commit is contained in:
@@ -43,7 +43,7 @@ class module_report_sqlfilter
|
|||||||
$coll_filter = array();
|
$coll_filter = array();
|
||||||
foreach (array_filter(explode(',', $list_coll_id)) as $val) {
|
foreach (array_filter(explode(',', $list_coll_id)) as $val) {
|
||||||
$val = \phrasea::collFromBas($app, $val);
|
$val = \phrasea::collFromBas($app, $val);
|
||||||
if (!!$val) {
|
if ($val) {
|
||||||
$coll_filter[] = 'log_colls.coll_id = ' . $val;
|
$coll_filter[] = 'log_colls.coll_id = ' . $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -75,20 +75,30 @@ class patch_380a3 implements patchInterface
|
|||||||
DECLARE i INT DEFAULT 0;
|
DECLARE i INT DEFAULT 0;
|
||||||
DECLARE dest_coll_id INT;
|
DECLARE dest_coll_id INT;
|
||||||
DECLARE done INT DEFAULT 0;
|
DECLARE done INT DEFAULT 0;
|
||||||
DECLARE cur1 CURSOR FOR SELECT l.id, l.coll_list FROM log l LEFT JOIN log_colls lc ON (lc.log_id = l.id) WHERE (lc.log_id IS NULL) AND coll_list != '';
|
DECLARE result_set CURSOR FOR
|
||||||
|
SELECT l.id, l.coll_list
|
||||||
|
FROM log l
|
||||||
|
LEFT JOIN log_colls lc ON (lc.log_id = l.id)
|
||||||
|
WHERE (lc.log_id IS NULL) AND coll_list != '';
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
|
||||||
OPEN cur1;
|
OPEN result_set;
|
||||||
read_loop: LOOP
|
read_loop: LOOP
|
||||||
FETCH cur1 INTO l_log_id, l_coll_list;
|
FETCH result_set INTO l_log_id, l_coll_list;
|
||||||
IF done THEN
|
IF done THEN
|
||||||
LEAVE read_loop;
|
LEAVE read_loop;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SET occurance = (SELECT LENGTH(l_coll_list) - LENGTH(REPLACE(l_coll_list, bound, ''))+1);
|
SET occurance = (SELECT LENGTH(l_coll_list) - LENGTH(REPLACE(l_coll_list, bound, ''))+1);
|
||||||
SET i=1;
|
SET i=1;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
WHILE i <= occurance DO
|
WHILE i <= occurance DO
|
||||||
SET dest_coll_id = (SELECT REPLACE(SUBSTRING(SUBSTRING_INDEX(l_coll_list, bound, i), LENGTH(SUBSTRING_INDEX(l_coll_list, bound, i - 1)) + 1), ',', ''));
|
SET dest_coll_id = (SELECT REPLACE(
|
||||||
|
SUBSTRING(
|
||||||
|
SUBSTRING_INDEX(l_coll_list, bound, i),
|
||||||
|
LENGTH(SUBSTRING_INDEX(l_coll_list, bound, i - 1)) + 1
|
||||||
|
),
|
||||||
|
',',
|
||||||
|
''
|
||||||
|
));
|
||||||
IF dest_coll_id > 0 THEN
|
IF dest_coll_id > 0 THEN
|
||||||
INSERT INTO log_colls VALUES (null, l_log_id, dest_coll_id);
|
INSERT INTO log_colls VALUES (null, l_log_id, dest_coll_id);
|
||||||
END IF;
|
END IF;
|
||||||
@@ -96,7 +106,7 @@ class patch_380a3 implements patchInterface
|
|||||||
END WHILE;
|
END WHILE;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
CLOSE cur1;
|
CLOSE result_set;
|
||||||
END;";
|
END;";
|
||||||
|
|
||||||
$stmt = $conn->prepare($procedure);
|
$stmt = $conn->prepare($procedure);
|
||||||
|
@@ -489,7 +489,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
*/
|
*/
|
||||||
public function move_to_collection(collection $collection, appbox $appbox)
|
public function move_to_collection(collection $collection, appbox $appbox)
|
||||||
{
|
{
|
||||||
if ($collection->get_base_id() === $this->get_collection()->get_base_id()) {
|
if ($this->get_collection()->get_base_id() === $collection->get_base_id()) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,6 +25,9 @@ require_once __DIR__ . "/../../vendor/autoload.php";
|
|||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo Remove this in next refactor
|
||||||
|
*/
|
||||||
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
||||||
|
|
||||||
$app->addLocale($event);
|
$app->addLocale($event);
|
||||||
|
@@ -24,7 +24,9 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
|||||||
require_once __DIR__ . "/../../vendor/autoload.php";
|
require_once __DIR__ . "/../../vendor/autoload.php";
|
||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
/**
|
||||||
|
* @todo Remove this in next refactor
|
||||||
|
*/
|
||||||
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
||||||
|
|
||||||
$app->addLocale($event);
|
$app->addLocale($event);
|
||||||
|
@@ -76,7 +76,9 @@ foreach ($popbases as $key => $val) {
|
|||||||
$selection[$id_sbas]['liste'] = $liste;
|
$selection[$id_sbas]['liste'] = $liste;
|
||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
/**
|
||||||
|
* @todo Remove this in next refactor
|
||||||
|
*/
|
||||||
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
||||||
|
|
||||||
$app->addLocale($event);
|
$app->addLocale($event);
|
||||||
|
@@ -56,7 +56,9 @@ $parm = $request->get_parms("dmin", // date minimal of the reporting
|
|||||||
|
|
||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
/**
|
||||||
|
* @todo Remove this in next refactor
|
||||||
|
*/
|
||||||
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
||||||
|
|
||||||
$app->addLocale($event);
|
$app->addLocale($event);
|
||||||
|
@@ -23,8 +23,11 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
|||||||
|
|
||||||
require_once __DIR__ . "/../../vendor/autoload.php";
|
require_once __DIR__ . "/../../vendor/autoload.php";
|
||||||
|
|
||||||
$app = new Application('dev');
|
$app = new Application();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo Remove this in next refactor
|
||||||
|
*/
|
||||||
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
||||||
|
|
||||||
$app->addLocale($event);
|
$app->addLocale($event);
|
||||||
|
@@ -24,6 +24,9 @@ require_once __DIR__ . "/../../vendor/autoload.php";
|
|||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo Remove this in next refactor
|
||||||
|
*/
|
||||||
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
||||||
|
|
||||||
$app->addLocale($event);
|
$app->addLocale($event);
|
||||||
|
@@ -58,6 +58,9 @@ $param = $request->get_parms(
|
|||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo Remove this in next refactor
|
||||||
|
*/
|
||||||
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
$event = new GetResponseEvent($app, Request::createFromGlobals(), HttpKernelInterface::MASTER_REQUEST);
|
||||||
|
|
||||||
$app->addLocale($event);
|
$app->addLocale($event);
|
||||||
|
Reference in New Issue
Block a user