Skip to content

Commit

Permalink
Refix #812, by removing the decoding in file_proxy instead of not enc…
Browse files Browse the repository at this point in the history
…oding in Item_Model when creating the relative_path_cache.
  • Loading branch information
Tim Almdal committed Oct 28, 2009
1 parent 145a3f8 commit 051a7ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions modules/gallery/controllers/file_proxy.php
Expand Up @@ -32,10 +32,6 @@ public function __call($function, $args) {
$request_uri = $this->input->server("REQUEST_URI");
$request_uri = preg_replace("/\?.*/", "", $request_uri);

// Unescape %7E (~), %20 ( ) and %27 (')
// @todo: figure out why we have to do this and unescape everything appropriate
$request_uri = str_replace(array("%7E", "%20", "%27"), array("~", " ", "'"), $request_uri);

// var_uri: http://example.com/gallery3/var/
$var_uri = url::file("var/");

Expand Down
2 changes: 1 addition & 1 deletion modules/gallery/models/item.php
Expand Up @@ -294,7 +294,7 @@ private function _build_relative_caches() {
->orderby("left_ptr", "ASC")
->get() as $row) {
// Don't encode the names segment
$names[] = $row->name;
$names[] = rawurlencode($row->name);
$slugs[] = rawurlencode($row->slug);
}
$this->relative_path_cache = implode($names, "/");
Expand Down

0 comments on commit 051a7ae

Please sign in to comment.