eg-attachments

説明

このプラグインの公開は2024年3月7日に停止されており、ダウンロードできません。 この公開停止は一時的なもので、完全なレビューを待っている状態です。

評価

2017年4月27日 1 reply
In database query inside a plugin file is not as per the standard WordPress queries. In file "\eg-attachments\inc\eg-attachments-public.inc.php" there is a function "record_click". In this function author is using below query: $sql = $wpdb->prepare('SELECT click_id,clicks_number FROM wp_eg_attachments_clicks WHERE click_date=CURRENT_DATE() AND attach_id=%d AND post_id=%d', $attach_id, $parent_id); Just look at the query, author is using “wp_eg_attachments_clicks” for a table. Here table prefix for that table is “wp_” which is not dynamic. Author should use something like below: $sql = $wpdb->prepare('SELECT click_id,clicks_number FROM '.$wpdb->prefix.'eg_attachments_clicks WHERE click_date=CURRENT_DATE() AND attach_id=%d AND post_id=%d', $attach_id, $parent_id); In place of "wp_" we should always use "$wpdb->prefix" in our queries so that our query will not break even change of table prefix by the user from wp-config.php file. Request to author, please update it in your next release. Thanks, Sunil Chaudhary
8件のレビューをすべて表示

貢献者と開発者

EG-Attachments はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“EG-Attachments” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。