Plugin Directory

Changeset 3476876


Ignore:
Timestamp:
03/07/2026 05:35:04 AM (2 days ago)
Author:
eteubert
Message:

Update to version 4.3.5 from GitHub

Location:
podlove-podcasting-plugin-for-wordpress
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • podlove-podcasting-plugin-for-wordpress/tags/4.3.5/lib/repair.php

    r3047031 r3476876  
    4343        self::flush_rewrite_rules();
    4444        self::remove_duplicate_episodes();
     45        self::repair_missing_columns();
    4546
    4647        // hook for modules to add their repair methods
     
    148149                    <?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'); ?>
    149150                </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>
    150155                <?php // hook for modules to add their repair method descriptions?>
    151156                <?php foreach (apply_filters('podlove_repair_descriptions', []) as $entry) { ?>
     
    197202        self::clear_repair_log();
    198203    }
     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    }
    199279}
  • podlove-podcasting-plugin-for-wordpress/tags/4.3.5/podlove.php

    r3465787 r3476876  
    33 * Plugin Name: Podlove Podcast Publisher
    44 * Plugin URI:  https://podlove.org/podlove-podcast-publisher/
    5  * Version: 4.3.4
     5 * Version: 4.3.5
    66 * Requires at least: 4.9.6
    77 * Requires PHP: 8.0
  • podlove-podcasting-plugin-for-wordpress/tags/4.3.5/readme.txt

    r3465787 r3476876  
    33Donate link: https://opencollective.com/podlove
    44Tags: podlove, podcast, publishing, rss, audio
    5 Tested up to: 6.9.0
    6 Stable tag: 4.3.4
     5Tested up to: 6.9.1
     6Stable tag: 4.3.5
    77Requires at least: 4.9.6
    88Requires PHP: 8.0
     
    119119
    120120== Changelog ==
     121
     122= 4.3.5 =
     123
     124* new: the "Repair" function in "Tools" now checks for missing database columns and adds missing ones
    121125
    122126= 4.3.4 =
  • podlove-podcasting-plugin-for-wordpress/tags/4.3.5/vendor/composer/installed.php

    r3465787 r3476876  
    22    'root' => array(
    33        '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',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    135135        ),
    136136        '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',
    140140            'type' => 'library',
    141141            'install_path' => __DIR__ . '/../../',
  • podlove-podcasting-plugin-for-wordpress/trunk/lib/repair.php

    r3047031 r3476876  
    4343        self::flush_rewrite_rules();
    4444        self::remove_duplicate_episodes();
     45        self::repair_missing_columns();
    4546
    4647        // hook for modules to add their repair methods
     
    148149                    <?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'); ?>
    149150                </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>
    150155                <?php // hook for modules to add their repair method descriptions?>
    151156                <?php foreach (apply_filters('podlove_repair_descriptions', []) as $entry) { ?>
     
    197202        self::clear_repair_log();
    198203    }
     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    }
    199279}
  • podlove-podcasting-plugin-for-wordpress/trunk/podlove.php

    r3465787 r3476876  
    33 * Plugin Name: Podlove Podcast Publisher
    44 * Plugin URI:  https://podlove.org/podlove-podcast-publisher/
    5  * Version: 4.3.4
     5 * Version: 4.3.5
    66 * Requires at least: 4.9.6
    77 * Requires PHP: 8.0
  • podlove-podcasting-plugin-for-wordpress/trunk/readme.txt

    r3465787 r3476876  
    33Donate link: https://opencollective.com/podlove
    44Tags: podlove, podcast, publishing, rss, audio
    5 Tested up to: 6.9.0
    6 Stable tag: 4.3.4
     5Tested up to: 6.9.1
     6Stable tag: 4.3.5
    77Requires at least: 4.9.6
    88Requires PHP: 8.0
     
    119119
    120120== Changelog ==
     121
     122= 4.3.5 =
     123
     124* new: the "Repair" function in "Tools" now checks for missing database columns and adds missing ones
    121125
    122126= 4.3.4 =
  • podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/installed.php

    r3465787 r3476876  
    22    'root' => array(
    33        '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',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    135135        ),
    136136        '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',
    140140            'type' => 'library',
    141141            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.