Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

View\FolderDesignDocument didn't support Windows #1

Merged
merged 1 commit into from

2 participants

@marnusw

Since View\FolderDesignDocument uses native php file system functions the getFileData key is returned containing '\'s rather than the '/' used in the subsequent trim and explode. Using the DIRECTORY_SEPARATOR constant rather than '/' provides support for Windows.

@beberlei beberlei merged commit bd59110 into doctrine:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2012
  1. @marnusw
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Doctrine/CouchDB/View/FolderDesignDocument.php
View
2  lib/Doctrine/CouchDB/View/FolderDesignDocument.php
@@ -29,7 +29,7 @@ public function getData()
foreach ($ri AS $path) {
$fileData = $this->getFileData($path);
if ($fileData !== null) {
- $parts = explode("/", ltrim(str_replace($this->folderPath, '', $fileData["key"]), '/'));
+ $parts = explode(DIRECTORY_SEPARATOR, ltrim(str_replace($this->folderPath, '', $fileData["key"]), DIRECTORY_SEPARATOR));
if (count($parts) == 3) {
$this->data[$parts[0]][$parts[1]][$parts[2]] = $fileData["data"];
Something went wrong with that request. Please try again.