BUGFIX #2903 - Fix rewritebase for windows

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@64155 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sminnee 2008-10-13 21:53:08 +00:00
parent 056bc59ec8
commit 2f8b502bda
1 changed files with 6 additions and 3 deletions

View File

@ -456,9 +456,9 @@ class InstallRequirements {
$this->warning($testDetails);
} else {
list($majorRequested, $minorRequested) = explode('.', $version);
$result = mysql_query('SELECT VERSION()');
$row=mysql_fetch_row($result);
$version = ereg_replace("([A-Za-z-])", "", $row[0]);
$result = mysql_query('SELECT VERSION()');
$row=mysql_fetch_row($result);
$version = ereg_replace("([A-Za-z-])", "", $row[0]);
list($majorHas, $minorHas) = explode('.', substr(trim($version), 0, 3));
if(($majorHas > $majorRequested) || ($majorHas == $majorRequested && $minorHas >= $minorRequested)) {
@ -804,7 +804,10 @@ PHP
function createHtaccess() {
$start = "### SILVERSTRIPE START ###\n";
$end = "\n### SILVERSTRIPE END ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
if(defined('DIRECTORY_SEPARATOR')) $base = str_replace('/',DIRECTORY_SEPARATOR, $base);
if($base != '.') $baseClause = "RewriteBase $base\n";
else $baseClause = "";