Changeset 3476876
- Timestamp:
- 03/07/2026 05:35:04 AM (2 days ago)
- Location:
- podlove-podcasting-plugin-for-wordpress
- Files:
-
- 8 edited
- 1 copied
-
tags/4.3.5 (copied) (copied from podlove-podcasting-plugin-for-wordpress/trunk)
-
tags/4.3.5/lib/repair.php (modified) (3 diffs)
-
tags/4.3.5/podlove.php (modified) (1 diff)
-
tags/4.3.5/readme.txt (modified) (2 diffs)
-
tags/4.3.5/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/lib/repair.php (modified) (3 diffs)
-
trunk/podlove.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
podlove-podcasting-plugin-for-wordpress/tags/4.3.5/lib/repair.php
r3047031 r3476876 43 43 self::flush_rewrite_rules(); 44 44 self::remove_duplicate_episodes(); 45 self::repair_missing_columns(); 45 46 46 47 // hook for modules to add their repair methods … … 148 149 <?php echo __('If you have strange behaviour in some sites or pages are not found which should exist, this might solve it.', 'podlove-podcasting-plugin-for-wordpress'); ?> 149 150 </li> 151 <li> 152 <strong><?php echo __('repairs missing database columns', 'podlove-podcasting-plugin-for-wordpress'); ?></strong> 153 <?php echo __('Adds newer Podlove columns if they are missing. This is safe and only affects Podlove tables.', 'podlove-podcasting-plugin-for-wordpress'); ?> 154 </li> 150 155 <?php // hook for modules to add their repair method descriptions?> 151 156 <?php foreach (apply_filters('podlove_repair_descriptions', []) as $entry) { ?> … … 197 202 self::clear_repair_log(); 198 203 } 204 205 private static function repair_missing_columns() 206 { 207 global $wpdb; 208 209 $columns = [ 210 Model\Episode::table_name() => [ 211 'title' => 'TEXT', 212 'number' => 'INT UNSIGNED', 213 'type' => 'VARCHAR(10)', 214 'soundbite_start' => 'VARCHAR(255)', 215 'soundbite_duration' => 'VARCHAR(255)', 216 'soundbite_title' => 'VARCHAR(255)', 217 'slug_frozen' => 'TINYINT DEFAULT 0' 218 ], 219 Model\MediaFile::table_name() => [ 220 'active' => 'TINYINT', 221 ], 222 ]; 223 224 if (Modules\Shownotes\Model\Entry::table_exists()) { 225 $columns[Modules\Shownotes\Model\Entry::table_name()] = [ 226 'affiliate_url' => 'TEXT', 227 'hidden' => 'INT', 228 'image' => 'TEXT', 229 ]; 230 } 231 232 $added = []; 233 234 foreach ($columns as $table => $table_columns) { 235 foreach ($table_columns as $column => $definition) { 236 if (self::column_exists($table, $column)) { 237 continue; 238 } 239 240 $sql = sprintf( 241 'ALTER TABLE `%s` ADD COLUMN `%s` %s', 242 esc_sql($table), 243 esc_sql($column), 244 $definition 245 ); 246 247 $result = $wpdb->query($sql); 248 if ($result !== false) { 249 $added[] = "{$table}.{$column}"; 250 } 251 } 252 } 253 254 if (!empty($added)) { 255 self::add_to_repair_log( 256 sprintf( 257 __('Added missing database columns: %s', 'podlove-podcasting-plugin-for-wordpress'), 258 implode(', ', $added) 259 ) 260 ); 261 } else { 262 self::add_to_repair_log( 263 __('No missing Podlove columns found.', 'podlove-podcasting-plugin-for-wordpress') 264 ); 265 } 266 } 267 268 private static function column_exists($table, $column) 269 { 270 global $wpdb; 271 272 $sql = $wpdb->prepare( 273 'SHOW COLUMNS FROM `'.$table.'` LIKE %s', 274 $column 275 ); 276 277 return (bool) $wpdb->get_var($sql); 278 } 199 279 } -
podlove-podcasting-plugin-for-wordpress/tags/4.3.5/podlove.php
r3465787 r3476876 3 3 * Plugin Name: Podlove Podcast Publisher 4 4 * Plugin URI: https://podlove.org/podlove-podcast-publisher/ 5 * Version: 4.3. 45 * Version: 4.3.5 6 6 * Requires at least: 4.9.6 7 7 * Requires PHP: 8.0 -
podlove-podcasting-plugin-for-wordpress/tags/4.3.5/readme.txt
r3465787 r3476876 3 3 Donate link: https://opencollective.com/podlove 4 4 Tags: podlove, podcast, publishing, rss, audio 5 Tested up to: 6.9. 06 Stable tag: 4.3. 45 Tested up to: 6.9.1 6 Stable tag: 4.3.5 7 7 Requires at least: 4.9.6 8 8 Requires PHP: 8.0 … … 119 119 120 120 == Changelog == 121 122 = 4.3.5 = 123 124 * new: the "Repair" function in "Tools" now checks for missing database columns and adds missing ones 121 125 122 126 = 4.3.4 = -
podlove-podcasting-plugin-for-wordpress/tags/4.3.5/vendor/composer/installed.php
r3465787 r3476876 2 2 'root' => array( 3 3 'name' => 'podlove/podcast-publisher', 4 'pretty_version' => '4.3. 4',5 'version' => '4.3. 4.0',6 'reference' => ' 9245c7e65ac3e6318c170131f534b36161b4efb5',4 'pretty_version' => '4.3.5', 5 'version' => '4.3.5.0', 6 'reference' => '5758a9de4ad26c6ec439671640940e6cab90f2e3', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 135 135 ), 136 136 'podlove/podcast-publisher' => array( 137 'pretty_version' => '4.3. 4',138 'version' => '4.3. 4.0',139 'reference' => ' 9245c7e65ac3e6318c170131f534b36161b4efb5',137 'pretty_version' => '4.3.5', 138 'version' => '4.3.5.0', 139 'reference' => '5758a9de4ad26c6ec439671640940e6cab90f2e3', 140 140 'type' => 'library', 141 141 'install_path' => __DIR__ . '/../../', -
podlove-podcasting-plugin-for-wordpress/trunk/lib/repair.php
r3047031 r3476876 43 43 self::flush_rewrite_rules(); 44 44 self::remove_duplicate_episodes(); 45 self::repair_missing_columns(); 45 46 46 47 // hook for modules to add their repair methods … … 148 149 <?php echo __('If you have strange behaviour in some sites or pages are not found which should exist, this might solve it.', 'podlove-podcasting-plugin-for-wordpress'); ?> 149 150 </li> 151 <li> 152 <strong><?php echo __('repairs missing database columns', 'podlove-podcasting-plugin-for-wordpress'); ?></strong> 153 <?php echo __('Adds newer Podlove columns if they are missing. This is safe and only affects Podlove tables.', 'podlove-podcasting-plugin-for-wordpress'); ?> 154 </li> 150 155 <?php // hook for modules to add their repair method descriptions?> 151 156 <?php foreach (apply_filters('podlove_repair_descriptions', []) as $entry) { ?> … … 197 202 self::clear_repair_log(); 198 203 } 204 205 private static function repair_missing_columns() 206 { 207 global $wpdb; 208 209 $columns = [ 210 Model\Episode::table_name() => [ 211 'title' => 'TEXT', 212 'number' => 'INT UNSIGNED', 213 'type' => 'VARCHAR(10)', 214 'soundbite_start' => 'VARCHAR(255)', 215 'soundbite_duration' => 'VARCHAR(255)', 216 'soundbite_title' => 'VARCHAR(255)', 217 'slug_frozen' => 'TINYINT DEFAULT 0' 218 ], 219 Model\MediaFile::table_name() => [ 220 'active' => 'TINYINT', 221 ], 222 ]; 223 224 if (Modules\Shownotes\Model\Entry::table_exists()) { 225 $columns[Modules\Shownotes\Model\Entry::table_name()] = [ 226 'affiliate_url' => 'TEXT', 227 'hidden' => 'INT', 228 'image' => 'TEXT', 229 ]; 230 } 231 232 $added = []; 233 234 foreach ($columns as $table => $table_columns) { 235 foreach ($table_columns as $column => $definition) { 236 if (self::column_exists($table, $column)) { 237 continue; 238 } 239 240 $sql = sprintf( 241 'ALTER TABLE `%s` ADD COLUMN `%s` %s', 242 esc_sql($table), 243 esc_sql($column), 244 $definition 245 ); 246 247 $result = $wpdb->query($sql); 248 if ($result !== false) { 249 $added[] = "{$table}.{$column}"; 250 } 251 } 252 } 253 254 if (!empty($added)) { 255 self::add_to_repair_log( 256 sprintf( 257 __('Added missing database columns: %s', 'podlove-podcasting-plugin-for-wordpress'), 258 implode(', ', $added) 259 ) 260 ); 261 } else { 262 self::add_to_repair_log( 263 __('No missing Podlove columns found.', 'podlove-podcasting-plugin-for-wordpress') 264 ); 265 } 266 } 267 268 private static function column_exists($table, $column) 269 { 270 global $wpdb; 271 272 $sql = $wpdb->prepare( 273 'SHOW COLUMNS FROM `'.$table.'` LIKE %s', 274 $column 275 ); 276 277 return (bool) $wpdb->get_var($sql); 278 } 199 279 } -
podlove-podcasting-plugin-for-wordpress/trunk/podlove.php
r3465787 r3476876 3 3 * Plugin Name: Podlove Podcast Publisher 4 4 * Plugin URI: https://podlove.org/podlove-podcast-publisher/ 5 * Version: 4.3. 45 * Version: 4.3.5 6 6 * Requires at least: 4.9.6 7 7 * Requires PHP: 8.0 -
podlove-podcasting-plugin-for-wordpress/trunk/readme.txt
r3465787 r3476876 3 3 Donate link: https://opencollective.com/podlove 4 4 Tags: podlove, podcast, publishing, rss, audio 5 Tested up to: 6.9. 06 Stable tag: 4.3. 45 Tested up to: 6.9.1 6 Stable tag: 4.3.5 7 7 Requires at least: 4.9.6 8 8 Requires PHP: 8.0 … … 119 119 120 120 == Changelog == 121 122 = 4.3.5 = 123 124 * new: the "Repair" function in "Tools" now checks for missing database columns and adds missing ones 121 125 122 126 = 4.3.4 = -
podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/installed.php
r3465787 r3476876 2 2 'root' => array( 3 3 'name' => 'podlove/podcast-publisher', 4 'pretty_version' => '4.3. 4',5 'version' => '4.3. 4.0',6 'reference' => ' 9245c7e65ac3e6318c170131f534b36161b4efb5',4 'pretty_version' => '4.3.5', 5 'version' => '4.3.5.0', 6 'reference' => '5758a9de4ad26c6ec439671640940e6cab90f2e3', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 135 135 ), 136 136 'podlove/podcast-publisher' => array( 137 'pretty_version' => '4.3. 4',138 'version' => '4.3. 4.0',139 'reference' => ' 9245c7e65ac3e6318c170131f534b36161b4efb5',137 'pretty_version' => '4.3.5', 138 'version' => '4.3.5.0', 139 'reference' => '5758a9de4ad26c6ec439671640940e6cab90f2e3', 140 140 'type' => 'library', 141 141 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.