Plugin Directory

Changeset 3222704


Ignore:
Timestamp:
01/15/2025 09:14:11 AM (15 months ago)
Author:
tidschi
Message:

Update to version 5.1 from GitHub

Location:
solea
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • solea/tags/5.1/app/routers/dashboard-router/update-participant-save.php

    r3183195 r3222704  
    4343    ! isset( $_REQUEST['allergies'] ) ||
    4444    ! isset( $_REQUEST['medication'] ) ||
    45     ! isset( $_REQUEST['notices'] )
     45    ! isset( $_REQUEST['notices'] ) ||
     46    ! isset( $_REQUEST['intolerances'] )
    4647) {
    4748    wp_die( 'Missing parameters' );
     
    7475$participant->medication          = sanitize_text_field( wp_unslash( $_REQUEST['medication'] ) );
    7576$participant->notices             = sanitize_textarea_field( wp_unslash( $_REQUEST['notices'] ) );
     77$participant->intolerances        = sanitize_text_field( wp_unslash( $_REQUEST['intolerances'] ) );
    7678
    7779$participant->save();
  • solea/tags/5.1/assets/javascripts/dashboard.js

    r3183195 r3222704  
    22    document.getElementById( 'solea-participant-box' ).style.display = 'block';
    33    document.getElementById( 'solea_hider' ).style.display           = 'block';
    4     solea_load_ajax_div( 'print-participant', 'solea-participant-box-content', 'solea_nonce=' + solea_data.solea_nonce + 'participant-id=' + data_id )
     4    solea_load_ajax_div( 'print-participant', 'solea-participant-box-content', 'solea_nonce=' + solea_data.solea_nonce + '&participant-id=' + data_id )
    55}
    66
  • solea/tags/5.1/libs/class-mainmodel.php

    r3215933 r3222704  
    8989        global $wpdb;
    9090
    91         $plugin_data = get_plugin_data( SOLEA_PLUGIN_STARTUP_FILE, true, false );
     91        $charset = $wpdb->get_charset_collate();
     92        $file_access = new FileAccess();
     93        $sql = "SHOW TABLES LIKE '$this->table'";
    9294
    93         $last_version = get_option('solea_last_version', '0.0');
    94         if ($last_version !== $plugin_data['Version'] ) {
     95        $sql_setup = str_replace(
     96            '%tablename%',
     97            $this->table,
     98            $file_access->get_contents( SOLEA_PLUGIN_DIR . '/setup/database/' . $this->plainname . '.sql' )
     99        );
    95100
    96             $charset = $wpdb->get_charset_collate();
    97             $file_access = new FileAccess();
    98             $sql = "SHOW TABLES LIKE '$this->table'";
    99 
    100             $sql_setup = str_replace(
    101                 '%tablename%',
    102                 $this->table,
    103                 $file_access->get_contents( SOLEA_PLUGIN_DIR . '/setup/database/' . $this->plainname . '.sql' )
    104             );
    105 
    106             $sql_setup = str_replace( '%charset%', $charset, $sql_setup );
    107             $sql_setup = str_replace( '%prefix%', $wpdb->prefix, $sql_setup );
    108             dbDelta( $sql_setup );
    109             update_option('solea_last_version', (string)$plugin_data['Version']);
    110         }
    111     }
     101        $sql_setup = str_replace( '%charset%', $charset, $sql_setup );
     102        $sql_setup = str_replace( '%prefix%', $wpdb->prefix, $sql_setup );
     103        dbDelta( $sql_setup );
     104    }
    112105
    113106    /**
  • solea/tags/5.1/readme.txt

    r3221661 r3222704  
    44Requires at least: 6.0
    55Tested up to: 6.7
    6 Stable tag: 5.0
     6Stable tag: 5.1
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3939
    4040## Changelog ##
     41= 5.1 =
     42* [BUG] Fixed installation routine
     43* [BUG] Fixed displaying participant information
     44* [BUG] Fixed update intolerence field
     45
    4146= 5.0 =
    4247* [BUG] Fixed bug in displaying participation table filter
  • solea/tags/5.1/setup/setup-objects.php

    r3183195 r3222704  
    1919 */
    2020function solea_setup_objects() {
    21     $event = new Event();
    22     $event->setup();
    2321
    24     $participant = new Participant();
    25     $participant->setup();
     22    $plugin_data = get_plugin_data( SOLEA_PLUGIN_STARTUP_FILE, true, false );
    2623
    27     $local_group = new LocalGroup();
    28     $local_group->setup();
     24    $last_version = get_option('solea_last_version', '0.0');
     25    if ($last_version !== $plugin_data['Version'] ) {
    2926
    30     if ( is_multisite() ) {
    31         $sites = get_sites();
    3227
    33         foreach ( $sites as $site ) {
    34             $current_blog_id = $site->blog_id;
    35             switch_to_blog( $current_blog_id );
     28        $event = new Event();
     29        $event->setup();
    3630
    37             $event = new Event();
    38             $event->setup();
     31        $participant = new Participant();
     32        $participant->setup();
    3933
    40             $participant = new Participant();
    41             $participant->setup();
     34        $local_group = new LocalGroup();
     35        $local_group->setup();
    4236
    43             $local_group = new LocalGroup();
    44             $local_group->setup();
     37        if ( is_multisite() ) {
     38            $sites = get_sites();
    4539
    46             restore_current_blog();
    47         }
    48     }
     40            foreach ( $sites as $site ) {
     41                $current_blog_id = $site->blog_id;
     42                switch_to_blog( $current_blog_id );
     43
     44                $event = new Event();
     45                $event->setup();
     46
     47                $participant = new Participant();
     48                $participant->setup();
     49
     50                $local_group = new LocalGroup();
     51                $local_group->setup();
     52                update_option('solea_last_version', (string)$plugin_data['Version']);
     53
     54                restore_current_blog();
     55            }
     56        }
     57        update_option('solea_last_version', (string)$plugin_data['Version']);
     58    }
    4959}
  • solea/tags/5.1/solea.php

    r3221661 r3222704  
    33 * Plugin Name:  solea
    44 * Description: A tool for organisating events and keep participants in mind.
    5  * Version: 5.0
     5 * Version: 5.1
    66 * Tags: solea, events, management, budgeting
    77 * Requires at least: 6.0
  • solea/trunk/app/routers/dashboard-router/update-participant-save.php

    r3183195 r3222704  
    4343    ! isset( $_REQUEST['allergies'] ) ||
    4444    ! isset( $_REQUEST['medication'] ) ||
    45     ! isset( $_REQUEST['notices'] )
     45    ! isset( $_REQUEST['notices'] ) ||
     46    ! isset( $_REQUEST['intolerances'] )
    4647) {
    4748    wp_die( 'Missing parameters' );
     
    7475$participant->medication          = sanitize_text_field( wp_unslash( $_REQUEST['medication'] ) );
    7576$participant->notices             = sanitize_textarea_field( wp_unslash( $_REQUEST['notices'] ) );
     77$participant->intolerances        = sanitize_text_field( wp_unslash( $_REQUEST['intolerances'] ) );
    7678
    7779$participant->save();
  • solea/trunk/assets/javascripts/dashboard.js

    r3183195 r3222704  
    22    document.getElementById( 'solea-participant-box' ).style.display = 'block';
    33    document.getElementById( 'solea_hider' ).style.display           = 'block';
    4     solea_load_ajax_div( 'print-participant', 'solea-participant-box-content', 'solea_nonce=' + solea_data.solea_nonce + 'participant-id=' + data_id )
     4    solea_load_ajax_div( 'print-participant', 'solea-participant-box-content', 'solea_nonce=' + solea_data.solea_nonce + '&participant-id=' + data_id )
    55}
    66
  • solea/trunk/libs/class-mainmodel.php

    r3215933 r3222704  
    8989        global $wpdb;
    9090
    91         $plugin_data = get_plugin_data( SOLEA_PLUGIN_STARTUP_FILE, true, false );
     91        $charset = $wpdb->get_charset_collate();
     92        $file_access = new FileAccess();
     93        $sql = "SHOW TABLES LIKE '$this->table'";
    9294
    93         $last_version = get_option('solea_last_version', '0.0');
    94         if ($last_version !== $plugin_data['Version'] ) {
     95        $sql_setup = str_replace(
     96            '%tablename%',
     97            $this->table,
     98            $file_access->get_contents( SOLEA_PLUGIN_DIR . '/setup/database/' . $this->plainname . '.sql' )
     99        );
    95100
    96             $charset = $wpdb->get_charset_collate();
    97             $file_access = new FileAccess();
    98             $sql = "SHOW TABLES LIKE '$this->table'";
    99 
    100             $sql_setup = str_replace(
    101                 '%tablename%',
    102                 $this->table,
    103                 $file_access->get_contents( SOLEA_PLUGIN_DIR . '/setup/database/' . $this->plainname . '.sql' )
    104             );
    105 
    106             $sql_setup = str_replace( '%charset%', $charset, $sql_setup );
    107             $sql_setup = str_replace( '%prefix%', $wpdb->prefix, $sql_setup );
    108             dbDelta( $sql_setup );
    109             update_option('solea_last_version', (string)$plugin_data['Version']);
    110         }
    111     }
     101        $sql_setup = str_replace( '%charset%', $charset, $sql_setup );
     102        $sql_setup = str_replace( '%prefix%', $wpdb->prefix, $sql_setup );
     103        dbDelta( $sql_setup );
     104    }
    112105
    113106    /**
  • solea/trunk/readme.txt

    r3221661 r3222704  
    44Requires at least: 6.0
    55Tested up to: 6.7
    6 Stable tag: 5.0
     6Stable tag: 5.1
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3939
    4040## Changelog ##
     41= 5.1 =
     42* [BUG] Fixed installation routine
     43* [BUG] Fixed displaying participant information
     44* [BUG] Fixed update intolerence field
     45
    4146= 5.0 =
    4247* [BUG] Fixed bug in displaying participation table filter
  • solea/trunk/setup/setup-objects.php

    r3183195 r3222704  
    1919 */
    2020function solea_setup_objects() {
    21     $event = new Event();
    22     $event->setup();
    2321
    24     $participant = new Participant();
    25     $participant->setup();
     22    $plugin_data = get_plugin_data( SOLEA_PLUGIN_STARTUP_FILE, true, false );
    2623
    27     $local_group = new LocalGroup();
    28     $local_group->setup();
     24    $last_version = get_option('solea_last_version', '0.0');
     25    if ($last_version !== $plugin_data['Version'] ) {
    2926
    30     if ( is_multisite() ) {
    31         $sites = get_sites();
    3227
    33         foreach ( $sites as $site ) {
    34             $current_blog_id = $site->blog_id;
    35             switch_to_blog( $current_blog_id );
     28        $event = new Event();
     29        $event->setup();
    3630
    37             $event = new Event();
    38             $event->setup();
     31        $participant = new Participant();
     32        $participant->setup();
    3933
    40             $participant = new Participant();
    41             $participant->setup();
     34        $local_group = new LocalGroup();
     35        $local_group->setup();
    4236
    43             $local_group = new LocalGroup();
    44             $local_group->setup();
     37        if ( is_multisite() ) {
     38            $sites = get_sites();
    4539
    46             restore_current_blog();
    47         }
    48     }
     40            foreach ( $sites as $site ) {
     41                $current_blog_id = $site->blog_id;
     42                switch_to_blog( $current_blog_id );
     43
     44                $event = new Event();
     45                $event->setup();
     46
     47                $participant = new Participant();
     48                $participant->setup();
     49
     50                $local_group = new LocalGroup();
     51                $local_group->setup();
     52                update_option('solea_last_version', (string)$plugin_data['Version']);
     53
     54                restore_current_blog();
     55            }
     56        }
     57        update_option('solea_last_version', (string)$plugin_data['Version']);
     58    }
    4959}
  • solea/trunk/solea.php

    r3221661 r3222704  
    33 * Plugin Name:  solea
    44 * Description: A tool for organisating events and keep participants in mind.
    5  * Version: 5.0
     5 * Version: 5.1
    66 * Tags: solea, events, management, budgeting
    77 * Requires at least: 6.0
Note: See TracChangeset for help on using the changeset viewer.