aboutsummaryrefslogtreecommitdiffstats
path: root/functions/parse/parse_tzs.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions/parse/parse_tzs.php')
-rw-r--r--functions/parse/parse_tzs.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/functions/parse/parse_tzs.php b/functions/parse/parse_tzs.php
index 4769d69..2e10834 100644
--- a/functions/parse/parse_tzs.php
+++ b/functions/parse/parse_tzs.php
@@ -1,5 +1,5 @@
<?php
-$ifile = @fopen($filename, "r");
+$ifile = @fopen($filename, 'r');
if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename));
$nextline = fgets($ifile);
#if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
@@ -12,12 +12,12 @@ $is_std = false;
while (!feof($ifile)) {
$line = $nextline;
$nextline = fgets($ifile, 1024);
- $nextline = ereg_replace("[\r\n]", "", $nextline);
+ $nextline = ereg_replace("[\r\n]", '', $nextline);
#handle continuation lines that start with either a space or a tab (MS Outlook)
- while (isset($nextline{0}) && ($nextline{0} == " " || $nextline{0} == "\t")) {
+ while (isset($nextline{0}) && ($nextline{0} == ' ' || $nextline{0} == "\t")) {
$line = $line . substr($nextline, 1);
$nextline = fgets($ifile, 1024);
- $nextline = ereg_replace("[\r\n]", "", $nextline);
+ $nextline = ereg_replace("[\r\n]", '', $nextline);
}
$line = trim($line);
switch ($line) {
@@ -56,7 +56,7 @@ while (!feof($ifile)) {
break;
default:
unset ($field, $data, $prop_pos, $property);
- if (ereg ("([^:]+):(.*)", $line, $line)){
+ if (ereg ('([^:]+):(.*)', $line, $line)){
$field = $line[1];
$data = $line[2];
$property = strtoupper($field);
@@ -90,5 +90,6 @@ while (!feof($ifile)) {
}
}
}
+fclose($ifile);
?> \ No newline at end of file

© 2014-2024 Faster IT GmbH | imprint | privacy policy