/** * Converts $data into class values * */ function convertData() { $this->processField("uid", 0); $this->rawdata = serialize($this->data); //$this->processField("catid",""); /* most of this now goes in the eventdetail $this->processField("dtstart",0); $this->processField("dtstartraw",""); $this->processField("duration",0); $this->processField("durationraw",""); $this->processField("dtend",0); $this->processField("dtendraw",""); $this->processField("dtstamp",""); $this->processField("class",""); $this->processField("categories",""); $this->processField("description",""); $this->processField("geolon","0"); $this->processField("geolat","0"); $this->processField("location",""); $this->processField("priority",""); $this->processField("status",""); $this->processField("summary",""); $this->processField("contact",""); $this->processField("organizer",""); $this->processField("url",""); $this->processField("created",""); $this->processField("sequence",""); */ $this->processField("recurrence-id", ""); $this->processField("lockevent", 0); // old events access and published state $this->processField("x-access", JEVHelper::getBaseAccess(), "access"); $this->processField("x-state", 1, "state"); $user =& JFactory::getUser(); $this->processField("x-createdby", $user->id, "created_by"); $this->processField("x-createdbyalias", "", "created_by_alias"); $this->processField("x-modifiedby", $user->id, "modified_by"); /* if (isset($this->rrule)) $this->trueend = $this->rrule->trueEndDate($this->dtend); else $this->trueend = $this->dtend; */ if (array_key_exists("EXDATE", $this->data) && count($this->data["EXDATE"]) > 0) { $this->_exdate = $this->data["EXDATE"]; } }
public static function newICSFileFromFile($file, $icsid, $catid, $access = 0, $state = 1, $label = "", $autorefresh = 0, $ignoreembedcat = 0) { $db = JFactory::getDBO(); $temp = new iCalICSFile($db); $temp->_setup($icsid, $catid, $access, $state, $autorefresh, $ignoreembedcat); if ($access == 0) { $temp->access = intval(JEVHelper::getBaseAccess()); } $temp->srcURL = ""; $temp->filename = $file['name']; $temp->icaltype = 1; // i.e. from file if ($label != "") { $temp->label = $label; } else { $temp->label = $temp->filename; } if (false === ($temp->_icalInfo =& JEVHelper::iCalInstance($file['tmp_name']))) { return false; } return $temp; }
/** * Null Constructor */ function iCalICSFile(&$db) { parent::__construct('#__jevents_icsfile', 'ics_id', $db); $this->access = JEVHelper::getBaseAccess(); }