@@ -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 | } |
@@ -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> |
@@ -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 { |
@@ -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 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | public function index(PageController $parent_controller, Tree $tree, $block_id, $template) { |
| 45 | 45 | $view_bag = new ViewBag(); |
| 46 | 46 | |
| 47 | - if($parent_controller && $tree) { |
|
| 47 | + if ($parent_controller && $tree) { |
|
| 48 | 48 | |
| 49 | 49 | $view_bag->set('tree', $tree); |
| 50 | 50 | $view_bag->set('indi', $parent_controller->getSignificantIndividual()); |
@@ -63,22 +63,22 @@ discard block |
||
| 63 | 63 | '); |
| 64 | 64 | |
| 65 | 65 | if (Auth::isAdmin()) { |
| 66 | - $title='<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&ged=' . $tree->getNameHtml() . '&ctype=gedcom"></a>'; |
|
| 66 | + $title = '<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&ged='.$tree->getNameHtml().'&ctype=gedcom"></a>'; |
|
| 67 | 67 | } else { |
| 68 | - $title=''; |
|
| 68 | + $title = ''; |
|
| 69 | 69 | } |
| 70 | - $title .='<span dir="auto">'.$tree->getTitleHtml().'</span>'; |
|
| 70 | + $title .= '<span dir="auto">'.$tree->getTitleHtml().'</span>'; |
|
| 71 | 71 | |
| 72 | 72 | $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false); |
| 73 | 73 | $view_bag->set('piwik_enabled', $piwik_enabled); |
| 74 | - if($piwik_enabled) { |
|
| 74 | + if ($piwik_enabled) { |
|
| 75 | 75 | $parent_controller->addInlineJavascript( |
| 76 | 76 | '$("#piwik_stats") |
| 77 | 77 | .load("module.php?mod='.$this->module->getName().'&mod_action=Piwik&block_id='.$block_id.'");' |
| 78 | 78 | ); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial(); |
|
| 81 | + $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial(); |
|
| 82 | 82 | |
| 83 | 83 | if ($template) { |
| 84 | 84 | return Theme::theme()->formatBlock($id, $title, $class, $content); |
@@ -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; |
@@ -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(false); |
| 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 | } |
@@ -53,13 +53,13 @@ |
||
| 53 | 53 | */ |
| 54 | 54 | public function makeView($view_name, MvcController $mvc_ctrl, BaseController $ctrl, ViewBag $data) |
| 55 | 55 | { |
| 56 | - if(!$mvc_ctrl) throw new \Exception('Mvc Controller not defined'); |
|
| 57 | - if(!$ctrl) throw new \Exception('Base Controller not defined'); |
|
| 58 | - if(!$view_name) throw new \Exception('View not defined'); |
|
| 56 | + if (!$mvc_ctrl) throw new \Exception('Mvc Controller not defined'); |
|
| 57 | + if (!$ctrl) throw new \Exception('Base Controller not defined'); |
|
| 58 | + if (!$view_name) throw new \Exception('View not defined'); |
|
| 59 | 59 | |
| 60 | 60 | $mvc_ctrl_refl = new \ReflectionObject($mvc_ctrl); |
| 61 | - $view_class = $mvc_ctrl_refl->getNamespaceName() . '\\Views\\' . $view_name . 'View'; |
|
| 62 | - if(!class_exists($view_class)) throw new \Exception('View does not exist'); |
|
| 61 | + $view_class = $mvc_ctrl_refl->getNamespaceName().'\\Views\\'.$view_name.'View'; |
|
| 62 | + if (!class_exists($view_class)) throw new \Exception('View does not exist'); |
|
| 63 | 63 | |
| 64 | 64 | return new $view_class($ctrl, $data); |
| 65 | 65 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | public function render() { |
| 46 | 46 | global $controller; |
| 47 | 47 | |
| 48 | - if(!$this->ctrl) throw new \Exception('Controller not initialised'); |
|
| 48 | + if (!$this->ctrl) throw new \Exception('Controller not initialised'); |
|
| 49 | 49 | |
| 50 | 50 | $controller = $this->ctrl; |
| 51 | 51 | $this->ctrl->pageHeader(); |