Skip to content
Snippets Groups Projects
Commit 070cf92c authored by efalcy's avatar efalcy
Browse files

Mise a jour des paniers avec l'id origine

parent e22e38d4
Branches
Tags
No related merge requests found
......@@ -2145,6 +2145,7 @@ cosmogramme/sql/patch/patch_159.sql -text
cosmogramme/sql/patch/patch_160.sql -text
cosmogramme/sql/patch/patch_161.sql -text
cosmogramme/sql/patch/patch_162.sql -text
cosmogramme/sql/patch/patch_163.sql -text
cosmogramme/storm_init.php -text
cosmogramme/tests/bootstrap.php -text
cosmogramme/tests/php/classes/IndexationTest.php -text
......@@ -5599,6 +5600,7 @@ scripts/find_tests.php -text
scripts/import_sitotheque.php -text
scripts/insert_licence.sh -text
scripts/iosrd.sh -text
scripts/majPaniers.php -text
scripts/md5base64.pl -text
scripts/monitor_recherche.php -text
scripts/opac2.sql -text
......
<?PHP
// Constantes
define("VERSION_COSMOGRAMME","6.32");
define("PATCH_LEVEL","162");
define("PATCH_LEVEL","163");
define("APPLI","cosmogramme");
define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs");
define("CRLF", chr(13) . chr(10));
......
ALter table notices_paniers add column ids_origine text;
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* AFI-OPAC 2.0 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
define("BASE_URL", "/");
set_include_path('.' . PATH_SEPARATOR . './library'
. PATH_SEPARATOR . '../ZendFramework-1.6.2/library'
. PATH_SEPARATOR . get_include_path());
include_once "local.php";
include_once "fonctions/fonctions.php";
require_once "Zend/Loader.php";
require_once "startup.php";
setupOpac();
$paniers = Class_PanierNotice::findAll();
foreach($paniers as $panier) {
$cles=$panier->getExistingClesNotices();
$ids_origine=[];
foreach ($cles as $cle) {
$notice=Class_Notice::getNoticeByClefAlpha($cle);
$exemplaires=$notice->getExemplaires();
$ids_origine[]=$exemplaires[0]->getIdOrigine();
}
$panier->setIdsOrigine(implode(';',$ids_origine));
$panier->save();
}
?>
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