Feel free to change the database stuff to return the same response object,
if it makes things easier and less redundant (I like the idea too). I
certainly don't want two files that seem to do the same thing.

If we can agree on just checking the database I could also just quickly add
saving to the database. I've already started and the only question is what
state to save to start with, though that can be determined latter and we
could just save a dummy state for now.


On Sat, Feb 1, 2014 at 4:15 PM, seanblue <notifications@github.com> wrote:

> In PHP/CommonMethods.php:
>
> > @@ -37,4 +37,16 @@ function projectExists($projectName) {
> >      return is_dir("projects/" . $projectName);
> >  }
> >
> > +/**
> > + * Returns all existing projects.
> > + */
> > +function getExistingsProjects() {
> > +    function filter($var) {
> > +        return (strpos($var, ".") !== 0);
> > +    }
> > +
> > +    $projects = scandir("projects/");
>
> I'm fine with that. But since the new project code doesn't save to the
> database yet, this is the only solution I could use. Do you want to just
> update all of that afterward, once this is merged in?
>
> The only problem with the getProjectState.php is that it just echos the
> state. It isn't part of a large response object. Loading a project needs to
> also return the name, and I like always having the success and errorMessage
> keys as well.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/KSHSK/WAVED/pull/57/files#r9367263>
> .
>