mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: Require functions in lib/public/Template.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
e9046a0f24
commit
897c2d3934
1 changed files with 12 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue