Plugin Directory

Changeset 3257671


Ignore:
Timestamp:
03/18/2025 09:36:48 AM (12 months ago)
Author:
crazypsycho
Message:

fix database-queries

Location:
adminquickbar
Files:
81 added
3 edited

Legend:

Unmodified
Added
Removed
  • adminquickbar/trunk/Lib/Sidebar.php

    r3254835 r3257671  
    195195                        language_code
    196196                        FROM $wpdb->posts
    197                         LEFT OUTER JOIN {$wpdb->prefix}icl_translations ON $wpdb->posts.ID = element_id AND element_type = 'post_%s'
     197                        LEFT OUTER JOIN {$wpdb->prefix}icl_translations ON $wpdb->posts.ID = element_id AND element_type = %s
    198198                        WHERE $wpdb->posts.post_type = %s
    199199                    AND $wpdb->posts.post_status NOT IN ('auto-draft')
    200200                    ORDER BY `post_parent` ASC, menu_order ASC
    201                  ", $postType->name, $postType->name ), OBJECT );
     201                 ", 'post_' . $postType->name, $postType->name ), OBJECT );
    202202                    // phpcs:enable WordPress.DB.DirectDatabaseQuery
    203203
     
    244244                    FROM $wpdb->posts
    245245                        LEFT OUTER JOIN $wpdb->term_relationships on $wpdb->posts.ID = $wpdb->term_relationships.object_id
    246                         LEFT OUTER JOIN {$wpdb->prefix}icl_translations ON $wpdb->posts.ID = element_id AND element_type = 'post_%s'
     246                        LEFT OUTER JOIN {$wpdb->prefix}icl_translations ON $wpdb->posts.ID = element_id AND element_type = %s
    247247               
    248248                    WHERE $wpdb->posts.post_type = %s
     
    250250                    GROUP BY $wpdb->posts.ID
    251251                    ORDER BY menu_order ASC
    252                  ", $postType->name, $postType->name ), OBJECT );
     252                 ", 'post_' . $postType->name, $postType->name ), OBJECT );
    253253                    // phpcs:enable WordPress.DB.DirectDatabaseQuery
    254254                } else {
     
    314314
    315315        $postIdString = implode( ',', $postIds );
    316         $cacheKey = 'aqb_' . implode( '_', $postIds );
     316        $cacheKey = 'aqb_templates_' . implode( '_', $postIds );
    317317
    318318        $templateTypes = wp_cache_get( $cacheKey );
  • adminquickbar/trunk/README.txt

    r3254835 r3257671  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.9.2
     8Stable tag: 1.9.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2828
    2929== Changelog ==
     30= 1.9.3 =
     31* Fix broken database-queries
     32
    3033= 1.9.2 =
    3134* Fix security issue
  • adminquickbar/trunk/admin-quickbar.php

    r3254835 r3257671  
    1616 * Plugin URI:        https://github.com/RTO-Websites/Wordpress-AdminQuickbar
    1717 * Description:       Adds a quickbar in admin with fast access to all posts/pages
    18  * Version:           1.9.2
     18 * Version:           1.9.3
    1919 * Author:            RTO GmbH
    2020 * Author URI:        https://www.rto.de
     
    3030}
    3131
    32 define( 'AdminQuickbar_VERSION', '1.9.2' );
     32define( 'AdminQuickbar_VERSION', '1.9.3' );
    3333
    3434define( 'AdminQuickbar_DIR', str_replace( '\\', '/', __DIR__ ) );
Note: See TracChangeset for help on using the changeset viewer.