PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.3.8
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.3.8
8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 8.5.3 8.5.2 All 533 releases
← All changes | functions.php +13 -18 8.6.68.3.8 View file →
@@ -65,9 +65,9 @@
65 65 ?>
66 66 <style>
67 67 <?php if(get_option('wp_chatbot_custom_css')!="") {
68 68
69 - echo wp_strip_all_tags( get_option('wp_chatbot_custom_css') );// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
69 + echo wp_strip_all_tags( get_option('wp_chatbot_custom_css') );
70 70 }
71 71 ?>
72 72 </style>
73 73
@@ -1592,9 +1592,9 @@
1592 1592
1593 1593 if(class_exists('Qcformbuilder_Forms_Admin')){
1594 1594
1595 1595
1596 - $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type= %s",'primary')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
1596 + $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type= %s",'primary')); //DB Call OK, No Caching OK
1597 1597
1598 1598 if(!empty($results)){
1599 1599
1600 1600 foreach($results as $result){
@@ -1747,12 +1747,9 @@
1747 1747 }
1748 1748 }
1749 1749
1750 1750 function qcld_choose_random($array){
1751 - if (is_array($array) && !empty($array)) {
1752 - return $array[array_rand($array)];
1753 - }
1754 - return $array;
1751 + return $array[array_rand($array)];
1755 1752 }
1756 1753
1757 1754 //User session count
1758 1755 add_action('wp_ajax_qcld_wb_chatbot_session_count', 'qcld_wb_chatbot_session_count');
@@ -1765,22 +1762,22 @@
1765 1762 $tableuser = $wpdb->prefix.'wpbot_sessions';
1766 1763 $response = array();
1767 1764
1768 1765
1769 - $session_exists = $wpdb->get_row($wpdb->prepare("select * from {$tableuser} where 1 and id = %d",1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter
1766 + $session_exists = $wpdb->get_row($wpdb->prepare("select * from $tableuser where 1 and id = %d",1)); //DB Call OK, No Caching OK
1770 1767
1771 1768 if(empty($session_exists)){
1772 - $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
1769 + $wpdb->insert(
1773 1770 $tableuser,
1774 1771 array(
1775 1772 'session' => 1,
1776 1773 )
1777 - );
1774 + ); //DB Call OK, No Caching OK
1778 1775 }else{
1779 1776
1780 1777 $session_id = $session_exists->id;
1781 1778
1782 - $wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
1779 + $wpdb->update(
1783 1780 $tableuser,
1784 1781 array(
1785 1782 'session'=>($session_exists->session+1),
1786 1783 ),
@@ -1788,9 +1785,9 @@
1788 1785 array(
1789 1786 '%d',
1790 1787 ),
1791 1788 array('%d')
1792 - );
1789 + ); //DB Call OK, No Caching OK
1793 1790
1794 1791 }
1795 1792
1796 1793 wp_send_json($response);
@@ -1798,9 +1795,9 @@
1798 1795
1799 1796 /* WPBot Chat History Addon check */
1800 1797 function qcld_wpbot_is_active_chat_history(){
1801 1798
1802 - if(function_exists('qcwp_chat_session_menu_fnc') || function_exists('qcwp_chat_session_menu_fnc_free') || function_exists( 'qcpdcs_chat_session_menu_fnc' ) ){
1799 + if(function_exists('qcwp_chat_session_menu_fnc') || function_exists( 'qcpdcs_chat_session_menu_fnc' ) ){
1803 1800 return 1;
1804 1801 }else{
1805 1802 return 0;
1806 1803 }
@@ -1826,10 +1823,9 @@
1826 1823 $csvFile = file(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'small_talk.csv');
1827 1824
1828 1825 foreach ($csvFile as $line) {
1829 1826 $line = str_getcsv($line, ',', '"');
1830 - $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
1831 - $table, array(
1827 + $wpdb->insert($table, array(
1832 1828 'query' => $line[0],
1833 1829 'keyword' => $line[1],
1834 1830 'response' => $line[2],
1835 1831 'category'=> $line[3],
@@ -1834,17 +1830,16 @@
1834 1830 'response' => $line[2],
1835 1831 'category'=> $line[3],
1836 1832 'intent'=> '',
1837 1833 //'lang'=> 'en_US',
1838 - ));
1834 + )); //DB Call OK, No Caching OK
1839 1835 }
1840 1836
1841 1837 $table2 = $wpdb->prefix.'wpbot_response_category';
1842 1838
1843 - $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
1844 - $table2, array(
1839 + $wpdb->insert($table2, array(
1845 1840 'name' => 'smalltalk',
1846 - ));
1841 + )); //DB Call OK, No Caching OK
1847 1842
1848 1843 update_option( 'qcld_small_talk_imported', 'yes' );
1849 1844
1850 1845 }