@@ -91,7 +91,7 @@ |
||
| 91 | 91 | return $wb_controller->config($block_id); |
| 92 | 92 | } |
| 93 | 93 | catch (MvcException $ex) { |
| 94 | - if($ex->getHttpCode() != 200) throw $ex; |
|
| 94 | + if ($ex->getHttpCode() != 200) throw $ex; |
|
| 95 | 95 | return; |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $this->tree = $tree; |
| 59 | 59 | $this->user = $user; |
| 60 | 60 | |
| 61 | - $this->sosa_provider = new SosaProvider($this->tree, $this->user);; |
|
| 61 | + $this->sosa_provider = new SosaProvider($this->tree, $this->user); ; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | public function computeAll() { |
| 69 | 69 | $root_id = $this->tree->getUserPreference($this->user, 'MAJ_SOSA_ROOT_ID'); |
| 70 | 70 | $indi = Individual::getInstance($root_id, $this->tree); |
| 71 | - if($indi){ |
|
| 71 | + if ($indi) { |
|
| 72 | 72 | $this->sosa_provider->deleteAll(); |
| 73 | 73 | $this->addNode($indi, 1); |
| 74 | 74 | $this->flushTmpSosaTable(true); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | public function computeFromIndividual(Individual $indi) { |
| 86 | 86 | $dindi = new \MyArtJaub\Webtrees\Individual($indi); |
| 87 | 87 | $current_sosas = $dindi->getSosaNumbers(); |
| 88 | - foreach($current_sosas as $current_sosa => $gen) { |
|
| 88 | + foreach ($current_sosas as $current_sosa => $gen) { |
|
| 89 | 89 | $this->sosa_provider->deleteAncestors($current_sosa); |
| 90 | 90 | $this->addNode($indi, $current_sosa); |
| 91 | 91 | } |
@@ -111,9 +111,9 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | $this->flushTmpSosaTable(); |
| 113 | 113 | |
| 114 | - if($fam = $indi->getPrimaryChildFamily()) { |
|
| 115 | - if($husb = $fam->getHusband()) $this->addNode($husb, 2 * $sosa); |
|
| 116 | - if($wife = $fam->getWife()) $this->addNode($wife, 2 * $sosa + 1); |
|
| 114 | + if ($fam = $indi->getPrimaryChildFamily()) { |
|
| 115 | + if ($husb = $fam->getHusband()) $this->addNode($husb, 2 * $sosa); |
|
| 116 | + if ($wife = $fam->getWife()) $this->addNode($wife, 2 * $sosa + 1); |
|
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | * @param bool $force Should the flush be forced |
| 124 | 124 | */ |
| 125 | 125 | protected function flushTmpSosaTable($force = false) { |
| 126 | - if( count($this->tmp_sosa_table)> 0 && |
|
| 127 | - ($force || count($this->tmp_sosa_table) >= self::TMP_SOSA_TABLE_LIMIT)){ |
|
| 126 | + if (count($this->tmp_sosa_table) > 0 && |
|
| 127 | + ($force || count($this->tmp_sosa_table) >= self::TMP_SOSA_TABLE_LIMIT)) { |
|
| 128 | 128 | $this->sosa_provider->insertOrUpdate($this->tmp_sosa_table); |
| 129 | 129 | $this->tmp_sosa_table = array(); |
| 130 | 130 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | public function getConfigLink() { |
| 58 | 58 | Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
| 59 | 59 | |
| 60 | - return 'module.php?mod=' . $this->getName() . '&mod_action=AdminConfig'; |
|
| 60 | + return 'module.php?mod='.$this->getName().'&mod_action=AdminConfig'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @param \Fisharebest\Webtrees\Fact $fact_in The Fact to extend |
| 40 | 40 | */ |
| 41 | - public function __construct(\Fisharebest\Webtrees\Fact $fact_in){ |
|
| 41 | + public function __construct(\Fisharebest\Webtrees\Fact $fact_in) { |
|
| 42 | 42 | $this->fact = $fact_in; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -54,22 +54,22 @@ discard block |
||
| 54 | 54 | * |
| 55 | 55 | * @return int Level of sources |
| 56 | 56 | */ |
| 57 | - public function isSourced(){ |
|
| 58 | - $isSourced=0; |
|
| 57 | + public function isSourced() { |
|
| 58 | + $isSourced = 0; |
|
| 59 | 59 | $date = $this->fact->getDate(); |
| 60 | - if($date->isOK()) { |
|
| 61 | - $isSourced=-1; |
|
| 62 | - if($date->qual1=='' && $date->minimumJulianDay() == $date->maximumJulianDay()){ |
|
| 63 | - $isSourced=-2; |
|
| 60 | + if ($date->isOK()) { |
|
| 61 | + $isSourced = -1; |
|
| 62 | + if ($date->qual1 == '' && $date->minimumJulianDay() == $date->maximumJulianDay()) { |
|
| 63 | + $isSourced = -2; |
|
| 64 | 64 | $citations = $this->fact->getCitations(); |
| 65 | - foreach($citations as $citation){ |
|
| 66 | - $isSourced=max($isSourced, 1); |
|
| 67 | - if(preg_match('/3 _ACT (.*)/', $citation) ){ |
|
| 68 | - $isSourced=max($isSourced, 2); |
|
| 65 | + foreach ($citations as $citation) { |
|
| 66 | + $isSourced = max($isSourced, 1); |
|
| 67 | + if (preg_match('/3 _ACT (.*)/', $citation)) { |
|
| 68 | + $isSourced = max($isSourced, 2); |
|
| 69 | 69 | preg_match_all("/4 DATE (.*)/", $citation, $datessource, PREG_SET_ORDER); |
| 70 | - foreach($datessource as $daterec){ |
|
| 70 | + foreach ($datessource as $daterec) { |
|
| 71 | 71 | $datesource = new Date($daterec[1]); |
| 72 | - if(abs($datesource->julianDay() - $date->julianDay()) < self::DATE_PRECISION_MARGIN){ |
|
| 72 | + if (abs($datesource->julianDay() - $date->julianDay()) < self::DATE_PRECISION_MARGIN) { |
|
| 73 | 73 | $isSourced = max($isSourced, 3); //If this level increases, do not forget to change the constant MAX_IS_SOURCED_LEVEL |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | public function index(PageController $parent_controller, Tree $tree, $block_id, $template) { |
| 46 | 46 | $view_bag = new ViewBag(); |
| 47 | 47 | |
| 48 | - if($parent_controller && $tree) { |
|
| 48 | + if ($parent_controller && $tree) { |
|
| 49 | 49 | |
| 50 | 50 | $view_bag->set('tree', $tree); |
| 51 | 51 | $view_bag->set('indi', $parent_controller->getSignificantIndividual()); |
@@ -64,22 +64,22 @@ discard block |
||
| 64 | 64 | '); |
| 65 | 65 | |
| 66 | 66 | if (Auth::isAdmin()) { |
| 67 | - $title='<a class="icon-admin" title="'.I18N::translate('Preferences').'" href="block_edit.php?block_id='.$block_id.'&ged=' . $tree->getNameHtml() . '&ctype=gedcom"></a>'; |
|
| 67 | + $title = '<a class="icon-admin" title="'.I18N::translate('Preferences').'" href="block_edit.php?block_id='.$block_id.'&ged='.$tree->getNameHtml().'&ctype=gedcom"></a>'; |
|
| 68 | 68 | } else { |
| 69 | - $title=''; |
|
| 69 | + $title = ''; |
|
| 70 | 70 | } |
| 71 | - $title .='<span dir="auto">'.$tree->getTitleHtml().'</span>'; |
|
| 71 | + $title .= '<span dir="auto">'.$tree->getTitleHtml().'</span>'; |
|
| 72 | 72 | |
| 73 | 73 | $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false); |
| 74 | 74 | $view_bag->set('piwik_enabled', $piwik_enabled); |
| 75 | - if($piwik_enabled) { |
|
| 75 | + if ($piwik_enabled) { |
|
| 76 | 76 | $parent_controller->addInlineJavascript( |
| 77 | 77 | '$("#piwik_stats") |
| 78 | 78 | .load("module.php?mod='.$this->module->getName().'&mod_action=Piwik&block_id='.$block_id.'");' |
| 79 | 79 | ); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial(); |
|
| 82 | + $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial(); |
|
| 83 | 83 | |
| 84 | 84 | if ($template) { |
| 85 | 85 | return Theme::theme()->formatBlock($id, $title, $class, $content); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function config($block_id = null) { |
| 100 | 100 | |
| 101 | - if(empty($block_id)) throw new MvcException(404); |
|
| 101 | + if (empty($block_id)) throw new MvcException(404); |
|
| 102 | 102 | |
| 103 | 103 | if (Filter::postBool('save') && Filter::checkCsrf()) { |
| 104 | 104 | $this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled')); |
@@ -36,20 +36,20 @@ discard block |
||
| 36 | 36 | '<table> |
| 37 | 37 | <tr> |
| 38 | 38 | <td> |
| 39 | - <a href="pedigree.php?rootid=' . $indi->getXref() . '&ged=' . $tree->getNameUrl() . '"> |
|
| 40 | - <i class="icon-pedigree"></i><br>' . I18N::translate('Default chart') . ' |
|
| 39 | + <a href="pedigree.php?rootid=' . $indi->getXref().'&ged='.$tree->getNameUrl().'"> |
|
| 40 | + <i class="icon-pedigree"></i><br>' . I18N::translate('Default chart').' |
|
| 41 | 41 | </a> |
| 42 | 42 | </td> |
| 43 | 43 | <td> |
| 44 | - <a href="individual.php?pid=' . $indi->getXref() . '&ged=' . $tree->getNameUrl() . '"> |
|
| 45 | - <i class="icon-indis"></i><br>' . I18N::translate('Default individual') . ' |
|
| 44 | + <a href="individual.php?pid=' . $indi->getXref().'&ged='.$tree->getNameUrl().'"> |
|
| 45 | + <i class="icon-indis"></i><br>' . I18N::translate('Default individual').' |
|
| 46 | 46 | </a> |
| 47 | 47 | </td>'; |
| 48 | 48 | |
| 49 | 49 | if (Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) { |
| 50 | 50 | $content .= ' |
| 51 | 51 | <td> |
| 52 | - <a href="' . WT_LOGIN_URL . '?action=register"> |
|
| 52 | + <a href="' . WT_LOGIN_URL.'?action=register"> |
|
| 53 | 53 | <i class="icon-user_add"></i><br>'.I18N::translate('Request a new user account').' |
| 54 | 54 | </a> |
| 55 | 55 | </td>'; |
@@ -59,16 +59,16 @@ discard block |
||
| 59 | 59 | </table>'; |
| 60 | 60 | |
| 61 | 61 | // Piwik Statistics |
| 62 | - if ($this->data->get('piwik_enabled', false)){ |
|
| 62 | + if ($this->data->get('piwik_enabled', false)) { |
|
| 63 | 63 | $content .= ' |
| 64 | 64 | <div class="center"> |
| 65 | 65 | <div id="piwik_stats"> |
| 66 | - <i class="icon-loading-small"></i> ' . I18N::translate('Retrieving Piwik statistics...') . ' |
|
| 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 | 73 | // Login section - based on login_block |
| 74 | 74 | if (Auth::check()) { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | <div class="center"> |
| 77 | 77 | <form method="post" action="logout.php" name="logoutform" onsubmit="return true;"> |
| 78 | 78 | <br>' . |
| 79 | - I18N::translate('You are signed in as %s.', '<a href="edituser.php" class="name2">' . Auth::user()->getRealNameHtml() . '</a>') . |
|
| 79 | + I18N::translate('You are signed in as %s.', '<a href="edituser.php" class="name2">'.Auth::user()->getRealNameHtml().'</a>'). |
|
| 80 | 80 | '<br><br> |
| 81 | 81 | <input type="submit" value="'.I18N::translate('sign out').'"> |
| 82 | 82 | <br><br> |
@@ -98,34 +98,34 @@ discard block |
||
| 98 | 98 | </label> |
| 99 | 99 | </div> |
| 100 | 100 | <div> |
| 101 | - <input type="submit" value="'. I18N::translate('sign in'). '"> |
|
| 101 | + <input type="submit" value="'. I18N::translate('sign in').'"> |
|
| 102 | 102 | </div> |
| 103 | 103 | <div> |
| 104 | 104 | <a href="#" id="maj-passwd_click">'. I18N::translate('Request a new password').'</a> |
| 105 | 105 | </div>'; |
| 106 | 106 | if (Site::getPreference('USE_REGISTRATION_MODULE')) { |
| 107 | - $content.= ' |
|
| 107 | + $content .= ' |
|
| 108 | 108 | <div> |
| 109 | - <a href="'.WT_LOGIN_URL.'?action=register">'. I18N::translate('Request a new user account').'</a> |
|
| 109 | + <a href="'.WT_LOGIN_URL.'?action=register">'.I18N::translate('Request a new user account').'</a> |
|
| 110 | 110 | </div>'; |
| 111 | 111 | } |
| 112 | - $content.= ' |
|
| 112 | + $content .= ' |
|
| 113 | 113 | </form>'; // close "login-form" |
| 114 | 114 | |
| 115 | 115 | // hidden New Password block |
| 116 | - $content.= ' |
|
| 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=""> |
| 120 | 120 | <input type="hidden" name="action" value="requestpw"> |
| 121 | 121 | <h4>'. I18N::translate('Lost password request').'</h4> |
| 122 | 122 | <div> |
| 123 | - <label for="maj-new_passwd_username">'. I18N::translate('Username or email address') . ' |
|
| 123 | + <label for="maj-new_passwd_username">'. I18N::translate('Username or email address').' |
|
| 124 | 124 | <input type="text" id="maj-new_passwd_username" name="new_passwd_username" value=""> |
| 125 | 125 | </label> |
| 126 | 126 | </div> |
| 127 | 127 | <div> |
| 128 | - <input type="submit" value="'. I18N::translate('Continue'). '"> |
|
| 128 | + <input type="submit" value="'. I18N::translate('Continue').'"> |
|
| 129 | 129 | </div> |
| 130 | 130 | </form> |
| 131 | 131 | </div> |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | * @param string $period |
| 31 | 31 | * @param (null|int) Number of visits |
| 32 | 32 | */ |
| 33 | - private function getNumberOfVisitsPiwik($block_id, $period='year'){ |
|
| 33 | + private function getNumberOfVisitsPiwik($block_id, $period = 'year') { |
|
| 34 | 34 | |
| 35 | 35 | $piwik_url = $this->module->getBlockSetting($block_id, 'piwik_url'); |
| 36 | 36 | $piwik_siteid = $this->module->getBlockSetting($block_id, 'piwik_siteid'); |
| 37 | 37 | $piwik_token = $this->module->getBlockSetting($block_id, 'piwik_token'); |
| 38 | 38 | |
| 39 | - if($piwik_url && strlen($piwik_url) > 0 && |
|
| 40 | - $piwik_siteid && strlen($piwik_siteid) > 0 && |
|
| 39 | + if ($piwik_url && strlen($piwik_url) > 0 && |
|
| 40 | + $piwik_siteid && strlen($piwik_siteid) > 0 && |
|
| 41 | 41 | $piwik_token && strlen($piwik_token) |
| 42 | 42 | ) |
| 43 | 43 | { |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | $url .= '&format=PHP'; |
| 49 | 49 | $url .= '&token_auth='.$piwik_token; |
| 50 | 50 | |
| 51 | - if($fetched = File::fetchUrl($url)) { |
|
| 51 | + if ($fetched = File::fetchUrl($url)) { |
|
| 52 | 52 | $content = @unserialize($fetched); |
| 53 | - if(is_numeric($content)) return $content; |
|
| 53 | + if (is_numeric($content)) return $content; |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
@@ -72,20 +72,20 @@ discard block |
||
| 72 | 72 | $data->set('has_stats', false); |
| 73 | 73 | |
| 74 | 74 | $block_id = Filter::get('block_id'); |
| 75 | - if($block_id){ |
|
| 75 | + if ($block_id) { |
|
| 76 | 76 | $cached_item = Cache::get('piwikCountYear', $this->module); |
| 77 | 77 | $visitCountYear = $cached_item->get(); |
| 78 | - if(!$cached_item->isHit()) { |
|
| 78 | + if (!$cached_item->isHit()) { |
|
| 79 | 79 | $visitCountYear = $this->getNumberOfVisitsPiwik($block_id); |
| 80 | - if(!is_null($visitCountYear)) { |
|
| 81 | - $cached_item->expiresAt(new \DateTime('tomorrow')); // Expires the next day at midnight |
|
| 80 | + if (!is_null($visitCountYear)) { |
|
| 81 | + $cached_item->expiresAt(new \DateTime('tomorrow')); // Expires the next day at midnight |
|
| 82 | 82 | Cache::save($cached_item, $visitCountYear); |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if($visitCountYear){ |
|
| 86 | + if ($visitCountYear) { |
|
| 87 | 87 | $visitCountToday = max(0, $this->getNumberOfVisitsPiwik($block_id, 'day')); |
| 88 | - $visitCountYear = max( 0, $visitCountYear); |
|
| 88 | + $visitCountYear = max(0, $visitCountYear); |
|
| 89 | 89 | |
| 90 | 90 | $data->set('has_stats', true); |
| 91 | 91 | $data->set('visits_today', $visitCountToday); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtenderInterface::hExtendIndiHeaderIcons() |
| 64 | 64 | */ |
| 65 | 65 | public function hExtendIndiHeaderIcons(IndividualController $ctrlIndi) { |
| 66 | - if($ctrlIndi){ |
|
| 66 | + if ($ctrlIndi) { |
|
| 67 | 67 | $dindi = new Individual($ctrlIndi->getSignificantIndividual()); |
| 68 | 68 | if ($dindi->canDisplayIsSourced()) |
| 69 | 69 | return FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, 'large'); |
@@ -87,19 +87,19 @@ discard block |
||
| 87 | 87 | * {@inheritDoc} |
| 88 | 88 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\RecordNameTextExtenderInterface::hRecordNamePrepend() |
| 89 | 89 | */ |
| 90 | - public function hRecordNamePrepend(GedcomRecord $grec, $size){ } |
|
| 90 | + public function hRecordNamePrepend(GedcomRecord $grec, $size) { } |
|
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * {@inheritDoc} |
| 94 | 94 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\RecordNameTextExtenderInterface::hRecordNameAppend() |
| 95 | 95 | */ |
| 96 | - public function hRecordNameAppend(GedcomRecord $grec, $size = 'small'){ |
|
| 96 | + public function hRecordNameAppend(GedcomRecord $grec, $size = 'small') { |
|
| 97 | 97 | $html = ''; |
| 98 | - if($grec instanceof \Fisharebest\Webtrees\Individual){ |
|
| 98 | + if ($grec instanceof \Fisharebest\Webtrees\Individual) { |
|
| 99 | 99 | $dindi = new Individual($grec); |
| 100 | 100 | $html .= FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, $size); |
| 101 | 101 | $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isBirthSourced(), 'BIRT', 1, $size); |
| 102 | - if($grec->isDead()) |
|
| 102 | + if ($grec->isDead()) |
|
| 103 | 103 | $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1, $size); |
| 104 | 104 | } |
| 105 | 105 | return $html; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * {@inheritDoc} |
| 118 | 118 | * @see \Fisharebest\Webtrees\Module\ModuleSidebarInterface::hasSidebarContent() |
| 119 | 119 | */ |
| 120 | - public function hasSidebarContent(){ |
|
| 120 | + public function hasSidebarContent() { |
|
| 121 | 121 | return true; |
| 122 | 122 | } |
| 123 | 123 | |
@@ -147,24 +147,24 @@ discard block |
||
| 147 | 147 | echo ' |
| 148 | 148 | <table class="issourcedtable"> |
| 149 | 149 | <tr> |
| 150 | - <td class="slabel"> ' . GedcomTag::getLabel('INDI') . '</td> |
|
| 150 | + <td class="slabel"> ' . GedcomTag::getLabel('INDI').'</td> |
|
| 151 | 151 | <td class="svalue">' . FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1).'</td> |
| 152 | 152 | </tr> |
| 153 | 153 | <tr> |
| 154 | - <td class="slabel">' . GedcomTag::getLabel('BIRT') . '</td> |
|
| 154 | + <td class="slabel">' . GedcomTag::getLabel('BIRT').'</td> |
|
| 155 | 155 | <td class="svalue">' . FunctionsPrint::formatIsSourcedIcon('E', $dindi->isBirthSourced(), 'BIRT', 1).'</td> |
| 156 | 156 | </tr>'; |
| 157 | 157 | |
| 158 | 158 | $fams = $root->getSpouseFamilies(); |
| 159 | - ($ct = count($fams)) > 1 ? $nb=1 : $nb=' '; |
|
| 160 | - foreach($fams as $fam){ |
|
| 159 | + ($ct = count($fams)) > 1 ? $nb = 1 : $nb = ' '; |
|
| 160 | + foreach ($fams as $fam) { |
|
| 161 | 161 | $dfam = new Family($fam); |
| 162 | 162 | echo ' |
| 163 | 163 | <tr> |
| 164 | 164 | <td class="slabel right"> |
| 165 | - <a href="' . $fam->getHtmlUrl() . '"> '. GedcomTag::getLabel('MARR'); |
|
| 166 | - if($ct > 1){ |
|
| 167 | - echo ' ',$nb; |
|
| 165 | + <a href="' . $fam->getHtmlUrl().'"> '.GedcomTag::getLabel('MARR'); |
|
| 166 | + if ($ct > 1) { |
|
| 167 | + echo ' ', $nb; |
|
| 168 | 168 | $nb++; |
| 169 | 169 | } |
| 170 | 170 | echo ' </a> |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | </tr>'; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - if( $root->isDead() ) |
|
| 176 | + if ($root->isDead()) |
|
| 177 | 177 | echo ' |
| 178 | 178 | <tr> |
| 179 | - <td class="slabel">' . GedcomTag::getLabel('DEAT') . '</td> |
|
| 179 | + <td class="slabel">' . GedcomTag::getLabel('DEAT').'</td> |
|
| 180 | 180 | <td class="svalue">' . FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1).'</td> |
| 181 | 181 | </tr>'; |
| 182 | 182 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | protected function renderContent() { |
| 36 | 36 | |
| 37 | - if($this->data->get('has_sosa', false)) { |
|
| 37 | + if ($this->data->get('has_sosa', false)) { |
|
| 38 | 38 | $table_id = $this->data->get('table_id'); |
| 39 | 39 | ?> |
| 40 | 40 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | class="ui-state-default" |
| 53 | 53 | title="<?php echo I18N::translate('Show individuals who are alive or couples where both partners are alive.'); ?>" |
| 54 | 54 | > |
| 55 | - <?php echo I18N::translate('Both alive');?> |
|
| 55 | + <?php echo I18N::translate('Both alive'); ?> |
|
| 56 | 56 | </button> |
| 57 | 57 | <button |
| 58 | 58 | type="button" |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | class="ui-state-default" |
| 62 | 62 | title="<?php echo I18N::translate('Show couples where only the female partner is dead.'); ?>" |
| 63 | 63 | > |
| 64 | - <?php echo I18N::translate('Widower');?> |
|
| 64 | + <?php echo I18N::translate('Widower'); ?> |
|
| 65 | 65 | </button> |
| 66 | 66 | <button |
| 67 | 67 | type="button" |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | </thead> |
| 176 | 176 | <tbody> |
| 177 | 177 | |
| 178 | - <?php foreach($this->data->get('sosa_list') as $sosa => $family) { |
|
| 178 | + <?php foreach ($this->data->get('sosa_list') as $sosa => $family) { |
|
| 179 | 179 | /** @var \Fisharebest\Webtrees\Family $person */ |
| 180 | 180 | |
| 181 | 181 | //PERSO Create decorator for Family |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $wife = new Individual('W', '0 @W@ INDI', null, $family->getTree()); |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - $mdate=$family->getMarriageDate(); |
|
| 193 | + $mdate = $family->getMarriageDate(); |
|
| 194 | 194 | |
| 195 | 195 | if ($family->isPendingAddtion()) { |
| 196 | 196 | $class = ' class="new"'; |
@@ -206,17 +206,17 @@ discard block |
||
| 206 | 206 | <?php list($surn_givn, $givn_surn) = FunctionsPrintLists::sortableNames($husb); ?> |
| 207 | 207 | <td colspan="2" data-sort="<?= Filter::escapeHtml($givn_surn) ?>"> |
| 208 | 208 | <?php foreach ($husb->getAllNames() as $num=>$name) { |
| 209 | - if ($name['type']=='NAME') { |
|
| 210 | - $title=''; |
|
| 209 | + if ($name['type'] == 'NAME') { |
|
| 210 | + $title = ''; |
|
| 211 | 211 | } else { |
| 212 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"'; |
|
| 212 | + $title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"'; |
|
| 213 | 213 | } |
| 214 | - if ($num==$husb->getPrimaryName()) { |
|
| 215 | - $class=' class="name2"'; |
|
| 216 | - $sex_image=$husb->getSexImage(); |
|
| 214 | + if ($num == $husb->getPrimaryName()) { |
|
| 215 | + $class = ' class="name2"'; |
|
| 216 | + $sex_image = $husb->getSexImage(); |
|
| 217 | 217 | } else { |
| 218 | - $class=''; |
|
| 219 | - $sex_image=''; |
|
| 218 | + $class = ''; |
|
| 219 | + $sex_image = ''; |
|
| 220 | 220 | } ?> |
| 221 | 221 | <a <?php echo $title.' '.$class; ?> href="<?php echo $husb->getHtmlUrl(); ?>"> |
| 222 | 222 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | echo implode(' ', |
| 226 | 226 | \MyArtJaub\Webtrees\Hook\HookProvider::getInstance() |
| 227 | 227 | ->get('hRecordNameAppend') |
| 228 | - ->executeOnlyFor(array(Constants::MODULE_MAJ_SOSA_NAME), $husb, 'smaller')); |
|
| 228 | + ->executeOnlyFor(array(Constants::MODULE_MAJ_SOSA_NAME), $husb, 'smaller')); |
|
| 229 | 229 | ?> |
| 230 | 230 | <br/> |
| 231 | 231 | <?php } |
@@ -233,23 +233,23 @@ discard block |
||
| 233 | 233 | ?> |
| 234 | 234 | </td> |
| 235 | 235 | <td hidden data-sort="<?= Filter::escapeHtml($surn_givn) ?>"></td> |
| 236 | - <?php $hdate=$husb->getBirthDate(); ?> |
|
| 236 | + <?php $hdate = $husb->getBirthDate(); ?> |
|
| 237 | 237 | <td class="center" data-sort="<?= Date::getAge($hdate, $mdate, 1) ?>"><?= Date::getAge($hdate, $mdate, 2) ?></td> |
| 238 | 238 | <!-- WIFE --> |
| 239 | 239 | <?php list($surn_givn, $givn_surn) = FunctionsPrintLists::sortableNames($wife); ?> |
| 240 | 240 | <td colspan="2"> |
| 241 | 241 | <?php foreach ($wife->getAllNames() as $num=>$name) { |
| 242 | - if ($name['type']=='NAME') { |
|
| 243 | - $title=''; |
|
| 242 | + if ($name['type'] == 'NAME') { |
|
| 243 | + $title = ''; |
|
| 244 | 244 | } else { |
| 245 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"'; |
|
| 245 | + $title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"'; |
|
| 246 | 246 | } |
| 247 | - if ($num==$wife->getPrimaryName()) { |
|
| 248 | - $class=' class="name2"'; |
|
| 249 | - $sex_image=$wife->getSexImage(); |
|
| 247 | + if ($num == $wife->getPrimaryName()) { |
|
| 248 | + $class = ' class="name2"'; |
|
| 249 | + $sex_image = $wife->getSexImage(); |
|
| 250 | 250 | } else { |
| 251 | - $class=''; |
|
| 252 | - $sex_image=''; |
|
| 251 | + $class = ''; |
|
| 252 | + $sex_image = ''; |
|
| 253 | 253 | } ?> |
| 254 | 254 | <a <?= $title.' '.$class ?> href="<?= $wife->getHtmlUrl() ?>"> |
| 255 | 255 | <?= \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']) ?> |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | echo implode(' ', |
| 259 | 259 | \MyArtJaub\Webtrees\Hook\HookProvider::getInstance() |
| 260 | 260 | ->get('hRecordNameAppend') |
| 261 | - ->executeOnlyFor(array(Constants::MODULE_MAJ_SOSA_NAME), $wife, 'smaller')); |
|
| 261 | + ->executeOnlyFor(array(Constants::MODULE_MAJ_SOSA_NAME), $wife, 'smaller')); |
|
| 262 | 262 | ?> |
| 263 | 263 | <br/> |
| 264 | 264 | <?php } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | ?> |
| 267 | 267 | </td> |
| 268 | 268 | <td hidden data-sort="<?= Filter::escapeHtml($surn_givn) ?>"></td> |
| 269 | - <?php $wdate=$wife->getBirthDate(); ?> |
|
| 269 | + <?php $wdate = $wife->getBirthDate(); ?> |
|
| 270 | 270 | <td class="center" data-sort="<?= Date::getAge($wdate, $mdate, 1) ?>"><?= Date::getAge($wdate, $mdate, 2) ?></td> |
| 271 | 271 | <td data-sort="<?= $mdate->julianDay() ?>"><?php |
| 272 | 272 | if ($marriage_dates = $family->getAllMarriageDates()) { |