| @@ 1126-1133 (lines=8) @@ | ||
| 1123 | ||
| 1124 | return; |
|
| 1125 | } |
|
| 1126 | if (!is_null($save_sql_id_as)) { |
|
| 1127 | $sql_id = @mysqli_insert_id($sqlParser->conn); |
|
| 1128 | if (!$sql_id) { |
|
| 1129 | $idQuery = mysqli_fetch_assoc(mysqli_query($sqlParser->conn, |
|
| 1130 | "SELECT id FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$name' LIMIT 1;")); |
|
| 1131 | $sql_id = $idQuery['id']; |
|
| 1132 | } |
|
| 1133 | $custom_placeholders[$save_sql_id_as] = $sql_id; |
|
| 1134 | } |
|
| 1135 | echo " $name: " . $_lang['upgraded'] . PHP_EOL; |
|
| 1136 | } else { |
|
| @@ 323-330 (lines=8) @@ | ||
| 320 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
|
| 321 | return; |
|
| 322 | } |
|
| 323 | if(!is_null($save_sql_id_as)) { |
|
| 324 | $sql_id = @mysqli_insert_id($sqlParser->conn); |
|
| 325 | if(!$sql_id) { |
|
| 326 | $idQuery = mysqli_fetch_assoc(mysqli_query($sqlParser->conn, "SELECT id FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$name' LIMIT 1;")); |
|
| 327 | $sql_id = $idQuery['id']; |
|
| 328 | } |
|
| 329 | $custom_placeholders[$save_sql_id_as] = $sql_id; |
|
| 330 | } |
|
| 331 | echo "<p> $name: <span class=\"ok\">" . $_lang['upgraded'] . "</span></p>"; |
|
| 332 | } else { |
|
| 333 | if (!@ mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_templates` (templatename,description,content,category,locked) VALUES('$name','$desc','$template',$category_id,'$locked');")) { |
|