` 都变成
* "Undefined variable"(页面在 debug 下会**直接把 Warning 打进正文**,
* 看着像排版坏了一小段,其实是变量被偷走)。
* 同理,_datetime.php 早年在任务页覆盖过 $t —— 同一个坑,别再踩第三次。
* 所以下面所有局部变量一律加 `$ledSet` 前缀,并且只 unset **自己定义**的那些。
*
* 用法(require 前 set 好):
* $cur 当前账本(含 name / my_perm)
* $shares 当前账本的共享列表
* $people 名册(共享给谁)
*/
$ledSetCanWrite = \App\Auth::canWrite() && \App\Ledger::canWrite($cur ?? []);
$ledSetCurId = (int)($cur['id'] ?? 0);
$ledSetIcon = static function (string $name): string {
$paths = [
'share' => '',
'rename'=> '',
'add' => '',
'del' => '',
];
$d = $paths[$name] ?? '';
if ($d === '') { return ''; }
return '';
};
?>