[Kolab-devel] server/kolab/kolab/admin/user vacation.php,1.7,1.8 by martin at doto.intevation.de
root at intevation.de
root at intevation.de
Thu Jun 12 18:58:51 CEST 2003
Update of /kolabrepository/server/kolab/kolab/admin/user
In directory doto:/tmp/cvs-serv21370
Modified Files:
vacation.php
Log Message:
Martin: Fixed encoding of " and '
Index: vacation.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/user/vacation.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- vacation.php 12 Jun 2003 13:15:46 -0000 1.7
+++ vacation.php 12 Jun 2003 16:58:49 -0000 1.8
@@ -94,17 +94,48 @@
}
$newscript = "require \"vacation\";";
-// $newscript .= "\n# keep next two lines:\n# return date: ".$day."-".$month."-".$year."\n# notification interval: ".$vacnotify;
+// $newscript .= "\n# keep next two lines:
+// \n# return date: ".$day."-".$month."-".$year."
+// \n# notification interval: ".$vacnotify;
$newscript .= "\nvacation :days ".$vacnotify;
+// $newscript .= ":mime \"MIME-Version: 1.0\nContent-type: text/plain; charset=utf-8\n";
+// $newscript .= ":mime :text\n";
+// $newscript .= "Content-Type: text/plain; charset=utf-8\n";
+// $newscript .= "Content-Transfer-Encoding: 8bit\n";
+
+//Content-Type: text/plain; charset=utf-8
+//Content-Transfer-Encoding: 8bit
+// :mime :text
// $mesg = "\n\"Abwesenheitsnotiz bis zum ".$day.". ".$month." ".$year.".\n";
- $vacmsg_utf8=utf8_encode($vacmsg);
+// $newscript .= " :mime\n\"Content-type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit";
+// $newscript .= $vacmsg."\";\n";
+ $vacmsg=str_replace("\'", "\\\'", $vacmsg);
+ $vacmsg=str_replace("\\", "\\\\", $vacmsg);
+ $vacmsg=str_replace("\"", "\\\"", $vacmsg);
+
+ $vacmsg_utf8=$vacmsg;
+
+ $vacmsg=str_replace('\"','"',$vacmsg);
+ $vacmsg=str_replace("\'","´",$vacmsg);
+ $vacmsg=stripslashes($vacmsg);
+
+ $vacmsg_utf8=str_replace('\"',"''",$vacmsg_utf8);
+ $vacmsg_utf8=str_replace("\'","'",$vacmsg_utf8);
+
+
+ $vacmsg_utf8=utf8_encode($vacmsg_utf8);
$newscript .= " \"".$vacmsg_utf8."\";\n";
+// works $newscript .= " \"".$vacmsg."\";\n";
// print $day."-".$month."-".$year." - vacnotify:".$vacnotify."\n";
upload_script ($newscript,$scriptname);
if (!($sieve->sieve_setactivescript($scriptname)))
array_push($errors,"Could not upload and activate directive on your IMAP server!");
-// print "<tr><td>Vacation directive on server activated</td></tr>\n";
+
+ $vacmsg=str_replace('\"','"',$vacmsg);
+ $vacmsg=str_replace("\'","´",$vacmsg);
+ $vacmsg=stripslashes($vacmsg);
+
print "<tr><td>People sending you E-Mail will be notified every $vacnotify days with the following message:</td></tr>\n";
print "<tr><td align=\"left\"><pre>$vacmsg</pre></center></td></tr></table>\n";
print "<CENTER><TABLE WIDTH=\"10%%\" CELLSPACING=0 CELLPADDING=0 BORDER=0>\n";
More information about the devel
mailing list