Explorar el Código

Fix to read correct xml

ChCalvoLeon hace 3 meses
padre
commit
68f161c67f

+ 1 - 1
etc/docker/mysql/tablas/config_fecha_importaciones.sql Ver fichero

@@ -2167,7 +2167,7 @@ INSERT INTO
2167 2167
 VALUES (
2168 2168
         3,
2169 2169
         'MENORES',
2170
-        'http://contrataciondelsectorpublico.gob.es/sindicacion/sindicacion_1143/contratosMenoresPerfilesContratantes',
2170
+        'https://contrataciondelsectorpublico.gob.es/sindicacion/sindicacion_1143/contratosMenoresPerfilesContratantes',
2171 2171
         'Contiene la información relativa a los contratos menores publicados por los órganos de contratación que tienen su perfil de contratante en la Plataforma de Contratación del Sector Público. Diariamente se publican las actualizaciones producidas durante el ',
2172 2172
         1
2173 2173
     );

+ 4 - 1
etc/docker/php/Dockerfile Ver fichero

@@ -10,6 +10,7 @@ RUN apk add --no-cache libzip-dev && \
10 10
 # xdebug with VSCODE
11 11
 ENV XDEBUG_VERSION=2.9.2
12 12
 RUN apk --no-cache add --virtual .build-deps \
13
+    unzip \
13 14
     g++ \
14 15
     autoconf \
15 16
     make && \
@@ -41,7 +42,6 @@ EXPOSE 9000
41 42
 # 5. composer
42 43
 COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
43 44
 
44
-
45 45
 # Copiar todo el contenido desde la raíz del contexto al contenedor
46 46
 COPY ./html /var/www/html
47 47
 
@@ -52,6 +52,9 @@ RUN chown -R www-data:www-data /var/www/html/application/logs && \
52 52
     chmod -R 775 /var/www/html/DOWNLOADS && \
53 53
     chmod -R 777 /var/www/html/uploads
54 54
 
55
+COPY ./vendor.zip /var/www/html/vendor.zip
56
+
57
+RUN unzip /var/www/html/vendor.zip -d /var/www/html/vendor
55 58
 
56 59
 WORKDIR /var/www/html
57 60
 

+ 2 - 0
html/application/libraries/Parserfile.php Ver fichero

@@ -133,6 +133,8 @@ class Parserfile
133 133
     private function getDatosLicitacion($xml): Bool
134 134
     {
135 135
         $idLicitacion = (string) substr($xml['id'], strrpos($xml['id'], '/') + 1);
136
+        if (!is_numeric($idLicitacion))
137
+            return true;
136 138
         $fechaUpdated = (string) $xml['updated'];
137 139
         //$this->idLicitacion = $idLicitacion;
138 140
         $this->fechaUpdateLicitacion = $fechaUpdated;