@@ -525,44 +525,6 @@ public static function checkLoggedIn(): void {
525525 }
526526 }
527527
528- /**
529- * Check if the user is a admin, redirects to home if not
530- *
531- * @deprecated 32.0.0
532- */
533- public static function checkAdminUser (): void {
534- self ::checkLoggedIn ();
535- if (!OC_User::isAdminUser (OC_User::getUser ())) {
536- header ('Location: ' . Util::linkToAbsolute ('' , 'index.php ' ));
537- exit ();
538- }
539- }
540-
541- /**
542- * Returns the URL of the default page
543- * based on the system configuration and
544- * the apps visible for the current user
545- *
546- * @return string URL
547- * @deprecated 32.0.0 use IURLGenerator's linkToDefaultPageUrl directly
548- */
549- public static function getDefaultPageUrl () {
550- /** @var IURLGenerator $urlGenerator */
551- $ urlGenerator = Server::get (IURLGenerator::class);
552- return $ urlGenerator ->linkToDefaultPageUrl ();
553- }
554-
555- /**
556- * Redirect to the user default page
557- *
558- * @deprecated 32.0.0
559- */
560- public static function redirectToDefaultPage (): void {
561- $ location = self ::getDefaultPageUrl ();
562- header ('Location: ' . $ location );
563- exit ();
564- }
565-
566528 /**
567529 * get an id unique for this instance
568530 *
@@ -578,45 +540,6 @@ public static function getInstanceId(): string {
578540 return $ id ;
579541 }
580542
581- /**
582- * Public function to sanitize HTML
583- *
584- * This function is used to sanitize HTML and should be applied on any
585- * string or array of strings before displaying it on a web page.
586- *
587- * @param string|string[] $value
588- * @return ($value is array ? string[] : string)
589- * @deprecated 32.0.0 use \OCP\Util::sanitizeHTML instead
590- */
591- public static function sanitizeHTML ($ value ) {
592- if (is_array ($ value )) {
593- $ value = array_map (function ($ value ) {
594- return self ::sanitizeHTML ($ value );
595- }, $ value );
596- } else {
597- // Specify encoding for PHP<5.4
598- $ value = htmlspecialchars ((string )$ value , ENT_QUOTES , 'UTF-8 ' );
599- }
600- return $ value ;
601- }
602-
603- /**
604- * Public function to encode url parameters
605- *
606- * This function is used to encode path to file before output.
607- * Encoding is done according to RFC 3986 with one exception:
608- * Character '/' is preserved as is.
609- *
610- * @param string $component part of URI to encode
611- * @return string
612- * @deprecated 32.0.0 use \OCP\Util::encodePath instead
613- */
614- public static function encodePath ($ component ) {
615- $ encoded = rawurlencode ($ component );
616- $ encoded = str_replace ('%2F ' , '/ ' , $ encoded );
617- return $ encoded ;
618- }
619-
620543 /**
621544 * Check if current locale is non-UTF8
622545 *
0 commit comments