X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Ftext.php;h=6aa0c9d2dd43208e33464c913d79253b5a04cf4c;hb=6e1ed0b0d33ce3f893397eeb25909269402cf6bd;hp=d48986161dd25411d73a94872baa5fac06a0ce49;hpb=cd9b864045588308e18e16f7a1c1029fd380d8fd;p=friendica.git diff --git a/include/text.php b/include/text.php index d48986161d..6aa0c9d2dd 100644 --- a/include/text.php +++ b/include/text.php @@ -462,86 +462,6 @@ function perms2str($p) { return $ret; } -/** - * @deprecated - * wrapper to load a view template, checking for alternate - * languages before falling back to the default - * - * @global string $lang - * @global App $a - * @param string $s view name - * @return string - */ -function load_view_file($s) { - global $lang, $a; - if (!isset($lang)) { - $lang = 'en'; - } - $b = basename($s); - $d = dirname($s); - if (file_exists("$d/$lang/$b")) { - $stamp1 = microtime(true); - $content = file_get_contents("$d/$lang/$b"); - $a->save_timestamp($stamp1, "file"); - return $content; - } - - $theme = $a->getCurrentTheme(); - - if (file_exists("$d/theme/$theme/$b")) { - $stamp1 = microtime(true); - $content = file_get_contents("$d/theme/$theme/$b"); - $a->save_timestamp($stamp1, "file"); - return $content; - } - - $stamp1 = microtime(true); - $content = file_get_contents($s); - $a->save_timestamp($stamp1, "file"); - return $content; -} - - -/** - * load a view template, checking for alternate - * languages before falling back to the default - * - * @global string $lang - * @param string $s view path - * @return string - */ -function get_intltext_template($s) { - global $lang; - - $a = get_app(); - $engine = ''; - if ($a->theme['template_engine'] === 'smarty3') { - $engine = "/smarty3"; - } - - if (!isset($lang)) { - $lang = 'en'; - } - - if (file_exists("view/lang/$lang$engine/$s")) { - $stamp1 = microtime(true); - $content = file_get_contents("view/lang/$lang$engine/$s"); - $a->save_timestamp($stamp1, "file"); - return $content; - } elseif (file_exists("view/lang/en$engine/$s")) { - $stamp1 = microtime(true); - $content = file_get_contents("view/lang/en$engine/$s"); - $a->save_timestamp($stamp1, "file"); - return $content; - } else { - $stamp1 = microtime(true); - $content = file_get_contents("view$engine/$s"); - $a->save_timestamp($stamp1, "file"); - return $content; - } -} - - /** * load template $s * @@ -599,7 +519,6 @@ $LOGGER_LEVELS = []; * LOGGER_DATA * LOGGER_ALL * - * @global App $a * @global array $LOGGER_LEVELS * @param string $msg * @param int $level @@ -670,12 +589,10 @@ function logger($msg, $level = 0) { * LOGGER_DATA * LOGGER_ALL * - * @global App $a * @global array $LOGGER_LEVELS * @param string $msg * @param int $level */ - function dlogger($msg, $level = 0) { $a = get_app();