Install directory August 29, 2015, 03:41:40 pm Not completely setup with my development environment - I still can't seem to get PHPUnit to work with PhpStorm - but I did get Elkarte installed.After installation I automatically get redirected to /install/install.php. Not sure how I can keep the install directory so I can work on it but still test Elkarte. I don't think there is a way to do this without copying the files which is a huge pain for developers.Instead of requiring me to delete the directory, I think we should put a setting in Settings.php $ignore_install_dir. If it is set, it will ignore the install directory warnings.Of course, this means that we need to move the install check further down because we need to load Settings.php. So this proposal is kind of long but before I submit a PR I want to get your opinion.Check if there is an /install directoryCheck if there is a Settings.phpa) If it's not there, redirect to installb) if it is, continueRequire Settings.phpCheck if (empty($ignore_install_dir)a) if it's true, continueb) if it's not, redirect to installEven this method seems hacky to me but it's the best solution I can come up with right now.
Re: Install directory Reply #1 – August 29, 2015, 03:43:49 pm btw, how do we not have a button to create a sub list? The editor is really missing the ability to indent.
Re: Install directory Reply #2 – August 29, 2015, 04:41:51 pm Use the debug variable? If true ignore install, otherwise no?
Re: Install directory Reply #3 – August 29, 2015, 05:38:16 pm I was thinking that but I want to be able to test a page with and without debugging on. Also, this would only be for developers, not admins trying to debug their site or mod developers.
Re: Install directory Reply #4 – August 29, 2015, 05:51:45 pm I just went ahead and submitted a PR: https://github.com/elkarte/Elkarte/pull/2198It's on my main branch so hopefully it gets merged so I don't have to rebase or do anything crazy like that.
Re: Install directory Reply #5 – August 29, 2015, 06:19:01 pm You can use the Vagrant setup I provided to avoid needing to mess about with the install directory.
Re: Install directory Reply #6 – August 29, 2015, 06:48:22 pm I wouldn't be able to edit things and then click refresh to see them changed. I'd have to do another step which defeats the purpose.This makes it much easier for developers to develop. Anything we can do to make development faster/better we should do.On another note, I just found a whole couple of undefined indices on my install
Re: Install directory Reply #7 – August 29, 2015, 06:56:41 pm Ugh, it removed the sample Settings file and I committed that change Okay, in install.php > action_checkFilesExist() instead of renaming the files, it should make a copy of the files. Is there any issue with that? If it's an issue with permissions, we can try to copy it and if that doesn't work rename it.
Re: Install directory Reply #8 – August 30, 2015, 04:48:20 am If I remember correctly, yes, I did a rename to avoid altogether issues with creating new files.No strong opinions on how to deal with it.
Re: Install directory Reply #9 – August 30, 2015, 01:26:08 pm I'm not a Git expert so I need to figure out how best to change this back. A revert will result in another commit which will be ugly.
Re: Install directory Reply #11 – August 30, 2015, 05:03:09 pm If you don't want to have the commit, you could do a rebase -i, remove the commit and then a push -f
Re: Install directory Reply #12 – August 30, 2015, 05:43:00 pm Yeah, someone else said to rebase but I don't really understand how to do it.
Re: Install directory Reply #13 – August 30, 2015, 06:47:46 pm You can also start a new branch from 1.1 and then cherry pick the (2) commits from your other branch and submit that as a new PR and cancel the current ... git be wild !A good right-click tool is tortoisegit, easier than learning the CLI. PHPStorm also has a history view, so if you open the file you accidentally chanced, you can get the last history, save and re-commit it (undoing the changes) .. extra commit in the PR but should work as well.
Re: Install directory Reply #14 – August 31, 2015, 01:52:51 am You can see rebase as an automated cherry-picking: you go back of a certain amount of commits (e.g. HEAD~6 six commits) and you do what you want with them, including removing, merging, splitting, reorder, etc.