PluginProbe
ANAC XML Bandi di Gara / 7.8
ANAC XML Bandi di Gara v7.8
7.8 trunk 0.1 1.0.0.1 1.0.1 1.0.2 1.0.3 1.0.4 1.1 1.1.1 1.1.2 2.0 2.0.1 2.0.2 2.0.3 2.1 2.2 2.3 2.3.1 3 3.0.1 3.1 3.1.1 3.1.2 3.1.3 All 57 releases
avcp / update.php

update.php in ANAC XML Bandi di Gara 7.8, at update.php

54 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) exit;
4
5 $pluginversion = get_option('avcp_version_number');
6
7 //In questo blocco sono impostati i vari aggiornamenti ad alcuni campi del database che vanno modificati per poter eseguire la versione relativa all'aggiornamento stesso...
8
9 if (version_compare($pluginversion, "3.1", "<")) {
10 avcp_activate();
11 }
12
13 if (version_compare($pluginversion, "3.2", "<")) {
14 query_posts( array( 'post_type' => 'avcp', 'posts_per_page' => '-1') ); global $post;
15 if ( have_posts() ) : while ( have_posts() ) : the_post();
16 $tip_contraente = get_post_meta($post->ID, 'avcp_contraente', true);
17 if ($tip_contraente == '25-AFFIDAMENTO DIRETTO A SOCIETA') {
18 update_post_meta($post->ID, 'avcp_contraente', '25-AFFIDAMENTO DIRETTO A SOCIETA&apos; RAGGRUPPATE/CONSORZIATE O CONTROLLATE NELLE CONCESSIONI DI LL.PP');
19 } else if ($tip_contraente == '24-AFFIDAMENTO DIRETTO A SOCIETA') {
20 update_post_meta($post->ID, 'avcp_contraente', '24-AFFIDAMENTO DIRETTO A SOCIETA&apos; IN HOUSE');
21 }
22 endwhile; else:
23 endif;
24 creafilexml ('2013');
25 creafilexml ('2014');
26 }
27
28 if (version_compare($pluginversion, "4.2", "<")) {
29 global $current_user;
30 $user_id = $current_user->ID;
31 delete_user_meta($user_id, 'avcp_upgrade_3', 'true', true);
32 avcp_activate();
33 }
34
35 if (version_compare($pluginversion, "5.1", "<")) {
36 creafilexml('2013');
37 creafilexml('2014');
38 creafilexml('2015');
39 }
40
41 if (version_compare($pluginversion, "5.2", "<")) {
42 delete_option('avcp_showxml');
43 delete_option('avcp_tab_jqueryui');
44 delete_option('avcp_export');
45 }
46
47 if (version_compare($pluginversion, "6.4", "<")) {
48 delete_option('avcp_showlove');
49 delete_option('avcp_enable_editor');
50 }
51
52 anac_add_log('Script di aggiornamento '.$pluginversion.' richiamato', 0);
53 ?>
54