示例#1
0
     if ($PHON) {
         $gedrec .= "\n1 PHON " . $PHON;
     }
     $FAX = WT_Filter::post('FAX');
     if ($FAX) {
         $gedrec .= "\n1 FAX " . $FAX;
     }
     $EMAIL = WT_Filter::post('EMAIL');
     if ($EMAIL) {
         $gedrec .= "\n1 EMAIL " . $EMAIL;
     }
     $WWW = WT_Filter::post('WWW');
     if ($WWW) {
         $gedrec .= "\n1 WWW " . $WWW;
     }
     $record = WT_GedcomRecord::createRecord($gedrec, WT_GED_ID);
     $controller->addInlineJavascript('openerpasteid("' . $record->getXref() . '");');
     break;
     ////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////
 case 'editname':
     $xref = WT_Filter::get('xref', WT_REGEX_XREF);
     $fact_id = WT_Filter::get('fact_id');
     $person = WT_Individual::getInstance($xref);
     check_record_access($person);
     // Find the fact to edit
     $name_fact = null;
     foreach ($person->getFacts() as $fact) {
         if ($fact->getFactId() == $fact_id && $fact->canEdit()) {
             $name_fact = $fact;
         }
示例#2
0
                 Log::addMediaLog('Thumbnail file ' . $serverFileName . ' uploaded');
             }
         }
     }
     $controller->pageHeader();
     // Build the gedcom record
     $newged = "0 @new@ OBJE";
     if ($tag[0] == 'FILE') {
         // The admin has an edit field to change the file name
         $text[0] = $folderName . $fileName;
     } else {
         // Users keep the original filename
         $newged .= "\n1 FILE " . $folderName . $fileName;
     }
     $newged = handle_updates($newged);
     $media = WT_GedcomRecord::createRecord($newged, WT_GED_ID);
     if ($linktoid) {
         $record = WT_GedcomRecord::getInstance($linktoid);
         $record->createFact('1 OBJE @' . $media->getXref() . '@', true);
         Log::addEditLog('Media ID ' . $media->getXref() . " successfully added to {$linktoid}.");
         $controller->addInlineJavascript('closePopupAndReloadParent();');
     } else {
         Log::addEditLog('Media ID ' . $media->getXref() . ' successfully added.');
         $controller->addInlineJavascript('openerpasteid("' . $media->getXref() . '");');
     }
     echo '<button onclick="closePopupAndReloadParent();">', WT_I18N::translate('close'), '</button>';
     exit;
 case 'update':
     // Save the information from the “editmedia” action
     $controller->setPageTitle(WT_I18N::translate('Edit media object'));
     // Validate the media folder