Changeset 3491436
- Timestamp:
- 03/26/2026 05:08:56 AM (10 days ago)
- Location:
- 1platform-content-ai
- Files:
-
- 12 added
- 6 deleted
- 24 edited
- 1 copied
-
tags/2.10.8 (copied) (copied from 1platform-content-ai/trunk)
-
tags/2.10.8/.git/FETCH_HEAD (modified) (1 diff)
-
tags/2.10.8/.git/ORIG_HEAD (modified) (1 diff)
-
tags/2.10.8/.git/config (modified) (1 diff)
-
tags/2.10.8/.git/index (modified) (previous)
-
tags/2.10.8/.git/logs/HEAD (modified) (1 diff)
-
tags/2.10.8/.git/logs/refs/heads/main (modified) (1 diff)
-
tags/2.10.8/.git/logs/refs/remotes/origin/main (modified) (1 diff)
-
tags/2.10.8/.git/objects/pack/pack-4b4531027d041460d6786096e359803e5be8ab94.idx (added)
-
tags/2.10.8/.git/objects/pack/pack-4b4531027d041460d6786096e359803e5be8ab94.pack (added)
-
tags/2.10.8/.git/objects/pack/pack-4b4531027d041460d6786096e359803e5be8ab94.rev (added)
-
tags/2.10.8/.git/objects/pack/pack-4ef3b6c9bc16158de1d9724b3104238c314dd6ba.idx (deleted)
-
tags/2.10.8/.git/objects/pack/pack-4ef3b6c9bc16158de1d9724b3104238c314dd6ba.pack (deleted)
-
tags/2.10.8/.git/objects/pack/pack-4ef3b6c9bc16158de1d9724b3104238c314dd6ba.rev (deleted)
-
tags/2.10.8/.git/refs/heads/main (modified) (1 diff)
-
tags/2.10.8/.git/refs/remotes/origin/main (modified) (1 diff)
-
tags/2.10.8/.git/refs/tags/qa-v2.10.7-rc36 (added)
-
tags/2.10.8/.git/refs/tags/v2.10.8 (added)
-
tags/2.10.8/1platform-content-ai.php (modified) (4 diffs)
-
tags/2.10.8/includes/database/MigrationRunner.php (added)
-
tags/2.10.8/includes/database/migrations/UpdateKeywordsTableStatus.php (modified) (1 diff)
-
tags/2.10.8/readme.txt (modified) (1 diff)
-
trunk/.git/FETCH_HEAD (modified) (1 diff)
-
trunk/.git/ORIG_HEAD (modified) (1 diff)
-
trunk/.git/config (modified) (1 diff)
-
trunk/.git/index (modified) (previous)
-
trunk/.git/logs/HEAD (modified) (1 diff)
-
trunk/.git/logs/refs/heads/main (modified) (1 diff)
-
trunk/.git/logs/refs/remotes/origin/main (modified) (1 diff)
-
trunk/.git/objects/pack/pack-4b4531027d041460d6786096e359803e5be8ab94.idx (added)
-
trunk/.git/objects/pack/pack-4b4531027d041460d6786096e359803e5be8ab94.pack (added)
-
trunk/.git/objects/pack/pack-4b4531027d041460d6786096e359803e5be8ab94.rev (added)
-
trunk/.git/objects/pack/pack-4ef3b6c9bc16158de1d9724b3104238c314dd6ba.idx (deleted)
-
trunk/.git/objects/pack/pack-4ef3b6c9bc16158de1d9724b3104238c314dd6ba.pack (deleted)
-
trunk/.git/objects/pack/pack-4ef3b6c9bc16158de1d9724b3104238c314dd6ba.rev (deleted)
-
trunk/.git/refs/heads/main (modified) (1 diff)
-
trunk/.git/refs/remotes/origin/main (modified) (1 diff)
-
trunk/.git/refs/tags/qa-v2.10.7-rc36 (added)
-
trunk/.git/refs/tags/v2.10.8 (added)
-
trunk/1platform-content-ai.php (modified) (4 diffs)
-
trunk/includes/database/MigrationRunner.php (added)
-
trunk/includes/database/migrations/UpdateKeywordsTableStatus.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
1platform-content-ai/tags/2.10.8/.git/FETCH_HEAD
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53branch 'main' of https://github.com/1platformlabs/1platform-content-ai1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 branch 'main' of https://github.com/1platformlabs/1platform-content-ai -
1platform-content-ai/tags/2.10.8/.git/ORIG_HEAD
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53 1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 -
1platform-content-ai/tags/2.10.8/.git/config
r3491387 r3491436 10 10 auto = 0 11 11 [http "https://github.com/"] 12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX 2JpMkwzbDZTTzZTc0tSN0U3WEt3V0c3UHJlajRNazJQZEFJcg==12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzXzRUeUVBeWhUbkpHaGdyUmNJd3JXYWJnOUtwS1ZzbDJoV01sQg== 13 13 [branch "main"] 14 14 remote = origin -
1platform-content-ai/tags/2.10.8/.git/logs/HEAD
r3491387 r3491436 1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518+0000 checkout: moving from master to main1 0000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000 checkout: moving from master to main -
1platform-content-ai/tags/2.10.8/.git/logs/refs/heads/main
r3491387 r3491436 1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518+0000 branch: Created from refs/remotes/origin/main1 0000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000 branch: Created from refs/remotes/origin/main -
1platform-content-ai/tags/2.10.8/.git/logs/refs/remotes/origin/main
r3491387 r3491436 1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518+0000 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head1 0000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501700 +0000 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head -
1platform-content-ai/tags/2.10.8/.git/refs/heads/main
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53 1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 -
1platform-content-ai/tags/2.10.8/.git/refs/remotes/origin/main
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53 1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 -
1platform-content-ai/tags/2.10.8/1platform-content-ai.php
r3491387 r3491436 5 5 * Plugin URI: https://1platform.pro/ 6 6 * Description: SaaS client for AI-powered content generation, SEO optimization, and site management. All AI processing happens on 1Platform external servers. Includes free local tools: Table of Contents and Internal Links. 7 * Version: 2.10. 77 * Version: 2.10.8 8 8 * Author: 1Platform 9 9 * License: GPLv2 or later … … 62 62 require_once plugin_dir_path( __FILE__ ) . 'includes/cron/agent-actions-cron.php'; 63 63 64 require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php'; 64 65 require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateKeywordsTable.php'; 65 66 require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateAPILogsTable.php'; … … 68 69 require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateInternalLinksTable.php'; 69 70 71 /** 72 * Build the migration runner with all registered migrations. 73 * 74 * Each migration is assigned a sequential version number. 75 * New migrations MUST be appended at the end with the next version number. 76 */ 77 function contai_build_migration_runner(): ContaiMigrationRunner { 78 $runner = new ContaiMigrationRunner(); 79 80 $runner->register(1, new ContaiCreateKeywordsTable()); 81 $runner->register(2, new ContaiCreateAPILogsTable()); 82 $runner->register(3, new ContaiCreateJobsTable()); 83 $runner->register(4, new ContaiUpdateKeywordsTableStatus()); 84 $runner->register(5, new ContaiCreateInternalLinksTable()); 85 86 return $runner; 87 } 88 70 89 function contai_activate_plugin() { 71 try { 72 $keywords_migration = new ContaiCreateKeywordsTable(); 73 $keywords_migration->up(); 74 } catch (Exception $e) { 75 contai_log("ContaiCreateKeywordsTable migration error: " . $e->getMessage()); 76 } 77 78 try { 79 $api_logs_migration = new ContaiCreateAPILogsTable(); 80 $api_logs_migration->up(); 81 } catch (Exception $e) { 82 contai_log("ContaiCreateAPILogsTable migration error: " . $e->getMessage()); 83 } 84 85 try { 86 $jobs_migration = new ContaiCreateJobsTable(); 87 $jobs_migration->up(); 88 } catch (Exception $e) { 89 contai_log("ContaiCreateJobsTable migration error: " . $e->getMessage()); 90 } 91 92 try { 93 $update_keywords_status = new ContaiUpdateKeywordsTableStatus(); 94 $update_keywords_status->up(); 95 } catch (Exception $e) { 96 contai_log("ContaiUpdateKeywordsTableStatus migration error: " . $e->getMessage()); 97 } 98 99 try { 100 $internal_links_migration = new ContaiCreateInternalLinksTable(); 101 $internal_links_migration->up(); 102 } catch (Exception $e) { 103 contai_log("ContaiCreateInternalLinksTable migration error: " . $e->getMessage()); 90 $runner = contai_build_migration_runner(); 91 $result = $runner->run(); 92 93 if (!$result['success']) { 94 contai_log('Migration batch failed: ' . $result['message']); 104 95 } 105 96 … … 309 300 } 310 301 add_action('admin_notices', 'contai_display_auth_error_notices'); 302 303 /** 304 * Display admin notice when database migrations have failed. 305 */ 306 function contai_display_migration_error_notice(): void { 307 if (!current_user_can('manage_options')) { 308 return; 309 } 310 311 $screen = get_current_screen(); 312 if (!$screen || strpos($screen->id, 'contai') === false) { 313 return; 314 } 315 316 require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php'; 317 318 $error = ContaiMigrationRunner::getError(); 319 if ($error === null) { 320 return; 321 } 322 323 printf( 324 '<div class="notice notice-error"><p><strong>%s</strong> %s</p></div>', 325 esc_html__('Content AI Database Error:', '1platform-content-ai'), 326 esc_html($error) 327 ); 328 } 329 add_action('admin_notices', 'contai_display_migration_error_notice'); -
1platform-content-ai/tags/2.10.8/includes/database/migrations/UpdateKeywordsTableStatus.php
r3483422 r3491436 27 27 return $this->db->query($sql); 28 28 } 29 30 public function down(): bool { 31 if (!$this->db->tableExists($this->tableName)) { 32 return true; 33 } 34 35 $table = $this->db->getTableName($this->tableName); 36 37 $sql = "ALTER TABLE {$table} 38 MODIFY COLUMN status ENUM('active', 'inactive', 'pending', 'processing', 'done') 39 NOT NULL DEFAULT 'pending'"; 40 41 return $this->db->query($sql); 42 } 43 44 public function getTableName(): string { 45 return $this->tableName; 46 } 29 47 } -
1platform-content-ai/tags/2.10.8/readme.txt
r3491387 r3491436 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.10. 77 Stable tag: 2.10.8 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
1platform-content-ai/trunk/.git/FETCH_HEAD
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53branch 'main' of https://github.com/1platformlabs/1platform-content-ai1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 branch 'main' of https://github.com/1platformlabs/1platform-content-ai -
1platform-content-ai/trunk/.git/ORIG_HEAD
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53 1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 -
1platform-content-ai/trunk/.git/config
r3491387 r3491436 10 10 auto = 0 11 11 [http "https://github.com/"] 12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX 2JpMkwzbDZTTzZTc0tSN0U3WEt3V0c3UHJlajRNazJQZEFJcg==12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzXzRUeUVBeWhUbkpHaGdyUmNJd3JXYWJnOUtwS1ZzbDJoV01sQg== 13 13 [branch "main"] 14 14 remote = origin -
1platform-content-ai/trunk/.git/logs/HEAD
r3491387 r3491436 1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518+0000 checkout: moving from master to main1 0000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000 checkout: moving from master to main -
1platform-content-ai/trunk/.git/logs/refs/heads/main
r3491387 r3491436 1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518+0000 branch: Created from refs/remotes/origin/main1 0000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000 branch: Created from refs/remotes/origin/main -
1platform-content-ai/trunk/.git/logs/refs/remotes/origin/main
r3491387 r3491436 1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518+0000 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head1 0000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501700 +0000 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head -
1platform-content-ai/trunk/.git/refs/heads/main
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53 1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 -
1platform-content-ai/trunk/.git/refs/remotes/origin/main
r3491387 r3491436 1 32f778d7f2194e62750f526bf1a6ad8607dc9d53 1 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 -
1platform-content-ai/trunk/1platform-content-ai.php
r3491387 r3491436 5 5 * Plugin URI: https://1platform.pro/ 6 6 * Description: SaaS client for AI-powered content generation, SEO optimization, and site management. All AI processing happens on 1Platform external servers. Includes free local tools: Table of Contents and Internal Links. 7 * Version: 2.10. 77 * Version: 2.10.8 8 8 * Author: 1Platform 9 9 * License: GPLv2 or later … … 62 62 require_once plugin_dir_path( __FILE__ ) . 'includes/cron/agent-actions-cron.php'; 63 63 64 require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php'; 64 65 require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateKeywordsTable.php'; 65 66 require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateAPILogsTable.php'; … … 68 69 require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateInternalLinksTable.php'; 69 70 71 /** 72 * Build the migration runner with all registered migrations. 73 * 74 * Each migration is assigned a sequential version number. 75 * New migrations MUST be appended at the end with the next version number. 76 */ 77 function contai_build_migration_runner(): ContaiMigrationRunner { 78 $runner = new ContaiMigrationRunner(); 79 80 $runner->register(1, new ContaiCreateKeywordsTable()); 81 $runner->register(2, new ContaiCreateAPILogsTable()); 82 $runner->register(3, new ContaiCreateJobsTable()); 83 $runner->register(4, new ContaiUpdateKeywordsTableStatus()); 84 $runner->register(5, new ContaiCreateInternalLinksTable()); 85 86 return $runner; 87 } 88 70 89 function contai_activate_plugin() { 71 try { 72 $keywords_migration = new ContaiCreateKeywordsTable(); 73 $keywords_migration->up(); 74 } catch (Exception $e) { 75 contai_log("ContaiCreateKeywordsTable migration error: " . $e->getMessage()); 76 } 77 78 try { 79 $api_logs_migration = new ContaiCreateAPILogsTable(); 80 $api_logs_migration->up(); 81 } catch (Exception $e) { 82 contai_log("ContaiCreateAPILogsTable migration error: " . $e->getMessage()); 83 } 84 85 try { 86 $jobs_migration = new ContaiCreateJobsTable(); 87 $jobs_migration->up(); 88 } catch (Exception $e) { 89 contai_log("ContaiCreateJobsTable migration error: " . $e->getMessage()); 90 } 91 92 try { 93 $update_keywords_status = new ContaiUpdateKeywordsTableStatus(); 94 $update_keywords_status->up(); 95 } catch (Exception $e) { 96 contai_log("ContaiUpdateKeywordsTableStatus migration error: " . $e->getMessage()); 97 } 98 99 try { 100 $internal_links_migration = new ContaiCreateInternalLinksTable(); 101 $internal_links_migration->up(); 102 } catch (Exception $e) { 103 contai_log("ContaiCreateInternalLinksTable migration error: " . $e->getMessage()); 90 $runner = contai_build_migration_runner(); 91 $result = $runner->run(); 92 93 if (!$result['success']) { 94 contai_log('Migration batch failed: ' . $result['message']); 104 95 } 105 96 … … 309 300 } 310 301 add_action('admin_notices', 'contai_display_auth_error_notices'); 302 303 /** 304 * Display admin notice when database migrations have failed. 305 */ 306 function contai_display_migration_error_notice(): void { 307 if (!current_user_can('manage_options')) { 308 return; 309 } 310 311 $screen = get_current_screen(); 312 if (!$screen || strpos($screen->id, 'contai') === false) { 313 return; 314 } 315 316 require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php'; 317 318 $error = ContaiMigrationRunner::getError(); 319 if ($error === null) { 320 return; 321 } 322 323 printf( 324 '<div class="notice notice-error"><p><strong>%s</strong> %s</p></div>', 325 esc_html__('Content AI Database Error:', '1platform-content-ai'), 326 esc_html($error) 327 ); 328 } 329 add_action('admin_notices', 'contai_display_migration_error_notice'); -
1platform-content-ai/trunk/includes/database/migrations/UpdateKeywordsTableStatus.php
r3483422 r3491436 27 27 return $this->db->query($sql); 28 28 } 29 30 public function down(): bool { 31 if (!$this->db->tableExists($this->tableName)) { 32 return true; 33 } 34 35 $table = $this->db->getTableName($this->tableName); 36 37 $sql = "ALTER TABLE {$table} 38 MODIFY COLUMN status ENUM('active', 'inactive', 'pending', 'processing', 'done') 39 NOT NULL DEFAULT 'pending'"; 40 41 return $this->db->query($sql); 42 } 43 44 public function getTableName(): string { 45 return $this->tableName; 46 } 29 47 } -
1platform-content-ai/trunk/readme.txt
r3491387 r3491436 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.10. 77 Stable tag: 2.10.8 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.