diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-06-05 20:16:40 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-06-05 21:53:48 +0100 |
| commit | 3d7a8a4ca809135634f38216b734b15acff479f7 (patch) | |
| tree | 4bbe1480119d706851833f3efb4911d62aa52a45 /app/Module/MediaTabModule.php | |
| parent | fa77f9bd0ddd6a305a367135bc6178fceb44776b (diff) | |
| download | webtrees-3d7a8a4ca809135634f38216b734b15acff479f7.tar.gz webtrees-3d7a8a4ca809135634f38216b734b15acff479f7.tar.bz2 webtrees-3d7a8a4ca809135634f38216b734b15acff479f7.zip | |
Refactor includes/functions into classes
Diffstat (limited to 'app/Module/MediaTabModule.php')
| -rw-r--r-- | app/Module/MediaTabModule.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Module/MediaTabModule.php b/app/Module/MediaTabModule.php index c44aada02f..c1b6535a10 100644 --- a/app/Module/MediaTabModule.php +++ b/app/Module/MediaTabModule.php @@ -17,6 +17,9 @@ namespace Fisharebest\Webtrees\Module; */ use Fisharebest\Webtrees\Auth; use Fisharebest\Webtrees\Fact; +use Fisharebest\Webtrees\Functions\Functions; +use Fisharebest\Webtrees\Functions\FunctionsPrint; +use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; use Fisharebest\Webtrees\GedcomTag; use Fisharebest\Webtrees\I18N; @@ -61,10 +64,10 @@ class MediaTabModule extends AbstractModule implements ModuleTabInterface { echo '<table class="facts_table">'; foreach ($this->getFactsWithMedia() as $fact) { if ($fact->getTag() == 'OBJE') { - print_main_media($fact, 1); + FunctionsPrintFacts::printMainMedia($fact, 1); } else { for ($i = 2; $i < 4; ++$i) { - print_main_media($fact, $i); + FunctionsPrintFacts::printMainMedia($fact, $i); } } } @@ -82,7 +85,7 @@ class MediaTabModule extends AbstractModule implements ModuleTabInterface { <a href="#" onclick="window.open('addmedia.php?action=showmediaform&linktoid=<?php echo $controller->record->getXref(); ?>&ged=<?php echo $controller->record->getTree()->getNameUrl(); ?>', '_blank', edit_window_specs); return false;"> <?php echo I18N::translate('Add a new media object'); ?> </a> - <?php echo help_link('OBJE'); ?> + <?php echo FunctionsPrint::helpLink('OBJE'); ?> <br> <a href="#" onclick="window.open('inverselink.php?linktoid=<?php echo $controller->record->getXref(); ?>&ged=<?php echo $WT_TREE->getNameUrl(); ?>&linkto=person', '_blank', find_window_specs); return false;"> <?php echo I18N::translate('Link to an existing media object'); ?> @@ -120,7 +123,7 @@ class MediaTabModule extends AbstractModule implements ModuleTabInterface { $this->facts[] = $fact; } } - sort_facts($this->facts); + Functions::sortFacts($this->facts); } return $this->facts; |
