Bug prevents downloading latest WordPress

Dec 13, 2011 at 10:13 PM
Edited Dec 13, 2011 at 10:13 PM

Hey Ben,

 

I have updated the index.php to get the latest Wordpress 3.3 but there is a bug in your conditional. Even though i don't provide a source parameter, it still doesn't download 3.3 as I have specified.  It forces me to delete the whole if statement and source parameter.

 

if($this->p->get('source') != '' && $fs->exists($this->p->get('source'))) {
            // Use WordPress codebase from source parameter
            $this->log("Copying WordPress from " . $this->p->get('source'));
            $fs->copy($this->p->get('source'), $this->mAppRoot);
        } else {
            // Download and unpack WordPress
            $this->log('Downloading WordPress');
            $file = $this->curlFile("http://wordpress.org/wordpress-3.3.zip", $tmp);
            $this->log('Extracting WordPress');
            $this->unzip($file, $tmp);
            $this->log('Moving WordPress files to ' . $this->mAppRoot);
            $fs->move("$tmp\wordpress", $this->mAppRoot);
        }

 

BTW you may just put the path = "http://wordpress.org/latest.zip"  instead of the version. 

Cheers,

Houman

Editor
Dec 16, 2011 at 12:24 AM

Houman,

I am working on updating the WordPress scaffold now. I change the archive url to http://wordpress.org/wordpress-3.3.zip and it worked perfectly. My deployment is up and running now. Did you change anything else in that file?

I am not using http://wordpress.org/latest.zip because I want to make sure all the plugins required to run WordPress on Windows Azure work with the install. The only way to ensure that is to target a specific version and test when the new one comes out. Unfortunate but unavoidable.

Cheers,
Ben

Editor
Dec 20, 2011 at 6:11 PM

Houman,

I updated the scaffolder. It does not seem to have any problems with either the new version of WordPress or the source conditional

Ben

Dec 20, 2011 at 8:53 PM

Thanks Ben,

 

I see you have also cleaned up the code quite a bit.

It works so far flawlessly for me.  I will let you know as soon as its up and running.

 

Thanks,
Houman