public function newMe($checkUserData = true, $output = false) { $this->changeA("TodoLastChange", time()); if (Session::currentUser() != null) { $this->changeA("TodoCreatorUserID", Session::currentUser()->getID()); } #if($this->A("TodoGUID") == "") # $this->changeA("TodoGUID", uniqid()."-".uniqid()); if ($this->A("TodoClass") != "" and $this->A("TodoClass") != "Kalender" and $this->A("TodoName") == "") { $this->changeA("TodoName", $this->getOwnerObject()->getCalendarTitle()); } $id = parent::newMe($checkUserData, false); if (Session::isPluginLoaded("mSync") and ($this->A("TodoExceptionForID") == "0" or $this->A("TodoExceptionForID") == "")) { mSync::newGUID("Todo", $id); } #$name = $this->getOwnerObject()->getCalendarTitle(); if (Session::isPluginLoaded("mGoogle") and $this->updateGoogle) { if ($this->A("TodoUserID") == Session::currentUser()->getID()) { Google::calendarCreateEvent(mTodoGUI::getCalendarDetails("Todo", $id)); } } if ($this->A("TodoClass") == "DBMail" and Session::isPluginLoaded("mMail")) { Mail::assign("Todo", $id, $this->A("TodoClassID")); } if (Session::isPluginLoaded("mAufgabe") and ($this->A("TodoType") == 3 or $this->A("TodoType") == 4 or $this->A("TodoType") == 5) and $this->A("TodoUserID") > 0) { $F = new Factory("Aufgabe"); $F->sA("AufgabeByClass", "Todo"); $F->sA("AufgabeByClassID", $id); $F->sA("AufgabeUserID", $this->A("TodoUserID")); $F->sA("AufgabeText", "Bericht für Termin eintragen"); $F->sA("AufgabeCreated", time()); $F->sA("AufgabeUntil", $this->A("TodoFromDay")); $F->sA("AufgabeUhrzeitVon", $this->A("TodoTillTime")); $F->store(); } return $id; }