Completed
Push — master ( 95506d...0f93c5 )
by Jonathan
07:55
created
src/Webtrees/Module/Certificates/Views/AdminConfigView.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
186 186
         </form>
187 187
 		
188 188
 		<?php        
189
-    }
189
+	}
190 190
     
191 191
 }
192 192
  
193 193
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Module/Certificates/Views/CertificatesListView.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
95 95
     	</div>
96 96
     	
97 97
     	<?php 
98
-    }
98
+	}
99 99
     
100 100
 }
101 101
  
102 102
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,21 +35,21 @@  discard block
 block discarded – undo
35 35
 			<h2><?php echo $this->data->get('title'); ?></h2>
36 36
 			
37 37
 			<form method="get" name="selcity" action="module.php">
38
-    			<input type="hidden" name="mod" value="<?php echo $this->data->get('url_module');?>">
39
-    			<input type="hidden" name="mod_action" value="<?php echo $this->data->get('url_action');?>">
40
-    			<input type="hidden" name="ged" value="<?php echo $this->data->get('url_ged');?>">
38
+    			<input type="hidden" name="mod" value="<?php echo $this->data->get('url_module'); ?>">
39
+    			<input type="hidden" name="mod_action" value="<?php echo $this->data->get('url_action'); ?>">
40
+    			<input type="hidden" name="ged" value="<?php echo $this->data->get('url_ged'); ?>">
41 41
     			<select name="city">
42 42
     			<?php foreach ($cities as $city) { ?>
43
-    				<option value="<?php echo Functions::encryptToSafeBase64($city); ?>" <?php if(trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?php echo $city;?></option>
43
+    				<option value="<?php echo Functions::encryptToSafeBase64($city); ?>" <?php if (trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?php echo $city; ?></option>
44 44
     			<?php } ?>
45 45
     			</select>
46
-    			<input type="submit" value="<?php echo I18N::translate('Show');?>" />
46
+    			<input type="submit" value="<?php echo I18N::translate('Show'); ?>" />
47 47
     		</form>
48 48
     		
49
-    		<?php if($this->data->get('has_list', false)) { ?>
49
+    		<?php if ($this->data->get('has_list', false)) { ?>
50 50
     		<div class="loading-image">&nbsp;</div>
51 51
     		<div class="certificate-list">
52
-    			<table id="<?php echo $this->data->get('table_id');?>">
52
+    			<table id="<?php echo $this->data->get('table_id'); ?>">
53 53
     				<thead>
54 54
     					<tr>
55 55
     						<th><?php echo I18N::translate('Date'); ?></th>
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     				    ?>
66 66
     					<tr>
67 67
     						<!-- Certificate date -->
68
-    						<?php if($date = $certificate->getCertificateDate()) { ?>
68
+    						<?php if ($date = $certificate->getCertificateDate()) { ?>
69 69
     						<td><?php echo $date->display(); ?></td>
70 70
     						<td><?php echo $date->julianDay(); ?></td>
71 71
     						<?php } else { ?>
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
     						<td>0</td>
74 74
     						<?php  } ?>
75 75
     						<!--  Certificate Type -->
76
-    						<td><?php echo Filter::escapeHtml($certificate->getCertificateType() ?: '');  ?></td>
76
+    						<td><?php echo Filter::escapeHtml($certificate->getCertificateType() ?: ''); ?></td>
77 77
     						<!--  Certificate Name -->
78 78
     						<?php 
79 79
     						$name = $certificate->getCertificateDetails() ?: '';
80 80
     						$sortname = "";
81
-    						$ct_names=preg_match("/([A-Z]{2,})/", $name, $match);
82
-    						if($ct_names > 0) $sortname = $match[1].'_';
81
+    						$ct_names = preg_match("/([A-Z]{2,})/", $name, $match);
82
+    						if ($ct_names > 0) $sortname = $match[1].'_';
83 83
     						$sortname .= $name;
84 84
     						?>
85 85
     						<td><?php echo Filter::escapeHtml($sortname); ?></td>
Please login to merge, or discard this patch.
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,10 @@  discard block
 block discarded – undo
40 40
     			<input type="hidden" name="ged" value="<?php echo $this->data->get('url_ged');?>">
41 41
     			<select name="city">
42 42
     			<?php foreach ($cities as $city) { ?>
43
-    				<option value="<?php echo Functions::encryptToSafeBase64($city); ?>" <?php if(trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?php echo $city;?></option>
43
+    				<option value="<?php echo Functions::encryptToSafeBase64($city); ?>" <?php if(trim($city) == trim($selected_city)) {
44
+	echo 'selected="selected"'?> ><?php echo $city;
45
+}
46
+?></option>
44 47
     			<?php } ?>
45 48
     			</select>
46 49
     			<input type="submit" value="<?php echo I18N::translate('Show');?>" />
@@ -79,7 +82,9 @@  discard block
 block discarded – undo
79 82
     						$name = $certificate->getCertificateDetails() ?: '';
80 83
     						$sortname = "";
81 84
     						$ct_names=preg_match("/([A-Z]{2,})/", $name, $match);
82
-    						if($ct_names > 0) $sortname = $match[1].'_';
85
+    						if($ct_names > 0) {
86
+    							$sortname = $match[1].'_';
87
+    						}
83 88
     						$sortname .= $name;
84 89
     						?>
85 90
     						<td><?php echo Filter::escapeHtml($sortname); ?></td>
Please login to merge, or discard this patch.
src/Webtrees/Module/PatronymicLineageModule.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -18,40 +18,40 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/PiwikController.php 3 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -23,74 +23,74 @@
 block discarded – undo
23 23
  */
24 24
 class PiwikController extends MvcController
25 25
 {   
26
-    /**
27
-     * Retrieve the number of visitors from Piwik, for a given period.
28
-     * 
29
-     * @param string $block_id
30
-     * @param string $period
31
-     * @param (null|int) Number of visits
32
-     */
33
-    private function getNumberOfVisitsPiwik($block_id, $period='year'){
26
+	/**
27
+	 * Retrieve the number of visitors from Piwik, for a given period.
28
+	 * 
29
+	 * @param string $block_id
30
+	 * @param string $period
31
+	 * @param (null|int) Number of visits
32
+	 */
33
+	private function getNumberOfVisitsPiwik($block_id, $period='year'){
34 34
     
35
-        $piwik_url = $this->module->getBlockSetting($block_id, 'piwik_url');
36
-        $piwik_siteid = $this->module->getBlockSetting($block_id, 'piwik_siteid');
37
-        $piwik_token = $this->module->getBlockSetting($block_id, 'piwik_token');
35
+		$piwik_url = $this->module->getBlockSetting($block_id, 'piwik_url');
36
+		$piwik_siteid = $this->module->getBlockSetting($block_id, 'piwik_siteid');
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 &&
41
-            $piwik_token && strlen($piwik_token)            
42
-            ) 
43
-        {        
44
-            // calling Piwik REST API
45
-            $url = $piwik_url;
46
-            $url .= '?module=API&method=VisitsSummary.getVisits';
47
-            $url .= '&idSite='.$piwik_siteid.'&period='.$period.'&date=today';
48
-            $url .= '&format=PHP';
49
-            $url .= '&token_auth='.$piwik_token;
39
+		if($piwik_url && strlen($piwik_url) > 0 &&
40
+			$piwik_siteid  && strlen($piwik_siteid) > 0 &&
41
+			$piwik_token && strlen($piwik_token)            
42
+			) 
43
+		{        
44
+			// calling Piwik REST API
45
+			$url = $piwik_url;
46
+			$url .= '?module=API&method=VisitsSummary.getVisits';
47
+			$url .= '&idSite='.$piwik_siteid.'&period='.$period.'&date=today';
48
+			$url .= '&format=PHP';
49
+			$url .= '&token_auth='.$piwik_token;
50 50
         
51
-            if($fetched = File::fetchUrl($url)) {
52
-                $content = @unserialize($fetched);
53
-                if(is_numeric($content)) return $content;
54
-            }
55
-        }
51
+			if($fetched = File::fetchUrl($url)) {
52
+				$content = @unserialize($fetched);
53
+				if(is_numeric($content)) return $content;
54
+			}
55
+		}
56 56
     
57
-        return null;
58
-    }
57
+		return null;
58
+	}
59 59
     
60
-    /**
61
-     * Pages
62
-     */
60
+	/**
61
+	 * Pages
62
+	 */
63 63
         
64
-    /**
65
-     * Piwik@index
66
-     */
67
-    public function index() {  
64
+	/**
65
+	 * Piwik@index
66
+	 */
67
+	public function index() {  
68 68
         
69
-        $ctrl = new AjaxController();
69
+		$ctrl = new AjaxController();
70 70
         
71
-        $data = new ViewBag();
72
-        $data->set('has_stats', false);
71
+		$data = new ViewBag();
72
+		$data->set('has_stats', false);
73 73
         
74
-        $block_id = Filter::get('block_id');        
75
-        if($block_id){
76
-            if(Cache::isCached('piwikCountYear', $this->module)) {
77
-                $visitCountYear = Cache::get('piwikCountYear', $this->module);
78
-            }
79
-            else{
80
-                $visitCountYear = $this->getNumberOfVisitsPiwik($block_id);
81
-                Cache::save('piwikCountYear', $visitCountYear, $this->module);
82
-            }
83
-            if($visitCountYear){
84
-                $visitCountToday = max(0, $this->getNumberOfVisitsPiwik($block_id, 'day'));
85
-                $visitCountYear = max( 0, $visitCountYear);
74
+		$block_id = Filter::get('block_id');        
75
+		if($block_id){
76
+			if(Cache::isCached('piwikCountYear', $this->module)) {
77
+				$visitCountYear = Cache::get('piwikCountYear', $this->module);
78
+			}
79
+			else{
80
+				$visitCountYear = $this->getNumberOfVisitsPiwik($block_id);
81
+				Cache::save('piwikCountYear', $visitCountYear, $this->module);
82
+			}
83
+			if($visitCountYear){
84
+				$visitCountToday = max(0, $this->getNumberOfVisitsPiwik($block_id, 'day'));
85
+				$visitCountYear = max( 0, $visitCountYear);
86 86
                 
87
-                $data->set('has_stats', true);
88
-                $data->set('visits_today', $visitCountToday);
89
-                $data->set('visits_year', $visitCountYear + $visitCountToday);                
90
-            }
91
-        }
87
+				$data->set('has_stats', true);
88
+				$data->set('visits_today', $visitCountToday);
89
+				$data->set('visits_year', $visitCountYear + $visitCountToday);                
90
+			}
91
+		}
92 92
         
93
-        ViewFactory::make('PiwikStats', $this, $ctrl, $data)->render();        
94
-    }
93
+		ViewFactory::make('PiwikStats', $this, $ctrl, $data)->render();        
94
+	}
95 95
     
96 96
 }
97 97
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,17 +72,17 @@  discard block
 block discarded – undo
72 72
         $data->set('has_stats', false);
73 73
         
74 74
         $block_id = Filter::get('block_id');        
75
-        if($block_id){
76
-            if(Cache::isCached('piwikCountYear', $this->module)) {
75
+        if ($block_id) {
76
+            if (Cache::isCached('piwikCountYear', $this->module)) {
77 77
                 $visitCountYear = Cache::get('piwikCountYear', $this->module);
78 78
             }
79
-            else{
79
+            else {
80 80
                 $visitCountYear = $this->getNumberOfVisitsPiwik($block_id);
81 81
                 Cache::save('piwikCountYear', $visitCountYear, $this->module);
82 82
             }
83
-            if($visitCountYear){
83
+            if ($visitCountYear) {
84 84
                 $visitCountToday = max(0, $this->getNumberOfVisitsPiwik($block_id, 'day'));
85
-                $visitCountYear = max( 0, $visitCountYear);
85
+                $visitCountYear = max(0, $visitCountYear);
86 86
                 
87 87
                 $data->set('has_stats', true);
88 88
                 $data->set('visits_today', $visitCountToday);
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@  discard block
 block discarded – undo
50 50
         
51 51
             if($fetched = File::fetchUrl($url)) {
52 52
                 $content = @unserialize($fetched);
53
-                if(is_numeric($content)) return $content;
53
+                if(is_numeric($content)) {
54
+                	return $content;
55
+                }
54 56
             }
55 57
         }
56 58
     
@@ -75,8 +77,7 @@  discard block
 block discarded – undo
75 77
         if($block_id){
76 78
             if(Cache::isCached('piwikCountYear', $this->module)) {
77 79
                 $visitCountYear = Cache::get('piwikCountYear', $this->module);
78
-            }
79
-            else{
80
+            } else{
80 81
                 $visitCountYear = $this->getNumberOfVisitsPiwik($block_id);
81 82
                 Cache::save('piwikCountYear', $visitCountYear, $this->module);
82 83
             }
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/Views/WelcomeBlockView.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
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() . '&amp;ged=' . $tree->getNameUrl() . '">
@@ -46,33 +46,33 @@  discard block
 block discarded – undo
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>&nbsp;' . 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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -36,20 +36,20 @@  discard block
 block discarded – undo
36 36
             '<table>
37 37
                 <tr>
38 38
                     <td>
39
-                        <a href="pedigree.php?rootid=' . $indi->getXref() . '&amp;ged=' . $tree->getNameUrl() . '">
40
-                            <i class="icon-pedigree"></i><br>' . I18N::translate('Default chart') . '
39
+                        <a href="pedigree.php?rootid=' . $indi->getXref().'&amp;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() . '&amp;ged=' . $tree->getNameUrl() . '">
45
-                            <i class="icon-indis"></i><br>' . I18N::translate('Default individual') . '
44
+                        <a href="individual.php?pid=' . $indi->getXref().'&amp;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
 block discarded – undo
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>&nbsp;' . I18N::translate('Retrieving Piwik statistics...') . '
66
+                        <i class="icon-loading-small"></i>&nbsp;' . 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
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/Views/PiwikStatsView.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,20 +22,20 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
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
         
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/Views/WelcomeBlockConfigView.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -23,51 +23,51 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,42 +28,42 @@
 block discarded – undo
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
         
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/WelcomeBlockController.php 2 patches
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -28,30 +28,30 @@  discard block
 block discarded – undo
28 28
 class WelcomeBlockController extends MvcController
29 29
 {   
30 30
     
31
-    /**
32
-     * Pages
33
-     */
31
+	/**
32
+	 * Pages
33
+	 */
34 34
         
35
-    /**
36
-     * WelcomeBlock@index
37
-     * 
38
-     * @param PageController $parent_controller
39
-     * @param Tree $tree
40
-     * @param string $block_id
41
-     * @param string $template
42
-     * @return $string
43
-     */
44
-    public function index(PageController $parent_controller, Tree $tree, $block_id, $template) {        
45
-        $view_bag = new ViewBag();
35
+	/**
36
+	 * WelcomeBlock@index
37
+	 * 
38
+	 * @param PageController $parent_controller
39
+	 * @param Tree $tree
40
+	 * @param string $block_id
41
+	 * @param string $template
42
+	 * @return $string
43
+	 */
44
+	public function index(PageController $parent_controller, Tree $tree, $block_id, $template) {        
45
+		$view_bag = new ViewBag();
46 46
         
47
-        if($parent_controller && $tree) {
47
+		if($parent_controller && $tree) {
48 48
         
49
-            $view_bag->set('tree', $tree);
50
-            $view_bag->set('indi', $parent_controller->getSignificantIndividual());
49
+			$view_bag->set('tree', $tree);
50
+			$view_bag->set('indi', $parent_controller->getSignificantIndividual());
51 51
         
52
-            $id = $this->module->getName().$block_id;
53
-            $class = $this->module->getName().'_block';
54
-            $parent_controller->addInlineJavascript('
52
+			$id = $this->module->getName().$block_id;
53
+			$class = $this->module->getName().'_block';
54
+			$parent_controller->addInlineJavascript('
55 55
                 jQuery("#maj-new_passwd").hide();
56 56
                 jQuery("#maj-passwd_click").click(function()
57 57
                 {
@@ -62,62 +62,62 @@  discard block
 block discarded – undo
62 62
     				  });
63 63
     			');
64 64
     
65
-            if (Auth::isAdmin()) {
66
-                $title='<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
67
-            } else {
68
-                $title='';
69
-            }
70
-            $title .='<span dir="auto">'.$tree->getTitleHtml().'</span>';
65
+			if (Auth::isAdmin()) {
66
+				$title='<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
67
+			} else {
68
+				$title='';
69
+			}
70
+			$title .='<span dir="auto">'.$tree->getTitleHtml().'</span>';
71 71
     
72
-            $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false);
73
-            $view_bag->set('piwik_enabled', $piwik_enabled);
74
-            if($piwik_enabled) {
75
-                $parent_controller->addInlineJavascript(
76
-                    '$("#piwik_stats")
72
+			$piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false);
73
+			$view_bag->set('piwik_enabled', $piwik_enabled);
74
+			if($piwik_enabled) {
75
+				$parent_controller->addInlineJavascript(
76
+					'$("#piwik_stats")
77 77
                         .load("module.php?mod='.$this->module->getName().'&mod_action=Piwik&block_id='.$block_id.'");'
78
-                );
79
-            }
78
+				);
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
-            if ($template) {
84
-                return Theme::theme()->formatBlock($id, $title, $class, $content);
85
-            } else {
86
-                return $content;
87
-            }
88
-        }
89
-    }
83
+			if ($template) {
84
+				return Theme::theme()->formatBlock($id, $title, $class, $content);
85
+			} else {
86
+				return $content;
87
+			}
88
+		}
89
+	}
90 90
     
91 91
     
92 92
     
93
-    /**
94
-     * WelcomeBlock@config
95
-     * 
96
-     * @param string $block_id
97
-     */
98
-    public function config($block_id) {
93
+	/**
94
+	 * WelcomeBlock@config
95
+	 * 
96
+	 * @param string $block_id
97
+	 */
98
+	public function config($block_id) {
99 99
 
100
-        if (Filter::postBool('save') && Filter::checkCsrf()) {
101
-            $this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled'));
102
-            $this->module->setBlockSetting($block_id, 'piwik_url', trim(Filter::postUrl('piwik_url')));
103
-            $this->module->setBlockSetting($block_id, 'piwik_siteid', trim(Filter::post('piwik_siteid')));
104
-            $this->module->setBlockSetting($block_id, 'piwik_token', trim(Filter::post('piwik_token')));
105
-            exit;
106
-        }
100
+		if (Filter::postBool('save') && Filter::checkCsrf()) {
101
+			$this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled'));
102
+			$this->module->setBlockSetting($block_id, 'piwik_url', trim(Filter::postUrl('piwik_url')));
103
+			$this->module->setBlockSetting($block_id, 'piwik_siteid', trim(Filter::post('piwik_siteid')));
104
+			$this->module->setBlockSetting($block_id, 'piwik_token', trim(Filter::post('piwik_token')));
105
+			exit;
106
+		}
107 107
         
108
-        $view_bag = new ViewBag();
108
+		$view_bag = new ViewBag();
109 109
         
110
-        // Is Piwik Statistic Enabled ?
111
-        $view_bag->set('piwik_enabled', $this->module->getBlockSetting($block_id, 'piwik_enabled', '0'));
112
-        //Piwik Root Url
113
-        $view_bag->set('piwik_url', $this->module->getBlockSetting($block_id, 'piwik_url', ''));
114
-        // Piwik token
115
-        $view_bag->set('piwik_token', $this->module->getBlockSetting($block_id, 'piwik_token', ''));
116
-        // Piwik side id
117
-        $view_bag->set('piwik_siteid', $this->module->getBlockSetting($block_id, 'piwik_siteid', ''));
110
+		// Is Piwik Statistic Enabled ?
111
+		$view_bag->set('piwik_enabled', $this->module->getBlockSetting($block_id, 'piwik_enabled', '0'));
112
+		//Piwik Root Url
113
+		$view_bag->set('piwik_url', $this->module->getBlockSetting($block_id, 'piwik_url', ''));
114
+		// Piwik token
115
+		$view_bag->set('piwik_token', $this->module->getBlockSetting($block_id, 'piwik_token', ''));
116
+		// Piwik side id
117
+		$view_bag->set('piwik_siteid', $this->module->getBlockSetting($block_id, 'piwik_siteid', ''));
118 118
         
119
-        ViewFactory::make('WelcomeBlockConfig', $this, new BaseController(), $view_bag)->renderPartial();
120
-    }
119
+		ViewFactory::make('WelcomeBlockConfig', $this, new BaseController(), $view_bag)->renderPartial();
120
+	}
121 121
     
122 122
     
123 123
     
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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.'&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
66
+                $title = '<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&amp;ged='.$tree->getNameHtml().'&amp;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);
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersionModule.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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() . '&amp;mod_action=AdminConfig';
67
+        return 'module.php?mod='.$this->getName().'&amp;mod_action=AdminConfig';
68 68
     }
69 69
     
70 70
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
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;
Please login to merge, or discard this patch.
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -24,82 +24,82 @@
 block discarded – undo
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() . '&amp;mod_action=AdminConfig';
71
-    }
70
+		return 'module.php?mod=' . $this->getName() . '&amp;mod_action=AdminConfig';
71
+	}
72 72
     
73
-    /**
74
-     * {@inhericDoc}
75
-     * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites()
76
-     */
77
-    public function validatePrerequisites() {
78
-        return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME));
79
-    }
73
+	/**
74
+	 * {@inhericDoc}
75
+	 * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites()
76
+	 */
77
+	public function validatePrerequisites() {
78
+		return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME));
79
+	}
80 80
     
81 81
 	/**
82 82
 	 * Get the GeoAnalysis Provider (initialise it if not done yet).
83 83
 	 *
84 84
 	 * @return \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider
85 85
 	 */
86
-    public function getProvider() {
87
-        global $WT_TREE;
86
+	public function getProvider() {
87
+		global $WT_TREE;
88 88
         
89
-        if(!$this->provider) {
90
-            $this->provider = new GeoAnalysisProvider($WT_TREE);
91
-        }
92
-        return $this->provider;
93
-    }
89
+		if(!$this->provider) {
90
+			$this->provider = new GeoAnalysisProvider($WT_TREE);
91
+		}
92
+		return $this->provider;
93
+	}
94 94
 	
95 95
 	/**
96 96
 	 * Set the GeoAnalysis Provider.
97 97
 	 *
98 98
 	 * @return \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider
99 99
 	 */
100
-    public function setProvider(GeoAnalysisProvider $provider) {
101
-        $this->provider = $provider;
102
-    }
100
+	public function setProvider(GeoAnalysisProvider $provider) {
101
+		$this->provider = $provider;
102
+	}
103 103
     
104 104
 
105 105
 }
Please login to merge, or discard this patch.