Permalink
Browse files

Installer updates for compatibility on Windows.

  • Loading branch information...
jaronkk committed Mar 13, 2012
1 parent bbc5aea commit ab84f2b14608d9c2ae844c0c41c92c2207e9785c
Showing with 5 additions and 3 deletions.
  1. +2 −1 admin/classes/common/Utility.php
  2. +3 −2 install/CORALInstaller.php
@@ -50,7 +50,8 @@ public function getCORALPath(){
//returns file path for this module, i.e. /coral/licensing/
public function getModulePath(){
- return preg_replace("/\/admin\/classes\/common$/", "", dirname(__FILE__));
+ $replace_path = preg_quote(DIRECTORY_SEPARATOR."admin".DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."common");
+ return preg_replace("/$replace_path$/", "", dirname(__FILE__));
}
@@ -138,7 +138,8 @@ public function displayMessages() {
public function modulePath() {
//returns file path for this module, i.e. /coral/licensing/
- return preg_replace("/\/install$/", "", dirname(__FILE__));
+ $replace_path = preg_quote(DIRECTORY_SEPARATOR."install");
+ return preg_replace("/$replace_path$/", "", dirname(__FILE__));
}
public function configFilePath() {
@@ -176,7 +177,7 @@ public function hasPermissions($permissions) {
public function tableExists($table) {
foreach ($this->query("SHOW TABLES") as $row) {
- if ($row[0] == $table) {
+ if (strtolower($row[0]) == strtolower($table)) {
return true;
}
}

0 comments on commit ab84f2b

Please sign in to comment.