Code Duplication    Length = 7-8 lines in 3 locations

install/instprocessor.php 1 location

@@ 117-124 (lines=8) @@
114
// check table prefix
115
if ($installMode == 0) {
116
    echo "<p>" . $_lang['checking_table_prefix'] . $table_prefix . "`: ";
117
    if (@ $rs = mysqli_query($conn, "SELECT COUNT(*) FROM $dbase.`" . $table_prefix . "site_content`")) {
118
        echo '<span class="notok">' . $_lang['failed'] . "</span>" . $_lang['table_prefix_already_inuse'] . "</p>";
119
        $errors += 1;
120
        echo "<p>" . $_lang['table_prefix_already_inuse_note'] . "</p>";
121
        return;
122
    } else {
123
        echo '<span class="ok">'.$_lang['ok']."</span></p>";
124
    }
125
}
126
127
if(!function_exists('parseProperties')) {

install/actions/action_summary.php 2 locations

@@ 240-246 (lines=7) @@
237
// check table prefix
238
if ($conn && $installMode == 0) {
239
    echo '<p>' . $_lang['checking_table_prefix'] . $table_prefix . '`: ';
240
    if ($rs= mysqli_query($conn, "SELECT COUNT(*) FROM $dbase.`" . $table_prefix . "site_content`")) {
241
        echo '<span class="notok">' . $_lang['failed'] . '</span></b>' . $_lang['table_prefix_already_inuse'] . '</p>';
242
        $errors++;
243
        echo "<p>" . $_lang['table_prefix_already_inuse_note'] . '</p>';
244
    } else {
245
        echo '<span class="ok">' . $_lang['ok'] . '</span></p>';
246
    }
247
} elseif ($conn && $installMode == 2) {
248
    echo '<p>' . $_lang['checking_table_prefix'] . $table_prefix . '`: ';
249
    if (!$rs = mysqli_query($conn, "SELECT COUNT(*) FROM $dbase.`" . $table_prefix . "site_content`")) {
@@ 249-255 (lines=7) @@
246
    }
247
} elseif ($conn && $installMode == 2) {
248
    echo '<p>' . $_lang['checking_table_prefix'] . $table_prefix . '`: ';
249
    if (!$rs = mysqli_query($conn, "SELECT COUNT(*) FROM $dbase.`" . $table_prefix . "site_content`")) {
250
        echo '<span class="notok">' . $_lang['failed'] . '</span></b>' . $_lang['table_prefix_not_exist'] . '</p>';
251
        $errors++;
252
        echo '<p>' . $_lang['table_prefix_not_exist_note'] . '</p>';
253
  } else {
254
        echo '<span class="ok">' . $_lang['ok'] . '</span></p>';
255
  }
256
}
257
258
// check mysql version