@@ 404-411 (lines=8) @@ | ||
401 | $tplfile->setVar('tpl_lastmodified', time()); |
|
402 | $tplfile->setVar('tpl_lastimported', 0); |
|
403 | $tplfile->setVar('tpl_type', 'module'); |
|
404 | if ($isnew) { |
|
405 | if (!$tplfileHandler->insert($tplfile)) { |
|
406 | echo '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($file) . '</b> to the database.</span><br>'; |
|
407 | } else { |
|
408 | $tplid = $tplfile->getVar('tpl_id'); |
|
409 | echo 'Template <b>' . htmlspecialchars($file) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)<br>'; |
|
410 | } |
|
411 | } |
|
412 | if (!$tplfileHandler->forceUpdate($tplfile)) { |
|
413 | echo '<span style="color:#ff0000;">ERROR: Could not update template <b>' . htmlspecialchars($file) . '</b> to the database.</span><br>'; |
|
414 | } else { |
|
@@ 412-417 (lines=6) @@ | ||
409 | echo 'Template <b>' . htmlspecialchars($file) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)<br>'; |
|
410 | } |
|
411 | } |
|
412 | if (!$tplfileHandler->forceUpdate($tplfile)) { |
|
413 | echo '<span style="color:#ff0000;">ERROR: Could not update template <b>' . htmlspecialchars($file) . '</b> to the database.</span><br>'; |
|
414 | } else { |
|
415 | $tplid = $tplfile->getVar('tpl_id'); |
|
416 | echo 'Template <b>' . htmlspecialchars($file) . '</b> updated to the database. (ID: <b>' . $tplid . '</b>)<br>'; |
|
417 | } |
|
418 | ||
419 | return null; |
|
420 | } |