X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=philter%2Fphilter%2Finclude%2Fplugin_custheader.inc.php;h=014be81a0a8277714e539eeebe30ed9b44413cd1;hb=ca0523711dc4ec02f2effb2ccfd3f6b176a325d0;hp=ca179ba1dddc4c9e87a991be63f4465eb35b4ab5;hpb=975d4fdb2af32a6ec38d966fba0fd894e239c4c6;p=old-projects.git diff --git a/philter/philter/include/plugin_custheader.inc.php b/philter/philter/include/plugin_custheader.inc.php index ca179ba..014be81 100644 --- a/philter/philter/include/plugin_custheader.inc.php +++ b/philter/philter/include/plugin_custheader.inc.php @@ -34,10 +34,6 @@ class CustHdrPlugin extends MatchPlugin { op_s.options[1] = new Option('"._i18n('3_not_contains')."',1,false,data[2]==1); op_s.options[2] = new Option(' = ',2,false,data[2]==2); op_s.options[3] = new Option(' != ',3,false,data[2]==3); - op_s.options[4] = new Option(' >= ',4,false,data[2]==4); - op_s.options[5] = new Option(' > ',5,false,data[2]==5); - op_s.options[6] = new Option(' <= ',6,false,data[2]==6); - op_s.options[7] = new Option(' < ',7,false,data[2]==7); op_s.selectIndex = data[2]; Node.appendChild(document.createTextNode(' ')); @@ -48,6 +44,17 @@ class CustHdrPlugin extends MatchPlugin { Node.appendChild(txt_i); }"; } + + function to_string($_data) { + $res = trim($_data[1]).':'; + switch($_data[2]) { + case 0: $res = "* ^$res.*{$_data[3]}\n"; break; + case 1: $res = "* !$res.*{$_data[3]}\n"; break; + case 2: $res = "* $res {$_data[3]}$\n"; break; + case 3: $res = "* !$res {$_data[3]}$\n"; break; + } + return $res; + } } /********************************************************************************