From: Philipp Takacs Date: Wed, 31 Aug 2016 15:21:15 +0000 (+0200) Subject: remove msg-hook config option X-Git-Tag: mmh-0.4~69 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=be582c44948fe09cba55e538f1c9e2f57edb11ad;p=mmh remove msg-hook config option This is removed, because I don't see this is necesarry and it's not a good idea to pass a user provided string direct in a format string. --- diff --git a/docs/README.hooks b/docs/README.hooks index 714ba00..6ae745a 100644 --- a/docs/README.hooks +++ b/docs/README.hooks @@ -44,15 +44,11 @@ ref-hook: This is the full pathname of a program that is invoked message file. The program is executed after the message is written. -msg-hook: This is a text message that is output if the execution of - one of the external hook programs fails. There is a built-in - default message if none is specified. - -The definition of refiling is a bit tricky. The refile hook is executed if a message is moved from one place to another. So, for example, the command refile -link +The definition of refiling is a bit tricky. The refile hook is executed if a causes the add hook to be executed, not the refile hook, because a new message is created, the old one isn't moved. @@ -109,3 +105,16 @@ sbr/ folder_delmsgs.c folder_pack.c ext_hook.c (new file) + +Old config options: +~~~~~~~~~~~~~~~~~~~ + +In the original implementation availible config option, which are removed. + +msg-hook: This is a text message that is output if the execution of + one of the external hook programs fails. There is a built-in + default message if none is specified. + This is removed, because I don't see this is necesarry and it's + not a good idee to pass a user provided string direkt in an + format string. + diff --git a/sbr/ext_hook.c b/sbr/ext_hook.c index 0f3bd79..3693d8b 100644 --- a/sbr/ext_hook.c +++ b/sbr/ext_hook.c @@ -29,11 +29,7 @@ ext_hook(char *hook_name, char *msg_filename1, char *msg_filename2) if (did_message) { return (NOTOK); } - if ((hook = context_find("msg-hook"))) { - advise(NULL, hook); - } else { - advise(NULL, "external hook (%s) failed.", hook); - } + advise(NULL, "external hook (%s) failed.", hook); did_message = 1; return (NOTOK); } else {