- * @since 2.5.1 - 2008-10-25
- * @param array $xcaldecl
- * @return string
- */
- function createComponent( &$xcaldecl ) {
- $objectname = $this->_createFormat();
- $component = $this->componentStart1.$objectname.$this->componentStart2.$this->nl;
- $component .= $this->createTzid();
- $component .= $this->createLastModified();
- $component .= $this->createTzurl();
- $component .= $this->createDtstart();
- $component .= $this->createTzoffsetfrom();
- $component .= $this->createTzoffsetto();
- $component .= $this->createComment();
- $component .= $this->createRdate();
- $component .= $this->createRrule();
- $component .= $this->createTzname();
- $component .= $this->createXprop();
- $component .= $this->createSubComponent();
- $component .= $this->componentEnd1.$objectname.$this->componentEnd2;
- if( is_array( $this->xcaldecl ) && ( 0 < count( $this->xcaldecl ))) {
- foreach( $this->xcaldecl as $localxcaldecl )
- $xcaldecl[] = $localxcaldecl;
- }
- return $component;
- }
-}
-?>
\ No newline at end of file
diff --git a/apps/calendar/libs/oc_calendar.php b/apps/calendar/libs/oc_calendar.php
deleted file mode 100755
index 4f0aa305e49..00000000000
--- a/apps/calendar/libs/oc_calendar.php
+++ /dev/null
@@ -1,72 +0,0 @@
-.
-*/
-class OC_CALENDAR_ICAL{
- public $defaultview;
- public $calendar;
- public $calendar_name;
- public $calendar_status;
- public $ics_properties;
- public $VCALENDAR;
- public $VTIMEZONE;
- public $DAYLIGHT;
-
- function __construct(){
- include("cfg/" . OC_USER::getUser() . ".cfg.php");
- include("iCalcreator.php");
- $this->defaultview = $defaultview;
- $this->calendar = $calendar;
- $this->calendar_name = $calendar_name;
- $this->calendarstatus = $calendar_status;
- }
-
- public function load_ics($path){
- if(!file_exists("../../data/" . OC_USER::getUser() . $path)){
- return false;
- }else{
- $calfile = file("../../data/" . OC_USER::getUser() . $path);
- $return = array();
- $eventnum = 0;
- foreach($calfile as $line){
-
-
-
- }
- }
- }
-
- public function converttojs($cal){
-
-
-
-
- }
-
- public function addevent($event, $calendar){
-
- }
-
- public function removeevent($event, $calendar){
-
- }
-
- public function changeevent($event, $calendar){
-
- }
-
- public function moveevent($event, $calendar){
-
- }
-
- public function choosecalendar_dialog(){
-
- }
-}
diff --git a/apps/calendar/libs/sanitize.php b/apps/calendar/libs/sanitize.php
deleted file mode 100755
index 9d6aae24e65..00000000000
--- a/apps/calendar/libs/sanitize.php
+++ /dev/null
@@ -1,271 +0,0 @@
- $max)))
- return FALSE;
- return $string;
-}
-
-// sanitize a string in prep for passing a single argument to system() (or similar)
-function sanitize_system_string($string, $min='', $max='')
-{
- $pattern = '/(;|\||`|>|<|&|^|"|'."\n|\r|'".'|{|}|[|]|\)|\()/i'; // no piping, passing possible environment variables ($),
- // seperate commands, nested execution, file redirection,
- // background processing, special commands (backspace, etc.), quotes
- // newlines, or some other special characters
- $string = preg_replace($pattern, '', $string);
- $string = '"'.preg_replace('/\$/', '\\\$', $string).'"'; //make sure this is only interpretted as ONE argument
- $len = strlen($string);
- if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
- return FALSE;
- return $string;
-}
-
-// sanitize a string for SQL input (simple slash out quotes and slashes)
-function sanitize_sql_string($string, $min='', $max='')
-{
- $string = nice_addslashes($string); //gz
- $pattern = "/;/"; // jp
- $replacement = "";
- $len = strlen($string);
- if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
- return FALSE;
- return preg_replace($pattern, $replacement, $string);
-}
-
-// sanitize a string for SQL input (simple slash out quotes and slashes)
-function sanitize_ldap_string($string, $min='', $max='')
-{
- $pattern = '/(\)|\(|\||&)/';
- $len = strlen($string);
- if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
- return FALSE;
- return preg_replace($pattern, '', $string);
-}
-
-
-// sanitize a string for HTML (make sure nothing gets interpretted!)
-function sanitize_html_string($string)
-{
- $pattern[0] = '/\&/';
- $pattern[1] = '/';
- $pattern[2] = "/>/";
- $pattern[3] = '/\n/';
- $pattern[4] = '/"/';
- $pattern[5] = "/'/";
- $pattern[6] = "/%/";
- $pattern[7] = '/\(/';
- $pattern[8] = '/\)/';
- $pattern[9] = '/\+/';
- $pattern[10] = '/-/';
- $replacement[0] = '&';
- $replacement[1] = '<';
- $replacement[2] = '>';
- $replacement[3] = ' ';
- $replacement[4] = '"';
- $replacement[5] = ''';
- $replacement[6] = '%';
- $replacement[7] = '(';
- $replacement[8] = ')';
- $replacement[9] = '+';
- $replacement[10] = '-';
- return preg_replace($pattern, $replacement, $string);
-}
-
-// make int int!
-function sanitize_int($integer, $min='', $max='')
-{
- $int = intval($integer);
- if((($min != '') && ($int < $min)) || (($max != '') && ($int > $max)))
- return FALSE;
- return $int;
-}
-
-// make float float!
-function sanitize_float($float, $min='', $max='')
-{
- $float = floatval($float);
- if((($min != '') && ($float < $min)) || (($max != '') && ($float > $max)))
- return FALSE;
- return $float;
-}
-
-// glue together all the other functions
-function sanitize($input, $flags, $min='', $max='')
-{
- if($flags & UTF8) $input = my_utf8_decode($input);
- if($flags & PARANOID) $input = sanitize_paranoid_string($input, $min, $max);
- if($flags & INT) $input = sanitize_int($input, $min, $max);
- if($flags & FLOAT) $input = sanitize_float($input, $min, $max);
- if($flags & HTML) $input = sanitize_html_string($input, $min, $max);
- if($flags & SQL) $input = sanitize_sql_string($input, $min, $max);
- if($flags & LDAP) $input = sanitize_ldap_string($input, $min, $max);
- if($flags & SYSTEM) $input = sanitize_system_string($input, $min, $max);
- return $input;
-}
-
-function check_paranoid_string($input, $min='', $max='')
-{
- if($input != sanitize_paranoid_string($input, $min, $max))
- return FALSE;
- return TRUE;
-}
-
-function check_int($input, $min='', $max='')
-{
- if($input != sanitize_int($input, $min, $max))
- return FALSE;
- return TRUE;
-}
-
-function check_float($input, $min='', $max='')
-{
- if($input != sanitize_float($input, $min, $max))
- return FALSE;
- return TRUE;
-}
-
-function check_html_string($input, $min='', $max='')
-{
- if($input != sanitize_html_string($input, $min, $max))
- return FALSE;
- return TRUE;
-}
-
-function check_sql_string($input, $min='', $max='')
-{
- if($input != sanitize_sql_string($input, $min, $max))
- return FALSE;
- return TRUE;
-}
-
-function check_ldap_string($input, $min='', $max='')
-{
- if($input != sanitize_string($input, $min, $max))
- return FALSE;
- return TRUE;
-}
-
-function check_system_string($input, $min='', $max='')
-{
- if($input != sanitize_system_string($input, $min, $max, TRUE))
- return FALSE;
- return TRUE;
-}
-
-// glue together all the other functions
-function check($input, $flags, $min='', $max='')
-{
- $oldput = $input;
- if($flags & UTF8) $input = my_utf8_decode($input);
- if($flags & PARANOID) $input = sanitize_paranoid_string($input, $min, $max);
- if($flags & INT) $input = sanitize_int($input, $min, $max);
- if($flags & FLOAT) $input = sanitize_float($input, $min, $max);
- if($flags & HTML) $input = sanitize_html_string($input, $min, $max);
- if($flags & SQL) $input = sanitize_sql_string($input, $min, $max);
- if($flags & LDAP) $input = sanitize_ldap_string($input, $min, $max);
- if($flags & SYSTEM) $input = sanitize_system_string($input, $min, $max, TRUE);
- if($input != $oldput)
- return FALSE;
- return TRUE;
-}
-?>
\ No newline at end of file
diff --git a/apps/calendar/settings.php b/apps/calendar/settings.php
deleted file mode 100755
index b53851ffe48..00000000000
--- a/apps/calendar/settings.php
+++ /dev/null
@@ -1,27 +0,0 @@
-. *
-************************************************/
-require_once('../../lib/base.php');
-if(!OC_USER::isLoggedIn()){
- header("Location: " . OC_HELPER::linkTo("index.php"));
- exit();
-}
-if(!file_exists("cfg/" . OC_USER::getUser() . ".cfg.php")){
- header("Location: install.php");
-}
-OC_UTIL::addScript("calendar", "calendar");
-OC_UTIL::addScript("calendar", "calendar_init");
-OC_UTIL::addStyle("calendar", "style");
-require_once("template.php");
-OC_APP::setActiveNavigationEntry("calendar_settings");
-$output = new OC_TEMPLATE("calendar", "settings", "admin");
-$output->printpage();
-?>
\ No newline at end of file
diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php
index e8f1b81de6a..3178b6c85a6 100755
--- a/apps/calendar/templates/calendar.php
+++ b/apps/calendar/templates/calendar.php
@@ -13,33 +13,17 @@
@@ -50,109 +34,109 @@
Time
-
+
All day
-
+
00:00
-
+
01:00
-
+
02:00
-
+
03:00
-
+
04:00
-
+
05:00
-
+
06:00
-
+
07:00
-
+
08:00
-
+
09:00
-
+
10:00
-
+
11:00
-
+
12:00
-
+
13:00
-
+
14:00
-
+
15:00
-
+
16:00
-
+
17:00
-
+
18:00
-
+
19:00
-
+
20:00
-
+
21:00
-
+
22:00
-
+
23:00
-
+
@@ -162,265 +146,265 @@
Time
-
-
-
-
-
-
-
+
+
+
+
+
+
+
All day
-
-
-
-
-
-
-
+
+
+
+
+
+
+
00:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
01:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
02:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
03:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
04:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
05:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
06:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
07:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
08:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
09:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
10:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
11:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
12:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
13:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
14:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
15:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
16:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
17:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
18:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
19:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
20:00
-
-
-
-
-
-
+
+
+
+
+
+
21:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
22:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
23:00
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -445,43 +429,43 @@
-
-
-
-
-
-
-
@@ -490,43 +474,43 @@
-
-
-
-
-
-
-
@@ -535,43 +519,43 @@
-
-
-
-
-
-
-
@@ -580,43 +564,43 @@
-
-
-
-
-
-
-
@@ -641,43 +625,43 @@
-
-
-
-
-
-
-
@@ -685,43 +669,43 @@
-
-
-
-
-
-
-
@@ -729,43 +713,43 @@
-
-
-
-
-
-
-
@@ -773,43 +757,43 @@
-
-
-
-
-
-
-
@@ -817,43 +801,43 @@
-
-
-
-
-
-
-
@@ -861,43 +845,43 @@
-
-
-
-
-
-
-
@@ -909,38 +893,7 @@
-
-
-
-
- Calendar 1
-
-
-
-
-
- Calendar 2
-
-
-
-
-
- Calendar 3
-
-
-
-
-
- Calendar 4
-
-
-
-
-
-
-
-
-
+
There was a fail, while parsing the file.
diff --git a/apps/calendar/templates/part.editevent.php b/apps/calendar/templates/part.editevent.php
new file mode 100644
index 00000000000..98e7bddfb0a
--- /dev/null
+++ b/apps/calendar/templates/part.editevent.php
@@ -0,0 +1,134 @@
+">
+
+
+
+ t("Category");?>:
+
+
+ Coming soon
+
+ t("Calendar");?>:
+
+
+ Coming soon
+
+
+
+
+
+
+
+
+ t("Attendees");?>:
+
+
+
+
+
+
+ t("Description");?>:
+
+
+
+
+ ">
+ ">
+
+
+
\ No newline at end of file
diff --git a/apps/calendar/templates/part.eventinfo.php b/apps/calendar/templates/part.eventinfo.php
new file mode 100644
index 00000000000..edccaaa2227
--- /dev/null
+++ b/apps/calendar/templates/part.eventinfo.php
@@ -0,0 +1,87 @@
+ ">
+
+
+ t("Title");?>:
+
+
+
+
+ t("Location");?>:
+
+
+
+
+
+
+ t("Category");?>:
+
+ t("Calendar");?>:
+
+
+
+
+
+
+
+
+ t("Attendees");?>:
+
+
+
+
+
+
+ t("Description");?>:
+
+
+
+
+ ">
+ ">
+
+
+
\ No newline at end of file
diff --git a/apps/calendar/templates/part.newevent.php b/apps/calendar/templates/part.newevent.php
new file mode 100644
index 00000000000..4360a704cb8
--- /dev/null
+++ b/apps/calendar/templates/part.newevent.php
@@ -0,0 +1,149 @@
+">
+
+
+
+ t("Category");?>:
+
+
+ Coming soon
+
+ t("Calendar");?>:
+
+
+ Coming soon
+
+
+
+
+
+
+
+
+
+ t("Attendees");?>:
+
+
+
+
+
+
+ t("Description");?>:
+
+
+
+
+ ">
+ ">
+
+
+
\ No newline at end of file