Plugin Directory

Changeset 2762587


Ignore:
Timestamp:
07/27/2022 07:24:45 PM (4 years ago)
Author:
chuhpl
Message:

BUGFIX added in missing column ev_regContactType

Location:
book-a-room/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • book-a-room/trunk/README.txt

    r2761978 r2762587  
    11=== Plugin Name ===
    2 Contributors: maniacalv, chuhpl
     2Contributors: chuhpl, ManiacalV
    33Donate link: http://heightslibrary.org/support-your-library/
    44Tags: meeting room, calendar, library
     
    106106
    107107== Changelog ==
     108= 2.8.5 =
     109* BUGFIX: Added missing column
     110
    108111= 2.8.4 =
    109112* BUGFIX: Fixed the create_function depreciated error.
  • book-a-room/trunk/bookaroom.php

    r2761976 r2762587  
    44Plugin URI: https://wordpress.org/plugins/book-a-room/
    55Description: Book a Room is a library oriented meeting room management and event calendar system.
    6 Version: 2.8.4
     6Version: 2.8.5
    77Author: Colin Tomele
    88Author URI: http://heightslibrary.org
     
    1111*/
    1212global $wpdb, $bookaroom_db_version;
    13 $bookaroom_db_version = "3";
     13$bookaroom_db_version = "4";
    1414
    1515define( 'BOOKAROOM_PATH', plugin_dir_path( __FILE__ ) );
     
    2525add_action( 'init', 'myStartSession', 1);
    2626add_action( 'wp_logout', 'myEndSession' );
    27 add_action( 'init', 'my_script_enqueuer' );
     27add_action( 'init', 'bookaroom_script_enqueuer' );
    2828
    2929#add_filter( 'the_content',  array( 'bookaroom_public', 'mainForm' ) );
     
    3636#add_action(        'gform_after_submission',   array( 'bookaroom_creditCardPayments', 'finishedSubmission' ));
    3737
    38 function my_script_enqueuer() {
     38function bookaroom_script_enqueuer() {
    3939   
    4040    add_shortcode( 'bookaroom_payment', array( 'bookaroom_creditCardPayments', 'managePayments' )  );
     
    7676        $sql = "ALTER TABLE {$wpdb->prefix}bookaroom_reservations_deleted CHANGE  me_contactState me_contactState VARCHAR( 255 );";
    7777        $wpdb->query( $sql );
     78       
     79         
     80
    7881    }
     82    if( get_option( 'bookaroom_db_version' ) <= '3' ) {
     83        $sql = "ALTER TABLE {$wpdb->prefix}bookaroom_reservations ADD `ev_regContactType` enum('both','phone','either','none','email') CHARACTER SET latin1 DEFAULT 'either';";
     84        $wpdb->query( $sql );
     85       
     86        $sql = "ALTER TABLE {$wpdb->prefix}bookaroom_reservations_deleted ADD `ev_regContactType` enum('both','phone','either','none','email') CHARACTER SET latin1 DEFAULT 'either';";
     87        $wpdb->query( $sql );
     88       
     89         
     90
     91    }
     92    set_option( 'bookaroom_db_version', 4 );
    7993}
    8094
     
    249263                  ev_regStartDate timestamp NULL DEFAULT NULL,
    250264                  ev_regType enum('yes','no','staff') DEFAULT NULL,
     265                  ev_regContactType enum('both','phone','either','none','email') DEFAULT 'either',
    251266                  ev_submitter varchar(255) NOT NULL,
    252267                  ev_title varchar(255) DEFAULT NULL,
     
    298313                  ev_regStartDate timestamp NULL DEFAULT NULL,
    299314                  ev_regType enum('yes','no','staff') DEFAULT NULL,
     315                  ev_regContactType enum('both','phone','either','none','email') DEFAULT 'either',
    300316                  ev_submitter varchar(255) NOT NULL,
    301317                  ev_title varchar(255) DEFAULT NULL,
Note: See TracChangeset for help on using the changeset viewer.