Projects
Kolab:Winterfell
chwala
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 6
View file
chwala-0.4.tar.gz/lib/drivers/seafile/seafile_file_storage.php
Changed
@@ -1295,8 +1295,9 @@ { list($file, $repo_id, $library) = $this->find_library($path); - return 'seafile://' . rawurlencode($library['owner']) . '@' . $this->config['host'] - . '/' . file_utils::encode_path($path); + $host = preg_replace('|https?://|i', '', $this->config['host']); + + return 'seafile://' . rawurlencode($library['owner']) . '@' . $host . '/' . file_utils::encode_path($path); } /** @@ -1313,13 +1314,14 @@ throw new Exception("Internal storage error. Unexpected data format.", file_storage::ERROR); } - $user = rawurldecode($matches[1]); - $host = $matches[2]; - $path = file_utils::decode_path($matches[3]); + $user = rawurldecode($matches[1]); + $host = $matches[2]; + $path = file_utils::decode_path($matches[3]); + $c_host = preg_replace('|https?://|i', '', $this->config['host']); list($file, $repo_id, $library) = $this->find_library($path, true); - if (empty($library) || $host != $this->config['host'] || $user != $library['owner']) { + if (empty($library) || $host != $c_host || $user != $library['owner']) { throw new Exception("Internal storage error. Unresolvable URI.", file_storage::ERROR); }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.