Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create.php checks for data.xml in an images directory? #32

Open
dafrancis opened this issue Jan 26, 2015 · 1 comment
Open

create.php checks for data.xml in an images directory? #32

dafrancis opened this issue Jan 26, 2015 · 1 comment

Comments

@dafrancis
Copy link

I'm confused about a certain line in create.php

https://github.com/ramiismail/dopresskit/blob/master/archive/create.php#L335

From what I understand the code works something like this (I'm using pseudocode here):

if (upgrade) {
    ...
    // Show the todo list for upgrading
    ...
} else if (installation) {
    ...
    // Show the todo list for installation
    ...
} else {
    // It's a game page
    if (game_data_xml_exists) {
        // Finished!!!
    } else {
        // Show todo list for game page
        if (there_is_a_data_xml_file_in_images_directory) { // <-- WTF?
            // Finished!!!
        } else if (required_done) {
            // final step asking to change _data.xml to data.xml
        }
    }
}

What I don't understand is why data.xml would be in the images directory. There's no other code that reads this later on.

Also, if this meant to be the data.xml file in the game directory then that puzzles me even more, since that would go to the other branch of the if statement (the first "// Finished!!!" in the code above).

Is this intentional or accidental? As far as I can see, this won't actually cause any errors but it does add some cruft to the code which threw me off.

@paulcanning
Copy link

With the state of some of the code, I'd say it's just an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants