PluginProbe
Lasso Lite – Affiliate Link Manager & Product Displays / 113
Lasso Lite – Affiliate Link Manager & Product Displays v113
158 157 155 156 154 153 152 151 150 149 148 trunk 0.9.9 104 105 106 107 108 109 110 111 112 113 114 115 All 57 releases
← All changes | classes/class-lasso-db.php +7 -9 116113 View file →
@@ -429,9 +429,9 @@
429 429 '' AS post_name,
430 430 CONVERT(substring_index( option_name, '_', 4) USING utf8) AS post_title,
431 431 CASE
432 432 WHEN CONVERT(substring_index( substring_index(option_name, 'easyazon_item_', -1), '_', 1) USING utf8) IN (
433 - SELECT CONVERT(old_uri USING utf8) AS old_uri
433 + SELECT old_uri
434 434 FROM " . $revert_table . "
435 435 WHERE plugin = 'easyazon'
436 436 )
437 437 THEN 'checked'
@@ -517,11 +517,11 @@
517 517 $sql = Model::prepare( $sql, Setting_Enum::THIRSTYLINK_SLUG, '_ta_destination_url' );
518 518 }
519 519
520 520 // ? Lasso Pro plugin
521 - $url_details_table = Model::get_wp_table_name( 'lasso_url_details' );
522 - if ( Model::table_exists( $url_details_table ) && ( empty( $filter_plugin ) || $support_plugin[ Setting_Enum::LASSO_PRO_SLUG ] === $filter_plugin ) ) {
523 - $sql = $sql . "
521 + if ( empty( $filter_plugin ) || $support_plugin[ Setting_Enum::LASSO_PRO_SLUG ] === $filter_plugin ) {
522 + $url_details_table = Model::get_wp_table_name( 'lasso_url_details' );
523 + $sql = $sql . "
524 524 UNION
525 525
526 526 SELECT
527 527 po.ID as id,
@@ -855,10 +855,9 @@
855 855 }
856 856
857 857 if ( $custom_post_type ) {
858 858 $revert_data = $this->get_revert_by_id( $id );
859 - $post_type = get_post_type( $id );
860 - if ( ! empty( $revert_data ) && Constant::LASSO_POST_TYPE === $post_type ) {
859 + if ( ! empty( $revert_data ) ) {
861 860 // ? Switch back
862 861 if ( isset( $revert_data->plugin ) && 'pretty-link' === $revert_data->plugin ) {
863 862 $pretty_link_data = $this->get_pretty_link_by_id( $id );
864 863 $update_sql = '
@@ -1039,12 +1038,10 @@
1039 1038 SELECT option_value
1040 1039 FROM ' . Model::get_wp_table_name( 'options' ) . '
1041 1040 WHERE option_name LIKE %s
1042 1041 ';
1042 + $sql = Model::prepare( $sql, $option_name . '%' );
1043 1043
1044 - $option_name = Helper::esc_like_query( $option_name, true );
1045 - $sql = Model::prepare( $sql, $option_name );
1046 -
1047 1044 $result = Model::get_var( $sql );
1048 1045 $result = maybe_unserialize( $result );
1049 1046
1050 1047 return $result;
@@ -1106,8 +1103,9 @@
1106 1103 * @param string $url URL.
1107 1104 */
1108 1105 public function get_url_details_by_url( $url ) {
1109 1106 global $wpdb;
1107 +
1110 1108 $sql = '
1111 1109 SELECT
1112 1110 lud.*
1113 1111 FROM