]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Setup: warn if file_auth database exists too
authorBram Matthys <redacted>
Sun, 23 Apr 2023 15:37:09 +0000 (17:37 +0200)
committerBram Matthys <redacted>
Sun, 23 Apr 2023 15:37:09 +0000 (17:37 +0200)
settings/install.php

index 353c16507437dd1de83b36e29b52e73bc4821e65..60acfe6567141216db9d06361e8817601bf41366 100644 (file)
@@ -289,7 +289,7 @@ $writable = (is_writable("../config/")) ? true: false;
                        </button>
                </div>
                <div class="modal-body">
-                       The database already contains tables with webpanel data. 
+                       The database already exists and contains data.
                        If you continue then this existing data will be deleted.
                </div>
                <div class="modal-footer">
@@ -340,6 +340,11 @@ $writable = (is_writable("../config/")) ? true: false;
        }
 
        page3_next.addEventListener('click', e => {
+<?php if (file_exists(UPATH.'/data/database.php')) { ?>
+               $('#db_overwrite_modal').modal();
+               e.preventDefault();
+               return false;
+<?php } ?>
                page3.style.display = 'none';
                page4.style.display = '';
        });
@@ -471,7 +476,8 @@ $writable = (is_writable("../config/")) ? true: false;
        function nextstep()
        {
                $('#db_overwrite_modal').modal('hide');
-               page3_next.click();
+               page3.style.display = 'none';
+               page4.style.display = '';
                window.scrollTo(0,0);
        }
 </script>
\ No newline at end of file