Code Duplication    Length = 15-19 lines in 2 locations

Sources/Subs.php 1 location

@@ 111-129 (lines=19) @@
108
					}
109
110
					// What about unapproved COPPA registrations?
111
					if (!empty($modSettings['coppaType']) && $modSettings['coppaType'] != 1)
112
					{
113
						$result = $smcFunc['db_query']('', '
114
						SELECT COUNT(*)
115
						FROM {db_prefix}members
116
						WHERE is_activated = {int:coppa_approval}',
117
							array(
118
								'coppa_approval' => 5,
119
							)
120
						);
121
						list ($coppa_approvals) = $smcFunc['db_fetch_row']($result);
122
						$smcFunc['db_free_result']($result);
123
124
						// Add this to the number of unapproved members
125
						if (!empty($changes['unapprovedMembers']))
126
							$changes['unapprovedMembers'] += $coppa_approvals;
127
						else
128
							$changes['unapprovedMembers'] = $coppa_approvals;
129
					}
130
				}
131
			}
132
			updateSettings($changes);

Sources/Post.php 1 location

@@ 94-108 (lines=15) @@
91
	}
92
93
	// No message is complete without a topic.
94
	if (empty($topic) && !empty($_REQUEST['msg']))
95
	{
96
		$request = $smcFunc['db_query']('', '
97
			SELECT id_topic
98
			FROM {db_prefix}messages
99
			WHERE id_msg = {int:msg}',
100
			array(
101
				'msg' => (int) $_REQUEST['msg'],
102
		));
103
		if ($smcFunc['db_num_rows']($request) != 1)
104
			unset($_REQUEST['msg'], $_POST['msg'], $_GET['msg']);
105
		else
106
			list ($topic) = $smcFunc['db_fetch_row']($request);
107
		$smcFunc['db_free_result']($request);
108
	}
109
110
	// Check if it's locked. It isn't locked if no topic is specified.
111
	if (!empty($topic))