Menu

#13 PROBLEM IN translate_limit

open
nobody
None
5
2012-05-08
2012-05-08
Anonymous
No

WordPress 3.3.2
Database abstraction 1.1.4
Using pdo sql server

Problem : Media Library is not showing any files.

Mysql query:
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'attachment' AND (wp_posts.post_status = 'inherit' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 20

Sql server query:
SELECT TOP 0 * FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'attachment' AND (wp_posts.post_status = 'inherit' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC

Function translate_limit in translations.php is not working properly, i think
$query = str_ireplace('SELECT ', 'SELECT TOP ' . $limit_matches[1] . ' ', $query);
should be
$query = str_ireplace('SELECT ', 'SELECT TOP ' . $limit_matches[4] . ' ', $query);

can anyone confirm?

Discussion


Log in to post a comment.