Changeset 9893
- Timestamp:
- 05/20/2020 04:20:24 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-custom-stats/stats/warning.php
r9891 r9893 38 38 $key = "{$translation->user_id},{$translation_set->locale},{$translation_set->slug},{$project->path},{$translation->id},{$warning_key}"; 39 39 40 $this->warning_stats[ $key ] = 1;40 $this->warning_stats[ $key ] = $warning; 41 41 } 42 42 } … … 50 50 51 51 $values = array(); 52 foreach ( $this->warning_stats as $key => $ _) {52 foreach ( $this->warning_stats as $key => $message ) { 53 53 list( $user_id, $locale, $locale_slug, $project_path, $translation_id, $warning ) = explode( ',', $key ); 54 54 55 $values[] = $wpdb->prepare( '(%d, %s, %s, %s, %d, %s, %s )',55 $values[] = $wpdb->prepare( '(%d, %s, %s, %s, %d, %s, %s, %s)', 56 56 $user_id, 57 57 $locale, … … 60 60 $translation_id, 61 61 $warning, 62 $now 62 $now, 63 $message 63 64 ); 64 65 … … 66 67 if ( count( $values ) > 50 ) { 67 68 $wpdb->query( 68 "INSERT INTO {$wpdb->dotorg_translation_warnings} (`user_id`, `locale`, `locale_slug`, `project_path`, `translation_id`, `warning`, `timestamp` )69 "INSERT INTO {$wpdb->dotorg_translation_warnings} (`user_id`, `locale`, `locale_slug`, `project_path`, `translation_id`, `warning`, `timestamp`, `message`) 69 70 VALUES " . implode( ', ', $values ) 70 71 ); … … 75 76 if ( $values ) { 76 77 $wpdb->query( 77 "INSERT INTO {$wpdb->dotorg_translation_warnings} (`user_id`, `locale`, `locale_slug`, `project_path`, `translation_id`, `warning`, `timestamp` )78 "INSERT INTO {$wpdb->dotorg_translation_warnings} (`user_id`, `locale`, `locale_slug`, `project_path`, `translation_id`, `warning`, `timestamp`, `message`) 78 79 VALUES " . implode( ', ', $values ) 79 80 ); … … 94 95 `warning` varchar(20) NOT NULL DEFAULT '', 95 96 `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', 97 `message` longtext 96 98 PRIMARY KEY (`id`) 97 99 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Note: See TracChangeset
for help on using the changeset viewer.