Completed
Push — 1.7 ( d3e363...adf9f9 )
by Greg
08:36
created
message.php 1 patch
Indentation   +229 added lines, -229 removed lines patch added patch discarded remove patch
@@ -36,56 +36,56 @@  discard block
 block discarded – undo
36 36
 
37 37
 $controller = new SimpleController;
38 38
 $controller
39
-	->restrictAccess($to_user || Auth::isAdmin() && ($to === 'all' || $to === 'last_6mo' || $to === 'never_logged'))
40
-	->setPageTitle(I18N::translate('webtrees message'));
39
+    ->restrictAccess($to_user || Auth::isAdmin() && ($to === 'all' || $to === 'last_6mo' || $to === 'never_logged'))
40
+    ->setPageTitle(I18N::translate('webtrees message'));
41 41
 
42 42
 $errors = '';
43 43
 
44 44
 // Is this message from a member or a visitor?
45 45
 if (Auth::check()) {
46
-	$from = Auth::user()->getUserName();
46
+    $from = Auth::user()->getUserName();
47 47
 } else {
48
-	// Visitors must provide a valid email address
49
-	if ($from_email && (!preg_match("/(.+)@(.+)/", $from_email, $match) || function_exists('checkdnsrr') && checkdnsrr($match[2]) === false)) {
50
-		$errors .= '<p class="ui-state-error">' . I18N::translate('Please enter a valid email address.') . '</p>';
51
-		$action = 'compose';
52
-	}
48
+    // Visitors must provide a valid email address
49
+    if ($from_email && (!preg_match("/(.+)@(.+)/", $from_email, $match) || function_exists('checkdnsrr') && checkdnsrr($match[2]) === false)) {
50
+        $errors .= '<p class="ui-state-error">' . I18N::translate('Please enter a valid email address.') . '</p>';
51
+        $action = 'compose';
52
+    }
53 53
 
54
-	// Do not allow anonymous visitors to include links to external sites
55
-	if (preg_match('/(?!' . preg_quote(WT_BASE_URL, '/') . ')(((?:ftp|http|https):\/\/)[a-zA-Z0-9.-]+)/', $subject . $body, $match)) {
56
-		$errors .=
57
-			'<p class="ui-state-error">' . I18N::translate('You are not allowed to send messages that contain external links.') . '</p>' .
58
-			'<p class="ui-state-highlight">' . /* I18N: e.g. ‘You should delete the “http://” from “http://www.example.com” and try again.’ */ I18N::translate('You should delete the “%1$s” from “%2$s” and try again.', $match[2], $match[1]) . '</p>' .
59
-			Log::addAuthenticationLog('Possible spam message from "' . $from_name . '"/"' . $from_email . '", subject="' . $subject . '", body="' . $body . '"');
60
-		$action = 'compose';
61
-	}
62
-	$from = $from_email;
54
+    // Do not allow anonymous visitors to include links to external sites
55
+    if (preg_match('/(?!' . preg_quote(WT_BASE_URL, '/') . ')(((?:ftp|http|https):\/\/)[a-zA-Z0-9.-]+)/', $subject . $body, $match)) {
56
+        $errors .=
57
+            '<p class="ui-state-error">' . I18N::translate('You are not allowed to send messages that contain external links.') . '</p>' .
58
+            '<p class="ui-state-highlight">' . /* I18N: e.g. ‘You should delete the “http://” from “http://www.example.com” and try again.’ */ I18N::translate('You should delete the “%1$s” from “%2$s” and try again.', $match[2], $match[1]) . '</p>' .
59
+            Log::addAuthenticationLog('Possible spam message from "' . $from_name . '"/"' . $from_email . '", subject="' . $subject . '", body="' . $body . '"');
60
+        $action = 'compose';
61
+    }
62
+    $from = $from_email;
63 63
 }
64 64
 
65 65
 // Ensure the user always visits this page twice - once to compose it and again to send it.
66 66
 // This makes it harder for spammers.
67 67
 switch ($action) {
68 68
 case 'compose':
69
-	Session::put('good_to_send', true);
70
-	break;
69
+    Session::put('good_to_send', true);
70
+    break;
71 71
 case 'send':
72
-	// Only send messages if we've come straight from the compose page.
73
-	if (!Session::get('good_to_send')) {
74
-		Log::addAuthenticationLog('Attempt to send a message without visiting the compose page. Spam attack?');
75
-		$action = 'compose';
76
-	}
77
-	if (!Filter::checkCsrf()) {
78
-		$action = 'compose';
79
-	}
80
-	Session::forget('good_to_send');
81
-	break;
72
+    // Only send messages if we've come straight from the compose page.
73
+    if (!Session::get('good_to_send')) {
74
+        Log::addAuthenticationLog('Attempt to send a message without visiting the compose page. Spam attack?');
75
+        $action = 'compose';
76
+    }
77
+    if (!Filter::checkCsrf()) {
78
+        $action = 'compose';
79
+    }
80
+    Session::forget('good_to_send');
81
+    break;
82 82
 }
83 83
 
84 84
 switch ($action) {
85 85
 case 'compose':
86
-	$controller
87
-		->pageHeader()
88
-		->addInlineJavascript('
86
+    $controller
87
+        ->pageHeader()
88
+        ->addInlineJavascript('
89 89
 		function checkForm(frm) {
90 90
 			if (frm.subject.value === "") {
91 91
 				alert("' . I18N::translate('Please enter a message subject.') . '");
@@ -100,105 +100,105 @@  discard block
 block discarded – undo
100 100
 			return true;
101 101
 		}
102 102
 	');
103
-	echo '<span class="subheaders">', I18N::translate('Send a message'), '</span>';
104
-	echo $errors;
103
+    echo '<span class="subheaders">', I18N::translate('Send a message'), '</span>';
104
+    echo $errors;
105 105
 
106
-	if (!Auth::check()) {
107
-		echo '<br><br>', I18N::translate('<b>Please note:</b> Private information of living individuals will only be given to family relatives and close friends. You will be asked to verify your relationship before you will receive any private data. Sometimes information of dead individuals may also be private. If this is the case, it is because there is not enough information known about the individual to determine whether they are alive or not and we probably do not have more information on this individual.<br><br>Before asking a question, please verify that you are inquiring about the correct individual by checking dates, places, and close relatives. If you are submitting changes to the genealogy data, please include the sources where you obtained the data.');
108
-	}
109
-	echo '<br><form name="messageform" method="post" action="message.php" onsubmit="t = new Date(); document.messageform.time.value=t.toUTCString(); return checkForm(this);">';
110
-	echo Filter::getCsrf();
111
-	echo '<table>';
112
-	if ($to !== 'all' && $to !== 'last_6mo' && $to !== 'never_logged') {
113
-		echo '<tr><td></td><td>', I18N::translate('This message will be sent to %s', '<b>' . $to_user->getRealNameHtml() . '</b>'), '</td></tr>';
114
-	}
115
-	if (!Auth::check()) {
116
-		echo '<tr style="vertical-align:top;"><td width="15%">', I18N::translate('Your name'), '</td>';
117
-		echo '<td><input type="text" name="from_name" size="40" value="', Filter::escapeHtml($from_name), '"></td></tr><tr style="vertical-align:top;"><td>', I18N::translate('Email address'), '</td><td><input type="email" name="from_email" size="40" value="', Filter::escapeHtml($from_email), '"><br>', I18N::translate('Please provide your email address so that we may contact you in response to this message. If you do not provide your email address we will not be able to respond to your inquiry. Your email address will not be used in any other way besides responding to this inquiry.'), '<br><br></td></tr>';
118
-	}
119
-	echo '<tr style="vertical-align:top;"><td>', I18N::translate('Subject'), '</td>';
120
-	echo '<td>';
121
-	echo '<input type="hidden" name="action" value="send">';
122
-	echo '<input type="hidden" name="to" value="', Filter::escapeHtml($to), '">';
123
-	echo '<input type="hidden" name="time" value="">';
124
-	echo '<input type="hidden" name="method" value="', $method, '">';
125
-	echo '<input type="hidden" name="url" value="', Filter::escapeHtml($url), '">';
126
-	echo '<input type="text" name="subject" size="50" value="', Filter::escapeHtml($subject), '"><br></td></tr>';
127
-	echo '<tr style="vertical-align:top;"><td>', I18N::translate('Body'), '<br></td><td><textarea name="body" cols="50" rows="7">', Filter::escapeHtml($body), '</textarea><br></td></tr>';
128
-	echo '<tr><td></td><td><input type="submit" value="', I18N::translate('Send'), '"></td></tr>';
129
-	echo '</table>';
130
-	echo '</form>';
131
-	if ($method === 'messaging2') {
132
-		echo I18N::translate('When you send this message you will receive a copy sent via email to the address you provided.');
133
-	}
134
-	echo
135
-		'<br><br><br><br>',
136
-		'<p id="save-cancel">',
137
-		'<input type="button" class="cancel" value="', I18N::translate('close'), '" onclick="window.close();">',
138
-		'</p>';
139
-	break;
106
+    if (!Auth::check()) {
107
+        echo '<br><br>', I18N::translate('<b>Please note:</b> Private information of living individuals will only be given to family relatives and close friends. You will be asked to verify your relationship before you will receive any private data. Sometimes information of dead individuals may also be private. If this is the case, it is because there is not enough information known about the individual to determine whether they are alive or not and we probably do not have more information on this individual.<br><br>Before asking a question, please verify that you are inquiring about the correct individual by checking dates, places, and close relatives. If you are submitting changes to the genealogy data, please include the sources where you obtained the data.');
108
+    }
109
+    echo '<br><form name="messageform" method="post" action="message.php" onsubmit="t = new Date(); document.messageform.time.value=t.toUTCString(); return checkForm(this);">';
110
+    echo Filter::getCsrf();
111
+    echo '<table>';
112
+    if ($to !== 'all' && $to !== 'last_6mo' && $to !== 'never_logged') {
113
+        echo '<tr><td></td><td>', I18N::translate('This message will be sent to %s', '<b>' . $to_user->getRealNameHtml() . '</b>'), '</td></tr>';
114
+    }
115
+    if (!Auth::check()) {
116
+        echo '<tr style="vertical-align:top;"><td width="15%">', I18N::translate('Your name'), '</td>';
117
+        echo '<td><input type="text" name="from_name" size="40" value="', Filter::escapeHtml($from_name), '"></td></tr><tr style="vertical-align:top;"><td>', I18N::translate('Email address'), '</td><td><input type="email" name="from_email" size="40" value="', Filter::escapeHtml($from_email), '"><br>', I18N::translate('Please provide your email address so that we may contact you in response to this message. If you do not provide your email address we will not be able to respond to your inquiry. Your email address will not be used in any other way besides responding to this inquiry.'), '<br><br></td></tr>';
118
+    }
119
+    echo '<tr style="vertical-align:top;"><td>', I18N::translate('Subject'), '</td>';
120
+    echo '<td>';
121
+    echo '<input type="hidden" name="action" value="send">';
122
+    echo '<input type="hidden" name="to" value="', Filter::escapeHtml($to), '">';
123
+    echo '<input type="hidden" name="time" value="">';
124
+    echo '<input type="hidden" name="method" value="', $method, '">';
125
+    echo '<input type="hidden" name="url" value="', Filter::escapeHtml($url), '">';
126
+    echo '<input type="text" name="subject" size="50" value="', Filter::escapeHtml($subject), '"><br></td></tr>';
127
+    echo '<tr style="vertical-align:top;"><td>', I18N::translate('Body'), '<br></td><td><textarea name="body" cols="50" rows="7">', Filter::escapeHtml($body), '</textarea><br></td></tr>';
128
+    echo '<tr><td></td><td><input type="submit" value="', I18N::translate('Send'), '"></td></tr>';
129
+    echo '</table>';
130
+    echo '</form>';
131
+    if ($method === 'messaging2') {
132
+        echo I18N::translate('When you send this message you will receive a copy sent via email to the address you provided.');
133
+    }
134
+    echo
135
+        '<br><br><br><br>',
136
+        '<p id="save-cancel">',
137
+        '<input type="button" class="cancel" value="', I18N::translate('close'), '" onclick="window.close();">',
138
+        '</p>';
139
+    break;
140 140
 
141 141
 case 'send':
142
-	if ($from_email) {
143
-		$from = $from_email;
144
-	}
142
+    if ($from_email) {
143
+        $from = $from_email;
144
+    }
145 145
 
146
-	$toarray = array($to);
147
-	if ($to === 'all') {
148
-		$toarray = array();
149
-		foreach (User::all() as $user) {
150
-			$toarray[$user->getUserId()] = $user->getUserName();
151
-		}
152
-	}
153
-	if ($to === 'never_logged') {
154
-		$toarray = array();
155
-		foreach (User::all() as $user) {
156
-			if ($user->getPreference('verified_by_admin') && $user->getPreference('reg_timestamp') > $user->getPreference('sessiontime')) {
157
-				$toarray[$user->getUserId()] = $user->getUserName();
158
-			}
159
-		}
160
-	}
161
-	if ($to === 'last_6mo') {
162
-		$toarray = array();
163
-		$sixmos  = 60 * 60 * 24 * 30 * 6; //-- timestamp for six months
164
-		foreach (User::all() as $user) {
165
-			if ($user->getPreference('sessiontime') > 0 && (WT_TIMESTAMP - $user->getPreference('sessiontime') > $sixmos)) {
166
-				$toarray[$user->getUserId()] = $user->getUserName();
167
-			} elseif (!$user->getPreference('verified_by_admin') && (WT_TIMESTAMP - $user->getPreference('reg_timestamp') > $sixmos)) {
168
-				//-- not verified by registration past 6 months
169
-				$toarray[$user->getUserId()] = $user->getUserName();
170
-			}
171
-		}
172
-	}
173
-	$i = 0;
174
-	foreach ($toarray as $indexval => $to) {
175
-		$message         = array();
176
-		$message['to']   = $to;
177
-		$message['from'] = $from;
178
-		if (!empty($from_name)) {
179
-			$message['from_name']  = $from_name;
180
-			$message['from_email'] = $from_email;
181
-		}
182
-		$message['subject'] = $subject;
183
-		$message['body']    = nl2br($body, false);
184
-		$message['created'] = WT_TIMESTAMP;
185
-		$message['method']  = $method;
186
-		$message['url']     = $url;
187
-		if ($i > 0) {
188
-			$message['no_from'] = true;
189
-		}
190
-		if (addMessage($message)) {
191
-			FlashMessages::addMessage(I18N::translate('The message was successfully sent to %s.', Filter::escapeHtml($to)));
192
-		} else {
193
-			FlashMessages::addMessage(I18N::translate('The message was not sent.'));
194
-			Log::addErrorLog('Unable to send a message. FROM:' . $from . ' TO:' . $to . ' (failed to send)');
195
-		}
196
-		$i++;
197
-	}
198
-	$controller
199
-		->pageHeader()
200
-		->addInlineJavascript('window.opener.location.reload(); window.close();');
201
-	break;
146
+    $toarray = array($to);
147
+    if ($to === 'all') {
148
+        $toarray = array();
149
+        foreach (User::all() as $user) {
150
+            $toarray[$user->getUserId()] = $user->getUserName();
151
+        }
152
+    }
153
+    if ($to === 'never_logged') {
154
+        $toarray = array();
155
+        foreach (User::all() as $user) {
156
+            if ($user->getPreference('verified_by_admin') && $user->getPreference('reg_timestamp') > $user->getPreference('sessiontime')) {
157
+                $toarray[$user->getUserId()] = $user->getUserName();
158
+            }
159
+        }
160
+    }
161
+    if ($to === 'last_6mo') {
162
+        $toarray = array();
163
+        $sixmos  = 60 * 60 * 24 * 30 * 6; //-- timestamp for six months
164
+        foreach (User::all() as $user) {
165
+            if ($user->getPreference('sessiontime') > 0 && (WT_TIMESTAMP - $user->getPreference('sessiontime') > $sixmos)) {
166
+                $toarray[$user->getUserId()] = $user->getUserName();
167
+            } elseif (!$user->getPreference('verified_by_admin') && (WT_TIMESTAMP - $user->getPreference('reg_timestamp') > $sixmos)) {
168
+                //-- not verified by registration past 6 months
169
+                $toarray[$user->getUserId()] = $user->getUserName();
170
+            }
171
+        }
172
+    }
173
+    $i = 0;
174
+    foreach ($toarray as $indexval => $to) {
175
+        $message         = array();
176
+        $message['to']   = $to;
177
+        $message['from'] = $from;
178
+        if (!empty($from_name)) {
179
+            $message['from_name']  = $from_name;
180
+            $message['from_email'] = $from_email;
181
+        }
182
+        $message['subject'] = $subject;
183
+        $message['body']    = nl2br($body, false);
184
+        $message['created'] = WT_TIMESTAMP;
185
+        $message['method']  = $method;
186
+        $message['url']     = $url;
187
+        if ($i > 0) {
188
+            $message['no_from'] = true;
189
+        }
190
+        if (addMessage($message)) {
191
+            FlashMessages::addMessage(I18N::translate('The message was successfully sent to %s.', Filter::escapeHtml($to)));
192
+        } else {
193
+            FlashMessages::addMessage(I18N::translate('The message was not sent.'));
194
+            Log::addErrorLog('Unable to send a message. FROM:' . $from . ' TO:' . $to . ' (failed to send)');
195
+        }
196
+        $i++;
197
+    }
198
+    $controller
199
+        ->pageHeader()
200
+        ->addInlineJavascript('window.opener.location.reload(); window.close();');
201
+    break;
202 202
 }
203 203
 
204 204
 /**
@@ -209,120 +209,120 @@  discard block
 block discarded – undo
209 209
  * @return bool
210 210
  */
211 211
 function addMessage($message) {
212
-	global $WT_TREE;
212
+    global $WT_TREE;
213 213
 
214
-	$success = true;
214
+    $success = true;
215 215
 
216
-	$sender    = User::findByIdentifier($message['from']);
217
-	$recipient = User::findByIdentifier($message['to']);
216
+    $sender    = User::findByIdentifier($message['from']);
217
+    $recipient = User::findByIdentifier($message['to']);
218 218
 
219
-	// Sender may not be a webtrees user
220
-	if ($sender) {
221
-		$sender_email     = $sender->getEmail();
222
-		$sender_real_name = $sender->getRealName();
223
-	} else {
224
-		$sender_email     = $message['from'];
225
-		$sender_real_name = $message['from_name'];
226
-	}
219
+    // Sender may not be a webtrees user
220
+    if ($sender) {
221
+        $sender_email     = $sender->getEmail();
222
+        $sender_real_name = $sender->getRealName();
223
+    } else {
224
+        $sender_email     = $message['from'];
225
+        $sender_real_name = $message['from_name'];
226
+    }
227 227
 
228
-	// Send a copy of the copy message back to the sender.
229
-	if ($message['method'] !== 'messaging') {
230
-		// Switch to the sender’s language.
231
-		if ($sender) {
232
-			I18N::init($sender->getPreference('language'));
233
-		}
228
+    // Send a copy of the copy message back to the sender.
229
+    if ($message['method'] !== 'messaging') {
230
+        // Switch to the sender’s language.
231
+        if ($sender) {
232
+            I18N::init($sender->getPreference('language'));
233
+        }
234 234
 
235
-		$copy_email = $message['body'];
236
-		if (!empty($message['url'])) {
237
-			$copy_email .=
238
-				Mail::EOL . Mail::EOL . '--------------------------------------' . Mail::EOL .
239
-				I18N::translate('This message was sent while viewing the following URL: ') . $message['url'] . Mail::EOL;
240
-		}
235
+        $copy_email = $message['body'];
236
+        if (!empty($message['url'])) {
237
+            $copy_email .=
238
+                Mail::EOL . Mail::EOL . '--------------------------------------' . Mail::EOL .
239
+                I18N::translate('This message was sent while viewing the following URL: ') . $message['url'] . Mail::EOL;
240
+        }
241 241
 
242
-		if ($sender) {
243
-			// Message from a signed-in user
244
-			$copy_email = I18N::translate('You sent the following message to a webtrees user:') . ' ' . $recipient->getRealNameHtml() . Mail::EOL . Mail::EOL . $copy_email;
245
-		} else {
246
-			// Message from a visitor
247
-			$copy_email = I18N::translate('You sent the following message to a webtrees administrator:') . Mail::EOL . Mail::EOL . Mail::EOL . $copy_email;
248
-		}
242
+        if ($sender) {
243
+            // Message from a signed-in user
244
+            $copy_email = I18N::translate('You sent the following message to a webtrees user:') . ' ' . $recipient->getRealNameHtml() . Mail::EOL . Mail::EOL . $copy_email;
245
+        } else {
246
+            // Message from a visitor
247
+            $copy_email = I18N::translate('You sent the following message to a webtrees administrator:') . Mail::EOL . Mail::EOL . Mail::EOL . $copy_email;
248
+        }
249 249
 
250
-		$success = $success && Mail::send(
251
-			// “From:” header
252
-				$WT_TREE,
253
-				// “To:” header
254
-				$sender_email,
255
-				$sender_real_name,
256
-				// “Reply-To:” header
257
-				Site::getPreference('SMTP_FROM_NAME'),
258
-				$WT_TREE->getPreference('title'),
259
-				// Message body
260
-				I18N::translate('webtrees message') . ' - ' . $message['subject'],
261
-				$copy_email
262
-			);
263
-	}
250
+        $success = $success && Mail::send(
251
+            // “From:” header
252
+                $WT_TREE,
253
+                // “To:” header
254
+                $sender_email,
255
+                $sender_real_name,
256
+                // “Reply-To:” header
257
+                Site::getPreference('SMTP_FROM_NAME'),
258
+                $WT_TREE->getPreference('title'),
259
+                // Message body
260
+                I18N::translate('webtrees message') . ' - ' . $message['subject'],
261
+                $copy_email
262
+            );
263
+    }
264 264
 
265
-	// Switch to the recipient’s language.
266
-	I18N::init($recipient->getPreference('language'));
267
-	if (isset($message['from_name'])) {
268
-		$message['body'] =
269
-			I18N::translate('Your name') . ' ' . $message['from_name'] . Mail::EOL .
270
-			I18N::translate('Email address') . ' ' . $message['from_email'] . Mail::EOL . Mail::EOL .
271
-			$message['body'];
272
-	}
265
+    // Switch to the recipient’s language.
266
+    I18N::init($recipient->getPreference('language'));
267
+    if (isset($message['from_name'])) {
268
+        $message['body'] =
269
+            I18N::translate('Your name') . ' ' . $message['from_name'] . Mail::EOL .
270
+            I18N::translate('Email address') . ' ' . $message['from_email'] . Mail::EOL . Mail::EOL .
271
+            $message['body'];
272
+    }
273 273
 
274
-	// Add another footer - unless we are an admin
275
-	if (!Auth::isAdmin()) {
276
-		if (!empty($message['url'])) {
277
-			$message['body'] .=
278
-				Mail::EOL . Mail::EOL .
279
-				'--------------------------------------' . Mail::EOL .
280
-				I18N::translate('This message was sent while viewing the following URL: ') . $message['url'] . Mail::EOL;
281
-		}
282
-	}
274
+    // Add another footer - unless we are an admin
275
+    if (!Auth::isAdmin()) {
276
+        if (!empty($message['url'])) {
277
+            $message['body'] .=
278
+                Mail::EOL . Mail::EOL .
279
+                '--------------------------------------' . Mail::EOL .
280
+                I18N::translate('This message was sent while viewing the following URL: ') . $message['url'] . Mail::EOL;
281
+        }
282
+    }
283 283
 
284
-	if (empty($message['created'])) {
285
-		$message['created'] = gmdate("D, d M Y H:i:s T");
286
-	}
284
+    if (empty($message['created'])) {
285
+        $message['created'] = gmdate("D, d M Y H:i:s T");
286
+    }
287 287
 
288
-	if ($message['method'] !== 'messaging3' && $message['method'] !== 'mailto' && $message['method'] !== 'none') {
289
-		Database::prepare("INSERT INTO `##message` (sender, ip_address, user_id, subject, body) VALUES (? ,? ,? ,? ,?)")
290
-			->execute(array(
291
-				$message['from'],
292
-				WT_CLIENT_IP,
293
-				$recipient->getUserId(),
294
-				$message['subject'],
295
-				str_replace('<br>', '', $message['body']), // Remove the <br> that we added for the external email. Perhaps create different messages
296
-			));
297
-	}
298
-	if ($message['method'] !== 'messaging') {
299
-		if ($sender) {
300
-			$original_email = /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', $sender->getRealNameHtml());
301
-		} else {
302
-			if (!empty($message['from_name'])) {
303
-				$original_email = /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', $message['from_name']);
304
-			} else {
305
-				$original_email = /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', $message['from']);
306
-			}
307
-		}
308
-		$original_email .= Mail::EOL . Mail::EOL . $message['body'];
288
+    if ($message['method'] !== 'messaging3' && $message['method'] !== 'mailto' && $message['method'] !== 'none') {
289
+        Database::prepare("INSERT INTO `##message` (sender, ip_address, user_id, subject, body) VALUES (? ,? ,? ,? ,?)")
290
+            ->execute(array(
291
+                $message['from'],
292
+                WT_CLIENT_IP,
293
+                $recipient->getUserId(),
294
+                $message['subject'],
295
+                str_replace('<br>', '', $message['body']), // Remove the <br> that we added for the external email. Perhaps create different messages
296
+            ));
297
+    }
298
+    if ($message['method'] !== 'messaging') {
299
+        if ($sender) {
300
+            $original_email = /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', $sender->getRealNameHtml());
301
+        } else {
302
+            if (!empty($message['from_name'])) {
303
+                $original_email = /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', $message['from_name']);
304
+            } else {
305
+                $original_email = /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', $message['from']);
306
+            }
307
+        }
308
+        $original_email .= Mail::EOL . Mail::EOL . $message['body'];
309 309
 
310
-		$success = $success && Mail::send(
311
-			// “From:” header
312
-				$WT_TREE,
313
-				// “To:” header
314
-				$recipient->getEmail(),
315
-				$recipient->getRealName(),
316
-				// “Reply-To:” header
317
-				$sender_email,
318
-				$sender_real_name,
319
-				// Message body
320
-				I18N::translate('webtrees message') . ' - ' . $message['subject'],
321
-				$original_email
322
-			);
323
-	}
310
+        $success = $success && Mail::send(
311
+            // “From:” header
312
+                $WT_TREE,
313
+                // “To:” header
314
+                $recipient->getEmail(),
315
+                $recipient->getRealName(),
316
+                // “Reply-To:” header
317
+                $sender_email,
318
+                $sender_real_name,
319
+                // Message body
320
+                I18N::translate('webtrees message') . ' - ' . $message['subject'],
321
+                $original_email
322
+            );
323
+    }
324 324
 
325
-	I18N::init(WT_LOCALE); // restore language settings if needed
325
+    I18N::init(WT_LOCALE); // restore language settings if needed
326 326
 
327
-	return $success;
327
+    return $success;
328 328
 }
Please login to merge, or discard this patch.
indilist.php 1 patch
Indentation   +180 added lines, -180 removed lines patch added patch discarded remove patch
@@ -39,226 +39,226 @@
 block discarded – undo
39 39
 // Long lists can be broken down by given name
40 40
 $show_all_firstnames = Filter::get('show_all_firstnames', 'no|yes', 'no');
41 41
 if ($show_all_firstnames === 'yes') {
42
-	$falpha = '';
42
+    $falpha = '';
43 43
 } else {
44
-	$falpha = Filter::get('falpha'); // All first names beginning with this letter
44
+    $falpha = Filter::get('falpha'); // All first names beginning with this letter
45 45
 }
46 46
 
47 47
 $show_marnm = Filter::get('show_marnm', 'no|yes');
48 48
 switch ($show_marnm) {
49 49
 case 'no':
50 50
 case 'yes':
51
-	Auth::user()->setPreference(WT_SCRIPT_NAME . '_show_marnm', $show_marnm);
52
-	break;
51
+    Auth::user()->setPreference(WT_SCRIPT_NAME . '_show_marnm', $show_marnm);
52
+    break;
53 53
 default:
54
-	$show_marnm = Auth::user()->getPreference(WT_SCRIPT_NAME . '_show_marnm');
54
+    $show_marnm = Auth::user()->getPreference(WT_SCRIPT_NAME . '_show_marnm');
55 55
 }
56 56
 
57 57
 // Make sure selections are consistent.
58 58
 // i.e. can’t specify show_all and surname at the same time.
59 59
 if ($show_all === 'yes') {
60
-	if ($show_all_firstnames === 'yes') {
61
-		$alpha   = '';
62
-		$surname = '';
63
-		$legend  = I18N::translate('All');
64
-		$url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
65
-		$show    = 'indi';
66
-	} elseif ($falpha) {
67
-		$alpha   = '';
68
-		$surname = '';
69
-		$legend  = I18N::translate('All') . ', ' . Filter::escapeHtml($falpha) . '…';
70
-		$url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
71
-		$show    = 'indi';
72
-	} else {
73
-		$alpha   = '';
74
-		$surname = '';
75
-		$legend  = I18N::translate('All');
76
-		$url     = WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl();
77
-		$show    = Filter::get('show', 'surn|indi', 'surn');
78
-	}
60
+    if ($show_all_firstnames === 'yes') {
61
+        $alpha   = '';
62
+        $surname = '';
63
+        $legend  = I18N::translate('All');
64
+        $url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
65
+        $show    = 'indi';
66
+    } elseif ($falpha) {
67
+        $alpha   = '';
68
+        $surname = '';
69
+        $legend  = I18N::translate('All') . ', ' . Filter::escapeHtml($falpha) . '…';
70
+        $url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
71
+        $show    = 'indi';
72
+    } else {
73
+        $alpha   = '';
74
+        $surname = '';
75
+        $legend  = I18N::translate('All');
76
+        $url     = WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl();
77
+        $show    = Filter::get('show', 'surn|indi', 'surn');
78
+    }
79 79
 } elseif ($surname) {
80
-	$alpha    = QueryName::initialLetter($surname); // so we can highlight the initial letter
81
-	$show_all = 'no';
82
-	if ($surname === '@N.N.') {
83
-		$legend = I18N::translateContext('Unknown surname', '…');
84
-	} else {
85
-		$legend = Filter::escapeHtml($surname);
86
-		// The surname parameter is a root/canonical form.
87
-		// Display it as the actual surname
88
-		foreach (QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', false) as $details) {
89
-			$legend = implode('/', array_keys($details));
90
-		}
91
-	}
92
-	$url = WT_SCRIPT_NAME . '?surname=' . rawurlencode($surname) . '&amp;ged=' . $WT_TREE->getNameUrl();
93
-	switch ($falpha) {
94
-	case '':
95
-		break;
96
-	case '@':
97
-		$legend .= ', ' . I18N::translateContext('Unknown given name', '…');
98
-		$url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
99
-		break;
100
-	default:
101
-		$legend .= ', ' . Filter::escapeHtml($falpha) . '…';
102
-		$url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
103
-		break;
104
-	}
105
-	$show = 'indi'; // SURN list makes no sense here
80
+    $alpha    = QueryName::initialLetter($surname); // so we can highlight the initial letter
81
+    $show_all = 'no';
82
+    if ($surname === '@N.N.') {
83
+        $legend = I18N::translateContext('Unknown surname', '…');
84
+    } else {
85
+        $legend = Filter::escapeHtml($surname);
86
+        // The surname parameter is a root/canonical form.
87
+        // Display it as the actual surname
88
+        foreach (QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', false) as $details) {
89
+            $legend = implode('/', array_keys($details));
90
+        }
91
+    }
92
+    $url = WT_SCRIPT_NAME . '?surname=' . rawurlencode($surname) . '&amp;ged=' . $WT_TREE->getNameUrl();
93
+    switch ($falpha) {
94
+    case '':
95
+        break;
96
+    case '@':
97
+        $legend .= ', ' . I18N::translateContext('Unknown given name', '…');
98
+        $url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
99
+        break;
100
+    default:
101
+        $legend .= ', ' . Filter::escapeHtml($falpha) . '…';
102
+        $url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
103
+        break;
104
+    }
105
+    $show = 'indi'; // SURN list makes no sense here
106 106
 } elseif ($alpha === '@') {
107
-	$show_all = 'no';
108
-	$legend   = I18N::translateContext('Unknown surname', '…');
109
-	$url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
110
-	$show     = 'indi'; // SURN list makes no sense here
107
+    $show_all = 'no';
108
+    $legend   = I18N::translateContext('Unknown surname', '…');
109
+    $url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
110
+    $show     = 'indi'; // SURN list makes no sense here
111 111
 } elseif ($alpha === ',') {
112
-	$show_all = 'no';
113
-	$legend   = I18N::translate('None');
114
-	$url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
115
-	$show     = 'indi'; // SURN list makes no sense here
112
+    $show_all = 'no';
113
+    $legend   = I18N::translate('None');
114
+    $url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
115
+    $show     = 'indi'; // SURN list makes no sense here
116 116
 } elseif ($alpha) {
117
-	$show_all = 'no';
118
-	$legend   = Filter::escapeHtml($alpha) . '…';
119
-	$url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
120
-	$show     = Filter::get('show', 'surn|indi', 'surn');
117
+    $show_all = 'no';
118
+    $legend   = Filter::escapeHtml($alpha) . '…';
119
+    $url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
120
+    $show     = Filter::get('show', 'surn|indi', 'surn');
121 121
 } else {
122
-	$show_all = 'no';
123
-	$legend   = '…';
124
-	$url      = WT_SCRIPT_NAME . '?ged=' . $WT_TREE->getNameUrl();
125
-	$show     = 'none'; // Don't show lists until something is chosen
122
+    $show_all = 'no';
123
+    $legend   = '…';
124
+    $url      = WT_SCRIPT_NAME . '?ged=' . $WT_TREE->getNameUrl();
125
+    $show     = 'none'; // Don't show lists until something is chosen
126 126
 }
127 127
 $legend = '<span dir="auto">' . $legend . '</span>';
128 128
 
129 129
 $controller
130
-	->setPageTitle(I18N::translate('Individuals') . ' : ' . $legend)
131
-	->pageHeader();
130
+    ->setPageTitle(I18N::translate('Individuals') . ' : ' . $legend)
131
+    ->pageHeader();
132 132
 
133 133
 echo '<h2 class="center">', I18N::translate('Individuals'), '</h2>';
134 134
 
135 135
 // Print a selection list of initial letters
136 136
 $list = array();
137 137
 foreach (QueryName::surnameAlpha($WT_TREE, $show_marnm === 'yes', false) as $letter => $count) {
138
-	switch ($letter) {
139
-	case '@':
140
-		$html = I18N::translateContext('Unknown surname', '…');
141
-		break;
142
-	case ',':
143
-		$html = I18N::translate('None');
144
-		break;
145
-	default:
146
-		$html = Filter::escapeHtml($letter);
147
-		break;
148
-	}
149
-	if ($count) {
150
-		if ($letter == $alpha) {
151
-			$list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>';
152
-		} else {
153
-			$list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>';
154
-		}
155
-	} else {
156
-		$list[] = $html;
157
-	}
138
+    switch ($letter) {
139
+    case '@':
140
+        $html = I18N::translateContext('Unknown surname', '…');
141
+        break;
142
+    case ',':
143
+        $html = I18N::translate('None');
144
+        break;
145
+    default:
146
+        $html = Filter::escapeHtml($letter);
147
+        break;
148
+    }
149
+    if ($count) {
150
+        if ($letter == $alpha) {
151
+            $list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>';
152
+        } else {
153
+            $list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>';
154
+        }
155
+    } else {
156
+        $list[] = $html;
157
+    }
158 158
 }
159 159
 
160 160
 // Search spiders don't get the "show all" option as the other links give them everything.
161 161
 if (!Auth::isSearchEngine()) {
162
-	if ($show_all === 'yes') {
163
-		$list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
164
-	} else {
165
-		$list[] = '<a href="' . WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl() . '">' . I18N::translate('All') . '</a>';
166
-	}
162
+    if ($show_all === 'yes') {
163
+        $list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
164
+    } else {
165
+        $list[] = '<a href="' . WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl() . '">' . I18N::translate('All') . '</a>';
166
+    }
167 167
 }
168 168
 echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
169 169
 
170 170
 // Search spiders don't get an option to show/hide the surname sublists,
171 171
 // nor does it make sense on the all/unknown/surname views
172 172
 if (!Auth::isSearchEngine()) {
173
-	echo '<p class="center">';
174
-	if ($show !== 'none') {
175
-		if ($show_marnm === 'yes') {
176
-			echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=no">', I18N::translate('Exclude individuals with “%s” as a married name', $legend), '</a>';
177
-		} else {
178
-			echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=yes">', I18N::translate('Include individuals with “%s” as a married name', $legend), '</a>';
179
-		}
173
+    echo '<p class="center">';
174
+    if ($show !== 'none') {
175
+        if ($show_marnm === 'yes') {
176
+            echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=no">', I18N::translate('Exclude individuals with “%s” as a married name', $legend), '</a>';
177
+        } else {
178
+            echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=yes">', I18N::translate('Include individuals with “%s” as a married name', $legend), '</a>';
179
+        }
180 180
 
181
-		if ($alpha !== '@' && $alpha !== ',' && !$surname) {
182
-			if ($show === 'surn') {
183
-				echo '<br><a href="', $url, '&amp;show=indi">', I18N::translate('Show the list of individuals'), '</a>';
184
-			} else {
185
-				echo '<br><a href="', $url, '&amp;show=surn">', I18N::translate('Show the list of surnames'), '</a>';
186
-			}
187
-		}
188
-	}
189
-	echo '</p>';
181
+        if ($alpha !== '@' && $alpha !== ',' && !$surname) {
182
+            if ($show === 'surn') {
183
+                echo '<br><a href="', $url, '&amp;show=indi">', I18N::translate('Show the list of individuals'), '</a>';
184
+            } else {
185
+                echo '<br><a href="', $url, '&amp;show=surn">', I18N::translate('Show the list of surnames'), '</a>';
186
+            }
187
+        }
188
+    }
189
+    echo '</p>';
190 190
 }
191 191
 
192 192
 if ($show === 'indi' || $show === 'surn') {
193
-	$surns = QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', false);
194
-	if ($show === 'surn') {
195
-		// Show the surname list
196
-		switch ($WT_TREE->getPreference('SURNAME_LIST_STYLE')) {
197
-		case 'style1':
198
-			echo FunctionsPrintLists::surnameList($surns, 3, true, WT_SCRIPT_NAME, $WT_TREE);
199
-			break;
200
-		case 'style3':
201
-			echo FunctionsPrintLists::surnameTagCloud($surns, WT_SCRIPT_NAME, true, $WT_TREE);
202
-			break;
203
-		case 'style2':
204
-		default:
205
-			echo FunctionsPrintLists::surnameTable($surns, WT_SCRIPT_NAME, $WT_TREE);
206
-			break;
207
-		}
208
-	} else {
209
-		// Show the list
210
-		$count = 0;
211
-		foreach ($surns as $surnames) {
212
-			foreach ($surnames as $list) {
213
-				$count += count($list);
214
-			}
215
-		}
216
-		// Don't sublists short lists.
217
-		if ($count < $WT_TREE->getPreference('SUBLIST_TRIGGER_I')) {
218
-			$falpha              = '';
219
-			$show_all_firstnames = 'no';
220
-		} else {
221
-			$givn_initials = QueryName::givenAlpha($WT_TREE, $surname, $alpha, $show_marnm === 'yes', false);
222
-			// Break long lists by initial letter of given name
223
-			if ($surname || $show_all === 'yes') {
224
-				// Don't show the list until we have some filter criteria
225
-				$show = ($falpha || $show_all_firstnames === 'yes') ? 'indi' : 'none';
226
-				$list = array();
227
-				foreach ($givn_initials as $givn_initial => $count) {
228
-					switch ($givn_initial) {
229
-					case '@':
230
-						$html = I18N::translateContext('Unknown given name', '…');
231
-						break;
232
-					default:
233
-						$html = Filter::escapeHtml($givn_initial);
234
-						break;
235
-					}
236
-					if ($count) {
237
-						if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
238
-							$list[] = '<a class="warning" href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
239
-						} else {
240
-							$list[] = '<a href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
241
-						}
242
-					} else {
243
-						$list[] = $html;
244
-					}
245
-				}
246
-				// Search spiders don't get the "show all" option as the other links give them everything.
247
-				if (!Auth::isSearchEngine()) {
248
-					if ($show_all_firstnames === 'yes') {
249
-						$list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
250
-					} else {
251
-						$list[] = '<a href="' . $url . '&amp;show_all_firstnames=yes">' . I18N::translate('All') . '</a>';
252
-					}
253
-				}
254
-				if ($show_all === 'no') {
255
-					echo '<h2 class="center">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
256
-				}
257
-				echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
258
-			}
259
-		}
260
-		if ($show === 'indi') {
261
-			echo FunctionsPrintLists::individualTable(QueryName::individuals($WT_TREE, $surname, $alpha, $falpha, $show_marnm === 'yes', false));
262
-		}
263
-	}
193
+    $surns = QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', false);
194
+    if ($show === 'surn') {
195
+        // Show the surname list
196
+        switch ($WT_TREE->getPreference('SURNAME_LIST_STYLE')) {
197
+        case 'style1':
198
+            echo FunctionsPrintLists::surnameList($surns, 3, true, WT_SCRIPT_NAME, $WT_TREE);
199
+            break;
200
+        case 'style3':
201
+            echo FunctionsPrintLists::surnameTagCloud($surns, WT_SCRIPT_NAME, true, $WT_TREE);
202
+            break;
203
+        case 'style2':
204
+        default:
205
+            echo FunctionsPrintLists::surnameTable($surns, WT_SCRIPT_NAME, $WT_TREE);
206
+            break;
207
+        }
208
+    } else {
209
+        // Show the list
210
+        $count = 0;
211
+        foreach ($surns as $surnames) {
212
+            foreach ($surnames as $list) {
213
+                $count += count($list);
214
+            }
215
+        }
216
+        // Don't sublists short lists.
217
+        if ($count < $WT_TREE->getPreference('SUBLIST_TRIGGER_I')) {
218
+            $falpha              = '';
219
+            $show_all_firstnames = 'no';
220
+        } else {
221
+            $givn_initials = QueryName::givenAlpha($WT_TREE, $surname, $alpha, $show_marnm === 'yes', false);
222
+            // Break long lists by initial letter of given name
223
+            if ($surname || $show_all === 'yes') {
224
+                // Don't show the list until we have some filter criteria
225
+                $show = ($falpha || $show_all_firstnames === 'yes') ? 'indi' : 'none';
226
+                $list = array();
227
+                foreach ($givn_initials as $givn_initial => $count) {
228
+                    switch ($givn_initial) {
229
+                    case '@':
230
+                        $html = I18N::translateContext('Unknown given name', '…');
231
+                        break;
232
+                    default:
233
+                        $html = Filter::escapeHtml($givn_initial);
234
+                        break;
235
+                    }
236
+                    if ($count) {
237
+                        if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
238
+                            $list[] = '<a class="warning" href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
239
+                        } else {
240
+                            $list[] = '<a href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
241
+                        }
242
+                    } else {
243
+                        $list[] = $html;
244
+                    }
245
+                }
246
+                // Search spiders don't get the "show all" option as the other links give them everything.
247
+                if (!Auth::isSearchEngine()) {
248
+                    if ($show_all_firstnames === 'yes') {
249
+                        $list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
250
+                    } else {
251
+                        $list[] = '<a href="' . $url . '&amp;show_all_firstnames=yes">' . I18N::translate('All') . '</a>';
252
+                    }
253
+                }
254
+                if ($show_all === 'no') {
255
+                    echo '<h2 class="center">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
256
+                }
257
+                echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
258
+            }
259
+        }
260
+        if ($show === 'indi') {
261
+            echo FunctionsPrintLists::individualTable(QueryName::individuals($WT_TREE, $surname, $alpha, $falpha, $show_marnm === 'yes', false));
262
+        }
263
+    }
264 264
 }
Please login to merge, or discard this patch.
famlist.php 1 patch
Indentation   +180 added lines, -180 removed lines patch added patch discarded remove patch
@@ -39,226 +39,226 @@
 block discarded – undo
39 39
 // Long lists can be broken down by given name
40 40
 $show_all_firstnames = Filter::get('show_all_firstnames', 'no|yes', 'no');
41 41
 if ($show_all_firstnames === 'yes') {
42
-	$falpha = '';
42
+    $falpha = '';
43 43
 } else {
44
-	$falpha = Filter::get('falpha'); // All first names beginning with this letter
44
+    $falpha = Filter::get('falpha'); // All first names beginning with this letter
45 45
 }
46 46
 
47 47
 $show_marnm = Filter::get('show_marnm', 'no|yes');
48 48
 switch ($show_marnm) {
49 49
 case 'no':
50 50
 case 'yes':
51
-	Auth::user()->setPreference(WT_SCRIPT_NAME . '_show_marnm', $show_marnm);
52
-	break;
51
+    Auth::user()->setPreference(WT_SCRIPT_NAME . '_show_marnm', $show_marnm);
52
+    break;
53 53
 default:
54
-	$show_marnm = Auth::user()->getPreference(WT_SCRIPT_NAME . '_show_marnm');
54
+    $show_marnm = Auth::user()->getPreference(WT_SCRIPT_NAME . '_show_marnm');
55 55
 }
56 56
 
57 57
 // Make sure selections are consistent.
58 58
 // i.e. can’t specify show_all and surname at the same time.
59 59
 if ($show_all === 'yes') {
60
-	if ($show_all_firstnames === 'yes') {
61
-		$alpha   = '';
62
-		$surname = '';
63
-		$legend  = I18N::translate('All');
64
-		$url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
65
-		$show    = 'indi';
66
-	} elseif ($falpha) {
67
-		$alpha   = '';
68
-		$surname = '';
69
-		$legend  = I18N::translate('All') . ', ' . Filter::escapeHtml($falpha) . '…';
70
-		$url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
71
-		$show    = 'indi';
72
-	} else {
73
-		$alpha   = '';
74
-		$surname = '';
75
-		$legend  = I18N::translate('All');
76
-		$url     = WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl();
77
-		$show    = Filter::get('show', 'surn|indi', 'surn');
78
-	}
60
+    if ($show_all_firstnames === 'yes') {
61
+        $alpha   = '';
62
+        $surname = '';
63
+        $legend  = I18N::translate('All');
64
+        $url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
65
+        $show    = 'indi';
66
+    } elseif ($falpha) {
67
+        $alpha   = '';
68
+        $surname = '';
69
+        $legend  = I18N::translate('All') . ', ' . Filter::escapeHtml($falpha) . '…';
70
+        $url     = WT_SCRIPT_NAME . '?show_all=yes&amp;ged=' . $WT_TREE->getNameUrl();
71
+        $show    = 'indi';
72
+    } else {
73
+        $alpha   = '';
74
+        $surname = '';
75
+        $legend  = I18N::translate('All');
76
+        $url     = WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl();
77
+        $show    = Filter::get('show', 'surn|indi', 'surn');
78
+    }
79 79
 } elseif ($surname) {
80
-	$alpha    = QueryName::initialLetter($surname); // so we can highlight the initial letter
81
-	$show_all = 'no';
82
-	if ($surname === '@N.N.') {
83
-		$legend = I18N::translateContext('Unknown surname', '…');
84
-	} else {
85
-		$legend = Filter::escapeHtml($surname);
86
-		// The surname parameter is a root/canonical form.
87
-		// Display it as the actual surname
88
-		foreach (QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', true) as $details) {
89
-			$legend = implode('/', array_keys($details));
90
-		}
91
-	}
92
-	$url = WT_SCRIPT_NAME . '?surname=' . rawurlencode($surname) . '&amp;ged=' . $WT_TREE->getNameUrl();
93
-	switch ($falpha) {
94
-	case '':
95
-		break;
96
-	case '@':
97
-		$legend .= ', ' . I18N::translateContext('Unknown given name', '…');
98
-		$url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
99
-		break;
100
-	default:
101
-		$legend .= ', ' . Filter::escapeHtml($falpha) . '…';
102
-		$url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
103
-		break;
104
-	}
105
-	$show = 'indi'; // SURN list makes no sense here
80
+    $alpha    = QueryName::initialLetter($surname); // so we can highlight the initial letter
81
+    $show_all = 'no';
82
+    if ($surname === '@N.N.') {
83
+        $legend = I18N::translateContext('Unknown surname', '…');
84
+    } else {
85
+        $legend = Filter::escapeHtml($surname);
86
+        // The surname parameter is a root/canonical form.
87
+        // Display it as the actual surname
88
+        foreach (QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', true) as $details) {
89
+            $legend = implode('/', array_keys($details));
90
+        }
91
+    }
92
+    $url = WT_SCRIPT_NAME . '?surname=' . rawurlencode($surname) . '&amp;ged=' . $WT_TREE->getNameUrl();
93
+    switch ($falpha) {
94
+    case '':
95
+        break;
96
+    case '@':
97
+        $legend .= ', ' . I18N::translateContext('Unknown given name', '…');
98
+        $url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
99
+        break;
100
+    default:
101
+        $legend .= ', ' . Filter::escapeHtml($falpha) . '…';
102
+        $url .= '&amp;falpha=' . rawurlencode($falpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
103
+        break;
104
+    }
105
+    $show = 'indi'; // SURN list makes no sense here
106 106
 } elseif ($alpha === '@') {
107
-	$show_all = 'no';
108
-	$legend   = I18N::translateContext('Unknown surname', '…');
109
-	$url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
110
-	$show     = 'indi'; // SURN list makes no sense here
107
+    $show_all = 'no';
108
+    $legend   = I18N::translateContext('Unknown surname', '…');
109
+    $url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
110
+    $show     = 'indi'; // SURN list makes no sense here
111 111
 } elseif ($alpha === ',') {
112
-	$show_all = 'no';
113
-	$legend   = I18N::translate('None');
114
-	$url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
115
-	$show     = 'indi'; // SURN list makes no sense here
112
+    $show_all = 'no';
113
+    $legend   = I18N::translate('None');
114
+    $url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
115
+    $show     = 'indi'; // SURN list makes no sense here
116 116
 } elseif ($alpha) {
117
-	$show_all = 'no';
118
-	$legend   = Filter::escapeHtml($alpha) . '…';
119
-	$url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
120
-	$show     = Filter::get('show', 'surn|indi', 'surn');
117
+    $show_all = 'no';
118
+    $legend   = Filter::escapeHtml($alpha) . '…';
119
+    $url      = WT_SCRIPT_NAME . '?alpha=' . rawurlencode($alpha) . '&amp;ged=' . $WT_TREE->getNameUrl();
120
+    $show     = Filter::get('show', 'surn|indi', 'surn');
121 121
 } else {
122
-	$show_all = 'no';
123
-	$legend   = '…';
124
-	$url      = WT_SCRIPT_NAME . '?ged=' . $WT_TREE->getNameUrl();
125
-	$show     = 'none'; // Don't show lists until something is chosen
122
+    $show_all = 'no';
123
+    $legend   = '…';
124
+    $url      = WT_SCRIPT_NAME . '?ged=' . $WT_TREE->getNameUrl();
125
+    $show     = 'none'; // Don't show lists until something is chosen
126 126
 }
127 127
 $legend = '<span dir="auto">' . $legend . '</span>';
128 128
 
129 129
 $controller
130
-	->setPageTitle(I18N::translate('Families') . ' : ' . $legend)
131
-	->pageHeader();
130
+    ->setPageTitle(I18N::translate('Families') . ' : ' . $legend)
131
+    ->pageHeader();
132 132
 
133 133
 echo '<h2 class="center">', I18N::translate('Families'), '</h2>';
134 134
 
135 135
 // Print a selection list of initial letters
136 136
 $list = array();
137 137
 foreach (QueryName::surnameAlpha($WT_TREE, $show_marnm === 'yes', true) as $letter => $count) {
138
-	switch ($letter) {
139
-	case '@':
140
-		$html = I18N::translateContext('Unknown surname', '…');
141
-		break;
142
-	case ',':
143
-		$html = I18N::translate('None');
144
-		break;
145
-	default:
146
-		$html = Filter::escapeHtml($letter);
147
-		break;
148
-	}
149
-	if ($count) {
150
-		if ($letter == $alpha) {
151
-			$list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>';
152
-		} else {
153
-			$list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>';
154
-		}
155
-	} else {
156
-		$list[] = $html;
157
-	}
138
+    switch ($letter) {
139
+    case '@':
140
+        $html = I18N::translateContext('Unknown surname', '…');
141
+        break;
142
+    case ',':
143
+        $html = I18N::translate('None');
144
+        break;
145
+    default:
146
+        $html = Filter::escapeHtml($letter);
147
+        break;
148
+    }
149
+    if ($count) {
150
+        if ($letter == $alpha) {
151
+            $list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>';
152
+        } else {
153
+            $list[] = '<a href="' . WT_SCRIPT_NAME . '?alpha=' . rawurlencode($letter) . '&amp;ged=' . $WT_TREE->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>';
154
+        }
155
+    } else {
156
+        $list[] = $html;
157
+    }
158 158
 }
159 159
 
160 160
 // Search spiders don't get the "show all" option as the other links give them everything.
161 161
 if (!Auth::isSearchEngine()) {
162
-	if ($show_all === 'yes') {
163
-		$list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
164
-	} else {
165
-		$list[] = '<a href="' . WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl() . '">' . I18N::translate('All') . '</a>';
166
-	}
162
+    if ($show_all === 'yes') {
163
+        $list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
164
+    } else {
165
+        $list[] = '<a href="' . WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl() . '">' . I18N::translate('All') . '</a>';
166
+    }
167 167
 }
168 168
 echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
169 169
 
170 170
 // Search spiders don't get an option to show/hide the surname sublists,
171 171
 // nor does it make sense on the all/unknown/surname views
172 172
 if (!Auth::isSearchEngine()) {
173
-	echo '<p class="center">';
174
-	if ($show !== 'none') {
175
-		if ($show_marnm === 'yes') {
176
-			echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=no">', I18N::translate('Exclude individuals with “%s” as a married name', $legend), '</a>';
177
-		} else {
178
-			echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=yes">', I18N::translate('Include individuals with “%s” as a married name', $legend), '</a>';
179
-		}
173
+    echo '<p class="center">';
174
+    if ($show !== 'none') {
175
+        if ($show_marnm === 'yes') {
176
+            echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=no">', I18N::translate('Exclude individuals with “%s” as a married name', $legend), '</a>';
177
+        } else {
178
+            echo '<a href="', $url, '&amp;show=' . $show . '&amp;show_marnm=yes">', I18N::translate('Include individuals with “%s” as a married name', $legend), '</a>';
179
+        }
180 180
 
181
-		if ($alpha !== '@' && $alpha !== ',' && !$surname) {
182
-			if ($show === 'surn') {
183
-				echo '<br><a href="', $url, '&amp;show=indi">', I18N::translate('Show the list of individuals'), '</a>';
184
-			} else {
185
-				echo '<br><a href="', $url, '&amp;show=surn">', I18N::translate('Show the list of surnames'), '</a>';
186
-			}
187
-		}
188
-	}
189
-	echo '</p>';
181
+        if ($alpha !== '@' && $alpha !== ',' && !$surname) {
182
+            if ($show === 'surn') {
183
+                echo '<br><a href="', $url, '&amp;show=indi">', I18N::translate('Show the list of individuals'), '</a>';
184
+            } else {
185
+                echo '<br><a href="', $url, '&amp;show=surn">', I18N::translate('Show the list of surnames'), '</a>';
186
+            }
187
+        }
188
+    }
189
+    echo '</p>';
190 190
 }
191 191
 
192 192
 if ($show === 'indi' || $show === 'surn') {
193
-	$surns = QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', true);
194
-	if ($show === 'surn') {
195
-		// Show the surname list
196
-		switch ($WT_TREE->getPreference('SURNAME_LIST_STYLE')) {
197
-		case 'style1':
198
-			echo FunctionsPrintLists::surnameList($surns, 3, true, WT_SCRIPT_NAME, $WT_TREE);
199
-			break;
200
-		case 'style3':
201
-			echo FunctionsPrintLists::surnameTagCloud($surns, WT_SCRIPT_NAME, true, $WT_TREE);
202
-			break;
203
-		case 'style2':
204
-		default:
205
-			echo FunctionsPrintLists::surnameTable($surns, WT_SCRIPT_NAME, $WT_TREE);
206
-			break;
207
-		}
208
-	} else {
209
-		// Show the list
210
-		$count = 0;
211
-		foreach ($surns as $surnames) {
212
-			foreach ($surnames as $list) {
213
-				$count += count($list);
214
-			}
215
-		}
216
-		// Don't sublists short lists.
217
-		if ($count < $WT_TREE->getPreference('SUBLIST_TRIGGER_I')) {
218
-			$falpha              = '';
219
-			$show_all_firstnames = 'no';
220
-		} else {
221
-			$givn_initials = QueryName::givenAlpha($WT_TREE, $surname, $alpha, $show_marnm === 'yes', true);
222
-			// Break long lists by initial letter of given name
223
-			if ($surname || $show_all === 'yes') {
224
-				// Don't show the list until we have some filter criteria
225
-				$show = ($falpha || $show_all_firstnames === 'yes') ? 'indi' : 'none';
226
-				$list = array();
227
-				foreach ($givn_initials as $givn_initial => $count) {
228
-					switch ($givn_initial) {
229
-					case '@':
230
-						$html = I18N::translateContext('Unknown given name', '…');
231
-						break;
232
-					default:
233
-						$html = Filter::escapeHtml($givn_initial);
234
-						break;
235
-					}
236
-					if ($count) {
237
-						if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
238
-							$list[] = '<a class="warning" href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
239
-						} else {
240
-							$list[] = '<a href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
241
-						}
242
-					} else {
243
-						$list[] = $html;
244
-					}
245
-				}
246
-				// Search spiders don't get the "show all" option as the other links give them everything.
247
-				if (!Auth::isSearchEngine()) {
248
-					if ($show_all_firstnames === 'yes') {
249
-						$list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
250
-					} else {
251
-						$list[] = '<a href="' . $url . '&amp;show_all_firstnames=yes">' . I18N::translate('All') . '</a>';
252
-					}
253
-				}
254
-				if ($show_all === 'no') {
255
-					echo '<h2 class="center">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
256
-				}
257
-				echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
258
-			}
259
-		}
260
-		if ($show === 'indi') {
261
-			echo FunctionsPrintLists::familyTable(QueryName::families($WT_TREE, $surname, $alpha, $falpha, $show_marnm === 'yes'));
262
-		}
263
-	}
193
+    $surns = QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', true);
194
+    if ($show === 'surn') {
195
+        // Show the surname list
196
+        switch ($WT_TREE->getPreference('SURNAME_LIST_STYLE')) {
197
+        case 'style1':
198
+            echo FunctionsPrintLists::surnameList($surns, 3, true, WT_SCRIPT_NAME, $WT_TREE);
199
+            break;
200
+        case 'style3':
201
+            echo FunctionsPrintLists::surnameTagCloud($surns, WT_SCRIPT_NAME, true, $WT_TREE);
202
+            break;
203
+        case 'style2':
204
+        default:
205
+            echo FunctionsPrintLists::surnameTable($surns, WT_SCRIPT_NAME, $WT_TREE);
206
+            break;
207
+        }
208
+    } else {
209
+        // Show the list
210
+        $count = 0;
211
+        foreach ($surns as $surnames) {
212
+            foreach ($surnames as $list) {
213
+                $count += count($list);
214
+            }
215
+        }
216
+        // Don't sublists short lists.
217
+        if ($count < $WT_TREE->getPreference('SUBLIST_TRIGGER_I')) {
218
+            $falpha              = '';
219
+            $show_all_firstnames = 'no';
220
+        } else {
221
+            $givn_initials = QueryName::givenAlpha($WT_TREE, $surname, $alpha, $show_marnm === 'yes', true);
222
+            // Break long lists by initial letter of given name
223
+            if ($surname || $show_all === 'yes') {
224
+                // Don't show the list until we have some filter criteria
225
+                $show = ($falpha || $show_all_firstnames === 'yes') ? 'indi' : 'none';
226
+                $list = array();
227
+                foreach ($givn_initials as $givn_initial => $count) {
228
+                    switch ($givn_initial) {
229
+                    case '@':
230
+                        $html = I18N::translateContext('Unknown given name', '…');
231
+                        break;
232
+                    default:
233
+                        $html = Filter::escapeHtml($givn_initial);
234
+                        break;
235
+                    }
236
+                    if ($count) {
237
+                        if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
238
+                            $list[] = '<a class="warning" href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
239
+                        } else {
240
+                            $list[] = '<a href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
241
+                        }
242
+                    } else {
243
+                        $list[] = $html;
244
+                    }
245
+                }
246
+                // Search spiders don't get the "show all" option as the other links give them everything.
247
+                if (!Auth::isSearchEngine()) {
248
+                    if ($show_all_firstnames === 'yes') {
249
+                        $list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
250
+                    } else {
251
+                        $list[] = '<a href="' . $url . '&amp;show_all_firstnames=yes">' . I18N::translate('All') . '</a>';
252
+                    }
253
+                }
254
+                if ($show_all === 'no') {
255
+                    echo '<h2 class="center">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
256
+                }
257
+                echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
258
+            }
259
+        }
260
+        if ($show === 'indi') {
261
+            echo FunctionsPrintLists::familyTable(QueryName::families($WT_TREE, $surname, $alpha, $falpha, $show_marnm === 'yes'));
262
+        }
263
+    }
264 264
 }
Please login to merge, or discard this patch.
note.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -35,34 +35,34 @@  discard block
 block discarded – undo
35 35
 $controller = new NoteController($record);
36 36
 
37 37
 if ($controller->record && $controller->record->canShow()) {
38
-	if ($controller->record->isPendingDeletion()) {
39
-		if (Auth::isModerator($controller->record->getTree())) {
40
-			FlashMessages::addMessage(/* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate(
41
-				'This note has been deleted. You should review the deletion and then %1$s or %2$s it.',
42
-				'<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>',
43
-				'<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>'
44
-			) . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
45
-		} elseif (Auth::isEditor($controller->record->getTree())) {
46
-			FlashMessages::addMessage(I18N::translate('This note has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
47
-		}
48
-	} elseif ($controller->record->isPendingAddtion()) {
49
-		if (Auth::isModerator($controller->record->getTree())) {
50
-			FlashMessages::addMessage(/* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate(
51
-				'This note has been edited. You should review the changes and then %1$s or %2$s them.',
52
-				'<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>',
53
-				'<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>'
54
-			) . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
55
-		} elseif (Auth::isEditor($controller->record->getTree())) {
56
-			FlashMessages::addMessage(I18N::translate('This note has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
57
-		}
58
-	}
59
-	$controller->pageHeader();
38
+    if ($controller->record->isPendingDeletion()) {
39
+        if (Auth::isModerator($controller->record->getTree())) {
40
+            FlashMessages::addMessage(/* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate(
41
+                'This note has been deleted. You should review the deletion and then %1$s or %2$s it.',
42
+                '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>',
43
+                '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>'
44
+            ) . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
45
+        } elseif (Auth::isEditor($controller->record->getTree())) {
46
+            FlashMessages::addMessage(I18N::translate('This note has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
47
+        }
48
+    } elseif ($controller->record->isPendingAddtion()) {
49
+        if (Auth::isModerator($controller->record->getTree())) {
50
+            FlashMessages::addMessage(/* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate(
51
+                'This note has been edited. You should review the changes and then %1$s or %2$s them.',
52
+                '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>',
53
+                '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>'
54
+            ) . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
55
+        } elseif (Auth::isEditor($controller->record->getTree())) {
56
+            FlashMessages::addMessage(I18N::translate('This note has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
57
+        }
58
+    }
59
+    $controller->pageHeader();
60 60
 } else {
61
-	FlashMessages::addMessage(I18N::translate('This note does not exist or you do not have permission to view it.'), 'danger');
62
-	http_response_code(404);
63
-	$controller->pageHeader();
61
+    FlashMessages::addMessage(I18N::translate('This note does not exist or you do not have permission to view it.'), 'danger');
62
+    http_response_code(404);
63
+    $controller->pageHeader();
64 64
 
65
-	return;
65
+    return;
66 66
 }
67 67
 
68 68
 $controller->addInlineJavascript('
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
 
83 83
 $facts = array();
84 84
 foreach ($controller->record->getFacts() as $fact) {
85
-	if ($fact->getTag() != 'CONT') {
86
-		$facts[] = $fact;
87
-	}
85
+    if ($fact->getTag() != 'CONT') {
86
+        $facts[] = $fact;
87
+    }
88 88
 }
89 89
 
90 90
 // Legacy formatting, created by the census assistant
91 91
 if (Module::getModuleByName('GEDFact_assistant')) {
92
-	$text = CensusAssistantModule::formatCensusNote($controller->record);
92
+    $text = CensusAssistantModule::formatCensusNote($controller->record);
93 93
 } else {
94
-	$text = Filter::formatText($controller->record->getNote(), $controller->record->getTree());
94
+    $text = Filter::formatText($controller->record->getNote(), $controller->record->getTree());
95 95
 }
96 96
 
97 97
 ?>
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
 					<td class="optionbox wrap width80"><?php echo $text; ?></td>
166 166
 				</tr>
167 167
 				<?php
168
-				foreach ($facts as $fact) {
169
-					FunctionsPrintFacts::printFact($fact, $controller->record);
170
-				}
171
-
172
-				if ($controller->record->canEdit()) {
173
-				FunctionsPrint::printAddNewFact($controller->record->getXref(), $facts, 'NOTE');
174
-				}
175
-				?>
168
+                foreach ($facts as $fact) {
169
+                    FunctionsPrintFacts::printFact($fact, $controller->record);
170
+                }
171
+
172
+                if ($controller->record->canEdit()) {
173
+                FunctionsPrint::printAddNewFact($controller->record->getXref(), $facts, 'NOTE');
174
+                }
175
+                ?>
176 176
 			</table>
177 177
 		</div>
178 178
 
Please login to merge, or discard this patch.
module.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 $module     = Module::getModuleByName($mod);
24 24
 
25 25
 if ($module) {
26
-	$module->modAction($mod_action);
26
+    $module->modAction($mod_action);
27 27
 } else {
28
-	header('Location: ' . WT_BASE_URL);
28
+    header('Location: ' . WT_BASE_URL);
29 29
 }
Please login to merge, or discard this patch.
admin_site_merge.php 1 patch
Indentation   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 
32 32
 $controller = new PageController;
33 33
 $controller
34
-	->restrictAccess(Auth::isManager($WT_TREE))
35
-	->setPageTitle(I18N::translate('Merge records') . ' — ' . $WT_TREE->getTitleHtml())
36
-	->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
37
-	->addInlineJavascript('autocomplete();');
34
+    ->restrictAccess(Auth::isManager($WT_TREE))
35
+    ->setPageTitle(I18N::translate('Merge records') . ' — ' . $WT_TREE->getTitleHtml())
36
+    ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
37
+    ->addInlineJavascript('autocomplete();');
38 38
 
39 39
 $gid1  = Filter::post('gid1', WT_REGEX_XREF, Filter::get('gid1', WT_REGEX_XREF));
40 40
 $gid2  = Filter::post('gid2', WT_REGEX_XREF, Filter::get('gid2', WT_REGEX_XREF));
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
 $rec2  = GedcomRecord::getInstance($gid2, $WT_TREE);
45 45
 
46 46
 if ($gid1 && !$rec1) {
47
-	FlashMessages::addMessage(I18N::translate('%1$s does not exist.', $gid1), 'danger');
47
+    FlashMessages::addMessage(I18N::translate('%1$s does not exist.', $gid1), 'danger');
48 48
 }
49 49
 
50 50
 if ($gid2 && !$rec2) {
51
-	FlashMessages::addMessage(I18N::translate('%1$s does not exist.', $gid2), 'danger');
51
+    FlashMessages::addMessage(I18N::translate('%1$s does not exist.', $gid2), 'danger');
52 52
 }
53 53
 
54 54
 if ($rec1 && $rec2 && $rec1->getXref() === $rec2->getXref()) {
55
-	FlashMessages::addMessage(I18N::translate('You entered the same IDs. You cannot merge the same records.'), 'danger');
55
+    FlashMessages::addMessage(I18N::translate('You entered the same IDs. You cannot merge the same records.'), 'danger');
56 56
 }
57 57
 
58 58
 if ($rec1 && $rec2 && $rec1::RECORD_TYPE !== $rec2::RECORD_TYPE) {
59
-	FlashMessages::addMessage(I18N::translate('Records are not the same type. Cannot merge records that are not the same type.'), 'danger');
59
+    FlashMessages::addMessage(I18N::translate('Records are not the same type. Cannot merge records that are not the same type.'), 'danger');
60 60
 }
61 61
 
62 62
 // Facts found both records
@@ -66,117 +66,117 @@  discard block
 block discarded – undo
66 66
 $facts2 = array();
67 67
 
68 68
 if ($rec1) {
69
-	foreach ($rec1->getFacts() as $fact) {
70
-		if (!$fact->isPendingDeletion() && $fact->getTag() !== 'CHAN') {
71
-			$facts1[$fact->getFactId()] = $fact;
72
-		}
73
-	}
69
+    foreach ($rec1->getFacts() as $fact) {
70
+        if (!$fact->isPendingDeletion() && $fact->getTag() !== 'CHAN') {
71
+            $facts1[$fact->getFactId()] = $fact;
72
+        }
73
+    }
74 74
 }
75 75
 
76 76
 if ($rec2) {
77
-	foreach ($rec2->getFacts() as $fact) {
78
-		if (!$fact->isPendingDeletion() && $fact->getTag() !== 'CHAN') {
79
-			$facts2[$fact->getFactId()] = $fact;
80
-		}
81
-	}
77
+    foreach ($rec2->getFacts() as $fact) {
78
+        if (!$fact->isPendingDeletion() && $fact->getTag() !== 'CHAN') {
79
+            $facts2[$fact->getFactId()] = $fact;
80
+        }
81
+    }
82 82
 }
83 83
 
84 84
 foreach ($facts1 as $id1 => $fact1) {
85
-	foreach ($facts2 as $id2 => $fact2) {
86
-		if ($fact1->getFactId() === $fact2->getFactId()) {
87
-			$facts[] = $fact1;
88
-			unset($facts1[$id1]);
89
-			unset($facts2[$id2]);
90
-		}
91
-	}
85
+    foreach ($facts2 as $id2 => $fact2) {
86
+        if ($fact1->getFactId() === $fact2->getFactId()) {
87
+            $facts[] = $fact1;
88
+            unset($facts1[$id1]);
89
+            unset($facts2[$id2]);
90
+        }
91
+    }
92 92
 }
93 93
 
94 94
 if ($rec1 && $rec2 && $rec1->getXref() !== $rec2->getXref() && $rec1::RECORD_TYPE === $rec2::RECORD_TYPE && Filter::post('action') === 'merge' && Filter::checkCsrf()) {
95
-	// Use the XREF of the record.
96
-	$gid1 = $rec1->getXref();
97
-	$gid2 = $rec2->getXref();
98
-
99
-	$ids = FunctionsDb::fetchAllLinks($gid2, $WT_TREE->getTreeId());
100
-
101
-	// If we are not auto-accepting, then we can show a link to the pending deletion
102
-	if (Auth::user()->getPreference('auto_accept')) {
103
-		$record2_name = $rec2->getFullName();
104
-	} else {
105
-		$record2_name = '<a class="alert-link" href="' . $rec2->getHtmlUrl() . '">' . $rec2->getFullName() . '</a>';
106
-	}
107
-
108
-	foreach ($ids as $id) {
109
-		$record = GedcomRecord::getInstance($id, $WT_TREE);
110
-		if (!$record->isPendingDeletion()) {
111
-			FlashMessages::addMessage(I18N::translate(
112
-				/* I18N: The placeholders are the names of individuals, sources, etc. */
113
-				'The link from “%1$s” to “%2$s” has been updated.',
114
-					'<a class="alert-link" href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a>',
115
-					$record2_name
116
-			), 'info');
117
-			$gedcom = str_replace("@$gid2@", "@$gid1@", $record->getGedcom());
118
-			$gedcom = preg_replace(
119
-				'/(\n1.*@.+@.*(?:(?:\n[2-9].*)*))((?:\n1.*(?:\n[2-9].*)*)*\1)/',
120
-				'$2',
121
-				$gedcom
122
-			);
123
-			$record->updateRecord($gedcom, true);
124
-		}
125
-	}
126
-	// Update any linked user-accounts
127
-	Database::prepare(
128
-		"UPDATE `##user_gedcom_setting`" .
129
-		" SET setting_value=?" .
130
-		" WHERE gedcom_id=? AND setting_name='gedcomid' AND setting_value=?"
131
-	)->execute(array($gid2, $WT_TREE->getTreeId(), $gid1));
132
-
133
-	// Merge hit counters
134
-	$hits = Database::prepare(
135
-		"SELECT page_name, SUM(page_count)" .
136
-		" FROM `##hit_counter`" .
137
-		" WHERE gedcom_id=? AND page_parameter IN (?, ?)" .
138
-		" GROUP BY page_name"
139
-	)->execute(array($WT_TREE->getTreeId(), $gid1, $gid2))->fetchAssoc();
140
-
141
-	foreach ($hits as $page_name => $page_count) {
142
-		Database::prepare(
143
-			"UPDATE `##hit_counter` SET page_count=?" .
144
-			" WHERE gedcom_id=? AND page_name=? AND page_parameter=?"
145
-		)->execute(array($page_count, $WT_TREE->getTreeId(), $page_name, $gid1));
146
-	}
147
-	Database::prepare(
148
-		"DELETE FROM `##hit_counter`" .
149
-		" WHERE gedcom_id=? AND page_parameter=?"
150
-	)->execute(array($WT_TREE->getTreeId(), $gid2));
151
-
152
-	$gedcom = "0 @" . $rec1->getXref() . "@ " . $rec1::RECORD_TYPE;
153
-	foreach ($facts as $fact_id => $fact) {
154
-		$gedcom .= "\n" . $fact->getGedcom();
155
-	}
156
-	foreach ($facts1 as $fact_id => $fact) {
157
-		if (in_array($fact_id, $keep1)) {
158
-			$gedcom .= "\n" . $fact->getGedcom();
159
-		}
160
-	}
161
-	foreach ($facts2 as $fact_id => $fact) {
162
-		if (in_array($fact_id, $keep2)) {
163
-			$gedcom .= "\n" . $fact->getGedcom();
164
-		}
165
-	}
166
-
167
-	$rec1->updateRecord($gedcom, true);
168
-	$rec2->deleteRecord();
169
-	FunctionsDb::updateFavorites($gid2, $gid1, $WT_TREE);
170
-	FlashMessages::addMessage(I18N::translate(
171
-	/* I18N: Records are individuals, sources, etc. */
172
-		'The records “%1$s” and “%2$s” have been merged.',
173
-		'<a class="alert-link" href="' . $rec1->getHtmlUrl() . '">' . $rec1->getFullName() . '</a>',
174
-		$record2_name
175
-	), 'success');
176
-
177
-	header('Location: ' . WT_BASE_URL . Filter::post('url', 'admin_trees_duplicates\.php', WT_SCRIPT_NAME));
178
-
179
-	return;
95
+    // Use the XREF of the record.
96
+    $gid1 = $rec1->getXref();
97
+    $gid2 = $rec2->getXref();
98
+
99
+    $ids = FunctionsDb::fetchAllLinks($gid2, $WT_TREE->getTreeId());
100
+
101
+    // If we are not auto-accepting, then we can show a link to the pending deletion
102
+    if (Auth::user()->getPreference('auto_accept')) {
103
+        $record2_name = $rec2->getFullName();
104
+    } else {
105
+        $record2_name = '<a class="alert-link" href="' . $rec2->getHtmlUrl() . '">' . $rec2->getFullName() . '</a>';
106
+    }
107
+
108
+    foreach ($ids as $id) {
109
+        $record = GedcomRecord::getInstance($id, $WT_TREE);
110
+        if (!$record->isPendingDeletion()) {
111
+            FlashMessages::addMessage(I18N::translate(
112
+                /* I18N: The placeholders are the names of individuals, sources, etc. */
113
+                'The link from “%1$s” to “%2$s” has been updated.',
114
+                    '<a class="alert-link" href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a>',
115
+                    $record2_name
116
+            ), 'info');
117
+            $gedcom = str_replace("@$gid2@", "@$gid1@", $record->getGedcom());
118
+            $gedcom = preg_replace(
119
+                '/(\n1.*@.+@.*(?:(?:\n[2-9].*)*))((?:\n1.*(?:\n[2-9].*)*)*\1)/',
120
+                '$2',
121
+                $gedcom
122
+            );
123
+            $record->updateRecord($gedcom, true);
124
+        }
125
+    }
126
+    // Update any linked user-accounts
127
+    Database::prepare(
128
+        "UPDATE `##user_gedcom_setting`" .
129
+        " SET setting_value=?" .
130
+        " WHERE gedcom_id=? AND setting_name='gedcomid' AND setting_value=?"
131
+    )->execute(array($gid2, $WT_TREE->getTreeId(), $gid1));
132
+
133
+    // Merge hit counters
134
+    $hits = Database::prepare(
135
+        "SELECT page_name, SUM(page_count)" .
136
+        " FROM `##hit_counter`" .
137
+        " WHERE gedcom_id=? AND page_parameter IN (?, ?)" .
138
+        " GROUP BY page_name"
139
+    )->execute(array($WT_TREE->getTreeId(), $gid1, $gid2))->fetchAssoc();
140
+
141
+    foreach ($hits as $page_name => $page_count) {
142
+        Database::prepare(
143
+            "UPDATE `##hit_counter` SET page_count=?" .
144
+            " WHERE gedcom_id=? AND page_name=? AND page_parameter=?"
145
+        )->execute(array($page_count, $WT_TREE->getTreeId(), $page_name, $gid1));
146
+    }
147
+    Database::prepare(
148
+        "DELETE FROM `##hit_counter`" .
149
+        " WHERE gedcom_id=? AND page_parameter=?"
150
+    )->execute(array($WT_TREE->getTreeId(), $gid2));
151
+
152
+    $gedcom = "0 @" . $rec1->getXref() . "@ " . $rec1::RECORD_TYPE;
153
+    foreach ($facts as $fact_id => $fact) {
154
+        $gedcom .= "\n" . $fact->getGedcom();
155
+    }
156
+    foreach ($facts1 as $fact_id => $fact) {
157
+        if (in_array($fact_id, $keep1)) {
158
+            $gedcom .= "\n" . $fact->getGedcom();
159
+        }
160
+    }
161
+    foreach ($facts2 as $fact_id => $fact) {
162
+        if (in_array($fact_id, $keep2)) {
163
+            $gedcom .= "\n" . $fact->getGedcom();
164
+        }
165
+    }
166
+
167
+    $rec1->updateRecord($gedcom, true);
168
+    $rec2->deleteRecord();
169
+    FunctionsDb::updateFavorites($gid2, $gid1, $WT_TREE);
170
+    FlashMessages::addMessage(I18N::translate(
171
+    /* I18N: Records are individuals, sources, etc. */
172
+        'The records “%1$s” and “%2$s” have been merged.',
173
+        '<a class="alert-link" href="' . $rec1->getHtmlUrl() . '">' . $rec1->getFullName() . '</a>',
174
+        $record2_name
175
+    ), 'success');
176
+
177
+    header('Location: ' . WT_BASE_URL . Filter::post('url', 'admin_trees_duplicates\.php', WT_SCRIPT_NAME));
178
+
179
+    return;
180 180
 }
181 181
 
182 182
 $controller->pageHeader();
Please login to merge, or discard this patch.
admin.php 1 patch
Indentation   +478 added lines, -478 removed lines patch added patch discarded remove patch
@@ -33,462 +33,462 @@  discard block
 block discarded – undo
33 33
 // It was generated with the help of a command like this:
34 34
 // git diff 1.6.0..master --name-status | grep ^D
35 35
 $old_files = array(
36
-	// Removed in 1.0.2
37
-	WT_ROOT . 'language/en.mo',
38
-	// Removed in 1.0.3
39
-	WT_ROOT . 'themechange.php',
40
-	// Removed in 1.0.4
41
-	// Removed in 1.0.5
42
-	// Removed in 1.0.6
43
-	WT_ROOT . 'includes/extras',
44
-	// Removed in 1.1.0
45
-	WT_ROOT . 'addremotelink.php',
46
-	WT_ROOT . 'addsearchlink.php',
47
-	WT_ROOT . 'client.php',
48
-	WT_ROOT . 'dir_editor.php',
49
-	WT_ROOT . 'editconfig_gedcom.php',
50
-	WT_ROOT . 'editgedcoms.php',
51
-	WT_ROOT . 'edit_merge.php',
52
-	WT_ROOT . 'genservice.php',
53
-	WT_ROOT . 'includes/classes',
54
-	WT_ROOT . 'includes/controllers',
55
-	WT_ROOT . 'includes/family_nav.php',
56
-	WT_ROOT . 'logs.php',
57
-	WT_ROOT . 'manageservers.php',
58
-	WT_ROOT . 'media.php',
59
-	WT_ROOT . 'module_admin.php',
60
-	//WT_ROOT.'modules', // Do not delete - users may have stored custom modules/data here
61
-	WT_ROOT . 'opensearch.php',
62
-	WT_ROOT . 'PEAR.php',
63
-	WT_ROOT . 'pgv_to_wt.php',
64
-	WT_ROOT . 'places',
65
-	//WT_ROOT.'robots.txt', // Do not delete this - it may contain user data
66
-	WT_ROOT . 'serviceClientTest.php',
67
-	WT_ROOT . 'siteconfig.php',
68
-	WT_ROOT . 'SOAP',
69
-	WT_ROOT . 'themes/clouds/mozilla.css',
70
-	WT_ROOT . 'themes/clouds/netscape.css',
71
-	WT_ROOT . 'themes/colors/mozilla.css',
72
-	WT_ROOT . 'themes/colors/netscape.css',
73
-	WT_ROOT . 'themes/fab/mozilla.css',
74
-	WT_ROOT . 'themes/fab/netscape.css',
75
-	WT_ROOT . 'themes/minimal/mozilla.css',
76
-	WT_ROOT . 'themes/minimal/netscape.css',
77
-	WT_ROOT . 'themes/webtrees/mozilla.css',
78
-	WT_ROOT . 'themes/webtrees/netscape.css',
79
-	WT_ROOT . 'themes/webtrees/style_rtl.css',
80
-	WT_ROOT . 'themes/xenea/mozilla.css',
81
-	WT_ROOT . 'themes/xenea/netscape.css',
82
-	WT_ROOT . 'uploadmedia.php',
83
-	WT_ROOT . 'useradmin.php',
84
-	WT_ROOT . 'webservice',
85
-	WT_ROOT . 'wtinfo.php',
86
-	// Removed in 1.1.1
87
-	// Removed in 1.1.2
88
-	WT_ROOT . 'treenav.php',
89
-	// Removed in 1.2.0
90
-	WT_ROOT . 'themes/clouds/jquery',
91
-	WT_ROOT . 'themes/colors/jquery',
92
-	WT_ROOT . 'themes/fab/jquery',
93
-	WT_ROOT . 'themes/minimal/jquery',
94
-	WT_ROOT . 'themes/webtrees/jquery',
95
-	WT_ROOT . 'themes/xenea/jquery',
96
-	// Removed in 1.2.1
97
-	// Removed in 1.2.2
98
-	WT_ROOT . 'themes/clouds/chrome.css',
99
-	WT_ROOT . 'themes/clouds/opera.css',
100
-	WT_ROOT . 'themes/clouds/print.css',
101
-	WT_ROOT . 'themes/clouds/style_rtl.css',
102
-	WT_ROOT . 'themes/colors/chrome.css',
103
-	WT_ROOT . 'themes/colors/opera.css',
104
-	WT_ROOT . 'themes/colors/print.css',
105
-	WT_ROOT . 'themes/colors/style_rtl.css',
106
-	WT_ROOT . 'themes/fab/chrome.css',
107
-	WT_ROOT . 'themes/fab/opera.css',
108
-	WT_ROOT . 'themes/minimal/chrome.css',
109
-	WT_ROOT . 'themes/minimal/opera.css',
110
-	WT_ROOT . 'themes/minimal/print.css',
111
-	WT_ROOT . 'themes/minimal/style_rtl.css',
112
-	WT_ROOT . 'themes/xenea/chrome.css',
113
-	WT_ROOT . 'themes/xenea/opera.css',
114
-	WT_ROOT . 'themes/xenea/print.css',
115
-	WT_ROOT . 'themes/xenea/style_rtl.css',
116
-	// Removed in 1.2.3
117
-	//WT_ROOT.'modules_v2', // Do not delete - users may have stored custom modules/data here
118
-	// Removed in 1.2.4
119
-	WT_ROOT . 'includes/cssparser.inc.php',
120
-	WT_ROOT . 'modules_v3/gedcom_favorites/help_text.php',
121
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_3_find.php',
122
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_3_search_add.php',
123
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_5_input.js',
124
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_5_input.php',
125
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_7_parse_addLinksTbl.php',
126
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_query_1a.php',
127
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_query_2a.php',
128
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_query_3a.php',
129
-	WT_ROOT . 'modules_v3/lightbox/css/album_page_RTL2.css',
130
-	WT_ROOT . 'modules_v3/lightbox/css/album_page_RTL.css',
131
-	WT_ROOT . 'modules_v3/lightbox/css/album_page_RTL_ff.css',
132
-	WT_ROOT . 'modules_v3/lightbox/css/clearbox_music.css',
133
-	WT_ROOT . 'modules_v3/lightbox/css/clearbox_music_RTL.css',
134
-	WT_ROOT . 'modules_v3/user_favorites/db_schema',
135
-	WT_ROOT . 'modules_v3/user_favorites/help_text.php',
136
-	WT_ROOT . 'search_engine.php',
137
-	WT_ROOT . 'themes/clouds/modules.css',
138
-	WT_ROOT . 'themes/colors/modules.css',
139
-	WT_ROOT . 'themes/fab/modules.css',
140
-	WT_ROOT . 'themes/minimal/modules.css',
141
-	WT_ROOT . 'themes/webtrees/modules.css',
142
-	WT_ROOT . 'themes/xenea/modules.css',
143
-	// Removed in 1.2.5
144
-	WT_ROOT . 'includes/media_reorder_count.php',
145
-	WT_ROOT . 'includes/media_tab_head.php',
146
-	WT_ROOT . 'modules_v3/clippings/index.php',
147
-	WT_ROOT . 'modules_v3/googlemap/css/googlemap_style.css',
148
-	WT_ROOT . 'modules_v3/googlemap/css/wt_v3_places_edit.css',
149
-	WT_ROOT . 'modules_v3/googlemap/index.php',
150
-	WT_ROOT . 'modules_v3/lightbox/index.php',
151
-	WT_ROOT . 'modules_v3/recent_changes/help_text.php',
152
-	WT_ROOT . 'modules_v3/todays_events/help_text.php',
153
-	WT_ROOT . 'sidebar.php',
154
-	// Removed in 1.2.6
155
-	WT_ROOT . 'modules_v3/sitemap/admin_index.php',
156
-	WT_ROOT . 'modules_v3/sitemap/help_text.php',
157
-	WT_ROOT . 'modules_v3/tree/css/styles',
158
-	WT_ROOT . 'modules_v3/tree/css/treebottom.gif',
159
-	WT_ROOT . 'modules_v3/tree/css/treebottomleft.gif',
160
-	WT_ROOT . 'modules_v3/tree/css/treebottomright.gif',
161
-	WT_ROOT . 'modules_v3/tree/css/tree.jpg',
162
-	WT_ROOT . 'modules_v3/tree/css/treeleft.gif',
163
-	WT_ROOT . 'modules_v3/tree/css/treeright.gif',
164
-	WT_ROOT . 'modules_v3/tree/css/treetop.gif',
165
-	WT_ROOT . 'modules_v3/tree/css/treetopleft.gif',
166
-	WT_ROOT . 'modules_v3/tree/css/treetopright.gif',
167
-	WT_ROOT . 'modules_v3/tree/css/treeview_print.css',
168
-	WT_ROOT . 'modules_v3/tree/help_text.php',
169
-	WT_ROOT . 'modules_v3/tree/images/print.png',
170
-	// Removed in 1.2.7
171
-	WT_ROOT . 'login_register.php',
172
-	WT_ROOT . 'modules_v3/top10_givnnames/help_text.php',
173
-	WT_ROOT . 'modules_v3/top10_surnames/help_text.php',
174
-	// Removed in 1.3.0
175
-	WT_ROOT . 'admin_site_ipaddress.php',
176
-	WT_ROOT . 'downloadgedcom.php',
177
-	WT_ROOT . 'export_gedcom.php',
178
-	WT_ROOT . 'gedcheck.php',
179
-	WT_ROOT . 'images',
180
-	WT_ROOT . 'includes/dmsounds_UTF8.php',
181
-	WT_ROOT . 'includes/grampsxml.rng',
182
-	WT_ROOT . 'includes/session_spider.php',
183
-	WT_ROOT . 'modules_v3/googlemap/admin_editconfig.php',
184
-	WT_ROOT . 'modules_v3/googlemap/admin_placecheck.php',
185
-	WT_ROOT . 'modules_v3/googlemap/flags.php',
186
-	WT_ROOT . 'modules_v3/googlemap/images/pedigree_map.gif',
187
-	WT_ROOT . 'modules_v3/googlemap/pedigree_map.php',
188
-	WT_ROOT . 'modules_v3/lightbox/admin_config.php',
189
-	WT_ROOT . 'modules_v3/lightbox/album.php',
190
-	WT_ROOT . 'modules_v3/tree/css/vline.jpg',
191
-	// Removed in 1.3.1
192
-	WT_ROOT . 'imageflush.php',
193
-	WT_ROOT . 'modules_v3/googlemap/wt_v3_pedigree_map.js.php',
194
-	WT_ROOT . 'modules_v3/lightbox/js/tip_balloon_RTL.js',
195
-	// Removed in 1.3.2
196
-	WT_ROOT . 'includes/set_gedcom_defaults.php',
197
-	WT_ROOT . 'modules_v3/address_report',
198
-	WT_ROOT . 'modules_v3/lightbox/functions/lb_horiz_sort.php',
199
-	WT_ROOT . 'modules_v3/random_media/help_text.php',
200
-	// Removed in 1.4.0
201
-	WT_ROOT . 'imageview.php',
202
-	WT_ROOT . 'media/MediaInfo.txt',
203
-	WT_ROOT . 'media/thumbs/ThumbsInfo.txt',
204
-	WT_ROOT . 'modules_v3/GEDFact_assistant/css/media_0_inverselink.css',
205
-	WT_ROOT . 'modules_v3/lightbox/help_text.php',
206
-	WT_ROOT . 'modules_v3/lightbox/images/blank.gif',
207
-	WT_ROOT . 'modules_v3/lightbox/images/close_1.gif',
208
-	WT_ROOT . 'modules_v3/lightbox/images/image_add.gif',
209
-	WT_ROOT . 'modules_v3/lightbox/images/image_copy.gif',
210
-	WT_ROOT . 'modules_v3/lightbox/images/image_delete.gif',
211
-	WT_ROOT . 'modules_v3/lightbox/images/image_edit.gif',
212
-	WT_ROOT . 'modules_v3/lightbox/images/image_link.gif',
213
-	WT_ROOT . 'modules_v3/lightbox/images/images.gif',
214
-	WT_ROOT . 'modules_v3/lightbox/images/image_view.gif',
215
-	WT_ROOT . 'modules_v3/lightbox/images/loading.gif',
216
-	WT_ROOT . 'modules_v3/lightbox/images/next.gif',
217
-	WT_ROOT . 'modules_v3/lightbox/images/nextlabel.gif',
218
-	WT_ROOT . 'modules_v3/lightbox/images/norm_2.gif',
219
-	WT_ROOT . 'modules_v3/lightbox/images/overlay.png',
220
-	WT_ROOT . 'modules_v3/lightbox/images/prev.gif',
221
-	WT_ROOT . 'modules_v3/lightbox/images/prevlabel.gif',
222
-	WT_ROOT . 'modules_v3/lightbox/images/private.gif',
223
-	WT_ROOT . 'modules_v3/lightbox/images/slideshow.jpg',
224
-	WT_ROOT . 'modules_v3/lightbox/images/transp80px.gif',
225
-	WT_ROOT . 'modules_v3/lightbox/images/zoom_1.gif',
226
-	WT_ROOT . 'modules_v3/lightbox/js',
227
-	WT_ROOT . 'modules_v3/lightbox/music',
228
-	WT_ROOT . 'modules_v3/lightbox/pic',
229
-	WT_ROOT . 'themes/_administration/jquery',
230
-	WT_ROOT . 'themes/webtrees/chrome.css',
231
-	// Removed in 1.4.1
232
-	WT_ROOT . 'modules_v3/lightbox/images/image_edit.png',
233
-	WT_ROOT . 'modules_v3/lightbox/images/image_view.png',
234
-	// Removed in 1.4.2
235
-	WT_ROOT . 'modules_v3/lightbox/images/image_view.png',
236
-	WT_ROOT . 'modules_v3/top10_pageviews/help_text.php',
237
-	WT_ROOT . 'themes/_administration/jquery-ui-1.10.0',
238
-	WT_ROOT . 'themes/clouds/jquery-ui-1.10.0',
239
-	WT_ROOT . 'themes/colors/jquery-ui-1.10.0',
240
-	WT_ROOT . 'themes/fab/jquery-ui-1.10.0',
241
-	WT_ROOT . 'themes/minimal/jquery-ui-1.10.0',
242
-	WT_ROOT . 'themes/webtrees/jquery-ui-1.10.0',
243
-	WT_ROOT . 'themes/xenea/jquery-ui-1.10.0',
244
-	// Removed in 1.5.0
245
-	WT_ROOT . 'includes/media_reorder.php',
246
-	WT_ROOT . 'includes/old_messages.php',
247
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_CENS/census_note_decode.php',
248
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_CENS/census_asst_date.php',
249
-	WT_ROOT . 'modules_v3/googlemap/wt_v3_googlemap.js.php',
250
-	WT_ROOT . 'modules_v3/lightbox/functions/lightbox_print_media.php',
251
-	WT_ROOT . 'modules_v3/upcoming_events/help_text.php',
252
-	WT_ROOT . 'modules_v3/stories/help_text.php',
253
-	WT_ROOT . 'modules_v3/user_messages/help_text.php',
254
-	WT_ROOT . 'themes/_administration/favicon.png',
255
-	WT_ROOT . 'themes/_administration/images',
256
-	WT_ROOT . 'themes/_administration/msie.css',
257
-	WT_ROOT . 'themes/_administration/style.css',
258
-	WT_ROOT . 'themes/clouds/favicon.png',
259
-	WT_ROOT . 'themes/clouds/images',
260
-	WT_ROOT . 'themes/clouds/msie.css',
261
-	WT_ROOT . 'themes/clouds/style.css',
262
-	WT_ROOT . 'themes/colors/css',
263
-	WT_ROOT . 'themes/colors/favicon.png',
264
-	WT_ROOT . 'themes/colors/images',
265
-	WT_ROOT . 'themes/colors/ipad.css',
266
-	WT_ROOT . 'themes/colors/msie.css',
267
-	WT_ROOT . 'themes/fab/favicon.png',
268
-	WT_ROOT . 'themes/fab/images',
269
-	WT_ROOT . 'themes/fab/msie.css',
270
-	WT_ROOT . 'themes/fab/style.css',
271
-	WT_ROOT . 'themes/minimal/favicon.png',
272
-	WT_ROOT . 'themes/minimal/images',
273
-	WT_ROOT . 'themes/minimal/msie.css',
274
-	WT_ROOT . 'themes/minimal/style.css',
275
-	WT_ROOT . 'themes/webtrees/favicon.png',
276
-	WT_ROOT . 'themes/webtrees/images',
277
-	WT_ROOT . 'themes/webtrees/msie.css',
278
-	WT_ROOT . 'themes/webtrees/style.css',
279
-	WT_ROOT . 'themes/xenea/favicon.png',
280
-	WT_ROOT . 'themes/xenea/images',
281
-	WT_ROOT . 'themes/xenea/msie.css',
282
-	WT_ROOT . 'themes/xenea/style.css',
283
-	// Removed in 1.5.1
284
-	WT_ROOT . 'themes/_administration/css-1.5.0',
285
-	WT_ROOT . 'themes/clouds/css-1.5.0',
286
-	WT_ROOT . 'themes/colors/css-1.5.0',
287
-	WT_ROOT . 'themes/fab/css-1.5.0',
288
-	WT_ROOT . 'themes/minimal/css-1.5.0',
289
-	WT_ROOT . 'themes/webtrees/css-1.5.0',
290
-	WT_ROOT . 'themes/xenea/css-1.5.0',
291
-	// Removed in 1.5.2
292
-	WT_ROOT . 'themes/_administration/css-1.5.1',
293
-	WT_ROOT . 'themes/clouds/css-1.5.1',
294
-	WT_ROOT . 'themes/colors/css-1.5.1',
295
-	WT_ROOT . 'themes/fab/css-1.5.1',
296
-	WT_ROOT . 'themes/minimal/css-1.5.1',
297
-	WT_ROOT . 'themes/webtrees/css-1.5.1',
298
-	WT_ROOT . 'themes/xenea/css-1.5.1',
299
-	// Removed in 1.5.3
300
-	WT_ROOT . 'modules_v3/GEDFact_assistant/_CENS/census_asst_help.php',
301
-	WT_ROOT . 'modules_v3/googlemap/admin_places.php',
302
-	WT_ROOT . 'modules_v3/googlemap/defaultconfig.php',
303
-	WT_ROOT . 'modules_v3/googlemap/googlemap.php',
304
-	WT_ROOT . 'modules_v3/googlemap/placehierarchy.php',
305
-	WT_ROOT . 'modules_v3/googlemap/places_edit.php',
306
-	WT_ROOT . 'modules_v3/googlemap/util.js',
307
-	WT_ROOT . 'modules_v3/googlemap/wt_v3_places_edit.js.php',
308
-	WT_ROOT . 'modules_v3/googlemap/wt_v3_places_edit_overlays.js.php',
309
-	WT_ROOT . 'modules_v3/googlemap/wt_v3_street_view.php',
310
-	WT_ROOT . 'readme.html',
311
-	WT_ROOT . 'themes/_administration/css-1.5.2',
312
-	WT_ROOT . 'themes/clouds/css-1.5.2',
313
-	WT_ROOT . 'themes/colors/css-1.5.2',
314
-	WT_ROOT . 'themes/fab/css-1.5.2',
315
-	WT_ROOT . 'themes/minimal/css-1.5.2',
316
-	WT_ROOT . 'themes/webtrees/css-1.5.2',
317
-	WT_ROOT . 'themes/xenea/css-1.5.2',
318
-	// Removed in 1.6.0
319
-	WT_ROOT . 'downloadbackup.php',
320
-	WT_ROOT . 'modules_v3/ckeditor/ckeditor-4.3.2-custom',
321
-	WT_ROOT . 'site-php-version.php',
322
-	WT_ROOT . 'themes/_administration/css-1.5.3',
323
-	WT_ROOT . 'themes/clouds/css-1.5.3',
324
-	WT_ROOT . 'themes/colors/css-1.5.3',
325
-	WT_ROOT . 'themes/fab/css-1.5.3',
326
-	WT_ROOT . 'themes/minimal/css-1.5.3',
327
-	WT_ROOT . 'themes/webtrees/css-1.5.3',
328
-	WT_ROOT . 'themes/xenea/css-1.5.3',
329
-	// Removed in 1.6.1
330
-	WT_ROOT . 'includes/authentication.php',
331
-	// Removed in 1.6.2
332
-	WT_ROOT . 'themes/_administration/css-1.6.0',
333
-	WT_ROOT . 'themes/_administration/jquery-ui-1.10.3',
334
-	WT_ROOT . 'themes/clouds/css-1.6.0',
335
-	WT_ROOT . 'themes/clouds/jquery-ui-1.10.3',
336
-	WT_ROOT . 'themes/colors/css-1.6.0',
337
-	WT_ROOT . 'themes/colors/jquery-ui-1.10.3',
338
-	WT_ROOT . 'themes/fab/css-1.6.0',
339
-	WT_ROOT . 'themes/fab/jquery-ui-1.10.3',
340
-	WT_ROOT . 'themes/minimal/css-1.6.0',
341
-	WT_ROOT . 'themes/minimal/jquery-ui-1.10.3',
342
-	WT_ROOT . 'themes/webtrees/css-1.6.0',
343
-	WT_ROOT . 'themes/webtrees/jquery-ui-1.10.3',
344
-	WT_ROOT . 'themes/xenea/css-1.6.0',
345
-	WT_ROOT . 'themes/xenea/jquery-ui-1.10.3',
346
-	WT_ROOT . 'themes/_administration/css-1.6.0',
347
-	WT_ROOT . 'themes/_administration/jquery-ui-1.10.3',
348
-	// Removed in 1.7.0
349
-	WT_ROOT . 'admin_site_other.php',
350
-	WT_ROOT . 'includes/config_data.php',
351
-	WT_ROOT . 'includes/db_schema',
352
-	WT_ROOT . 'includes/fonts',
353
-	WT_ROOT . 'includes/functions',
354
-	WT_ROOT . 'includes/hitcount.php',
355
-	WT_ROOT . 'includes/reportheader.php',
356
-	WT_ROOT . 'includes/specialchars.php',
357
-	WT_ROOT . 'js',
358
-	WT_ROOT . 'language/en_GB.mo', // Replaced with en-GB.mo
359
-	WT_ROOT . 'language/en_US.mo', // Replaced with en-US.mo
360
-	WT_ROOT . 'language/pt_BR.mo', // Replaced with pt-BR.mo
361
-	WT_ROOT . 'language/zh_CN.mo', // Replaced with zh-Hans.mo
362
-	WT_ROOT . 'language/extra',
363
-	WT_ROOT . 'library',
364
-	WT_ROOT . 'modules_v3/batch_update/admin_batch_update.php',
365
-	WT_ROOT . 'modules_v3/batch_update/plugins',
366
-	WT_ROOT . 'modules_v3/charts/help_text.php',
367
-	WT_ROOT . 'modules_v3/ckeditor/ckeditor-4.4.1-custom',
368
-	WT_ROOT . 'modules_v3/clippings/clippings_ctrl.php',
369
-	WT_ROOT . 'modules_v3/clippings/help_text.php',
370
-	WT_ROOT . 'modules_v3/faq/help_text.php',
371
-	WT_ROOT . 'modules_v3/gedcom_favorites/db_schema',
372
-	WT_ROOT . 'modules_v3/gedcom_news/db_schema',
373
-	WT_ROOT . 'modules_v3/googlemap/db_schema',
374
-	WT_ROOT . 'modules_v3/googlemap/help_text.php',
375
-	WT_ROOT . 'modules_v3/html/help_text.php',
376
-	WT_ROOT . 'modules_v3/logged_in/help_text.php',
377
-	WT_ROOT . 'modules_v3/review_changes/help_text.php',
378
-	WT_ROOT . 'modules_v3/todo/help_text.php',
379
-	WT_ROOT . 'modules_v3/tree/class_treeview.php',
380
-	WT_ROOT . 'modules_v3/user_blog/db_schema',
381
-	WT_ROOT . 'modules_v3/yahrzeit/help_text.php',
382
-	WT_ROOT . 'save.php',
383
-	WT_ROOT . 'themes/_administration/css-1.6.2',
384
-	WT_ROOT . 'themes/_administration/templates',
385
-	WT_ROOT . 'themes/_administration/header.php',
386
-	WT_ROOT . 'themes/_administration/footer.php',
387
-	WT_ROOT . 'themes/clouds/css-1.6.2',
388
-	WT_ROOT . 'themes/clouds/templates',
389
-	WT_ROOT . 'themes/clouds/header.php',
390
-	WT_ROOT . 'themes/clouds/footer.php',
391
-	WT_ROOT . 'themes/colors/css-1.6.2',
392
-	WT_ROOT . 'themes/colors/templates',
393
-	WT_ROOT . 'themes/colors/header.php',
394
-	WT_ROOT . 'themes/colors/footer.php',
395
-	WT_ROOT . 'themes/fab/css-1.6.2',
396
-	WT_ROOT . 'themes/fab/templates',
397
-	WT_ROOT . 'themes/fab/header.php',
398
-	WT_ROOT . 'themes/fab/footer.php',
399
-	WT_ROOT . 'themes/minimal/css-1.6.2',
400
-	WT_ROOT . 'themes/minimal/templates',
401
-	WT_ROOT . 'themes/minimal/header.php',
402
-	WT_ROOT . 'themes/minimal/footer.php',
403
-	WT_ROOT . 'themes/webtrees/css-1.6.2',
404
-	WT_ROOT . 'themes/webtrees/templates',
405
-	WT_ROOT . 'themes/webtrees/header.php',
406
-	WT_ROOT . 'themes/webtrees/footer.php',
407
-	WT_ROOT . 'themes/xenea/css-1.6.2',
408
-	WT_ROOT . 'themes/xenea/templates',
409
-	WT_ROOT . 'themes/xenea/header.php',
410
-	WT_ROOT . 'themes/xenea/footer.php',
411
-	// Removed in 1.7.2
412
-	WT_ROOT . 'assets/js-1.7.0',
413
-	WT_ROOT . 'packages/bootstrap-3.3.4',
414
-	WT_ROOT . 'packages/bootstrap-datetimepicker-4.0.0',
415
-	WT_ROOT . 'packages/ckeditor-4.4.7-custom',
416
-	WT_ROOT . 'packages/font-awesome-4.3.0',
417
-	WT_ROOT . 'packages/jquery-1.11.2',
418
-	WT_ROOT . 'packages/jquery-2.1.3',
419
-	WT_ROOT . 'packages/moment-2.10.3',
420
-	// Removed in 1.7.3
421
-	WT_ROOT . 'includes/php_53_compatibility.php',
422
-	WT_ROOT . 'modules_v3/GEDFact_assistant/census/date.js',
423
-	WT_ROOT . 'modules_v3/GEDFact_assistant/census/dynamicoptionlist.js',
424
-	WT_ROOT . 'packages/jquery-cookie-1.4.1/jquery.cookie.js',
425
-	// Removed in 1.7.4
426
-	WT_ROOT . 'assets/js-1.7.2',
427
-	WT_ROOT . 'themes/_administration/css-1.7.0',
428
-	WT_ROOT . 'themes/clouds/css-1.7.0',
429
-	WT_ROOT . 'themes/colors/css-1.7.0',
430
-	WT_ROOT . 'themes/fab/css-1.7.0',
431
-	WT_ROOT . 'themes/minimal/css-1.7.0',
432
-	WT_ROOT . 'themes/webtrees/css-1.7.0',
433
-	WT_ROOT . 'themes/xenea/css-1.7.0',
434
-	WT_ROOT . 'packages/bootstrap-3.3.5',
435
-	WT_ROOT . 'packages/bootstrap-datetimepicker-4.15.35',
436
-	WT_ROOT . 'packages/jquery-1.11.3',
437
-	WT_ROOT . 'packages/jquery-2.1.4',
438
-	WT_ROOT . 'packages/moment-2.10.6',
439
-	// Removed in 1.7.5
440
-	WT_ROOT . 'themes/_administration/css-1.7.4',
441
-	WT_ROOT . 'themes/clouds/css-1.7.4',
442
-	WT_ROOT . 'themes/colors/css-1.7.4',
443
-	WT_ROOT . 'themes/fab/css-1.7.4',
444
-	WT_ROOT . 'themes/minimal/css-1.7.4',
445
-	WT_ROOT . 'themes/webtrees/css-1.7.4',
446
-	WT_ROOT . 'themes/xenea/css-1.7.4',
447
-	// Removed in 1.7.7
448
-	WT_ROOT . 'assets/js-1.7.4',
449
-	WT_ROOT . 'modules_v3/googlemap/images/css_sprite_facts.png',
450
-	WT_ROOT . 'modules_v3/googlemap/images/flag_shadow.png',
451
-	WT_ROOT . 'modules_v3/googlemap/images/shadow-left-large.png',
452
-	WT_ROOT . 'modules_v3/googlemap/images/shadow-left-small.png',
453
-	WT_ROOT . 'modules_v3/googlemap/images/shadow-right-large.png',
454
-	WT_ROOT . 'modules_v3/googlemap/images/shadow-right-small.png',
455
-	WT_ROOT . 'modules_v3/googlemap/images/shadow50.png',
456
-	WT_ROOT . 'modules_v3/googlemap/images/transparent-left-large.png',
457
-	WT_ROOT . 'modules_v3/googlemap/images/transparent-left-small.png',
458
-	WT_ROOT . 'modules_v3/googlemap/images/transparent-right-large.png',
459
-	WT_ROOT . 'modules_v3/googlemap/images/transparent-right-small.png',
460
-	// Removed in 1.7.8
461
-	WT_ROOT . 'themes/clouds/css-1.7.5',
462
-	WT_ROOT . 'themes/colors/css-1.7.5',
463
-	WT_ROOT . 'themes/fab/css-1.7.5',
464
-	WT_ROOT . 'themes/minimal/css-1.7.5',
465
-	WT_ROOT . 'themes/webtrees/css-1.7.5',
466
-	WT_ROOT . 'themes/xenea/css-1.7.5',
467
-	// Removed in 1.7.9
468
-	WT_ROOT . 'assets/js-1.7.7',
36
+    // Removed in 1.0.2
37
+    WT_ROOT . 'language/en.mo',
38
+    // Removed in 1.0.3
39
+    WT_ROOT . 'themechange.php',
40
+    // Removed in 1.0.4
41
+    // Removed in 1.0.5
42
+    // Removed in 1.0.6
43
+    WT_ROOT . 'includes/extras',
44
+    // Removed in 1.1.0
45
+    WT_ROOT . 'addremotelink.php',
46
+    WT_ROOT . 'addsearchlink.php',
47
+    WT_ROOT . 'client.php',
48
+    WT_ROOT . 'dir_editor.php',
49
+    WT_ROOT . 'editconfig_gedcom.php',
50
+    WT_ROOT . 'editgedcoms.php',
51
+    WT_ROOT . 'edit_merge.php',
52
+    WT_ROOT . 'genservice.php',
53
+    WT_ROOT . 'includes/classes',
54
+    WT_ROOT . 'includes/controllers',
55
+    WT_ROOT . 'includes/family_nav.php',
56
+    WT_ROOT . 'logs.php',
57
+    WT_ROOT . 'manageservers.php',
58
+    WT_ROOT . 'media.php',
59
+    WT_ROOT . 'module_admin.php',
60
+    //WT_ROOT.'modules', // Do not delete - users may have stored custom modules/data here
61
+    WT_ROOT . 'opensearch.php',
62
+    WT_ROOT . 'PEAR.php',
63
+    WT_ROOT . 'pgv_to_wt.php',
64
+    WT_ROOT . 'places',
65
+    //WT_ROOT.'robots.txt', // Do not delete this - it may contain user data
66
+    WT_ROOT . 'serviceClientTest.php',
67
+    WT_ROOT . 'siteconfig.php',
68
+    WT_ROOT . 'SOAP',
69
+    WT_ROOT . 'themes/clouds/mozilla.css',
70
+    WT_ROOT . 'themes/clouds/netscape.css',
71
+    WT_ROOT . 'themes/colors/mozilla.css',
72
+    WT_ROOT . 'themes/colors/netscape.css',
73
+    WT_ROOT . 'themes/fab/mozilla.css',
74
+    WT_ROOT . 'themes/fab/netscape.css',
75
+    WT_ROOT . 'themes/minimal/mozilla.css',
76
+    WT_ROOT . 'themes/minimal/netscape.css',
77
+    WT_ROOT . 'themes/webtrees/mozilla.css',
78
+    WT_ROOT . 'themes/webtrees/netscape.css',
79
+    WT_ROOT . 'themes/webtrees/style_rtl.css',
80
+    WT_ROOT . 'themes/xenea/mozilla.css',
81
+    WT_ROOT . 'themes/xenea/netscape.css',
82
+    WT_ROOT . 'uploadmedia.php',
83
+    WT_ROOT . 'useradmin.php',
84
+    WT_ROOT . 'webservice',
85
+    WT_ROOT . 'wtinfo.php',
86
+    // Removed in 1.1.1
87
+    // Removed in 1.1.2
88
+    WT_ROOT . 'treenav.php',
89
+    // Removed in 1.2.0
90
+    WT_ROOT . 'themes/clouds/jquery',
91
+    WT_ROOT . 'themes/colors/jquery',
92
+    WT_ROOT . 'themes/fab/jquery',
93
+    WT_ROOT . 'themes/minimal/jquery',
94
+    WT_ROOT . 'themes/webtrees/jquery',
95
+    WT_ROOT . 'themes/xenea/jquery',
96
+    // Removed in 1.2.1
97
+    // Removed in 1.2.2
98
+    WT_ROOT . 'themes/clouds/chrome.css',
99
+    WT_ROOT . 'themes/clouds/opera.css',
100
+    WT_ROOT . 'themes/clouds/print.css',
101
+    WT_ROOT . 'themes/clouds/style_rtl.css',
102
+    WT_ROOT . 'themes/colors/chrome.css',
103
+    WT_ROOT . 'themes/colors/opera.css',
104
+    WT_ROOT . 'themes/colors/print.css',
105
+    WT_ROOT . 'themes/colors/style_rtl.css',
106
+    WT_ROOT . 'themes/fab/chrome.css',
107
+    WT_ROOT . 'themes/fab/opera.css',
108
+    WT_ROOT . 'themes/minimal/chrome.css',
109
+    WT_ROOT . 'themes/minimal/opera.css',
110
+    WT_ROOT . 'themes/minimal/print.css',
111
+    WT_ROOT . 'themes/minimal/style_rtl.css',
112
+    WT_ROOT . 'themes/xenea/chrome.css',
113
+    WT_ROOT . 'themes/xenea/opera.css',
114
+    WT_ROOT . 'themes/xenea/print.css',
115
+    WT_ROOT . 'themes/xenea/style_rtl.css',
116
+    // Removed in 1.2.3
117
+    //WT_ROOT.'modules_v2', // Do not delete - users may have stored custom modules/data here
118
+    // Removed in 1.2.4
119
+    WT_ROOT . 'includes/cssparser.inc.php',
120
+    WT_ROOT . 'modules_v3/gedcom_favorites/help_text.php',
121
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_3_find.php',
122
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_3_search_add.php',
123
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_5_input.js',
124
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_5_input.php',
125
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_7_parse_addLinksTbl.php',
126
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_query_1a.php',
127
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_query_2a.php',
128
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_query_3a.php',
129
+    WT_ROOT . 'modules_v3/lightbox/css/album_page_RTL2.css',
130
+    WT_ROOT . 'modules_v3/lightbox/css/album_page_RTL.css',
131
+    WT_ROOT . 'modules_v3/lightbox/css/album_page_RTL_ff.css',
132
+    WT_ROOT . 'modules_v3/lightbox/css/clearbox_music.css',
133
+    WT_ROOT . 'modules_v3/lightbox/css/clearbox_music_RTL.css',
134
+    WT_ROOT . 'modules_v3/user_favorites/db_schema',
135
+    WT_ROOT . 'modules_v3/user_favorites/help_text.php',
136
+    WT_ROOT . 'search_engine.php',
137
+    WT_ROOT . 'themes/clouds/modules.css',
138
+    WT_ROOT . 'themes/colors/modules.css',
139
+    WT_ROOT . 'themes/fab/modules.css',
140
+    WT_ROOT . 'themes/minimal/modules.css',
141
+    WT_ROOT . 'themes/webtrees/modules.css',
142
+    WT_ROOT . 'themes/xenea/modules.css',
143
+    // Removed in 1.2.5
144
+    WT_ROOT . 'includes/media_reorder_count.php',
145
+    WT_ROOT . 'includes/media_tab_head.php',
146
+    WT_ROOT . 'modules_v3/clippings/index.php',
147
+    WT_ROOT . 'modules_v3/googlemap/css/googlemap_style.css',
148
+    WT_ROOT . 'modules_v3/googlemap/css/wt_v3_places_edit.css',
149
+    WT_ROOT . 'modules_v3/googlemap/index.php',
150
+    WT_ROOT . 'modules_v3/lightbox/index.php',
151
+    WT_ROOT . 'modules_v3/recent_changes/help_text.php',
152
+    WT_ROOT . 'modules_v3/todays_events/help_text.php',
153
+    WT_ROOT . 'sidebar.php',
154
+    // Removed in 1.2.6
155
+    WT_ROOT . 'modules_v3/sitemap/admin_index.php',
156
+    WT_ROOT . 'modules_v3/sitemap/help_text.php',
157
+    WT_ROOT . 'modules_v3/tree/css/styles',
158
+    WT_ROOT . 'modules_v3/tree/css/treebottom.gif',
159
+    WT_ROOT . 'modules_v3/tree/css/treebottomleft.gif',
160
+    WT_ROOT . 'modules_v3/tree/css/treebottomright.gif',
161
+    WT_ROOT . 'modules_v3/tree/css/tree.jpg',
162
+    WT_ROOT . 'modules_v3/tree/css/treeleft.gif',
163
+    WT_ROOT . 'modules_v3/tree/css/treeright.gif',
164
+    WT_ROOT . 'modules_v3/tree/css/treetop.gif',
165
+    WT_ROOT . 'modules_v3/tree/css/treetopleft.gif',
166
+    WT_ROOT . 'modules_v3/tree/css/treetopright.gif',
167
+    WT_ROOT . 'modules_v3/tree/css/treeview_print.css',
168
+    WT_ROOT . 'modules_v3/tree/help_text.php',
169
+    WT_ROOT . 'modules_v3/tree/images/print.png',
170
+    // Removed in 1.2.7
171
+    WT_ROOT . 'login_register.php',
172
+    WT_ROOT . 'modules_v3/top10_givnnames/help_text.php',
173
+    WT_ROOT . 'modules_v3/top10_surnames/help_text.php',
174
+    // Removed in 1.3.0
175
+    WT_ROOT . 'admin_site_ipaddress.php',
176
+    WT_ROOT . 'downloadgedcom.php',
177
+    WT_ROOT . 'export_gedcom.php',
178
+    WT_ROOT . 'gedcheck.php',
179
+    WT_ROOT . 'images',
180
+    WT_ROOT . 'includes/dmsounds_UTF8.php',
181
+    WT_ROOT . 'includes/grampsxml.rng',
182
+    WT_ROOT . 'includes/session_spider.php',
183
+    WT_ROOT . 'modules_v3/googlemap/admin_editconfig.php',
184
+    WT_ROOT . 'modules_v3/googlemap/admin_placecheck.php',
185
+    WT_ROOT . 'modules_v3/googlemap/flags.php',
186
+    WT_ROOT . 'modules_v3/googlemap/images/pedigree_map.gif',
187
+    WT_ROOT . 'modules_v3/googlemap/pedigree_map.php',
188
+    WT_ROOT . 'modules_v3/lightbox/admin_config.php',
189
+    WT_ROOT . 'modules_v3/lightbox/album.php',
190
+    WT_ROOT . 'modules_v3/tree/css/vline.jpg',
191
+    // Removed in 1.3.1
192
+    WT_ROOT . 'imageflush.php',
193
+    WT_ROOT . 'modules_v3/googlemap/wt_v3_pedigree_map.js.php',
194
+    WT_ROOT . 'modules_v3/lightbox/js/tip_balloon_RTL.js',
195
+    // Removed in 1.3.2
196
+    WT_ROOT . 'includes/set_gedcom_defaults.php',
197
+    WT_ROOT . 'modules_v3/address_report',
198
+    WT_ROOT . 'modules_v3/lightbox/functions/lb_horiz_sort.php',
199
+    WT_ROOT . 'modules_v3/random_media/help_text.php',
200
+    // Removed in 1.4.0
201
+    WT_ROOT . 'imageview.php',
202
+    WT_ROOT . 'media/MediaInfo.txt',
203
+    WT_ROOT . 'media/thumbs/ThumbsInfo.txt',
204
+    WT_ROOT . 'modules_v3/GEDFact_assistant/css/media_0_inverselink.css',
205
+    WT_ROOT . 'modules_v3/lightbox/help_text.php',
206
+    WT_ROOT . 'modules_v3/lightbox/images/blank.gif',
207
+    WT_ROOT . 'modules_v3/lightbox/images/close_1.gif',
208
+    WT_ROOT . 'modules_v3/lightbox/images/image_add.gif',
209
+    WT_ROOT . 'modules_v3/lightbox/images/image_copy.gif',
210
+    WT_ROOT . 'modules_v3/lightbox/images/image_delete.gif',
211
+    WT_ROOT . 'modules_v3/lightbox/images/image_edit.gif',
212
+    WT_ROOT . 'modules_v3/lightbox/images/image_link.gif',
213
+    WT_ROOT . 'modules_v3/lightbox/images/images.gif',
214
+    WT_ROOT . 'modules_v3/lightbox/images/image_view.gif',
215
+    WT_ROOT . 'modules_v3/lightbox/images/loading.gif',
216
+    WT_ROOT . 'modules_v3/lightbox/images/next.gif',
217
+    WT_ROOT . 'modules_v3/lightbox/images/nextlabel.gif',
218
+    WT_ROOT . 'modules_v3/lightbox/images/norm_2.gif',
219
+    WT_ROOT . 'modules_v3/lightbox/images/overlay.png',
220
+    WT_ROOT . 'modules_v3/lightbox/images/prev.gif',
221
+    WT_ROOT . 'modules_v3/lightbox/images/prevlabel.gif',
222
+    WT_ROOT . 'modules_v3/lightbox/images/private.gif',
223
+    WT_ROOT . 'modules_v3/lightbox/images/slideshow.jpg',
224
+    WT_ROOT . 'modules_v3/lightbox/images/transp80px.gif',
225
+    WT_ROOT . 'modules_v3/lightbox/images/zoom_1.gif',
226
+    WT_ROOT . 'modules_v3/lightbox/js',
227
+    WT_ROOT . 'modules_v3/lightbox/music',
228
+    WT_ROOT . 'modules_v3/lightbox/pic',
229
+    WT_ROOT . 'themes/_administration/jquery',
230
+    WT_ROOT . 'themes/webtrees/chrome.css',
231
+    // Removed in 1.4.1
232
+    WT_ROOT . 'modules_v3/lightbox/images/image_edit.png',
233
+    WT_ROOT . 'modules_v3/lightbox/images/image_view.png',
234
+    // Removed in 1.4.2
235
+    WT_ROOT . 'modules_v3/lightbox/images/image_view.png',
236
+    WT_ROOT . 'modules_v3/top10_pageviews/help_text.php',
237
+    WT_ROOT . 'themes/_administration/jquery-ui-1.10.0',
238
+    WT_ROOT . 'themes/clouds/jquery-ui-1.10.0',
239
+    WT_ROOT . 'themes/colors/jquery-ui-1.10.0',
240
+    WT_ROOT . 'themes/fab/jquery-ui-1.10.0',
241
+    WT_ROOT . 'themes/minimal/jquery-ui-1.10.0',
242
+    WT_ROOT . 'themes/webtrees/jquery-ui-1.10.0',
243
+    WT_ROOT . 'themes/xenea/jquery-ui-1.10.0',
244
+    // Removed in 1.5.0
245
+    WT_ROOT . 'includes/media_reorder.php',
246
+    WT_ROOT . 'includes/old_messages.php',
247
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_CENS/census_note_decode.php',
248
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_CENS/census_asst_date.php',
249
+    WT_ROOT . 'modules_v3/googlemap/wt_v3_googlemap.js.php',
250
+    WT_ROOT . 'modules_v3/lightbox/functions/lightbox_print_media.php',
251
+    WT_ROOT . 'modules_v3/upcoming_events/help_text.php',
252
+    WT_ROOT . 'modules_v3/stories/help_text.php',
253
+    WT_ROOT . 'modules_v3/user_messages/help_text.php',
254
+    WT_ROOT . 'themes/_administration/favicon.png',
255
+    WT_ROOT . 'themes/_administration/images',
256
+    WT_ROOT . 'themes/_administration/msie.css',
257
+    WT_ROOT . 'themes/_administration/style.css',
258
+    WT_ROOT . 'themes/clouds/favicon.png',
259
+    WT_ROOT . 'themes/clouds/images',
260
+    WT_ROOT . 'themes/clouds/msie.css',
261
+    WT_ROOT . 'themes/clouds/style.css',
262
+    WT_ROOT . 'themes/colors/css',
263
+    WT_ROOT . 'themes/colors/favicon.png',
264
+    WT_ROOT . 'themes/colors/images',
265
+    WT_ROOT . 'themes/colors/ipad.css',
266
+    WT_ROOT . 'themes/colors/msie.css',
267
+    WT_ROOT . 'themes/fab/favicon.png',
268
+    WT_ROOT . 'themes/fab/images',
269
+    WT_ROOT . 'themes/fab/msie.css',
270
+    WT_ROOT . 'themes/fab/style.css',
271
+    WT_ROOT . 'themes/minimal/favicon.png',
272
+    WT_ROOT . 'themes/minimal/images',
273
+    WT_ROOT . 'themes/minimal/msie.css',
274
+    WT_ROOT . 'themes/minimal/style.css',
275
+    WT_ROOT . 'themes/webtrees/favicon.png',
276
+    WT_ROOT . 'themes/webtrees/images',
277
+    WT_ROOT . 'themes/webtrees/msie.css',
278
+    WT_ROOT . 'themes/webtrees/style.css',
279
+    WT_ROOT . 'themes/xenea/favicon.png',
280
+    WT_ROOT . 'themes/xenea/images',
281
+    WT_ROOT . 'themes/xenea/msie.css',
282
+    WT_ROOT . 'themes/xenea/style.css',
283
+    // Removed in 1.5.1
284
+    WT_ROOT . 'themes/_administration/css-1.5.0',
285
+    WT_ROOT . 'themes/clouds/css-1.5.0',
286
+    WT_ROOT . 'themes/colors/css-1.5.0',
287
+    WT_ROOT . 'themes/fab/css-1.5.0',
288
+    WT_ROOT . 'themes/minimal/css-1.5.0',
289
+    WT_ROOT . 'themes/webtrees/css-1.5.0',
290
+    WT_ROOT . 'themes/xenea/css-1.5.0',
291
+    // Removed in 1.5.2
292
+    WT_ROOT . 'themes/_administration/css-1.5.1',
293
+    WT_ROOT . 'themes/clouds/css-1.5.1',
294
+    WT_ROOT . 'themes/colors/css-1.5.1',
295
+    WT_ROOT . 'themes/fab/css-1.5.1',
296
+    WT_ROOT . 'themes/minimal/css-1.5.1',
297
+    WT_ROOT . 'themes/webtrees/css-1.5.1',
298
+    WT_ROOT . 'themes/xenea/css-1.5.1',
299
+    // Removed in 1.5.3
300
+    WT_ROOT . 'modules_v3/GEDFact_assistant/_CENS/census_asst_help.php',
301
+    WT_ROOT . 'modules_v3/googlemap/admin_places.php',
302
+    WT_ROOT . 'modules_v3/googlemap/defaultconfig.php',
303
+    WT_ROOT . 'modules_v3/googlemap/googlemap.php',
304
+    WT_ROOT . 'modules_v3/googlemap/placehierarchy.php',
305
+    WT_ROOT . 'modules_v3/googlemap/places_edit.php',
306
+    WT_ROOT . 'modules_v3/googlemap/util.js',
307
+    WT_ROOT . 'modules_v3/googlemap/wt_v3_places_edit.js.php',
308
+    WT_ROOT . 'modules_v3/googlemap/wt_v3_places_edit_overlays.js.php',
309
+    WT_ROOT . 'modules_v3/googlemap/wt_v3_street_view.php',
310
+    WT_ROOT . 'readme.html',
311
+    WT_ROOT . 'themes/_administration/css-1.5.2',
312
+    WT_ROOT . 'themes/clouds/css-1.5.2',
313
+    WT_ROOT . 'themes/colors/css-1.5.2',
314
+    WT_ROOT . 'themes/fab/css-1.5.2',
315
+    WT_ROOT . 'themes/minimal/css-1.5.2',
316
+    WT_ROOT . 'themes/webtrees/css-1.5.2',
317
+    WT_ROOT . 'themes/xenea/css-1.5.2',
318
+    // Removed in 1.6.0
319
+    WT_ROOT . 'downloadbackup.php',
320
+    WT_ROOT . 'modules_v3/ckeditor/ckeditor-4.3.2-custom',
321
+    WT_ROOT . 'site-php-version.php',
322
+    WT_ROOT . 'themes/_administration/css-1.5.3',
323
+    WT_ROOT . 'themes/clouds/css-1.5.3',
324
+    WT_ROOT . 'themes/colors/css-1.5.3',
325
+    WT_ROOT . 'themes/fab/css-1.5.3',
326
+    WT_ROOT . 'themes/minimal/css-1.5.3',
327
+    WT_ROOT . 'themes/webtrees/css-1.5.3',
328
+    WT_ROOT . 'themes/xenea/css-1.5.3',
329
+    // Removed in 1.6.1
330
+    WT_ROOT . 'includes/authentication.php',
331
+    // Removed in 1.6.2
332
+    WT_ROOT . 'themes/_administration/css-1.6.0',
333
+    WT_ROOT . 'themes/_administration/jquery-ui-1.10.3',
334
+    WT_ROOT . 'themes/clouds/css-1.6.0',
335
+    WT_ROOT . 'themes/clouds/jquery-ui-1.10.3',
336
+    WT_ROOT . 'themes/colors/css-1.6.0',
337
+    WT_ROOT . 'themes/colors/jquery-ui-1.10.3',
338
+    WT_ROOT . 'themes/fab/css-1.6.0',
339
+    WT_ROOT . 'themes/fab/jquery-ui-1.10.3',
340
+    WT_ROOT . 'themes/minimal/css-1.6.0',
341
+    WT_ROOT . 'themes/minimal/jquery-ui-1.10.3',
342
+    WT_ROOT . 'themes/webtrees/css-1.6.0',
343
+    WT_ROOT . 'themes/webtrees/jquery-ui-1.10.3',
344
+    WT_ROOT . 'themes/xenea/css-1.6.0',
345
+    WT_ROOT . 'themes/xenea/jquery-ui-1.10.3',
346
+    WT_ROOT . 'themes/_administration/css-1.6.0',
347
+    WT_ROOT . 'themes/_administration/jquery-ui-1.10.3',
348
+    // Removed in 1.7.0
349
+    WT_ROOT . 'admin_site_other.php',
350
+    WT_ROOT . 'includes/config_data.php',
351
+    WT_ROOT . 'includes/db_schema',
352
+    WT_ROOT . 'includes/fonts',
353
+    WT_ROOT . 'includes/functions',
354
+    WT_ROOT . 'includes/hitcount.php',
355
+    WT_ROOT . 'includes/reportheader.php',
356
+    WT_ROOT . 'includes/specialchars.php',
357
+    WT_ROOT . 'js',
358
+    WT_ROOT . 'language/en_GB.mo', // Replaced with en-GB.mo
359
+    WT_ROOT . 'language/en_US.mo', // Replaced with en-US.mo
360
+    WT_ROOT . 'language/pt_BR.mo', // Replaced with pt-BR.mo
361
+    WT_ROOT . 'language/zh_CN.mo', // Replaced with zh-Hans.mo
362
+    WT_ROOT . 'language/extra',
363
+    WT_ROOT . 'library',
364
+    WT_ROOT . 'modules_v3/batch_update/admin_batch_update.php',
365
+    WT_ROOT . 'modules_v3/batch_update/plugins',
366
+    WT_ROOT . 'modules_v3/charts/help_text.php',
367
+    WT_ROOT . 'modules_v3/ckeditor/ckeditor-4.4.1-custom',
368
+    WT_ROOT . 'modules_v3/clippings/clippings_ctrl.php',
369
+    WT_ROOT . 'modules_v3/clippings/help_text.php',
370
+    WT_ROOT . 'modules_v3/faq/help_text.php',
371
+    WT_ROOT . 'modules_v3/gedcom_favorites/db_schema',
372
+    WT_ROOT . 'modules_v3/gedcom_news/db_schema',
373
+    WT_ROOT . 'modules_v3/googlemap/db_schema',
374
+    WT_ROOT . 'modules_v3/googlemap/help_text.php',
375
+    WT_ROOT . 'modules_v3/html/help_text.php',
376
+    WT_ROOT . 'modules_v3/logged_in/help_text.php',
377
+    WT_ROOT . 'modules_v3/review_changes/help_text.php',
378
+    WT_ROOT . 'modules_v3/todo/help_text.php',
379
+    WT_ROOT . 'modules_v3/tree/class_treeview.php',
380
+    WT_ROOT . 'modules_v3/user_blog/db_schema',
381
+    WT_ROOT . 'modules_v3/yahrzeit/help_text.php',
382
+    WT_ROOT . 'save.php',
383
+    WT_ROOT . 'themes/_administration/css-1.6.2',
384
+    WT_ROOT . 'themes/_administration/templates',
385
+    WT_ROOT . 'themes/_administration/header.php',
386
+    WT_ROOT . 'themes/_administration/footer.php',
387
+    WT_ROOT . 'themes/clouds/css-1.6.2',
388
+    WT_ROOT . 'themes/clouds/templates',
389
+    WT_ROOT . 'themes/clouds/header.php',
390
+    WT_ROOT . 'themes/clouds/footer.php',
391
+    WT_ROOT . 'themes/colors/css-1.6.2',
392
+    WT_ROOT . 'themes/colors/templates',
393
+    WT_ROOT . 'themes/colors/header.php',
394
+    WT_ROOT . 'themes/colors/footer.php',
395
+    WT_ROOT . 'themes/fab/css-1.6.2',
396
+    WT_ROOT . 'themes/fab/templates',
397
+    WT_ROOT . 'themes/fab/header.php',
398
+    WT_ROOT . 'themes/fab/footer.php',
399
+    WT_ROOT . 'themes/minimal/css-1.6.2',
400
+    WT_ROOT . 'themes/minimal/templates',
401
+    WT_ROOT . 'themes/minimal/header.php',
402
+    WT_ROOT . 'themes/minimal/footer.php',
403
+    WT_ROOT . 'themes/webtrees/css-1.6.2',
404
+    WT_ROOT . 'themes/webtrees/templates',
405
+    WT_ROOT . 'themes/webtrees/header.php',
406
+    WT_ROOT . 'themes/webtrees/footer.php',
407
+    WT_ROOT . 'themes/xenea/css-1.6.2',
408
+    WT_ROOT . 'themes/xenea/templates',
409
+    WT_ROOT . 'themes/xenea/header.php',
410
+    WT_ROOT . 'themes/xenea/footer.php',
411
+    // Removed in 1.7.2
412
+    WT_ROOT . 'assets/js-1.7.0',
413
+    WT_ROOT . 'packages/bootstrap-3.3.4',
414
+    WT_ROOT . 'packages/bootstrap-datetimepicker-4.0.0',
415
+    WT_ROOT . 'packages/ckeditor-4.4.7-custom',
416
+    WT_ROOT . 'packages/font-awesome-4.3.0',
417
+    WT_ROOT . 'packages/jquery-1.11.2',
418
+    WT_ROOT . 'packages/jquery-2.1.3',
419
+    WT_ROOT . 'packages/moment-2.10.3',
420
+    // Removed in 1.7.3
421
+    WT_ROOT . 'includes/php_53_compatibility.php',
422
+    WT_ROOT . 'modules_v3/GEDFact_assistant/census/date.js',
423
+    WT_ROOT . 'modules_v3/GEDFact_assistant/census/dynamicoptionlist.js',
424
+    WT_ROOT . 'packages/jquery-cookie-1.4.1/jquery.cookie.js',
425
+    // Removed in 1.7.4
426
+    WT_ROOT . 'assets/js-1.7.2',
427
+    WT_ROOT . 'themes/_administration/css-1.7.0',
428
+    WT_ROOT . 'themes/clouds/css-1.7.0',
429
+    WT_ROOT . 'themes/colors/css-1.7.0',
430
+    WT_ROOT . 'themes/fab/css-1.7.0',
431
+    WT_ROOT . 'themes/minimal/css-1.7.0',
432
+    WT_ROOT . 'themes/webtrees/css-1.7.0',
433
+    WT_ROOT . 'themes/xenea/css-1.7.0',
434
+    WT_ROOT . 'packages/bootstrap-3.3.5',
435
+    WT_ROOT . 'packages/bootstrap-datetimepicker-4.15.35',
436
+    WT_ROOT . 'packages/jquery-1.11.3',
437
+    WT_ROOT . 'packages/jquery-2.1.4',
438
+    WT_ROOT . 'packages/moment-2.10.6',
439
+    // Removed in 1.7.5
440
+    WT_ROOT . 'themes/_administration/css-1.7.4',
441
+    WT_ROOT . 'themes/clouds/css-1.7.4',
442
+    WT_ROOT . 'themes/colors/css-1.7.4',
443
+    WT_ROOT . 'themes/fab/css-1.7.4',
444
+    WT_ROOT . 'themes/minimal/css-1.7.4',
445
+    WT_ROOT . 'themes/webtrees/css-1.7.4',
446
+    WT_ROOT . 'themes/xenea/css-1.7.4',
447
+    // Removed in 1.7.7
448
+    WT_ROOT . 'assets/js-1.7.4',
449
+    WT_ROOT . 'modules_v3/googlemap/images/css_sprite_facts.png',
450
+    WT_ROOT . 'modules_v3/googlemap/images/flag_shadow.png',
451
+    WT_ROOT . 'modules_v3/googlemap/images/shadow-left-large.png',
452
+    WT_ROOT . 'modules_v3/googlemap/images/shadow-left-small.png',
453
+    WT_ROOT . 'modules_v3/googlemap/images/shadow-right-large.png',
454
+    WT_ROOT . 'modules_v3/googlemap/images/shadow-right-small.png',
455
+    WT_ROOT . 'modules_v3/googlemap/images/shadow50.png',
456
+    WT_ROOT . 'modules_v3/googlemap/images/transparent-left-large.png',
457
+    WT_ROOT . 'modules_v3/googlemap/images/transparent-left-small.png',
458
+    WT_ROOT . 'modules_v3/googlemap/images/transparent-right-large.png',
459
+    WT_ROOT . 'modules_v3/googlemap/images/transparent-right-small.png',
460
+    // Removed in 1.7.8
461
+    WT_ROOT . 'themes/clouds/css-1.7.5',
462
+    WT_ROOT . 'themes/colors/css-1.7.5',
463
+    WT_ROOT . 'themes/fab/css-1.7.5',
464
+    WT_ROOT . 'themes/minimal/css-1.7.5',
465
+    WT_ROOT . 'themes/webtrees/css-1.7.5',
466
+    WT_ROOT . 'themes/xenea/css-1.7.5',
467
+    // Removed in 1.7.9
468
+    WT_ROOT . 'assets/js-1.7.7',
469 469
 );
470 470
 
471 471
 // Delete old files (if we can).
472 472
 $files_to_delete = array();
473 473
 foreach ($old_files as $file) {
474
-	if (file_exists($file) && !File::delete($file)) {
475
-		$files_to_delete[] = $file;
476
-	}
474
+    if (file_exists($file) && !File::delete($file)) {
475
+        $files_to_delete[] = $file;
476
+    }
477 477
 }
478 478
 
479 479
 $controller = new PageController;
480 480
 $controller
481
-	->restrictAccess(Auth::isManager($WT_TREE))
482
-	->setPageTitle(I18N::translate('Control panel') . ' — ' . /* I18N: A summary of the system status */ I18N::translate('Dashboard'))
483
-	->pageHeader();
481
+    ->restrictAccess(Auth::isManager($WT_TREE))
482
+    ->setPageTitle(I18N::translate('Control panel') . ' — ' . /* I18N: A summary of the system status */ I18N::translate('Dashboard'))
483
+    ->pageHeader();
484 484
 
485 485
 // Check for updates
486 486
 $latest_version_txt = Functions::fetchLatestVersion();
487 487
 if (preg_match('/^[0-9.]+\|[0-9.]+\|/', $latest_version_txt)) {
488
-	list($latest_version) = explode('|', $latest_version_txt);
488
+    list($latest_version) = explode('|', $latest_version_txt);
489 489
 } else {
490
-	// Cannot determine the latest version
491
-	$latest_version = '';
490
+    // Cannot determine the latest version
491
+    $latest_version = '';
492 492
 }
493 493
 
494 494
 $update_available = Auth::isAdmin() && $latest_version && version_compare(WT_VERSION, $latest_version) < 0;
@@ -498,85 +498,85 @@  discard block
 block discarded – undo
498 498
 
499 499
 // Administrators
500 500
 $administrators = Database::prepare(
501
-	"SELECT user_id, real_name FROM `##user` JOIN `##user_setting` USING (user_id) WHERE setting_name='canadmin' AND setting_value='1'"
501
+    "SELECT user_id, real_name FROM `##user` JOIN `##user_setting` USING (user_id) WHERE setting_name='canadmin' AND setting_value='1'"
502 502
 )->fetchAll();
503 503
 
504 504
 // Managers
505 505
 $managers = Database::prepare(
506
-	"SELECT user_id, real_name FROM `##user` JOIN `##user_gedcom_setting` USING (user_id)" .
507
-	" WHERE setting_name = 'canedit' AND setting_value='admin'" .
508
-	" GROUP BY user_id, real_name" .
509
-	" ORDER BY real_name"
506
+    "SELECT user_id, real_name FROM `##user` JOIN `##user_gedcom_setting` USING (user_id)" .
507
+    " WHERE setting_name = 'canedit' AND setting_value='admin'" .
508
+    " GROUP BY user_id, real_name" .
509
+    " ORDER BY real_name"
510 510
 )->fetchAll();
511 511
 
512 512
 // Moderators
513 513
 $moderators = Database::prepare(
514
-	"SELECT user_id, real_name FROM `##user` JOIN `##user_gedcom_setting` USING (user_id)" .
515
-	" WHERE setting_name = 'canedit' AND setting_value='accept'" .
516
-	" GROUP BY user_id, real_name" .
517
-	" ORDER BY real_name"
514
+    "SELECT user_id, real_name FROM `##user` JOIN `##user_gedcom_setting` USING (user_id)" .
515
+    " WHERE setting_name = 'canedit' AND setting_value='accept'" .
516
+    " GROUP BY user_id, real_name" .
517
+    " ORDER BY real_name"
518 518
 )->fetchAll();
519 519
 
520 520
 // Number of users who have not verified their email address
521 521
 $unverified = Database::prepare(
522
-	"SELECT user_id, real_name FROM `##user` JOIN `##user_setting` USING (user_id)" .
523
-	" WHERE setting_name = 'verified' AND setting_value = '0'" .
524
-	" ORDER BY real_name"
522
+    "SELECT user_id, real_name FROM `##user` JOIN `##user_setting` USING (user_id)" .
523
+    " WHERE setting_name = 'verified' AND setting_value = '0'" .
524
+    " ORDER BY real_name"
525 525
 )->fetchAll();
526 526
 
527 527
 // Number of users whose accounts are not approved by an administrator
528 528
 $unapproved = Database::prepare(
529
-	"SELECT user_id, real_name FROM `##user` JOIN `##user_setting` USING (user_id)" .
530
-	" WHERE setting_name = 'verified_by_admin' AND setting_value = '0'" .
531
-	" ORDER BY real_name"
529
+    "SELECT user_id, real_name FROM `##user` JOIN `##user_setting` USING (user_id)" .
530
+    " WHERE setting_name = 'verified_by_admin' AND setting_value = '0'" .
531
+    " ORDER BY real_name"
532 532
 )->fetchAll();
533 533
 
534 534
 // Users currently logged in
535 535
 $logged_in = Database::prepare(
536
-	"SELECT DISTINCT user_id, real_name FROM `##user` JOIN `##session` USING (user_id)" .
537
-	" ORDER BY real_name"
536
+    "SELECT DISTINCT user_id, real_name FROM `##user` JOIN `##session` USING (user_id)" .
537
+    " ORDER BY real_name"
538 538
 )->fetchAll();
539 539
 
540 540
 // Count of records
541 541
 $individuals = Database::prepare(
542
-	"SELECT gedcom_id, COUNT(i_id) AS count FROM `##gedcom` LEFT JOIN `##individuals` ON gedcom_id = i_file GROUP BY gedcom_id"
542
+    "SELECT gedcom_id, COUNT(i_id) AS count FROM `##gedcom` LEFT JOIN `##individuals` ON gedcom_id = i_file GROUP BY gedcom_id"
543 543
 )->fetchAssoc();
544 544
 $families = Database::prepare(
545
-	"SELECT gedcom_id, COUNT(f_id) AS count FROM `##gedcom` LEFT JOIN `##families` ON gedcom_id = f_file GROUP BY gedcom_id"
545
+    "SELECT gedcom_id, COUNT(f_id) AS count FROM `##gedcom` LEFT JOIN `##families` ON gedcom_id = f_file GROUP BY gedcom_id"
546 546
 )->fetchAssoc();
547 547
 $sources = Database::prepare(
548
-	"SELECT gedcom_id, COUNT(s_id) AS count FROM `##gedcom` LEFT JOIN `##sources` ON gedcom_id = s_file GROUP BY gedcom_id"
548
+    "SELECT gedcom_id, COUNT(s_id) AS count FROM `##gedcom` LEFT JOIN `##sources` ON gedcom_id = s_file GROUP BY gedcom_id"
549 549
 )->fetchAssoc();
550 550
 $media = Database::prepare(
551
-	"SELECT gedcom_id, COUNT(m_id) AS count FROM `##gedcom` LEFT JOIN `##media` ON gedcom_id = m_file GROUP BY gedcom_id"
551
+    "SELECT gedcom_id, COUNT(m_id) AS count FROM `##gedcom` LEFT JOIN `##media` ON gedcom_id = m_file GROUP BY gedcom_id"
552 552
 )->fetchAssoc();
553 553
 $repositories = Database::prepare(
554
-	"SELECT gedcom_id, COUNT(o_id) AS count FROM `##gedcom` LEFT JOIN `##other` ON gedcom_id = o_file AND o_type = 'REPO' GROUP BY gedcom_id"
554
+    "SELECT gedcom_id, COUNT(o_id) AS count FROM `##gedcom` LEFT JOIN `##other` ON gedcom_id = o_file AND o_type = 'REPO' GROUP BY gedcom_id"
555 555
 )->fetchAssoc();
556 556
 $changes = Database::prepare(
557
-	"SELECT g.gedcom_id, COUNT(change_id) AS count FROM `##gedcom` AS g LEFT JOIN `##change` AS c ON g.gedcom_id = c.gedcom_id AND status = 'pending' GROUP BY g.gedcom_id"
557
+    "SELECT g.gedcom_id, COUNT(change_id) AS count FROM `##gedcom` AS g LEFT JOIN `##change` AS c ON g.gedcom_id = c.gedcom_id AND status = 'pending' GROUP BY g.gedcom_id"
558 558
 )->fetchAssoc();
559 559
 
560 560
 // Server warnings
561 561
 // Note that security support for 5.6 ends after security support for 7.0
562 562
 $server_warnings = array();
563 563
 if (
564
-	PHP_VERSION_ID < 50500 ||
565
-	PHP_VERSION_ID < 50600 && date('Y-m-d') >= '2016-07-10' ||
566
-	PHP_VERSION_ID < 70000 && date('Y-m-d') >= '2018-12-31' ||
567
-	PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70100 && date('Y-m-d') >= '2018-12-03'
564
+    PHP_VERSION_ID < 50500 ||
565
+    PHP_VERSION_ID < 50600 && date('Y-m-d') >= '2016-07-10' ||
566
+    PHP_VERSION_ID < 70000 && date('Y-m-d') >= '2018-12-31' ||
567
+    PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70100 && date('Y-m-d') >= '2018-12-03'
568 568
 ) {
569
-	$server_warnings[] =
570
-		I18N::translate('Your web server is using PHP version %s, which is no longer receiving security updates. You should upgrade to a later version as soon as possible.', PHP_VERSION) .
571
-		'<br><a href="https://php.net/supported-versions.php">https://php.net/supported-versions.php</a>';
569
+    $server_warnings[] =
570
+        I18N::translate('Your web server is using PHP version %s, which is no longer receiving security updates. You should upgrade to a later version as soon as possible.', PHP_VERSION) .
571
+        '<br><a href="https://php.net/supported-versions.php">https://php.net/supported-versions.php</a>';
572 572
 } elseif (
573
-	PHP_VERSION_ID < 50600 ||
574
-	PHP_VERSION_ID < 70000 && date('Y-m-d') >= '2016-12-31' ||
575
-	PHP_VERSION_ID < 70100 && date('Y-m-d') >= '2017-12-03'
573
+    PHP_VERSION_ID < 50600 ||
574
+    PHP_VERSION_ID < 70000 && date('Y-m-d') >= '2016-12-31' ||
575
+    PHP_VERSION_ID < 70100 && date('Y-m-d') >= '2017-12-03'
576 576
 ) {
577
-	$server_warnings[] =
578
-		I18N::translate('Your web server is using PHP version %s, which is no longer maintained. You should upgrade to a later version.', PHP_VERSION) .
579
-		 '<br><a href="https://php.net/supported-versions.php">https://php.net/supported-versions.php</a>';
577
+    $server_warnings[] =
578
+        I18N::translate('Your web server is using PHP version %s, which is no longer maintained. You should upgrade to a later version.', PHP_VERSION) .
579
+            '<br><a href="https://php.net/supported-versions.php">https://php.net/supported-versions.php</a>';
580 580
 }
581 581
 
582 582
 ?>
Please login to merge, or discard this patch.
logout.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 $gedcom = Session::get('GEDCOM', '');
23 23
 
24 24
 if (Auth::id()) {
25
-	Log::addAuthenticationLog('Logout: ' . Auth::user()->getUserName() . '/' . Auth::user()->getRealName());
26
-	Auth::logout();
27
-	FlashMessages::addMessage(I18N::translate('You have signed out.'), 'info');
25
+    Log::addAuthenticationLog('Logout: ' . Auth::user()->getUserName() . '/' . Auth::user()->getRealName());
26
+    Auth::logout();
27
+    FlashMessages::addMessage(I18N::translate('You have signed out.'), 'info');
28 28
 }
29 29
 
30 30
 header('Location: ' . WT_BASE_URL . 'index.php?ged=' . rawurlencode($gedcom));
Please login to merge, or discard this patch.
inverselink.php 1 patch
Indentation   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 
31 31
 $controller = new SimpleController;
32 32
 $controller
33
-	->restrictAccess(Auth::isEditor($WT_TREE))
34
-	->setPageTitle(I18N::translate('Link to an existing media object'))
35
-	->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
36
-	->addInlineJavascript('autocomplete();')
37
-	->pageHeader();
33
+    ->restrictAccess(Auth::isEditor($WT_TREE))
34
+    ->setPageTitle(I18N::translate('Link to an existing media object'))
35
+    ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
36
+    ->addInlineJavascript('autocomplete();')
37
+    ->pageHeader();
38 38
 
39 39
 //-- page parameters and checking
40 40
 $linktoid = Filter::get('linktoid', WT_REGEX_XREF);
@@ -44,119 +44,119 @@  discard block
 block discarded – undo
44 44
 
45 45
 // If GedFAct_assistant/_MEDIA/ installed ======================
46 46
 if ($linkto == 'manage' && Module::getModuleByName('GEDFact_assistant')) {
47
-	require WT_ROOT . WT_MODULES_DIR . 'GEDFact_assistant/_MEDIA/media_0_inverselink.php';
47
+    require WT_ROOT . WT_MODULES_DIR . 'GEDFact_assistant/_MEDIA/media_0_inverselink.php';
48 48
 } else {
49 49
 
50
-	//-- check for admin
51
-	$paramok = true;
52
-	if (!empty($linktoid)) {
53
-		$paramok = GedcomRecord::getInstance($linktoid, $WT_TREE)->canShow();
54
-	}
50
+    //-- check for admin
51
+    $paramok = true;
52
+    if (!empty($linktoid)) {
53
+        $paramok = GedcomRecord::getInstance($linktoid, $WT_TREE)->canShow();
54
+    }
55 55
 
56
-	if ($action == "choose" && $paramok) {
57
-		echo '<form name="link" method="get" action="inverselink.php">';
58
-		echo '<input type="hidden" name="action" value="update">';
59
-		if (!empty($mediaid)) {
60
-			echo '<input type="hidden" name="mediaid" value="', $mediaid, '">';
61
-		}
62
-		if (!empty($linktoid)) {
63
-			echo '<input type="hidden" name="linktoid" value="', $linktoid, '">';
64
-		}
65
-		echo '<input type="hidden" name="linkto" value="', $linkto, '">';
66
-		echo '<input type="hidden" name="ged" value="', $WT_TREE->getNameHtml(), '">';
67
-		echo '<table class="facts_table">';
68
-		echo '<tr><td class="topbottombar" colspan="2">';
69
-		echo I18N::translate('Link to an existing media object');
70
-		echo '</td></tr><tr><td class="descriptionbox width20 wrap">', I18N::translate('Media'), '</td>';
71
-		echo '<td class="optionbox wrap">';
72
-		if (!empty($mediaid)) {
73
-			//-- Get the title of this existing Media item
74
-			$title =
75
-				Database::prepare("SELECT m_titl FROM `##media` where m_id=? AND m_file=?")
76
-				->execute(array($mediaid, $WT_TREE->getTreeId()))
77
-				->fetchOne();
78
-			if ($title) {
79
-				echo '<b>', Filter::escapeHtml($title), '</b>';
80
-			} else {
81
-				echo '<b>', $mediaid, '</b>';
82
-			}
83
-		} else {
84
-			echo '<input data-autocomplete-type="OBJE" type="text" name="mediaid" id="mediaid" size="5">';
85
-			echo ' ', FunctionsPrint::printFindMediaLink('mediaid', '1media');
86
-			echo '</td></tr>';
87
-		}
56
+    if ($action == "choose" && $paramok) {
57
+        echo '<form name="link" method="get" action="inverselink.php">';
58
+        echo '<input type="hidden" name="action" value="update">';
59
+        if (!empty($mediaid)) {
60
+            echo '<input type="hidden" name="mediaid" value="', $mediaid, '">';
61
+        }
62
+        if (!empty($linktoid)) {
63
+            echo '<input type="hidden" name="linktoid" value="', $linktoid, '">';
64
+        }
65
+        echo '<input type="hidden" name="linkto" value="', $linkto, '">';
66
+        echo '<input type="hidden" name="ged" value="', $WT_TREE->getNameHtml(), '">';
67
+        echo '<table class="facts_table">';
68
+        echo '<tr><td class="topbottombar" colspan="2">';
69
+        echo I18N::translate('Link to an existing media object');
70
+        echo '</td></tr><tr><td class="descriptionbox width20 wrap">', I18N::translate('Media'), '</td>';
71
+        echo '<td class="optionbox wrap">';
72
+        if (!empty($mediaid)) {
73
+            //-- Get the title of this existing Media item
74
+            $title =
75
+                Database::prepare("SELECT m_titl FROM `##media` where m_id=? AND m_file=?")
76
+                ->execute(array($mediaid, $WT_TREE->getTreeId()))
77
+                ->fetchOne();
78
+            if ($title) {
79
+                echo '<b>', Filter::escapeHtml($title), '</b>';
80
+            } else {
81
+                echo '<b>', $mediaid, '</b>';
82
+            }
83
+        } else {
84
+            echo '<input data-autocomplete-type="OBJE" type="text" name="mediaid" id="mediaid" size="5">';
85
+            echo ' ', FunctionsPrint::printFindMediaLink('mediaid', '1media');
86
+            echo '</td></tr>';
87
+        }
88 88
 
89
-		if (!isset($linktoid)) {
90
-			$linktoid = '';
91
-		}
92
-		echo '<tr><td class="descriptionbox">';
89
+        if (!isset($linktoid)) {
90
+            $linktoid = '';
91
+        }
92
+        echo '<tr><td class="descriptionbox">';
93 93
 
94
-		if ($linkto == "person") {
95
-			echo I18N::translate('Individual'), "</td>";
96
-			echo '<td class="optionbox wrap">';
97
-			if ($linktoid == "") {
98
-				echo '<input class="pedigree_form" type="text" name="linktoid" id="linktopid" size="3" value="', $linktoid, '"> ';
99
-				echo FunctionsPrint::printFindIndividualLink('linktopid');
100
-			} else {
101
-				$record = Individual::getInstance($linktoid, $WT_TREE);
102
-				echo $record->formatList('span', false, $record->getFullName());
103
-			}
104
-		}
94
+        if ($linkto == "person") {
95
+            echo I18N::translate('Individual'), "</td>";
96
+            echo '<td class="optionbox wrap">';
97
+            if ($linktoid == "") {
98
+                echo '<input class="pedigree_form" type="text" name="linktoid" id="linktopid" size="3" value="', $linktoid, '"> ';
99
+                echo FunctionsPrint::printFindIndividualLink('linktopid');
100
+            } else {
101
+                $record = Individual::getInstance($linktoid, $WT_TREE);
102
+                echo $record->formatList('span', false, $record->getFullName());
103
+            }
104
+        }
105 105
 
106
-		if ($linkto == "family") {
107
-			echo I18N::translate('Family'), '</td>';
108
-			echo '<td class="optionbox wrap">';
109
-			if ($linktoid == "") {
110
-				echo '<input class="pedigree_form" type="text" name="linktoid" id="linktofamid" size="3" value="', $linktoid, '"> ';
111
-				echo FunctionsPrint::printFindFamilyLink('linktofamid');
112
-			} else {
113
-				$record = Family::getInstance($linktoid, $WT_TREE);
114
-				echo $record->formatList('span', false, $record->getFullName());
115
-			}
116
-		}
106
+        if ($linkto == "family") {
107
+            echo I18N::translate('Family'), '</td>';
108
+            echo '<td class="optionbox wrap">';
109
+            if ($linktoid == "") {
110
+                echo '<input class="pedigree_form" type="text" name="linktoid" id="linktofamid" size="3" value="', $linktoid, '"> ';
111
+                echo FunctionsPrint::printFindFamilyLink('linktofamid');
112
+            } else {
113
+                $record = Family::getInstance($linktoid, $WT_TREE);
114
+                echo $record->formatList('span', false, $record->getFullName());
115
+            }
116
+        }
117 117
 
118
-		if ($linkto == "source") {
119
-			echo I18N::translate('Source'), "</td>";
120
-			echo '<td  class="optionbox wrap">';
121
-			if ($linktoid == "") {
122
-				echo '<input class="pedigree_form" type="text" name="linktoid" id="linktosid" size="3" value="', $linktoid, '"> ';
123
-				echo FunctionsPrint::printFindSourceLink('linktosid');
124
-			} else {
125
-				$record = Source::getInstance($linktoid, $WT_TREE);
126
-				echo $record->formatList('span', false, $record->getFullName());
127
-			}
128
-		}
129
-		if ($linkto == "repository") {
130
-			echo I18N::translate('Repository'), "</td>";
131
-			echo '<td  class="optionbox wrap">';
132
-			if ($linktoid == "") {
133
-				echo '<input class="pedigree_form" type="text" name="linktoid" id="linktorid" size="3" value="', $linktoid, '">';
134
-			} else {
135
-				$record = Repository::getInstance($linktoid, $WT_TREE);
136
-				echo $record->formatList('span', false, $record->getFullName());
137
-			}
138
-		}
118
+        if ($linkto == "source") {
119
+            echo I18N::translate('Source'), "</td>";
120
+            echo '<td  class="optionbox wrap">';
121
+            if ($linktoid == "") {
122
+                echo '<input class="pedigree_form" type="text" name="linktoid" id="linktosid" size="3" value="', $linktoid, '"> ';
123
+                echo FunctionsPrint::printFindSourceLink('linktosid');
124
+            } else {
125
+                $record = Source::getInstance($linktoid, $WT_TREE);
126
+                echo $record->formatList('span', false, $record->getFullName());
127
+            }
128
+        }
129
+        if ($linkto == "repository") {
130
+            echo I18N::translate('Repository'), "</td>";
131
+            echo '<td  class="optionbox wrap">';
132
+            if ($linktoid == "") {
133
+                echo '<input class="pedigree_form" type="text" name="linktoid" id="linktorid" size="3" value="', $linktoid, '">';
134
+            } else {
135
+                $record = Repository::getInstance($linktoid, $WT_TREE);
136
+                echo $record->formatList('span', false, $record->getFullName());
137
+            }
138
+        }
139 139
 
140
-		if ($linkto == "note") {
141
-			echo I18N::translate('Shared note'), "</td>";
142
-			echo '<td  class="optionbox wrap">';
143
-			if ($linktoid == "") {
144
-				echo '<input class="pedigree_form" type="text" name="linktoid" id="linktonid" size="3" value="', $linktoid, '">';
145
-			} else {
146
-				$record = Note::getInstance($linktoid, $WT_TREE);
147
-				echo $record->formatList('span', false, $record->getFullName());
148
-			}
149
-		}
140
+        if ($linkto == "note") {
141
+            echo I18N::translate('Shared note'), "</td>";
142
+            echo '<td  class="optionbox wrap">';
143
+            if ($linktoid == "") {
144
+                echo '<input class="pedigree_form" type="text" name="linktoid" id="linktonid" size="3" value="', $linktoid, '">';
145
+            } else {
146
+                $record = Note::getInstance($linktoid, $WT_TREE);
147
+                echo $record->formatList('span', false, $record->getFullName());
148
+            }
149
+        }
150 150
 
151
-		echo '</td></tr>';
152
-		echo '<tr><td class="topbottombar" colspan="2"><input type="submit" value="', /* I18N: A button label (a verb). */ I18N::translate('link'), '"></td></tr>';
153
-		echo '</table>';
154
-		echo '</form>';
155
-	} elseif ($action == "update" && $paramok) {
156
-		$record = GedcomRecord::getInstance($linktoid, $WT_TREE);
157
-		$record->createFact('1 OBJE @' . $mediaid . '@', true);
158
-		$controller->addInlineJavascript('closePopupAndReloadParent();');
151
+        echo '</td></tr>';
152
+        echo '<tr><td class="topbottombar" colspan="2"><input type="submit" value="', /* I18N: A button label (a verb). */ I18N::translate('link'), '"></td></tr>';
153
+        echo '</table>';
154
+        echo '</form>';
155
+    } elseif ($action == "update" && $paramok) {
156
+        $record = GedcomRecord::getInstance($linktoid, $WT_TREE);
157
+        $record->createFact('1 OBJE @' . $mediaid . '@', true);
158
+        $controller->addInlineJavascript('closePopupAndReloadParent();');
159 159
 
160
-	}
161
-	echo '<button onclick="closePopupAndReloadParent();">', I18N::translate('close'), '</button>';
160
+    }
161
+    echo '<button onclick="closePopupAndReloadParent();">', I18N::translate('close'), '</button>';
162 162
 }
Please login to merge, or discard this patch.