Changeset 3331685
- Timestamp:
- 07/21/2025 07:00:31 PM (8 months ago)
- Location:
- ansera-search
- Files:
-
- 2 edited
- 10 copied
-
tags/1.1.2 (copied) (copied from ansera-search/trunk)
-
tags/1.1.2/ansera_search.php (copied) (copied from ansera-search/trunk/ansera_search.php) (3 diffs)
-
tags/1.1.2/css (copied) (copied from ansera-search/trunk/css)
-
tags/1.1.2/css/ansera_search_admin_settings.css (copied) (copied from ansera-search/trunk/css/ansera_search_admin_settings.css)
-
tags/1.1.2/images (copied) (copied from ansera-search/trunk/images)
-
tags/1.1.2/includes (copied) (copied from ansera-search/trunk/includes)
-
tags/1.1.2/js (copied) (copied from ansera-search/trunk/js)
-
tags/1.1.2/js/ansera_search_admin.js (copied) (copied from ansera-search/trunk/js/ansera_search_admin.js)
-
tags/1.1.2/js/ansera_search_admin_settings.js (copied) (copied from ansera-search/trunk/js/ansera_search_admin_settings.js)
-
tags/1.1.2/readme.txt (copied) (copied from ansera-search/trunk/readme.txt) (1 diff)
-
trunk/ansera_search.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ansera-search/tags/1.1.2/ansera_search.php
r3331599 r3331685 3 3 * Plugin Name: Ansera Search 4 4 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content. 5 * Version: 1.1. 15 * Version: 1.1.2 6 6 * Author: Ansera.AI 7 7 * Author URI: https://www.ansera.ai/ … … 64 64 add_action('ansera_search_sync_single_video_parallel', 'ansera_search_sync_single_video_parallel'); 65 65 add_action('ansera_search_check_sync_completion', 'ansera_search_check_sync_completion'); 66 67 define('ANSERA_SEARCH_PLUGIN_DB_VERSION','1.1'); 68 69 add_action('plugins_loaded', 'ansera_search_update_db_check'); 70 71 function ansera_search_update_db_check() { 72 $installed_version = get_option('ansera_search_plugin_db_version'); 73 if (!$installed_version) { 74 $installed_version = '0.0'; 75 } 76 77 if ($installed_version != ANSERA_SEARCH_PLUGIN_DB_VERSION) { 78 ansera_search_run_db_updates($installed_version); 79 update_option('ansera_search_plugin_db_version', ANSERA_SEARCH_PLUGIN_DB_VERSION); 80 } 81 } 82 83 function ansera_search_run_db_updates($installed_version) { 84 if (version_compare($installed_version, '1.1', '<')) { 85 ansera_search_create_video_links_table(); 86 } 87 } 88 89 90 66 91 67 92 const ANSERA_SEARCH_SYNC_COUNT = 'ansera_search_sync_count'; … … 1860 1885 require_once ABSPATH . 'wp-admin/includes/upgrade.php'; 1861 1886 dbDelta($sql); 1887 1888 1889 $post_sync_table = $wpdb->prefix . 'ansera_search_post_sync_status'; 1890 $column_type = $wpdb->get_var($wpdb->prepare( "SHOW COLUMNS FROM $post_sync_table LIKE %s", 'synced_status' ), 1); 1891 1892 // Check if 'pending' is NOT in the ENUM definition 1893 if ( strpos( $column_type, "'pending'" ) === false ) { 1894 // Modify the ENUM to include 'pending' 1895 $update_sql = " 1896 ALTER TABLE $post_sync_table 1897 MODIFY synced_status ENUM('synced', 'modified', 'new', 'error', 'unsynced', 'unsyncpending', 'pending') 1898 DEFAULT 'new' 1899 "; 1900 $wpdb->query( $update_sql ); 1901 } 1862 1902 1863 1903 } -
ansera-search/tags/1.1.2/readme.txt
r3331599 r3331685 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 1.1. 17 Stable tag: 1.1.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
ansera-search/trunk/ansera_search.php
r3331599 r3331685 3 3 * Plugin Name: Ansera Search 4 4 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content. 5 * Version: 1.1. 15 * Version: 1.1.2 6 6 * Author: Ansera.AI 7 7 * Author URI: https://www.ansera.ai/ … … 64 64 add_action('ansera_search_sync_single_video_parallel', 'ansera_search_sync_single_video_parallel'); 65 65 add_action('ansera_search_check_sync_completion', 'ansera_search_check_sync_completion'); 66 67 define('ANSERA_SEARCH_PLUGIN_DB_VERSION','1.1'); 68 69 add_action('plugins_loaded', 'ansera_search_update_db_check'); 70 71 function ansera_search_update_db_check() { 72 $installed_version = get_option('ansera_search_plugin_db_version'); 73 if (!$installed_version) { 74 $installed_version = '0.0'; 75 } 76 77 if ($installed_version != ANSERA_SEARCH_PLUGIN_DB_VERSION) { 78 ansera_search_run_db_updates($installed_version); 79 update_option('ansera_search_plugin_db_version', ANSERA_SEARCH_PLUGIN_DB_VERSION); 80 } 81 } 82 83 function ansera_search_run_db_updates($installed_version) { 84 if (version_compare($installed_version, '1.1', '<')) { 85 ansera_search_create_video_links_table(); 86 } 87 } 88 89 90 66 91 67 92 const ANSERA_SEARCH_SYNC_COUNT = 'ansera_search_sync_count'; … … 1860 1885 require_once ABSPATH . 'wp-admin/includes/upgrade.php'; 1861 1886 dbDelta($sql); 1887 1888 1889 $post_sync_table = $wpdb->prefix . 'ansera_search_post_sync_status'; 1890 $column_type = $wpdb->get_var($wpdb->prepare( "SHOW COLUMNS FROM $post_sync_table LIKE %s", 'synced_status' ), 1); 1891 1892 // Check if 'pending' is NOT in the ENUM definition 1893 if ( strpos( $column_type, "'pending'" ) === false ) { 1894 // Modify the ENUM to include 'pending' 1895 $update_sql = " 1896 ALTER TABLE $post_sync_table 1897 MODIFY synced_status ENUM('synced', 'modified', 'new', 'error', 'unsynced', 'unsyncpending', 'pending') 1898 DEFAULT 'new' 1899 "; 1900 $wpdb->query( $update_sql ); 1901 } 1862 1902 1863 1903 } -
ansera-search/trunk/readme.txt
r3331599 r3331685 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 1.1. 17 Stable tag: 1.1.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.