@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | class Certificate extends Media { |
| 37 | 37 | |
| 38 | - const URL_PREFIX = 'module.php?mod=myartjaub_certificates&mod_action=Certificate&cid='; |
|
| 38 | + const URL_PREFIX = 'module.php?mod=myartjaub_certificates&mod_action=Certificate&cid='; |
|
| 39 | 39 | |
| 40 | - /** @var string The "TITL" value from the GEDCOM |
|
| 41 | - * This is a tweak to overcome the private level from the parent object... |
|
| 42 | - */ |
|
| 43 | - protected $title = ''; |
|
| 40 | + /** @var string The "TITL" value from the GEDCOM |
|
| 41 | + * This is a tweak to overcome the private level from the parent object... |
|
| 42 | + */ |
|
| 43 | + protected $title = ''; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Certificate provider |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * @param CertificateProviderInterface $provider |
| 81 | 81 | */ |
| 82 | 82 | public function __construct($data, Tree $tree, CertificateProviderInterface $provider) { |
| 83 | - $this->provider = $provider; |
|
| 83 | + $this->provider = $provider; |
|
| 84 | 84 | // Data is only the file name |
| 85 | 85 | $data = str_replace("\\", '/', $data); |
| 86 | 86 | $xref = Functions::encryptToSafeBase64($data); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @see \Fisharebest\Webtrees\Media::getTitle() |
| 166 | 166 | */ |
| 167 | 167 | public function getTitle() { |
| 168 | - return $this->title; |
|
| 168 | + return $this->title; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -241,26 +241,26 @@ discard block |
||
| 241 | 241 | $module = Module::getModuleByName(Constants::MODULE_MAJ_CERTIF_NAME); |
| 242 | 242 | |
| 243 | 243 | if($module) { |
| 244 | - $wmtext = $module->getSetting('MAJ_WM_DEFAULT', I18N::translate('This image is protected under copyright law.')); |
|
| 245 | - $sid= Filter::get('sid', WT_REGEX_XREF); |
|
| 244 | + $wmtext = $module->getSetting('MAJ_WM_DEFAULT', I18N::translate('This image is protected under copyright law.')); |
|
| 245 | + $sid= Filter::get('sid', WT_REGEX_XREF); |
|
| 246 | 246 | |
| 247 | - if($sid){ |
|
| 248 | - $this->source = Source::getInstance($sid, $this->tree); |
|
| 249 | - } |
|
| 250 | - else{ |
|
| 251 | - $this->fetchALinkedSource(); // the method already attach the source to the Certificate object; |
|
| 252 | - } |
|
| 247 | + if($sid){ |
|
| 248 | + $this->source = Source::getInstance($sid, $this->tree); |
|
| 249 | + } |
|
| 250 | + else{ |
|
| 251 | + $this->fetchALinkedSource(); // the method already attach the source to the Certificate object; |
|
| 252 | + } |
|
| 253 | 253 | |
| 254 | - if($this->source) { |
|
| 255 | - $wmtext = '©'; |
|
| 256 | - $repofact = $this->source->getFirstFact('REPO'); |
|
| 257 | - if($repofact) { |
|
| 258 | - $repo = $repofact->getTarget(); |
|
| 259 | - if($repo && $repo instanceof Repository) $wmtext .= ' '.$repo->getFullName().' - '; |
|
| 260 | - } |
|
| 261 | - $wmtext .= $this->source->getFullName(); |
|
| 262 | - } |
|
| 263 | - return $wmtext; |
|
| 254 | + if($this->source) { |
|
| 255 | + $wmtext = '©'; |
|
| 256 | + $repofact = $this->source->getFirstFact('REPO'); |
|
| 257 | + if($repofact) { |
|
| 258 | + $repo = $repofact->getTarget(); |
|
| 259 | + if($repo && $repo instanceof Repository) $wmtext .= ' '.$repo->getFullName().' - '; |
|
| 260 | + } |
|
| 261 | + $wmtext .= $this->source->getFullName(); |
|
| 262 | + } |
|
| 263 | + return $wmtext; |
|
| 264 | 264 | } |
| 265 | 265 | return ''; |
| 266 | 266 | } |
@@ -323,8 +323,8 @@ discard block |
||
| 323 | 323 | ' FROM `##individuals`'. |
| 324 | 324 | ' WHERE i_file= :gedcom_id AND i_gedcom LIKE :gedcom') |
| 325 | 325 | ->execute(array( |
| 326 | - 'gedcom_id' => $this->tree->getTreeId(), |
|
| 327 | - 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 326 | + 'gedcom_id' => $this->tree->getTreeId(), |
|
| 327 | + 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 328 | 328 | ))->fetchAll(); |
| 329 | 329 | |
| 330 | 330 | $list = array(); |
@@ -347,8 +347,8 @@ discard block |
||
| 347 | 347 | ' FROM `##families`'. |
| 348 | 348 | ' WHERE f_file= :gedcom_id AND f_gedcom LIKE :gedcom') |
| 349 | 349 | ->execute(array( |
| 350 | - 'gedcom_id' => $this->tree->getTreeId(), |
|
| 351 | - 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 350 | + 'gedcom_id' => $this->tree->getTreeId(), |
|
| 351 | + 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 352 | 352 | ))->fetchAll(); |
| 353 | 353 | |
| 354 | 354 | $list = array(); |
@@ -375,25 +375,25 @@ discard block |
||
| 375 | 375 | 'SELECT i_gedcom AS gedrec FROM `##individuals`'. |
| 376 | 376 | ' WHERE i_file=:gedcom_id AND i_gedcom LIKE :gedcom') |
| 377 | 377 | ->execute(array( |
| 378 | - 'gedcom_id' => $this->tree->getTreeId(), |
|
| 379 | - 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 378 | + 'gedcom_id' => $this->tree->getTreeId(), |
|
| 379 | + 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 380 | 380 | ))->fetchOne(); |
| 381 | 381 | if(!$ged){ |
| 382 | 382 | $ged = Database::prepare( |
| 383 | 383 | 'SELECT f_gedcom AS gedrec FROM `##families`'. |
| 384 | 384 | ' WHERE f_file=:gedcom_id AND f_gedcom LIKE :gedcom') |
| 385 | - ->execute(array( |
|
| 386 | - 'gedcom_id' => $this->tree->getTreeId(), |
|
| 387 | - 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 388 | - ))->fetchOne(); |
|
| 385 | + ->execute(array( |
|
| 386 | + 'gedcom_id' => $this->tree->getTreeId(), |
|
| 387 | + 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 388 | + ))->fetchOne(); |
|
| 389 | 389 | if(!$ged){ |
| 390 | 390 | $ged = Database::prepare( |
| 391 | - 'SELECT o_gedcom AS gedrec FROM `##other`'. |
|
| 392 | - ' WHERE o_file=:gedcom_id AND o_gedcom LIKE :gedcom') |
|
| 393 | - ->execute(array( |
|
| 394 | - 'gedcom_id' => $this->tree->getTreeId(), |
|
| 395 | - 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 396 | - ))->fetchOne(); |
|
| 391 | + 'SELECT o_gedcom AS gedrec FROM `##other`'. |
|
| 392 | + ' WHERE o_file=:gedcom_id AND o_gedcom LIKE :gedcom') |
|
| 393 | + ->execute(array( |
|
| 394 | + 'gedcom_id' => $this->tree->getTreeId(), |
|
| 395 | + 'gedcom' => '%_ACT '.$this->getFilename().'%' |
|
| 396 | + ))->fetchOne(); |
|
| 397 | 397 | } |
| 398 | 398 | } |
| 399 | 399 | //If a record has been found, parse it to find the source reference. |
@@ -25,17 +25,17 @@ discard block |
||
| 25 | 25 | * {@inhericDoc} |
| 26 | 26 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 27 | 27 | */ |
| 28 | - protected function renderContent() { |
|
| 29 | - ?> |
|
| 28 | + protected function renderContent() { |
|
| 29 | + ?> |
|
| 30 | 30 | <div id="maj-cert-page" class="center"> |
| 31 | 31 | <h2><?php echo $this->data->get('title'); ?></h2> |
| 32 | 32 | |
| 33 | 33 | <?php if($this->data->get('has_certif', false)) { |
| 34 | - /** @var Certificate $certificate */ |
|
| 35 | - $certificate = $this->data->get('certificate'); |
|
| 36 | - $has_linked_indis = $this->data->get('has_linked_indis', false); |
|
| 37 | - $has_linked_fams = $this->data->get('has_linked_fams', false); |
|
| 38 | - ?> |
|
| 34 | + /** @var Certificate $certificate */ |
|
| 35 | + $certificate = $this->data->get('certificate'); |
|
| 36 | + $has_linked_indis = $this->data->get('has_linked_indis', false); |
|
| 37 | + $has_linked_fams = $this->data->get('has_linked_fams', false); |
|
| 38 | + ?> |
|
| 39 | 39 | <div id="certificate-details"> |
| 40 | 40 | <h3> |
| 41 | 41 | <?php echo $certificate->getCity(); ?> |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | </div> |
| 87 | 87 | |
| 88 | 88 | <?php |
| 89 | - } |
|
| 89 | + } |
|
| 90 | 90 | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | \ No newline at end of file |
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | * {@inhericDoc} |
| 27 | 27 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 28 | 28 | */ |
| 29 | - protected function renderContent() { |
|
| 29 | + protected function renderContent() { |
|
| 30 | 30 | |
| 31 | - /** @var AbstractModule $module */ |
|
| 32 | - $module = $this->data->get('module'); |
|
| 33 | - ?> |
|
| 31 | + /** @var AbstractModule $module */ |
|
| 32 | + $module = $this->data->get('module'); |
|
| 33 | + ?> |
|
| 34 | 34 | <ol class="breadcrumb small"> |
| 35 | 35 | <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li> |
| 36 | 36 | <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li> |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | </form> |
| 187 | 187 | |
| 188 | 188 | <?php |
| 189 | - } |
|
| 189 | + } |
|
| 190 | 190 | |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | \ No newline at end of file |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | * {@inhericDoc} |
| 26 | 26 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 27 | 27 | */ |
| 28 | - protected function renderContent() { |
|
| 28 | + protected function renderContent() { |
|
| 29 | 29 | |
| 30 | - $cities = $this->data->get('cities'); |
|
| 31 | - $selected_city = $this->data->get('selected_city'); |
|
| 30 | + $cities = $this->data->get('cities'); |
|
| 31 | + $selected_city = $this->data->get('selected_city'); |
|
| 32 | 32 | |
| 33 | - ?> |
|
| 33 | + ?> |
|
| 34 | 34 | <div id="maj-cert-list-page" class="center"> |
| 35 | 35 | <h2><?php echo $this->data->get('title'); ?></h2> |
| 36 | 36 | |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | </thead> |
| 62 | 62 | <tbody> |
| 63 | 63 | <?php foreach ($this->data->get('certificate_list') as $certificate) { |
| 64 | - /** @var \MyArtJaub\Webtrees\Module\Certificates\Model\Certificate $certificate */ |
|
| 65 | - ?> |
|
| 64 | + /** @var \MyArtJaub\Webtrees\Module\Certificates\Model\Certificate $certificate */ |
|
| 65 | + ?> |
|
| 66 | 66 | <tr> |
| 67 | 67 | <!-- Certificate date --> |
| 68 | 68 | <?php if($date = $certificate->getCertificateDate()) { ?> |
@@ -76,12 +76,12 @@ discard block |
||
| 76 | 76 | <td><?php echo Filter::escapeHtml($certificate->getCertificateType() ?: ''); ?></td> |
| 77 | 77 | <!-- Certificate Name --> |
| 78 | 78 | <?php |
| 79 | - $name = $certificate->getCertificateDetails() ?: ''; |
|
| 80 | - $sortname = ""; |
|
| 81 | - $ct_names=preg_match("/([A-Z]{2,})/", $name, $match); |
|
| 82 | - if($ct_names > 0) $sortname = $match[1].'_'; |
|
| 83 | - $sortname .= $name; |
|
| 84 | - ?> |
|
| 79 | + $name = $certificate->getCertificateDetails() ?: ''; |
|
| 80 | + $sortname = ""; |
|
| 81 | + $ct_names=preg_match("/([A-Z]{2,})/", $name, $match); |
|
| 82 | + if($ct_names > 0) $sortname = $match[1].'_'; |
|
| 83 | + $sortname .= $name; |
|
| 84 | + ?> |
|
| 85 | 85 | <td><?php echo Filter::escapeHtml($sortname); ?></td> |
| 86 | 86 | <td> |
| 87 | 87 | <a href="<?php echo $certificate->getHtmlUrl(); ?>"><?php echo Filter::escapeHtml($name); ?></a> |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | </div> |
| 96 | 96 | |
| 97 | 97 | <?php |
| 98 | - } |
|
| 98 | + } |
|
| 99 | 99 | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | \ No newline at end of file |
@@ -24,16 +24,16 @@ discard block |
||
| 24 | 24 | * {@inhericDoc} |
| 25 | 25 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 26 | 26 | */ |
| 27 | - protected function renderContent() { |
|
| 28 | - /** @var \Fisharebest\Webtrees\Individual $indi */ |
|
| 29 | - $indi = $this->data->get('indi'); |
|
| 27 | + protected function renderContent() { |
|
| 28 | + /** @var \Fisharebest\Webtrees\Individual $indi */ |
|
| 29 | + $indi = $this->data->get('indi'); |
|
| 30 | 30 | |
| 31 | - /** @var \Fisharebest\Webtrees\Tree $tree */ |
|
| 32 | - $tree = $this->data->get('tree'); |
|
| 31 | + /** @var \Fisharebest\Webtrees\Tree $tree */ |
|
| 32 | + $tree = $this->data->get('tree'); |
|
| 33 | 33 | |
| 34 | - //Welcome section - gedcom title, date, statistics - based on gedcom_block |
|
| 35 | - $content = |
|
| 36 | - '<table> |
|
| 34 | + //Welcome section - gedcom title, date, statistics - based on gedcom_block |
|
| 35 | + $content = |
|
| 36 | + '<table> |
|
| 37 | 37 | <tr> |
| 38 | 38 | <td> |
| 39 | 39 | <a href="pedigree.php?rootid=' . $indi->getXref() . '&ged=' . $tree->getNameUrl() . '"> |
@@ -46,33 +46,33 @@ discard block |
||
| 46 | 46 | </a> |
| 47 | 47 | </td>'; |
| 48 | 48 | |
| 49 | - if (Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) { |
|
| 50 | - $content .= ' |
|
| 49 | + if (Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) { |
|
| 50 | + $content .= ' |
|
| 51 | 51 | <td> |
| 52 | 52 | <a href="' . WT_LOGIN_URL . '?action=register"> |
| 53 | 53 | <i class="icon-user_add"></i><br>'.I18N::translate('Request new user account').' |
| 54 | 54 | </a> |
| 55 | 55 | </td>'; |
| 56 | - } |
|
| 57 | - $content .= ' |
|
| 56 | + } |
|
| 57 | + $content .= ' |
|
| 58 | 58 | </tr> |
| 59 | 59 | </table>'; |
| 60 | 60 | |
| 61 | - // Piwik Statistics |
|
| 62 | - if ($this->data->get('piwik_enabled', false)){ |
|
| 63 | - $content .= ' |
|
| 61 | + // Piwik Statistics |
|
| 62 | + if ($this->data->get('piwik_enabled', false)){ |
|
| 63 | + $content .= ' |
|
| 64 | 64 | <div class="center"> |
| 65 | 65 | <div id="piwik_stats"> |
| 66 | 66 | <i class="icon-loading-small"></i> ' . I18N::translate('Retrieving Piwik statistics...') . ' |
| 67 | 67 | </div> |
| 68 | 68 | </div>'; |
| 69 | - } |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | - $content .= '<hr />'; |
|
| 71 | + $content .= '<hr />'; |
|
| 72 | 72 | |
| 73 | - // Login section - based on login_block |
|
| 74 | - if (Auth::check()) { |
|
| 75 | - $content .= ' |
|
| 73 | + // Login section - based on login_block |
|
| 74 | + if (Auth::check()) { |
|
| 75 | + $content .= ' |
|
| 76 | 76 | <div class="center"> |
| 77 | 77 | <form method="post" action="logout.php" name="logoutform" onsubmit="return true;"> |
| 78 | 78 | <br> |
@@ -82,14 +82,14 @@ discard block |
||
| 82 | 82 | <br><br> |
| 83 | 83 | </form> |
| 84 | 84 | </div>'; |
| 85 | - } else { |
|
| 86 | - $content .= ' |
|
| 85 | + } else { |
|
| 86 | + $content .= ' |
|
| 87 | 87 | <div id="maj-login-box"> |
| 88 | 88 | <form id="maj-login-form" name="maj-login-form" method="post" action="'.WT_LOGIN_URL.'"> |
| 89 | 89 | <input type="hidden" name="action" value="login"> |
| 90 | 90 | <div> |
| 91 | 91 | <label for="maj-username">'. I18N::translate('Username'). |
| 92 | - '<input type="text" id="maj-username" name="username" class="formField"> |
|
| 92 | + '<input type="text" id="maj-username" name="username" class="formField"> |
|
| 93 | 93 | </label> |
| 94 | 94 | </div> |
| 95 | 95 | <div> |
@@ -103,17 +103,17 @@ discard block |
||
| 103 | 103 | <div> |
| 104 | 104 | <a href="#" id="maj-passwd_click">'. I18N::translate('Request new password').'</a> |
| 105 | 105 | </div>'; |
| 106 | - if (Site::getPreference('USE_REGISTRATION_MODULE')) { |
|
| 107 | - $content.= ' |
|
| 106 | + if (Site::getPreference('USE_REGISTRATION_MODULE')) { |
|
| 107 | + $content.= ' |
|
| 108 | 108 | <div> |
| 109 | 109 | <a href="'.WT_LOGIN_URL.'?action=register">'. I18N::translate('Request new user account').'</a> |
| 110 | 110 | </div>'; |
| 111 | - } |
|
| 112 | - $content.= ' |
|
| 111 | + } |
|
| 112 | + $content.= ' |
|
| 113 | 113 | </form>'; // close "login-form" |
| 114 | 114 | |
| 115 | - // hidden New Password block |
|
| 116 | - $content.= ' |
|
| 115 | + // hidden New Password block |
|
| 116 | + $content.= ' |
|
| 117 | 117 | <div id="maj-new_passwd"> |
| 118 | 118 | <form id="maj-new_passwd_form" name="new_passwd_form" action="'.WT_LOGIN_URL.'" method="post"> |
| 119 | 119 | <input type="hidden" name="time" value=""> |
@@ -130,10 +130,10 @@ discard block |
||
| 130 | 130 | </form> |
| 131 | 131 | </div> |
| 132 | 132 | </div>';//"login-box" |
| 133 | - } |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | - return $content; |
|
| 136 | - } |
|
| 135 | + return $content; |
|
| 136 | + } |
|
| 137 | 137 | |
| 138 | 138 | |
| 139 | 139 | } |
@@ -22,20 +22,20 @@ |
||
| 22 | 22 | * {@inhericDoc} |
| 23 | 23 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 24 | 24 | */ |
| 25 | - protected function renderContent() { |
|
| 26 | - if($this->data->get('has_stats', false)) { |
|
| 27 | - $html = I18N::translate('%1$s visits since the beginning of %2$s<br>(%3$s today)' , |
|
| 28 | - '<span class="odometer">' . I18N::number($this->data->get('visits_year')) . '</span>', |
|
| 29 | - date('Y'), |
|
| 30 | - '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
|
| 31 | - ); |
|
| 32 | - } |
|
| 33 | - else { |
|
| 34 | - $html = I18N::translate('No statistics could be retrieved from Piwik.'); |
|
| 35 | - } |
|
| 25 | + protected function renderContent() { |
|
| 26 | + if($this->data->get('has_stats', false)) { |
|
| 27 | + $html = I18N::translate('%1$s visits since the beginning of %2$s<br>(%3$s today)' , |
|
| 28 | + '<span class="odometer">' . I18N::number($this->data->get('visits_year')) . '</span>', |
|
| 29 | + date('Y'), |
|
| 30 | + '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
|
| 31 | + ); |
|
| 32 | + } |
|
| 33 | + else { |
|
| 34 | + $html = I18N::translate('No statistics could be retrieved from Piwik.'); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - return $html; |
|
| 38 | - } |
|
| 37 | + return $html; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | 40 | |
| 41 | 41 | } |
@@ -23,51 +23,51 @@ |
||
| 23 | 23 | * {@inhericDoc} |
| 24 | 24 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 25 | 25 | */ |
| 26 | - protected function renderContent() { |
|
| 26 | + protected function renderContent() { |
|
| 27 | 27 | |
| 28 | - return ' |
|
| 28 | + return ' |
|
| 29 | 29 | <tr> |
| 30 | 30 | <td class="descriptionbox wrap width33">' . |
| 31 | - I18N::translate('Enable Piwik Statistics') . |
|
| 32 | - // Ideally, would like to add helpLink, but this does not work for modules... |
|
| 33 | - // FunctionsPrint::helpLink('piwik_enabled', $this->getName()); |
|
| 34 | - '</td> |
|
| 31 | + I18N::translate('Enable Piwik Statistics') . |
|
| 32 | + // Ideally, would like to add helpLink, but this does not work for modules... |
|
| 33 | + // FunctionsPrint::helpLink('piwik_enabled', $this->getName()); |
|
| 34 | + '</td> |
|
| 35 | 35 | <td class="optionbox">' . |
| 36 | - FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')) . |
|
| 37 | - '</td> |
|
| 36 | + FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')) . |
|
| 37 | + '</td> |
|
| 38 | 38 | </tr>' . |
| 39 | 39 | |
| 40 | - '<tr> |
|
| 40 | + '<tr> |
|
| 41 | 41 | <td class="descriptionbox wrap width33">' . |
| 42 | - I18N::translate('Piwik URL') . |
|
| 43 | - '</td> |
|
| 42 | + I18N::translate('Piwik URL') . |
|
| 43 | + '</td> |
|
| 44 | 44 | <td class="optionbox"> |
| 45 | 45 | <input type="text" name="piwik_url" size="45" value="' . |
| 46 | - $this->data->get('piwik_url', '') . '" /> |
|
| 46 | + $this->data->get('piwik_url', '') . '" /> |
|
| 47 | 47 | </td> |
| 48 | 48 | </tr>' . |
| 49 | 49 | |
| 50 | - '<tr> |
|
| 50 | + '<tr> |
|
| 51 | 51 | <td class="descriptionbox wrap width33">' . |
| 52 | - I18N::translate('Piwik Token') . |
|
| 53 | - '</td> |
|
| 52 | + I18N::translate('Piwik Token') . |
|
| 53 | + '</td> |
|
| 54 | 54 | <td class="optionbox"> |
| 55 | 55 | <input type="text" name="piwik_token" size="45" value="' . |
| 56 | - $this->data->get('piwik_token', '') . '" /> |
|
| 56 | + $this->data->get('piwik_token', '') . '" /> |
|
| 57 | 57 | </td> |
| 58 | 58 | </tr>' . |
| 59 | 59 | |
| 60 | - '<tr> |
|
| 60 | + '<tr> |
|
| 61 | 61 | <td class="descriptionbox wrap width33">' . |
| 62 | - I18N::translate('Piwik Site ID') . |
|
| 63 | - '</td> |
|
| 62 | + I18N::translate('Piwik Site ID') . |
|
| 63 | + '</td> |
|
| 64 | 64 | <td class="optionbox"> |
| 65 | 65 | <input type="text" name="piwik_siteid" size="4" value="' . |
| 66 | - $this->data->get('piwik_siteid', '') . '" /> |
|
| 66 | + $this->data->get('piwik_siteid', '') . '" /> |
|
| 67 | 67 | </td> |
| 68 | 68 | </tr>' ; |
| 69 | 69 | |
| 70 | - } |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | } |
@@ -34,26 +34,26 @@ |
||
| 34 | 34 | protected $fact; |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * Contructor for the decorator |
|
| 38 | - * |
|
| 39 | - * @param \Fisharebest\Webtrees\Fact $fact_in The Fact to extend |
|
| 40 | - */ |
|
| 37 | + * Contructor for the decorator |
|
| 38 | + * |
|
| 39 | + * @param \Fisharebest\Webtrees\Fact $fact_in The Fact to extend |
|
| 40 | + */ |
|
| 41 | 41 | public function __construct(\Fisharebest\Webtrees\Fact $fact_in){ |
| 42 | 42 | $this->fact = $fact_in; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * Check if a fact has a date and is sourced |
|
| 47 | - * Values: |
|
| 48 | - * - 0, if no date is found for the fact |
|
| 49 | - * - -1, if the date is not precise |
|
| 50 | - * - -2, if the date is precise, but no source is found |
|
| 51 | - * - 1, if the date is precise, and a source is found |
|
| 52 | - * - 2, if the date is precise, a source exists, and is supported by a certificate (requires _ACT usage) |
|
| 53 | - * - 3, if the date is precise, a source exists, and the certificate supporting the fact is within an acceptable range of date |
|
| 54 | - * |
|
| 55 | - * @return int Level of sources |
|
| 56 | - */ |
|
| 46 | + * Check if a fact has a date and is sourced |
|
| 47 | + * Values: |
|
| 48 | + * - 0, if no date is found for the fact |
|
| 49 | + * - -1, if the date is not precise |
|
| 50 | + * - -2, if the date is precise, but no source is found |
|
| 51 | + * - 1, if the date is precise, and a source is found |
|
| 52 | + * - 2, if the date is precise, a source exists, and is supported by a certificate (requires _ACT usage) |
|
| 53 | + * - 3, if the date is precise, a source exists, and the certificate supporting the fact is within an acceptable range of date |
|
| 54 | + * |
|
| 55 | + * @return int Level of sources |
|
| 56 | + */ |
|
| 57 | 57 | public function isSourced(){ |
| 58 | 58 | $isSourced=0; |
| 59 | 59 | $date = $this->fact->getDate(false); |
@@ -39,10 +39,10 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | - * Check if this family's marriages are sourced |
|
| 43 | - * |
|
| 44 | - * @return int Level of sources |
|
| 45 | - * */ |
|
| 42 | + * Check if this family's marriages are sourced |
|
| 43 | + * |
|
| 44 | + * @return int Level of sources |
|
| 45 | + * */ |
|
| 46 | 46 | function isMarriageSourced(){ |
| 47 | 47 | if($this->_ismarriagesourced != null) return $this->_ismarriagesourced; |
| 48 | 48 | $this->_ismarriagesourced = $this->isFactSourced(WT_EVENTS_MARR.'|MARC'); |