diff options
| -rw-r--r-- | includes/functions/functions_edit.php | 3 | ||||
| -rw-r--r-- | library/WT/Controller/Pedigree.php | 2 | ||||
| -rw-r--r-- | modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php | 80 | ||||
| -rw-r--r-- | modules_v3/batch_update/admin_batch_update.php | 14 | ||||
| -rw-r--r-- | modules_v3/clippings/clippings_ctrl.php | 35 |
5 files changed, 88 insertions, 46 deletions
diff --git a/includes/functions/functions_edit.php b/includes/functions/functions_edit.php index 04a33ab9d8..70f0a2e727 100644 --- a/includes/functions/functions_edit.php +++ b/includes/functions/functions_edit.php @@ -1797,8 +1797,9 @@ function insert_missing_subtags($level1tag, $add_date = false) { } break; case 'DATE': + // TIME is NOT a valid 5.5.1 tag if (in_array($level1tag, $date_and_time)) - add_simple_tag('3 TIME'); // TIME is NOT a valid 5.5.1 tag + add_simple_tag('3 TIME'); break; case 'HUSB': case 'WIFE': diff --git a/library/WT/Controller/Pedigree.php b/library/WT/Controller/Pedigree.php index 2d5b6b5532..bb472fa15a 100644 --- a/library/WT/Controller/Pedigree.php +++ b/library/WT/Controller/Pedigree.php @@ -78,7 +78,7 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { } elseif ($this->talloffset < 0) { $this->talloffset = 0; } - $show_full = $this->show_full; + $show_full = $this->show_full; $talloffset = $this->talloffset; if ($this->root && $this->root->canShowName()) { diff --git a/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php b/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php index ca56f94806..5f7eea3461 100644 --- a/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php +++ b/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php @@ -31,23 +31,53 @@ if (isset($_REQUEST['EVEN'])) $EVEN = $_REQUEST['EVEN']; if (!empty($EVEN) && count($EVEN) > 0) { $newgedrec .= "1 DATA\n"; $newgedrec .= "2 EVEN " . implode(",", $EVEN) . "\n"; - if (!empty($EVEN_DATE)) $newgedrec .= "3 DATE " . $EVEN_DATE . "\n"; - if (!empty($EVEN_PLAC)) $newgedrec .= "3 PLAC " . $EVEN_PLAC . "\n"; - if (!empty($AGNC)) $newgedrec .= "2 AGNC " . $AGNC . "\n"; + if (!empty($EVEN_DATE)) { + $newgedrec .= "3 DATE " . $EVEN_DATE . "\n"; + } + if (!empty($EVEN_PLAC)) { + $newgedrec .= "3 PLAC " . $EVEN_PLAC . "\n"; + } + if (!empty($AGNC)) { + $newgedrec .= "2 AGNC " . $AGNC . "\n"; + } } -if (isset($_REQUEST['ABBR'])) $ABBR = $_REQUEST['ABBR']; -if (isset($_REQUEST['TITL'])) $TITL = $_REQUEST['TITL']; -if (isset($_REQUEST['DATE'])) $DATE = $_REQUEST['DATE']; -if (isset($_REQUEST['NOTE'])) $NOTE = $_REQUEST['NOTE']; -if (isset($_REQUEST['_HEB'])) $_HEB = $_REQUEST['_HEB']; -if (isset($_REQUEST['ROMN'])) $ROMN = $_REQUEST['ROMN']; -if (isset($_REQUEST['AUTH'])) $AUTH = $_REQUEST['AUTH']; -if (isset($_REQUEST['PUBL'])) $PUBL = $_REQUEST['PUBL']; -if (isset($_REQUEST['REPO'])) $REPO = $_REQUEST['REPO']; -if (isset($_REQUEST['CALN'])) $CALN = $_REQUEST['CALN']; -if (isset($_REQUEST['pid_array'])) $pid_array = $_REQUEST['pid_array']; -if (isset($_REQUEST['pid'])) $pid = $_REQUEST['pid']; +if (isset($_REQUEST['ABBR'])) { + $ABBR = $_REQUEST['ABBR']; +} +if (isset($_REQUEST['TITL'])) { + $TITL = $_REQUEST['TITL']; +} +if (isset($_REQUEST['DATE'])) { + $DATE = $_REQUEST['DATE']; +} +if (isset($_REQUEST['NOTE'])) { + $NOTE = $_REQUEST['NOTE']; +} +if (isset($_REQUEST['_HEB'])) { + $_HEB = $_REQUEST['_HEB']; +} +if (isset($_REQUEST['ROMN'])) { + $ROMN = $_REQUEST['ROMN']; +} +if (isset($_REQUEST['AUTH'])) { + $AUTH = $_REQUEST['AUTH']; +} +if (isset($_REQUEST['PUBL'])) { + $PUBL = $_REQUEST['PUBL']; +} +if (isset($_REQUEST['REPO'])) { + $REPO = $_REQUEST['REPO']; +} +if (isset($_REQUEST['CALN'])) { + $CALN = $_REQUEST['CALN']; +} +if (isset($_REQUEST['pid_array'])) { + $pid_array = $_REQUEST['pid_array']; +} +if (isset($_REQUEST['pid'])) { + $pid = $_REQUEST['pid']; +} global $pid; @@ -64,12 +94,20 @@ if (!empty($NOTE)) { } } -if (!empty($ABBR)) $newgedrec .= "1 ABBR $ABBR\n"; +if (!empty($ABBR)) { + $newgedrec .= "1 ABBR $ABBR\n"; +} if (!empty($TITL)) { - if (!empty($_HEB)) $newgedrec .= "2 _HEB $_HEB\n"; - if (!empty($ROMN)) $newgedrec .= "2 ROMN $ROMN\n"; + if (!empty($_HEB)) { + $newgedrec .= "2 _HEB $_HEB\n"; + } + if (!empty($ROMN)) { + $newgedrec .= "2 ROMN $ROMN\n"; + } +} +if (!empty($AUTH)) { + $newgedrec .= "1 AUTH $AUTH\n"; } -if (!empty($AUTH)) $newgedrec .= "1 AUTH $AUTH\n"; if (!empty($PUBL)) { $newlines = preg_split("/\r?\n/", $PUBL, -1, PREG_SPLIT_NO_EMPTY); foreach ($newlines as $k=>$line) { @@ -81,7 +119,9 @@ if (!empty($PUBL)) { } } if (!empty($NOTE)) { - if (!empty($CALN)) $newgedrec .= "2 CALN $CALN\n"; + if (!empty($CALN)) { + $newgedrec .= "2 CALN $CALN\n"; + } } if ($pid_array != '') { diff --git a/modules_v3/batch_update/admin_batch_update.php b/modules_v3/batch_update/admin_batch_update.php index d6db1e0a43..74ad451b78 100644 --- a/modules_v3/batch_update/admin_batch_update.php +++ b/modules_v3/batch_update/admin_batch_update.php @@ -24,17 +24,17 @@ require_once WT_ROOT . 'includes/functions/functions_edit.php'; * Class batch_update */ class batch_update { - var $plugin = null; // Form parameter: chosen plugin - var $xref = null; // Form parameter: record to update - var $action = null; // Form parameter: how to update record - var $data = null; // Form parameter: additional details for $action - var $plugins = null; // Array of available plugins - var $PLUGIN = null; // An instance of a plugin object + var $plugin = null; // Form parameter: chosen plugin + var $xref = null; // Form parameter: record to update + var $action = null; // Form parameter: how to update record + var $data = null; // Form parameter: additional details for $action + var $plugins = null; // Array of available plugins + var $PLUGIN = null; // An instance of a plugin object var $all_xrefs = null; // An array of all xrefs that might need to be updated var $prev_xref = null; // The previous xref to process var $curr_xref = null; // The xref to process var $next_xref = null; // The next xref to process - var $record = null; // A GedcomRecord object corresponding to $curr_xref + var $record = null; // A GedcomRecord object corresponding to $curr_xref /** * What is the name of this plugin? diff --git a/modules_v3/clippings/clippings_ctrl.php b/modules_v3/clippings/clippings_ctrl.php index ea46ec33b4..3c0316314e 100644 --- a/modules_v3/clippings/clippings_ctrl.php +++ b/modules_v3/clippings/clippings_ctrl.php @@ -99,11 +99,12 @@ class WT_Controller_Clippings { } elseif (empty($this->id)) { $this->action = ''; } - if (!empty($this->id) && $this->type != 'FAM' && $this->type != 'INDI' && $this->type != 'SOUR') - $this->action = 'add1'; + if (!empty($this->id) && $this->type !== 'FAM' && $this->type !== 'INDI' && $this->type !== 'SOUR') { + $this->action = 'add1'; + } } - if ($this->action == 'add1') { + if ($this->action === 'add1') { $obj = WT_GedcomRecord::getInstance($this->id); $this->addClipping($obj); if ($this->type === 'SOUR') { @@ -117,28 +118,28 @@ class WT_Controller_Clippings { } } if ($this->type === 'FAM') { - if ($others == 'parents') { + if ($others === 'parents') { $this->addClipping($obj->getHusband()); $this->addClipping($obj->getWife()); - } elseif ($others == "members") { + } elseif ($others === "members") { $this->addFamilyMembers(WT_Family::getInstance($this->id)); - } elseif ($others == "descendants") { + } elseif ($others === "descendants") { $this->addFamilyDescendancy(WT_Family::getInstance($this->id)); } } elseif ($this->type === 'INDI') { - if ($others == 'parents') { + if ($others === 'parents') { foreach (WT_Individual::getInstance($this->id)->getChildFamilies() as $family) { $this->addFamilyMembers($family); } - } elseif ($others == 'ancestors') { + } elseif ($others === 'ancestors') { $this->addAncestorsToCart(WT_Individual::getInstance($this->id), $this->level1); - } elseif ($others == 'ancestorsfamilies') { + } elseif ($others === 'ancestorsfamilies') { $this->addAncestorsToCartFamilies(WT_Individual::getInstance($this->id), $this->level2); - } elseif ($others == 'members') { + } elseif ($others === 'members') { foreach (WT_Individual::getInstance($this->id)->getSpouseFamilies() as $family) { $this->addFamilyMembers($family); } - } elseif ($others == 'descendants') { + } elseif ($others === 'descendants') { foreach (WT_Individual::getInstance($this->id)->getSpouseFamilies() as $family) { $this->addClipping($family); $this->addFamilyDescendancy($family, $this->level3); @@ -146,11 +147,11 @@ class WT_Controller_Clippings { } uksort($WT_SESSION->cart[WT_GED_ID], array('WT_Controller_Clippings', 'compareClippings')); } - } elseif ($this->action == 'remove') { + } elseif ($this->action === 'remove') { unset ($WT_SESSION->cart[WT_GED_ID][$this->id]); - } elseif ($this->action == 'empty') { + } elseif ($this->action === 'empty') { $WT_SESSION->cart[WT_GED_ID] = array(); - } elseif ($this->action == 'download') { + } elseif ($this->action === 'download') { $media = array(); $mediacount = 0; $filetext = gedcom_header(WT_GEDCOM); @@ -169,7 +170,7 @@ class WT_Controller_Clippings { if ($subm) { $filetext .= $subm . "\n"; } - if ($convert == "yes") { + if ($convert === "yes") { $filetext = str_replace("UTF-8", "ANSI", $filetext); $filetext = utf8_decode($filetext); } @@ -251,7 +252,7 @@ class WT_Controller_Clippings { } } - if ($this->IncludeMedia == "yes") { + if ($this->IncludeMedia === "yes") { $this->media_list = $media; } $filetext .= "0 @WEBTREES@ SOUR\n1 TITL " . WT_SERVER_NAME . WT_SCRIPT_PATH . "\n"; @@ -306,7 +307,7 @@ class WT_Controller_Clippings { function downloadClipping() { Zend_Session::writeClose(); - if ($this->IncludeMedia == 'yes' || $this->Zip == 'yes') { + if ($this->IncludeMedia === 'yes' || $this->Zip === 'yes') { header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="clipping.zip"'); $this->zipCart(); |
