aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-08-07 06:36:49 +0000
committerChad Little <clittle@users.sourceforge.net>2004-08-07 06:36:49 +0000
commit3e34b9a428a0ba1ba1c3b2df28a33474518c05f1 (patch)
tree9b790f36d0565d1cda17656394db0881e1295ee2
parente7ee60b5cc75dac3b915b6a624e3ed92345c374a (diff)
downloadphpicalendar-3e34b9a428a0ba1ba1c3b2df28a33474518c05f1.tar.gz
phpicalendar-3e34b9a428a0ba1ba1c3b2df28a33474518c05f1.tar.bz2
phpicalendar-3e34b9a428a0ba1ba1c3b2df28a33474518c05f1.zip
Fixed error messages for 2.0
-rw-r--r--functions/ical_parser.php4
-rw-r--r--functions/init.inc.php6
-rw-r--r--languages/english.inc.php1
3 files changed, 6 insertions, 5 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 5decda8..47ff58a 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -100,9 +100,9 @@ foreach ($cal_filelist as $filename) {
if ($parse_file) {
$ifile = @fopen($filename, "r");
- if ($ifile == FALSE) exit(error($error_invalidcal_lang, $filename));
+ if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename));
$nextline = fgets($ifile, 1024);
- if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($error_invalidcal_lang, $filename));
+ if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
//Mod time
if ($is_webcal == false) {
diff --git a/functions/init.inc.php b/functions/init.inc.php
index a691aee..131795d 100644
--- a/functions/init.inc.php
+++ b/functions/init.inc.php
@@ -104,7 +104,7 @@ if (substr($cal_filename, 0, 7) == 'http://' || substr($cal_filename, 0, 8) == '
$cal_filename = $cal_httpPrefix;
}
-if ($is_webcal) {
+if ($is_webcal == TRUE) {
if ($allow_webcals == 'yes' || in_array($cal_webcalPrefix, $list_webcals) || in_array($cal_httpPrefix, $list_webcals) || in_array($cal_httpsPrefix, $list_webcals)) {
$cal_displayname = substr(str_replace('32', ' ', basename($cal_filename)), 0, -4);
$cal = urlencode($cal_filename);
@@ -114,13 +114,13 @@ if ($is_webcal) {
$cal_filelist = array();
array_push($cal_filelist,$filename);
} else {
- exit(error($error_remotecal_lang, $HTTP_GET_VARS['cal']));
+ exit(error($lang['l_error_remotecal'], $HTTP_GET_VARS['cal']));
}
} else {
$cal_displayname = str_replace('32', ' ', $cal_filename);
$cal = urlencode($cal_filename);
if (in_array($cal_filename, $blacklisted_cals)) {
- exit(error($error_restrictedcal_lang, $cal_filename));
+ exit(error($lang['l_error_restrictedcal'], $cal_filename));
} else {
if (!isset($filename)) {
$cal_filelist = availableCalendars($username, $password, $cal_filename);
diff --git a/languages/english.inc.php b/languages/english.inc.php
index 807271d..608c439 100644
--- a/languages/english.inc.php
+++ b/languages/english.inc.php
@@ -199,5 +199,6 @@ $lang['l_error_back'] = 'Please use the "Back" button to return.';
$lang['l_error_remotecal'] = 'This server blocks remote calendars which have not been approved.';
$lang['l_error_restrictedcal'] = 'You have tried to access a calendar that is restricted on this server.';
$lang['l_error_invalidcal'] = 'Invalid calendar file. Please try a different calendar.';
+$lang['l_error_cantopen'] = 'Unable to open calendar.';
?>

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