Commit 711843a0 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: add legalNoticeURL to app config for setting an external url to legal notice

parent 98a8a480
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ tests:
    MYSQL_PASSWORD: "castopod"

  script:
    - apt-get install -y mariadb-client  libmariadb-dev
    - apt-get update && apt-get install -y mariadb-client  libmariadb-dev

    - echo "SHOW DATABASES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mariadb "$MYSQL_DATABASE"

+2 −0
Original line number Diff line number Diff line
@@ -456,4 +456,6 @@ class App extends BaseConfig
     * Storage limit in Gigabytes
     */
    public ?int $storageLimit = null;

    public ?string $legalNoticeURL = null;
}
+9 −0
Original line number Diff line number Diff line
@@ -34,6 +34,15 @@ if (! function_exists('render_page_links')) {
            ]);
        }

        // if set in .env, add legal notice link at the end of page links
        if (config('App')->legalNoticeURL !== null) {
            $links .= anchor(config('App')->legalNoticeURL, lang('Common.legal_notice'), [
                'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent',
                'target' => '_blank',
                'rel' => 'noopener noreferrer',
            ]);
        }

        return '<nav class="' . $class . '">' . $links . '</nav>';
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -26,4 +26,5 @@ return [
    'read_less' => 'Read less',
    'see_more' => 'See more',
    'see_less' => 'See less',
    'legal_notice' => 'Legal notice',
];