Code Duplication    Length = 10-10 lines in 2 locations

Sources/ManageScheduledTasks.php 1 location

@@ 154-163 (lines=10) @@
151
		while ($row = $smcFunc['db_fetch_assoc']($request))
152
		{
153
			// What kind of task are we handling?
154
			if (!empty($row['callable']))
155
				$task_string = $row['callable'];
156
157
			// Default SMF task or old mods?
158
			elseif (function_exists('scheduled_' . $row['task']))
159
				$task_string = 'scheduled_' . $row['task'];
160
161
			// One last resource, the task name.
162
			elseif (!empty($row['task']))
163
				$task_string = $row['task'];
164
165
			$start_time = microtime();
166
			// The functions got to exist for us to use it.

Sources/ScheduledTasks.php 1 location

@@ 84-93 (lines=10) @@
81
			$affected_rows = $smcFunc['db_affected_rows']();
82
83
			// What kind of task are we handling?
84
			if (!empty($row['callable']))
85
				$task_string = $row['callable'];
86
87
			// Default SMF task or old mods?
88
			elseif (function_exists('scheduled_' . $row['task']))
89
				$task_string = 'scheduled_' . $row['task'];
90
91
			// One last resource, the task name.
92
			elseif (!empty($row['task']))
93
				$task_string = $row['task'];
94
95
			// The function must exist or we are wasting our time, plus do some timestamp checking, and database check!
96
			if (!empty($task_string) && (!isset($_GET['ts']) || $_GET['ts'] == $row['next_time']) && $affected_rows)