Skip to content
Snippets Groups Projects
Commit 23f5aa55 authored by llaffont's avatar llaffont
Browse files

Cosmogramme: new sites => change from low level sql to storm

parent d5374348
Branches
Tags
2 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!96.38.3
......@@ -143,8 +143,8 @@ if($_REQUEST["action"]=="CONTROLE")
sqlExecute("delete from int_bib where id_bib=".$enreg["ID_SITE"]);
$enreg1["id_bib"]=$enreg["ID_SITE"];
$enreg1["nom"]=$enreg["LIBELLE"];
$enreg1["nom_court"]=$enreg["LIBELLE"];
$enreg1["nom"]=trim($enreg["LIBELLE"]);
$enreg1["nom_court"]=trim($enreg["LIBELLE"]);
$enreg1["qualite"]=5;
$enreg1["sigb"]=$type_sigb;
$enreg1["planif_mode"]="r";
......@@ -160,7 +160,8 @@ if($_REQUEST["action"]=="CONTROLE")
$enreg1["comm_sigb"]=1;
$enreg1["comm_params"]=serialize(array("Autoriser_docs_disponibles"=>"0","Max_par_carte"=>"3","Max_par_document"=>"3"));
}
sqlInsert("int_bib", $enreg1);
(new Class_IntBib)->updateAttributes($enreg1)->save();
$nb_bibs++;
}
print('</table></div>');
......@@ -216,7 +217,7 @@ if($_REQUEST["action"]=="CONTROLE")
$enreg["type_operation"]=1;
$enreg["nom_fichier"]=$path_fichier."site".$id_bib."/suppressions.txt";
$enreg["rang"]=$id_prog;
sqlInsert("int_maj_auto", $enreg);
(new Class_IntMajAuto)->updateAttributes($enreg)->save();
}
// notices total
......@@ -229,7 +230,8 @@ if($_REQUEST["action"]=="CONTROLE")
$enreg["type_operation"]=2;
$enreg["nom_fichier"]=$path_fichier."site".$id_bib."/notices_total.txt";
$enreg["rang"]=$id_prog;
sqlInsert("int_maj_auto", $enreg);
(new Class_IntMajAuto)->updateAttributes($enreg)->save();
// notices incrémentiel
echo '<tr><td class="blank">&nbsp;</td><td class="blank">Import incrémentiel des notices</td></tr>';
......@@ -241,7 +243,7 @@ if($_REQUEST["action"]=="CONTROLE")
$enreg["type_operation"]=0;
$enreg["nom_fichier"]=$path_fichier."site".$id_bib."/notices.txt";
$enreg["rang"]=$id_prog;
sqlInsert("int_maj_auto", $enreg);
(new Class_IntMajAuto)->updateAttributes($enreg)->save();
// abonnés
echo '<tr><td class="blank">&nbsp;</td><td class="blank">Import des abonnés</td></tr>';
......@@ -253,7 +255,7 @@ if($_REQUEST["action"]=="CONTROLE")
$enreg["type_operation"]=2;
$enreg["nom_fichier"]=$path_fichier."site".$id_bib."/abonnes.txt";
$enreg["rang"]=$id_prog;
sqlInsert("int_maj_auto", $enreg);
(new Class_IntMajAuto)->updateAttributes($enreg)->save();
// prêts
echo '<tr><td class="blank">&nbsp;</td><td class="blank">Import des prêts</td></tr>';
......@@ -264,7 +266,7 @@ if($_REQUEST["action"]=="CONTROLE")
$enreg["type_operation"]=2;
$enreg["nom_fichier"]=$path_fichier."site".$id_bib."/prets.txt";
$enreg["rang"]=$id_prog;
sqlInsert("int_maj_auto", $enreg);
(new Class_IntMajAuto)->updateAttributes($enreg)->save();
// réservations (pergame uniquement)
if($type_sigb==1)
......@@ -277,7 +279,7 @@ if($_REQUEST["action"]=="CONTROLE")
$enreg["type_operation"]=2;
$enreg["nom_fichier"]=$path_fichier."site".$id_bib."/reservations.txt";
$enreg["rang"]=$id_prog;
sqlInsert("int_maj_auto", $enreg);
(new Class_IntMajAuto)->updateAttributes($enreg)->save();
}
}
print('</table></div>');
......
<?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
*/
class Class_IntMajAuto extends Storm_Model_Abstract {
protected $_table_name = 'int_maj_auto';
protected $_table_primary = 'id_prog';
}
?>
\ No newline at end of file
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