23-01-2026

This commit is contained in:
Kevin Adametz 2026-01-23 17:35:23 +01:00
parent a939cd51ef
commit a8b395e20d
248 changed files with 29342 additions and 4805 deletions

View file

@ -7,7 +7,7 @@ use App\Services\DomainService;
if (! function_exists('make_old_url')) {
function make_old_url($path)
{
return config('app.old_url').$path;
return config('app.old_url') . $path;
}
}
@ -15,7 +15,7 @@ if (! function_exists('make_old_url')) {
if (! function_exists('make_old_url')) {
function make_old_url($path)
{
return config('app.old_url').$path;
return config('app.old_url') . $path;
}
}
@ -30,7 +30,8 @@ if (! function_exists('get_file_last_time')) {
}
if (! function_exists('get_user_attr')) {
function get_user_attr($key){
function get_user_attr($key)
{
if ($user = Auth::user()) {
return $user->getSetting($key);
}
@ -39,7 +40,8 @@ if (! function_exists('get_user_attr')) {
}
if (! function_exists('set_user_attr')) {
function set_user_attr($key, $value){
function set_user_attr($key, $value)
{
if ($user = Auth::user()) {
return $user->setSetting([$key => $value]);
}
@ -50,15 +52,15 @@ if (! function_exists('set_user_attr')) {
if (! function_exists('get_active_badge')) {
function get_active_badge($active, $tooltip = false, $pos = "top")
{
if($tooltip){
$tooltip = 'data-toggle="tooltip" data-placement="top" data-original-title="'.$tooltip.'"';
if ($tooltip) {
$tooltip = 'data-toggle="tooltip" data-placement="top" data-original-title="' . $tooltip . '"';
}
return $active ? '<span class="badge badge-pill badge-success" '.$tooltip.'><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger" '.$tooltip.'><i class="fa fa-times"></i></span>';
return $active ? '<span class="badge badge-pill badge-success" ' . $tooltip . '><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger" ' . $tooltip . '><i class="fa fa-times"></i></span>';
}
}
if (! function_exists('formatNumber')) {
function formatNumber($number, $dec=2)
function formatNumber($number, $dec = 2)
{
return !$number ? $number : Util::formatNumber($number, $dec);
}
@ -88,32 +90,44 @@ if (! function_exists('formatDate')) {
if (! function_exists('maxStrLength')) {
function maxStrLength($str, $lenght = 40)
{
return !$str ? $str : Util::maxStrLength($str, $lenght); }
return !$str ? $str : Util::maxStrLength($str, $lenght);
}
}
if (! function_exists('get_abo_type_badge_by_product')) {
function get_abo_type_badge_by_product($product){
function get_abo_type_badge_by_product($product)
{
return AboHelper::getAboTypeBadge(AboHelper::getAboShowOn($product));
}
}
if (! function_exists('get_abo_type_badge')) {
function get_abo_type_badge($type){
function get_abo_type_badge($type)
{
return AboHelper::getAboTypeBadge($type);
}
}
if (! function_exists('cleanIntegerFromString')) {
function cleanIntegerFromString($value) {
function cleanIntegerFromString($value)
{
return Util::cleanIntegerFromString($value);
}
}
if (! function_exists('formatTextWithLineBreaks')) {
function formatTextWithLineBreaks($text, $translate = false)
{
return Util::formatTextWithLineBreaks($text, $translate);
}
}
if (! function_exists('legal_url')) {
/**
* Generate URL for legal pages that should always point to shop domain from checkout
*/
function legal_url($path) {
function legal_url($path)
{
try {
// HOTFIX: DomainContext temporär deaktiviert
// TODO: Nach Claude v2 Implementation wieder aktivieren
@ -122,7 +136,7 @@ if (! function_exists('legal_url')) {
// $domainService = app(DomainService::class);
// return $domainService->buildUrl('main', $path);
// }
// Temporär: Verwende immer normale URL generation
return url($path);
} catch (Exception $e) {
@ -130,4 +144,4 @@ if (! function_exists('legal_url')) {
return url($path);
}
}
}
}