From 06a7b3da196993ad61d4cbe215c60ff13fe436e0 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sat, 14 Dec 2024 00:20:14 +0800 Subject: [PATCH] Update index.py --- plugins/xhprof/index.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/xhprof/index.py b/plugins/xhprof/index.py index 92e32f234..d79ac3319 100755 --- a/plugins/xhprof/index.py +++ b/plugins/xhprof/index.py @@ -125,13 +125,14 @@ def getConfAppStart(): def phpPrependFile(version): app_start = getConfAppStart() - if not os.path.exists(app_start): - tpl = mw.getPluginDir() + '/php/conf/app_start.php' - content = mw.readFile(tpl) - content = contentReplace(content, version) - mw.writeFile(app_start, content) + tpl = mw.getPluginDir() + '/php/conf/app_start.php' + content = mw.readFile(tpl) + content = contentReplace(content, version) + mw.writeFile(app_start, content) def start(): + phpPrependFile() + file_tpl = getPluginDir() + '/conf/xhprof.conf' file_run = getConf()