summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/defaults.php3
-rw-r--r--lib/private/files/cache/changepropagator.php4
-rw-r--r--lib/private/files/filesystem.php9
-rw-r--r--lib/private/image.php2
-rw-r--r--lib/private/installer.php2
5 files changed, 15 insertions, 5 deletions
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index dfcd97aedd6..a3902ee80de 100644
--- a/lib/private/defaults.php
+++ b/lib/private/defaults.php
@@ -215,7 +215,8 @@ class OC_Defaults {
if ($this->themeExist('getShortFooter')) {
$footer = $this->theme->getShortFooter();
} else {
- $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank">' .$this->getEntity() . '</a>'.
+ $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' .
+ ' rel="noreferrer">' .$this->getEntity() . '</a>'.
' – ' . $this->getSlogan();
}
diff --git a/lib/private/files/cache/changepropagator.php b/lib/private/files/cache/changepropagator.php
index 2967c8f6259..36fc6e80144 100644
--- a/lib/private/files/cache/changepropagator.php
+++ b/lib/private/files/cache/changepropagator.php
@@ -59,8 +59,8 @@ class ChangePropagator {
list($storage, $internalPath) = $this->view->resolvePath($parent);
if ($storage) {
$cache = $storage->getCache();
- $id = $cache->getId($internalPath);
- $cache->update($id, array('mtime' => $time, 'etag' => $storage->getETag($internalPath)));
+ $entry = $cache->get($internalPath);
+ $cache->update($entry['fileid'], array('mtime' => max($time, $entry['mtime']), 'etag' => $storage->getETag($internalPath)));
}
}
}
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index e933782ce2f..04f82d88cd1 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -723,9 +723,18 @@ class Filesystem {
* Fix common problems with a file path
* @param string $path
* @param bool $stripTrailingSlash
+ * @param bool $isAbsolutePath
* @return string
*/
public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false) {
+ /**
+ * FIXME: This is a workaround for existing classes and files which call
+ * this function with another type than a valid string. This
+ * conversion should get removed as soon as all existing
+ * function calls have been fixed.
+ */
+ $path = (string)$path;
+
$cacheKey = json_encode([$path, $stripTrailingSlash, $isAbsolutePath]);
if(isset(self::$normalizedPathCache[$cacheKey])) {
diff --git a/lib/private/image.php b/lib/private/image.php
index f5f9a04facc..317b6fde160 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -391,7 +391,7 @@ class OC_Image {
$rotate = 90;
break;
}
- if($flip) {
+ if($flip && function_exists('imageflip')) {
imageflip($this->resource, IMG_FLIP_HORIZONTAL);
}
if ($rotate) {
diff --git a/lib/private/installer.php b/lib/private/installer.php
index b4fbe527b4f..db8f27aeeab 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -241,7 +241,7 @@ class OC_Installer{
if(!isset($data['href'])) {
throw new \Exception($l->t("No href specified when installing app from http"));
}
- copy($data['href'], $path);
+ file_put_contents($path, \OC_Util::getUrlContent($data['href']));
}else{
if(!isset($data['path'])) {
throw new \Exception($l->t("No path specified when installing app from local file"));