aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-05-02 11:23:14 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-05-02 11:23:14 +0200
commit5595e038ae681dde19275f9896795cd92cbed5fc (patch)
treef516ff1a263cc8427f4fe5d2f48f34e120f03575
parentb8650be73295336b74a606e3bc567a13e81cfc83 (diff)
downloadnextcloud-server-5595e038ae681dde19275f9896795cd92cbed5fc.tar.gz
nextcloud-server-5595e038ae681dde19275f9896795cd92cbed5fc.zip
Remove unneeded private wrapper methods
-rw-r--r--lib/private/legacy/helper.php31
-rw-r--r--lib/private/template/functions.php6
2 files changed, 2 insertions, 35 deletions
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index e6aaed0fd15..29ee1be76b4 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -67,21 +67,6 @@ class OC_Helper {
}
/**
- * get path to preview of file
- * @param string $path path
- * @return string the url
- *
- * Returns the path to the preview of the file.
- */
- public static function previewIcon($path) {
- return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_preview', ['x' => 32, 'y' => 32, 'file' => $path]);
- }
-
- public static function publicPreviewIcon( $path, $token ) {
- return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_public_preview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]);
- }
-
- /**
* Make a human file size
* @param int $bytes file size in bytes
* @return string a human readable file size
@@ -463,22 +448,6 @@ class OC_Helper {
}
/**
- * Shortens str to maxlen by replacing characters in the middle with '...', eg.
- * ellipsis('a very long string with lots of useless info to make a better example', 14) becomes 'a very ...example'
- *
- * @param string $str the string
- * @param string $maxlen the maximum length of the result
- * @return string with at most maxlen characters
- */
- public static function ellipsis($str, $maxlen) {
- if (strlen($str) > $maxlen) {
- $characters = floor($maxlen / 2);
- return substr($str, 0, $characters) . '...' . substr($str, -1 * $characters);
- }
- return $str;
- }
-
- /**
* calculates the maximum upload size respecting system settings, free space and user quota
*
* @param string $dir the current folder where the user currently operates
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index a57b3575ba9..a0540420e29 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -184,18 +184,16 @@ function mimetype_icon( $mimetype ) {
* Returns the path to the preview of the image.
* @param string $path path of file
* @return link to the preview
- *
- * For further information have a look at OC_Helper::previewIcon
*/
function preview_icon( $path ) {
- return OC_Helper::previewIcon( $path );
+ return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_preview', ['x' => 32, 'y' => 32, 'file' => $path]);
}
/**
* @param string $path
*/
function publicPreview_icon ( $path, $token ) {
- return OC_Helper::publicPreviewIcon( $path, $token );
+ return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_public_preview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]);
}
/**