Skip to content

Problem on admin/media.php #20

@link0087

Description

@link0087

Hello,

i would like to introduce a little doubt that i have on this plugin, in particular on the media.php file.
I have WP Plugin version 3.0, on method "a_get_list" there is a problem on the return json.
on the if ( isset( $_POST['post_types'] ) && !empty( $_POST['post_types'] ) ) , so if i specified some post type on the regeneration screen to intend, the query in this piece of code, return a count of id:

$attachments = $wpdb->get_var( "SELECT count(ID)
FROM $wpdb->posts
WHERE 1 = 1
AND post_type = 'attachment'
$whichmimetype
AND
(post_parent = 0
OR
post_parent IN (
SELECT DISTINCT ID
FROM $wpdb->posts
WHERE post_type IN ('".implode( "', '", $_POST['post_types'] )."')
)) " );

this seems correct but is not compatible with the return code:

SIS_Admin_Main::displayJson( array( 'total' => count( $attachments ) ) );

in this case the plugin failed, because of a count of a count that is still "1".

i hope to be clear on this mail not easy to explaine for me in english :)

Please feel free to reply me back if you need more information.

Thank you so much

Fabio Sirchia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions