Commit d1fc0bd2 authored by Patrick Barroca's avatar Patrick Barroca 🐧

Merge branch 'hotline' into 'master'

Hotline

See merge request !3167
parents 3c02fc5a c6f20b5f
Pipeline #7629 passed with stage
in 38 minutes and 13 seconds
01/07/2019 - v8.0.19
- ticket #93469 : Indexation : Ajout d'un script de nettoyage des facettes dynamiques obsolètes
- ticket #94248 : SIGB VSmart : Mise à jour le l'ip API
24/06/2019 - v8.0.18
- ticket #77694 : Administration : Bokeh permet la suppression d'utilisateurs par lot correspondant aux critères de recherche sélectionnés
......
......@@ -20,7 +20,7 @@
*/
class Class_WebService_SIGB_VSmart_Service extends Class_WebService_SIGB_AbstractRESTService {
const MOULINS_POPUP_SERVER = '46.20.169.9/moulins';
const MOULINS_POPUP_SERVER = '77.159.173.139/moulins';
const METAINSTITUTION = 'RES';
const CONSULTATION_TAG = 'PATIMP';
......
......@@ -81,7 +81,7 @@ class Bokeh_Engine {
function setupConstants() {
defineConstant('BOKEH_MAJOR_VERSION','8.0');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.18');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.19');
defineConstant('BOKEH_REMOTE_FILES', 'http://git.afi-sa.fr/afi/opacce/');
......
<?php
error_reporting(E_ERROR | E_PARSE);
require(__DIR__.'/../console.php');
echo "\n\nWelcome to the iFacetsCleaner Platinum tool by @patbator\n\n";
class Scripts_Local_DynamicFacets_Cleaner {
public function clean($record) {
$existing = array_filter(explode(' ', $record->getFacettes()));
foreach($existing as $facet)
$is_hmot = $is_hmot || 'MOTC' == substr($facet, 1, 4);
if (!$is_hmot)
return;
echo '.';
$facets = [];
foreach($existing as $facet) {
if ((Class_CodifThesaurus::CODE_FACETTE != substr($facet, 0, 1))
|| (1 == Class_CodifThesaurus::countBy(['id_thesaurus' => substr($facet, 1)])))
$facets[] = $facet;
}
$record->setFacettes($facets);
$record->save();
}
}
$cleaner = new Scripts_Local_DynamicFacets_Cleaner();
$page = 1;
while ($records = Class_Notice::findAllBy(['type' => Class_Notice::TYPE_BIBLIOGRAPHIC,
'limitPage' => [$page, 1000]])) {
echo "\npage: $page\n";
$page ++;
array_map([$cleaner, 'clean'], $records);
Storm_Model_Abstract::unsetLoaders();
Storm_Model_Loader::resetCache();
gc_collect_cycles();
}
echo "\n\nDONE !!!!\n\n";
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment