refactor: 移除 functions.php 中的向后兼容代码
- 删除旧的多 API 管理函数(argon_get_provider_apis, argon_add_provider_api 等) - 删除数据迁移函数 argon_migrate_ai_apis() - 移除自动迁移钩子 - 简化 argon_get_ai_provider_config() 函数,移除回退逻辑 - 简化 argon_get_active_api_config() 函数,移除向后兼容逻辑 - 清理临时测试文件和脚本
This commit is contained in:
21
tmp/analyze-settings.py
Normal file
21
tmp/analyze-settings.py
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
# 分析 settings.php 文件结构
|
||||
|
||||
with open('settings.php', 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# 查找关键位置
|
||||
pos1 = content.find('<!-- ========== 12. 文章功能 ==========')
|
||||
pos2 = content.find('<tr><th class="subtitle"><h3 id="subsection-footnote">')
|
||||
|
||||
print(f'文章功能开始位置: {pos1}')
|
||||
print(f'脚注引用开始位置: {pos2}')
|
||||
print(f'需要替换的字符数: {pos2 - pos1}')
|
||||
|
||||
# 统计行数
|
||||
lines_before = content[:pos1].count('\n')
|
||||
lines_between = content[pos1:pos2].count('\n')
|
||||
|
||||
print(f'\n文章功能开始行: {lines_before + 1}')
|
||||
print(f'需要移除的行数: {lines_between}')
|
||||
print(f'脚注引用开始行: {lines_before + lines_between + 1}')
|
||||
Reference in New Issue
Block a user