summaryrefslogtreecommitdiff
path: root/modules_v3
diff options
context:
space:
mode:
authorScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>2015-01-18 20:44:15 +0000
committerScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>2015-01-18 20:44:15 +0000
commit75af2bf88db1e26000b59b3b0c3a5da9f0dee1b9 (patch)
tree1867492f5eae6d96126e99935e55a79889e8a09c /modules_v3
parentdca625e27aa77b66cae2528860f361d4e2d78732 (diff)
downloadwebtrees-75af2bf88db1e26000b59b3b0c3a5da9f0dee1b9.tar.gz
webtrees-75af2bf88db1e26000b59b3b0c3a5da9f0dee1b9.tar.bz2
webtrees-75af2bf88db1e26000b59b3b0c3a5da9f0dee1b9.zip
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
Diffstat (limited to 'modules_v3')
-rw-r--r--modules_v3/GEDFact_assistant/CENS_ctrl.php12
-rw-r--r--modules_v3/GEDFact_assistant/MEDIA_ctrl.php8
-rw-r--r--modules_v3/ahnentafel_report/module.php10
-rw-r--r--modules_v3/batch_update/module.php10
-rw-r--r--modules_v3/batch_update/plugins/death_y.php4
-rw-r--r--modules_v3/batch_update/plugins/search_replace.php32
-rw-r--r--modules_v3/bdm_report/module.php10
-rw-r--r--modules_v3/birth_report/module.php10
-rw-r--r--modules_v3/cemetery_report/module.php10
-rw-r--r--modules_v3/change_report/module.php10
-rw-r--r--modules_v3/charts/help_text.php6
-rw-r--r--modules_v3/ckeditor/module.php2
-rw-r--r--modules_v3/clippings/help_text.php10
-rw-r--r--modules_v3/death_report/module.php10
-rw-r--r--modules_v3/descendancy_report/module.php10
-rw-r--r--modules_v3/fact_sources/module.php10
-rw-r--r--modules_v3/family_group_report/module.php10
-rw-r--r--modules_v3/family_nav/module.php11
-rw-r--r--modules_v3/faq/module.php22
-rw-r--r--modules_v3/gedcom_block/module.php16
-rw-r--r--modules_v3/gedcom_favorites/db_schema/db_schema_0_1.php22
-rw-r--r--modules_v3/gedcom_favorites/db_schema/db_schema_1_2.php26
-rw-r--r--modules_v3/gedcom_favorites/db_schema/db_schema_2_3.php8
-rw-r--r--modules_v3/gedcom_news/db_schema/db_schema_0_1.php16
-rw-r--r--modules_v3/gedcom_news/db_schema/db_schema_1_2.php24
-rw-r--r--modules_v3/gedcom_news/db_schema/db_schema_2_3.php8
-rw-r--r--modules_v3/gedcom_news/module.php6
27 files changed, 166 insertions, 167 deletions
diff --git a/modules_v3/GEDFact_assistant/CENS_ctrl.php b/modules_v3/GEDFact_assistant/CENS_ctrl.php
index 0f9475eb26..44569fa6dc 100644
--- a/modules_v3/GEDFact_assistant/CENS_ctrl.php
+++ b/modules_v3/GEDFact_assistant/CENS_ctrl.php
@@ -65,18 +65,18 @@ global $tabno, $linkToID, $SEARCH_SPIDER;
global $SHOW_AGE_DIFF, $GEDCOM;
global $show_full, $famid;
-$summary=$person->format_first_major_fact(WT_EVENTS_BIRT, 2);
+$summary = $person->format_first_major_fact(WT_EVENTS_BIRT, 2);
if (!($person->isDead())) {
// If alive display age
- $bdate=$person->getBirthDate();
+ $bdate = $person->getBirthDate();
$age = WT_Date::GetAgeGedcom($bdate);
- if ($age!="") {
- $summary.= "<span class=\"label\">".WT_I18N::translate('Age').":</span><span class=\"field\"> ".get_age_at_event($age, true)."</span>";
+ if ($age != "") {
+ $summary .= "<span class=\"label\">" . WT_I18N::translate('Age') . ":</span><span class=\"field\"> " . get_age_at_event($age, true) . "</span>";
}
}
-$summary.=$person->format_first_major_fact(WT_EVENTS_DEAT, 2);
+$summary .= $person->format_first_major_fact(WT_EVENTS_DEAT, 2);
-require WT_ROOT.WT_MODULES_DIR.'GEDFact_assistant/_CENS/census_1_ctrl.php';
+require WT_ROOT . WT_MODULES_DIR . 'GEDFact_assistant/_CENS/census_1_ctrl.php';
?>
</form>
diff --git a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php
index 15348a1fe1..56ca50ccd5 100644
--- a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php
+++ b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php
@@ -25,7 +25,7 @@
$controller = new WT_Controller_Individual;
-echo '<link href="'.WT_STATIC_URL.WT_MODULES_DIR.'GEDFact_assistant/css/gf_styles.css" rel="stylesheet" type="text/css" media="screen">';
+echo '<link href="' . WT_STATIC_URL . WT_MODULES_DIR . 'GEDFact_assistant/css/gf_styles.css" rel="stylesheet" type="text/css" media="screen">';
global $tabno, $linkToID, $SEARCH_SPIDER;
global $SHOW_AGE_DIFF;
@@ -33,8 +33,8 @@ global $GEDCOM;
global $show_full;
global $famid, $censyear, $censdate;
-$summary=
- $controller->record->format_first_major_fact(WT_EVENTS_BIRT, 2).
+$summary =
+ $controller->record->format_first_major_fact(WT_EVENTS_BIRT, 2) .
$controller->record->format_first_major_fact(WT_EVENTS_DEAT, 2);
-require WT_ROOT.WT_MODULES_DIR.'GEDFact_assistant/_MEDIA/media_1_ctrl.php';
+require WT_ROOT . WT_MODULES_DIR . 'GEDFact_assistant/_MEDIA/media_1_ctrl.php';
diff --git a/modules_v3/ahnentafel_report/module.php b/modules_v3/ahnentafel_report/module.php
index cb207720e3..01caeca753 100644
--- a/modules_v3/ahnentafel_report/module.php
+++ b/modules_v3/ahnentafel_report/module.php
@@ -44,13 +44,13 @@ class ahnentafel_report_WT_Module extends WT_Module implements WT_Module_Report
public function getReportMenus() {
global $controller;
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml&amp;pid='.$controller->getSignificantIndividual()->getXref(),
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/batch_update/module.php b/modules_v3/batch_update/module.php
index c7bd27426d..b2715ae39e 100644
--- a/modules_v3/batch_update/module.php
+++ b/modules_v3/batch_update/module.php
@@ -21,7 +21,7 @@ use WT\Auth;
/**
* Class batch_update_WT_Module
*/
-class batch_update_WT_Module extends WT_Module implements WT_Module_Config{
+class batch_update_WT_Module extends WT_Module implements WT_Module_Config {
/** {@inheritdoc} */
public function getTitle() {
return /* I18N: Name of a module */ WT_I18N::translate('Batch update');
@@ -34,7 +34,7 @@ class batch_update_WT_Module extends WT_Module implements WT_Module_Config{
/** {@inheritdoc} */
public function modAction($mod_action) {
- switch($mod_action) {
+ switch ($mod_action) {
case 'admin_batch_update':
$controller = new WT_Controller_Page;
$controller
@@ -43,8 +43,8 @@ class batch_update_WT_Module extends WT_Module implements WT_Module_Config{
->pageHeader();
// TODO: these files should be methods in this class
- require WT_ROOT.WT_MODULES_DIR.$this->getName().'/'.$mod_action.'.php';
- $mod=new batch_update;
+ require WT_ROOT . WT_MODULES_DIR . $this->getName() . '/' . $mod_action . '.php';
+ $mod = new batch_update;
echo $mod->main();
break;
default:
@@ -54,6 +54,6 @@ class batch_update_WT_Module extends WT_Module implements WT_Module_Config{
/** {@inheritdoc} */
public function getConfigLink() {
- return 'module.php?mod='.$this->getName().'&amp;mod_action=admin_batch_update';
+ return 'module.php?mod=' . $this->getName() . '&amp;mod_action=admin_batch_update';
}
}
diff --git a/modules_v3/batch_update/plugins/death_y.php b/modules_v3/batch_update/plugins/death_y.php
index 5d7fd2716e..a961075939 100644
--- a/modules_v3/batch_update/plugins/death_y.php
+++ b/modules_v3/batch_update/plugins/death_y.php
@@ -47,7 +47,7 @@ class death_y_bu_plugin extends base_plugin {
* @return boolean
*/
public function doesRecordNeedUpdate($xref, $gedrec) {
- return !preg_match('/\n1 ('.WT_EVENTS_DEAT.')/', $gedrec) && WT_Individual::getInstance($xref)->isDead();
+ return !preg_match('/\n1 (' . WT_EVENTS_DEAT . ')/', $gedrec) && WT_Individual::getInstance($xref)->isDead();
}
/**
@@ -59,6 +59,6 @@ class death_y_bu_plugin extends base_plugin {
* @return string
*/
public function updateRecord($xref, $gedrec) {
- return $gedrec."\n1 DEAT Y";
+ return $gedrec . "\n1 DEAT Y";
}
}
diff --git a/modules_v3/batch_update/plugins/search_replace.php b/modules_v3/batch_update/plugins/search_replace.php
index 7f47a24c6a..d02296682f 100644
--- a/modules_v3/batch_update/plugins/search_replace.php
+++ b/modules_v3/batch_update/plugins/search_replace.php
@@ -20,12 +20,12 @@
* Class search_replace_bu_plugin Batch Update plugin: search/replace
*/
class search_replace_bu_plugin extends base_plugin {
- var $search =null; // Search string
- var $replace=null; // Replace string
- var $method =null; // simple/wildcards/regex
- var $regex =null; // Search string, converted to a regex
- var $case =null; // "i" for case insensitive, "" for case sensitive
- var $error =null; // Message for bad user parameters
+ var $search = null; // Search string
+ var $replace = null; // Replace string
+ var $method = null; // simple/wildcards/regex
+ var $regex = null; // Search string, converted to a regex
+ var $case = null; // "i" for case insensitive, "" for case sensitive
+ var $error = null; // Message for bad user parameters
/**
* User-friendly name for this plugin.
@@ -63,7 +63,7 @@ class search_replace_bu_plugin extends base_plugin {
* @return boolean
*/
public function doesRecordNeedUpdate($xref, $gedrec) {
- return !$this->error && preg_match('/(?:'.$this->regex.')/mu'.$this->case, $gedrec);
+ return !$this->error && preg_match('/(?:' . $this->regex . ')/mu' . $this->case, $gedrec);
}
/**
@@ -77,7 +77,7 @@ class search_replace_bu_plugin extends base_plugin {
public function updateRecord($xref, $gedrec) {
// Allow "\n" to indicate a line-feed in replacement text.
// Back-references such as $1, $2 are handled automatically.
- return preg_replace('/'.$this->regex.'/mu'.$this->case, str_replace('\n', "\n", $this->replace), $gedrec);
+ return preg_replace('/' . $this->regex . '/mu' . $this->case, str_replace('\n', "\n", $this->replace), $gedrec);
}
/**
@@ -90,24 +90,24 @@ class search_replace_bu_plugin extends base_plugin {
$this->method = WT_Filter::get('method', 'exact|words|wildcards|regex', 'exact');
$this->case = WT_Filter::get('case', 'i');
- $this->error='';
+ $this->error = '';
switch ($this->method) {
case 'exact':
- $this->regex=preg_quote($this->search, '/');
+ $this->regex = preg_quote($this->search, '/');
break;
case 'words':
- $this->regex='\b'.preg_quote($this->search, '/').'\b';
+ $this->regex = '\b' . preg_quote($this->search, '/') . '\b';
break;
case 'wildcards':
- $this->regex='\b'.str_replace(array('\*', '\?'), array('.*', '.'), preg_quote($this->search, '/')).'\b';
+ $this->regex = '\b' . str_replace(array('\*', '\?'), array('.*', '.'), preg_quote($this->search, '/')) . '\b';
break;
case 'regex':
- $this->regex=$this->search;
+ $this->regex = $this->search;
// Check for invalid regular expressions.
// A valid regex on a null string returns zero.
// An invalid regex on a null string returns false (and throws a warning).
- if (@preg_match('/'.$this->search.'/', null) === false) {
- $this->error='<br><span class="error">'.WT_I18N::translate('The regex appears to contain an error. It can’t be used.').'</span>';
+ if (@preg_match('/' . $this->search . '/', null) === false) {
+ $this->error = '<br><span class="error">' . WT_I18N::translate('The regex appears to contain an error. It can’t be used.') . '</span>';
}
break;
}
@@ -119,7 +119,7 @@ class search_replace_bu_plugin extends base_plugin {
* @return string
*/
public function getOptionsForm() {
- $descriptions=array(
+ $descriptions = array(
'exact' => WT_I18N::translate('Match the exact text, even if it occurs in the middle of a word.'),
'words' => WT_I18N::translate('Match the exact text, unless it occurs in the middle of a word.'),
'wildcards' => WT_I18N::translate('Use a “?” to match a single character, use “*” to match zero or more characters.'),
diff --git a/modules_v3/bdm_report/module.php b/modules_v3/bdm_report/module.php
index 54b465fed7..128cf06ea5 100644
--- a/modules_v3/bdm_report/module.php
+++ b/modules_v3/bdm_report/module.php
@@ -42,13 +42,13 @@ class bdm_report_WT_Module extends WT_Module implements WT_Module_Report {
/** {@inheritdoc} */
public function getReportMenus() {
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml',
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/birth_report/module.php b/modules_v3/birth_report/module.php
index b8694ae301..9b6912a503 100644
--- a/modules_v3/birth_report/module.php
+++ b/modules_v3/birth_report/module.php
@@ -42,13 +42,13 @@ class birth_report_WT_Module extends WT_Module implements WT_Module_Report {
/** {@inheritdoc} */
public function getReportMenus() {
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml',
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/cemetery_report/module.php b/modules_v3/cemetery_report/module.php
index dc0aefbc32..fab4576e5e 100644
--- a/modules_v3/cemetery_report/module.php
+++ b/modules_v3/cemetery_report/module.php
@@ -42,13 +42,13 @@ class cemetery_report_WT_Module extends WT_Module implements WT_Module_Report {
/** {@inheritdoc} */
public function getReportMenus() {
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml',
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/change_report/module.php b/modules_v3/change_report/module.php
index 81c4201225..eee0c40d8b 100644
--- a/modules_v3/change_report/module.php
+++ b/modules_v3/change_report/module.php
@@ -42,13 +42,13 @@ class change_report_WT_Module extends WT_Module implements WT_Module_Report {
/** {@inheritdoc} */
public function getReportMenus() {
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml',
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/charts/help_text.php b/modules_v3/charts/help_text.php
index 412f1fc2fd..ae9b6a03d8 100644
--- a/modules_v3/charts/help_text.php
+++ b/modules_v3/charts/help_text.php
@@ -21,14 +21,14 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES') || !defined('WT_SCRIPT_NAME') || WT_SCRIPT_NAME!='help_text.php') {
+if (!defined('WT_WEBTREES') || !defined('WT_SCRIPT_NAME') || WT_SCRIPT_NAME != 'help_text.php') {
header('HTTP/1.0 403 Forbidden');
exit;
}
switch ($help) {
case 'index_charts':
- $title=WT_I18N::translate('Charts');
- $text=WT_I18N::translate('This block allows a pedigree, descendancy, or hourglass chart to appear on your “My page” or the “Home page”. Because of space limitations, the charts should be placed only on the left side of the page.<br><br>When this block appears on the “Home page”, the root individual and the type of chart to be displayed are determined by the administrator. When this block appears on the user’s “My page”, these options are determined by the user.<br><br>The behavior of these charts is identical to their behavior when they are called up from the menus. Click on the box of an individual to see more details about them.');
+ $title = WT_I18N::translate('Charts');
+ $text = WT_I18N::translate('This block allows a pedigree, descendancy, or hourglass chart to appear on your “My page” or the “Home page”. Because of space limitations, the charts should be placed only on the left side of the page.<br><br>When this block appears on the “Home page”, the root individual and the type of chart to be displayed are determined by the administrator. When this block appears on the user’s “My page”, these options are determined by the user.<br><br>The behavior of these charts is identical to their behavior when they are called up from the menus. Click on the box of an individual to see more details about them.');
break;
}
diff --git a/modules_v3/ckeditor/module.php b/modules_v3/ckeditor/module.php
index 11570f37c1..9b3ee497fd 100644
--- a/modules_v3/ckeditor/module.php
+++ b/modules_v3/ckeditor/module.php
@@ -56,7 +56,7 @@ class ckeditor_WT_Module extends WT_Module {
)
// Activate the editor
->addInlineJavascript('jQuery(".html-edit").ckeditor(function(){}, {
- language: "' . str_replace('_','-',strtolower(WT_LOCALE)) . '"
+ language: "' . str_replace('_', '-', strtolower(WT_LOCALE)) . '"
});');
}
}
diff --git a/modules_v3/clippings/help_text.php b/modules_v3/clippings/help_text.php
index fa0f20ca47..dd07257290 100644
--- a/modules_v3/clippings/help_text.php
+++ b/modules_v3/clippings/help_text.php
@@ -21,19 +21,19 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES') || !defined('WT_SCRIPT_NAME') || WT_SCRIPT_NAME!='help_text.php') {
+if (!defined('WT_WEBTREES') || !defined('WT_SCRIPT_NAME') || WT_SCRIPT_NAME != 'help_text.php') {
header('HTTP/1.0 403 Forbidden');
exit;
}
switch ($help) {
case 'add_by_id':
- $title=WT_I18N::translate('Add by ID');
- $text=WT_I18N::translate('This input box lets you enter an individual’s ID number so he can be added to the clippings cart. Once added you’ll be offered options to link that individual’s relations to your clippings cart.<br><br>If you do not know an individual’s ID number, you can perform a search by name by pressing the individual icon next to the “Add” button.');
+ $title = WT_I18N::translate('Add by ID');
+ $text = WT_I18N::translate('This input box lets you enter an individual’s ID number so he can be added to the clippings cart. Once added you’ll be offered options to link that individual’s relations to your clippings cart.<br><br>If you do not know an individual’s ID number, you can perform a search by name by pressing the individual icon next to the “Add” button.');
break;
case 'empty_cart':
- $title=WT_I18N::translate('Empty the clippings cart');
- $text=WT_I18N::translate('When you click this link your clippings cart will be totally emptied.<br><br>If you don’t want to remove all individuals, families, etc. from the clippings cart, you can remove items individually by clicking the <b>Remove</b> link in the name boxes. There is <u>no</u> confirmation dialog when you click either of these links; the requested deletion takes place immediately.');
+ $title = WT_I18N::translate('Empty the clippings cart');
+ $text = WT_I18N::translate('When you click this link your clippings cart will be totally emptied.<br><br>If you don’t want to remove all individuals, families, etc. from the clippings cart, you can remove items individually by clicking the <b>Remove</b> link in the name boxes. There is <u>no</u> confirmation dialog when you click either of these links; the requested deletion takes place immediately.');
break;
}
diff --git a/modules_v3/death_report/module.php b/modules_v3/death_report/module.php
index d33554f85b..360b29d10b 100644
--- a/modules_v3/death_report/module.php
+++ b/modules_v3/death_report/module.php
@@ -44,13 +44,13 @@ class death_report_WT_Module extends WT_Module implements WT_Module_Report {
/** {@inheritdoc} */
public function getReportMenus() {
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml',
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/descendancy_report/module.php b/modules_v3/descendancy_report/module.php
index f68720f97d..19a3cfe4bb 100644
--- a/modules_v3/descendancy_report/module.php
+++ b/modules_v3/descendancy_report/module.php
@@ -44,13 +44,13 @@ class descendancy_report_WT_Module extends WT_Module implements WT_Module_Report
public function getReportMenus() {
global $controller;
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml&amp;pid='.$controller->getSignificantIndividual()->getXref(),
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/fact_sources/module.php b/modules_v3/fact_sources/module.php
index 0102ed802a..fa5bd08361 100644
--- a/modules_v3/fact_sources/module.php
+++ b/modules_v3/fact_sources/module.php
@@ -42,13 +42,13 @@ class fact_sources_WT_Module extends WT_Module implements WT_Module_Report {
/** {@inheritdoc} */
public function getReportMenus() {
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml',
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/family_group_report/module.php b/modules_v3/family_group_report/module.php
index 54f6efc41e..e4ebba8bb6 100644
--- a/modules_v3/family_group_report/module.php
+++ b/modules_v3/family_group_report/module.php
@@ -44,13 +44,13 @@ class family_group_report_WT_Module extends WT_Module implements WT_Module_Repor
public function getReportMenus() {
global $controller;
- $menus=array();
- $menu=new WT_Menu(
+ $menus = array();
+ $menu = new WT_Menu(
$this->getTitle(),
- 'reportengine.php?ged='.WT_GEDURL.'&amp;action=setup&amp;report='.WT_MODULES_DIR.$this->getName().'/report.xml&amp;famid='.$controller->getSignificantFamily()->getXref(),
- 'menu-report-'.$this->getName()
+ 'reportengine.php?ged=' . WT_GEDURL . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;famid=' . $controller->getSignificantFamily()->getXref(),
+ 'menu-report-' . $this->getName()
);
- $menus[]=$menu;
+ $menus[] = $menu;
return $menus;
}
diff --git a/modules_v3/family_nav/module.php b/modules_v3/family_nav/module.php
index 1a25477986..992cc7c87e 100644
--- a/modules_v3/family_nav/module.php
+++ b/modules_v3/family_nav/module.php
@@ -128,7 +128,7 @@ class family_nav_WT_Module extends WT_Module implements WT_Module_Sidebar {
<?php
$access_level = $SHOW_PRIVATE_RELATIONSHIPS ? WT_PRIV_HIDE : WT_USER_ACCESS_LEVEL;
$facts = array_merge($family->getFacts('HUSB', false, $access_level), $family->getFacts('WIFE', false, $access_level));
- foreach($facts as $fact) {
+ foreach ($facts as $fact) {
$spouse = $fact->getTarget();
if ($this->isPerson($spouse)) {
$menu = new WT_Menu(get_close_relationship_name($controller->record, $spouse));
@@ -183,7 +183,7 @@ class family_nav_WT_Module extends WT_Module implements WT_Module_Sidebar {
*
* @return string
*/
- private function getHTML($person, $showUnknown=false) {
+ private function getHTML($person, $showUnknown = false) {
if ($this->isPerson($person)) {
return sprintf(self::LNK, $person->getHtmlUrl(), $person->getFullName());
} elseif ($showUnknown) {
@@ -221,15 +221,14 @@ class family_nav_WT_Module extends WT_Module implements WT_Module_Sidebar {
$stepParents .= $this->getHTML($family->getWife());
}
}
- if($stepParents) {
+ if ($stepParents) {
$relationship = $this->isPerson($father) ?
- WT_I18N::translate_c("father’s wife", "step-mother") :
- WT_I18N::translate_c("mother’s husband", "step-father");
+ WT_I18N::translate_c("father’s wife", "step-mother") : WT_I18N::translate_c("mother’s husband", "step-father");
$html .= sprintf(self::TTL, $relationship) . $stepParents;
}
}
}
- if(!($this->isPerson($father) || $this->isPerson($mother))) {
+ if (!($this->isPerson($father) || $this->isPerson($mother))) {
$html .= sprintf(self::MSG, WT_I18N::translate_c('unknown family', 'unknown'));
}
return $html;
diff --git a/modules_v3/faq/module.php b/modules_v3/faq/module.php
index 712673d95e..b111994df5 100644
--- a/modules_v3/faq/module.php
+++ b/modules_v3/faq/module.php
@@ -193,11 +193,11 @@ class faq_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module_Confi
)->execute(array($block_id))->fetchOne();
$swap_block = WT_DB::prepare(
- "SELECT block_order, block_id".
- " FROM `##block`".
- " WHERE block_order=(".
- " SELECT MAX(block_order) FROM `##block` WHERE block_order < ? AND module_name=?".
- " ) AND module_name=?".
+ "SELECT block_order, block_id" .
+ " FROM `##block`" .
+ " WHERE block_order=(" .
+ " SELECT MAX(block_order) FROM `##block` WHERE block_order < ? AND module_name=?" .
+ " ) AND module_name=?" .
" LIMIT 1"
)->execute(array($block_order, $this->getName(), $this->getName()))->fetchOneRow();
if ($swap_block) {
@@ -221,11 +221,11 @@ class faq_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module_Confi
)->execute(array($block_id))->fetchOne();
$swap_block = WT_DB::prepare(
- "SELECT block_order, block_id".
- " FROM `##block`".
- " WHERE block_order=(".
- " SELECT MIN(block_order) FROM `##block` WHERE block_order>? AND module_name=?".
- " ) AND module_name=?".
+ "SELECT block_order, block_id" .
+ " FROM `##block`" .
+ " WHERE block_order=(" .
+ " SELECT MIN(block_order) FROM `##block` WHERE block_order>? AND module_name=?" .
+ " ) AND module_name=?" .
" LIMIT 1"
)->execute(array($block_order, $this->getName(), $this->getName()))->fetchOneRow();
if ($swap_block) {
@@ -330,7 +330,7 @@ class faq_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module_Confi
)->execute(array($this->getName()))->fetchOne();
echo
- '<p><form method="get" action="', WT_SCRIPT_NAME ,'">',
+ '<p><form method="get" action="', WT_SCRIPT_NAME, '">',
WT_I18N::translate('Family tree'), ' ',
'<input type="hidden" name="mod", value="', $this->getName(), '">',
'<input type="hidden" name="mod_action", value="admin_config">',
diff --git a/modules_v3/gedcom_block/module.php b/modules_v3/gedcom_block/module.php
index 77f2fe9b31..d498877f98 100644
--- a/modules_v3/gedcom_block/module.php
+++ b/modules_v3/gedcom_block/module.php
@@ -37,18 +37,18 @@ class gedcom_block_WT_Module extends WT_Module implements WT_Module_Block {
}
/** {@inheritdoc} */
- public function getBlock($block_id, $template=true, $cfg=null) {
+ public function getBlock($block_id, $template = true, $cfg = null) {
global $controller;
- $indi_xref=$controller->getSignificantIndividual()->getXref();
- $id=$this->getName().$block_id;
- $class=$this->getName().'_block';
- $title='<span dir="auto">'.WT_TREE_TITLE.'</span>';
+ $indi_xref = $controller->getSignificantIndividual()->getXref();
+ $id = $this->getName() . $block_id;
+ $class = $this->getName() . '_block';
+ $title = '<span dir="auto">' . WT_TREE_TITLE . '</span>';
$content = '<table><tr>';
- $content .= '<td><a href="pedigree.php?rootid='.$indi_xref.'&amp;ged='.WT_GEDURL.'"><i class="icon-pedigree"></i><br>'.WT_I18N::translate('Default chart').'</a></td>';
- $content .= '<td><a href="individual.php?pid='.$indi_xref.'&amp;ged='.WT_GEDURL.'"><i class="icon-indis"></i><br>'.WT_I18N::translate('Default individual').'</a></td>';
+ $content .= '<td><a href="pedigree.php?rootid=' . $indi_xref . '&amp;ged=' . WT_GEDURL . '"><i class="icon-pedigree"></i><br>' . WT_I18N::translate('Default chart') . '</a></td>';
+ $content .= '<td><a href="individual.php?pid=' . $indi_xref . '&amp;ged=' . WT_GEDURL . '"><i class="icon-indis"></i><br>' . WT_I18N::translate('Default individual') . '</a></td>';
if (WT_Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) {
- $content .= '<td><a href="'.WT_LOGIN_URL.'?action=register"><i class="icon-user_add"></i><br>'.WT_I18N::translate('Request new user account').'</a></td>';
+ $content .= '<td><a href="' . WT_LOGIN_URL . '?action=register"><i class="icon-user_add"></i><br>' . WT_I18N::translate('Request new user account') . '</a></td>';
}
$content .= "</tr>";
$content .= "</table>";
diff --git a/modules_v3/gedcom_favorites/db_schema/db_schema_0_1.php b/modules_v3/gedcom_favorites/db_schema/db_schema_0_1.php
index 82dacab5f7..067ed16519 100644
--- a/modules_v3/gedcom_favorites/db_schema/db_schema_0_1.php
+++ b/modules_v3/gedcom_favorites/db_schema/db_schema_0_1.php
@@ -32,17 +32,17 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
WT_DB::exec(
- "CREATE TABLE IF NOT EXISTS `##favorites` (".
- " fv_id INTEGER AUTO_INCREMENT NOT NULL,".
- " fv_username VARCHAR(32) NOT NULL,".
- " fv_gid VARCHAR(20) NULL,".
- " fv_type VARCHAR(15) NULL,".
- " fv_file VARCHAR(100) NULL,".
- " fv_url VARCHAR(255) NULL,".
- " fv_title VARCHAR(255) NULL,".
- " fv_note TEXT NULL,".
- " PRIMARY KEY (fv_id),".
- " KEY ix1 (fv_username)".
+ "CREATE TABLE IF NOT EXISTS `##favorites` (" .
+ " fv_id INTEGER AUTO_INCREMENT NOT NULL," .
+ " fv_username VARCHAR(32) NOT NULL," .
+ " fv_gid VARCHAR(20) NULL," .
+ " fv_type VARCHAR(15) NULL," .
+ " fv_file VARCHAR(100) NULL," .
+ " fv_url VARCHAR(255) NULL," .
+ " fv_title VARCHAR(255) NULL," .
+ " fv_note TEXT NULL," .
+ " PRIMARY KEY (fv_id)," .
+ " KEY ix1 (fv_username)" .
") COLLATE utf8_unicode_ci ENGINE=InnoDB"
);
diff --git a/modules_v3/gedcom_favorites/db_schema/db_schema_1_2.php b/modules_v3/gedcom_favorites/db_schema/db_schema_1_2.php
index 5706534f21..7cb8f54c7f 100644
--- a/modules_v3/gedcom_favorites/db_schema/db_schema_1_2.php
+++ b/modules_v3/gedcom_favorites/db_schema/db_schema_1_2.php
@@ -28,16 +28,16 @@
// Add the new columns
try {
WT_DB::exec(
- "ALTER TABLE `##favorites`".
- " CHANGE fv_id favorite_id INTEGER AUTO_INCREMENT NOT NULL,".
- " CHANGE fv_gid xref VARCHAR(20) NULL,".
- " CHANGE fv_type favorite_type ENUM('INDI', 'FAM', 'SOUR', 'REPO', 'OBJE', 'NOTE', 'URL') NOT NULL,".
- " CHANGE fv_url url VARCHAR(255) NULL,".
- " CHANGE fv_title title VARCHAR(255) NULL,".
- " CHANGE fv_note note VARCHAR(1000) NULL,".
- " ADD user_id INTEGER NULL AFTER favorite_id,".
- " ADD gedcom_id INTEGER NOT NULL AFTER user_id,".
- " DROP KEY ix1,".
+ "ALTER TABLE `##favorites`" .
+ " CHANGE fv_id favorite_id INTEGER AUTO_INCREMENT NOT NULL," .
+ " CHANGE fv_gid xref VARCHAR(20) NULL," .
+ " CHANGE fv_type favorite_type ENUM('INDI', 'FAM', 'SOUR', 'REPO', 'OBJE', 'NOTE', 'URL') NOT NULL," .
+ " CHANGE fv_url url VARCHAR(255) NULL," .
+ " CHANGE fv_title title VARCHAR(255) NULL," .
+ " CHANGE fv_note note VARCHAR(1000) NULL," .
+ " ADD user_id INTEGER NULL AFTER favorite_id," .
+ " ADD gedcom_id INTEGER NOT NULL AFTER user_id," .
+ " DROP KEY ix1," .
" ADD KEY news_ix1 (gedcom_id, user_id)"
);
} catch (PDOException $ex) {
@@ -47,9 +47,9 @@ try {
// Migrate data from the old columns to the new ones
try {
WT_DB::exec(
- "UPDATE `##favorites` f".
- " LEFT JOIN `##gedcom` g ON (f.fv_file =g.gedcom_name)".
- " LEFT JOIN `##user` u ON (f.fv_username=u.user_name)".
+ "UPDATE `##favorites` f" .
+ " LEFT JOIN `##gedcom` g ON (f.fv_file =g.gedcom_name)" .
+ " LEFT JOIN `##user` u ON (f.fv_username=u.user_name)" .
" SET f.gedcom_id=g.gedcom_id, f.user_id=u.user_id"
);
} catch (PDOException $ex) {
diff --git a/modules_v3/gedcom_favorites/db_schema/db_schema_2_3.php b/modules_v3/gedcom_favorites/db_schema/db_schema_2_3.php
index a86d1f4447..3ecfe21b95 100644
--- a/modules_v3/gedcom_favorites/db_schema/db_schema_2_3.php
+++ b/modules_v3/gedcom_favorites/db_schema/db_schema_2_3.php
@@ -28,16 +28,16 @@
// Delete any data that might violate the new constraints
WT_DB::exec(
- "DELETE FROM `##favorite`".
- " WHERE user_id NOT IN (SELECT user_id FROM `##user` )".
+ "DELETE FROM `##favorite`" .
+ " WHERE user_id NOT IN (SELECT user_id FROM `##user` )" .
" OR gedcom_id NOT IN (SELECT gedcom_id FROM `##gedcom`)"
);
// Add the new constraints
try {
WT_DB::exec(
- "ALTER TABLE `##favorite`".
- " ADD FOREIGN KEY favorite_fk1 (user_id ) REFERENCES `##user` (user_id) ON DELETE CASCADE,".
+ "ALTER TABLE `##favorite`" .
+ " ADD FOREIGN KEY favorite_fk1 (user_id ) REFERENCES `##user` (user_id) ON DELETE CASCADE," .
" ADD FOREIGN KEY favorite_fk2 (gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE"
);
} catch (PDOException $ex) {
diff --git a/modules_v3/gedcom_news/db_schema/db_schema_0_1.php b/modules_v3/gedcom_news/db_schema/db_schema_0_1.php
index 873ce7f8fa..22ad81f088 100644
--- a/modules_v3/gedcom_news/db_schema/db_schema_0_1.php
+++ b/modules_v3/gedcom_news/db_schema/db_schema_0_1.php
@@ -29,14 +29,14 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
WT_DB::exec(
- "CREATE TABLE IF NOT EXISTS `##news` (".
- " n_id INTEGER AUTO_INCREMENT NOT NULL,".
- " n_username VARCHAR(100) NOT NULL,".
- " n_date INTEGER NOT NULL,".
- " n_title VARCHAR(255) NOT NULL,".
- " n_text TEXT NOT NULL,".
- " PRIMARY KEY (n_id),".
- " KEY ix1 (n_username)".
+ "CREATE TABLE IF NOT EXISTS `##news` (" .
+ " n_id INTEGER AUTO_INCREMENT NOT NULL," .
+ " n_username VARCHAR(100) NOT NULL," .
+ " n_date INTEGER NOT NULL," .
+ " n_title VARCHAR(255) NOT NULL," .
+ " n_text TEXT NOT NULL," .
+ " PRIMARY KEY (n_id)," .
+ " KEY ix1 (n_username)" .
") COLLATE utf8_unicode_ci ENGINE=InnoDB"
);
diff --git a/modules_v3/gedcom_news/db_schema/db_schema_1_2.php b/modules_v3/gedcom_news/db_schema/db_schema_1_2.php
index ce0ed30d8b..c90e6d845b 100644
--- a/modules_v3/gedcom_news/db_schema/db_schema_1_2.php
+++ b/modules_v3/gedcom_news/db_schema/db_schema_1_2.php
@@ -28,11 +28,11 @@
// Add new columns
try {
WT_DB::exec(
- "ALTER TABLE `##news`".
- " ADD user_id INTEGER NULL AFTER n_id,".
- " ADD gedcom_id INTEGER NULL AFTER user_id,".
- " ADD updated TIMESTAMP ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP,".
- " ADD KEY news_ix1 (user_id, updated),".
+ "ALTER TABLE `##news`" .
+ " ADD user_id INTEGER NULL AFTER n_id," .
+ " ADD gedcom_id INTEGER NULL AFTER user_id," .
+ " ADD updated TIMESTAMP ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP," .
+ " ADD KEY news_ix1 (user_id, updated)," .
" ADD KEY news_ix2 (gedcom_id, updated)"
);
} catch (PDOException $ex) {
@@ -42,9 +42,9 @@ try {
// Migrate data from the old columns to the new ones
try {
WT_DB::exec(
- "UPDATE `##news` n".
- " LEFT JOIN `##gedcom` g ON (n.n_username=g.gedcom_name)".
- " LEFT JOIN `##user` u ON (n.n_username=u.user_name)".
+ "UPDATE `##news` n" .
+ " LEFT JOIN `##gedcom` g ON (n.n_username=g.gedcom_name)" .
+ " LEFT JOIN `##user` u ON (n.n_username=u.user_name)" .
" SET n.gedcom_id=g.gedcom_id, n.user_id=u.user_id, updated=FROM_UNIXTIME(n_date)"
);
} catch (PDOException $ex) {
@@ -63,10 +63,10 @@ try {
// Delete/rename old columns
try {
WT_DB::exec(
- "ALTER TABLE `##news`".
- " DROP n_username, DROP n_date,".
- " CHANGE n_id news_id INTEGER NOT NULL AUTO_INCREMENT,".
- " CHANGE n_title subject VARCHAR(255) COLLATE utf8_unicode_ci,".
+ "ALTER TABLE `##news`" .
+ " DROP n_username, DROP n_date," .
+ " CHANGE n_id news_id INTEGER NOT NULL AUTO_INCREMENT," .
+ " CHANGE n_title subject VARCHAR(255) COLLATE utf8_unicode_ci," .
" CHANGE n_text body TEXT COLLATE utf8_unicode_ci"
);
} catch (PDOException $ex) {
diff --git a/modules_v3/gedcom_news/db_schema/db_schema_2_3.php b/modules_v3/gedcom_news/db_schema/db_schema_2_3.php
index ac0162503f..8136ba7661 100644
--- a/modules_v3/gedcom_news/db_schema/db_schema_2_3.php
+++ b/modules_v3/gedcom_news/db_schema/db_schema_2_3.php
@@ -28,16 +28,16 @@
// Delete any data that might violate the new constraints
WT_DB::exec(
- "DELETE FROM `##news`".
- " WHERE user_id NOT IN (SELECT user_id FROM `##user` )".
+ "DELETE FROM `##news`" .
+ " WHERE user_id NOT IN (SELECT user_id FROM `##user` )" .
" OR gedcom_id NOT IN (SELECT gedcom_id FROM `##gedcom`)"
);
// Add the new constraints
try {
WT_DB::exec(
- "ALTER TABLE `##news`".
- " ADD FOREIGN KEY news_fk1 (user_id ) REFERENCES `##user` (user_id) ON DELETE CASCADE,".
+ "ALTER TABLE `##news`" .
+ " ADD FOREIGN KEY news_fk1 (user_id ) REFERENCES `##user` (user_id) ON DELETE CASCADE," .
" ADD FOREIGN KEY news_fk2 (gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE"
);
} catch (PDOException $ex) {
diff --git a/modules_v3/gedcom_news/module.php b/modules_v3/gedcom_news/module.php
index a7626a4a88..1d99e9ea8a 100644
--- a/modules_v3/gedcom_news/module.php
+++ b/modules_v3/gedcom_news/module.php
@@ -101,7 +101,7 @@ class gedcom_news_WT_Module extends WT_Module implements WT_Module_Block {
$c++;
}
if ($limit == 'date') {
- if ((int)((WT_TIMESTAMP - $news->updated) / 86400) > $flag) {
+ if ((int) ((WT_TIMESTAMP - $news->updated) / 86400) > $flag) {
break;
}
}
@@ -114,7 +114,7 @@ class gedcom_news_WT_Module extends WT_Module implements WT_Module_Block {
$content .= $news->body;
// Print Admin options for this News item
if (WT_USER_GEDCOM_ADMIN) {
- $content .= '<hr>' . '<a href="#" onclick="window.open(\'editnews.php?news_id=\'+' . $news->news_id . ', \'_blank\', news_window_specs); return false;">' . WT_I18N::translate('Edit') . '</a> | ' . '<a href="index.php?action=deletenews&amp;news_id=' . $news->news_id . '&amp;ctype=' . $ctype .'" onclick="return confirm(\'' . WT_I18N::translate('Are you sure you want to delete this news article?') . "');\">" . WT_I18N::translate('Delete') . '</a><br>';
+ $content .= '<hr>' . '<a href="#" onclick="window.open(\'editnews.php?news_id=\'+' . $news->news_id . ', \'_blank\', news_window_specs); return false;">' . WT_I18N::translate('Edit') . '</a> | ' . '<a href="index.php?action=deletenews&amp;news_id=' . $news->news_id . '&amp;ctype=' . $ctype . '" onclick="return confirm(\'' . WT_I18N::translate('Are you sure you want to delete this news article?') . "');\">" . WT_I18N::translate('Delete') . '</a><br>';
}
$content .= '</div>';
}
@@ -127,7 +127,7 @@ class gedcom_news_WT_Module extends WT_Module implements WT_Module_Block {
if ($printedAddLink) {
$content .= '&nbsp;&nbsp;|&nbsp;&nbsp;';
}
- $content .= '<a href="index.php?gedcom_news_archive=yes&amp;ctype=' . $ctype .'">' . WT_I18N::translate('View archive') . "</a>";
+ $content .= '<a href="index.php?gedcom_news_archive=yes&amp;ctype=' . $ctype . '">' . WT_I18N::translate('View archive') . "</a>";
$content .= help_link('gedcom_news_archive') . '<br>';
}