diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-12-28 17:25:43 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-12-28 17:25:43 +0000 |
| commit | 5c4bb9253650d826eac63cbf8396290fd4e99a3f (patch) | |
| tree | 8f4a1766a4ec6ec64b0ee2ad6a5c8df0a65c6831 | |
| parent | 572230d1cb5a01e864027eb6851baa22ff8514bf (diff) | |
| download | webtrees-5c4bb9253650d826eac63cbf8396290fd4e99a3f.tar.gz webtrees-5c4bb9253650d826eac63cbf8396290fd4e99a3f.tar.bz2 webtrees-5c4bb9253650d826eac63cbf8396290fd4e99a3f.zip | |
#1241645 - Create media object for unused media file - no link to indi created - dev
| -rw-r--r-- | addmedia.php | 15 | ||||
| -rw-r--r-- | admin_site_other.php | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/addmedia.php b/addmedia.php index 2833615486..533a16da54 100644 --- a/addmedia.php +++ b/addmedia.php @@ -69,8 +69,7 @@ if ($media) { $disp = $media->canShow(); } if ($action=='update' || $action=='create') { - if (!isset($linktoid) || $linktoid=='new') $linktoid=''; - if (!empty($linktoid)) { + if ($linktoid) { $disp = WT_GedcomRecord::getInstance($linktoid)->canShow(); } } @@ -422,20 +421,20 @@ echo '<form method="post" name="newmedia" action="addmedia.php" enctype="multipa echo '<input type="hidden" name="action" value="', $action, '">'; echo '<input type="hidden" name="ged" value="', WT_GEDCOM, '">'; echo '<input type="hidden" name="pid" value="', $pid, '">'; -if (!empty($linktoid)) { +if ($linktoid) { echo '<input type="hidden" name="linktoid" value="', $linktoid, '">'; } echo '<table class="facts_table">'; echo '<tr><td class="topbottombar" colspan="2">'; echo $controller->getPageTitle(), help_link('OBJE'); echo '</td></tr>'; -if ($linktoid == 'new' || ($linktoid == '' && $action != 'update')) { +if (!$linktoid && $action == 'create') { echo '<tr><td class="descriptionbox wrap width25">'; echo WT_I18N::translate('Enter an individual, family, or source ID'); - echo '</td><td class="optionbox wrap"><input type="text" name="gid" id="gid" size="6" value="">'; - echo ' ', print_findindi_link('gid'); - echo ' ', print_findfamily_link('gid'); - echo ' ', print_findsource_link('gid'); + echo '</td><td class="optionbox wrap"><input type="text" name="linktoid" id="linktoid" size="6" value="">'; + echo ' ', print_findindi_link('linktoid'); + echo ' ', print_findfamily_link('linktoid'); + echo ' ', print_findsource_link('linktoid'); echo '<p class="sub">', WT_I18N::translate('Enter or search for the ID of the individual, family, or source to which this media item should be linked.'), '</p></td></tr>'; } diff --git a/admin_site_other.php b/admin_site_other.php index f5c8581064..45bf84bedc 100644 --- a/admin_site_other.php +++ b/admin_site_other.php @@ -65,7 +65,7 @@ $controller </tr> <tr> <td> - <a href="#" onclick="window.open('addmedia.php?action=showmediaform&linktoid=new', '_blank', edit_window_specs); return false;"> + <a href="#" onclick="window.open('addmedia.php?action=showmediaform', '_blank', edit_window_specs); return false;"> <?php echo /* I18N: A media object that is not linked to any other record */ WT_I18N::translate('Create a new media object'); ?> </a> </td> |
