Code Duplication    Length = 21-21 lines in 2 locations

htdocs/include/functions.php 2 locations

@@ 307-327 (lines=21) @@
304
 * @param string $title
305
 * @return void
306
 */
307
function xoops_error($msg, $title = '')
308
{
309
    echo '<div class="errorMsg">';
310
    if ($title != '') {
311
        echo '<strong>' . $title . '</strong><br><br>';
312
    }
313
    if (is_object($msg)) {
314
        $msg = (array)$msg;
315
    }
316
    if (is_array($msg)) {
317
        foreach ($msg as $key => $value) {
318
            if (is_numeric($key)) {
319
                $key = '';
320
            }
321
            xoops_error($value, $key);
322
        }
323
    } else {
324
        echo "<div>{$msg}</div>";
325
    }
326
    echo '</div>';
327
}
328
329
/**
330
 * xoops_result
@@ 336-356 (lines=21) @@
333
 * @param string $title
334
 * @return void
335
 */
336
function xoops_result($msg, $title = '')
337
{
338
    echo '<div class="resultMsg">';
339
    if ($title != '') {
340
        echo '<strong>' . $title . '</strong><br><br>';
341
    }
342
    if (is_object($msg)) {
343
        $msg = (array)$msg;
344
    }
345
    if (is_array($msg)) {
346
        foreach ($msg as $key => $value) {
347
            if (is_numeric($key)) {
348
                $key = '';
349
            }
350
            xoops_result($value, $key);
351
        }
352
    } else {
353
        echo "<div>{$msg}</div>";
354
    }
355
    echo '</div>';
356
}
357
358
/**
359
 * xoops_confirm()