diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-03-11 11:48:00 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2025-03-20 10:54:50 +0100 |
commit | 897c2d39342796d32efd84114190b31cd4846ff3 (patch) | |
tree | 38f98a77f0000b68bac661d054ae42849703ab39 | |
parent | e9046a0f24c815ee3a1e88e11c0b24ef569c3235 (diff) | |
download | nextcloud-server-897c2d39342796d32efd84114190b31cd4846ff3.tar.gz nextcloud-server-897c2d39342796d32efd84114190b31cd4846ff3.zip |
fix: Require functions in lib/public/Template.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | lib/public/Template.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/public/Template.php b/lib/public/Template.php index d9b3083319b..1dc6deecf0f 100644 --- a/lib/public/Template.php +++ b/lib/public/Template.php @@ -7,6 +7,11 @@ */ namespace OCP; +/* + * We have to require the functions file because this class contains aliases to the functions + */ +require_once __DIR__ . '/../private/Template/functions.php'; + /** * This class provides the template system for owncloud. You can use it to load * specific templates, add data and generate the html code @@ -24,7 +29,7 @@ class Template extends \OC_Template { * @param string $image * @return string to the image * @since 8.0.0 - * @suppress PhanDeprecatedFunction + * @deprecated 32.0.0 Use the function directly instead */ public static function image_path($app, $image) { return \image_path($app, $image); @@ -37,7 +42,7 @@ class Template extends \OC_Template { * @param string $mimetype * @return string to the image of this file type. * @since 8.0.0 - * @suppress PhanDeprecatedFunction + * @deprecated 32.0.0 Use the function directly instead */ public static function mimetype_icon($mimetype) { return \mimetype_icon($mimetype); @@ -49,7 +54,7 @@ class Template extends \OC_Template { * @param string $path path to file * @return string to the preview of the image * @since 8.0.0 - * @suppress PhanDeprecatedFunction + * @deprecated 32.0.0 Use the function directly instead */ public static function preview_icon($path) { return \preview_icon($path); @@ -63,7 +68,7 @@ class Template extends \OC_Template { * @param string $token * @return string link to the preview * @since 8.0.0 - * @suppress PhanDeprecatedFunction + * @deprecated 32.0.0 Use the function directly instead */ public static function publicPreview_icon($path, $token) { return \publicPreview_icon($path, $token); @@ -76,7 +81,7 @@ class Template extends \OC_Template { * @param int $bytes in bytes * @return string size as string * @since 8.0.0 - * @suppress PhanDeprecatedFunction + * @deprecated 32.0.0 Use the function directly instead */ public static function human_file_size($bytes) { return \human_file_size($bytes); @@ -89,8 +94,8 @@ class Template extends \OC_Template { * @param boolean $dateOnly * @return string human readable interpretation of the timestamp * @since 8.0.0 - * @suppress PhanDeprecatedFunction * @suppress PhanTypeMismatchArgument + * @deprecated 32.0.0 Use the function directly instead */ public static function relative_modified_date($timestamp, $dateOnly = false) { return \relative_modified_date($timestamp, null, $dateOnly); @@ -104,7 +109,7 @@ class Template extends \OC_Template { * @param array $params the parameters * @return string html options * @since 8.0.0 - * @suppress PhanDeprecatedFunction + * @deprecated 32.0.0 Use the function directly instead */ public static function html_select_options($options, $selected, $params = []) { return \html_select_options($options, $selected, $params); |