Skip to content

Commit

Permalink
Updated to use Drupal 7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
satish-nikam committed Jan 6, 2012
1 parent d45a4d7 commit 55a71e6
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions Drupal/source/index.php
Expand Up @@ -113,11 +113,11 @@ public function runCommand($scaffolderFile, $rootPath, $diagnosticsConnectionStr

// Download and unpack Drupal
$this->log('Downloading Drupal');
$file = $this->curlFile("http://ftp.drupal.org/files/projects/drupal-7.9.zip", $tmp);
$file = $this->curlFile("http://ftp.drupal.org/files/projects/drupal-7.10.zip", $tmp);
$this->log('Extracting Drupal');
$this->unzip($file, $tmp);
$this->log('Moving Drupal files to ' . $approot);
$this->move("$tmp\drupal-7.9", $approot);
$this->move("$tmp\drupal-7.10", $approot);

// Download and unpack Drupal 7 driver for SQL Server and SQL Azure
// Note: We are using development version because stable version does not work with PHP 5.3.8
Expand Down Expand Up @@ -150,9 +150,29 @@ public function runCommand($scaffolderFile, $rootPath, $diagnosticsConnectionStr
$this->move("$tmp\\ctools", $approot . "\sites\\all\modules\\ctools");

// Remove tmp build folder
@unlink($tmp);
$this->removeDir($tmp);
unlink(realpath($rootPath) . "\\Params.class.php");
}

/**
* Removes a given directory and everything in it
*
* @param String $path
*/
private function removeDir($path) {
// Open the source directory to read in files
$i = new DirectoryIterator($path);
foreach($i as $f) {
if($f->isFile()) {
unlink($f->getRealPath());
} else if(!$f->isDot() && $f->isDir()) {
$this->removeDir($f->getRealPath());
//rmdir($f->getRealPath());
}
}
rmdir($path);
}

private function move($src, $dest) {
// If source is not a directory stop processing
if(!is_dir($src)) return false;
Expand Down

0 comments on commit 55a71e6

Please sign in to comment.