diff options
author | friendica <info@friendica.com> | 2014-01-10 00:47:40 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-10 00:47:40 -0800 |
commit | 3298768d957421743eaa56dec5381141ab094d53 (patch) | |
tree | d6fb45b58719e61e5962546bbb111ed66276a71c /include | |
parent | ee2bea37e9a46e8dcd6b7df655fc56c1feb8132e (diff) | |
download | volse-hubzilla-3298768d957421743eaa56dec5381141ab094d53.tar.gz volse-hubzilla-3298768d957421743eaa56dec5381141ab094d53.tar.bz2 volse-hubzilla-3298768d957421743eaa56dec5381141ab094d53.zip |
directory creation error, display localtimes on cloud webpage, doc updates
Diffstat (limited to 'include')
-rw-r--r-- | include/attach.php | 2 | ||||
-rw-r--r-- | include/reddav.php | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/attach.php b/include/attach.php index f14a2c61a..d339ce6f9 100644 --- a/include/attach.php +++ b/include/attach.php @@ -602,7 +602,7 @@ function attach_mkdir($channel,$observer_hash,$arr = null) { $created = datetime_convert(); $r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, filetype, filesize, revision, folder, flags, data, created, edited, allow_cid, allow_gid, deny_cid, deny_gid ) - VALUES ( %d, %d, '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", + VALUES ( %d, %d, '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", intval($channel['channel_account_id']), intval($channel_id), dbesc($arr['hash']), diff --git a/include/reddav.php b/include/reddav.php index 2aedeed04..b2683885d 100644 --- a/include/reddav.php +++ b/include/reddav.php @@ -674,6 +674,7 @@ class RedBasicAuth extends Sabre\DAV\Auth\Backend\AbstractBasic { public $browser; public $owner_id; public $owner_nick = ''; + public $timezone; protected function validateUserPass($username, $password) { require_once('include/auth.php'); @@ -758,6 +759,9 @@ class RedBrowser extends DAV\Browser\Plugin { public function generateDirectoryIndex($path) { + if($this->auth->timezone) + date_default_timezone_set($this->auth->timezone); + $version = ''; $html = " @@ -852,7 +856,7 @@ class RedBrowser extends DAV\Browser\Plugin { if (!$type) $type = 'Unknown'; $size = isset($file[200]['{DAV:}getcontentlength'])?(int)$file[200]['{DAV:}getcontentlength']:''; - $lastmodified = isset($file[200]['{DAV:}getlastmodified'])?$file[200]['{DAV:}getlastmodified']->getTime()->format(\DateTime::ATOM):''; + $lastmodified = ((isset($file[200]['{DAV:}getlastmodified']))? $file[200]['{DAV:}getlastmodified']->getTime()->format('Y-m-d H:i:s') :''); $fullPath = DAV\URLUtil::encodePath('/' . trim($this->server->getBaseUri() . ($path?$path . '/':'') . $name,'/')); @@ -882,7 +886,7 @@ class RedBrowser extends DAV\Browser\Plugin { <td><a href=\"{$fullPath}\">{$displayName}</a></td> <td>{$type}</td> <td>{$size}</td> - <td>{$lastmodified}</td> + <td>" . datetime_convert('UTC', date_default_timezone_get(),$lastmodified) . "</td> </tr>"; } |