@@ -23,17 +23,17 @@ |
||
23 | 23 | |
24 | 24 | Database::exec( |
25 | 25 | "CREATE TABLE IF NOT EXISTS `##maj_hooks` (". |
26 | - " majh_id INTEGER AUTO_INCREMENT NOT NULL,". |
|
27 | - " majh_hook_function VARCHAR(32) NOT NULL,". |
|
26 | + " majh_id INTEGER AUTO_INCREMENT NOT NULL,". |
|
27 | + " majh_hook_function VARCHAR(32) NOT NULL,". |
|
28 | 28 | " majh_hook_context VARCHAR(32) NOT NULL DEFAULT 'all',". |
29 | - " majh_module_name VARCHAR(32) NOT NULL,". |
|
30 | - " majh_module_priority INTEGER NOT NULL DEFAULT 99,". |
|
31 | - " majh_status ENUM('enabled', 'disabled') NOT NULL DEFAULT 'enabled',". |
|
32 | - " PRIMARY KEY (majh_id),". |
|
33 | - " UNIQUE KEY `##maj_hooks_uk` (majh_hook_function, majh_hook_context, majh_module_name),". |
|
34 | - " FOREIGN KEY `##module_name_fk1` (majh_module_name)". |
|
29 | + " majh_module_name VARCHAR(32) NOT NULL,". |
|
30 | + " majh_module_priority INTEGER NOT NULL DEFAULT 99,". |
|
31 | + " majh_status ENUM('enabled', 'disabled') NOT NULL DEFAULT 'enabled',". |
|
32 | + " PRIMARY KEY (majh_id),". |
|
33 | + " UNIQUE KEY `##maj_hooks_uk` (majh_hook_function, majh_hook_context, majh_module_name),". |
|
34 | + " FOREIGN KEY `##module_name_fk1` (majh_module_name)". |
|
35 | 35 | " REFERENCES `##module` (module_name) ON DELETE CASCADE ON UPDATE CASCADE". |
36 | - ") COLLATE utf8_unicode_ci ENGINE=InnoDB" |
|
36 | + ") COLLATE utf8_unicode_ci ENGINE=InnoDB" |
|
37 | 37 | ); |
38 | 38 | } |
39 | 39 | } |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | * {@inhericDoc} |
26 | 26 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
27 | 27 | */ |
28 | - protected function renderContent() { |
|
28 | + protected function renderContent() { |
|
29 | 29 | |
30 | - $table_id = $this->data->get('table_id'); |
|
30 | + $table_id = $this->data->get('table_id'); |
|
31 | 31 | |
32 | - ?> |
|
32 | + ?> |
|
33 | 33 | <ol class="breadcrumb small"> |
34 | 34 | <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li> |
35 | 35 | <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li> |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | </div> |
80 | 80 | |
81 | 81 | <?php |
82 | - } |
|
82 | + } |
|
83 | 83 | |
84 | 84 | } |
85 | 85 | |
86 | 86 | \ No newline at end of file |
@@ -49,62 +49,62 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | - * Protected constructor. |
|
53 | - */ |
|
54 | - protected function __construct() |
|
55 | - { |
|
56 | - $this->modules_list = array(); |
|
57 | - } |
|
52 | + * Protected constructor. |
|
53 | + */ |
|
54 | + protected function __construct() |
|
55 | + { |
|
56 | + $this->modules_list = array(); |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * {@inheritDoc} |
|
61 | - * @see \MyArtJaub\Webtrees\Module\ModuleManagerInterface::isOperational() |
|
62 | - */ |
|
63 | - public function isOperational($moduleName) { |
|
64 | - if(!array_key_exists($moduleName, $this->modules_list)) { |
|
65 | - if($module = fw\Module::getModuleByName($moduleName)) { |
|
66 | - if($module instanceof DependentInterface) { |
|
67 | - if($module->validatePrerequisites()) { |
|
68 | - $this->modules_list[$moduleName] = TRUE; |
|
69 | - return true; |
|
70 | - } else { |
|
71 | - // Do not cache the result, |
|
72 | - // as they could change by the next call to the method |
|
73 | - return false; |
|
74 | - } |
|
75 | - } |
|
76 | - else { |
|
77 | - $this->modules_list[$moduleName] = TRUE; |
|
78 | - return true; |
|
79 | - } |
|
80 | - } |
|
81 | - else { |
|
82 | - $this->modules_list[$moduleName] = FALSE; |
|
83 | - } |
|
84 | - } |
|
85 | - return $this->modules_list[$moduleName]; |
|
59 | + /** |
|
60 | + * {@inheritDoc} |
|
61 | + * @see \MyArtJaub\Webtrees\Module\ModuleManagerInterface::isOperational() |
|
62 | + */ |
|
63 | + public function isOperational($moduleName) { |
|
64 | + if(!array_key_exists($moduleName, $this->modules_list)) { |
|
65 | + if($module = fw\Module::getModuleByName($moduleName)) { |
|
66 | + if($module instanceof DependentInterface) { |
|
67 | + if($module->validatePrerequisites()) { |
|
68 | + $this->modules_list[$moduleName] = TRUE; |
|
69 | + return true; |
|
70 | + } else { |
|
71 | + // Do not cache the result, |
|
72 | + // as they could change by the next call to the method |
|
73 | + return false; |
|
74 | + } |
|
75 | + } |
|
76 | + else { |
|
77 | + $this->modules_list[$moduleName] = TRUE; |
|
78 | + return true; |
|
79 | + } |
|
80 | + } |
|
81 | + else { |
|
82 | + $this->modules_list[$moduleName] = FALSE; |
|
83 | + } |
|
84 | + } |
|
85 | + return $this->modules_list[$moduleName]; |
|
86 | 86 | |
87 | - } |
|
87 | + } |
|
88 | 88 | |
89 | 89 | |
90 | - /** |
|
91 | - * Private clone method to prevent cloning of the instance of the |
|
92 | - * *ModuleManager* instance. |
|
93 | - * |
|
94 | - * @return void |
|
95 | - */ |
|
96 | - private function __clone() |
|
97 | - { |
|
98 | - } |
|
90 | + /** |
|
91 | + * Private clone method to prevent cloning of the instance of the |
|
92 | + * *ModuleManager* instance. |
|
93 | + * |
|
94 | + * @return void |
|
95 | + */ |
|
96 | + private function __clone() |
|
97 | + { |
|
98 | + } |
|
99 | 99 | |
100 | - /** |
|
101 | - * Private unserialize method to prevent unserializing of the *ModuleManager* |
|
102 | - * instance. |
|
103 | - * |
|
104 | - * @return void |
|
105 | - */ |
|
106 | - private function __wakeup() |
|
107 | - { |
|
108 | - } |
|
100 | + /** |
|
101 | + * Private unserialize method to prevent unserializing of the *ModuleManager* |
|
102 | + * instance. |
|
103 | + * |
|
104 | + * @return void |
|
105 | + */ |
|
106 | + private function __wakeup() |
|
107 | + { |
|
108 | + } |
|
109 | 109 | |
110 | 110 | } |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | * {@inhericDoc} |
29 | 29 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
30 | 30 | */ |
31 | - protected function renderContent() { |
|
31 | + protected function renderContent() { |
|
32 | 32 | |
33 | - if (Module::getModuleByName('ckeditor')) { |
|
34 | - CkeditorModule::enableEditor($this->ctrl); |
|
35 | - } |
|
33 | + if (Module::getModuleByName('ckeditor')) { |
|
34 | + CkeditorModule::enableEditor($this->ctrl); |
|
35 | + } |
|
36 | 36 | |
37 | - /** @var AbstractModule $module */ |
|
38 | - $module = $this->data->get('module'); |
|
39 | - ?> |
|
37 | + /** @var AbstractModule $module */ |
|
38 | + $module = $this->data->get('module'); |
|
39 | + ?> |
|
40 | 40 | <ol class="breadcrumb small"> |
41 | 41 | <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li> |
42 | 42 | <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li> |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | </form> |
188 | 188 | |
189 | 189 | <?php |
190 | - } |
|
190 | + } |
|
191 | 191 | |
192 | 192 | } |
193 | 193 | |
194 | 194 | \ No newline at end of file |
@@ -19,49 +19,49 @@ discard block |
||
19 | 19 | * Width of the map (in pixels). |
20 | 20 | * @var int $width |
21 | 21 | */ |
22 | - public $width; |
|
22 | + public $width; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Height of the map (in pixels). |
26 | 26 | * @var int $height |
27 | 27 | */ |
28 | - public $height; |
|
28 | + public $height; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Background color for the map shapes with values (when no transparency if applied). |
32 | 32 | * @var string $max_color |
33 | 33 | */ |
34 | - public $max_color; |
|
34 | + public $max_color; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Background color for the map shapes when hovered. |
38 | 38 | * @var string $hover_color |
39 | 39 | */ |
40 | - public $hover_color; |
|
40 | + public $hover_color; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Background color for the map. |
44 | 44 | * @var string $background_color |
45 | 45 | */ |
46 | - public $background_color; |
|
46 | + public $background_color; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Border color for the map. |
50 | 50 | * @var string $background_stroke |
51 | 51 | */ |
52 | - public $background_stroke; |
|
52 | + public $background_stroke; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Default color for the shapes (without any value). |
56 | 56 | * @var string $default_color |
57 | 57 | */ |
58 | - public $default_color; |
|
58 | + public $default_color; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Default border color for the shapes. |
62 | 62 | * @var string $default_stroke |
63 | 63 | */ |
64 | - public $default_stroke; |
|
64 | + public $default_stroke; |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Constructor for OutlineMapCanvas. |
@@ -75,25 +75,25 @@ discard block |
||
75 | 75 | * @param string $default_color Default background color for the shapes |
76 | 76 | * @param string $default_stroke Default border color for the shapes |
77 | 77 | */ |
78 | - public function __construct( |
|
79 | - $width, |
|
80 | - $height, |
|
81 | - $max_color, |
|
82 | - $hover_color, |
|
83 | - $background_color, |
|
84 | - $background_stroke, |
|
85 | - $default_color, |
|
86 | - $default_stroke |
|
87 | - ) { |
|
88 | - $this->width = $width; |
|
89 | - $this->height = $height; |
|
90 | - $this->max_color = $max_color; |
|
91 | - $this->hover_color = $hover_color; |
|
92 | - $this->background_color = $background_color; |
|
93 | - $this->background_stroke = $background_stroke; |
|
94 | - $this->default_color = $default_color; |
|
95 | - $this->default_stroke = $default_stroke; |
|
96 | - } |
|
78 | + public function __construct( |
|
79 | + $width, |
|
80 | + $height, |
|
81 | + $max_color, |
|
82 | + $hover_color, |
|
83 | + $background_color, |
|
84 | + $background_stroke, |
|
85 | + $default_color, |
|
86 | + $default_stroke |
|
87 | + ) { |
|
88 | + $this->width = $width; |
|
89 | + $this->height = $height; |
|
90 | + $this->max_color = $max_color; |
|
91 | + $this->hover_color = $hover_color; |
|
92 | + $this->background_color = $background_color; |
|
93 | + $this->background_stroke = $background_stroke; |
|
94 | + $this->default_color = $default_color; |
|
95 | + $this->default_stroke = $default_stroke; |
|
96 | + } |
|
97 | 97 | |
98 | 98 | |
99 | 99 | } |
@@ -24,18 +24,18 @@ |
||
24 | 24 | */ |
25 | 25 | public function upgrade() { |
26 | 26 | Database::exec( |
27 | - 'CREATE TABLE IF NOT EXISTS `##maj_geodispersion` ('. |
|
28 | - ' majgd_id INTEGER AUTO_INCREMENT NOT NULL,'. |
|
29 | - ' majgd_file INTEGER NOT NULL,'. |
|
30 | - ' majgd_descr VARCHAR(70) NOT NULL,'. |
|
31 | - ' majgd_sublevel TINYINT NOT NULL,'. |
|
32 | - ' majgd_map VARCHAR(70) NULL,'. |
|
33 | - ' majgd_toplevel TINYINT NULL,'. |
|
34 | - ' majgd_status ENUM(\'enabled\', \'disabled\') NOT NULL DEFAULT \'enabled\','. |
|
35 | - ' majgd_useflagsgen ENUM(\'yes\', \'no\') NOT NULL DEFAULT \'no\','. |
|
36 | - ' majgd_detailsgen TINYINT NOT NULL DEFAULT 0,'. |
|
37 | - ' PRIMARY KEY (majgd_id)'. |
|
38 | - ') COLLATE utf8_unicode_ci ENGINE=InnoDB' |
|
27 | + 'CREATE TABLE IF NOT EXISTS `##maj_geodispersion` ('. |
|
28 | + ' majgd_id INTEGER AUTO_INCREMENT NOT NULL,'. |
|
29 | + ' majgd_file INTEGER NOT NULL,'. |
|
30 | + ' majgd_descr VARCHAR(70) NOT NULL,'. |
|
31 | + ' majgd_sublevel TINYINT NOT NULL,'. |
|
32 | + ' majgd_map VARCHAR(70) NULL,'. |
|
33 | + ' majgd_toplevel TINYINT NULL,'. |
|
34 | + ' majgd_status ENUM(\'enabled\', \'disabled\') NOT NULL DEFAULT \'enabled\','. |
|
35 | + ' majgd_useflagsgen ENUM(\'yes\', \'no\') NOT NULL DEFAULT \'no\','. |
|
36 | + ' majgd_detailsgen TINYINT NOT NULL DEFAULT 0,'. |
|
37 | + ' PRIMARY KEY (majgd_id)'. |
|
38 | + ') COLLATE utf8_unicode_ci ENGINE=InnoDB' |
|
39 | 39 | ); |
40 | 40 | } |
41 | 41 | } |
@@ -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 | - ?> |
|
27 | + protected function renderContent() { |
|
28 | + ?> |
|
29 | 29 | <div id="maj-geodisp-list-page" class="center"> |
30 | 30 | <h2><?php echo $this->data->get('title'); ?></h2> |
31 | 31 | |
32 | 32 | <?php |
33 | 33 | if($this->data->get('has_analysis', false)) { |
34 | - /** @var GeoAnalysis $ga */ |
|
35 | - $ga = $this->data->get('geoanalysis'); |
|
36 | - ?> |
|
34 | + /** @var GeoAnalysis $ga */ |
|
35 | + $ga = $this->data->get('geoanalysis'); |
|
36 | + ?> |
|
37 | 37 | |
38 | 38 | <div id="geodispersion-panel"> |
39 | 39 | <h3><?php echo $ga->getTitle() ?></h3> |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | </div> |
67 | 67 | |
68 | 68 | <?php |
69 | - } |
|
69 | + } |
|
70 | 70 | |
71 | 71 | } |
72 | 72 | |
73 | 73 | \ No newline at end of file |
@@ -23,15 +23,15 @@ discard block |
||
23 | 23 | * {@inhericDoc} |
24 | 24 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
25 | 25 | */ |
26 | - protected function renderContent() { |
|
27 | - ?> |
|
26 | + protected function renderContent() { |
|
27 | + ?> |
|
28 | 28 | <div id="maj-geodisp-list-page" class="center"> |
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | 31 | <?php |
32 | 32 | if($this->data->get('has_list', false)) { |
33 | - $galist = $this->data->get('geoanalysislist'); |
|
34 | - ?> |
|
33 | + $galist = $this->data->get('geoanalysislist'); |
|
34 | + ?> |
|
35 | 35 | |
36 | 36 | <p class="center"><?php echo I18N::translate('Choose a geographical dispersion analysis:'); ?><p> |
37 | 37 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | </div> |
59 | 59 | |
60 | 60 | <?php |
61 | - } |
|
61 | + } |
|
62 | 62 | |
63 | 63 | } |
64 | 64 | |
65 | 65 | \ No newline at end of file |
@@ -25,27 +25,27 @@ discard block |
||
25 | 25 | * {@inhericDoc} |
26 | 26 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
27 | 27 | */ |
28 | - protected function renderContent() { |
|
29 | - $nb_found = $this->data->get('stats_gen_nb_found'); |
|
30 | - $nb_other = $this->data->get('stats_gen_nb_other'); |
|
31 | - $nb_unknown = $this->data->get('stats_gen_nb_unknown'); |
|
32 | - $perc_known = Functions::safeDivision($nb_found - $nb_other, $nb_found + $nb_unknown); |
|
28 | + protected function renderContent() { |
|
29 | + $nb_found = $this->data->get('stats_gen_nb_found'); |
|
30 | + $nb_other = $this->data->get('stats_gen_nb_other'); |
|
31 | + $nb_unknown = $this->data->get('stats_gen_nb_unknown'); |
|
32 | + $perc_known = Functions::safeDivision($nb_found - $nb_other, $nb_found + $nb_unknown); |
|
33 | 33 | |
34 | - $html = '<div id="geodispersion_summary"> |
|
34 | + $html = '<div id="geodispersion_summary"> |
|
35 | 35 | <div class="maj-table center"> |
36 | 36 | <div class="maj-row"> |
37 | 37 | <div class="label">' . I18N::translate('Places found'). '</div> |
38 | 38 | <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_found - $nb_other, I18N::percentage($perc_known)). '</div> |
39 | 39 | </div>'; |
40 | - if($nb_other > 0){ |
|
41 | - $perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown); |
|
42 | - $html .= |
|
43 | - '<div class="maj-row"> |
|
40 | + if($nb_other > 0){ |
|
41 | + $perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown); |
|
42 | + $html .= |
|
43 | + '<div class="maj-row"> |
|
44 | 44 | <div class="label">' . I18N::translate('Other places'). '</div> |
45 | 45 | <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_other, I18N::percentage($perc_other)). '</div> |
46 | 46 | </div>'; |
47 | - } |
|
48 | - $html .= '<div class="maj-row"> |
|
47 | + } |
|
48 | + $html .= '<div class="maj-row"> |
|
49 | 49 | <div class="label">' . I18N::translate('Places not found'). '</div> |
50 | 50 | <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_unknown, I18N::percentage(1 - $perc_known)). '</div> |
51 | 51 | </div> |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | ' . $this->htmlAnalysisData(). ' |
57 | 57 | </div>'; |
58 | 58 | |
59 | - return $html; |
|
60 | - } |
|
59 | + return $html; |
|
60 | + } |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Returns HTML code to display the analysis data, under the appropriate format. |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @return string HTML Code for analysis display |
66 | 66 | * @abstract |
67 | 67 | */ |
68 | - protected abstract function htmlAnalysisData(); |
|
68 | + protected abstract function htmlAnalysisData(); |
|
69 | 69 | |
70 | 70 | } |
71 | 71 | |
72 | 72 | \ No newline at end of file |