public function updateRelation(&$vars) { $return = true; $words = new MOD_words(); $TData = $this->singleLookup("select * from specialrelations where IdRelation=" . $vars["IdRelation"] . " and IdOwner=" . $_SESSION["IdMember"]); $mReceiver = $this->getMemberWithId($vars["IdRelation"]); if (isset($TData->id)) { $str = "\nUPDATE\n specialrelations\nSET\n Type = '" . stripslashes($vars['stype']) . "',\n Comment = " . $words->InsertInMTrad($this->dao->escape($vars['Comment']), "specialrelations.Comment", 0) . "\nWHERE\n IdOwner = " . $_SESSION["IdMember"] . " AND\n IdRelation = " . $vars['IdRelation'] . "\n "; $qry = $this->dao->query($str); if (!$qry) { $return = false; } $this->logWrite("Updating relation for " . $mReceiver->Username, "MyRelations"); } else { $return = false; } if ($return != false) { // Create a note (member-notification) for this action $note = array('IdMember' => $vars['IdRelation'], 'IdRelMember' => $_SESSION['IdMember'], 'Type' => 'relation', 'Link' => 'members/' . $vars['IdOwner'] . '/relations/add', 'WordCode' => 'Notify_relation_update'); $noteEntity = $this->createEntity('Note'); $noteEntity->createNote($note); } return $return; }
function NewInsertInMTrad($ss, $TableColumn, $IdRecord, $_IdMember = 0, $_IdLanguage = -1, $IdTrad = -1) { $words_for_BW = new MOD_words(); return $words_for_BW->InsertInMTrad($ss, $TableColumn, $IdRecord, $_IdMember, $_IdLanguage, $IdTrad); }