Skip to content

Comments

Fix/manager language mix in settings#405

Open
yama wants to merge 14 commits intomainfrom
fix/manager-language-mix-in-settings
Open

Fix/manager language mix in settings#405
yama wants to merge 14 commits intomainfrom
fix/manager-language-mix-in-settings

Conversation

@yama
Copy link
Member

@yama yama commented Feb 21, 2026

概要

管理画面設定の言語キー解決で発生していた言語混在を防止しつつ、インストーラーのアクセス制御と後始末を簡素化しました。あわせて、リリースパッケージ作成ルールを release.yml に一本化し、運用ドキュメントとCodex向けスキル/計画ファイルを追加しています。

変更内容

  • 管理画面設定(manager/actions/tool/mutate_settings.*)の言語キー取得を改善
  • get_lang_keys()include ベースからファイル解析ベースへ変更し、$_lang 汚染による言語混在を回避
  • 言語キー配列を遅延ロード($lang_keys[$lang] = true)に変更して必要時のみ解決
  • インストーラーの BASIC 認証設定を廃止し、allowed_ips ベースの制御へ統一
  • インストール完了時に install-config.php の自動削除処理を追加(成功/失敗メッセージとログ出力を追加)
  • インストーラー言語ファイル(英語/日本語)の文言を上記仕様に合わせて更新
  • リリースワークフローの除外対象を拡充(.agent/, .codex/, .env*, manager/includes/cli/ など)
  • assets/docs/release-process.md を簡潔化し、除外設定のSSOTを release.yml に明示
  • Codex運用向けにPRルール整形、スキル定義、実行計画ドキュメントを追加

確認手順

  • 管理画面の設定更新画面を開き、言語依存ラベル/説明が混在しないことを確認
  • 複数言語環境で設定キー参照時にエラーが出ないことを確認
  • install-config.php を配置してインストールを実行し、IP制御のみで判定されることを確認
  • インストール完了後、install-config.php が自動削除されること(または失敗時に警告表示されること)を確認
  • release.ymlPrepare dist directory 相当の rsync をローカル実行し、追加除外対象が dist/ に含まれないことを確認

備考

  • このPRにはアプリ実装に加えて、.agent/.codex/ 配下の運用ファイル追加が含まれます。
  • 互換性観点では、インストーラーの BASIC 認証設定を使っていた運用は allowed_ips 前提へ移行が必要です。

Copilot AI review requested due to automatic review settings February 21, 2026 10:16
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54e2ec6a64

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +34 to +35
--exclude='evo' \
--exclude='manager/includes/cli/' \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge CLI実行ファイルをリリース除外対象から外す

release.ymlPrepare dist directory(確認対象: .github/workflows/release.yml)で evomanager/includes/cli/ を除外すると、タグから生成される配布zipにはCLI本体が含まれず、manager/includes/cli/README.md にある php evo ... 系の運用コマンドが本番配布物で実行不能になります。リポジトリにはCLI機能が実装済みなのに、リリース経路だけで機能が欠落するため回帰です。

Useful? React with 👍 / 👎.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

管理画面設定の言語キー解決における言語混在の修正と、インストーラーのアクセス制御の簡素化を行うPR。あわせてリリースワークフローの除外設定を拡充し、Codex/Agent向けの運用ファイルを追加。

Changes:

  • 管理画面設定で言語キーをincludeベースからファイル解析ベースへ変更し、$_lang汚染を回避
  • インストーラーのBASIC認証を廃止し、IP制限のみに統一
  • インストール完了時にinstall-config.phpを自動削除する機能を追加
  • リリースパッケージから.agent/.codex/、CLI関連ファイルなどを除外

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
manager/actions/tool/mutate_settings/functions.inc.php 言語キー取得を正規表現ベースに変更し、$_lang汚染を防止
manager/actions/tool/mutate_settings.dynamic.php 言語キー配列を遅延評価に変更
install/langs/*.inc.php インストーラー言語ファイルをIP制限のみの運用に合わせて更新
install/instprocessor.php インストール完了時のinstall-config.php自動削除機能を追加
install/install-config.sample.php BASIC認証設定を削除
install/functions.php BASIC認証関連関数を削除
.github/workflows/release.yml リリース除外パターンを拡充
assets/docs/release-process.md ドキュメントを簡素化し、SSOTをrelease.ymlに明示
.codex/skills/* Codex運用スキル定義を追加
.agent/plans/* 実行計画ドキュメントを追加
.github/codex-pr-rules.md PRルールを整形

if ($content === false) {
return [];
}
$matched = preg_match_all('/\$_lang\[\s*([\'"])(.*?)\1\s*\]\s*=/', $content, $matches);
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

正規表現パターンで文字列の内側のクォートをエスケープした形で扱っている場合、意図通りにキーを抽出できない可能性がある。

例:

  • $_lang['test\'key'] = 'value'; のようなエスケープされた文字列
  • $_lang["test\"key"] = "value"; のようなダブルクォート内のエスケープ

現在のパターン /\$_lang\[\s*([\'"])(.*?)\1\s*\]\s*=/ では、バッククォートでエスケープされたクォートを含むキーを正しく抽出できない。

改善案: より堅牢なパターンを使用するか、コメント行をスキップする処理を追加することを検討してください。

Suggested change
$matched = preg_match_all('/\$_lang\[\s*([\'"])(.*?)\1\s*\]\s*=/', $content, $matches);
$matched = preg_match_all('/\$_lang\[\s*([\'"])((?:\\\\.|[^\\\\\1])*)\1\s*\]\s*=/', $content, $matches);

Copilot uses AI. Check for mistakes.
Comment on lines 31 to +36
global $lang_keys;
$lang_return = [];
foreach ($lang_keys as $lang => $keys) {
if (!in_array($key, $keys)) {
if ($keys === true) {
$keys = get_lang_keys("{$lang}.inc.php");
$lang_keys[$lang] = $keys;
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

遅延評価の仕組みが機能するためには、$lang_keysget_langs_by_key() 内でグローバル変数として参照される必要がある。しかし、$lang_keys への参照は global $lang_keys; で宣言されているが、この変数が外部スコープで初期化されていることに依存している。

mutate_settings.dynamic.php で初期化した $lang_keysget_langs_by_key() 内で正しく参照されるかどうかは、この関数の呼び出しコンテキストに依存する。関数がリクエスト全体で一貫したスコープで呼び出されることを確認してください。

Copilot uses AI. Check for mistakes.
yama added 5 commits February 21, 2026 19:49
… Docker validation

- Added minimal CLI entry point and DB commands to Evolution CMS JP Edition.
- Implemented core commands: help, db:console, db:query, make:command.
- Enhanced CLI with additional commands: cache:clear, config:show, db:tables, db:describe, db:count.
- Established Docker environment for CLI functionality verification.
- Documented command usage and updated README for CLI.
- Prioritized command implementation based on utility and necessity.

fix(logging): Resolve undefined array key warning in logging pagination

- Added boundary checks in logging.static.php for pagination window.
- Applied ceil() in getNumberOfPage() to ensure integer page count.
- Conducted static validation to confirm no syntax errors in modified files.
- Pending visual verification for pagination across multiple pages.

feat(validation): Create CLI-first validation skill with optional browser checks

- Standardized AI-driven validation to prioritize CLI execution with optional browser checks.
- Developed CLI validation flow and integrated Playwright for browser validation.
- Documented validation procedures and usage instructions.

fix(language): Correct mixed language display issue in manager settings

- Isolated $_lang pollution in get_lang_keys() to prevent language mixing.
- Minimized unnecessary loading of all language files during settings display.
- Confirmed no mixed language display in the management interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant