@@ -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 |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | public function getMenu(fw\Tree $tree, $reference) {
|
| 49 | 49 | $tree_url = $tree ? $tree->getNameUrl() : ''; |
| 50 | 50 | $surname = $reference && is_string($reference) ? $reference : ''; |
| 51 | - return new fw\Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&mod_action=Lineage&ged=' . $tree_url . '&surname=' . $surname , 'menu-maj-list-lineage', array('rel' => 'nofollow'));
|
|
| 51 | + return new fw\Menu($this->getTitle(), 'module.php?mod='.$this->getName().'&mod_action=Lineage&ged='.$tree_url.'&surname='.$surname, 'menu-maj-list-lineage', array('rel' => 'nofollow'));
|
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | } |
@@ -18,40 +18,40 @@ |
||
| 18 | 18 | * Patronymic Lineage Module. |
| 19 | 19 | */ |
| 20 | 20 | class PatronymicLineageModule extends fw\Module\AbstractModule |
| 21 | - implements ModuleMenuItemInterface |
|
| 21 | + implements ModuleMenuItemInterface |
|
| 22 | 22 | {
|
| 23 | - /** @var string For custom modules - link for support, upgrades, etc. */ |
|
| 24 | - const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
|
| 23 | + /** @var string For custom modules - link for support, upgrades, etc. */ |
|
| 24 | + const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * {@inhericDoc}
|
|
| 28 | - */ |
|
| 29 | - public function getTitle() {
|
|
| 30 | - return /* I18N: Name of the “Patronymic lineage” module */ I18N::translate('Patronymic Lineages');
|
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * {@inhericDoc}
|
|
| 28 | + */ |
|
| 29 | + public function getTitle() {
|
|
| 30 | + return /* I18N: Name of the “Patronymic lineage” module */ I18N::translate('Patronymic Lineages');
|
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * {@inhericDoc}
|
|
| 35 | - */ |
|
| 36 | - public function getDescription() {
|
|
| 37 | - return /* I18N: Description of the “Patronymic lineage” module */ I18N::translate('Display lineages of people holding the same surname.');
|
|
| 38 | - } |
|
| 33 | + /** |
|
| 34 | + * {@inhericDoc}
|
|
| 35 | + */ |
|
| 36 | + public function getDescription() {
|
|
| 37 | + return /* I18N: Description of the “Patronymic lineage” module */ I18N::translate('Display lineages of people holding the same surname.');
|
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * {@inhericDoc}
|
|
| 42 | - */ |
|
| 43 | - public function modAction($mod_action) {
|
|
| 44 | - \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action); |
|
| 45 | - } |
|
| 46 | - /** |
|
| 47 | - * {@inhericDoc}
|
|
| 48 | - * @see \MyArtJaub\Webtrees\Module\ModuleMenuItemInterface::getMenu() |
|
| 49 | - */ |
|
| 50 | - public function getMenu(fw\Tree $tree, $reference) {
|
|
| 51 | - $tree_url = $tree ? $tree->getNameUrl() : ''; |
|
| 52 | - $surname = $reference && is_string($reference) ? $reference : ''; |
|
| 53 | - return new fw\Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&mod_action=Lineage&ged=' . $tree_url . '&surname=' . $surname , 'menu-maj-list-lineage', array('rel' => 'nofollow'));
|
|
| 54 | - } |
|
| 40 | + /** |
|
| 41 | + * {@inhericDoc}
|
|
| 42 | + */ |
|
| 43 | + public function modAction($mod_action) {
|
|
| 44 | + \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action); |
|
| 45 | + } |
|
| 46 | + /** |
|
| 47 | + * {@inhericDoc}
|
|
| 48 | + * @see \MyArtJaub\Webtrees\Module\ModuleMenuItemInterface::getMenu() |
|
| 49 | + */ |
|
| 50 | + public function getMenu(fw\Tree $tree, $reference) {
|
|
| 51 | + $tree_url = $tree ? $tree->getNameUrl() : ''; |
|
| 52 | + $surname = $reference && is_string($reference) ? $reference : ''; |
|
| 53 | + return new fw\Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&mod_action=Lineage&ged=' . $tree_url . '&surname=' . $surname , 'menu-maj-list-lineage', array('rel' => 'nofollow'));
|
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | \ 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 | } |
@@ -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 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 | - <a href="edituser.php" class="name2">' . I18N::translate('Logged in as ') . ' ' . Auth::user()->getRealNameHtml() . '</a> |
|
| 79 | + <a href="edituser.php" class="name2">' . I18N::translate('Logged in as ').' '.Auth::user()->getRealNameHtml().'</a> |
|
| 80 | 80 | <br><br> |
| 81 | 81 | <input type="submit" value="'.I18N::translate('Logout').'"> |
| 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('Login'). '"> |
|
| 101 | + <input type="submit" value="'. I18N::translate('Login').'"> |
|
| 102 | 102 | </div> |
| 103 | 103 | <div> |
| 104 | 104 | <a href="#" id="maj-passwd_click">'. I18N::translate('Request 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 new user account').'</a> |
|
| 109 | + <a href="'.WT_LOGIN_URL.'?action=register">'.I18N::translate('Request 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> |
@@ -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,11 +23,11 @@ |
||
| 23 | 23 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 24 | 24 | */ |
| 25 | 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>', |
|
| 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 | 29 | date('Y'), |
| 30 | - '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
|
| 30 | + '<span class="odometer">'.I18N::number($this->data->get('visits_today')).'</span>' |
|
| 31 | 31 | ); |
| 32 | 32 | } |
| 33 | 33 | else { |
@@ -29,8 +29,7 @@ |
||
| 29 | 29 | date('Y'), |
| 30 | 30 | '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
| 31 | 31 | ); |
| 32 | - } |
|
| 33 | - else { |
|
| 32 | + } else { |
|
| 34 | 33 | $html = I18N::translate('No statistics could be retrieved from Piwik.'); |
| 35 | 34 | } |
| 36 | 35 | |
@@ -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 | } |
@@ -28,42 +28,42 @@ |
||
| 28 | 28 | return ' |
| 29 | 29 | <tr> |
| 30 | 30 | <td class="descriptionbox wrap width33">' . |
| 31 | - I18N::translate('Enable Piwik Statistics') . |
|
| 31 | + I18N::translate('Enable Piwik Statistics'). |
|
| 32 | 32 | // Ideally, would like to add helpLink, but this does not work for modules... |
| 33 | 33 | // FunctionsPrint::helpLink('piwik_enabled', $this->getName()); |
| 34 | 34 | '</td> |
| 35 | 35 | <td class="optionbox">' . |
| 36 | - FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')) . |
|
| 36 | + FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')). |
|
| 37 | 37 | '</td> |
| 38 | 38 | </tr>' . |
| 39 | 39 | |
| 40 | 40 | '<tr> |
| 41 | 41 | <td class="descriptionbox wrap width33">' . |
| 42 | - I18N::translate('Piwik URL') . |
|
| 42 | + I18N::translate('Piwik URL'). |
|
| 43 | 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 | 50 | '<tr> |
| 51 | 51 | <td class="descriptionbox wrap width33">' . |
| 52 | - I18N::translate('Piwik Token') . |
|
| 52 | + I18N::translate('Piwik Token'). |
|
| 53 | 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 | 60 | '<tr> |
| 61 | 61 | <td class="descriptionbox wrap width33">' . |
| 62 | - I18N::translate('Piwik Site ID') . |
|
| 62 | + I18N::translate('Piwik Site ID'). |
|
| 63 | 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 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | public function getConfigLink() { |
| 65 | 65 | Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
| 66 | 66 | |
| 67 | - return 'module.php?mod=' . $this->getName() . '&mod_action=AdminConfig'; |
|
| 67 | + return 'module.php?mod='.$this->getName().'&mod_action=AdminConfig'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | public function getProvider() { |
| 84 | 84 | global $WT_TREE; |
| 85 | 85 | |
| 86 | - if(!$this->provider) { |
|
| 86 | + if (!$this->provider) { |
|
| 87 | 87 | $this->provider = new GeoAnalysisProvider($WT_TREE); |
| 88 | 88 | } |
| 89 | 89 | return $this->provider; |
@@ -24,88 +24,88 @@ |
||
| 24 | 24 | class GeoDispersionModule extends AbstractModule implements ModuleConfigInterface, DependentInterface { |
| 25 | 25 | |
| 26 | 26 | // How to update the database schema for this module |
| 27 | - const SCHEMA_TARGET_VERSION = 1; |
|
| 28 | - const SCHEMA_SETTING_NAME = 'MAJ_GEODISP_SCHEMA_VERSION'; |
|
| 29 | - const SCHEMA_MIGRATION_PREFIX = '\MyArtJaub\Webtrees\Module\GeoDispersion\Schema'; |
|
| 27 | + const SCHEMA_TARGET_VERSION = 1; |
|
| 28 | + const SCHEMA_SETTING_NAME = 'MAJ_GEODISP_SCHEMA_VERSION'; |
|
| 29 | + const SCHEMA_MIGRATION_PREFIX = '\MyArtJaub\Webtrees\Module\GeoDispersion\Schema'; |
|
| 30 | 30 | |
| 31 | - /** @var string For custom modules - link for support, upgrades, etc. */ |
|
| 32 | - const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
|
| 31 | + /** @var string For custom modules - link for support, upgrades, etc. */ |
|
| 32 | + const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * GeoDispersion analysis provider |
|
| 36 | - * @var \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider $provider |
|
| 37 | - */ |
|
| 38 | - protected $provider; |
|
| 34 | + /** |
|
| 35 | + * GeoDispersion analysis provider |
|
| 36 | + * @var \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider $provider |
|
| 37 | + */ |
|
| 38 | + protected $provider; |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * {@inhericDoc} |
|
| 42 | - */ |
|
| 43 | - public function getTitle() { |
|
| 44 | - return /* I18N: Name of the “Hooks” module */ I18N::translate('Geographical Dispersion'); |
|
| 45 | - } |
|
| 40 | + /** |
|
| 41 | + * {@inhericDoc} |
|
| 42 | + */ |
|
| 43 | + public function getTitle() { |
|
| 44 | + return /* I18N: Name of the “Hooks” module */ I18N::translate('Geographical Dispersion'); |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * {@inhericDoc} |
|
| 49 | - */ |
|
| 50 | - public function getDescription() { |
|
| 51 | - return /* I18N: Description of the “Hooks” module */ I18N::translate('Display the geographical dispersion of the root person’s Sosa ancestors.'); |
|
| 52 | - } |
|
| 47 | + /** |
|
| 48 | + * {@inhericDoc} |
|
| 49 | + */ |
|
| 50 | + public function getDescription() { |
|
| 51 | + return /* I18N: Description of the “Hooks” module */ I18N::translate('Display the geographical dispersion of the root person’s Sosa ancestors.'); |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * {@inhericDoc} |
|
| 56 | - */ |
|
| 57 | - public function modAction($mod_action) { |
|
| 58 | - Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
|
| 54 | + /** |
|
| 55 | + * {@inhericDoc} |
|
| 56 | + */ |
|
| 57 | + public function modAction($mod_action) { |
|
| 58 | + Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
|
| 59 | 59 | |
| 60 | - \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action); |
|
| 61 | - } |
|
| 60 | + \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action); |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * {@inhericDoc} |
|
| 65 | - * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink() |
|
| 66 | - */ |
|
| 67 | - public function getConfigLink() { |
|
| 68 | - Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
|
| 63 | + /** |
|
| 64 | + * {@inhericDoc} |
|
| 65 | + * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink() |
|
| 66 | + */ |
|
| 67 | + public function getConfigLink() { |
|
| 68 | + Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
|
| 69 | 69 | |
| 70 | - return 'module.php?mod=' . $this->getName() . '&mod_action=AdminConfig'; |
|
| 71 | - } |
|
| 70 | + return 'module.php?mod=' . $this->getName() . '&mod_action=AdminConfig'; |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - /** |
|
| 74 | - * {@inhericDoc} |
|
| 75 | - * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites() |
|
| 76 | - */ |
|
| 77 | - public function validatePrerequisites() { |
|
| 78 | - try { |
|
| 79 | - Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
|
| 73 | + /** |
|
| 74 | + * {@inhericDoc} |
|
| 75 | + * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites() |
|
| 76 | + */ |
|
| 77 | + public function validatePrerequisites() { |
|
| 78 | + try { |
|
| 79 | + Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
|
| 80 | 80 | |
| 81 | - return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME)); |
|
| 82 | - } |
|
| 83 | - catch (\Exception $ex) { } |
|
| 84 | - return false; |
|
| 85 | - } |
|
| 81 | + return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME)); |
|
| 82 | + } |
|
| 83 | + catch (\Exception $ex) { } |
|
| 84 | + return false; |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * Get the GeoAnalysis Provider (initialise it if not done yet). |
| 89 | 89 | * |
| 90 | 90 | * @return \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider |
| 91 | 91 | */ |
| 92 | - public function getProvider() { |
|
| 93 | - global $WT_TREE; |
|
| 92 | + public function getProvider() { |
|
| 93 | + global $WT_TREE; |
|
| 94 | 94 | |
| 95 | - if(!$this->provider) { |
|
| 96 | - $this->provider = new GeoAnalysisProvider($WT_TREE); |
|
| 97 | - } |
|
| 98 | - return $this->provider; |
|
| 99 | - } |
|
| 95 | + if(!$this->provider) { |
|
| 96 | + $this->provider = new GeoAnalysisProvider($WT_TREE); |
|
| 97 | + } |
|
| 98 | + return $this->provider; |
|
| 99 | + } |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * Set the GeoAnalysis Provider. |
| 103 | 103 | * |
| 104 | 104 | * @return \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider |
| 105 | 105 | */ |
| 106 | - public function setProvider(GeoAnalysisProvider $provider) { |
|
| 107 | - $this->provider = $provider; |
|
| 108 | - } |
|
| 106 | + public function setProvider(GeoAnalysisProvider $provider) { |
|
| 107 | + $this->provider = $provider; |
|
| 108 | + } |
|
| 109 | 109 | |
| 110 | 110 | |
| 111 | 111 | } |
@@ -79,8 +79,7 @@ |
||
| 79 | 79 | Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
| 80 | 80 | |
| 81 | 81 | return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME)); |
| 82 | - } |
|
| 83 | - catch (\Exception $ex) { } |
|
| 82 | + } catch (\Exception $ex) { } |
|
| 84 | 83 | return false; |
| 85 | 84 | } |
| 86 | 85 | |
@@ -77,8 +77,7 @@ |
||
| 77 | 77 | $index = str_replace('%', '', $match2); |
| 78 | 78 | if(is_numeric($index) && $index >0 && $index <= $nbLevels){ |
| 79 | 79 | $displayPlace = str_replace($match2, $levels[$index-1] , $displayPlace); |
| 80 | - } |
|
| 81 | - else{ |
|
| 80 | + } else{ |
|
| 82 | 81 | $displayPlace = str_replace($match2, '' , $displayPlace); |
| 83 | 82 | } |
| 84 | 83 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @param \Fisharebest\Webtrees\Place $place_in The Place to extend |
| 29 | 29 | */ |
| 30 | - public function __construct(\Fisharebest\Webtrees\Place $place){ |
|
| 30 | + public function __construct(\Fisharebest\Webtrees\Place $place) { |
|
| 31 | 31 | $this->place = $place; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | * @param \Fisharebest\Webtrees\Tree $tree |
| 40 | 40 | * @return \MyArtJaub\Webtrees\Place|null Instance of \MyArtJaub\Webtrees\Place, if relevant |
| 41 | 41 | */ |
| 42 | - public static function getIntance($place_str, Tree $tree){ |
|
| 42 | + public static function getIntance($place_str, Tree $tree) { |
|
| 43 | 43 | $dplace = null; |
| 44 | - if(is_string($place_str) && strlen($place_str) > 0){ |
|
| 44 | + if (is_string($place_str) && strlen($place_str) > 0) { |
|
| 45 | 45 | $dplace = new Place(new \Fisharebest\Webtrees\Place($place_str, $tree)); |
| 46 | 46 | } |
| 47 | 47 | return $dplace; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return \Fisharebest\Webtrees\Place Embedded place record |
| 54 | 54 | */ |
| 55 | - public function getDerivedPlace(){ |
|
| 55 | + public function getDerivedPlace() { |
|
| 56 | 56 | return $this->place; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | * @param bool $anchor Option to print a link to placelist |
| 66 | 66 | * @return string HTML code for formatted place |
| 67 | 67 | */ |
| 68 | - public function htmlFormattedName($format, $anchor = false){ |
|
| 69 | - $html=''; |
|
| 68 | + public function htmlFormattedName($format, $anchor = false) { |
|
| 69 | + $html = ''; |
|
| 70 | 70 | |
| 71 | 71 | $levels = array_map('trim', explode(',', $this->place->getGedcomName())); |
| 72 | 72 | $nbLevels = count($levels); |
@@ -74,15 +74,15 @@ discard block |
||
| 74 | 74 | preg_match_all('/%[^%]/', $displayPlace, $matches); |
| 75 | 75 | foreach ($matches[0] as $match2) { |
| 76 | 76 | $index = str_replace('%', '', $match2); |
| 77 | - if(is_numeric($index) && $index >0 && $index <= $nbLevels){ |
|
| 78 | - $displayPlace = str_replace($match2, $levels[$index-1] , $displayPlace); |
|
| 77 | + if (is_numeric($index) && $index > 0 && $index <= $nbLevels) { |
|
| 78 | + $displayPlace = str_replace($match2, $levels[$index - 1], $displayPlace); |
|
| 79 | 79 | } |
| 80 | - else{ |
|
| 81 | - $displayPlace = str_replace($match2, '' , $displayPlace); |
|
| 80 | + else { |
|
| 81 | + $displayPlace = str_replace($match2, '', $displayPlace); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | if ($anchor && !Auth::isSearchEngine()) { |
| 85 | - $html .='<a href="' . $this->place->getURL() . '">' . $displayPlace . '</a>'; |
|
| 85 | + $html .= '<a href="'.$this->place->getURL().'">'.$displayPlace.'</a>'; |
|
| 86 | 86 | } else { |
| 87 | 87 | $html .= $displayPlace; |
| 88 | 88 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | /** |
| 26 | 26 | * Contructor for the decorator |
| 27 | 27 | * |
| 28 | - * @param \Fisharebest\Webtrees\Place $place_in The Place to extend |
|
| 28 | + * @param \Fisharebest\Webtrees\Place $place The Place to extend |
|
| 29 | 29 | */ |
| 30 | 30 | public function __construct(\Fisharebest\Webtrees\Place $place){ |
| 31 | 31 | $this->place = $place; |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | interface MvcControllerInterface { |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Return the module attached to this controller. |
|
| 20 | - * |
|
| 21 | - * @return \Fisharebest\Webtrees\Module\AbstractModule |
|
| 22 | - */ |
|
| 23 | - function getModule(); |
|
| 18 | + /** |
|
| 19 | + * Return the module attached to this controller. |
|
| 20 | + * |
|
| 21 | + * @return \Fisharebest\Webtrees\Module\AbstractModule |
|
| 22 | + */ |
|
| 23 | + function getModule(); |
|
| 24 | 24 | |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | \ No newline at end of file |
@@ -17,28 +17,28 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class MvcController implements MvcControllerInterface |
| 19 | 19 | { |
| 20 | - /** |
|
| 21 | - * Reference module |
|
| 22 | - * @var Fisharebest\Webtrees\Module\AbstractModule $module |
|
| 23 | - */ |
|
| 24 | - protected $module; |
|
| 20 | + /** |
|
| 21 | + * Reference module |
|
| 22 | + * @var Fisharebest\Webtrees\Module\AbstractModule $module |
|
| 23 | + */ |
|
| 24 | + protected $module; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Constructor for MvcController |
|
| 28 | - * |
|
| 29 | - * @param AbstractModule $module |
|
| 30 | - */ |
|
| 31 | - public function __construct(AbstractModule $module) { |
|
| 32 | - $this->module = $module; |
|
| 33 | - } |
|
| 26 | + /** |
|
| 27 | + * Constructor for MvcController |
|
| 28 | + * |
|
| 29 | + * @param AbstractModule $module |
|
| 30 | + */ |
|
| 31 | + public function __construct(AbstractModule $module) { |
|
| 32 | + $this->module = $module; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * {@inheritDoc} |
|
| 37 | - * @see \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface::getModule() |
|
| 38 | - */ |
|
| 39 | - public function getModule() { |
|
| 40 | - return $this->module; |
|
| 41 | - } |
|
| 35 | + /** |
|
| 36 | + * {@inheritDoc} |
|
| 37 | + * @see \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface::getModule() |
|
| 38 | + */ |
|
| 39 | + public function getModule() { |
|
| 40 | + return $this->module; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | \ No newline at end of file |