Changeset 1813677
- Timestamp:
- 02/01/2018 06:03:22 PM (8 years ago)
- Location:
- comment-rating-field-plugin/trunk
- Files:
-
- 5 edited
-
comment-rating-field-plugin.php (modified) (2 diffs)
-
includes/admin/install.php (modified) (2 diffs)
-
includes/global/fields.php (modified) (4 diffs)
-
includes/global/groups.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
comment-rating-field-plugin/trunk/comment-rating-field-plugin.php
r1811133 r1813677 3 3 * Plugin Name: Comment Rating Field Plugin 4 4 * Plugin URI: https://www.wpzinc.com/plugins/comment-rating-field-pro-plugin 5 * Version: 3.5. 15 * Version: 3.5.2 6 6 * Author: WP Zinc 7 7 * Author URI: https://www.wpzinc.com … … 57 57 $this->plugin->name = 'comment-rating-field-plugin'; 58 58 $this->plugin->displayName = 'Comment Rating Field'; 59 $this->plugin->version = '3.5. 1';60 $this->plugin->buildDate = '2018-0 1-2918:00:00';59 $this->plugin->version = '3.5.2'; 60 $this->plugin->buildDate = '2018-02-01 18:00:00'; 61 61 $this->plugin->requires = 3.6; 62 62 $this->plugin->tested = '4.9.2'; -
comment-rating-field-plugin/trunk/includes/admin/install.php
r1811133 r1813677 48 48 Comment_Rating_Field_Pro_Fields::get_instance()->activate(); 49 49 Comment_Rating_Field_Pro_Groups::get_instance()->activate(); 50 51 // If no Group exists, create a Group and Field now 52 $total = Comment_Rating_Field_Pro_Groups::get_instance()->total(); 53 if ( ! $total ) { 54 // Create Group and Field 55 $result = Comment_Rating_Field_Pro_Install::get_instance()->create_group_and_field( array( 56 'type' => array( 57 'post' => 1, 58 ), 59 ) ); 60 61 // Bail if an error occured 62 if ( is_wp_error( $result ) ) { 63 wp_die( $result->get_error_message() ); 64 return; 65 } 66 } 67 50 68 restore_current_blog(); 51 69 } … … 54 72 Comment_Rating_Field_Pro_Fields::get_instance()->activate(); 55 73 Comment_Rating_Field_Pro_Groups::get_instance()->activate(); 74 75 // If no Group exists, create a Group and Field now 76 $total = Comment_Rating_Field_Pro_Groups::get_instance()->total(); 77 if ( ! $total ) { 78 // Create Group and Field 79 $result = Comment_Rating_Field_Pro_Install::get_instance()->create_group_and_field( array( 80 'type' => array( 81 'post' => 1, 82 ), 83 ) ); 84 85 // Bail if an error occured 86 if ( is_wp_error( $result ) ) { 87 wp_die( $result->get_error_message() ); 88 return; 89 } 90 } 56 91 } 57 92 -
comment-rating-field-plugin/trunk/includes/global/fields.php
r1811133 r1813677 33 33 34 34 /** 35 * Activation routines for this Model36 *37 * @since 3.2.038 *39 * @global $wpdb WordPress DB Object40 */35 * Activation routines for this Model 36 * 37 * @since 3.2.0 38 * 39 * @global $wpdb WordPress DB Object 40 */ 41 41 public function activate() { 42 42 … … 44 44 45 45 // Create database tables 46 $wpdb->query(" CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "crfp_fields(46 $wpdb->query(" CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . $this->table . " ( 47 47 `fieldID` int(10) NOT NULL AUTO_INCREMENT, 48 48 `groupID` int(10) NOT NULL DEFAULT '0', … … 57 57 DEFAULT CHARSET=" . $wpdb->charset . " 58 58 AUTO_INCREMENT=1" ); 59 60 if ( defined( 'WP_DEBUG' ) && WP_DEBUG && ! empty( $wpdb->last_error ) ) { 61 $wpdb->print_error(); 62 } 59 63 60 64 } … … 209 213 210 214 // Return count 211 return $wpdb->get_var( $query );215 return (int) $wpdb->get_var( $query ); 212 216 213 217 } -
comment-rating-field-plugin/trunk/includes/global/groups.php
r1811133 r1813677 109 109 110 110 // Create database tables 111 $wpdb->query(" CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "crfp_groups(111 $wpdb->query(" CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . $this->table . " ( 112 112 `groupID` int(10) NOT NULL AUTO_INCREMENT, 113 113 `name` varchar(200) NOT NULL, … … 126 126 AUTO_INCREMENT=1"); 127 127 128 if ( defined( 'WP_DEBUG' ) && WP_DEBUG && ! empty( $wpdb->last_error ) ) { 129 $wpdb->print_error(); 130 } 131 128 132 } 129 133 … … 321 325 322 326 // Return count 323 return $wpdb->get_var( $query );327 return (int) $wpdb->get_var( $query ); 324 328 325 329 } -
comment-rating-field-plugin/trunk/readme.txt
r1811138 r1813677 69 69 70 70 == Changelog == 71 72 = 3.5.2 = 73 * Fix: Installation: Ensure a Group and Field exist, if none are defined 71 74 72 75 = 3.5.1 =
Note: See TracChangeset
for help on using the changeset viewer.