summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2014-09-18 21:01:34 +0100
committerGreg Roach <fisharebest@gmail.com>2014-09-18 21:01:34 +0100
commit9e759ba4540be28f80b3162882e079e0af54059a (patch)
tree5514eeaef3d6d063330839811037fc0714bf0979 /includes
parent595e9d8855b001bb997e2c088e82d1f532c540fa (diff)
downloadwebtrees-9e759ba4540be28f80b3162882e079e0af54059a.tar.gz
webtrees-9e759ba4540be28f80b3162882e079e0af54059a.tar.bz2
webtrees-9e759ba4540be28f80b3162882e079e0af54059a.zip
Remove unused code
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions_edit.php16
-rw-r--r--includes/functions/functions_print_facts.php16
2 files changed, 17 insertions, 15 deletions
diff --git a/includes/functions/functions_edit.php b/includes/functions/functions_edit.php
index c009ce0f90..64884fd03c 100644
--- a/includes/functions/functions_edit.php
+++ b/includes/functions/functions_edit.php
@@ -110,12 +110,16 @@ function select_edit_control_inline($name, $values, $empty, $selected, $controll
}
}
-// Create a set of radio buttons for a form
-// $name - the ID for the form element
-// $values - array of value=>display items
-// $selected - the currently selected item (if any)
-// $extra - extra markup for field (e.g. tab key sequence)
-function radio_buttons($name, $values, $selected, $extra='') {
+/**
+ * Create a set of radio buttons for a form
+ *
+ * @param string $name The ID for the form element
+ * @param string[] $values Array of value=>display items
+ * @param string $selected The currently selected item
+ *
+ * @return string
+ */
+function radio_buttons($name, $values, $selected) {
$html='';
foreach ($values as $key=>$value) {
$uniqueID = Uuid::uuid4();
diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php
index cee7912715..361e861bb1 100644
--- a/includes/functions/functions_print_facts.php
+++ b/includes/functions/functions_print_facts.php
@@ -866,24 +866,22 @@ function print_main_notes(WT_Fact $fact, $level) {
for ($j=0; $j<$ct; $j++) {
// Note object, or inline note?
if (preg_match("/$level NOTE @(.*)@/", $match[$j][0], $nmatch)) {
- $nid = $nmatch[1];
- $note = WT_Note::getInstance($nid);
+ $note = WT_Note::getInstance($nmatch[1]);
if ($note && !$note->canShow()) {
continue;
}
} else {
- $nid = null;
$note = null;
}
- if ($level>=2) echo '<tr class="row_note2">';
- else echo '<tr>';
- echo '<td class="descriptionbox';
- if ($level>=2) echo ' rela';
- echo ' ', $styleadd, ' width20">';
+ if ($level >= 2) {
+ echo '<tr class="row_note2"><td class="descriptionbox rela ', $styleadd, ' width20">';
+ } else {
+ echo '<tr><td class="descriptionbox ', $styleadd, ' width20">';
+ }
if ($can_edit) {
echo '<a onclick="return edit_record(\'', $pid, '\', \'', $fact_id, '\');" href="#" title="', WT_I18N::translate('Edit'), '">';
- if ($level<2) {
+ if ($level < 2) {
if ($SHOW_FACT_ICONS) {
echo '<i class="icon-note"></i> ';
}